overrides: move add(*args) override from Gst.Pipeline to Gst.Bin

This commit is contained in:
Alessandro Decina 2012-11-04 17:02:24 +01:00
parent d6c8df0352
commit 02ca5d3ad2

View file

@ -49,6 +49,18 @@ python module to use with Gst 0.10"
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):
def __new__(cls, *kwargs):
@ -157,11 +169,6 @@ class Pipeline(Gst.Pipeline):
def __init__(self, name=None):
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)
__all__.append('Pipeline')