getting element by name without knowing it's parent

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

getting element by name without knowing it's parent

Thành Trung Nguyễn
Hi all,

Is there any way to get a GstElement or any GObject without knowing it's parent ?

--
Cheers !

trungnt

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: getting element by name without knowing it's parent

Stefan Sauer
Thành Trung Nguyễn schrieb:
> Hi all,
>
> Is there any way to get a GstElement or any GObject without knowing it's
> parent ?

you can lookup elements by name from a bin. There are more ways, but that
depends on waht you are doing.

Stefan

>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: getting element by name without knowing it's parent

Thành Trung Nguyễn
I think the bin is the element parents. But I wonder if I can get an element by name before put it into a bin. Can I do it ?

On Sat, Oct 3, 2009 at 5:15 PM, Stefan Kost <[hidden email]> wrote:
Thành Trung Nguyễn schrieb:
> Hi all,
>
> Is there any way to get a GstElement or any GObject without knowing it's
> parent ?

you can lookup elements by name from a bin. There are more ways, but that
depends on waht you are doing.

Stefan

>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Cheers !

trungnt

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: getting element by name without knowing it's parent

michael smith-6-3
2009/10/4 Thành Trung Nguyễn <[hidden email]>:
> I think the bin is the element parents. But I wonder if I can get an element
> by name before put it into a bin. Can I do it ?

If it's not inside anything (bin, pipeline, etc.), then you can't do
that - either you have a direct reference to the object (in which case
you could just use it), or you don't - in which case the object should
have been freed, because its refcount will be zero.

There's no global registry of
currently-instantiated-gstreamer-elements in which to look something
up by name.

Mike

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: getting element by name without knowing it's parent

Thành Trung Nguyễn
Ok, thanks for your answer !

On Tue, Oct 6, 2009 at 12:17 AM, Michael Smith <[hidden email]> wrote:
2009/10/4 Thành Trung Nguyễn <[hidden email]>:
> I think the bin is the element parents. But I wonder if I can get an element
> by name before put it into a bin. Can I do it ?

If it's not inside anything (bin, pipeline, etc.), then you can't do
that - either you have a direct reference to the object (in which case
you could just use it), or you don't - in which case the object should
have been freed, because its refcount will be zero.

There's no global registry of
currently-instantiated-gstreamer-elements in which to look something
up by name.

Mike

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Cheers !

trungnt

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel