warnings.warn(warn_msg, RuntimeWarning)
+
+class Element(Gst.Element):
+ @staticmethod
+ def link_many(*args):
+ '''
+ @raises: Gst.LinkError
+ '''
+ for pair in pairwise(args):
+ if not pair[0].link(pair[1]):
+ raise LinkError(
+ 'Failed to link {} and {}'.format(pair[0], pair[1]))
+
+Element = override(Element)
+__all__.append('Element')
+
+
class Bin(Gst.Bin):
def __init__(self, name=None):
Gst.Bin.__init__(self, name=name)
return zip(a, b)
-class Element(Gst.Element):
- @staticmethod
- def link_many(*args):
- '''
- @raises: Gst.LinkError
- '''
- for pair in pairwise(args):
- if not pair[0].link(pair[1]):
- raise LinkError(
- 'Failed to link {} and {}'.format(pair[0], pair[1]))
-
-Element = override(Element)
-__all__.append('Element')
-
-
def TIME_ARGS(time):
if time == Gst.CLOCK_TIME_NONE:
return "CLOCK_TIME_NONE"
test = Gst.Structure('test,test=1')
self.assertEqual(test['test'], 1)
+
+class TestBin(TestCase):
+
+ def test_add_pad(self):
+ Gst.init(None)
+ self.assertEqual(Gst.ElementFactory.make("bin", None).sinkpads, [])
+
if __name__ == "__main__":
unittest.main()