diff options
author | Max Kellermann <max@duempel.org> | 2011-08-24 03:23:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-08-24 03:33:49 +0200 |
commit | 3b9ffea36f2079fe23e301d0298ca957ce6a7158 (patch) | |
tree | 6441bda296152883cf1ebc9296b6a41d5f4f0712 /test/run_input.c | |
parent | e242f3999c7f0219926877e4accf4763fec2972c (diff) | |
download | mpd-3b9ffea36f2079fe23e301d0298ca957ce6a7158.tar.gz mpd-3b9ffea36f2079fe23e301d0298ca957ce6a7158.tar.xz mpd-3b9ffea36f2079fe23e301d0298ca957ce6a7158.zip |
input/soup: new input plugin based on libsoup
To demonstrate the new I/O thread. libsoup is well-integrated into
the GLib main loop, which made this plugin pretty easy to write.
As a side effect, we have to initialize the I/O thread in all debug
programs that use the input API.
Diffstat (limited to 'test/run_input.c')
-rw-r--r-- | test/run_input.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/run_input.c b/test/run_input.c index 7787445e9..c00698dff 100644 --- a/test/run_input.c +++ b/test/run_input.c @@ -18,6 +18,7 @@ */ #include "config.h" +#include "io_thread.h" #include "input_init.h" #include "input_stream.h" #include "tag_pool.h" @@ -32,6 +33,7 @@ #include <glib.h> #include <unistd.h> +#include <stdlib.h> static void my_log_func(const gchar *log_domain, G_GNUC_UNUSED GLogLevelFlags log_level, @@ -122,6 +124,13 @@ int main(int argc, char **argv) tag_pool_init(); config_global_init(); + io_thread_init(); + if (!io_thread_start(&error)) { + g_warning("%s", error->message); + g_error_free(error); + return EXIT_FAILURE; + } + #ifdef ENABLE_ARCHIVE archive_plugin_init_all(); #endif @@ -155,6 +164,8 @@ int main(int argc, char **argv) archive_plugin_deinit_all(); #endif + io_thread_deinit(); + config_global_finish(); tag_pool_deinit(); |