diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-10-14 16:15:48 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-10-14 17:01:51 +0200 |
commit | 88884cfddbfdb238f39e19a000292aa031c39fd6 (patch) | |
tree | 90a5f5b3adb2df3b7a0425aef5350c5504d9c449 /gst | |
parent | 959a3f9c954657966932a16f18aed26fd64b04a7 (diff) |
rtspsrc: forward events into the rtpbin
Only catch the SEEK event on the srcpad and let other events enter the rtpbin.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 7f16146fd..b28e6a901 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -1614,6 +1614,7 @@ gst_rtspsrc_handle_src_event (GstPad * pad, GstEvent * event) { GstRTSPSrc *src; gboolean res = TRUE; + gboolean forward; src = GST_RTSPSRC_CAST (gst_pad_get_parent (pad)); @@ -1621,19 +1622,29 @@ gst_rtspsrc_handle_src_event (GstPad * pad, GstEvent * event) GST_DEBUG_PAD_NAME (pad), GST_EVENT_TYPE_NAME (event)); switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_QOS: - break; case GST_EVENT_SEEK: res = gst_rtspsrc_perform_seek (src, event); + forward = FALSE; break; + case GST_EVENT_QOS: case GST_EVENT_NAVIGATION: - break; case GST_EVENT_LATENCY: - break; default: + forward = TRUE; break; } - gst_event_unref (event); + if (forward) { + GstPad *target; + + if ((target = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad)))) { + res = gst_pad_send_event (target, event); + gst_object_unref (target); + } else { + gst_event_unref (event); + } + } else { + gst_event_unref (event); + } gst_object_unref (src); return res; |