mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 01:21:05 +00:00
utils: streamproducer: update appsrc latency upon appsink latency event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1564>
This commit is contained in:
parent
a360f11ac7
commit
43fbdd54a7
1 changed files with 2 additions and 0 deletions
|
@ -349,6 +349,7 @@ impl StreamProducer {
|
||||||
.is_ok()
|
.is_ok()
|
||||||
|| latency_updated
|
|| latency_updated
|
||||||
{
|
{
|
||||||
|
gst::info!(CAT, obj = appsink, "setting new latency: {latency}");
|
||||||
consumer.appsrc.set_latency(latency, gst::ClockTime::NONE);
|
consumer.appsrc.set_latency(latency, gst::ClockTime::NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -626,6 +627,7 @@ impl<'a> From<&'a gst_app::AppSink> for StreamProducer {
|
||||||
let latency = event.latency();
|
let latency = event.latency();
|
||||||
let mut consumers = consumers.lock().unwrap();
|
let mut consumers = consumers.lock().unwrap();
|
||||||
consumers.current_latency = Some(latency);
|
consumers.current_latency = Some(latency);
|
||||||
|
consumers.latency_updated = true;
|
||||||
|
|
||||||
gst::PadProbeReturn::Ok
|
gst::PadProbeReturn::Ok
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue