summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-10-14 16:15:48 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-10-14 17:01:51 +0200
commit88884cfddbfdb238f39e19a000292aa031c39fd6 (patch)
tree90a5f5b3adb2df3b7a0425aef5350c5504d9c449
parent959a3f9c954657966932a16f18aed26fd64b04a7 (diff)
rtspsrc: forward events into the rtpbin
Only catch the SEEK event on the srcpad and let other events enter the rtpbin.
-rw-r--r--gst/rtsp/gstrtspsrc.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 7f16146f..b28e6a90 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;