Splitting audio pipeline with tee and different formats

Jonas Kvinge jonas at jkvinge.net
Fri Nov 8 18:25:06 UTC 2019


Hi

I'm trying to use a tee to split the audio pipeline so that S16LE can be
sent to a spectrum analyzer, without changing the audio format that is
sent to alsasink.

However, whenever I set "format" to "S16LE" for the fakesink, it also
affects alsasink. So both queues are affected and set to S16_LE. If I
remove the format and set only "audio/x-raw" or link the elements
without the caps, it's unaffected and outputs S24_3LE.

The file is: FLAC audio bitstream data, 24 bit, stereo, 192 kHz,
55598080 samples

I can output S24_3LE correctly with the following command:
gst-launch-1.0 uridecodebin
uri=file:///home/jonas/temp/Southern_Cross.flac ! tee name=t t. ! queue
! audioconvert ! audio/x-raw,format=S24LE ! alsasink device=hw:0,0 t. !
queue ! audioconvert ! audio/x-raw,format=S16LE ! fakesink

Doing the same thing in code however either limits to 16 bit, or does
not play at all.

See attached code

Jonas


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191108/c3fd38c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstpipelinetest.cpp
Type: text/x-c++src
Size: 10110 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191108/c3fd38c7/attachment.cpp>


More information about the gstreamer-devel mailing list