summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-29 06:18:33 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-30 03:10:27 -0800
commit76e7e78ce989aad546310b9808cf7f96f23a281f (patch)
treee4432df6f925d2a1f9e5022373d359b626d9ea09 /audio/decode/ad.h
parent054c02ad64a62dd8393bde0fd73edeaa71048722 (diff)
downloadmpv-76e7e78ce989aad546310b9808cf7f96f23a281f.tar.bz2
mpv-76e7e78ce989aad546310b9808cf7f96f23a281f.tar.xz
audio: move to decoder wrapper
Use the decoder wrapper that was introduced for video. This removes all code duplication the old audio decoder wrapper had with the video code. (The audio wrapper was copy pasted from the video one over a decade ago, and has been kept in sync ever since by the power of copy&paste. Since the original copy&paste was possibly done by someone who did not answer to the LGPL relicensing, this should also remove all doubts about whether any of this code is left, since we now completely remove any code that could possibly have been based on it.) There is some complication with spdif handling, and a minor behavior change (it will restrict the list of codecs to spdif if spdif is to be used), but there should not be any difference in practice.
Diffstat (limited to 'audio/decode/ad.h')
-rw-r--r--audio/decode/ad.h49
1 files changed, 0 insertions, 49 deletions
diff --git a/audio/decode/ad.h b/audio/decode/ad.h
deleted file mode 100644
index a8384c277f..0000000000
--- a/audio/decode/ad.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * This file is part of mpv.
- *
- * mpv is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * mpv is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef MPLAYER_AD_H
-#define MPLAYER_AD_H
-
-#include "common/codecs.h"
-#include "demux/stheader.h"
-#include "demux/demux.h"
-
-#include "audio/format.h"
-#include "audio/aframe.h"
-#include "dec_audio.h"
-
-struct mp_decoder_list;
-
-/* interface of audio decoder drivers */
-struct ad_functions {
- const char *name;
- void (*add_decoders)(struct mp_decoder_list *list);
- int (*init)(struct dec_audio *da, const char *decoder);
- void (*uninit)(struct dec_audio *da);
- int (*control)(struct dec_audio *da, int cmd, void *arg);
- // Return whether or not the packet has been consumed.
- bool (*send_packet)(struct dec_audio *da, struct demux_packet *pkt);
- // Return whether decoding is still going on (false if EOF was reached).
- // Never returns false & *out set, but can return true with !*out.
- bool (*receive_frame)(struct dec_audio *da, struct mp_aframe **out);
-};
-
-enum ad_ctrl {
- ADCTRL_RESET = 1, // flush and reset state, e.g. after seeking
-};
-
-#endif /* MPLAYER_AD_H */