rtspsrc: handle SEEKING queries.

This commit is contained in:
Alessandro Decina 2010-05-04 16:04:39 +02:00
parent 220f865f77
commit c8a02a91a6

View file

@ -1884,6 +1884,21 @@ gst_rtspsrc_handle_src_query (GstPad * pad, GstQuery * query)
} }
break; 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: default:
{ {
GstPad *target = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad)); 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); gst_rtsp_ext_list_stream_select (src->extensions, url);
/* if there is nothing to activate, error out */ /* if there is nothing to activate, error out */