diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2013-01-24 14:51:49 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-01-25 12:52:18 (GMT) |
commit | 7086f85f0aada59388f77e2fc746690f03bbbddd (patch) | |
tree | b408539117c9da3e73c1648d7bb23ac5656f348e | |
parent | 1761ace464c3bb9754128c46d524e15ed7d74e5e (diff) |
Put Gst.Pipeline in Gst.State.NULL at exit
This is required by gstreamer to be able to clean up the Player and
free its memory. JukeboxActivity.can_close method is used for this.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | activity.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activity.py b/activity.py index aab843a..10a2490 100644 --- a/activity.py +++ b/activity.py @@ -399,6 +399,12 @@ class JukeboxActivity(activity.Activity): #del chooser pass + def can_close(self): + # We need to put the Gst.State in NULL so gstreamer can + # cleanup the pipeline + self.player.stop() + return True + def read_file(self, file_path): """Load a file from the datastore on activity start.""" logging.debug('JukeBoxAtivity.read_file: %s', file_path) |