From 3b9ffea36f2079fe23e301d0298ca957ce6a7158 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 24 Aug 2011 03:23:12 +0200 Subject: 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. --- test/read_tags.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/read_tags.c') diff --git a/test/read_tags.c b/test/read_tags.c index 04c0caec6..64535a87f 100644 --- a/test/read_tags.c +++ b/test/read_tags.c @@ -18,6 +18,7 @@ */ #include "config.h" +#include "io_thread.h" #include "decoder_list.h" #include "decoder_api.h" #include "input_init.h" @@ -32,6 +33,7 @@ #include #include +#include #ifdef HAVE_LOCALE_H #include @@ -164,6 +166,13 @@ int main(int argc, char **argv) decoder_name = argv[1]; path = argv[2]; + io_thread_init(); + if (!io_thread_start(&error)) { + g_warning("%s", error->message); + g_error_free(error); + return EXIT_FAILURE; + } + if (!input_stream_global_init(&error)) { g_warning("%s", error->message); g_error_free(error); @@ -195,6 +204,8 @@ int main(int argc, char **argv) decoder_plugin_deinit_all(); input_stream_global_finish(); + io_thread_deinit(); + if (tag == NULL) { g_printerr("Failed to read tags\n"); return 1; -- cgit v1.2.3