4 from common import TestCase
7 class Timeline(TestCase):
9 def testTimeline(self):
11 tl = ges.timeline_new_audio_video()
12 lyr = ges.SimpleTimelineLayer()
13 src = ges.TimelineTestSource()
14 src2 = ges.TimelineTestSource()
15 tr = ges.TimelineStandardTransition("crossfade")
16 pip = ges.TimelinePipeline()
18 self.mainloop = glib.MainLoop()
20 # Let's add the layer to the timeline, and the sources
21 # and transition to the layer.
24 src.set_duration(long(gst.SECOND * 10))
25 src2.set_duration(long(gst.SECOND * 10))
26 src.set_vpattern("Random (television snow)")
27 tr.set_duration(long(gst.SECOND * 10))
29 lyr.add_object(src, -1)
30 lyr.add_object(tr, -1)
31 assert (lyr.add_object(src2, -1) == True)
34 bus.set_sync_handler(self.bus_handler)
39 #Mainloop is finished, tear down.
43 def bus_handler(self, unused_bus, message):
44 if message.type == gst.MESSAGE_ERROR:
47 elif message.type == gst.MESSAGE_EOS: