mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
overrides: override GhostPad.__init__
This commit is contained in:
parent
33541f1cd8
commit
aba84580b3
1 changed files with 16 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue