Thank You Edward.  It was a great help.  I will make an attempt at it in the coming days.<br><br>Much appreciated.<br><br>Tim<br><br><div class="gmail_quote">On Tue, Dec 14, 2010 at 4:04 PM, Edward Hervey <span dir="ltr">&lt;<a href="mailto:bilboed@gmail.com">bilboed@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Tue, 2010-12-14 at 13:34 -0500, Timothy Braun wrote:<br>
&gt; Thank you Edward.  That makes sense.<br>
&gt;<br>
&gt; I have a custom bin with ghosted pads in a gnlsource.  I&#39;m currently<br>
&gt; ghosting the pad upon creation and then adding the final internal link<br>
&gt; once decodebin2 tells me it&#39;s ready.<br>
<br>
</div>  If you do that... gnloperation will think there&#39;s a static number of<br>
sink pads.<br>
  gnloperation will dynamically request/release pads only if the element<br>
it&#39;s controlling has a request sink pad template... meaning it&#39;ll work<br>
with videomixer, but you&#39;ll have to do your own subclass of GstBin with<br>
the proper pad templates to make it work (I&#39;m assuming you want to put<br>
some extra elements before videomixer).<br>
<div class="im"><br>
&gt;   On occasion, I run into a data flow error, but not consistently.<br>
&gt; I&#39;m thinking it may be related to the order in which I&#39;m adding pads.<br>
&gt; Is it better to ghost the bins pad after decodebin is connected? or<br>
&gt; does this order not matter?<br>
<br>
</div>  For sources it doesn&#39;t matter.<br>
<div class="im"><br>
&gt;<br>
&gt; Also, if I&#39;m ghosting the pad, do I have to manually remove it once<br>
&gt; streaming of that source is complete?  If so, what signal should I be<br>
&gt; listening for from gnlsource/gnlcomposition to know that its completed<br>
&gt; it&#39;s duties?<br>
<br>
</div>  I&#39;m assuming you mean for operations (doesn&#39;t matter for sources).<br>
<br>
  For operations with dynamic pads you want to make sure that:<br>
<br>
* Your element (the one you put in gnloperation)<br>
<br>
  * Has a sink pad template of type GST_PAD_REQUEST<br>
  * you have overriden the GstElementClass::request_new_pad vmethod<br>
      In there you request a pad from videomixer, add your extra<br>
elements, ghost the first element&#39;s sink pad, add that pad to yourself,<br>
and return that pad<br>
  * you have overriden the GstElementClass::release_request_pad vmethod<br>
      In there you remove that pad from yourself, release the sink pad<br>
you requested from videomixer, and remove all elements for that path<br>
<br>
* You listen to the &#39;input-priority-changed&#39; signal from gnloperation<br>
<br>
  This will notify you of changes in priority of incoming stream for<br>
each of your ghost sink pad.<br>
  When you receive that, you change the &#39;associated&#39; videomixer sinkpad<br>
for that ghostpad of yours by setting the &#39;zorder&#39; property of that<br>
videomixer sinkpad to the priority you receive<br>
<br>
  g_object_set(thatstream-&gt;videomixersinkpad, &quot;zorder&quot;, thenewpriority,<br>
NULL);<br>
<br>
<br>
  This assumes you need to insert extra elements before/after your<br>
videomixer in that operation (else you can just stick videomixer in a<br>
gnloperation and all of that will be taken care of).<br>
<br>
  Hope this helps,<br>
<font color="#888888"><br>
    Edward<br>
