messaging

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

messaging

mattias-12
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?


Best regards,

Mattias

--
 Mattias Frank Barthel      
 Vía Augusta 177 08021 Barcelona (Spain)  T. 0034-93-365-3309
 TELEFÓNICA R&D



------------------------------------------------------------------------------
Download Intel® 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: messaging

Edward Hervey
Administrator
Hi,

On Wed, 2010-03-24 at 11:05 +0100, Mattias Barthel 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).

  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)).

    Edward

>
>
> Best regards,
>
> Mattias
>



------------------------------------------------------------------------------
Download Intel® 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: messaging

Tristan Matthews-2


2010/3/24 Edward Hervey <[hidden email]>
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Tristan Matthews
email: [hidden email]
web: http://tristanswork.blogspot.com

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: messaging

Stefan Sauer
In reply to this post by mattias-12
Mattias Barthel 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?
>
>
> Best regards,
>
> Mattias
>
>  

for the other way around, you set properties or send events.

Stefan

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel