diff options
author | wm4 <wm4@nowhere> | 2013-07-22 14:41:56 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-22 14:41:56 +0200 |
commit | f86b94f9b4623baa999961681e44b9a838834de5 (patch) | |
tree | e06a91d29b16b735d0235acaa56a59a14e522c4b /audio/decode/ad_mpg123.c | |
parent | 0b160e125723baa42aa3e880945817e518946bd2 (diff) | |
download | mpv-f86b94f9b4623baa999961681e44b9a838834de5.tar.bz2 mpv-f86b94f9b4623baa999961681e44b9a838834de5.tar.xz |
audio/decode: remove macro crap
Declare decoders directly, instead of using the LIBAD_EXTERN macro. This
is simpler (no weird magic) and more extensible.
Diffstat (limited to 'audio/decode/ad_mpg123.c')
-rw-r--r-- | audio/decode/ad_mpg123.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c index 8d97468e06..d8cc702234 100644 --- a/audio/decode/ad_mpg123.c +++ b/audio/decode/ad_mpg123.c @@ -24,9 +24,8 @@ #include "config.h" -#include "ad_internal.h" - -LIBAD_EXTERN(mpg123) +#include "ad.h" +#include "core/mp_msg.h" /* Reducing the ifdeffery to two main variants: * 1. most compatible to any libmpg123 version @@ -472,3 +471,13 @@ static void add_decoders(struct mp_decoder_list *list) mp_add_decoder(list, "mpg123", "mp3", "mp3", "High-performance decoder using libmpg123"); } + +const struct ad_functions ad_mpg123 = { + .name = "mpg123", + .add_decoders = add_decoders, + .preinit = preinit, + .init = init, + .uninit = uninit, + .control = control, + .decode_audio = decode_audio, +}; |