mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-21 17:11:04 +00:00
utils: streamproducer: update appsrc latency upon appsink latency event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1560>
This commit is contained in:
parent
cfa9ea2dc7
commit
45e3358497
1 changed files with 2 additions and 0 deletions
|
@ -349,6 +349,7 @@ impl StreamProducer {
|
|||
.is_ok()
|
||||
|| latency_updated
|
||||
{
|
||||
gst::info!(CAT, obj = appsink, "setting new latency: {latency}");
|
||||
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 mut consumers = consumers.lock().unwrap();
|
||||
consumers.current_latency = Some(latency);
|
||||
consumers.latency_updated = true;
|
||||
|
||||
gst::PadProbeReturn::Ok
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue