no such pad 'video_%04x' in element "tsdemux"

Maxime Louvel m.louvel at gmail.com
Tue May 22 08:56:10 PDT 2012


HI,

I'm trying to build the following pipeline with a C application :
gst-launch -e udpsrc port=5000 caps="application/x-rtp, media=video,
encoding-name=MP2T-ES" ! rtpmp2tdepay ! mpegtsdemux ! filesink
location=videodstRDO.mpeg

when using gst-launch it works fine, but when I use a C application here is
the error I get (with GST_DEBUG=3) :
0:00:00.032693078 12164 0x1912010 INFO GST_ELEMENT_PADS
gstutils.c:1698:gst_element_link_pads_full: trying to link element
tsdemux:(any) to element mpeg2dec:(any)
0:00:00.032735773 12164 0x1912010 INFO GST_ELEMENT_PADS
gstelement.c:972:gst_element_get_static_pad: no such pad 'video_%04x' in
element "tsdemux"
0:00:00.032759563 12164 0x1912010 INFO GST_ELEMENT_PADS
gstutils.c:1216:gst_element_get_compatible_pad:<tsdemux> Could not find a
compatible pad to link to mpeg2dec:sink

here is the code I wrote :

...
source = gst_element_factory_make ("udpsrc", "rtpsrc");
rtpdepay = gst_element_factory_make ("rtpmp2tdepay", "rtpdepay");
tsdemux = gst_element_factory_make ("mpegtsdemux", "tsdemux");
sink = gst_element_factory_make ("filesink", "filesink");

g_object_set (source, "port", 5000, NULL);
/* we need to set caps on the udpsrc for the RTP data */
caps = gst_caps_from_string ("application/x-rtp, media=video,
encoding-name=MP2T-ES");
g_object_set (source, "caps", caps, NULL);
gst_caps_unref (caps);

g_object_set (sink, "location", "/tmp/video.mpeg", NULL);

/* build pipeline */
gst_bin_add_many (GST_BIN (pipeline), source, rtpdepay, tsdemux, sink,
NULL);
if(!gst_element_link_many (source, rtpdepay, tsdemux, sink, NULL))
{
    g_printerr ("Could not link pipeline. \n");
    return -1;
}

when I execute the application, the call to gst_element_link_many fails and
the program exit with my error msg.

Do you know what might be wrong ?

thanks,
Max


-- 
Maxime Louvel
web page : https://sites.google.com/site/mlouvel/
linkedin : http://fr.linkedin.com/in/mlouvel
address : 5400-B ridge oak drive
               Austin, Texas, 78731
               USA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120522/a13c48f5/attachment.htm>


More information about the gstreamer-devel mailing list