summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-07-29 12:19:22 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-07-29 12:19:38 +0200
commit461a46f17a12bc00307fd8fe5d770e0cadbd44fa (patch)
treead8f8590df63fec98ab98da541df869c161cb36c /ext
parentb1dccb17e913c998b1874d2c4f0c822353a5523c (diff)
avdemux: Implement SEGMENT query
Diffstat (limited to 'ext')
-rw-r--r--ext/libav/gstavdemux.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/libav/gstavdemux.c b/ext/libav/gstavdemux.c
index ec5e0e5..d0df524 100644
--- a/ext/libav/gstavdemux.c
+++ b/ext/libav/gstavdemux.c
@@ -815,6 +815,24 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
res = TRUE;
break;
}
+ case GST_QUERY_SEGMENT:{
+ GstFormat format;
+ gint64 start, stop;
+
+ format = demux->segment.format;
+
+ start =
+ gst_segment_to_stream_time (&demux->segment, format,
+ demux->segment.start);
+ if ((stop = demux->segment.stop) == -1)
+ stop = demux->segment.duration;
+ else
+ stop = gst_segment_to_stream_time (&demux->segment, format, stop);
+
+ gst_query_set_segment (query, demux->segment.rate, format, start, stop);
+ res = TRUE;
+ break;
+ }
default:
/* FIXME : ADD GST_QUERY_CONVERT */
res = gst_pad_query_default (pad, parent, query);