can not link audio volume element to audio bin

Matthew Waters ystreet00 at gmail.com
Thu Nov 17 02:34:41 UTC 2022



On 17/11/22 11:07, cfd new via gstreamer-devel wrote:
> |following the link here: Linking audio and video bins with gstreamer 
> in c 
> <https://stackoverflow.com/questions/41742313/linking-audio-and-video-bins-with-gstreamer-in-c> 
> to build audio bin. /*audio bin*/ audio = gst_bin_new ("audiobin"); 
> audioQueue = gst_element_factory_make ("queue", "audio-queue"); 
> audioDepay = gst_element_factory_make ("rtpmp4gdepay", 
> "audio-depayer"); audioParse = gst_element_factory_make ("aacparse", 
> "audio-parser"); audioDecode = gst_element_factory_make ("avdec_aac", 
> "audio-decoder"); audioConvert = gst_element_factory_make 
> ("audioconvert", "aconv"); audioResample = gst_element_factory_make 
> ("audioresample", "audio-resample"); audioSink = 
> gst_element_factory_make ("autoaudiosink", "audiosink");
> |
> audioVolume = gst_element_factory_make("volume", "audiovolume" );|
> |gst_bin_add_many(GST_BIN(audio), audioQueue, audioVolume, audioDepay, 
> audioParse, audioDecode,audioConvert, audioResample, audioSink, NULL); ||
> ||||
> |
> |But I can not link volume element|
> /*Linking audio elements internally*/ if 
> (!gst_element_link_many(audioQueue, audioVolume, audioDepay, 
> audioParse, audioDecode, audioConvert, audioResample, audioSink, NULL))|

The volume element only operates on raw audio samples.  The place you 
have used for the ''volume' seems to be rtp payloaded aac data. 'volume' 
will not work in that position.

Move it after the decoder somewhere.  It may need more conversion and 
resampling elements depending on the exact audio format.  You can see a 
list of supported audio formats by running `gst-inspect-1.0 volume`.

Cheers
-Matt

> |{ g_printerr("Cannot link audioDepay and audioParse \n"); return 0; }
> |gst_element_link_many returns false. Without volume element, the 
> pipeline works fine, But I can not change volume. Any idea about what 
> is wrong? without audiobin, volume element can be added to the 
> pipeline and also no problem for link to audioQueue and changing 
> volume works fine.|
> |

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221117/590fae80/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221117/590fae80/attachment.sig>


More information about the gstreamer-devel mailing list