adding the code documentation guide lines
[mplayer/glamo.git] / libmpcodecs / ad.h
blobd15cdb5b9675b08138ce27eca8a7a7f2940b0656
2 #include "mpc_info.h"
3 typedef mp_codec_info_t ad_info_t;
5 /* interface of video decoder drivers */
6 typedef struct ad_functions_s
8 ad_info_t *info;
9 int (*preinit)(sh_audio_t *sh);
10 int (*init)(sh_audio_t *sh);
11 void (*uninit)(sh_audio_t *sh);
12 int (*control)(sh_audio_t *sh,int cmd,void* arg, ...);
13 int (*decode_audio)(sh_audio_t *sh,unsigned char* buffer,int minlen,int maxlen);
14 } ad_functions_t;
16 // NULL terminated array of all drivers
17 extern ad_functions_t* mpcodecs_ad_drivers[];
19 // fallback if ADCTRL_RESYNC not implemented: sh_audio->a_in_buffer_len=0;
20 #define ADCTRL_RESYNC_STREAM 1 /* resync, called after seeking! */
22 // fallback if ADCTRL_SKIP not implemented: ds_fill_buffer(sh_audio->ds);
23 #define ADCTRL_SKIP_FRAME 2 /* skip block/frame, called while seeking! */
25 // fallback if ADCTRL_QUERY_FORMAT not implemented: sh_audio->sample_format
26 #define ADCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
28 // fallback: use hw mixer in libao
29 #define ADCTRL_SET_VOLUME 4 /* set volume (used for mp3lib and liba52) */