<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Maxime,<br>
<br>
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 (<a
href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html</a>)
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.<br>
<br>
HTH,<br>
<br>
Emile<br>
<pre class="moz-signature" cols="72">--
Emile Semmes
Software Consultant
e6 Group, LLC
Office: (630) 376-0626
<a class="moz-txt-link-abbreviated" href="http://www.e6group.com">www.e6group.com</a></pre>
<br>
<br>
On 5/22/2012 8:56 AM, Maxime Louvel wrote:
<blockquote
cite="mid:CANBLM2ahtpvX=Yw=QCURpkAc7y78psq4Zd7Gy-5ZWBsFgTr7TA@mail.gmail.com"
type="cite">
<div>HI,<br clear="all">
</div>
<div><br>
</div>
<div>I'm trying to build the following pipeline with a C
application :</div>
<div>gst-launch -e udpsrc port=5000 caps="application/x-rtp,
media=video, encoding-name=MP2T-ES" ! rtpmp2tdepay ! mpegtsdemux
! filesink location=videodstRDO.mpeg</div>
<div><br>
</div>
<div>when using gst-launch it works fine, but when I use a C
application here is the error I get (with GST_DEBUG=3) :</div>
<div>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)<br>
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"<br>
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<br>
</div>
<div><br>
</div>
<div>here is the code I wrote :</div>
<div><br>
</div>
<div>...</div>
<div>source = gst_element_factory_make ("udpsrc", "rtpsrc");<br>
rtpdepay = gst_element_factory_make ("rtpmp2tdepay",
"rtpdepay");<br>
tsdemux = gst_element_factory_make ("mpegtsdemux", "tsdemux");<br>
sink = gst_element_factory_make ("filesink", "filesink");</div>
<div><br>
</div>
<div>g_object_set (source, "port", 5000, NULL);<br>
/* we need to set caps on the udpsrc for the RTP data */<br>
caps = gst_caps_from_string ("application/x-rtp, media=video,
encoding-name=MP2T-ES");<br>
g_object_set (source, "caps", caps, NULL);<br>
gst_caps_unref (caps);</div>
<div><br>
</div>
g_object_set (sink, "location", "/tmp/video.mpeg", NULL);<br>
<br>
/* build pipeline */<br>
gst_bin_add_many (GST_BIN (pipeline), source, rtpdepay, tsdemux,
sink, NULL);<br>
if(!gst_element_link_many (source, rtpdepay, tsdemux, sink, NULL))<br>
{<br>
g_printerr ("Could not link pipeline. \n");<br>
return -1;<br>
<div> }<br>
</div>
<div><br>
</div>
<div>when I execute the application, the call to
gst_element_link_many fails and the program exit with my error
msg.</div>
<div><br>
</div>
<div>Do you know what might be wrong ?</div>
<div><br>
</div>
<div>thanks,</div>
<div>Max</div>
<div><br>
</div>
<div><br>
</div>
-- <br>
Maxime Louvel<br>
web page : <a moz-do-not-send="true"
href="https://sites.google.com/site/mlouvel/" target="_blank">https://sites.google.com/site/mlouvel/</a><br>
linkedin : <a moz-do-not-send="true"
href="http://fr.linkedin.com/in/mlouvel" target="_blank">http://fr.linkedin.com/in/mlouvel</a><br>
<div>address : 5400-B ridge oak drive</div>
<div> Austin, Texas, 78731</div>
<div> USA</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
--
Emile Semmes
Owner / Software Consultant
e6 Group, LLC
Office: (630) 376-0626
<a class="moz-txt-link-abbreviated" href="http://www.e6group.com">www.e6group.com</a></pre>
</body>
</html>