gst_child_proxy interface

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

gst_child_proxy interface

jmz
Hi,

I want to get and set properties of elements within decodebin. For example,
get the name of h264parse (the decodebin does contain h264parse):

  gst_child_proxy_get ((GstChildProxy *) decoder, "h264parse::name", &name,
NULL);

But it shows warning message.

  GStreamer-WARNING **: no property h264parse::name in object decodebin0

However, I can get the name of typefind by replacing "h264parse::name" with
"typefind::name"
How to use the gst_child_proxy interface?
 
Is there any difference when using the gst_child_proxy interface in PAUSED
or PLAYING state? I use it when pipeline changes to PLAYING state.

Thanks




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
jmz
Reply | Threaded
Open this post in threaded view
|

Re: gst_child_proxy interface

jmz
Hi

I found why the gst_child_proxy_get() does not work with "h264parse::name."
The child's name should be h264parse0, not h264parse. However, if the child
is avdec_h264, its name is avdec_h264-0. How can I know a child's name is
child-name0 or child-name-0? A working way is to add "0" or "-0" to the
child's name according to the element factory name.

Another question is how to check whether an element (e.g. h264parse) exists
in decodebin. I can use gst_child_proxy_get_child_by_name () to check if an
object is returned for the given name. Is there another better way to do
this?
 
Thanks




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst_child_proxy interface

filnet
Hi,

Getting elements by name is not reliable unless you set the element names yourself.
As you observed each element potentially has its own naming scheme.

For example you can get elements by interface with gst_bin_get_by_interface().

Or you can connect to the "element-added" signal (in GstBin again) to be notified of elements being added and do your logic then.

Philippe.


Le Mardi 26 septembre 2017 5h31, jmz <[hidden email]> a écrit :


Hi

I found why the gst_child_proxy_get() does not work with "h264parse::name."
The child's name should be h264parse0, not h264parse. However, if the child
is avdec_h264, its name is avdec_h264-0. How can I know a child's name is
child-name0 or child-name-0? A working way is to add "0" or "-0" to the
child's name according to the element factory name.

Another question is how to check whether an element (e.g. h264parse) exists
in decodebin. I can use gst_child_proxy_get_child_by_name () to check if an
object is returned for the given name. Is there another better way to do
this?


Thanks




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
jmz
Reply | Threaded
Open this post in threaded view
|

Re: gst_child_proxy interface

jmz
filnet wrote
> Getting elements by name is not reliable unless you set the element names
> yourself.As you observed each element potentially has its own naming
> scheme.
> Look at the GstBin functions for better alternatives :
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html
> For example you can get elements by interface with
> gst_bin_get_by_interface().
> Or you can connect to the "element-added" signal (in GstBin again) to be
> notified of elements being added and do your logic then.

Hi Philippe,

Thank you for your suggestions. I chose to connect to the "element-added"
signal for further manipulation on the element added to decodebin.

With regard to gst_bin_get_by_interface(), I do not know how to set the
interface. I saw GST_TYPE_URI_HANDLER for filesrc and GST_TYPE_TAG_SETTER
for muxer. What interfaces should be used to look for video decoder, video
decoder, and parser inside decodebin?

Thanks




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel