summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-23 21:22:17 +0100
committerwm4 <wm4@nowhere>2013-11-23 21:22:17 +0100
commit0f5ec05d8f4ae02262dc79a895bce3b465b376f2 (patch)
treeba5fc3f640eeefa44a28695f8cd3f63ba2eec2c9 /audio/decode/ad.h
parent705a7310e6c823a72c961720f8ae416962f1398a (diff)
downloadmpv-0f5ec05d8f4ae02262dc79a895bce3b465b376f2.tar.bz2
mpv-0f5ec05d8f4ae02262dc79a895bce3b465b376f2.tar.xz
audio: move decoder context from sh_audio into new struct
Move all state that basically changes during decoding or is needed in order to manage decoding itself into a new struct (dec_audio). sh_audio (defined in stheader.h) is supposed to be the audio stream header. This should reflect the file headers for the stream. Putting the decoder context there is strange design, to say the least.
Diffstat (limited to 'audio/decode/ad.h')
-rw-r--r--audio/decode/ad.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/audio/decode/ad.h b/audio/decode/ad.h
index 6c76e8dfd0..ed9f4fff75 100644
--- a/audio/decode/ad.h
+++ b/audio/decode/ad.h
@@ -25,6 +25,7 @@
#include "audio/format.h"
#include "audio/audio.h"
+#include "dec_audio.h"
struct mp_decoder_list;
@@ -32,11 +33,11 @@ struct mp_decoder_list;
struct ad_functions {
const char *name;
void (*add_decoders)(struct mp_decoder_list *list);
- int (*preinit)(sh_audio_t *sh);
- int (*init)(sh_audio_t *sh, const char *decoder);
- void (*uninit)(sh_audio_t *sh);
- int (*control)(sh_audio_t *sh, int cmd, void *arg);
- int (*decode_audio)(sh_audio_t *sh, struct mp_audio *buffer, int maxlen);
+ int (*preinit)(struct dec_audio *da);
+ 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);
+ int (*decode_audio)(struct dec_audio *da, struct mp_audio *buffer, int maxlen);
};
enum ad_ctrl {