mirror of https://github.com/mpv-player/mpv
-afm/-vfm migration from ID (int) to NAME (string) - simplifies code and makes dlopen()'ing possible
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7181 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7af2d892c2
commit
1b667f61ba
|
@ -104,8 +104,10 @@
|
|||
{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
||||
|
||||
// select audio/video codec (by name) or codec family (by number):
|
||||
{"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 22, NULL}, // keep ranges in sync
|
||||
{"vfm", &video_family, CONF_TYPE_INT, CONF_MIN, 0, 29, NULL}, // with codec-cfg.c
|
||||
// {"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 22, NULL}, // keep ranges in sync
|
||||
// {"vfm", &video_family, CONF_TYPE_INT, CONF_MIN, 0, 29, NULL}, // with codec-cfg.c
|
||||
{"afm", &audio_fm, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
{"vfm", &video_fm, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
{"ac", &audio_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
{"vc", &video_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
|
||||
|
|
20
codec-cfg.c
20
codec-cfg.c
|
@ -210,6 +210,7 @@ err_out_parse_error:
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static short get_driver(char *s,int audioflag)
|
||||
{
|
||||
static char *audiodrv[] = {
|
||||
|
@ -278,6 +279,7 @@ static short get_driver(char *s,int audioflag)
|
|||
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int validate_codec(codecs_t *c, int type)
|
||||
{
|
||||
|
@ -581,8 +583,10 @@ int parse_codec_cfg(char *cfgfile)
|
|||
} else if (!strcmp(token[0], "driver")) {
|
||||
if (get_token(1, 1) < 0)
|
||||
goto err_out_parse_error;
|
||||
if ((codec->driver = get_driver(token[0],codec_type))<0)
|
||||
goto err_out_parse_error;
|
||||
if (!(codec->drv = strdup(token[0]))) {
|
||||
mp_msg(MSGT_CODECCFG,MSGL_ERR,"can't strdup -> 'driver': %s\n", strerror(errno));
|
||||
goto err_out;
|
||||
}
|
||||
} else if (!strcmp(token[0], "dll")) {
|
||||
if (get_token(1, 1) < 0)
|
||||
goto err_out_parse_error;
|
||||
|
@ -651,11 +655,6 @@ int parse_codec_cfg(char *cfgfile)
|
|||
goto err_out_parse_error;
|
||||
if (!(codec->cpuflags = get_cpuflags(token[0])))
|
||||
goto err_out_parse_error;
|
||||
} else if (!strcasecmp(token[0], "priority")) {
|
||||
if (get_token(1, 1) < 0)
|
||||
goto err_out_parse_error;
|
||||
//printf("\n\n!!!cfg-parse: priority %s (%d) found!!!\n\n", token[0], atoi(token[0])); // ::atmos
|
||||
codec->priority = atoi(token[0]);
|
||||
} else
|
||||
goto err_out_parse_error;
|
||||
}
|
||||
|
@ -738,7 +737,8 @@ codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,
|
|||
for (/* NOTHING */; i--; c++) {
|
||||
if(start && c<=start) continue;
|
||||
for (j = 0; j < CODECS_MAX_FOURCC; j++) {
|
||||
if (c->fourcc[j]==fourcc || c->driver==0) {
|
||||
// FIXME: do NOT hardwire 'null' name here:
|
||||
if (c->fourcc[j]==fourcc || !strcmp(c->drv,"null")) {
|
||||
if (fourccmap)
|
||||
*fourccmap = c->fourccmap[j];
|
||||
return c;
|
||||
|
@ -787,9 +787,9 @@ void list_codecs(int audioflag){
|
|||
case CODECS_STATUS_UNTESTED: s="untested";break;
|
||||
}
|
||||
if(c->dll)
|
||||
mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s%2d %s %s [%s]\n",c->name,c->driver,s,c->info,c->dll);
|
||||
mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s %-6s %s %s [%s]\n",c->name,c->drv,s,c->info,c->dll);
|
||||
else
|
||||
mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s%2d %s %s\n",c->name,c->driver,s,c->info);
|
||||
mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s %-6s %s %s\n",c->name,c->drv,s,c->info);
|
||||
|
||||
}
|
||||
|
||||
|
|
57
codec-cfg.h
57
codec-cfg.h
|
@ -26,59 +26,6 @@
|
|||
#define CODECS_STATUS_UNTESTED 2
|
||||
#define CODECS_STATUS__MAX 2
|
||||
|
||||
// Codec family/driver:
|
||||
#define AFM_MPEG 1
|
||||
#define AFM_PCM 2
|
||||
#define AFM_AC3 3
|
||||
#define AFM_ACM 4
|
||||
#define AFM_ALAW 5
|
||||
#define AFM_GSM 6
|
||||
#define AFM_DSHOW 7
|
||||
#define AFM_DVDPCM 8
|
||||
#define AFM_HWAC3 9
|
||||
#define AFM_VORBIS 10
|
||||
#define AFM_FFMPEG 11
|
||||
#define AFM_MAD 12
|
||||
#define AFM_MSADPCM 13
|
||||
#define AFM_A52 14
|
||||
#define AFM_G72X 15
|
||||
#define AFM_IMAADPCM 16
|
||||
#define AFM_DK4ADPCM 17
|
||||
#define AFM_DK3ADPCM 18
|
||||
#define AFM_ROQAUDIO 19
|
||||
#define AFM_AAC 20
|
||||
#define AFM_REAL 21
|
||||
#define AFM_LIBDV 22
|
||||
|
||||
#define VFM_MPEG 1
|
||||
#define VFM_VFW 2
|
||||
#define VFM_ODIVX 3
|
||||
#define VFM_DSHOW 4
|
||||
#define VFM_FFMPEG 5
|
||||
#define VFM_VFWEX 6
|
||||
#define VFM_DIVX4 7
|
||||
#define VFM_RAW 8
|
||||
#define VFM_MSRLE 9
|
||||
#define VFM_XANIM 10
|
||||
#define VFM_MSVIDC 11
|
||||
#define VFM_FLI 12
|
||||
#define VFM_CINEPAK 13
|
||||
#define VFM_QTRLE 14
|
||||
#define VFM_NUV 15
|
||||
#define VFM_CYUV 16
|
||||
#define VFM_QTSMC 17
|
||||
#define VFM_DUCKTM1 18
|
||||
#define VFM_ROQVIDEO 19
|
||||
#define VFM_QTRPZA 20
|
||||
#define VFM_MPNG 21
|
||||
#define VFM_IJPG 22
|
||||
#define VFM_HUFFYUV 23
|
||||
#define VFM_ZLIB 24
|
||||
#define VFM_MPEGPES 25
|
||||
#define VFM_REAL 26
|
||||
#define VFM_SVQ1 27
|
||||
#define VFM_XVID 28
|
||||
#define VFM_LIBDV 29
|
||||
|
||||
#ifndef GUID_TYPE
|
||||
#define GUID_TYPE
|
||||
|
@ -102,12 +49,12 @@ typedef struct codecs_st {
|
|||
char *info;
|
||||
char *comment;
|
||||
char *dll;
|
||||
char* drv;
|
||||
GUID guid;
|
||||
short driver;
|
||||
// short driver;
|
||||
short flags;
|
||||
short status;
|
||||
short cpuflags;
|
||||
short priority;
|
||||
} codecs_t;
|
||||
|
||||
int parse_codec_cfg(char *cfgfile);
|
||||
|
|
12
help_mp-en.h
12
help_mp-en.h
|
@ -85,12 +85,12 @@ static char help_text[]=
|
|||
#define MSGTR_CoreDumped "core dumped :)\n"
|
||||
#define MSGTR_FPSnotspecified "FPS not specified (or invalid) in the header! Use the -fps option!\n"
|
||||
#define MSGTR_NoVideoStream "Sorry, no video stream... it's unplayable yet\n"
|
||||
#define MSGTR_TryForceAudioFmt "Trying to force audio codec driver family %d ...\n"
|
||||
#define MSGTR_TryForceAudioFmtStr "Trying to force audio codec driver family %s ...\n"
|
||||
#define MSGTR_CantFindAfmtFallback "Can't find audio codec for forced driver family, fallback to other drivers.\n"
|
||||
#define MSGTR_CantFindAudioCodec "Can't find codec for audio format 0x%X !\n"
|
||||
#define MSGTR_TryUpgradeCodecsConfOrRTFM "*** Try to upgrade %s from etc/codecs.conf\n*** If it's still not OK, then read DOCS/codecs.html!\n"
|
||||
#define MSGTR_CouldntInitAudioCodec "Couldn't initialize audio codec! -> nosound\n"
|
||||
#define MSGTR_TryForceVideoFmt "Trying to force video codec driver family %d ...\n"
|
||||
#define MSGTR_TryForceVideoFmtStr "Trying to force video codec driver family %s ...\n"
|
||||
#define MSGTR_CantFindVfmtFallback "Can't find video codec for forced driver family, fallback to other drivers.\n"
|
||||
#define MSGTR_CantFindVideoCodec "Can't find codec matching selected -vo and video format 0x%X !\n"
|
||||
#define MSGTR_VOincompCodec "Sorry, selected video_out device is incompatible with this codec.\n"
|
||||
|
@ -286,12 +286,12 @@ static char help_text[]=
|
|||
#define MSGTR_UsingExternalPP "[PP] Using external postprocessing filter, max q = %d\n"
|
||||
#define MSGTR_UsingCodecPP "[PP] Using codec's postprocessing, max q = %d\n"
|
||||
#define MSGTR_VideoAttributeNotSupportedByVO_VD "Video attribute '%s' isn't supported by selected vo & vd! \n"
|
||||
#define MSGTR_VideoCodecFamilyNotAvailable "Requested video codec family [%s] (vfm=%d) not available (enable it at compile time!)\n"
|
||||
#define MSGTR_AudioCodecFamilyNotAvailable "Requested audio codec family [%s] (afm=%d) not available (enable it at compile time!)\n"
|
||||
#define MSGTR_VideoCodecFamilyNotAvailableStr "Requested video codec family [%s] (vfm=%s) not available (enable it at compile time!)\n"
|
||||
#define MSGTR_AudioCodecFamilyNotAvailableStr "Requested audio codec family [%s] (afm=%s) not available (enable it at compile time!)\n"
|
||||
#define MSGTR_OpeningVideoDecoder "Opening video decoder: [%s] %s\n"
|
||||
#define MSGTR_OpeningAudioDecoder "Opening audio decoder: [%s] %s\n"
|
||||
#define MSGTR_UninitVideo "uninit video: %d \n"
|
||||
#define MSGTR_UninitAudio "uninit audio: %d \n"
|
||||
#define MSGTR_UninitVideoStr "uninit video: %s \n"
|
||||
#define MSGTR_UninitAudioStr "uninit audio: %s \n"
|
||||
#define MSGTR_VDecoderInitFailed "VDecoder init failed :(\n"
|
||||
#define MSGTR_ADecoderInitFailed "ADecoder init failed :(\n"
|
||||
#define MSGTR_ADecoderPreinitFailed "ADecoder preinit failed :(\n"
|
||||
|
|
|
@ -14,7 +14,6 @@ static ad_info_t info =
|
|||
{
|
||||
"Win32 ACM audio decoder",
|
||||
"acm",
|
||||
AFM_ACM,
|
||||
"Nick Kurshev",
|
||||
"avifile.sf.net",
|
||||
""
|
||||
|
|
|
@ -9,7 +9,6 @@ static ad_info_t info =
|
|||
{
|
||||
"aLaw/uLaw audio decoder",
|
||||
"alaw",
|
||||
AFM_ALAW,
|
||||
"Nick Kurshev",
|
||||
"A'rpi",
|
||||
""
|
||||
|
|
|
@ -20,7 +20,6 @@ static ad_info_t info =
|
|||
{
|
||||
"Duck DK3 ADPCM decoder",
|
||||
"dk3adpcm",
|
||||
AFM_DK3ADPCM,
|
||||
"Nick Kurshev",
|
||||
"Mike Melanson",
|
||||
"This format number was used by Duck Corp. but not officially registered with Microsoft"
|
||||
|
|
|
@ -14,7 +14,6 @@ static ad_info_t info =
|
|||
{
|
||||
"Win32/DirectShow decoders",
|
||||
"dshow",
|
||||
AFM_DSHOW,
|
||||
"Nick Kurshev",
|
||||
"avifile.sf.net",
|
||||
""
|
||||
|
|
|
@ -9,7 +9,6 @@ static ad_info_t info =
|
|||
{
|
||||
"Uncompressed DVD PCM audio decoder",
|
||||
"dvdpcm",
|
||||
AFM_DVDPCM,
|
||||
"Nick Kurshev",
|
||||
"A'rpi",
|
||||
""
|
||||
|
|
|
@ -17,7 +17,6 @@ static ad_info_t info =
|
|||
{
|
||||
"AAC (MPEG2/4 Advanced Audio Coding)",
|
||||
"faad",
|
||||
AFM_AAC,
|
||||
"Felix Buenemann",
|
||||
"faad2",
|
||||
"Under development!"
|
||||
|
|
|
@ -16,7 +16,6 @@ static ad_info_t info =
|
|||
{
|
||||
"FFmpeg audio decoders",
|
||||
"ffmpeg",
|
||||
AFM_FFMPEG,
|
||||
"Nick Kurshev",
|
||||
"ffmpeg.sf.net",
|
||||
""
|
||||
|
|
|
@ -20,7 +20,6 @@ static ad_info_t info =
|
|||
{
|
||||
"AC3 through SPDIF",
|
||||
"hwac3",
|
||||
AFM_HWAC3,
|
||||
"Nick Kurshev",
|
||||
"???",
|
||||
""
|
||||
|
|
|
@ -71,7 +71,6 @@ static ad_info_t info =
|
|||
{
|
||||
"IMA ADPCM audio decoder",
|
||||
"imaadpcm",
|
||||
AFM_IMAADPCM,
|
||||
"Nick Kurshev",
|
||||
"Mike Melanson",
|
||||
""
|
||||
|
|
|
@ -23,7 +23,6 @@ static ad_info_t info =
|
|||
{
|
||||
"AC3-liba52",
|
||||
"liba52",
|
||||
AFM_A52,
|
||||
"Nick Kurshev",
|
||||
"Michel LESPINASSE",
|
||||
""
|
||||
|
|
|
@ -24,7 +24,6 @@ static ad_info_t info =
|
|||
{
|
||||
"Raw DV Audio Decoder",
|
||||
"libdv",
|
||||
AFM_LIBDV,
|
||||
"Alexander Neundorf <neundorf@kde.org>",
|
||||
"http://libdv.sf.net",
|
||||
""
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
static ad_info_t info = {
|
||||
"libmad mpeg audio decoder",
|
||||
"libmad",
|
||||
AFM_MAD,
|
||||
"A'rpi",
|
||||
"libmad...",
|
||||
"based on Xine's libmad/xine_decoder.c"
|
||||
|
|
|
@ -12,7 +12,6 @@ static ad_info_t info =
|
|||
{
|
||||
"Ogg/Vorbis audio decoder",
|
||||
"libvorbis",
|
||||
AFM_VORBIS,
|
||||
"Felix Buenemann, A'rpi",
|
||||
"libvorbis",
|
||||
"buggy"
|
||||
|
|
|
@ -9,7 +9,6 @@ static ad_info_t info =
|
|||
{
|
||||
"MPEG layer-2, layer-3",
|
||||
"mp3lib",
|
||||
AFM_MPEG,
|
||||
"Nick Kurshev",
|
||||
"mpg123",
|
||||
"Optimized to MMX/SSE/3Dnow!"
|
||||
|
|
|
@ -19,7 +19,6 @@ static ad_info_t info =
|
|||
{
|
||||
"MS ADPCM audio decoder",
|
||||
"msadpcm",
|
||||
AFM_MSADPCM,
|
||||
"Nick Kurshev",
|
||||
"Mike Melanson",
|
||||
""
|
||||
|
|
|
@ -9,7 +9,6 @@ static ad_info_t info =
|
|||
{
|
||||
"native MSGSM audio decoder",
|
||||
"msgsm",
|
||||
AFM_GSM,
|
||||
"A'rpi",
|
||||
"XAnim",
|
||||
""
|
||||
|
|
|
@ -9,7 +9,6 @@ static ad_info_t info =
|
|||
{
|
||||
"Uncompressed PCM audio decoder",
|
||||
"pcm",
|
||||
AFM_PCM,
|
||||
"Nick Kurshev",
|
||||
"A'rpi",
|
||||
""
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
static ad_info_t info = {
|
||||
"RealAudio decoder",
|
||||
"realaud",
|
||||
AFM_REAL,
|
||||
"A'rpi",
|
||||
"Florian Schneider",
|
||||
"binary real audio codecs"
|
||||
|
|
|
@ -10,7 +10,6 @@ static ad_info_t info =
|
|||
{
|
||||
"Id RoQ File Audio Decoder",
|
||||
"roqaudio",
|
||||
AFM_ROQAUDIO,
|
||||
"Nick Kurshev",
|
||||
"Mike Melanson"
|
||||
"RoQA is an internal MPlayer FOURCC"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
static ad_info_t info = {
|
||||
"Sample audio decoder", // name of the driver
|
||||
"sample", // driver name. should be the same as filename without ad_
|
||||
AFM_SAMPLE, // replace with registered AFM number
|
||||
"A'rpi", // writer/maintainer of _this_ file
|
||||
"", // writer/maintainer/site of the _codec_
|
||||
"" // comments
|
||||
|
|
|
@ -30,12 +30,13 @@ int init_audio(sh_audio_t *sh_audio)
|
|||
{
|
||||
unsigned i;
|
||||
for (i=0; mpcodecs_ad_drivers[i] != NULL; i++)
|
||||
if(mpcodecs_ad_drivers[i]->info->id==sh_audio->codec->driver){
|
||||
// if(mpcodecs_ad_drivers[i]->info->id==sh_audio->codec->driver){
|
||||
if(!strcmp(mpcodecs_ad_drivers[i]->info->short_name,sh_audio->codec->drv)){
|
||||
mpadec=mpcodecs_ad_drivers[i]; break;
|
||||
}
|
||||
if(!mpadec){
|
||||
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_AudioCodecFamilyNotAvailable,
|
||||
sh_audio->codec->name, sh_audio->codec->driver);
|
||||
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_AudioCodecFamilyNotAvailableStr,
|
||||
sh_audio->codec->name, sh_audio->codec->drv);
|
||||
return 0; // no such driver
|
||||
}
|
||||
|
||||
|
@ -119,7 +120,7 @@ void uninit_audio(sh_audio_t *sh_audio)
|
|||
if(sh_audio->a_in_buffer) free(sh_audio->a_in_buffer);
|
||||
sh_audio->a_in_buffer=NULL;
|
||||
if(!sh_audio->inited) return;
|
||||
mp_msg(MSGT_DECAUDIO,MSGL_V,MSGTR_UninitAudio,sh_audio->codec->driver);
|
||||
mp_msg(MSGT_DECAUDIO,MSGL_V,MSGTR_UninitAudioStr,sh_audio->codec->drv);
|
||||
mpadec->uninit(sh_audio);
|
||||
sh_audio->inited=0;
|
||||
}
|
||||
|
|
|
@ -134,13 +134,13 @@ int set_rectangle(sh_video_t *sh_video,int param,int value)
|
|||
|
||||
void uninit_video(sh_video_t *sh_video){
|
||||
if(!sh_video->inited) return;
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_V,MSGTR_UninitVideo,sh_video->codec->driver);
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_V,MSGTR_UninitVideoStr,sh_video->codec->drv);
|
||||
mpvdec->uninit(sh_video);
|
||||
vf_uninit_filter_chain(sh_video->vfilter);
|
||||
sh_video->inited=0;
|
||||
}
|
||||
|
||||
int init_video(sh_video_t *sh_video,char* codecname,int vfm,int status){
|
||||
int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){
|
||||
unsigned int orig_fourcc=sh_video->bih?sh_video->bih->biCompression:0;
|
||||
sh_video->codec=NULL;
|
||||
sh_video->vf_inited=0;
|
||||
|
@ -155,16 +155,17 @@ int init_video(sh_video_t *sh_video,char* codecname,int vfm,int status){
|
|||
// ok we found one codec
|
||||
if(sh_video->codec->flags&CODECS_FLAG_SELECTED) continue; // already tried & failed
|
||||
if(codecname && strcmp(sh_video->codec->name,codecname)) continue; // -vc
|
||||
if(vfm>=0 && sh_video->codec->driver!=vfm) continue; // vfm doesn't match
|
||||
if(vfm && strcmp(sh_video->codec->drv,vfm)) continue; // vfm doesn't match
|
||||
if(sh_video->codec->status<status) continue; // too unstable
|
||||
sh_video->codec->flags|=CODECS_FLAG_SELECTED; // tagging it
|
||||
// ok, it matches all rules, let's find the driver!
|
||||
for (i=0; mpcodecs_vd_drivers[i] != NULL; i++)
|
||||
if(mpcodecs_vd_drivers[i]->info->id==sh_video->codec->driver) break;
|
||||
// if(mpcodecs_vd_drivers[i]->info->id==sh_video->codec->driver) break;
|
||||
if(!strcmp(mpcodecs_vd_drivers[i]->info->short_name,sh_video->codec->drv)) break;
|
||||
mpvdec=mpcodecs_vd_drivers[i];
|
||||
if(!mpvdec){ // driver not available (==compiled in)
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_VideoCodecFamilyNotAvailable,
|
||||
sh_video->codec->name, sh_video->codec->driver);
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_VideoCodecFamilyNotAvailableStr,
|
||||
sh_video->codec->name, sh_video->codec->drv);
|
||||
continue;
|
||||
}
|
||||
// it's available, let's try to init!
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
extern int video_read_properties(sh_video_t *sh_video);
|
||||
|
||||
//extern int init_video(sh_video_t *sh_video, int *pitches);
|
||||
extern int init_video(sh_video_t *sh_video,char* codecname,int vfm,int status);
|
||||
extern int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status);
|
||||
extern void uninit_video(sh_video_t *sh_video);
|
||||
|
||||
extern int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame);
|
||||
|
|
|
@ -7,8 +7,6 @@ typedef struct mp_codec_info_s
|
|||
const char *name;
|
||||
/* short name (same as driver name in codecs.conf) ("dshow") */
|
||||
const char *short_name;
|
||||
/* codec family: -vfm id */
|
||||
const int id;
|
||||
/* interface author/maintainer */
|
||||
const char *maintainer;
|
||||
/* codec author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
|
||||
|
|
|
@ -50,7 +50,7 @@ extern vd_functions_t mpcodecs_vd_libmpeg2;
|
|||
extern vd_functions_t mpcodecs_vd_huffyuv;
|
||||
extern vd_functions_t mpcodecs_vd_zlib;
|
||||
extern vd_functions_t mpcodecs_vd_mpegpes;
|
||||
extern vd_functions_t mpcodecs_vd_real;
|
||||
extern vd_functions_t mpcodecs_vd_realvid;
|
||||
extern vd_functions_t mpcodecs_vd_svq1;
|
||||
extern vd_functions_t mpcodecs_vd_xvid;
|
||||
extern vd_functions_t mpcodecs_vd_libdv;
|
||||
|
@ -100,7 +100,7 @@ vd_functions_t* mpcodecs_vd_drivers[] = {
|
|||
#endif
|
||||
&mpcodecs_vd_mpegpes,
|
||||
#ifdef USE_REALCODECS
|
||||
&mpcodecs_vd_real,
|
||||
&mpcodecs_vd_realvid,
|
||||
#endif
|
||||
&mpcodecs_vd_svq1,
|
||||
#ifdef HAVE_XVID
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Cinepak Video decoder",
|
||||
"cinepak",
|
||||
VFM_CINEPAK,
|
||||
"A'rpi",
|
||||
"Dr. Tim Ferguson, http://www.csse.monash.edu.au/~timf/videocodec.html",
|
||||
"native codec"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Creative YUV decoder",
|
||||
"cyuv",
|
||||
VFM_CYUV,
|
||||
"A'rpi",
|
||||
"Dr. Tim Ferguson",
|
||||
"native codec"
|
||||
|
|
|
@ -19,7 +19,6 @@ static vd_info_t info = {
|
|||
"DivX4Linux lib (divx4 mode)",
|
||||
#endif
|
||||
"divx4",
|
||||
VFM_DIVX4,
|
||||
"A'rpi",
|
||||
"http://www.divx.com",
|
||||
"native codecs"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
static vd_info_t info = {
|
||||
"DirectShow video codecs",
|
||||
"dshow",
|
||||
VFM_DSHOW,
|
||||
"A'rpi",
|
||||
"based on http://avifile.sf.net",
|
||||
"win32 codecs"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
static vd_info_t info = {
|
||||
"FFmpeg's libavcodec codec family",
|
||||
"ffmpeg",
|
||||
VFM_FFMPEG,
|
||||
"A'rpi",
|
||||
"http://ffmpeg.sf.net",
|
||||
"native codecs"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Autodesk FLI/FLC Animation decoder",
|
||||
"fli",
|
||||
VFM_FLI,
|
||||
"A'rpi",
|
||||
"Mike Melanson",
|
||||
"native codec"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
static vd_info_t info = {
|
||||
"HuffYUV Video decoder",
|
||||
"huffyuv",
|
||||
VFM_HUFFYUV,
|
||||
"Roberto Togni",
|
||||
"Roberto Togni",
|
||||
"native codec, original win32 by Ben Rudiak-Gould http://www.math.berkeley.edu/~benrg/huffyuv.html"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
static vd_info_t info = {
|
||||
"JPEG Images decoder",
|
||||
"ijpg",
|
||||
VFM_IJPG,
|
||||
"Pontscho",
|
||||
"based on vd_mpng.c",
|
||||
"uses Indipended JPEG Group's jpeglib"
|
||||
|
|
|
@ -24,7 +24,6 @@ static vd_info_t info =
|
|||
{
|
||||
"Raw DV Video Decoder",
|
||||
"libdv",
|
||||
VFM_LIBDV,
|
||||
"Alexander Neundorf <neundorf@kde.org>",
|
||||
"http://libdv.sf.net",
|
||||
""
|
||||
|
|
|
@ -10,7 +10,6 @@ static vd_info_t info =
|
|||
{
|
||||
"MPEG 1/2 Video decoder v2.0",
|
||||
"libmpeg2",
|
||||
VFM_MPEG,
|
||||
"A'rpi",
|
||||
"Aaron & Walken",
|
||||
"native"
|
||||
|
|
|
@ -10,7 +10,6 @@ static vd_info_t info =
|
|||
{
|
||||
"MPEG 1/2 Video passthrough",
|
||||
"mpegpes",
|
||||
VFM_MPEGPES,
|
||||
"A'rpi",
|
||||
"A'rpi",
|
||||
"for hw decoders"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
static vd_info_t info = {
|
||||
"PNG Images decoder",
|
||||
"mpng",
|
||||
VFM_MPNG,
|
||||
"A'rpi",
|
||||
".so, based on mpng.c",
|
||||
"uses libpng, 8bpp modes not supported yet"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Microsoft RLE decoder",
|
||||
"msrle",
|
||||
VFM_MSRLE,
|
||||
"Mike Melanson",
|
||||
"Mike Melanson",
|
||||
"native codec"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Microsoft Video 1 / CRAM decoder",
|
||||
"msvidc",
|
||||
VFM_MSVIDC,
|
||||
"A'rpi",
|
||||
"Mike Melanson",
|
||||
"native codec"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"NuppelVideo decoder",
|
||||
"nuv",
|
||||
VFM_NUV,
|
||||
"A'rpi",
|
||||
"Alex & Panagiotis Issaris <takis@lumumba.luc.ac.be>",
|
||||
"native codecs"
|
||||
|
|
|
@ -21,7 +21,6 @@ static vd_info_t info = {
|
|||
"Opendivx 0.48 codec",
|
||||
#endif
|
||||
"odivx",
|
||||
VFM_ODIVX,
|
||||
"A'rpi",
|
||||
#ifdef NEW_DECORE
|
||||
"http://www.divx.com",
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Quicktime Animation (RLE) decoder",
|
||||
"qtrle",
|
||||
VFM_QTRLE,
|
||||
"A'rpi",
|
||||
"Mike Melanson",
|
||||
"native codec"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Quicktime Apple Video",
|
||||
"qtrpza",
|
||||
VFM_QTRPZA,
|
||||
"Roberto Togni",
|
||||
"Roberto Togni",
|
||||
"native codec"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Apple Graphics (SMC) decoder",
|
||||
"qtsmc",
|
||||
VFM_QTSMC,
|
||||
"A'rpi",
|
||||
"Mike Melanson",
|
||||
"native codec"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"RAW Uncompressed Video",
|
||||
"raw",
|
||||
VFM_RAW,
|
||||
"A'rpi",
|
||||
"A'rpi & Alex",
|
||||
"uncompressed"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
static vd_info_t info = {
|
||||
"RealVideo decoder",
|
||||
"realvid",
|
||||
VFM_REAL,
|
||||
"Florian Schneider & A'rpi",
|
||||
"using original closed source codecs for Linux",
|
||||
"binary real video codecs"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"RLE Video decoder",
|
||||
"msrle",
|
||||
VFM_MSRLE,
|
||||
"A'rpi",
|
||||
"XAnim rip...",
|
||||
"native codec"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"Id RoQ File Video decoder",
|
||||
"roqvideo",
|
||||
VFM_ROQVIDEO,
|
||||
"A'rpi",
|
||||
"Mike Melanson",
|
||||
"native codec"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
static vd_info_t info = {
|
||||
"SVQ1 (Sorenson v1) Video decoder",
|
||||
"svq1",
|
||||
VFM_SVQ1,
|
||||
"A'rpi",
|
||||
"XINE team",
|
||||
"native codec"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
static vd_info_t info = {
|
||||
"Win32/VfW video codecs",
|
||||
"vfw",
|
||||
VFM_VFW,
|
||||
"A'rpi",
|
||||
"based on http://avifile.sf.net",
|
||||
"win32 codecs"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
static vd_info_t info = {
|
||||
"Win32/VfWex video codecs",
|
||||
"vfwex",
|
||||
VFM_VFWEX,
|
||||
"A'rpi",
|
||||
"based on http://avifile.sf.net",
|
||||
"win32 codecs"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
static vd_info_t info = {
|
||||
"XAnim codecs",
|
||||
"xanim",
|
||||
VFM_XANIM,
|
||||
"A'rpi & Alex",
|
||||
"Xanim (http://xanim.va.pubnix.com/)",
|
||||
"binary codec plugins"
|
||||
|
|
|
@ -16,7 +16,6 @@ static vd_info_t info =
|
|||
{
|
||||
"xvid decoder",
|
||||
"xvid",
|
||||
VFM_XVID,
|
||||
"Albeu",
|
||||
"Albeu",
|
||||
""
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
static vd_info_t info = {
|
||||
"zlib decoder (avizlib)",
|
||||
"zlib",
|
||||
VFM_ZLIB,
|
||||
"Alex",
|
||||
"based on vd_ijpg.c",
|
||||
"uses zlib, supports only BGR24 (as AVIzlib)"
|
||||
|
|
26
mencoder.c
26
mencoder.c
|
@ -87,8 +87,8 @@ static char* spudec_ifo=NULL;
|
|||
static int has_audio=1;
|
||||
char *audio_codec=NULL; // override audio codec
|
||||
char *video_codec=NULL; // override video codec
|
||||
int audio_family=-1; // override audio codec family
|
||||
int video_family=-1; // override video codec family
|
||||
char* audio_fm=NULL; // override audio codec family
|
||||
char* video_fm=NULL; // override video codec family
|
||||
|
||||
// libvo opts: (defiend at libmpcodecs/vd.c)
|
||||
extern int screen_size_xy;
|
||||
|
@ -488,14 +488,14 @@ sh_video=d_video->sh;
|
|||
if(sh_audio && (out_audio_codec || seek_to_sec || !sh_audio->wf)){
|
||||
// Go through the codec.conf and find the best codec...
|
||||
sh_audio->codec=NULL;
|
||||
if(audio_family!=-1) mp_msg(MSGT_MENCODER,MSGL_INFO,MSGTR_TryForceAudioFmt,audio_family);
|
||||
if(audio_fm) mp_msg(MSGT_MENCODER,MSGL_INFO,MSGTR_TryForceAudioFmtStr,audio_fm);
|
||||
while(1){
|
||||
sh_audio->codec=find_codec(sh_audio->format,NULL,sh_audio->codec,1);
|
||||
if(!sh_audio->codec){
|
||||
if(audio_family!=-1) {
|
||||
if(audio_fm) {
|
||||
sh_audio->codec=NULL; /* re-search */
|
||||
mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantFindAfmtFallback);
|
||||
audio_family=-1;
|
||||
audio_fm=NULL;
|
||||
continue;
|
||||
}
|
||||
mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantFindAudioCodec,sh_audio->format);
|
||||
|
@ -504,8 +504,8 @@ if(sh_audio && (out_audio_codec || seek_to_sec || !sh_audio->wf)){
|
|||
break;
|
||||
}
|
||||
if(audio_codec && strcmp(sh_audio->codec->name,audio_codec)) continue;
|
||||
else if(audio_family!=-1 && sh_audio->codec->driver!=audio_family) continue;
|
||||
mp_msg(MSGT_MENCODER,MSGL_INFO,"%s audio codec: [%s] drv:%d (%s)\n",audio_codec?"Forcing":"Detected",sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info);
|
||||
else if(audio_fm && strcmp(sh_audio->codec->drv,audio_fm)) continue;
|
||||
mp_msg(MSGT_MENCODER,MSGL_INFO,"%s audio codec: [%s] afm:%s (%s)\n",audio_codec?"Forcing":"Detected",sh_audio->codec->name,sh_audio->codec->drv,sh_audio->codec->info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -670,11 +670,11 @@ if(video_codec){
|
|||
} else {
|
||||
int status;
|
||||
// try in stability order: UNTESTED, WORKING, BUGGY, BROKEN
|
||||
if(video_family>=0) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_TryForceVideoFmt,video_family);
|
||||
if(video_fm) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_TryForceVideoFmtStr,video_fm);
|
||||
for(status=CODECS_STATUS__MAX;status>=CODECS_STATUS__MIN;--status){
|
||||
if(video_family>=0) // try first the preferred codec family:
|
||||
if(init_video(sh_video,NULL,video_family,status)) break;
|
||||
if(init_video(sh_video,NULL,-1,status)) break;
|
||||
if(video_fm) // try first the preferred codec family:
|
||||
if(init_video(sh_video,NULL,video_fm,status)) break;
|
||||
if(init_video(sh_video,NULL,NULL,status)) break;
|
||||
}
|
||||
}
|
||||
if(!sh_video->inited){
|
||||
|
@ -682,8 +682,8 @@ if(!sh_video->inited){
|
|||
mp_msg(MSGT_CPLAYER,MSGL_HINT, MSGTR_TryUpgradeCodecsConfOrRTFM,get_path("codecs.conf"));
|
||||
mencoder_exit(1,NULL);
|
||||
}
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s video codec: [%s] drv:%d (%s)\n",
|
||||
video_codec?mp_gettext("Forcing"):mp_gettext("Detected"),sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info);
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s video codec: [%s] vfm:%s (%s)\n",
|
||||
video_codec?mp_gettext("Forcing"):mp_gettext("Detected"),sh_video->codec->name,sh_video->codec->drv,sh_video->codec->info);
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
|
||||
|
||||
}
|
||||
|
|
30
mplayer.c
30
mplayer.c
|
@ -176,8 +176,8 @@ int has_audio=1;
|
|||
int has_video=1;
|
||||
char *audio_codec=NULL; // override audio codec
|
||||
char *video_codec=NULL; // override video codec
|
||||
int audio_family=-1; // override audio codec family
|
||||
int video_family=-1; // override video codec family
|
||||
char *audio_fm=NULL; // override audio codec family
|
||||
char *video_fm=NULL; // override video codec family
|
||||
|
||||
// IMHO this stuff is no longer of use, or is there a special
|
||||
// reason why dshow should be completely disabled? - atmos ::
|
||||
|
@ -1201,15 +1201,15 @@ current_module="find_audio_codec";
|
|||
if(sh_audio){
|
||||
// Go through the codec.conf and find the best codec...
|
||||
sh_audio->codec=NULL;
|
||||
if(audio_family!=-1) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_TryForceAudioFmt,audio_family);
|
||||
if(audio_fm) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_TryForceAudioFmtStr,audio_fm);
|
||||
while(1){
|
||||
sh_audio->codec=find_codec(sh_audio->format,NULL,sh_audio->codec,1);
|
||||
if(!sh_audio->codec){
|
||||
if(audio_family!=-1) {
|
||||
if(audio_fm) {
|
||||
sh_audio->codec=NULL; /* re-search */
|
||||
mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantFindAfmtFallback);
|
||||
audio_family=-1;
|
||||
continue;
|
||||
audio_fm=NULL;
|
||||
continue;
|
||||
}
|
||||
mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantFindAudioCodec,sh_audio->format);
|
||||
mp_msg(MSGT_CPLAYER,MSGL_HINT, MSGTR_TryUpgradeCodecsConfOrRTFM,get_path("codecs.conf"));
|
||||
|
@ -1217,9 +1217,9 @@ if(sh_audio){
|
|||
break;
|
||||
}
|
||||
if(audio_codec && strcmp(sh_audio->codec->name,audio_codec)) continue;
|
||||
else if(audio_family!=-1 && sh_audio->codec->driver!=audio_family) continue;
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s audio codec: [%s] afm:%d (%s)\n",
|
||||
audio_codec?mp_gettext("Forcing"):mp_gettext("Detected"),sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info);
|
||||
else if(audio_fm && strcmp(sh_audio->codec->drv,audio_fm)) continue;
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s audio codec: [%s] afm:%s (%s)\n",
|
||||
audio_codec?mp_gettext("Forcing"):mp_gettext("Detected"),sh_audio->codec->name,sh_audio->codec->drv,sh_audio->codec->info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1275,11 +1275,11 @@ if(video_codec){
|
|||
} else {
|
||||
int status;
|
||||
// try in stability order: UNTESTED, WORKING, BUGGY, BROKEN
|
||||
if(video_family>=0) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_TryForceVideoFmt,video_family);
|
||||
if(video_fm) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_TryForceVideoFmtStr,video_fm);
|
||||
for(status=CODECS_STATUS__MAX;status>=CODECS_STATUS__MIN;--status){
|
||||
if(video_family>=0) // try first the preferred codec family:
|
||||
if(init_video(sh_video,NULL,video_family,status)) break;
|
||||
if(init_video(sh_video,NULL,-1,status)) break;
|
||||
if(video_fm) // try first the preferred codec family:
|
||||
if(init_video(sh_video,NULL,video_fm,status)) break;
|
||||
if(init_video(sh_video,NULL,NULL,status)) break;
|
||||
}
|
||||
}
|
||||
if(!sh_video->inited){
|
||||
|
@ -1291,8 +1291,8 @@ if(!sh_video->inited){
|
|||
goto main; // exit_player(MSGTR_Exit_error);
|
||||
}
|
||||
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s video codec: [%s] vfm:%d (%s)\n",
|
||||
video_codec?mp_gettext("Forcing"):mp_gettext("Detected"),sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info);
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s video codec: [%s] vfm:%s (%s)\n",
|
||||
video_codec?mp_gettext("Forcing"):mp_gettext("Detected"),sh_video->codec->name,sh_video->codec->drv,sh_video->codec->info);
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
|
||||
|
||||
if(auto_quality>0){
|
||||
|
|
Loading…
Reference in New Issue