Esempio n. 1
0
    def testLinkFiltered(self):
        # a filtered link uses capsfilter and thus needs a bin
        bin = gst.Bin()
        src = gst.element_factory_make('fakesrc')
        sink = gst.element_factory_make('fakesink')
        bin.add(src, sink)
        caps = gst.caps_from_string("audio/x-raw-int")

        self.failUnless(src.link(sink, caps))

        # DANGER WILL.  src is not actually connected to sink, since
        # there's a capsfilter in the way.  What a leaky abstraction.
        # FIXME
        # src.unlink(sink)

        # instead, mess with pads directly
        pad = src.get_pad('src')
        pad.unlink(pad.get_peer())
        pad = sink.get_pad('sink')
        pad.get_peer().unlink(pad)
Esempio n. 2
0
 def testLinkNoPads(self):
     src = gst.Bin()
     sink = gst.Bin()
     self.assertRaises(gst.LinkError, src.link, sink)
Esempio n. 3
0
 def testGood(self):
     bin = gst.Bin()
     bin = gst.Bin(None)
     bin = gst.Bin('')
     bin = gst.Bin('myname')
Esempio n. 4
0
 def setUp(self):
     TestCase.setUp(self)
     self.bin = gst.Bin('bin')
Esempio n. 5
0
 def setUp(self):
     TestCase.setUp(self)
     self.element = gst.Bin()
Esempio n. 6
0
 def testEOS(self):
     gst.info("creating new bin")
     b = gst.Bin()
     gst.info("creating new EOS message from that bin")
     m = gst.message_new_eos(b)
     gst.info("got message : %s" % m)