</font><div><div></div><div class="h5"><br>
&gt;<br>
&gt; Thanks again.<br>
&gt;<br>
&gt; Best,<br>
&gt; Tim<br>
&gt;<br>
&gt; On Tue, Dec 14, 2010 at 5:42 AM, Edward Hervey &lt;<a href="mailto:bilboed@gmail.com">bilboed@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt;         On Mon, 2010-12-13 at 17:33 -0500, Timothy Braun wrote:<br>
&gt;         &gt; Hey Everyone,<br>
&gt;         &gt;   So I have a gnlcomposition which, for the matter of<br>
&gt;         depicting the<br>
&gt;         &gt; situation, has 5 sources.  3 sources play for 30 seconds<br>
&gt;         followed by<br>
&gt;         &gt; the remaining 2 sources for another 30 seconds.  This should<br>
&gt;         produce a<br>
&gt;         &gt; 1 minute video.  The composition has a videomixer in a<br>
&gt;         gnloperation to<br>
&gt;         &gt; mix the sources for final output.<br>
&gt;         &gt;<br>
&gt;         &gt;   I&#39;m running into a situation where the pipeline gets stuck<br>
&gt;         during<br>
&gt;         &gt; the transition from 3 sources to 2 sources.  It seems the<br>
&gt;         video mixer<br>
&gt;         &gt; is trying to send a seek event to all it&#39;s sink pads, which<br>
&gt;         fails on<br>
&gt;         &gt; the pad which no-longer has a source.  During my tests, the<br>
&gt;         &gt; gnlcomposition will happily create new pads, ie. changing<br>
&gt;         the order so<br>
&gt;         &gt; it&#39;s 2 sources followed by 3 sources works fine.  But the<br>
&gt;         opposite<br>
&gt;         &gt; doesn&#39;t seem to be true, the gnlcomposition doesn&#39;t remove<br>
&gt;         unused pads<br>
&gt;         &gt; to it&#39;s operations.<br>
&gt;         &gt;<br>
&gt;         &gt;   This brings me to the question of, is there a signal I&#39;m<br>
&gt;         not<br>
&gt;         &gt; handling appropriately?  If so, any pointers on which one I<br>
&gt;         should be<br>
&gt;         &gt; listening for?<br>
&gt;<br>
&gt;<br>
&gt;          If the element you put in a gnloperation has dynamic sink<br>
&gt;         pads, the<br>
&gt;         gnloperation will call gst_element_request_pad() and<br>
&gt;         gst_element_release_request_pad() when needed.<br>
&gt;          videomixer alone should work fine in those cases. If you have<br>
&gt;         put a<br>
&gt;         custom element with ghostpads, make sure you check when they<br>
&gt;         are<br>
&gt;         added/removed and properly request/release the targets of<br>
&gt;         those<br>
&gt;         ghostpads.<br>
&gt;<br>
&gt;           Edward<br>
&gt;<br>
&gt;         &gt;<br>
&gt;         &gt;   Thanks,<br>
&gt;         &gt;   Tim<br>
&gt;         &gt;<br>
&gt;         ------------------------------------------------------------------------------<br>
&gt;         &gt; Lotusphere 2011<br>
&gt;         &gt; Register now for Lotusphere 2011 and learn how<br>
&gt;         &gt; to connect the dots, take your collaborative environment<br>
&gt;         &gt; to the next level, and enter the era of Social Business.<br>
&gt;         &gt; <a href="http://p.sf.net/sfu/lotusphere-d2d" target="_blank">http://p.sf.net/sfu/lotusphere-d2d</a><br>
&gt;         &gt; _______________________________________________<br>
&gt;         gstreamer-devel mailing list<br>
&gt;         <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
&gt;         <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;         ------------------------------------------------------------------------------<br>
&gt;         Lotusphere 2011<br>
&gt;         Register now for Lotusphere 2011 and learn how<br>
&gt;         to connect the dots, take your collaborative environment<br>
&gt;         to the next level, and enter the era of Social Business.<br>
&gt;         <a href="http://p.sf.net/sfu/lotusphere-d2d" target="_blank">http://p.sf.net/sfu/lotusphere-d2d</a><br>
&gt;         _______________________________________________<br>
&gt;         gstreamer-devel mailing list<br>
&gt;         <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
&gt;         <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
&gt;<br>
&gt; ------------------------------------------------------------------------------<br>
&gt; Lotusphere 2011<br>
&gt; Register now for Lotusphere 2011 and learn how<br>
&gt; to connect the dots, take your collaborative environment<br>
&gt; to the next level, and enter the era of Social Business.<br>
&gt; <a href="http://p.sf.net/sfu/lotusphere-d2d" target="_blank">http://p.sf.net/sfu/lotusphere-d2d</a><br>
&gt; _______________________________________________ gstreamer-devel mailing list <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>

<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Lotusphere 2011<br>
Register now for Lotusphere 2011 and learn how<br>
to connect the dots, take your collaborative environment<br>
to the next level, and enter the era of Social Business.<br>
<a href="http://p.sf.net/sfu/lotusphere-d2d" target="_blank">http://p.sf.net/sfu/lotusphere-d2d</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>
</div></div></blockquote></div><br>