[Bug 771183] New: directsoundsrc: Use DSBSIZE_MIN for secondary buffer size

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Sep 10 13:16:52 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=771183

            Bug ID: 771183
           Summary: directsoundsrc: Use DSBSIZE_MIN for secondary buffer
                    size
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Mac OS
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: marcin at saepia.net
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 335248
  --> https://bugzilla.gnome.org/attachment.cgi?id=335248&action=edit
patch causing directsoundsrc to use DSBSIZE_MIN for buffer size

I have a program that sends audio over RTP and it is supposed to work for quite
a long time. It is used on Windows.

I have noticed during testing that while initial latency is quite low, over
time it gradually increases until it reaches +/- 2s.

I have removed all queues and disabled sync in all elements, the only buffer in
my code is rtpjitterbuffer with latency set to 100ms and drop-on-latency =
true.

During investigation of GStreamer's code I've encountered the following piece
of code in directsoundsrc


  /* Set the buffer size to two seconds. 
     This should never reached. 
   */
dsoundsrc->buffer_size = wfx.nAvgBytesPerSec * 2;


Well, it seems it is reached.

In contrary, directsoundsink is setting DSBSIZE_MIN for the secondary buffer,
which IMO is better approach anyway than any arbitrarily set value.

The attached patch causes directsoundsrc to use DSBSIZE_MIN for secondary
buffer size.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list