I need a little help on this. Using <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/index.html">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/index.html</a> as a guide I have tried to create an autoplugging pipeline that contains both volume and equalizer-10band. In the pad callback if I connect the dynamic pad directly to the alsasink sink it works. But if I create the pipeline and try to connect volume or the EQ I get an "Error: Internal data flow error." error. I van't seem to find any examples or additional information for this. <br>
<br>Can anybody point me to an example or help out? <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 (gain, "sink");<br>
if(sinkpad==NULL)<br> printf("Sink pad is null\n");<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>
<br>GstElement *<br>init_streamer(void) {<br> GstElement *pipeline;<br> <br> /* create pipeline */<br> pipeline = gst_pipeline_new ("streamer");<br> <br> src=gst_element_factory_make ("uridecodebin", "play");<br>
if(!src) {<br> printf("Failed to create source\n");<br> exit(0);<br> }<br> audio=gst_element_factory_make ("alsasink", "output");<br> gain=gst_element_factory_make("volume","gain");<br>
if(!gain) {<br> printf("Failed to create gain\n");<br> exit(0);<br> }<br> mixer=gst_element_factory_make("equalizer-10bands","mix");<br> if(!mixer) {<br> printf("Failed to create mixer\n");<br>
exit(0);<br> }<br> <br> ac=gst_element_factory_make("audioconvert","convert");<br> if(!ac) {<br> printf("Failed to create audioconvert\n");<br> exit(0);<br> }<br>
<br> //<br> g_object_set (G_OBJECT (gain), "volume", 1.0, NULL);<br> g_signal_connect (src, "pad-added", G_CALLBACK (on_pad_added), NULL);<br><br> //pipeline=gst_element_factory_make ("playbin", "play");<br>
gst_bin_add_many (GST_BIN (pipeline), src, gain, audio, NULL);<br><br> return(pipeline);<br>}<br>