MCPcopy Create free account
hub / github.com/GStreamer/gst-python / testApplication

Method testApplication

testsuite/old/test_message.py:38–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 self.loop.quit()
37
38 def testApplication(self):
39 self.loop = gobject.MainLoop()
40 gst.info("creating new pipeline")
41 bin = gst.Pipeline()
42 bus = bin.get_bus()
43 bus.add_signal_watch()
44 self.got_message = False
45 bus.connect('message::application', self.message_application_cb)
46
47 struc = gst.Structure("foo")
48 msg = gst.message_new_application(bin, struc)
49 # the bus is flushing in NULL, so we need to set the pipeline to READY
50 bin.set_state(gst.STATE_READY)
51 bus.post(msg)
52 self.loop.run()
53 bus.remove_signal_watch()
54 bin.set_state(gst.STATE_NULL)
55 self.failUnless(self.got_message == True)
56 self.gccollect()
57
58class TestCreateMessages(TestCase):
59

Callers

nothing calls this directly

Calls 2

gccollectMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected