Erroe executing a python script

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

Erroe executing a python script

kususe
Hi to everyone.
I'm new in the world of GStreamer and I have a problem.
Referring to web-site , adding the code in the bottom of 2.2 example to the top one, this error is returned:

 self.player.set_property("video-sink", bin)
NameError: name 'self' is not defined

an error which I didn't have considering just the first code.


how can I work the problem out?

Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Erroe executing a python script

max.s
Hi!
Did you really defined self.player = gst.element ...

or maybe: player = gst.element ...

it could also be that you did not bring "self" to the function.

something like this: def START(self):

/max
Reply | Threaded
Open this post in threaded view
|

Re: Erroe executing a python script

kususe
In the quoted example it's coded:

self.player = gst.element_factory_make("playbin2", "player")

and in "start_stop" function

self

is brounght like argument.

So, what do you mean? Can you be more explicit?