Mercurial > mplayer.hg
changeset 7180:28677d779205
-afm/-vfm migration from ID (int) to NAME (string) - simplifies code and makes dlopen()'ing possible
line wrap: on
line diff
--- a/cfg-common.h Fri Aug 30 21:30:59 2002 +0000 +++ b/cfg-common.h Fri Aug 30 21:44:20 2002 +0000 @@ -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},
--- a/codec-cfg.c Fri Aug 30 21:30:59 2002 +0000 +++ b/codec-cfg.c Fri Aug 30 21:44:20 2002 +0000 @@ -210,6 +210,7 @@ return 0; } +#if 0 static short get_driver(char *s,int audioflag) { static char *audiodrv[] = { @@ -278,6 +279,7 @@ return -1; } +#endif static int validate_codec(codecs_t *c, int type) { @@ -581,8 +583,10 @@ } 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 @@ 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 @@ 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 @@ 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); }
--- a/codec-cfg.h Fri Aug 30 21:30:59 2002 +0000 +++ b/codec-cfg.h Fri Aug 30 21:44:20 2002 +0000 @@ -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 @@ 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);
--- a/help_mp-en.h Fri Aug 30 21:30:59 2002 +0000 +++ b/help_mp-en.h Fri Aug 30 21:44:20 2002 +0000 @@ -85,12 +85,12 @@ #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 @@ #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"
--- a/libmpcodecs/ad_acm.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_acm.c Fri Aug 30 21:44:20 2002 +0000 @@ -14,7 +14,6 @@ { "Win32 ACM audio decoder", "acm", - AFM_ACM, "Nick Kurshev", "avifile.sf.net", ""
--- a/libmpcodecs/ad_alaw.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_alaw.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ { "aLaw/uLaw audio decoder", "alaw", - AFM_ALAW, "Nick Kurshev", "A'rpi", ""
--- a/libmpcodecs/ad_dk3adpcm.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_dk3adpcm.c Fri Aug 30 21:44:20 2002 +0000 @@ -20,7 +20,6 @@ { "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"
--- a/libmpcodecs/ad_dshow.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_dshow.c Fri Aug 30 21:44:20 2002 +0000 @@ -14,7 +14,6 @@ { "Win32/DirectShow decoders", "dshow", - AFM_DSHOW, "Nick Kurshev", "avifile.sf.net", ""
--- a/libmpcodecs/ad_dvdpcm.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_dvdpcm.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ { "Uncompressed DVD PCM audio decoder", "dvdpcm", - AFM_DVDPCM, "Nick Kurshev", "A'rpi", ""
--- a/libmpcodecs/ad_faad.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_faad.c Fri Aug 30 21:44:20 2002 +0000 @@ -17,7 +17,6 @@ { "AAC (MPEG2/4 Advanced Audio Coding)", "faad", - AFM_AAC, "Felix Buenemann", "faad2", "Under development!"
--- a/libmpcodecs/ad_ffmpeg.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Fri Aug 30 21:44:20 2002 +0000 @@ -16,7 +16,6 @@ { "FFmpeg audio decoders", "ffmpeg", - AFM_FFMPEG, "Nick Kurshev", "ffmpeg.sf.net", ""
--- a/libmpcodecs/ad_hwac3.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_hwac3.c Fri Aug 30 21:44:20 2002 +0000 @@ -20,7 +20,6 @@ { "AC3 through SPDIF", "hwac3", - AFM_HWAC3, "Nick Kurshev", "???", ""
--- a/libmpcodecs/ad_imaadpcm.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_imaadpcm.c Fri Aug 30 21:44:20 2002 +0000 @@ -71,7 +71,6 @@ { "IMA ADPCM audio decoder", "imaadpcm", - AFM_IMAADPCM, "Nick Kurshev", "Mike Melanson", ""
--- a/libmpcodecs/ad_liba52.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_liba52.c Fri Aug 30 21:44:20 2002 +0000 @@ -23,7 +23,6 @@ { "AC3-liba52", "liba52", - AFM_A52, "Nick Kurshev", "Michel LESPINASSE", ""
--- a/libmpcodecs/ad_libdv.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_libdv.c Fri Aug 30 21:44:20 2002 +0000 @@ -24,7 +24,6 @@ { "Raw DV Audio Decoder", "libdv", - AFM_LIBDV, "Alexander Neundorf <neundorf@kde.org>", "http://libdv.sf.net", ""
--- a/libmpcodecs/ad_libmad.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_libmad.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/ad_libvorbis.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_libvorbis.c Fri Aug 30 21:44:20 2002 +0000 @@ -12,7 +12,6 @@ { "Ogg/Vorbis audio decoder", "libvorbis", - AFM_VORBIS, "Felix Buenemann, A'rpi", "libvorbis", "buggy"
--- a/libmpcodecs/ad_mp3lib.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_mp3lib.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ { "MPEG layer-2, layer-3", "mp3lib", - AFM_MPEG, "Nick Kurshev", "mpg123", "Optimized to MMX/SSE/3Dnow!"
--- a/libmpcodecs/ad_msadpcm.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_msadpcm.c Fri Aug 30 21:44:20 2002 +0000 @@ -19,7 +19,6 @@ { "MS ADPCM audio decoder", "msadpcm", - AFM_MSADPCM, "Nick Kurshev", "Mike Melanson", ""
--- a/libmpcodecs/ad_msgsm.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_msgsm.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ { "native MSGSM audio decoder", "msgsm", - AFM_GSM, "A'rpi", "XAnim", ""
--- a/libmpcodecs/ad_pcm.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_pcm.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ { "Uncompressed PCM audio decoder", "pcm", - AFM_PCM, "Nick Kurshev", "A'rpi", ""
--- a/libmpcodecs/ad_realaud.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_realaud.c Fri Aug 30 21:44:20 2002 +0000 @@ -15,7 +15,6 @@ static ad_info_t info = { "RealAudio decoder", "realaud", - AFM_REAL, "A'rpi", "Florian Schneider", "binary real audio codecs"
--- a/libmpcodecs/ad_roqaudio.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_roqaudio.c Fri Aug 30 21:44:20 2002 +0000 @@ -10,7 +10,6 @@ { "Id RoQ File Audio Decoder", "roqaudio", - AFM_ROQAUDIO, "Nick Kurshev", "Mike Melanson" "RoQA is an internal MPlayer FOURCC"
--- a/libmpcodecs/ad_sample.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/ad_sample.c Fri Aug 30 21:44:20 2002 +0000 @@ -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
--- a/libmpcodecs/dec_audio.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/dec_audio.c Fri Aug 30 21:44:20 2002 +0000 @@ -30,12 +30,13 @@ { 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 @@ 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; }
--- a/libmpcodecs/dec_video.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/dec_video.c Fri Aug 30 21:44:20 2002 +0000 @@ -134,13 +134,13 @@ 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 @@ // 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!
--- a/libmpcodecs/dec_video.h Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/dec_video.h Fri Aug 30 21:44:20 2002 +0000 @@ -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);
--- a/libmpcodecs/mpc_info.h Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/mpc_info.h Fri Aug 30 21:44:20 2002 +0000 @@ -7,8 +7,6 @@ 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>") */
--- a/libmpcodecs/vd.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd.c Fri Aug 30 21:44:20 2002 +0000 @@ -50,7 +50,7 @@ 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 @@ #endif &mpcodecs_vd_mpegpes, #ifdef USE_REALCODECS - &mpcodecs_vd_real, + &mpcodecs_vd_realvid, #endif &mpcodecs_vd_svq1, #ifdef HAVE_XVID
--- a/libmpcodecs/vd_cinepak.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_cinepak.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_cyuv.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_cyuv.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "Creative YUV decoder", "cyuv", - VFM_CYUV, "A'rpi", "Dr. Tim Ferguson", "native codec"
--- a/libmpcodecs/vd_divx4.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_divx4.c Fri Aug 30 21:44:20 2002 +0000 @@ -19,7 +19,6 @@ "DivX4Linux lib (divx4 mode)", #endif "divx4", - VFM_DIVX4, "A'rpi", "http://www.divx.com", "native codecs"
--- a/libmpcodecs/vd_dshow.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_dshow.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_ffmpeg.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_fli.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_fli.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "Autodesk FLI/FLC Animation decoder", "fli", - VFM_FLI, "A'rpi", "Mike Melanson", "native codec"
--- a/libmpcodecs/vd_huffyuv.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_huffyuv.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_ijpg.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_ijpg.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_libdv.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_libdv.c Fri Aug 30 21:44:20 2002 +0000 @@ -24,7 +24,6 @@ { "Raw DV Video Decoder", "libdv", - VFM_LIBDV, "Alexander Neundorf <neundorf@kde.org>", "http://libdv.sf.net", ""
--- a/libmpcodecs/vd_libmpeg2.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_libmpeg2.c Fri Aug 30 21:44:20 2002 +0000 @@ -10,7 +10,6 @@ { "MPEG 1/2 Video decoder v2.0", "libmpeg2", - VFM_MPEG, "A'rpi", "Aaron & Walken", "native"
--- a/libmpcodecs/vd_mpegpes.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_mpegpes.c Fri Aug 30 21:44:20 2002 +0000 @@ -10,7 +10,6 @@ { "MPEG 1/2 Video passthrough", "mpegpes", - VFM_MPEGPES, "A'rpi", "A'rpi", "for hw decoders"
--- a/libmpcodecs/vd_mpng.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_mpng.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_msrle.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_msrle.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "Microsoft RLE decoder", "msrle", - VFM_MSRLE, "Mike Melanson", "Mike Melanson", "native codec"
--- a/libmpcodecs/vd_msvidc.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_msvidc.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "Microsoft Video 1 / CRAM decoder", "msvidc", - VFM_MSVIDC, "A'rpi", "Mike Melanson", "native codec"
--- a/libmpcodecs/vd_nuv.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_nuv.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_odivx.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_odivx.c Fri Aug 30 21:44:20 2002 +0000 @@ -21,7 +21,6 @@ "Opendivx 0.48 codec", #endif "odivx", - VFM_ODIVX, "A'rpi", #ifdef NEW_DECORE "http://www.divx.com",
--- a/libmpcodecs/vd_qtrle.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_qtrle.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "Quicktime Animation (RLE) decoder", "qtrle", - VFM_QTRLE, "A'rpi", "Mike Melanson", "native codec"
--- a/libmpcodecs/vd_qtrpza.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_qtrpza.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "Quicktime Apple Video", "qtrpza", - VFM_QTRPZA, "Roberto Togni", "Roberto Togni", "native codec"
--- a/libmpcodecs/vd_qtsmc.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_qtsmc.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "Apple Graphics (SMC) decoder", "qtsmc", - VFM_QTSMC, "A'rpi", "Mike Melanson", "native codec"
--- a/libmpcodecs/vd_raw.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_raw.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "RAW Uncompressed Video", "raw", - VFM_RAW, "A'rpi", "A'rpi & Alex", "uncompressed"
--- a/libmpcodecs/vd_realvid.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_realvid.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_rle.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_rle.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "RLE Video decoder", "msrle", - VFM_MSRLE, "A'rpi", "XAnim rip...", "native codec"
--- a/libmpcodecs/vd_roqvideo.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_roqvideo.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "Id RoQ File Video decoder", "roqvideo", - VFM_ROQVIDEO, "A'rpi", "Mike Melanson", "native codec"
--- a/libmpcodecs/vd_svq1.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_svq1.c Fri Aug 30 21:44:20 2002 +0000 @@ -9,7 +9,6 @@ static vd_info_t info = { "SVQ1 (Sorenson v1) Video decoder", "svq1", - VFM_SVQ1, "A'rpi", "XINE team", "native codec"
--- a/libmpcodecs/vd_vfw.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_vfw.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_vfwex.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_vfwex.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_xanim.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_xanim.c Fri Aug 30 21:44:20 2002 +0000 @@ -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"
--- a/libmpcodecs/vd_xvid.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_xvid.c Fri Aug 30 21:44:20 2002 +0000 @@ -16,7 +16,6 @@ { "xvid decoder", "xvid", - VFM_XVID, "Albeu", "Albeu", ""
--- a/libmpcodecs/vd_zlib.c Fri Aug 30 21:30:59 2002 +0000 +++ b/libmpcodecs/vd_zlib.c Fri Aug 30 21:44:20 2002 +0000 @@ -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)"
--- a/mencoder.c Fri Aug 30 21:30:59 2002 +0000 +++ b/mencoder.c Fri Aug 30 21:44:20 2002 +0000 @@ -87,8 +87,8 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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"); }
--- a/mplayer.c Fri Aug 30 21:30:59 2002 +0000 +++ b/mplayer.c Fri Aug 30 21:44:20 2002 +0000 @@ -176,8 +176,8 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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){
--- a/mplayer.h Fri Aug 30 21:30:59 2002 +0000 +++ b/mplayer.h Fri Aug 30 21:44:20 2002 +0000 @@ -10,7 +10,7 @@ extern int fullscreen; extern int vcd_track; -extern int video_family; +//extern int video_family; // OBSOLETE, use video_fm extern char * video_driver; extern char * audio_driver; extern int has_audio;