mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 21:41:03 +00:00
threadshare: fix latency query handlers
Returning 0 as the max latency in those sources is incorrect, and may lead to sinks incorrectly complaining about insufficient buffering elements. Reproduce with: gst-launch-1.0 ts-udpsrc port=50000 address=127.0.0.1 \ caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA, payload=(int)8" ! \ rtppcmadepay ! alawdec ! autoaudiosink gst-launch-1.0 audiotestsrc do-timestamp=true samplesperbuffer=400 ! \ alawenc ! rtppcmapay max-ptime=50000000 min-ptime=50000000 ! \ udpsink host=127.0.0.1 port=50000 Logs: Not enough buffering available for the processing deadline of 0:00:00.020000000, add enough queues to buffer 0:00:00.020000000 additional data. Shortening processing latency to 0:00:00.000000000. This then causes glitches, there are many other ways for the problems to manifest.
This commit is contained in:
parent
decc1e2029
commit
c50aa09034
4 changed files with 4 additions and 4 deletions
|
@ -363,7 +363,7 @@ impl PadSrcHandler for AppSrcPadHandler {
|
|||
gst_log!(CAT, obj: pad.gst_pad(), "Handling {:?}", query);
|
||||
let ret = match query.view_mut() {
|
||||
QueryView::Latency(ref mut q) => {
|
||||
q.set(true, 0.into(), 0.into());
|
||||
q.set(true, 0.into(), gst::CLOCK_TIME_NONE);
|
||||
true
|
||||
}
|
||||
QueryView::Scheduling(ref mut q) => {
|
||||
|
|
|
@ -1101,7 +1101,7 @@ impl PadSrcHandler for ProxySrcPadHandler {
|
|||
gst_log!(SRC_CAT, obj: pad.gst_pad(), "Handling {:?}", query);
|
||||
let ret = match query.view_mut() {
|
||||
QueryView::Latency(ref mut q) => {
|
||||
q.set(true, 0.into(), 0.into());
|
||||
q.set(true, 0.into(), gst::CLOCK_TIME_NONE);
|
||||
true
|
||||
}
|
||||
QueryView::Scheduling(ref mut q) => {
|
||||
|
|
|
@ -423,7 +423,7 @@ impl PadSrcHandler for TcpClientSrcPadHandler {
|
|||
gst_log!(CAT, obj: pad.gst_pad(), "Handling {:?}", query);
|
||||
let ret = match query.view_mut() {
|
||||
QueryView::Latency(ref mut q) => {
|
||||
q.set(false, 0.into(), 0.into());
|
||||
q.set(false, 0.into(), gst::CLOCK_TIME_NONE);
|
||||
true
|
||||
}
|
||||
QueryView::Scheduling(ref mut q) => {
|
||||
|
|
|
@ -590,7 +590,7 @@ impl PadSrcHandler for UdpSrcPadHandler {
|
|||
|
||||
let ret = match query.view_mut() {
|
||||
QueryView::Latency(ref mut q) => {
|
||||
q.set(true, 0.into(), 0.into());
|
||||
q.set(true, 0.into(), gst::CLOCK_TIME_NONE);
|
||||
true
|
||||
}
|
||||
QueryView::Scheduling(ref mut q) => {
|
||||
|
|
Loading…
Reference in a new issue