mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-27 16:36:39 +00:00
overrides: move add(*args) override from Gst.Pipeline to Gst.Bin
This commit is contained in:
parent
d6c8df0352
commit
02ca5d3ad2
1 changed files with 12 additions and 5 deletions
|
@ -49,6 +49,18 @@ python module to use with Gst 0.10"
|
||||||
|
|
||||||
warnings.warn(warn_msg, RuntimeWarning)
|
warnings.warn(warn_msg, RuntimeWarning)
|
||||||
|
|
||||||
|
class Bin(Gst.Bin):
|
||||||
|
def __init__(self, name=None):
|
||||||
|
Gst.Bin.__init__(self, name=name)
|
||||||
|
|
||||||
|
def add(self, *args):
|
||||||
|
for arg in args:
|
||||||
|
if not Gst.Bin.add(self, arg):
|
||||||
|
raise AddError(arg)
|
||||||
|
|
||||||
|
Bin = override(Bin)
|
||||||
|
__all__.append('Bin')
|
||||||
|
|
||||||
class Caps(Gst.Caps):
|
class Caps(Gst.Caps):
|
||||||
|
|
||||||
def __new__(cls, *kwargs):
|
def __new__(cls, *kwargs):
|
||||||
|
@ -157,11 +169,6 @@ class Pipeline(Gst.Pipeline):
|
||||||
def __init__(self, name=None):
|
def __init__(self, name=None):
|
||||||
Gst.Pipeline.__init__(self, name=name)
|
Gst.Pipeline.__init__(self, name=name)
|
||||||
|
|
||||||
def add(self, *args):
|
|
||||||
for arg in args:
|
|
||||||
if not Gst.Pipeline.add(self, arg):
|
|
||||||
raise AddError(arg)
|
|
||||||
|
|
||||||
Pipeline = override(Pipeline)
|
Pipeline = override(Pipeline)
|
||||||
__all__.append('Pipeline')
|
__all__.append('Pipeline')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue