can not link audio volume element to audio bin
newcfd at yahoo.com
Thu Nov 17 15:13:17 UTC 2022
I moved it to the back of audiobin and the problem is solved. Thank you so much,
On Wednesday, November 16, 2022, 10:45:53 p.m. EST, Matthew Waters via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
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
to build 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`.
g_printerr("Cannot link audioDepay and audioParse \n");
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...
More information about the gstreamer-devel