Plugin to listen to GstBus

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Plugin to listen to GstBus

Greg Wunder
Plugin to listen to GstBus

Is there an example of a plug-in to listen to messages on the GstBus?
I'm having trouble finding an example & would like to receive messages from other plugins in a given pipeline.

Greg


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to listen to GstBus

michael smith-6-3
On Thu, Jun 17, 2010 at 10:26 AM, Greg Wunder <[hidden email]> wrote:
> Is there an example of a plug-in to listen to messages on the GstBus?
> I'm having trouble finding an example & would like to receive messages from
> other plugins in a given pipeline.

There aren't any examples of that, since an element should not listen
to bus messages from other elements.

Generally events (including custom events) are the appropriate way for
elements to communicate specific additional information amongst
themselves.

Mike

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to listen to GstBus

Greg Wunder
RE: [gst-devel] Plugin to listen to GstBus

Thanks for the insight.
Does "should not" mean this is not possible with the current version of gstreamer?
For video data fusion, I need to communicate forensic data acquired from one plug-in and pass it on to another.
I was hoping to accomplish this through the GstBus.
If this is not possible & I need to use a GstEvent, is there any functionality lost in using an event handler for this purpose?

Greg

-----Original Message-----
From: Michael Smith [[hidden email]]
Sent: Thu 6/17/2010 1:44 PM
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Plugin to listen to GstBus

On Thu, Jun 17, 2010 at 10:26 AM, Greg Wunder <[hidden email]> wrote:
> Is there an example of a plug-in to listen to messages on the GstBus?
> I'm having trouble finding an example & would like to receive messages from
> other plugins in a given pipeline.

There aren't any examples of that, since an element should not listen
to bus messages from other elements.

Generally events (including custom events) are the appropriate way for
elements to communicate specific additional information amongst
themselves.

Mike

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to listen to GstBus

michael smith-6-3
On Thu, Jun 17, 2010 at 11:04 AM, Greg Wunder <[hidden email]> wrote:
> Thanks for the insight.
> Does "should not" mean this is not possible with the current version of
> gstreamer?

It's not entirely clear what you want to do. Bus messages are
inappropriate for communication between elements. It might be possible
to force them into doing that, but it wouldn't be a good idea.

> For video data fusion, I need to communicate forensic data acquired from one
> plug-in and pass it on to another.
> I was hoping to accomplish this through the GstBus.
> If this is not possible & I need to use a GstEvent, is there any
> functionality lost in using an event handler for this purpose?
>

If you want to communicate data between elements, then that's what
gstreamer's core dataflow is all about - why not just send GstBuffers
containing the data?

Events and messages are different, but without any details at all
about what sort of data you're sending, and what exactly you're
sending them between, I couldn't say whether the differences matter
for your purposes.

It does sound like you need a better understanding of the core
gstreamer concepts though - once you understand how gstreamer is
intended to work, it's likely that the right solution to your problem
will be pretty obvious.

Mike

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to listen to GstBus

Greg Wunder
RE: [gst-devel] Plugin to listen to GstBus

This is a new issue I haven't had to deal with yet, but you've put me on the right track.
Thanks for your help!

-----Original Message-----
From: Michael Smith [[hidden email]]
Sent: Thu 6/17/2010 2:09 PM
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Plugin to listen to GstBus

On Thu, Jun 17, 2010 at 11:04 AM, Greg Wunder <[hidden email]> wrote:
> Thanks for the insight.
> Does "should not" mean this is not possible with the current version of
> gstreamer?

It's not entirely clear what you want to do. Bus messages are
inappropriate for communication between elements. It might be possible
to force them into doing that, but it wouldn't be a good idea.

> For video data fusion, I need to communicate forensic data acquired from one
> plug-in and pass it on to another.
> I was hoping to accomplish this through the GstBus.
> If this is not possible & I need to use a GstEvent, is there any
> functionality lost in using an event handler for this purpose?
>

