From c8a02a91a6418fab7dadf5de819b0b3d65f832b1 Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Tue, 4 May 2010 16:04:39 +0200 Subject: [PATCH] rtspsrc: handle SEEKING queries. --- gst/rtsp/gstrtspsrc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 26617251ce..5d9473b6f5 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -1884,6 +1884,21 @@ gst_rtspsrc_handle_src_query (GstPad * pad, GstQuery * query) } break; } + case GST_QUERY_SEEKING: + { + GstFormat format; + + gst_query_parse_seeking (query, &format, NULL, NULL, NULL); + if (format == GST_FORMAT_TIME) { + gboolean seekable = + src->cur_protocols != GST_RTSP_LOWER_TRANS_UDP_MCAST; + + gst_query_set_seeking (query, GST_FORMAT_TIME, seekable, + src->segment.start, src->segment.stop); + res = TRUE; + } + break; + } default: { GstPad *target = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad)); @@ -4592,6 +4607,9 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src) } } + /* store the transport protocol that was configured */ + src->cur_protocols = protocols; + gst_rtsp_ext_list_stream_select (src->extensions, url); /* if there is nothing to activate, error out */