That did it, thanks very much indeed.  Your response also helped me find the example in the &quot;decodebin&quot; section of the developer documentation that refers to this method of pad connection.<br><br>Connecting the &#39;new-decoded-pad&#39; signal from the decoder to a callback, which then links the decoder to the sink when a pad is ready, does the trick quite nicely (and I presume, now, correctly).<br>
<br>Thanks again, and by the way thanks also to everyone helping out the newbs like me on this list.  Sure, even the newbs around here still seem to generally have some pretty good chops, but it&#39;s always nice to get a nudge when you&#39;re stuck. :)<br>
<br>Thanks again and take care,<br>E. Westbrook<br><br><div class="gmail_quote">On Mon, Jul 20, 2009 at 12:10 AM, sudarshan bisht <span dir="ltr">&lt;<a href="mailto:bisht.sudarshan@gmail.com">bisht.sudarshan@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Hi  </div>
<div> </div>
<div>   You can not link demuxer and decoder using gst_element_link_many(src, dmx, dec, sink, NULL) function . You need to link these two elements in callback function  because demuxer has to create these pads dynamically. <br>

<br></div>
<div class="gmail_quote"><div><div></div><div class="h5">On Mon, Jul 20, 2009 at 10:00 AM, E. Westbrook <span dir="ltr">&lt;<a href="mailto:gstreamer@westbrook.com" target="_blank">gstreamer@westbrook.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Can someone please help me spot how I&#39;m being stupid?<br>
<br>I can play a FLV file using:<br><br>
<div style="margin-left: 40px;"><font size="1"><span style="font-family: courier new,monospace;">$ gst-launch filesrc location=jerrydog.flv ! ffdemux_flv ! ffdec_flv ! xvimagesink</span></font><br></div><br>But when I try to play the same file with the following code, it hangs with no output.<br>

<br>
<div style="margin-left: 40px;"><font size="1"><span style="font-family: courier new,monospace;">#include &lt;unistd.h&gt;</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">#include &lt;stdio.h&gt;</span></font><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">#include &lt;stdlib.h&gt;</span></font><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">#include &lt;gst/gst.h&gt;</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">int main(int argc, char** argv) {</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  gst_init(&amp;argc, &amp;argv);</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  GMainLoop* loop = g_main_loop_new(NULL, FALSE);</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  GstPipeline* p = GST_PIPELINE(gst_pipeline_new(&quot;pipey&quot;));</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  GstElement* src = gst_element_factory_make(&quot;filesrc&quot;, &quot;filey&quot;);</span></font><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  GstElement* dmx = gst_element_factory_make(&quot;ffdemux_flv&quot;, &quot;demuxey&quot;);</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  GstElement* dec = gst_element_factory_make(&quot;ffdec_flv&quot;, &quot;decodey&quot;);</span></font><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  GstElement* sink = gst_element_factory_make(&quot;xvimagesink&quot;, &quot;sinky&quot;);</span></font><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  g_object_set(G_OBJECT(src), &quot;location&quot;, &quot;jerrydog.flv&quot;, NULL);</span></font><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  gst_bin_add_many(GST_BIN(p), src, dmx, dec, sink, NULL);</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  gst_element_link_many(src, dmx, dec, sink, NULL);</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  gst_element_set_state(GST_ELEMENT(p), GST_STATE_PLAYING);</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  g_main_loop_run(loop);</span></font><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  return 0;</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">}</span></font><br style="font-family: courier new,monospace;">

</div><br>The thing is, I&#39;ve separately encoded the file to mpeg2, and I can also play it using:<br><br>
<div style="margin-left: 40px;"><font size="1"><span style="font-family: courier new,monospace;">$ gst-launch filesrc location=jerrydog.mp2 ! mpeg2dec ! xvimagesink</span></font><br></div><br>and then, puzzlingly, unlike the FLV version, my C code plays the mpeg2 flavor just great:<br>

<br>
<div style="margin-left: 40px;"><font size="1"><span style="font-family: courier new,monospace;">#include &lt;unistd.h&gt;</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">#include &lt;stdio.h&gt;</span></font><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">#include &lt;stdlib.h&gt;</span></font><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">#include &lt;gst/gst.h&gt;</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">int main(int argc, char** argv) {</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  gst_init(&amp;argc, &amp;argv);</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  GMainLoop* loop = g_main_loop_new(NULL, FALSE);</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  GstPipeline* p = GST_PIPELINE(gst_pipeline_new(&quot;pipey&quot;));</span></font><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  GstElement* src = gst_element_factory_make(&quot;filesrc&quot;, &quot;filey&quot;);</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  GstElement* dec = gst_element_factory_make(&quot;mpeg2dec&quot;, &quot;decodey&quot;);</span></font><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  GstElement* sink = gst_element_factory_make(&quot;xvimagesink&quot;, &quot;sinky&quot;);</span></font><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  g_object_set(G_OBJECT(src), &quot;location&quot;, &quot;jerrydog.mp2&quot;, NULL);</span></font><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  gst_bin_add_many(GST_BIN(p), src, dec, sink, NULL);</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  gst_element_link_many(src, dec, sink, NULL);</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  gst_element_set_state(GST_ELEMENT(p), GST_STATE_PLAYING);</span></font><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">  g_main_loop_run(loop);</span></font><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">

<font size="1"><span style="font-family: courier new,monospace;">  return 0;</span></font><br style="font-family: courier new,monospace;"><font size="1"><span style="font-family: courier new,monospace;">}</span></font><br>
</div>
<br>So what&#39;s confusing me is, in the FLV case, how am I constructing the pipeline wrongly in C, in the FLV case anyway, that differs from gst-launch?  Or am I?  Is this as dumb a question as it seems to me it must be?<br>

<br>Thanks,<br>E. Westbrook<br><br>PS - All test case source is here exactly as I&#39;m compiling it.  My input video files are available at:<br><br><a href="http://media.westbrook.com/media/jerrydog.flv" target="_blank">http://media.westbrook.com/media/jerrydog.flv</a><br>

<a href="http://media.westbrook.com/media/jerrydog.mp2" target="_blank">http://media.westbrook.com/media/jerrydog.mp2</a><br><br><br></div></div>------------------------------------------------------------------------------<br>
Enter the BlackBerry Developer Challenge<br>
This is your chance to win up to $100,000 in prizes! For a limited time,<br>vendors submitting new applications to BlackBerry App World(TM) will have<br>the opportunity to enter the BlackBerry Developer Challenge. See full prize<br>

details at: <a href="http://p.sf.net/sfu/Challenge" target="_blank">http://p.sf.net/sfu/Challenge</a><br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>

<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br><br></blockquote></div><br><br clear="all">
<div></div><br>-- <br>Regards,<br><font color="#888888"><br>Sudarshan Bisht<br>
</font><br>------------------------------------------------------------------------------<br>
Enter the BlackBerry Developer Challenge<br>
This is your chance to win up to $100,000 in prizes! For a limited time,<br>
vendors submitting new applications to BlackBerry App World(TM) will have<br>
the opportunity to enter the BlackBerry Developer Challenge. See full prize<br>
details at: <a href="http://p.sf.net/sfu/Challenge" target="_blank">http://p.sf.net/sfu/Challenge</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>