mp_msg: print messages to stdout, statusline to stderr
[mplayer.git] / libmpcodecs / ad.h
blob5396085d04543c2fea97fb3035c9f2f2deed6031
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_AD_H
20 #define MPLAYER_AD_H
22 #include "mpc_info.h"
23 #include "libmpdemux/stheader.h"
25 typedef struct mp_codec_info ad_info_t;
27 /* interface of video decoder drivers */
28 typedef struct ad_functions
30 const ad_info_t *info;
31 int (*preinit)(sh_audio_t *sh);
32 int (*init)(sh_audio_t *sh);
33 void (*uninit)(sh_audio_t *sh);
34 int (*control)(sh_audio_t *sh,int cmd,void* arg, ...);
35 int (*decode_audio)(sh_audio_t *sh, unsigned char *buffer, int minlen,
36 int maxlen);
37 } ad_functions_t;
39 // NULL terminated array of all drivers
40 extern const ad_functions_t * const mpcodecs_ad_drivers[];
42 // fallback if ADCTRL_RESYNC not implemented: sh_audio->a_in_buffer_len=0;
43 #define ADCTRL_RESYNC_STREAM 1 // resync, called after seeking
45 // fallback if ADCTRL_SKIP not implemented: ds_fill_buffer(sh_audio->ds);
46 #define ADCTRL_SKIP_FRAME 2 // skip block/frame, called while seeking
48 // fallback if ADCTRL_QUERY_FORMAT not implemented: sh_audio->sample_format
49 #define ADCTRL_QUERY_FORMAT 3 // test for availabilty of a format
51 // fallback: use hw mixer in libao
52 #define ADCTRL_SET_VOLUME 4 // not used at the moment
54 #endif /* MPLAYER_AD_H */