<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hello All,<br><br></div>Following is my pipeline :<br>


        
        
        
        <style type="text/css">PRE.cjk { font-family: "WenQuanYi Micro Hei",monospace; }PRE.ctl { font-family: "Lohit Hindi",monospace; }P { margin-bottom: 0.21cm; }A:link {  }</style>


<pre class="" style="margin-bottom:0.5cm" lang="en-US"><font color="#000000"><font face="Courier New"><font>gst-launch-1.0 -v filesrc location=/home/jyoti/Videos/conf.mp4 ! <br>qtdemux name=dmux dmux.audio_0 ! queue ! avdec_aac ! alsasink <br>
dmux.video_00 ! queue ! avdec_h264 ! xvimagesink</font></font></font></pre>

and it works fine..<br><br></div>But when i try to do this in c code i am facing the issues.<br><br></div>I do this way:<br><br></div>After linking all the elements,<br><br>g_signal_connect (data.demuxer, "pad-added", G_CALLBACK (on_pad_added),data.queue1);<br>
g_signal_connect (data.demuxer, "pad-added", G_CALLBACK (on_pad_added), data.queue2);<br><br></div>and the function on_pad_added:<br><br>static void on_pad_added (GstElement *element,GstPad *pad,CustomData *data)<br>
{<br>    <br>    gchar *name;<br>   <br><br>    name = gst_pad_get_name (pad);<br>    if (strcmp (name, "audio_0") == 0 &&<br>        !gst_element_link_pads(data->demuxer,name,data->queue1,"sink")) {<br>
        printf("link  fail\n");<br>    }<br>    if (strcmp (name, "video_0") == 0 &&<br>        !gst_element_link_pads(data->demuxer,name,data->queue2,"sink")) {<br>        printf("link fail\n");<br>
    }<br>    g_free (name);<br>}<br><br></div>Here CustomData is the structure containing all the elements.<br>typedef struct _CustomData { <br>GstElement *pipeline, *source, *demuxer, *video_decoder, *video_sink, *queue2, *audio_decoder, *audio_sink, *queue1;<br>
} <br><br><br></div>I get following assertions and then a general stream error.<br><br>GStreamer-CRITICAL **: gst_element_link_pads_full: assertion `GST_IS_ELEMENT (src)' failed<br> link  fail<br>Error: GStreamer encountered a general stream error.<br>
<br><br></div><div><br></div><div><br></div>Plz help with the concern <br><br></div>Thanks & Regards<br></div>Jyoti<br><div><div><div><br><div><div><br></div></div></div></div></div></div>