dynamic linking

jyoti kulkarni jyotimk029 at gmail.com
Mon Aug 26 03:29:28 PDT 2013


Hello All,

Following is my pipeline :

gst-launch-1.0 -v filesrc location=/home/jyoti/Videos/conf.mp4 !
qtdemux name=dmux dmux.audio_0 ! queue ! avdec_aac ! alsasink
dmux.video_00 ! queue ! avdec_h264 ! xvimagesink

and it works fine..

But when i try to do this in c code i am facing the issues.

I do this way:

After linking all the elements,

g_signal_connect (data.demuxer, "pad-added", G_CALLBACK
(on_pad_added),data.queue1);
g_signal_connect (data.demuxer, "pad-added", G_CALLBACK (on_pad_added),
data.queue2);

and the function on_pad_added:

static void on_pad_added (GstElement *element,GstPad *pad,CustomData *data)
{

    gchar *name;


    name = gst_pad_get_name (pad);
    if (strcmp (name, "audio_0") == 0 &&
        !gst_element_link_pads(data->demuxer,name,data->queue1,"sink")) {
        printf("link  fail\n");
    }
    if (strcmp (name, "video_0") == 0 &&
        !gst_element_link_pads(data->demuxer,name,data->queue2,"sink")) {
        printf("link fail\n");
    }
    g_free (name);
}

Here CustomData is the structure containing all the elements.
typedef struct _CustomData {
GstElement *pipeline, *source, *demuxer, *video_decoder, *video_sink,
*queue2, *audio_decoder, *audio_sink, *queue1;
}


I get following assertions and then a general stream error.

GStreamer-CRITICAL **: gst_element_link_pads_full: assertion
`GST_IS_ELEMENT (src)' failed
 link  fail
Error: GStreamer encountered a general stream error.




Plz help with the concern

Thanks & Regards
Jyoti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130826/aa6c342b/attachment.html>


More information about the gstreamer-devel mailing list