configure.ac: Move OpenAL to Audio Output Plugins (nonstreaming), add header.
[mpd-mk.git] / src / decoder_print.c
bloba1c2da2e55f8f235c8c5ecf369d272d5f3bdf998
1 /*
2 * Copyright (C) 2003-2010 The Music Player Daemon Project
3 * http://www.musicpd.org
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "config.h"
21 #include "decoder_print.h"
22 #include "decoder_list.h"
23 #include "decoder_plugin.h"
24 #include "client.h"
26 #include <assert.h>
28 static void
29 decoder_plugin_print(struct client *client,
30 const struct decoder_plugin *plugin)
32 const char *const*p;
34 assert(plugin != NULL);
35 assert(plugin->name != NULL);
37 client_printf(client, "plugin: %s\n", plugin->name);
39 if (plugin->suffixes != NULL)
40 for (p = plugin->suffixes; *p != NULL; ++p)
41 client_printf(client, "suffix: %s\n", *p);
43 if (plugin->mime_types != NULL)
44 for (p = plugin->mime_types; *p != NULL; ++p)
45 client_printf(client, "mime_type: %s\n", *p);
48 void
49 decoder_list_print(struct client *client)
51 for (unsigned i = 0; decoder_plugins[i] != NULL; ++i)
52 if (decoder_plugins_enabled[i])
53 decoder_plugin_print(client, decoder_plugins[i]);