[opusdec] Why is the output GstBuffer size 3840 instead of 4096 bytes with S16LE/2/48000 output format?

Arjen Veenhuizen arjen.veenhuizen at tno.nl
Wed Apr 22 01:17:26 PDT 2015


Using GIT HEAD, I am working with 16 bit, 2 channel, interleaved, little
endian PCM audio (S16LE).
When generating a single buffer with the following pipeline, 

I get an output file of exactly 4096 bytes, which is to be expected ((2
[channels] * 16 [bits per sample] * 1024 [samples per buffer]) / 8  = 4096
bytes)

But, when I use opusdec to decode an "audio/x-opus,rate=48000,channels=2"
stream, I only get 3840 bytes/GstBuffer
See also the lower branch of the following pipeline:
http://postimg.org/image/t4h3bvl37/full/ 
As you can see in that picture, the raw format after the opusdec element is
supposed to be "audio/x-raw, layout=interleaved, format=S16LE, rate=48000,
channels=2" as well. It looks to me as if the opusdec is only putting 960
samples in a single GstBuffer.

For my application to work, I really need the correct sized (4096 byte)
GstBuffers. What am I doing wrong?

Any pointers?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/opusdec-Why-is-the-output-GstBuffer-size-3840-instead-of-4096-bytes-with-S16LE-2-48000-output-format-tp4671649.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list