How to get the sink pad of flvmux?

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

How to get the sink pad of flvmux?

Yakov Sudeikin
I tried gst_element_get_static_pad (flvMuxer, "sink");

Tried this:

fatal error: use of undeclared identifier 'request_new_pad'

Tried this:

fatal error: use of undeclared identifier 'gst_flv_mux_request_new_pad'
                GstPad *sink_pad = gst_flv_mux_request_new_pad(flvMuxer, "video");

And `G_OBJECT_TYPE_NAME(flvMuxer)` returns "GstFlvMux".

I must be missing something basic here, but cannot figure what.

Thank you,
Yakov

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

Re: How to get the sink pad of flvmux?

Luis de Bethencourt-4

Yakov Sudeikin writes:

> I tried gst_element_get_static_pad (flvMuxer, "sink");
>
> Tried this:
>
> fatal error: use of undeclared identifier 'request_new_pad'
>
> Tried this:
>
> fatal error: use of undeclared identifier 'gst_flv_mux_request_new_pad'
>                 GstPad *sink_pad = gst_flv_mux_request_new_pad(flvMuxer,
> "video");
>
> And `G_OBJECT_TYPE_NAME(flvMuxer)` returns "GstFlvMux".
>
> I must be missing something basic here, but cannot figure what.
>
> Thank you,
> Yakov

Hi Yakov,

The sink pad in flvmux is not static. gst_element_get_static_pad () only
retrieves already-existing static pads.

You could listen for the "pad-added" [0] signal and connect when a sink pad
becomes available.

Luis

[0] http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GstElement-pad-added
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to get the sink pad of flvmux?

Natanael Mojica
In reply to this post by Yakov Sudeikin

You need
First get the pad templated of flvmux, GstPadTemplate with gst_element_class_get_pad_template()
Then get de sinkvideo pad or audio, by requesting with
gst_element_request_pad() function, passing the element(flvmux) and the pad template(GstPadTemplate)
Then only link de sink pad..


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel