annotate libmpcodecs/ad.h @ 34114:113156bc1137

Ensure that filename related config will always be loaded. Currently, filename related config will only be loaded if MPlayer knows the filename when it gets called, which isn't the case if either MPlayer is called in slave mode or the GUI is called without file argument. In either case, the file to be played is known only later. If filename related config hasn't yet been read, do it after leaving the idle mode loop.
author ib
date Sat, 15 Oct 2011 11:07:29 +0000
parents 456417526407
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30421
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
1 /*
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
2 * This file is part of MPlayer.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
3 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
5 * it under the terms of the GNU General Public License as published by
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
7 * (at your option) any later version.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
8 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
12 * GNU General Public License for more details.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
13 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
14 * You should have received a copy of the GNU General Public License along
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
17 */
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26147
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
19 #ifndef MPLAYER_AD_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
20 #define MPLAYER_AD_H
5324
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
21
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
22 #include "mpc_info.h"
26147
41652035483c Add necessary header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
23 #include "libmpdemux/stheader.h"
41652035483c Add necessary header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
24
31221
456417526407 Forgotten part of previous commit (extern declaration of drc_level).
reimar
parents: 31174
diff changeset
25 extern float drc_level;
456417526407 Forgotten part of previous commit (extern declaration of drc_level).
reimar
parents: 31174
diff changeset
26
5324
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
27 typedef mp_codec_info_t ad_info_t;
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
28
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
29 /* interface of video decoder drivers */
31174
39f5b7f71ddd cosmetics: Drop pointless _s suffix from 'struct ad_functions'.
diego
parents: 30663
diff changeset
30 typedef struct ad_functions
5324
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
31 {
30663
94c7f4056b2b Mark member info of struct ad_functions_s as const.
diego
parents: 30634
diff changeset
32 const ad_info_t *info;
5339
e72d8e3955ea changed to be more-or-less compatible with Nick's stuff
arpi
parents: 5324
diff changeset
33 int (*preinit)(sh_audio_t *sh);
5324
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
34 int (*init)(sh_audio_t *sh);
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
35 void (*uninit)(sh_audio_t *sh);
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
36 int (*control)(sh_audio_t *sh,int cmd,void* arg, ...);
5339
e72d8e3955ea changed to be more-or-less compatible with Nick's stuff
arpi
parents: 5324
diff changeset
37 int (*decode_audio)(sh_audio_t *sh,unsigned char* buffer,int minlen,int maxlen);
5324
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
38 } ad_functions_t;
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
39
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
40 // NULL terminated array of all drivers
30634
9c043456a260 Mark ad_functions_t structures and mpcodecs_ad_drivers array as const.
diego
parents: 30421
diff changeset
41 extern const ad_functions_t * const mpcodecs_ad_drivers[];
5324
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
42
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
43 // fallback if ADCTRL_RESYNC not implemented: sh_audio->a_in_buffer_len=0;
5339
e72d8e3955ea changed to be more-or-less compatible with Nick's stuff
arpi
parents: 5324
diff changeset
44 #define ADCTRL_RESYNC_STREAM 1 /* resync, called after seeking! */
5324
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
45
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
46 // fallback if ADCTRL_SKIP not implemented: ds_fill_buffer(sh_audio->ds);
5339
e72d8e3955ea changed to be more-or-less compatible with Nick's stuff
arpi
parents: 5324
diff changeset
47 #define ADCTRL_SKIP_FRAME 2 /* skip block/frame, called while seeking! */
5324
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
48
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
49 // fallback if ADCTRL_QUERY_FORMAT not implemented: sh_audio->sample_format
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
50 #define ADCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
51
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
52 // fallback: use hw mixer in libao
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
53 #define ADCTRL_SET_VOLUME 4 /* set volume (used for mp3lib and liba52) */
f9845598022f proposal for audio decoders
arpi
parents:
diff changeset
54
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
55 #endif /* MPLAYER_AD_H */