Getting video width / height
t.i.m at zen.co.uk
Sat Apr 6 02:20:46 PDT 2013
On Fri, 2013-04-05 at 20:42 -0700, Kip Warner wrote:
> > g_signal_emit_by_name (playbin, "get-video-pad", 0, &pad, NULL);
> Hey Stirling. That's a great start, but sadly the PyGi documentation is
> really scant and I'm having a hard time digging up anything on how to do
> this. I've tried get_property("get-video-pad") on the playbin object,
> but it knows of no such property. I tried a get_pad() call also on the
> playbin object and there's no such method either. It's really shooting
> in the dark with PyGi on most days it seems.
The PyGI API works pretty much exactly like the C API, the only thing
where it's a bit different is when there are 'out' arguments (like &pad
here) in the C API, then you might get a tuple with multiple return
values in python.
Try something like this (untested):
from gi.repository import Gst
#wait for state change to finish, but max 5secs
I'm sure you can find a pygi tutorial somewhere so you don't have to
stab in the dark any longer.
On the python interpreter command line you can also do
to see what methods are offered.
More information about the gstreamer-devel