From f86b94f9b4623baa999961681e44b9a838834de5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 22 Jul 2013 14:41:56 +0200 Subject: audio/decode: remove macro crap Declare decoders directly, instead of using the LIBAD_EXTERN macro. This is simpler (no weird magic) and more extensible. --- audio/decode/ad_spdif.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'audio/decode/ad_spdif.c') 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, +}; -- cgit v1.2.3