After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 352456 - Audio plays 1 sec then stops
Audio plays 1 sec then stops
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.7
Other Linux
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-22 21:03 UTC by Antoine Tremblay
Modified: 2006-08-23 11:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Antoine Tremblay 2006-08-22 21:03:06 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...
Comment 1 Wim Taymans 2006-08-23 11:34:50 UTC
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.