MCPcopy Create free account
hub / github.com/GStreamer/gst-python / MyBin

Class MyBin

testsuite/old/test_bin.py:31–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29# see
30# http://www.sicem.biz/personal/lgs/docs/gobject-python/gobject-tutorial.html
31class MyBin(gst.Bin):
32 _state_changed = False
33
34 def __init__(self, name):
35 # we need to call GObject's init to be able to do self.do_*
36 gobject.GObject.__init__(self)
37 # since we can't chain up to our parent's __init__, we set the
38 # name manually
39 self.set_property('name', name)
40
41 def do_change_state(self, state_change):
42 if state_change == gst.STATE_CHANGE_PAUSED_TO_PLAYING:
43 self._state_changed = True
44 # FIXME: it seems a vmethod increases the refcount without unreffing
45 # print self.__gstrefcount__
46 # print self.__grefcount__
47
48 # chain up to parent
49 return gst.Bin.do_change_state(self, state_change)
50
51# we need to register the type for PyGTK < 2.8
52gobject.type_register(MyBin)

Callers 1

testStateChangeMethod · 0.85

Calls

no outgoing calls

Tested by 1

testStateChangeMethod · 0.68