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)
def testLinkNoPads(self): src = gst.Bin() sink = gst.Bin() self.assertRaises(gst.LinkError, src.link, sink)
def testGood(self): bin = gst.Bin() bin = gst.Bin(None) bin = gst.Bin('') bin = gst.Bin('myname')
def setUp(self): TestCase.setUp(self) self.bin = gst.Bin('bin')
def setUp(self): TestCase.setUp(self) self.element = gst.Bin()
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)