-afm/-vfm migration from ID (int) to NAME (string) - simplifies code and makes dlopen...
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 30 Aug 2002 21:44:20 +0000 (21:44 +0000)
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 30 Aug 2002 21:44:20 +0000 (21:44 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@7181 b3059339-0415-0410-9bf9-f77b7e298cf2

61 files changed:
cfg-common.h
codec-cfg.c
codec-cfg.h
help_mp-en.h
libmpcodecs/ad_acm.c
libmpcodecs/ad_alaw.c
libmpcodecs/ad_dk3adpcm.c
libmpcodecs/ad_dshow.c
libmpcodecs/ad_dvdpcm.c
libmpcodecs/ad_faad.c
libmpcodecs/ad_ffmpeg.c
libmpcodecs/ad_hwac3.c
libmpcodecs/ad_imaadpcm.c
libmpcodecs/ad_liba52.c
libmpcodecs/ad_libdv.c
libmpcodecs/ad_libmad.c
libmpcodecs/ad_libvorbis.c
libmpcodecs/ad_mp3lib.c
libmpcodecs/ad_msadpcm.c
libmpcodecs/ad_msgsm.c
libmpcodecs/ad_pcm.c
libmpcodecs/ad_realaud.c
libmpcodecs/ad_roqaudio.c
libmpcodecs/ad_sample.c
libmpcodecs/dec_audio.c
libmpcodecs/dec_video.c
libmpcodecs/dec_video.h
libmpcodecs/mpc_info.h
libmpcodecs/vd.c
libmpcodecs/vd_cinepak.c
libmpcodecs/vd_cyuv.c
libmpcodecs/vd_divx4.c
libmpcodecs/vd_dshow.c
libmpcodecs/vd_ffmpeg.c
libmpcodecs/vd_fli.c
libmpcodecs/vd_huffyuv.c
libmpcodecs/vd_ijpg.c
libmpcodecs/vd_libdv.c
libmpcodecs/vd_libmpeg2.c
libmpcodecs/vd_mpegpes.c
libmpcodecs/vd_mpng.c
libmpcodecs/vd_msrle.c
libmpcodecs/vd_msvidc.c
libmpcodecs/vd_nuv.c
libmpcodecs/vd_odivx.c
libmpcodecs/vd_qtrle.c
libmpcodecs/vd_qtrpza.c
libmpcodecs/vd_qtsmc.c
libmpcodecs/vd_raw.c
libmpcodecs/vd_realvid.c
libmpcodecs/vd_rle.c
libmpcodecs/vd_roqvideo.c
libmpcodecs/vd_svq1.c
libmpcodecs/vd_vfw.c
libmpcodecs/vd_vfwex.c
libmpcodecs/vd_xanim.c
libmpcodecs/vd_xvid.c
libmpcodecs/vd_zlib.c
mencoder.c
mplayer.c
mplayer.h

index ea1f0e7..e50f2bb 100644 (file)
        {"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},
 
index f40f6f4..979b798 100644 (file)
@@ -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);
                        
                }
 
index b08deaf..220e97a 100644 (file)
 #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);
index 164dd2f..2103453 100644 (file)
@@ -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"
index c728af0..ca38906 100644 (file)
@@ -14,7 +14,6 @@ static ad_info_t info =
 {
        "Win32 ACM audio decoder",
        "acm",
-       AFM_ACM,
        "Nick Kurshev",
        "avifile.sf.net",
        ""
index d1a7e4c..ca8db27 100644 (file)
@@ -9,7 +9,6 @@ static ad_info_t info =
 {
        "aLaw/uLaw audio decoder",
        "alaw",
-       AFM_ALAW,
        "Nick Kurshev",
        "A'rpi",
        ""
index 5cb6b6b..a6b2c94 100644 (file)
@@ -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"
index 208a927..662a520 100644 (file)
@@ -14,7 +14,6 @@ static ad_info_t info =
 {
        "Win32/DirectShow decoders",
        "dshow",
-       AFM_DSHOW,
        "Nick Kurshev",
        "avifile.sf.net",
        ""
index faab6a7..60704c9 100644 (file)
@@ -9,7 +9,6 @@ static ad_info_t info =
 {
        "Uncompressed DVD PCM audio decoder",
        "dvdpcm",
-       AFM_DVDPCM,
        "Nick Kurshev",
        "A'rpi",
        ""
index bd210d9..c762571 100644 (file)
@@ -17,7 +17,6 @@ static ad_info_t info =
 {
        "AAC (MPEG2/4 Advanced Audio Coding)",
        "faad",
-       AFM_AAC,
        "Felix Buenemann",
        "faad2",
        "Under development!"
index fa642a6..7aac9e8 100644 (file)
@@ -16,7 +16,6 @@ static ad_info_t info =
 {
        "FFmpeg audio decoders",
        "ffmpeg",
-       AFM_FFMPEG,
        "Nick Kurshev",
        "ffmpeg.sf.net",
        ""
index 1b9a78d..e645233 100644 (file)
@@ -20,7 +20,6 @@ static ad_info_t info =
 {
        "AC3 through SPDIF",
        "hwac3",
-       AFM_HWAC3,
        "Nick Kurshev",
        "???",
        ""
index d3727e9..d134ae6 100644 (file)
@@ -71,7 +71,6 @@ static ad_info_t info =
 {
        "IMA ADPCM audio decoder",
        "imaadpcm",
-       AFM_IMAADPCM,
        "Nick Kurshev",
        "Mike Melanson",
        ""
index cc85fe0..f6d6df2 100644 (file)
@@ -23,7 +23,6 @@ static ad_info_t info =
 {
        "AC3-liba52",
        "liba52",
-       AFM_A52,
        "Nick Kurshev",
        "Michel LESPINASSE",
        ""
index 0cd5553..a193369 100644 (file)
@@ -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",
        ""
index 083a094..5ecfd5c 100644 (file)
@@ -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"
index 526667e..630362c 100644 (file)
@@ -12,7 +12,6 @@ static ad_info_t info =
 {
        "Ogg/Vorbis audio decoder",
        "libvorbis",
-       AFM_VORBIS,
        "Felix Buenemann, A'rpi",
        "libvorbis",
        "buggy"
index e4b8f9c..ef544f4 100644 (file)
@@ -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!"
index 7457cbc..5bfa0e4 100644 (file)
@@ -19,7 +19,6 @@ static ad_info_t info =
 {
        "MS ADPCM audio decoder",
        "msadpcm",
-       AFM_MSADPCM,
        "Nick Kurshev",
        "Mike Melanson",
        ""
index 0aabe0a..a4dbe12 100644 (file)
@@ -9,7 +9,6 @@ static ad_info_t info =
 {
        "native MSGSM audio decoder",
        "msgsm",
-       AFM_GSM,
        "A'rpi",
        "XAnim",
        ""
index e0bc8f4..e3b3430 100644 (file)
@@ -9,7 +9,6 @@ static ad_info_t info =
 {
        "Uncompressed PCM audio decoder",
        "pcm",
-       AFM_PCM,
        "Nick Kurshev",
        "A'rpi",
        ""
index 09cbbc6..fd0511c 100644 (file)
@@ -15,7 +15,6 @@
 static ad_info_t info =  {
        "RealAudio decoder",
        "realaud",
-       AFM_REAL,
        "A'rpi",
        "Florian Schneider",
        "binary real audio codecs"
index 556a8bd..3d6454c 100644 (file)
@@ -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"
index 56d5a46..aa7912b 100644 (file)
@@ -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
index 4185415..af48c91 100644 (file)
@@ -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;
 }
index dc8c411..efcd660 100644 (file)
@@ -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!
index 296af5e..be29e8e 100644 (file)
@@ -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);
index 1f527dd..97f90b8 100644 (file)
@@ -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>") */
index 213ca4b..56e34d8 100644 (file)
@@ -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
index ac96918..b88de90 100644 (file)
@@ -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"
index b9500a6..1b1f939 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "Creative YUV decoder",
        "cyuv",
-       VFM_CYUV,
        "A'rpi",
        "Dr. Tim Ferguson",
        "native codec"
index c775bc3..f6c264b 100644 (file)
@@ -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"
index ed5618a..03c027c 100644 (file)
@@ -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"
index 71546b3..3865529 100644 (file)
@@ -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"
index 0baea4f..0d81aeb 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "Autodesk FLI/FLC Animation decoder",
        "fli",
-       VFM_FLI,
        "A'rpi",
        "Mike Melanson",
        "native codec"
index 3935e90..ef845a4 100644 (file)
@@ -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"
index 3bdbc26..a7ab9d0 100644 (file)
@@ -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"
index c890d55..795aac6 100644 (file)
@@ -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",
        ""
index 30de551..abbc154 100644 (file)
@@ -10,7 +10,6 @@ static vd_info_t info =
 {
        "MPEG 1/2 Video decoder v2.0",
        "libmpeg2",
-       VFM_MPEG,
        "A'rpi",
        "Aaron & Walken",
        "native"
index 94a9547..97e5adc 100644 (file)
@@ -10,7 +10,6 @@ static vd_info_t info =
 {
        "MPEG 1/2 Video passthrough",
        "mpegpes",
-       VFM_MPEGPES,
        "A'rpi",
        "A'rpi",
        "for hw decoders"
index 4689777..99fa7fc 100644 (file)
@@ -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"
index c3c47ba..9d97f5c 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "Microsoft RLE decoder",
        "msrle",
-       VFM_MSRLE,
        "Mike Melanson",
        "Mike Melanson",
        "native codec"
index 213deac..a01e75e 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "Microsoft Video 1 / CRAM decoder",
        "msvidc",
-       VFM_MSVIDC,
        "A'rpi",
        "Mike Melanson",
        "native codec"
index 32bec90..cb89ddb 100644 (file)
@@ -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"
index 46f7526..c7e703c 100644 (file)
@@ -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",
index 70d6b49..de6356d 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "Quicktime Animation (RLE) decoder",
        "qtrle",
-       VFM_QTRLE,
        "A'rpi",
        "Mike Melanson",
        "native codec"
index 3f38d8f..b36c0dc 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "Quicktime Apple Video",
        "qtrpza",
-       VFM_QTRPZA,
        "Roberto Togni",
        "Roberto Togni",
        "native codec"
index 8c5bf16..3c58c34 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "Apple Graphics (SMC) decoder",
        "qtsmc",
-       VFM_QTSMC,
        "A'rpi",
        "Mike Melanson",
        "native codec"
index c2733cd..ce7a553 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "RAW Uncompressed Video",
        "raw",
-       VFM_RAW,
        "A'rpi",
        "A'rpi & Alex",
        "uncompressed"
index cd5de31..c3c91da 100644 (file)
@@ -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"
index 00e3b76..4628459 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "RLE Video decoder",
        "msrle",
-       VFM_MSRLE,
        "A'rpi",
        "XAnim rip...",
        "native codec"
index f63b83b..bc0a6d3 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "Id RoQ File Video decoder",
        "roqvideo",
-       VFM_ROQVIDEO,
        "A'rpi",
        "Mike Melanson",
        "native codec"
index feaf2b2..de598ed 100644 (file)
@@ -9,7 +9,6 @@
 static vd_info_t info = {
        "SVQ1 (Sorenson v1) Video decoder",
        "svq1",
-       VFM_SVQ1,
        "A'rpi",
        "XINE team",
        "native codec"
index dc0a4d2..6e1a66d 100644 (file)
@@ -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"
index d0d70f8..fe20e7c 100644 (file)
@@ -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"
index df603f8..6ee9c5f 100644 (file)
@@ -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"
index 13128aa..35072c7 100644 (file)
@@ -16,7 +16,6 @@ static vd_info_t info =
 {
        "xvid decoder",
        "xvid",
-       VFM_XVID,
        "Albeu",
        "Albeu",
        ""
index bd1d66c..644b555 100644 (file)
@@ -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)"
index e72f356..949aad3 100644 (file)
@@ -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");
 
 }
index d226736..dedcb6f 100644 (file)
--- a/mplayer.c
+++ b/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){
index a3d412e..acf35af 100644 (file)
--- a/mplayer.h
+++ b/mplayer.h
@@ -10,7 +10,7 @@ extern char* current_module;
 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;