mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst/flv/gstflvdemux.c: Implement position query in time format.
Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_query): Implement position query in time format.
This commit is contained in:
parent
a85344333b
commit
6e70ab7d40
2 changed files with 27 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-10-28 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/flv/gstflvdemux.c: (gst_flv_demux_query):
|
||||||
|
Implement position query in time format.
|
||||||
|
|
||||||
2008-10-28 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2008-10-28 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
* gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup),
|
* gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup),
|
||||||
|
|
|
@ -1036,6 +1036,28 @@ gst_flv_demux_query (GstPad * pad, GstQuery * query)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GST_QUERY_POSITION:
|
||||||
|
{
|
||||||
|
GstFormat format;
|
||||||
|
|
||||||
|
gst_query_parse_position (query, &format, NULL);
|
||||||
|
|
||||||
|
/* position is time only */
|
||||||
|
if (format != GST_FORMAT_TIME) {
|
||||||
|
GST_DEBUG_OBJECT (demux, "position query only supported for time "
|
||||||
|
"format");
|
||||||
|
res = FALSE;
|
||||||
|
goto beach;
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (pad, "position query, replying %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (demux->segment.last_stop));
|
||||||
|
|
||||||
|
gst_query_set_duration (query, GST_FORMAT_TIME, demux->segment.last_stop);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case GST_QUERY_LATENCY:
|
case GST_QUERY_LATENCY:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue