mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
utils: streamproducer: update appsrc latency upon appsink latency event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1565>
This commit is contained in:
parent
b0aa32b844
commit
ceea56aa72
1 changed files with 2 additions and 0 deletions
|
@ -327,6 +327,7 @@ impl StreamProducer {
|
|||
.is_ok()
|
||||
|| latency_updated
|
||||
{
|
||||
gst::info!(CAT, obj: appsink, "setting new latency: {latency}");
|
||||
consumer.appsrc.set_latency(latency, gst::ClockTime::NONE);
|
||||
}
|
||||
}
|
||||
|
@ -562,6 +563,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