Mercurial > mplayer.hg
annotate libmpcodecs/ad.h @ 28992:947ef23ba798
Test if create_vdp_decoder() might succeed by calling it from config()
with a small value for max_reference_frames.
This does not make automatic recovery by using software decoder possible,
but lets MPlayer fail more graciously on - actually existing - buggy
hardware that does not support certain H264 widths when using
hardware accelerated decoding (784, 864, 944, 1024, 1808, 1888 pixels on
NVIDIA G98) and if the user tries to hardware-decode more samples at
the same time than supported.
Might break playback of H264 Intra-Only samples on hardware with very
little video memory.
author | cehoyos |
---|---|
date | Sat, 21 Mar 2009 20:11:05 +0000 |
parents | 41652035483c |
children | bbb6ebec87a0 |
rev | line source |
---|---|
26029 | 1 #ifndef MPLAYER_AD_H |
2 #define MPLAYER_AD_H | |
5324 | 3 |
4 #include "mpc_info.h" | |
26147
41652035483c
Add necessary header #includes to fix 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
5 #include "libmpdemux/stheader.h" |
41652035483c
Add necessary header #includes to fix 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
6 |
5324 | 7 typedef mp_codec_info_t ad_info_t; |
8 | |
9 /* interface of video decoder drivers */ | |
10 typedef struct ad_functions_s | |
11 { | |
12 ad_info_t *info; | |
5339
e72d8e3955ea
changed to be more-or-less compatible with Nick's stuff
arpi
parents:
5324
diff
changeset
|
13 int (*preinit)(sh_audio_t *sh); |
5324 | 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, ...); | |
5339
e72d8e3955ea
changed to be more-or-less compatible with Nick's stuff
arpi
parents:
5324
diff
changeset
|
17 int (*decode_audio)(sh_audio_t *sh,unsigned char* buffer,int minlen,int maxlen); |
5324 | 18 } ad_functions_t; |
19 | |
20 // NULL terminated array of all drivers | |
21 extern ad_functions_t* mpcodecs_ad_drivers[]; | |
22 | |
23 // 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
|
24 #define ADCTRL_RESYNC_STREAM 1 /* resync, called after seeking! */ |
5324 | 25 |
26 // 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
|
27 #define ADCTRL_SKIP_FRAME 2 /* skip block/frame, called while seeking! */ |
5324 | 28 |
29 // fallback if ADCTRL_QUERY_FORMAT not implemented: sh_audio->sample_format | |
30 #define ADCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */ | |
31 | |
32 // fallback: use hw mixer in libao | |
33 #define ADCTRL_SET_VOLUME 4 /* set volume (used for mp3lib and liba52) */ | |
34 | |
26029 | 35 #endif /* MPLAYER_AD_H */ |