Add FIXMEs

This commit is contained in:
Thomas Adamcik 2010-04-06 15:02:15 +02:00
parent ef3906c1d6
commit 48acbf701c
3 changed files with 6 additions and 0 deletions

View File

@ -349,6 +349,8 @@ class BasePlaybackController(object):
def state(self, new_state):
(old_state, self._state) = (self.state, new_state)
logger.debug(u'Changing state: %s -> %s', old_state, new_state)
# FIXME _play_time stuff assumes backend does not have a better way of
# handeling this stuff :/
if (old_state in (self.PLAYING, self.STOPPED)
and new_state == self.PLAYING):
self._play_time_start()

View File

@ -34,6 +34,8 @@ class GStreamerPlaybackController(BasePlaybackController):
self._bus = self._bin.get_bus()
sink = gst.element_factory_make("fakesink", "fakesink")
# FIXME cleanup fakesink?
self._bin.set_property("video-sink", sink)
self._bus.add_signal_watch()
self._bus_id = self._bus.connect('message', self._message)
@ -91,6 +93,7 @@ class GStreamerPlaybackController(BasePlaybackController):
else:
self._set_state(gst.STATE_PLAYING)
# FIXME refactor to _seek ?
def seek(self, time_position):
if self.state == self.STOPPED:
self.play()

View File

@ -13,6 +13,7 @@ folder = os.path.abspath(folder)
song = os.path.join(folder, 'song%s.mp3')
song = 'file://' + song
# FIXME can be switched to generic test
class GStreamerCurrentPlaylistHandlerTest(BaseCurrentPlaylistControllerTest, unittest.TestCase):
tracks = [Track(uri=song % i, id=i, length=4464) for i in range(1, 4)]