rtspsrc: forward events into the rtpbin

Only catch the SEEK event on the srcpad and let other events enter the rtpbin.
This commit is contained in:
Wim Taymans 2009-10-14 16:15:48 +02:00
parent 959a3f9c95
commit 88884cfddb

View file

@ -1614,6 +1614,7 @@ gst_rtspsrc_handle_src_event (GstPad * pad, GstEvent * event)
{ {
GstRTSPSrc *src; GstRTSPSrc *src;
gboolean res = TRUE; gboolean res = TRUE;
gboolean forward;
src = GST_RTSPSRC_CAST (gst_pad_get_parent (pad)); 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)); GST_DEBUG_PAD_NAME (pad), GST_EVENT_TYPE_NAME (event));
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_QOS:
break;
case GST_EVENT_SEEK: case GST_EVENT_SEEK:
res = gst_rtspsrc_perform_seek (src, event); res = gst_rtspsrc_perform_seek (src, event);
forward = FALSE;
break; break;
case GST_EVENT_QOS:
case GST_EVENT_NAVIGATION: case GST_EVENT_NAVIGATION:
break;
case GST_EVENT_LATENCY: case GST_EVENT_LATENCY:
break;
default: default:
forward = TRUE;
break; 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); gst_object_unref (src);
return res; return res;