If you want to communicate data between elements, then that's what
gstreamer's core dataflow is all about - why not just send GstBuffers
containing the data?

Events and messages are different, but without any details at all
about what sort of data you're sending, and what exactly you're
sending them between, I couldn't say whether the differences matter
for your purposes.

It does sound like you need a better understanding of the core
gstreamer concepts though - once you understand how gstreamer is
intended to work, it's likely that the right solution to your problem
will be pretty obvious.

Mike

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to listen to GstBus

Stefan Sauer
In reply to this post by Greg Wunder
Am 17.06.2010 21:04, schrieb Greg Wunder:
> Thanks for the insight.
> Does "should not" mean this is not possible with the current version of
> gstreamer?
> For video data fusion, I need to communicate forensic data acquired from
> one plug-in and pass it on to another.
> I was hoping to accomplish this through the GstBus.
> If this is not possible & I need to use a GstEvent, is there any
> functionality lost in using an event handler for this purpose?

If one element does feature extraction and the next element acts on it, you can
use a synchronized downstream event to pass the feature data as a GstStructure
to the next element (before pushing the buffer).
If you want to sent lots of data, as GstBuffer might be more appropriate as Mike
suggested.

Stefan

>
> Greg
>
> -----Original Message-----
> From: Michael Smith [mailto:[hidden email]]
> Sent: Thu 6/17/2010 1:44 PM
> To: Discussion of the development of GStreamer
> Subject: Re: [gst-devel] Plugin to listen to GstBus
>
> On Thu, Jun 17, 2010 at 10:26 AM, Greg Wunder <[hidden email]> wrote:
>> Is there an example of a plug-in to listen to messages on the GstBus?
>> I'm having trouble finding an example & would like to receive messages
> from
>> other plugins in a given pipeline.
>
> There aren't any examples of that, since an element should not listen
> to bus messages from other elements.
>
> Generally events (including custom events) are the appropriate way for
> elements to communicate specific additional information amongst
> themselves.
>
> Mike
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to listen to GstBus

Florent THIERY-2
If one element does feature extraction and the next element acts on it, you can
use a synchronized downstream event to pass the feature data as a GstStructure
to the next element (before pushing the buffer).
If you want to sent lots of data, as GstBuffer might be more appropriate as Mike
suggested.

Out of curiosity, what if you needed to communicate with another plugin than the next one ?

FLo

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to listen to GstBus

Greg Wunder
RE: [gst-devel] Plugin to listen to GstBus

We ended up using a GstEvent to handle this & it worked great.
I believe you can set it to send upstream, downstream (or possibly both ways).
Thanks for the advice & help!


-----Original Message-----
From: Florent [[hidden email]]
Sent: Wed 6/23/2010 7:11 PM
To: Discussion of the development of GStreamer
Cc: Greg Wunder
Subject: Re: [gst-devel] Plugin to listen to GstBus

>
> If one element does feature extraction and the next element acts on it, you
> can
> use a synchronized downstream event to pass the feature data as a
> GstStructure
> to the next element (before pushing the buffer).
> If you want to sent lots of data, as GstBuffer might be more appropriate as
> Mike
> suggested.
>

Out of curiosity, what if you needed to communicate with another plugin than
the next one ?

FLo


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Plugin to listen to GstBus

Stefan Sauer
In reply to this post by Florent THIERY-2
Am 24.06.2010 02:11, schrieb Florent:

>     If one element does feature extraction and the next element acts on
>     it, you can
>     use a synchronized downstream event to pass the feature data as a
>     GstStructure
>     to the next element (before pushing the buffer).
>     If you want to sent lots of data, as GstBuffer might be more
>     appropriate as Mike
>     suggested.
>
>
> Out of curiosity, what if you needed to communicate with another plugin
> than the next one ?

Still an event. Elements should pass it through. This would become difficult if
the receiving element is on a different branch. Maybe
gst_element_send_event(parent, event);

Stefan

>
> FLo
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel