aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:09 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:09 +0200
commit6120635f06ecadcc1ab0d59a54b6842a78e11746 (patch)
tree0c3f2b0f07a50ea2a75dc1a6e641e0805192be96 /src/decoder_api.c
parenta68ef497f518c8d7e53ff30733cc749fea505321 (diff)
downloadmpd-6120635f06ecadcc1ab0d59a54b6842a78e11746.tar.gz
mpd-6120635f06ecadcc1ab0d59a54b6842a78e11746.tar.xz
mpd-6120635f06ecadcc1ab0d59a54b6842a78e11746.zip
added decoder_plugin_register()
With the functions decoder_plugin_register() and decoder_plugin_unregister(), decoder plugins can register a "secondary" plugin, like the flac input plugin does this for "oggflac".
Diffstat (limited to 'src/decoder_api.c')
-rw-r--r--src/decoder_api.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index d933f6c7e..ffc3aa781 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -18,6 +18,7 @@
*/
#include "decoder_internal.h"
+#include "decoder_list.h"
#include "audio.h"
#include "utils.h"
@@ -25,6 +26,16 @@
#include "playerData.h"
#include "gcc.h"
+void decoder_plugin_register(struct decoder_plugin *plugin)
+{
+ decoder_plugin_load(plugin);
+}
+
+void decoder_plugin_unregister(struct decoder_plugin *plugin)
+{
+ decoder_plugin_unload(plugin);
+}
+
void decoder_initialized(struct decoder * decoder,
const AudioFormat * audio_format,
float total_time)