Question about latency_time, buffer_time, etc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about latency_time, buffer_time, etc

W. Michael Petullo
I am having trouble understanding GstRingBuffer's latency_time,
buffer_time, segsize and segtotal records. I've read the object's
documentation and looked at alsasink.c. I am looking at this in the
context of working on apexsink.

The variant of apexsink that I am working on sends packets of a constant
size, with a 1,408-byte payload to an AirTunes device. By setting
segsize to 1,408, it seems that I ensure that the "upstream" plugin writes
data at 1,408-byte increments. That is, my write method gets called with a
length of 1,408. So, how is latency_time and buffer_time related to
this?

Another thing that I have observed is that audio does not stream properly
unless I set segtotal > 1. Setting this value to 2 ensures that the
stream plays. Again, I am interested in finding a good place to read
about the interaction of these four values.

Thank you,

--
Mike

:wq
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question about latency_time, buffer_time, etc

René Stadler
On Tue, May 17, 2011 at 5:26 AM, W. Michael Petullo <[hidden email]> wrote:
I am having trouble understanding GstRingBuffer's latency_time,
buffer_time, segsize and segtotal records. I've read the object's
documentation and looked at alsasink.c. I am looking at this in the
context of working on apexsink.
[...] 
Another thing that I have observed is that audio does not stream properly
unless I set segtotal > 1. Setting this value to 2 ensures that the
stream plays. Again, I am interested in finding a good place to read
about the interaction of these four values.
 
Did you notice the inline comments in the GstRingBufferSpec structure? You can find those here:

I'm a bit surprised that segtotal = 1 doesn't produce a warning or error. The smallest meaningful ring buffer configuration is with two segments, where one can be in use by the writer (upstream) and the other one by the reader (consumer).

I'm not sure about apex, but I have the feeling it might make more sense to look at pulsesink instead of alsasink for reference.

--
René

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel