Try event harder to tear down gst correctly

This commit is contained in:
Thomas Adamcik 2010-02-19 11:21:46 +01:00
parent 8ffa81f7a9
commit 5639c03ea7
2 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class GStreamerPlaybackController(BasePlaybackController):
self.bin.set_property("video-sink", sink) self.bin.set_property("video-sink", sink)
self.bus.add_signal_watch() self.bus.add_signal_watch()
self.bus.connect('message', self._message) self.bus_id = self.bus.connect('message', self._message)
self.stop() self.stop()
@ -126,6 +126,7 @@ class GStreamerPlaybackController(BasePlaybackController):
bin, self.bin = self.bin, None bin, self.bin = self.bin, None
bus, self.bus = self.bus, None bus, self.bus = self.bus, None
bus.disconnect(self.bus_id)
bus.remove_signal_watch() bus.remove_signal_watch()
bin.get_state(-1) bin.get_state(-1)
bin.set_state(gst.STATE_NULL) bin.set_state(gst.STATE_NULL)

View File

@ -662,6 +662,7 @@ class BasePlaybackControllerTest(object):
tracks = self.backend.current_playlist.playlist.tracks tracks = self.backend.current_playlist.playlist.tracks
self.assert_(self.tracks[0] not in tracks) self.assert_(self.tracks[0] not in tracks)
@populate_playlist
def test_previous_track_with_consume(self): def test_previous_track_with_consume(self):
self.playback.consume = True self.playback.consume = True
self.playback.play() self.playback.play()