Commit 53f0bc40 authored by Thibault Saunier's avatar Thibault Saunier

Remove all trailling spaces

parent f7586035
...@@ -224,7 +224,7 @@ class Renderer(Actioner): ...@@ -224,7 +224,7 @@ class Renderer(Actioner):
a = RenderAction() a = RenderAction()
a.addProducers(*sources) a.addProducers(*sources)
a.addConsumers(sf) a.addConsumers(sf)
return a return a
def _connectFunctions(self): def _connectFunctions(self):
......
...@@ -476,7 +476,7 @@ class ElementTreeFormatter(Formatter): ...@@ -476,7 +476,7 @@ class ElementTreeFormatter(Formatter):
interpolator.start.mode = int(start.attrib["mode"]) interpolator.start.mode = int(start.attrib["mode"])
for kf in element.getiterator("keyframe"): for kf in element.getiterator("keyframe"):
interpolator.newKeyframe(long(kf.attrib["time"]), interpolator.newKeyframe(long(kf.attrib["time"]),
value=self._parsePropertyValue(kf.attrib["value"]), value=self._parsePropertyValue(kf.attrib["value"]),
mode=int(kf.attrib["mode"])) mode=int(kf.attrib["mode"]))
end = element.find("end") end = element.find("end")
......
...@@ -440,7 +440,7 @@ class TimelineLogObserver(object): ...@@ -440,7 +440,7 @@ class TimelineLogObserver(object):
if isinstance(track_object, TrackEffect): if isinstance(track_object, TrackEffect):
action = self.trackEffectAddAction(timeline_object, track_object, action = self.trackEffectAddAction(timeline_object, track_object,
self.effect_properties_tracker) self.effect_properties_tracker)
#We use the action instead of the track object #We use the action instead of the track object
#because the track_object changes when redoing #because the track_object changes when redoing
track_object.connect("active-changed", track_object.connect("active-changed",
self._trackObjectActiveChangedCb, action) self._trackObjectActiveChangedCb, action)
......
...@@ -536,8 +536,8 @@ class TrackObject(Signallable, Loggable): ...@@ -536,8 +536,8 @@ class TrackObject(Signallable, Loggable):
self._updatePriority(priority) self._updatePriority(priority)
def _updatePriority(self, priority): def _updatePriority(self, priority):
# The priority of an effect should always be higher than the priority of # The priority of an effect should always be higher than the priority of
# the track it is applied to. Those priority are affected when we add a # the track it is applied to. Those priority are affected when we add a
# TrackObject to timeline # TrackObject to timeline
if type(self) is TrackEffect: if type(self) is TrackEffect:
if self.stream_type is VideoStream: if self.stream_type is VideoStream:
......
...@@ -118,8 +118,8 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable): ...@@ -118,8 +118,8 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
bounds = view.bounds bounds = view.bounds
time = (Zoomable.pixelToNs(pos[0] - bounds.x1) + time = (Zoomable.pixelToNs(pos[0] - bounds.x1) +
view.element.in_point) view.element.in_point)
value = ((1 - (pos[1] - KW_LABEL_Y_OVERFLOW - bounds.y1 - value = ((1 - (pos[1] - KW_LABEL_Y_OVERFLOW - bounds.y1 -
view._min) / view._range) * view._min) / view._range) *
interpolator.range) + interpolator.lower interpolator.range) + interpolator.lower
return time, value return time, value
...@@ -206,7 +206,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable): ...@@ -206,7 +206,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
def _getKeyframeXY(self, kf): def _getKeyframeXY(self, kf):
interp = self.interpolator interp = self.interpolator
x = self.nsToPixel(kf.time - self.element.in_point) x = self.nsToPixel(kf.time - self.element.in_point)
y = KW_LABEL_Y_OVERFLOW + self._range - (((kf.value - y = KW_LABEL_Y_OVERFLOW + self._range - (((kf.value -
interp.lower) / interp.range) * self._range) interp.lower) / interp.range) * self._range)
return point.Point(x + self.bounds.x1, y + self.bounds.y1 + self._min) return point.Point(x + self.bounds.x1, y + self.bounds.y1 + self._min)
...@@ -266,7 +266,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable): ...@@ -266,7 +266,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
cr.clip() cr.clip()
# draw the value label # draw the value label
roundedrec(cr, x - KW_LABEL_HPAD2, y - KW_LABEL_VPAD2, roundedrec(cr, x - KW_LABEL_HPAD2, y - KW_LABEL_VPAD2,
w + KW_LABEL_HPAD, h + KW_LABEL_VPAD, r=10) w + KW_LABEL_HPAD, h + KW_LABEL_VPAD, r=10)
cr.set_source_rgb(1, 1, 1) cr.set_source_rgb(1, 1, 1)
cr.fill() cr.fill()
...@@ -291,7 +291,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable): ...@@ -291,7 +291,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
def do_simple_is_item_at(self, x, y, cr, pointer_event): def do_simple_is_item_at(self, x, y, cr, pointer_event):
if (between(0, x, self.visible_width) and if (between(0, x, self.visible_width) and
between(KW_LABEL_Y_OVERFLOW, y, self.height + between(KW_LABEL_Y_OVERFLOW, y, self.height +
KW_LABEL_Y_OVERFLOW)): KW_LABEL_Y_OVERFLOW)):
x += self.bounds.x1 x += self.bounds.x1
y += self.bounds.y1 y += self.bounds.y1
......
...@@ -686,17 +686,17 @@ if __name__ == '__main__': ...@@ -686,17 +686,17 @@ if __name__ == '__main__':
("pear", "pear")),)), ("pear", "pear")),)),
(ColorWidget, 0x336699FF, (int,)), (ColorWidget, 0x336699FF, (int,)),
(FontWidget, "Sans 9", ()), (FontWidget, "Sans 9", ()),
(FractionWidget, "30M", (FractionWidget, "30M",
(gst.FractionRange(gst.Fraction(1, 1), (gst.FractionRange(gst.Fraction(1, 1),
gst.Fraction(30000, 1001)),)), gst.Fraction(30000, 1001)),)),
(FractionWidget, gst.Fraction(25000, 1001), (FractionWidget, gst.Fraction(25000, 1001),
( (
gst.FractionRange( gst.FractionRange(
gst.Fraction(1, 1), gst.Fraction(1, 1),
gst.Fraction(30000, 1001) gst.Fraction(30000, 1001)
), ),
( (
"25:1", "25:1",
gst.Fraction(30,1), gst.Fraction(30,1),
"30M", "30M",
), ),
......
...@@ -96,7 +96,7 @@ def extension_for_muxer(muxer): ...@@ -96,7 +96,7 @@ def extension_for_muxer(muxer):
return "" return ""
def factorylist(factories): def factorylist(factories):
""" Given a sequence of factories, returns a gtk.ListStore() """ Given a sequence of factories, returns a gtk.ListStore()
of sorted, beautified factory names """ of sorted, beautified factory names """
return model((str, object), return model((str, object),
...@@ -170,7 +170,7 @@ class EncodingDialog(GladeWindow, Renderer, Loggable): ...@@ -170,7 +170,7 @@ class EncodingDialog(GladeWindow, Renderer, Loggable):
self.muxercombobox.set_model(factorylist( self.muxercombobox.set_model(factorylist(
self.settings.muxers)) self.settings.muxers))
# note: this will trigger an update of the codec comboboxes # note: this will trigger an update of the codec comboboxes
set_combo_value(self.muxercombobox, set_combo_value(self.muxercombobox,
gst.element_factory_find(self.settings.muxer)) gst.element_factory_find(self.settings.muxer))
# Encoder/Muxer settings # Encoder/Muxer settings
......
...@@ -129,7 +129,7 @@ class PreferencesDialog(gtk.Window): ...@@ -129,7 +129,7 @@ class PreferencesDialog(gtk.Window):
## Public API ## Public API
@classmethod @classmethod
def addPreference(cls, attrname, label, description, section=None, def addPreference(cls, attrname, label, description, section=None,
widget_klass=None, **args): widget_klass=None, **args):
""" """
Add a user preference. The preferences dialog will try Add a user preference. The preferences dialog will try
......
...@@ -155,7 +155,7 @@ class VideoPresetManager(PresetManager): ...@@ -155,7 +155,7 @@ class VideoPresetManager(PresetManager):
str(int(values["frame-rate"].num))) str(int(values["frame-rate"].num)))
parser.set(section, "framerate-denom", parser.set(section, "framerate-denom",
str(int(values["frame-rate"].denom))) str(int(values["frame-rate"].denom)))
parser.set(section, "par-num", parser.set(section, "par-num",
str(int(values["par"].num))) str(int(values["par"].num)))
parser.set(section, "par-denom", parser.set(section, "par-denom",
str(int(values["par"].denom))) str(int(values["par"].denom)))
......
...@@ -66,7 +66,7 @@ GlobalSettings.addConfigOption("thumbnailCacheSize", ...@@ -66,7 +66,7 @@ GlobalSettings.addConfigOption("thumbnailCacheSize",
key="cache-size", key="cache-size",
default=250) default=250)
# the maximum number of thumbnails to enqueue at a given time. setting this to # the maximum number of thumbnails to enqueue at a given time. setting this to
# a larger value will increase latency after large operations, such as zooming # a larger value will increase latency after large operations, such as zooming
GlobalSettings.addConfigOption("thumbnailMaxRequests", GlobalSettings.addConfigOption("thumbnailMaxRequests",
section="thumbnailing", section="thumbnailing",
......
...@@ -82,13 +82,13 @@ class ProjectSettingsDialog(GladeWindow): ...@@ -82,13 +82,13 @@ class ProjectSettingsDialog(GladeWindow):
# add custom widgets # add custom widgets
self.dar_fraction_widget = FractionWidget() self.dar_fraction_widget = FractionWidget()
self.video_properties_table.attach(self.dar_fraction_widget, self.video_properties_table.attach(self.dar_fraction_widget,
0, 1, 6, 7, xoptions=gtk.EXPAND | gtk.FILL, yoptions=0) 0, 1, 6, 7, xoptions=gtk.EXPAND | gtk.FILL, yoptions=0)
self.dar_fraction_widget.show() self.dar_fraction_widget.show()
# add custom widgets # add custom widgets
self.par_fraction_widget = FractionWidget() self.par_fraction_widget = FractionWidget()
self.video_properties_table.attach(self.par_fraction_widget, self.video_properties_table.attach(self.par_fraction_widget,
1, 2, 6, 7, xoptions=gtk.EXPAND | gtk.FILL, yoptions=0) 1, 2, 6, 7, xoptions=gtk.EXPAND | gtk.FILL, yoptions=0)
self.par_fraction_widget.show() self.par_fraction_widget.show()
...@@ -105,7 +105,7 @@ class ProjectSettingsDialog(GladeWindow): ...@@ -105,7 +105,7 @@ class ProjectSettingsDialog(GladeWindow):
self.channels_combo.set_model(audio_channels) self.channels_combo.set_model(audio_channels)
self.sample_rate_combo.set_model(audio_rates) self.sample_rate_combo.set_model(audio_rates)
self.sample_depth_combo.set_model(audio_depths) self.sample_depth_combo.set_model(audio_depths)
# set the project metadata # set the project metadata
# FIXME: not saved in the project file # FIXME: not saved in the project file
if self.year_spinbutton.get_value_as_int() == 1900: if self.year_spinbutton.get_value_as_int() == 1900:
...@@ -119,7 +119,7 @@ class ProjectSettingsDialog(GladeWindow): ...@@ -119,7 +119,7 @@ class ProjectSettingsDialog(GladeWindow):
self.wg = RippleUpdateGroup( self.wg = RippleUpdateGroup(
(self.frame_rate_combo, self._updateCombo, "changed", (self.frame_rate_combo, self._updateCombo, "changed",
self.frame_rate_fraction_widget), self.frame_rate_fraction_widget),
(self.frame_rate_fraction_widget, self._updateFraction, (self.frame_rate_fraction_widget, self._updateFraction,
"value-changed", self.frame_rate_combo), "value-changed", self.frame_rate_combo),
(self.dar_combo, None, "changed"), (self.dar_combo, None, "changed"),
(self.dar_fraction_widget, None, "value-changed"), (self.dar_fraction_widget, None, "value-changed"),
...@@ -237,7 +237,7 @@ class ProjectSettingsDialog(GladeWindow): ...@@ -237,7 +237,7 @@ class ProjectSettingsDialog(GladeWindow):
lambda : get_combo_value(widget)) lambda : get_combo_value(widget))
def bindSpinbutton(self, mgr, name, widget): def bindSpinbutton(self, mgr, name, widget):
mgr.bindWidget(name, mgr.bindWidget(name,
lambda x: widget.set_value(float(x)), lambda x: widget.set_value(float(x)),
lambda : int(widget.get_value())) lambda : int(widget.get_value()))
...@@ -372,7 +372,7 @@ class ProjectSettingsDialog(GladeWindow): ...@@ -372,7 +372,7 @@ class ProjectSettingsDialog(GladeWindow):
self.dar_combo)) self.dar_combo))
def updateDarFromFractionWidget(self): def updateDarFromFractionWidget(self):
set_combo_value(self.dar_combo, set_combo_value(self.dar_combo,
self.dar_fraction_widget.getWidgetValue()) self.dar_fraction_widget.getWidgetValue())
def updateParFromCombo(self): def updateParFromCombo(self):
...@@ -380,7 +380,7 @@ class ProjectSettingsDialog(GladeWindow): ...@@ -380,7 +380,7 @@ class ProjectSettingsDialog(GladeWindow):
self.par_combo)) self.par_combo))
def updateParFromFractionWidget(self): def updateParFromFractionWidget(self):
set_combo_value(self.par_combo, set_combo_value(self.par_combo,
self.par_fraction_widget.getWidgetValue()) self.par_fraction_widget.getWidgetValue())
def updateUI(self): def updateUI(self):
......
...@@ -24,16 +24,16 @@ class RippleUpdateGroup(object): ...@@ -24,16 +24,16 @@ class RippleUpdateGroup(object):
"""Allows for event-driven spreadsheet-like ripple updates without """Allows for event-driven spreadsheet-like ripple updates without
infinite loops. infinite loops.
This class allows you to express an event-driven sequence of operations in This class allows you to express an event-driven sequence of operations in
terms of a directed graph. It is not a constraint solver: The goal is to terms of a directed graph. It is not a constraint solver: The goal is to
allow the programmer to reduce complex logic to a set of simple functions allow the programmer to reduce complex logic to a set of simple functions
and predicates combined declaratively. and predicates combined declaratively.
Events propagate through the graph in breadth first order. During an Events propagate through the graph in breadth first order. During an
update cycle, each vertex is visited only once, so cycles can exist in the update cycle, each vertex is visited only once, so cycles can exist in the
graph without creating infinite loops. graph without creating infinite loops.
Each vertex represents a unique object. The following may also be Each vertex represents a unique object. The following may also be
associated with a vertex: associated with a vertex:
......
...@@ -576,7 +576,7 @@ class Timeline(gtk.Table, Loggable, Zoomable): ...@@ -576,7 +576,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
def _updateScrollPosition(self, adjustment): def _updateScrollPosition(self, adjustment):
self._scroll_pos_ns = Zoomable.pixelToNs(self.hadj.get_value()) self._scroll_pos_ns = Zoomable.pixelToNs(self.hadj.get_value())
self._root_item.set_simple_transform( -self.hadj.get_value(), self._root_item.set_simple_transform( -self.hadj.get_value(),
-self.vadj.get_value(), 1.0, 0) -self.vadj.get_value(), 1.0, 0)
def _zoomAdjustmentChangedCb(self, adjustment): def _zoomAdjustmentChangedCb(self, adjustment):
...@@ -797,7 +797,7 @@ class Timeline(gtk.Table, Loggable, Zoomable): ...@@ -797,7 +797,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
def keyframe(self, action): def keyframe(self, action):
timeline_position = self._position timeline_position = self._position
selected = self.timeline.selection.getSelectedTrackObjs() selected = self.timeline.selection.getSelectedTrackObjs()
for obj in selected: for obj in selected:
keyframe_exists = False keyframe_exists = False
......
...@@ -69,7 +69,7 @@ class PitiviViewer(gtk.VBox, Loggable): ...@@ -69,7 +69,7 @@ class PitiviViewer(gtk.VBox, Loggable):
__gtype_name__ = 'PitiviViewer' __gtype_name__ = 'PitiviViewer'
__gsignals__ = { __gsignals__ = {
"activate-playback-controls" : (gobject.SIGNAL_RUN_LAST, "activate-playback-controls" : (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_NONE, (gobject.TYPE_BOOLEAN,)), gobject.TYPE_NONE, (gobject.TYPE_BOOLEAN,)),
} }
......
...@@ -20,21 +20,21 @@ class BasicTest(TestCase): ...@@ -20,21 +20,21 @@ class BasicTest(TestCase):
for offset in xrange(1, 5): for offset in xrange(1, 5):
for length in xrange(1, 2049, 300): for length in xrange(1, 2049, 300):
A = [i * offset for i in xrange(0, length)] A = [i * offset for i in xrange(0, length)]
## check negative hits ## check negative hits
# search value too low # search value too low
# error if value is found # error if value is found
# if search returns non-negative index, fail # if search returns non-negative index, fail
value = A[0] - 1 value = A[0] - 1
self.assertFalse(found(A, binary_search(A, value), value)) self.assertFalse(found(A, binary_search(A, value), value))
# search value too high # search value too high
# error if value is found # error if value is found
# if search returns non-negative index, fail # if search returns non-negative index, fail
value = A[-1] + 1 value = A[-1] + 1
self.assertFalse(found(A, binary_search(A, value), value)) self.assertFalse(found(A, binary_search(A, value), value))
## check positive hits ## check positive hits
for i, a in enumerate(A): for i, a in enumerate(A):
# error if value is NOT found # error if value is NOT found
......
...@@ -15,7 +15,7 @@ class CacheTest(TestCase): ...@@ -15,7 +15,7 @@ class CacheTest(TestCase):
assert len(c.cache) == 32 assert len(c.cache) == 32
assert not 31 in c assert not 31 in c
assert 32 in c assert 32 in c
# touch the LRU item, and then add something to the queue # touch the LRU item, and then add something to the queue
# the item should still remain in the queue # the item should still remain in the queue
......
...@@ -118,7 +118,7 @@ class TestFormatterSave(TestCase): ...@@ -118,7 +118,7 @@ class TestFormatterSave(TestCase):
effect1.addOutputStream(video_stream) effect1.addOutputStream(video_stream)
effect1.addInputStream(video_stream) effect1.addInputStream(video_stream)
#It is necessary to had the identity factory to the #It is necessary to had the identity factory to the
#effect_factories_dictionnary #effect_factories_dictionnary
self.formatter.avalaible_effects._effect_factories_dict['identity'] =\ self.formatter.avalaible_effects._effect_factories_dict['identity'] =\
effect1 effect1
......
...@@ -127,7 +127,7 @@ class TestLiveSourceFactory(TestCase): ...@@ -127,7 +127,7 @@ class TestLiveSourceFactory(TestCase):
# pass an explicit default_duration # pass an explicit default_duration
factory = LiveSourceFactory('live://', 'name', 10 * gst.SECOND) factory = LiveSourceFactory('live://', 'name', 10 * gst.SECOND)
self.failUnlessEqual(factory.default_duration, 10 * gst.SECOND) self.failUnlessEqual(factory.default_duration, 10 * gst.SECOND)
# check that if a LiveSourceFactory derived class doesn't pass a # check that if a LiveSourceFactory derived class doesn't pass a
# default_duration it's still set to 5 seconds # default_duration it's still set to 5 seconds
factory = LiveSourceFactory('name') factory = LiveSourceFactory('name')
......
...@@ -220,7 +220,7 @@ class TestPictureFileSourceFactory(TestCase): ...@@ -220,7 +220,7 @@ class TestPictureFileSourceFactory(TestCase):
self.factory.addOutputStream(video2) self.factory.addOutputStream(video2)
self.factory.addOutputStream(audio) self.factory.addOutputStream(audio)
# We're no longer using ffvideoscale, so this check is obsolete. # We're no longer using ffvideoscale, so this check is obsolete.
# TODO: implement this functinality in smartscale, and test it # TODO: implement this functinality in smartscale, and test it
# separately # separately
#if gst.registry_get_default().find_feature('ffvideoscale', #if gst.registry_get_default().find_feature('ffvideoscale',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# test/test_factories_operation.py # test/test_factories_operation.py
# #
# Copyright (C) 2010 Thibault Saunier <tsaunier@gnome.org> # Copyright (C) 2010 Thibault Saunier <tsaunier@gnome.org>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either # License as published by the Free Software Foundation; either
......
...@@ -100,7 +100,7 @@ class TestGap(TestCase): ...@@ -100,7 +100,7 @@ class TestGap(TestCase):
timeline_object2 = self.makeTimelineObject() timeline_object2 = self.makeTimelineObject()
timeline_object3 = self.makeTimelineObject() timeline_object3 = self.makeTimelineObject()
timeline_object4 = self.makeTimelineObject() timeline_object4 = self.makeTimelineObject()
timeline_object1.start = 5 * gst.SECOND timeline_object1.start = 5 * gst.SECOND
timeline_object1.duration = 10 * gst.SECOND timeline_object1.duration = 10 * gst.SECOND
timeline_object1.priority = 1 timeline_object1.priority = 1
......
...@@ -262,7 +262,7 @@ class InstanceRunner(Signallable): ...@@ -262,7 +262,7 @@ class InstanceRunner(Signallable):
attrname = "video%d" % self.videoTracks attrname = "video%d" % self.videoTracks
container = self.container() container = self.container()
setattr(self, attrname, container) setattr(self, attrname, container)
self.tracks[track] = container self.tracks[track] = container
container.transitions = {} container.transitions = {}
track.connect("transition-added", self._transitionAddedCb, container) track.connect("transition-added", self._transitionAddedCb, container)
track.connect("transition-removed", self._transitionRemovedCb, track.connect("transition-removed", self._transitionRemovedCb,
...@@ -437,28 +437,28 @@ class TestBasic(Base): ...@@ -437,28 +437,28 @@ class TestBasic(Base):
self.failUnlessEqual(self.runner.errors, set((test3,))) self.failUnlessEqual(self.runner.errors, set((test3,)))
def testConfigureTimeline(self): def testConfigureTimeline(self):
config = Configuration() config = Configuration()
config.addSource( config.addSource(
"object1", "object1",
test1, test1,
{ {
"start" : 0, "start" : 0,
"duration" : gst.SECOND, "duration" : gst.SECOND,
"media-start" : gst.SECOND, "media-start" : gst.SECOND,
}) })
config.addSource( config.addSource(
"object2", "object2",
test2, test2,
{ {
"start" : gst.SECOND, "start" : gst.SECOND,
"duration" : gst.SECOND, "duration" : gst.SECOND,
}) })
def timelineConfigured(runner): def timelineConfigured(runner):
config.matches(self.runner) config.matches(self.runner)
self.runner.shutDown() self.runner.shutDown()
self.runner.loadConfiguration(config) self.runner.loadConfiguration(config)
self.runner.connect("timeline-configured", timelineConfigured) self.runner.connect("timeline-configured", timelineConfigured)
self.runner.run() self.runner.run()
...@@ -471,8 +471,8 @@ class TestBasic(Base): ...@@ -471,8 +471,8 @@ class TestBasic(Base):
def testMoveSources(self): def testMoveSources(self):
initial = Configuration() initial = Configuration()
initial.addSource( initial.addSource(
"object1", "object1",
test1, test1,
{ {
"start" : 0, "start" : 0,
"duration" : gst.SECOND, "duration" : gst.SECOND,
...@@ -480,7 +480,7 @@ class TestBasic(Base): ...@@ -480,7 +480,7 @@ class TestBasic(Base):
"priority" : 0 "priority" : 0
}) })
initial.addSource( initial.addSource(
"object2", "object2",
test2, test2,
{ {
"start" : gst.SECOND, "start" : gst.SECOND,
...@@ -503,7 +503,7 @@ class TestBasic(Base): ...@@ -503,7 +503,7 @@ class TestBasic(Base):
}) })
def timelineConfigured(runner): def timelineConfigured(runner):
context = MoveContext(self.runner.timeline, context = MoveContext(self.runner.timeline,
self.runner.video1.object1, self.runner.video1.object1,
set((self.runner.audio1.object2,))) set((self.runner.audio1.object2,)))
brush.scrub(context, 10 * gst.SECOND, 1, steps=10) brush.scrub(context, 10 * gst.SECOND, 1, steps=10)
...@@ -527,7 +527,7 @@ class TestBasic(Base): ...@@ -527,7 +527,7 @@ class TestBasic(Base):
def testRippleMoveSimple(self): def testRippleMoveSimple(self):
initial = Configuration() initial = Configuration()
initial.addSource('clip1', test1, { initial.addSource('clip1', test1, {
"duration" : gst.SECOND, "duration" : gst.SECOND,
"start" : gst.SECOND, "start" : gst.SECOND,
"priority" : 2}) "priority" : 2})
...@@ -629,7 +629,7 @@ class TestSeeking(Base): ...@@ -629,7 +629,7 @@ class TestSeeking(Base):
"duration" : gst.SECOND, "duration" : gst.SECOND,
"priority" : i % 2, "priority" : i % 2,
}) })
def _startSeeking(self, interval, steps=10): def _startSeeking(self, interval, steps=10):
self.count = 0 self.count = 0
...@@ -642,7 +642,7 @@ class TestSeeking(Base): ...@@ -642,7 +642,7 @@ class TestSeeking(Base):
if self.count < self.steps: if self.count < self.steps:
self.runner.watchdog.keepAlive() self.runner.watchdog.keepAlive()
self.count += 1 self.count += 1
self.cur_pos = random.randint(0, self.cur_pos = random.randint(0,
self.runner.timeline.duration) self.runner.timeline.duration)
self.runner.project.pipeline.seek(self.cur_pos) self.runner.project.pipeline.seek(self.cur_pos)
return True return True
...@@ -699,13 +699,13 @@ class TestRippleExtensive(Base): ...@@ -699,13 +699,13 @@ class TestRippleExtensive(Base):
for j in xrange(0, 10): for j in xrange(0, 10):
if j < i: if j < i:
final.addSource('clip%d' % j, test1, final.addSource('clip%d' % j, test1,
{ 'start' : gst.SECOND * j, { 'start' : gst.SECOND * j,
'duration' : gst.SECOND, 'duration' : gst.SECOND,
'priority' : j % 2}) 'priority' : j % 2})
else: else:
final.addSource('clip%d' % j, test1, final.addSource('clip%d' % j, test1,
{ 'start' : gst.SECOND * (j + 10), { 'start' : gst.SECOND * (j + 10),
'duration' : gst.SECOND, 'duration' : gst.SECOND,
'priority' : (j % 2) + 1}) 'priority' : (j % 2) + 1})
self.finals.append(final) self.finals.append(final)
Base.__init__(self, unknown) Base.__init__(self, unknown)
...@@ -778,15 +778,15 @@ class TestTransitions(Base): ...@@ -778,15 +778,15 @@ class TestTransitions(Base):
def testSimple(self): def testSimple(self):
initial = Configuration() initial = Configuration()
initial.addSource( initial.addSource(
"object1", "object1",
test1, test1,
{ {
"start" : 0, "start" : 0,
"duration" : 5 * gst.SECOND, "duration" : 5 * gst.SECOND,
"priority" : 0, "priority" : 0,
}) })
initial.addSource( initial.addSource(
"object2", "object2",
test1, test1,
{ {
"start" : 5 * gst.SECOND, "start" : 5 * gst.SECOND,
...@@ -818,7 +818,7 @@ class TestTransitions(Base): ...@@ -818,7 +818,7 @@ class TestTransitions(Base):
def nextMove(): def nextMove():
if moves: if moves:
self._cur_move = moves.pop(0) self._cur_move = moves.pop(0)
context = MoveContext(self.runner.timeline, context = MoveContext(self.runner.timeline,
self.runner.video1.object2, self.runner.video1.object2,
set([self.runner.video1.object2]))