summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-10-15 13:19:13 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-10-15 13:20:26 +0200
commit6725c91387ac786559086e5761e32bc495ac105b (patch)
treebff1aa5626870384881ddfa33da0b9d68bcefbd0
parentf071ff6993e1b50ba2c55fefef96604b0bed9fca (diff)
rtsp: handle events in TCP mode
We need to handle events in TCP mode so that we can reply to the LATENCY event with TRUE.
-rw-r--r--gst/rtsp/gstrtspsrc.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index b28e6a90..0ed3215c 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -1650,6 +1650,31 @@ gst_rtspsrc_handle_src_event (GstPad * pad, GstEvent * event)
return res;
}
+/* this is the final event function we receive on the internal source pad when
+ * we deal with TCP connections */
+static gboolean
+gst_rtspsrc_handle_internal_src_event (GstPad * pad, GstEvent * event)
+{
+ GstRTSPSrc *src;
+ gboolean res;
+
+ src = GST_RTSPSRC_CAST (gst_pad_get_element_private (pad));
+
+ GST_DEBUG_OBJECT (src, "pad %s:%s received event %s",
+ GST_DEBUG_PAD_NAME (pad), GST_EVENT_TYPE_NAME (event));
+
+ switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_SEEK:
+ case GST_EVENT_QOS:
+ case GST_EVENT_NAVIGATION:
+ case GST_EVENT_LATENCY:
+ default:
+ res = TRUE;
+ break;
+ }
+ return res;
+}
+
/* this is the final query function we receive on the internal source pad when
* we deal with TCP connections */
static gboolean
@@ -2140,6 +2165,7 @@ gst_rtspsrc_stream_configure_tcp (GstRTSPSrc * src, GstRTSPStream * stream,
gst_pad_link (pad0, stream->channelpad[0]);
gst_object_unref (stream->channelpad[0]);
stream->channelpad[0] = pad0;
+ gst_pad_set_event_function (pad0, gst_rtspsrc_handle_internal_src_event);
gst_pad_set_query_function (pad0, gst_rtspsrc_handle_internal_src_query);
gst_pad_set_element_private (pad0, src);
gst_pad_set_active (pad0, TRUE);