[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
@ -634,8 +634,8 @@ gst_live_adder_query (GstPad * pad, GstQuery * query)
|
|||||||
GST_PAD_NAME (sinkpad),
|
GST_PAD_NAME (sinkpad),
|
||||||
GST_TIME_ARGS (pad_min_latency), GST_TIME_ARGS (pad_max_latency));
|
GST_TIME_ARGS (pad_min_latency), GST_TIME_ARGS (pad_max_latency));
|
||||||
|
|
||||||
min_latency = MIN (pad_min_latency, min_latency);
|
min_latency = MAX (pad_min_latency, min_latency);
|
||||||
max_latency = MAX (pad_max_latency, max_latency);
|
max_latency = MIN (pad_max_latency, max_latency);
|
||||||
}
|
}
|
||||||
gst_object_unref (item);
|
gst_object_unref (item);
|
||||||
}
|
}
|
||||||
@ -661,6 +661,9 @@ gst_live_adder_query (GstPad * pad, GstQuery * query)
|
|||||||
if (min_latency == G_MAXUINT64)
|
if (min_latency == G_MAXUINT64)
|
||||||
min_latency = 0;
|
min_latency = 0;
|
||||||
|
|
||||||
|
if (max_latency < min_latency)
|
||||||
|
max_latency = min_latency;
|
||||||
|
|
||||||
GST_OBJECT_LOCK (adder);
|
GST_OBJECT_LOCK (adder);
|
||||||
adder->peer_latency = min_latency;
|
adder->peer_latency = min_latency;
|
||||||
min_latency += adder->latency_ms * GST_MSECOND;
|
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
|
* 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 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
|
* And so something smart about the positions with seeks that I dont
|
||||||
* understand yet.
|
* understand yet.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user