libsaria: Shut down gstreamer on exit

This gives gstreamer a chance to clean up while exiting.
This commit is contained in:
Bryan Schumaker 2011-04-30 12:57:10 -04:00
parent 6e6705736e
commit 69481ffa70
3 changed files with 6 additions and 2 deletions

View File

@ -58,6 +58,7 @@ def startup():
def shutdown():
event.start("PREQUIT")
audio.shutdown()
## import plugin
## plugin.quit()
event.start("POSTQUIT")

View File

@ -12,6 +12,11 @@ audio_lock = threading.Lock()
lock_audio = audio_lock.acquire
unlock_audio = audio_lock.release
def shutdown():
lock_audio()
pipeline.reset()
unlock_audio()
def load_file(file):
lock_audio()
pipeline.load_file("file", file)

View File

@ -18,8 +18,6 @@ def quit(window, event):
gtk.main_quit()
libsaria.shutdown()
print "Ocarina ran for:", uptime()
import threading
print "active threads?", threading.active_count()
import window
import playlist