5 #include "libmpdemux/stheader.h"
7 typedef mp_codec_info_t ad_info_t
;
9 /* interface of video decoder drivers */
10 typedef struct ad_functions
12 const ad_info_t
*info
;
13 int (*preinit
)(sh_audio_t
*sh
);
14 int (*init
)(sh_audio_t
*sh
);
15 void (*uninit
)(sh_audio_t
*sh
);
16 int (*control
)(sh_audio_t
*sh
,int cmd
,void* arg
, ...);
17 int (*decode_audio
)(sh_audio_t
*sh
,unsigned char* buffer
,int minlen
,int maxlen
);
20 // NULL terminated array of all drivers
21 extern const ad_functions_t
* const mpcodecs_ad_drivers
[];
23 // fallback if ADCTRL_RESYNC not implemented: sh_audio->a_in_buffer_len=0;
24 #define ADCTRL_RESYNC_STREAM 1 /* resync, called after seeking! */
26 // fallback if ADCTRL_SKIP not implemented: ds_fill_buffer(sh_audio->ds);
27 #define ADCTRL_SKIP_FRAME 2 /* skip block/frame, called while seeking! */
29 // fallback if ADCTRL_QUERY_FORMAT not implemented: sh_audio->sample_format
30 #define ADCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
32 // fallback: use hw mixer in libao
33 #define ADCTRL_SET_VOLUME 4 /* set volume (used for mp3lib and liba52) */
35 #endif /* MPLAYER_AD_H */