GNOME Bugzilla – Bug 352456
Audio plays 1 sec then stops
Last modified: 2006-08-23 11:34:50 UTC
It seems if I try : gst-launch-0.10 audiotestsrc ! mulawenc ! rtppcmupay ! udpsink host=localhost port=7777 and then : gst-launch-0.10 udpsrc port=7777 ! application/x-rtp,media=audio,payload=96,clock-rate=8000 ! rtppcmudepay queue-delay=0 ! mulawdec ! alsasink I get into a situation where : ringbuffer(23521) gstringbuffer.c(1196):gst_ring_buffer_commit: pointer at 45, sample 5418, write to 31-148, to_write 837, diff -14, segtotal 17, segsize 170 the diff is always negative and thus the buffer is dropped (I wonder too why the segtotal is 17 rather then 16...) I had this problem with something else before then found out I was converting a 16 bit audio to 32 bit via audioresample .. but this time nothing of the sort... Seems like it could affect a lot of plugins...
Does not seem like a bug, udpsrc is a live source, probably producing data at a slower rate then needed by alsasink and thus alsasink starvates as buffers are too late. The solution is to 1) set alsasink sync=false so that it tries to follow the rate. 2) use an RTP session manager that exposes a clock to the pipeline based on the rate of the UDP packets received. alsasink will then slave itself to this clock and adjust the rate to this clock. This will however not work yet since latency calculations are not yet implemented, see bug #340842. The baseaudiosink base class allocates one extra segment so that it has extra headroom when preparing samples for the audio card. Please reopen if you suspect something else is wrong.