can not link audio volume element to audio bin

cfd new newcfd at yahoo.com
Thu Nov 17 15:13:17 UTC 2022


 Hi, Matt,
   I moved it to the back of audiobin and the problem is solved. Thank you so much,
   Joe
    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 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/3175f28b/attachment-0001.htm>


More information about the gstreamer-devel mailing list