mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
scaletempo: Implement SEGMENT query
https://bugzilla.gnome.org/show_bug.cgi?id=797313
This commit is contained in:
parent
2415d517f1
commit
a03d29420b
1 changed files with 21 additions and 0 deletions
|
@ -748,6 +748,27 @@ gst_scaletempo_query (GstBaseTransform * trans, GstPadDirection direction,
|
||||||
|
|
||||||
if (direction == GST_PAD_SRC) {
|
if (direction == GST_PAD_SRC) {
|
||||||
switch (GST_QUERY_TYPE (query)) {
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
|
case GST_QUERY_SEGMENT:
|
||||||
|
{
|
||||||
|
GstFormat format;
|
||||||
|
gint64 start, stop;
|
||||||
|
|
||||||
|
format = scaletempo->out_segment.format;
|
||||||
|
|
||||||
|
start =
|
||||||
|
gst_segment_to_stream_time (&scaletempo->out_segment, format,
|
||||||
|
scaletempo->out_segment.start);
|
||||||
|
if ((stop = scaletempo->out_segment.stop) == -1)
|
||||||
|
stop = scaletempo->out_segment.duration;
|
||||||
|
else
|
||||||
|
stop =
|
||||||
|
gst_segment_to_stream_time (&scaletempo->out_segment, format,
|
||||||
|
stop);
|
||||||
|
|
||||||
|
gst_query_set_segment (query, scaletempo->out_segment.rate, format,
|
||||||
|
start, stop);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
case GST_QUERY_LATENCY:{
|
case GST_QUERY_LATENCY:{
|
||||||
GstPad *peer;
|
GstPad *peer;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue