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"><<a href="mailto:bilboed@gmail.com">bilboed@gmail.com</a>></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>
> Thank you Edward. That makes sense.<br>
><br>
> I have a custom bin with ghosted pads in a gnlsource. I'm currently<br>
> ghosting the pad upon creation and then adding the final internal link<br>
> once decodebin2 tells me it's ready.<br>
<br>
</div> If you do that... gnloperation will think there's a static number of<br>
sink pads.<br>
gnloperation will dynamically request/release pads only if the element<br>
it's controlling has a request sink pad template... meaning it'll work<br>
with videomixer, but you'll have to do your own subclass of GstBin with<br>
the proper pad templates to make it work (I'm assuming you want to put<br>
some extra elements before videomixer).<br>
<div class="im"><br>
> On occasion, I run into a data flow error, but not consistently.<br>
> I'm thinking it may be related to the order in which I'm adding pads.<br>
> Is it better to ghost the bins pad after decodebin is connected? or<br>
> does this order not matter?<br>
<br>
</div> For sources it doesn't matter.<br>
<div class="im"><br>
><br>
> Also, if I'm ghosting the pad, do I have to manually remove it once<br>
> streaming of that source is complete? If so, what signal should I be<br>
> listening for from gnlsource/gnlcomposition to know that its completed<br>
> it's duties?<br>
<br>
</div> I'm assuming you mean for operations (doesn'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'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 'input-priority-changed' 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 'associated' videomixer sinkpad<br>
for that ghostpad of yours by setting the 'zorder' property of that<br>
videomixer sinkpad to the priority you receive<br>
<br>
g_object_set(thatstream->videomixersinkpad, "zorder", 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>
><br>
> Thanks again.<br>
><br>
> Best,<br>
> Tim<br>
><br>
> On Tue, Dec 14, 2010 at 5:42 AM, Edward Hervey <<a href="mailto:bilboed@gmail.com">bilboed@gmail.com</a>><br>
> wrote:<br>
><br>
> On Mon, 2010-12-13 at 17:33 -0500, Timothy Braun wrote:<br>
> > Hey Everyone,<br>
> > So I have a gnlcomposition which, for the matter of<br>
> depicting the<br>
> > situation, has 5 sources. 3 sources play for 30 seconds<br>
> followed by<br>
> > the remaining 2 sources for another 30 seconds. This should<br>
> produce a<br>
> > 1 minute video. The composition has a videomixer in a<br>
> gnloperation to<br>
> > mix the sources for final output.<br>
> ><br>
> > I'm running into a situation where the pipeline gets stuck<br>
> during<br>
> > the transition from 3 sources to 2 sources. It seems the<br>
> video mixer<br>
> > is trying to send a seek event to all it's sink pads, which<br>
> fails on<br>
> > the pad which no-longer has a source. During my tests, the<br>
> > gnlcomposition will happily create new pads, ie. changing<br>
> the order so<br>
> > it's 2 sources followed by 3 sources works fine. But the<br>
> opposite<br>
> > doesn't seem to be true, the gnlcomposition doesn't remove<br>
> unused pads<br>
> > to it's operations.<br>
> ><br>
> > This brings me to the question of, is there a signal I'm<br>
> not<br>
> > handling appropriately? If so, any pointers on which one I<br>
> should be<br>
> > listening for?<br>
><br>
><br>
> If the element you put in a gnloperation has dynamic sink<br>
> pads, the<br>
> gnloperation will call gst_element_request_pad() and<br>
> gst_element_release_request_pad() when needed.<br>
> videomixer alone should work fine in those cases. If you have<br>
> put a<br>
> custom element with ghostpads, make sure you check when they<br>
> are<br>
> added/removed and properly request/release the targets of<br>
> those<br>
> ghostpads.<br>
><br>
> Edward<br>
><br>
> ><br>
> > Thanks,<br>
> > Tim<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>
><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>
><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>
> _______________________________________________ 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>