mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
overrides: move the Gst.Pad override before Gst.GhostPad
...else gi will screw up the type hierarchy and GhostPad will inherit from the non-overridden Gst.Pad. Got it?
This commit is contained in:
parent
aba84580b3
commit
d6c8df0352
1 changed files with 16 additions and 13 deletions
|
@ -77,6 +77,19 @@ class Caps(Gst.Caps):
|
|||
Caps = override(Caps)
|
||||
__all__.append('Caps')
|
||||
|
||||
class Pad(Gst.Pad):
|
||||
def query_caps(self, filter=None):
|
||||
return Gst.Pad.query_caps(self, filter)
|
||||
|
||||
def link(self, pad):
|
||||
ret = Gst.Pad.link(self, pad)
|
||||
if ret != Gst.PadLinkReturn.OK:
|
||||
raise LinkError(ret)
|
||||
return ret
|
||||
|
||||
Pad = override(Pad)
|
||||
__all__.append('Pad')
|
||||
|
||||
class GhostPad(Gst.GhostPad):
|
||||
def __init__(self, name, target=None, direction=None):
|
||||
if direction is None:
|
||||
|
@ -90,6 +103,9 @@ class GhostPad(Gst.GhostPad):
|
|||
if target is not None:
|
||||
self.set_target(target)
|
||||
|
||||
def query_caps(self, filter=None):
|
||||
return Gst.GhostPad.query_caps(self, filter)
|
||||
|
||||
GhostPad = override(GhostPad)
|
||||
__all__.append('GhostPad')
|
||||
|
||||
|
@ -137,19 +153,6 @@ class ElementFactory(Gst.ElementFactory):
|
|||
def make(cls, factory_name, instance_name=None):
|
||||
return Gst.ElementFactory.make(factory_name, instance_name)
|
||||
|
||||
class Pad(Gst.Pad):
|
||||
def query_caps(self, filter=None):
|
||||
return Gst.Pad.query_caps(self, filter)
|
||||
|
||||
def link(self, pad):
|
||||
ret = Gst.Pad.link(self, pad)
|
||||
if ret != Gst.PadLinkReturn.OK:
|
||||
raise LinkError(ret)
|
||||
return ret
|
||||
|
||||
Pad = override(Pad)
|
||||
__all__.append('Pad')
|
||||
|
||||
class Pipeline(Gst.Pipeline):
|
||||
def __init__(self, name=None):
|
||||
Gst.Pipeline.__init__(self, name=name)
|
||||
|
|
Loading…
Reference in a new issue