mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
avdemux: Implement SEGMENT query
This commit is contained in:
parent
b1dccb17e9
commit
461a46f17a
1 changed files with 18 additions and 0 deletions
|
@ -815,6 +815,24 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
break;
|
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:
|
default:
|
||||||
/* FIXME : ADD GST_QUERY_CONVERT */
|
/* FIXME : ADD GST_QUERY_CONVERT */
|
||||||
res = gst_pad_query_default (pad, parent, query);
|
res = gst_pad_query_default (pad, parent, query);
|
||||||
|
|
Loading…
Reference in a new issue