[gst-devel] messaging

Tristan Matthews tristan at sat.qc.ca
Wed Mar 24 14:50:37 CET 2010


2010/3/24 Edward Hervey <bilboed at gmail.com>

> Hi,
>
> On Wed, 2010-03-24 at 11:05 +0100, Mattias Barthiel wrote:
> > Hi,
> >
> > I have just made use of the nice feature of the gst-bus to pass messages
> > from an element to the application.
> >
> > How do you message in the other direction? application->element?
>
>   The bus is only designed for message passing from element to upstream
> elements (and eventually application).
>
>
You can post your own application-specific messages on the bus:

http://www.gstreamer.net/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#gst-message-new-application

but unless you've written elements specifically for your application that
are expecting such messages, this is only really useful for passing messages
between different components in your app in a thread-safe way (assuming they
are in different threads).

 If you want to pass instructions to an element... Just use the
> property system by adding properties to your element and setting them
> (ex: g_object_set (myelement, "thisvariable", thisvalue, NULL)).
>

Adding properties is definitely more straightforward/cleaner than handling
application-specific messages.

Best,
Tristan


>

   Edward
>
> >
> >
> > Best regards,
> >
> > Mattias
> >
>
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



-- 
Tristan Matthews
email: tristan at sat.qc.ca
web: http://tristanswork.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100324/21ee4294/attachment.htm>


More information about the gstreamer-devel mailing list