Setting pad properties of glvideomixer

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

Setting pad properties of glvideomixer

Holger
Hi,

I'm using glvideomixer to prepare a side by side video. Therefore I need two src pads.
On the command line I use:
glvideomixer name=mix sink_0::xpos=0 sink_0::ypos=0 ....

Implementing this in python doesn't really work. First try was to do something like this:
glmix = Gst.ElementFactory.make("glvideomixer", "mix")
glmix.set_property("sink_0::xpos",0)
this doesn't work...

There is an example for the normal videomixer element working like this:
glmix = Gst.ElementFactory.make("glvideomixer", "mix")
pad_sink0 = glmix.get_static_pad("sink_0")
pad_sink0.set_property("xpos",0)
But get_static_pad("sink_0") returns a 'NoneType'

Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: Setting pad properties of glvideomixer

Arjen Veenhuizen
The glvideomixer has "sometimes" sinkpads (see gst-inspect-1.0 glvideomixer). Therefore, you cannot use get_static_pad (it will return None).

You should use pad_sink0 = get_request_pad("sink_%u"). After that, pad_sink0.set_property("xpos",0) should work just fine.