get GstElement from param

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

get GstElement from param

Wes Miller
Administrator
Slightly out of context here, but...

I know it's out there somewhere, but, among other problems, most of the examples on the web are "temporarly unavailable", and there doesn't seem to be a g_param_spec_get_object() function out there.

After enumerating the properties of a gst element, I get down to the point where testing the params with G_IS_PARAM_SPEC_OBJECT( param ) is true.  I'd like to know more about the object that is alluded to here.  How do I get back a GstElement* for the element that is the "object of type GstElement"?

Also, what is the correct forum for g_whatever() discussions?

Thanks and Happy Holidays,

Wes

Reply | Threaded
Open this post in threaded view
|

Re: get GstElement from param

Tim-Philipp Müller-2
On Mon, 2010-12-20 at 13:57 -0800, Wes Miller wrote:

> I know it's out there somewhere, but, among other problems, most of the
> examples on the web are "temporarly unavailable", and there doesn't seem to
> be a g_param_spec_get_object() function out there.
>
> After enumerating the properties of a gst element, I get down to the point
> where testing the params with G_IS_PARAM_SPEC_OBJECT( param ) is true.  I'd
> like to know more about the object that is alluded to here.  How do I get
> back a GstElement* for the element that is the "object of type GstElement"?

Use the source?

http://cgit.freedesktop.org/gstreamer/gstreamer/tree/tools/gst-inspect.c#n574


> Also, what is the correct forum for g_whatever() discussions?

http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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

Re: get GstElement from param

Wes Miller
Administrator
Tim,

Thanks for the quick reply.

That is the code I was looking at.  Rather than knowing the type_name, I want the GstElement* so I can run it back through this same function to get information about THAT element.

Goal is to enumerate the properties of, say, playbin, and to find that property 'audio-sink" is a "reference" to an object of type GstElement then to get the audio-sink's GstElement pointer  and explore it's properties to find out that the, say, pulsesink has it's sync property set to false.

Alice is in wonderland, walking backwards speaking APL.

Wes
Reply | Threaded
Open this post in threaded view
|

Re: get GstElement from param

Tim-Philipp Müller-2
On Mon, 2010-12-20 at 14:48 -0800, Wes Miller wrote:

> That is the code I was looking at.  Rather than knowing the type_name, I
> want the GstElement* so I can run it back through this same function to get
> information about THAT element.
>
> Goal is to enumerate the properties of, say, playbin, and to find that
> property 'audio-sink" is a "reference" to an object of type GstElement then
> to get the audio-sink's GstElement pointer  and explore it's properties to
> find out that the, say, pulsesink has it's sync property set to false.
>
> Alice is in wonderland, walking backwards speaking APL.

GstElement *element = NULL;

g_object_get (playbin, param->name, &element, NULL);
...
gst_object_unref (element);

(or go via the GValue using g_object_get_property() and then
g_value_get_object() as the gst-inspect code does)

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

Re: get GstElement from param

Wes Miller
Administrator
Thanks, Tim.  that did the trick.  That and a bunch of relearning to use STL lists.

Wes