2011-05-12 00:27:12 +00:00
|
|
|
import glib
|
|
|
|
import gst
|
|
|
|
|
|
|
|
from common import TestCase
|
2011-08-11 12:27:31 +00:00
|
|
|
import ges
|
2011-05-12 00:27:12 +00:00
|
|
|
|
|
|
|
class Timeline(TestCase):
|
|
|
|
|
|
|
|
def testTimeline(self):
|
|
|
|
|
|
|
|
tl = ges.timeline_new_audio_video()
|
|
|
|
lyr = ges.SimpleTimelineLayer()
|
2011-06-10 14:58:55 +00:00
|
|
|
tck = ges.track_audio_raw_new()
|
2011-05-12 00:27:12 +00:00
|
|
|
|
2011-06-10 14:58:55 +00:00
|
|
|
assert (tl.add_track(tck) == True)
|
|
|
|
#We should have two tracks from the timeline_new_audio_video() function + 1
|
|
|
|
self.failIf(len(tl.get_tracks()) != 3)
|
|
|
|
assert (tl.remove_track(tck) == True)
|
2011-05-12 00:27:12 +00:00
|
|
|
|
2011-06-07 22:09:35 +00:00
|
|
|
assert (tl.add_layer(lyr) == True)
|
2011-06-10 14:58:55 +00:00
|
|
|
self.failIf(len(tl.get_layers()) != 1)
|
|
|
|
assert (tl.remove_layer(lyr) == True)
|