overrides: override GhostPad.__init__

This commit is contained in:
Alessandro Decina 2012-10-24 20:47:07 +02:00
parent 33541f1cd8
commit aba84580b3

View file

@ -77,6 +77,22 @@ class Caps(Gst.Caps):
Caps = override(Caps)
__all__.append('Caps')
class GhostPad(Gst.GhostPad):
def __init__(self, name, target=None, direction=None):
if direction is None:
if target is None:
raise TypeError('you must pass at least one of target'
'and direction')
direction = target.props.direction
Gst.GhostPad.__init__(self, name=name, direction=direction)
self.construct()
if target is not None:
self.set_target(target)
GhostPad = override(GhostPad)
__all__.append('GhostPad')
class IteratorError(Exception):
pass
__all__.append('IteratorError')