mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
decklinkvideosink: Also consider max-lateness property value before dropping late frames
This commit is contained in:
parent
d95a12e185
commit
e734c3cf13
1 changed files with 4 additions and 2 deletions
|
@ -300,14 +300,16 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer)
|
|||
// potentially overflowing the internal queue of the hardware
|
||||
clock = gst_element_get_clock (GST_ELEMENT_CAST (self));
|
||||
if (clock) {
|
||||
GstClockTime clock_running_time, latency;
|
||||
GstClockTime clock_running_time, latency, max_lateness;
|
||||
|
||||
clock_running_time = gst_element_get_base_time (GST_ELEMENT_CAST (self));
|
||||
if (clock_running_time != GST_CLOCK_TIME_NONE) {
|
||||
clock_running_time = gst_clock_get_time (clock) - clock_running_time;
|
||||
latency = gst_base_sink_get_latency (GST_BASE_SINK_CAST (self));
|
||||
max_lateness = gst_base_sink_get_max_lateness (GST_BASE_SINK_CAST (self));
|
||||
|
||||
if (clock_running_time > running_time + running_time_duration + latency) {
|
||||
if (clock_running_time >
|
||||
running_time + running_time_duration + latency + max_lateness) {
|
||||
GST_DEBUG_OBJECT (self,
|
||||
"Late buffer: %" GST_TIME_FORMAT " > %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (clock_running_time),
|
||||
|
|
Loading…
Reference in a new issue