I have the following rough code trying to get a pipeline going. All the GstElement * variables are global to the file so I left those out. But every call to gst_element_factory_make works with no NULL values return.<br>I want the following:<br>
<br>uridecodebin ---&gt; volume --&gt; equalizer-10band --&gt; alsasink<br><br>If I connect uridecodebin directly to the alsasink sink everything works, but when I connect the pad in on_pad_connect to volume &quot;sink&quot; or mixer &quot;sink&quot; I get an Internal Data Error. Volume and mixer sink accepts raw data, uridecodebin outputs raw data. <br>
<br>If I launch gst-launch with this chain everything works.<br><br>What am I doing wrong? <br><br>----------------------------------------------------------<br>----------------------------------------------------------<br>
static void<br>on_pad_added (GstElement *element,<br>              GstPad     *pad,<br>              gpointer    data)<br>{<br>  GstPad *sinkpad;<br><br>  sinkpad = gst_element_get_static_pad (mixer, &quot;sink&quot;);<br>
  if(sinkpad==NULL)<br>        printf(&quot;Sink pad is null\n&quot;);<br>     <br>  gst_pad_link (pad, sinkpad);<br>  gst_object_unref (sinkpad);<br>}<br><br>/*<br> * Set up the streaming pipleine<br> *<br> *<br> */<br>GstElement *<br>
init_streamer(void) {<br>    GstElement *pipeline;<br>   <br>    /* create pipeline */<br>    pipeline = gst_pipeline_new (&quot;rpm streamer&quot;);<br>   <br>    src=gst_element_factory_make (&quot;uridecodebin&quot;, &quot;play&quot;);<br>
    if(!src) {<br>        printf(&quot;Failed to create source\n&quot;);<br>        exit(0);<br>    }<br>    audio=gst_element_factory_make (&quot;alsasink&quot;, &quot;output&quot;);<br>    gain=gst_element_factory_make(&quot;volume&quot;,&quot;gain&quot;);<br>
    if(!gain) {<br>        printf(&quot;Failed to create gain\n&quot;);<br>        exit(0);<br>    }<br>    mixer=gst_element_factory_make(&quot;equalizer-10bands&quot;,&quot;mix&quot;);<br>    if(!mixer) {<br>        printf(&quot;Failed to create mixer\n&quot;);<br>
        exit(0);<br>    }<br>   <br>    ac=gst_element_factory_make(&quot;audioconvert&quot;,&quot;convert&quot;);<br>    if(!ac) {<br>        printf(&quot;Failed to create audioconvert\n&quot;);<br>        exit(0);<br>    }<br>
<br>    //<br>    g_object_set (G_OBJECT (gain), &quot;volume&quot;, 1.0, NULL);<br>    g_signal_connect (src, &quot;pad-added&quot;, G_CALLBACK (on_pad_added), NULL);<br><br>    //pipeline=gst_element_factory_make (&quot;playbin&quot;, &quot;play&quot;);<br>
    gst_bin_add_many (GST_BIN (pipeline), src, mixer, audio, NULL);<br><br>    return(pipeline);<br>}<br>