mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-02 17:53:48 +00:00
threadshare: udpsrc / tcpclientsrc: latency report
Incoming packets might be pushed up to `context-wait` late if the scheduler just parked due to no tasks needing progress. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2387>
This commit is contained in:
parent
10ec242460
commit
79f5bc96d9
2 changed files with 8 additions and 2 deletions
|
@ -127,7 +127,10 @@ impl PadSrcHandler for TcpClientSrcPadHandler {
|
||||||
use gst::QueryViewMut;
|
use gst::QueryViewMut;
|
||||||
let ret = match query.view_mut() {
|
let ret = match query.view_mut() {
|
||||||
QueryViewMut::Latency(q) => {
|
QueryViewMut::Latency(q) => {
|
||||||
q.set(false, gst::ClockTime::ZERO, gst::ClockTime::NONE);
|
let latency =
|
||||||
|
gst::ClockTime::try_from(imp.settings.lock().unwrap().context_wait).unwrap();
|
||||||
|
gst::debug!(CAT, obj = pad, "Reporting latency {latency}");
|
||||||
|
q.set(true, latency, gst::ClockTime::NONE);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
QueryViewMut::Scheduling(q) => {
|
QueryViewMut::Scheduling(q) => {
|
||||||
|
|
|
@ -153,7 +153,10 @@ impl PadSrcHandler for UdpSrcPadHandler {
|
||||||
use gst::QueryViewMut;
|
use gst::QueryViewMut;
|
||||||
let ret = match query.view_mut() {
|
let ret = match query.view_mut() {
|
||||||
QueryViewMut::Latency(q) => {
|
QueryViewMut::Latency(q) => {
|
||||||
q.set(true, gst::ClockTime::ZERO, gst::ClockTime::NONE);
|
let latency =
|
||||||
|
gst::ClockTime::try_from(imp.settings.lock().unwrap().context_wait).unwrap();
|
||||||
|
gst::debug!(CAT, obj = pad, "Reporting latency {latency}");
|
||||||
|
q.set(true, latency, gst::ClockTime::NONE);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
QueryViewMut::Scheduling(q) => {
|
QueryViewMut::Scheduling(q) => {
|
||||||
|
|
Loading…
Reference in a new issue