libsaria: Call gst_quit()

This gives gstreamer a chance to free anything it's created.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-02-10 08:27:29 -05:00
parent defa6185c2
commit bec76743da
5 changed files with 15 additions and 0 deletions

View File

@ -14,6 +14,7 @@ namespace libsaria
namespace audio
{
void init(int, char**);
void quit();
void swap();
string get_current_file();

View File

@ -91,6 +91,12 @@ namespace libsaria
use_alsa(using_alsa());
}
void audio::quit_alsa()
{
if (using_alsa())
remove_alsa();
}
list<string> *audio::get_alsa_devices()
{
return &devices;

View File

@ -103,4 +103,10 @@ namespace libsaria
init_alsa();
}
void audio::quit()
{
quit_alsa();
gst_deinit();
}
};

View File

@ -30,6 +30,7 @@ namespace libsaria
{
void init_volume();
void init_alsa();
void quit_alsa();
}
}

View File

@ -29,6 +29,7 @@ namespace libsaria
void quit()
{
println("Quitting libsaria");
audio::quit();
print_format_stats();
index::print_stats();
close_pipes();