diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-10-28 18:44:44 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-10-28 18:44:44 +0000 |
commit | 6e70ab7d4024765f51c124e91d475d62511d3774 (patch) | |
tree | 50ca3e09916f4ecde2948a172a145e4eb232ff97 /gst | |
parent | a85344333bfbc5dd4ac1d5d4e975e8027e606f1e (diff) | |
download | gst-plugins-bad-6e70ab7d4024765f51c124e91d475d62511d3774.tar.gz gst-plugins-bad-6e70ab7d4024765f51c124e91d475d62511d3774.tar.bz2 gst-plugins-bad-6e70ab7d4024765f51c124e91d475d62511d3774.zip |
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.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/flv/gstflvdemux.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index a080c7b2..9e1e62f2 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -1036,6 +1036,28 @@ gst_flv_demux_query (GstPad * pad, GstQuery * query) 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: default: { |