mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
[MOVED FROM GST-P-FARSIGHT] For latencies, use the min of the max and the max of the min (and the min wins if they cross)
20080403020253-3e2dc-dda7e471073ee75a6f60e845c3c546af9be19675.gz
This commit is contained in:
parent
1e7eeda115
commit
5a48de94d7
1 changed files with 6 additions and 3 deletions
|
@ -634,8 +634,8 @@ gst_live_adder_query (GstPad * pad, GstQuery * query)
|
|||
GST_PAD_NAME (sinkpad),
|
||||
GST_TIME_ARGS (pad_min_latency), GST_TIME_ARGS (pad_max_latency));
|
||||
|
||||
min_latency = MIN (pad_min_latency, min_latency);
|
||||
max_latency = MAX (pad_max_latency, max_latency);
|
||||
min_latency = MAX (pad_min_latency, min_latency);
|
||||
max_latency = MIN (pad_max_latency, max_latency);
|
||||
}
|
||||
gst_object_unref (item);
|
||||
}
|
||||
|
@ -661,6 +661,9 @@ gst_live_adder_query (GstPad * pad, GstQuery * query)
|
|||
if (min_latency == G_MAXUINT64)
|
||||
min_latency = 0;
|
||||
|
||||
if (max_latency < min_latency)
|
||||
max_latency = min_latency;
|
||||
|
||||
GST_OBJECT_LOCK (adder);
|
||||
adder->peer_latency = min_latency;
|
||||
min_latency += adder->latency_ms * GST_MSECOND;
|
||||
|
@ -1122,7 +1125,7 @@ gst_live_adder_loop (gpointer data)
|
|||
/*
|
||||
* We should probably loop through all of the sinks that have a segment
|
||||
* and take the min of the starts and the max of the stops
|
||||
* and convert them to running times and use these are start/stop.
|
||||
* and convert them to running times and use these as start/stop.
|
||||
* And so something smart about the positions with seeks that I dont
|
||||
* understand yet.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue