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