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

Emile Semmes emile.semmes at e6group.com
Wed May 23 10:39:28 PDT 2012


Hi Maxime,

For mpegtsdemux, you can't link the src pads until they are added. This 
happens during runtime so you'll need to add a signal handler on the 
pad-added signal from the mpegtsdemux element. Take a look at section 
8.1 of the documentation 
(http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html) 
for an example on how this is done. Section 8.1.1 uses oggdemux but the 
method is the same. In your callback, you can link your pad there. Pay 
attention to the caps since you don't until later if it's an audio or 
video track.

HTH,

Emile

--
Emile Semmes
Software Consultant
e6 Group, LLC
Office: (630) 376-0626
www.e6group.com



On 5/22/2012 8:56 AM, Maxime Louvel wrote:
> 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
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-- 
--
Emile Semmes
Owner / Software Consultant
e6 Group, LLC
Office: (630) 376-0626
www.e6group.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120523/0a5b28d3/attachment.htm>


More information about the gstreamer-devel mailing list