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_spdif.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_spdif.c')
-rw-r--r-- | audio/decode/ad_spdif.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c index d0fa43aa25..f3a6e3dd1f 100644 --- a/audio/decode/ad_spdif.c +++ b/audio/decode/ad_spdif.c @@ -28,9 +28,7 @@ #include "core/mp_msg.h" #include "core/av_common.h" #include "core/options.h" -#include "ad_internal.h" - -LIBAD_EXTERN(spdif) +#include "ad.h" #define FILENAME_SPDIFENC "spdif" #define OUTBUF_SIZE 65536 @@ -43,6 +41,8 @@ struct spdifContext { uint8_t pb_buffer[OUTBUF_SIZE]; }; +static void uninit(sh_audio_t *sh); + static int read_packet(void *p, uint8_t *buf, int buf_size) { // spdifenc does not use read callback. @@ -267,3 +267,13 @@ static void add_decoders(struct mp_decoder_list *list) } } } + +const struct ad_functions ad_spdif = { + .name = "spdif", + .add_decoders = add_decoders, + .preinit = preinit, + .init = init, + .uninit = uninit, + .control = control, + .decode_audio = decode_audio, +}; |