[gst-cvs] gst-plugins-good: [MOVED FROM BAD 45/57] gst/flv/gstflvdemux.c: Implement position query in time format.
Sebastian Dröge
slomo at kemper.freedesktop.org
Tue May 12 12:58:00 PDT 2009
Module: gst-plugins-good
Branch: master
Commit: ee53e44fd1487b0cdd8b527cc903e7181a63b9b3
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=ee53e44fd1487b0cdd8b527cc903e7181a63b9b3
Author: Sebastian Dröge <slomo at circular-chaos.org>
Date: Tue Oct 28 18:44:44 2008 +0000
[MOVED FROM BAD 45/57] 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.
---
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 a080c7b..9e1e62f 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:
{
More information about the Gstreamer-commits
mailing list