changeset 7186:02b1976e12e2

fix vfm and add afm support
author pontscho
date Sat, 31 Aug 2002 09:45:59 +0000
parents 3d40a2bbd73b
children 3b44192516e4
files Gui/cfg.c Gui/mplayer/gtk/opts.c help_mp-bg.h help_mp-cs.h help_mp-de.h help_mp-dk.h help_mp-en.h help_mp-hu.h help_mp-nl.h help_mp-pl.h help_mp-zh_CN.h mplayer.h
diffstat 12 files changed, 82 insertions(+), 87 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/cfg.c	Sat Aug 31 08:18:56 2002 +0000
+++ b/Gui/cfg.c	Sat Aug 31 09:45:59 2002 +0000
@@ -59,7 +59,8 @@
  { "v_flip",&flip,CONF_TYPE_INT,CONF_RANGE,-1,1,NULL },
  { "v_ni",&force_ni,CONF_TYPE_FLAG,0,0,1,NULL },
  { "v_idx",&index_mode,CONF_TYPE_INT,CONF_RANGE,-1,2,NULL },
- { "v_vfm",&video_family,CONF_TYPE_INT,CONF_RANGE,-1,10,NULL },
+ { "v_vfm",&video_fm,CONF_TYPE_STRING,0,0,0,NULL },
+ { "a_afm",&audio_fm,CONF_TYPE_STRING,0,0,0,NULL },
 
  { "vf_pp",&gtkVopPP,CONF_TYPE_FLAG,0,0,1,NULL },
  { "vf_autoq",&auto_quality,CONF_TYPE_INT,CONF_RANGE,0,100,NULL },
--- a/Gui/mplayer/gtk/opts.c	Sat Aug 31 08:18:56 2002 +0000
+++ b/Gui/mplayer/gtk/opts.c	Sat Aug 31 09:45:59 2002 +0000
@@ -12,12 +12,20 @@
 #include "../../../mixer.h"
 #include "../../../libao2/audio_out.h"
 #include "../../../libvo/video_out.h"
+
 #include "../../cfg.h"
 #include "../../interface.h"
 #include "../widgets.h"
 #include "opts.h"
 #include "fs.h"
 
+typedef struct sh_video_t sh_video_t;
+typedef struct mp_image_t mp_image_t;
+typedef struct sh_audio_t sh_audio_t;
+
+#include "../../../libmpcodecs/vd.h"
+#include "../../../libmpcodecs/ad.h"
+
        GtkWidget * Preferences;
 static GtkWidget * AConfig;
 static GtkWidget * VConfig;
@@ -32,8 +40,10 @@
 //static GtkWidget * ESubtitleName;
        GtkWidget * prEFontName;
 static GtkWidget * EVFM;
+static GtkWidget * EAFM;
 
 static GtkWidget * CBVFM;
+static GtkWidget * CBAFM;
 static GtkWidget * CBAudioEqualizer;
 //static GtkWidget * CBSurround;
 static GtkWidget * CBExtraStereo;
@@ -79,22 +89,6 @@
 //static GtkWidget     * AutoScale;
 #endif
 
-static struct
-{
- int    vfm;
- char * name;
-} lVFM[] =
- { 
-  { -1,MSGTR_PREFERENCES_None   },
-  {  2,MSGTR_PREFERENCES_Codec1 },
-  {  3,MSGTR_PREFERENCES_Codec2 },
-  {  4,MSGTR_PREFERENCES_Codec3 },
-  {  5,MSGTR_PREFERENCES_Codec4 },
-  {  7,MSGTR_PREFERENCES_Codec5 },
-  { 10,MSGTR_PREFERENCES_Codec6 },
-  { 0,NULL }
- };
-
 #ifdef HAVE_FREETYPE
 static struct 
 {
@@ -266,10 +260,32 @@
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPostprocess ),gtkVopPP );
  gtk_adjustment_set_value( HSPPQualityadj,auto_quality );
  {
-  int i = 0;
-  for ( i=0;i<7;i++ )
-    if ( lVFM[i].vfm == video_family ) break;
-  gtk_entry_set_text( GTK_ENTRY( EVFM ),lVFM[i].name );
+  int     i;
+  GList * Items = NULL;
+  char  * name = NULL;
+
+  for( i=0;mpcodecs_vd_drivers[i];i++ )
+   {
+    Items=g_list_append( Items,(char *)mpcodecs_vd_drivers[i]->info->name );
+    if ( !gstrcmp( video_fm,(char *)mpcodecs_vd_drivers[i]->info->short_name ) ) name=(char *)mpcodecs_vd_drivers[i]->info->name;
+   }
+  gtk_combo_set_popdown_strings( GTK_COMBO( CBVFM ),Items );
+  g_list_free( Items );
+  if ( name ) gtk_entry_set_text( GTK_ENTRY( EVFM ),name );
+ }
+ {
+  int     i;
+  GList * Items = NULL;
+  char  * name = NULL;
+
+  for( i=0;mpcodecs_ad_drivers[i];i++ )
+   {
+    Items=g_list_append( Items,(char *)mpcodecs_ad_drivers[i]->info->name );
+    if ( !gstrcmp( audio_fm,(char *)mpcodecs_ad_drivers[i]->info->short_name ) ) name=(char *)mpcodecs_ad_drivers[i]->info->name;
+   }
+  gtk_combo_set_popdown_strings( GTK_COMBO( CBAFM ),Items );
+  g_list_free( Items );
+  if ( name ) gtk_entry_set_text( GTK_ENTRY( EAFM ),name );
  }
 
 // -- disables
@@ -433,9 +449,16 @@
 	{
 	 int i;
 	 char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) );
-	 video_family=-1;
-	 for ( i=0;i<7;i++ )
-	  if ( !strcmp( tmp,lVFM[i].name ) ) { video_family=lVFM[i].vfm; break; }
+	 gfree( (void **)&video_fm );
+         for( i=0;mpcodecs_vd_drivers[i];i++ )
+           if ( !gstrcmp( tmp,(char *)mpcodecs_vd_drivers[i]->info->name ) ) { video_fm=gstrdup( (char *)mpcodecs_vd_drivers[i]->info->short_name ); break; }
+	}
+	{
+	 int i;
+	 char * tmp = gtk_entry_get_text( GTK_ENTRY( EAFM ) );
+	 gfree( (void **)&audio_fm );
+         for( i=0;mpcodecs_ad_drivers[i];i++ )
+           if ( !gstrcmp( tmp,(char *)mpcodecs_ad_drivers[i]->info->name ) ) { audio_fm=gstrdup( (char *)mpcodecs_ad_drivers[i]->info->short_name ); break; }
 	}
 
    case bCancel:
@@ -587,7 +610,6 @@
   GtkWidget * vbox600;
   GSList    * OSD_group = NULL;
   GSList    * Font_group = NULL;
-  GList	    * CBVFM_items = NULL;
   GList     * CBFontEncoding_items = NULL;
   GtkWidget * frame6;
   GtkWidget * vbox7;
@@ -1649,12 +1671,6 @@
   gtk_widget_ref( CBVFM );
   gtk_widget_show( CBVFM );
   gtk_box_pack_start( GTK_BOX( hbox5 ),CBVFM,TRUE,TRUE,0 );
-  {
-   int i;
-   for ( i=0;lVFM[i].name;i++ ) CBVFM_items=g_list_append( CBVFM_items,lVFM[i].name );
-  }
-  gtk_combo_set_popdown_strings( GTK_COMBO( CBVFM ),CBVFM_items );
-  g_list_free( CBVFM_items );
 
   EVFM=GTK_COMBO( CBVFM )->entry;
   gtk_widget_set_name( EVFM,"CEVFM" );
@@ -1663,6 +1679,35 @@
   gtk_object_set_data_full( GTK_OBJECT( Preferences ),"EVFM",EVFM,(GtkDestroyNotify)gtk_widget_unref );
   gtk_widget_show( EVFM );
 
+  hbox5=gtk_hbox_new( FALSE,0 );
+  gtk_widget_set_name( hbox5,"hbox5" );
+  gtk_widget_ref( hbox5 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"hbox5",hbox5,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( hbox5 );
+  gtk_box_pack_start( GTK_BOX( vbox602 ),hbox5,FALSE,FALSE,0 );
+
+  label16=gtk_label_new( MSGTR_PREFERENCES_AudioCodecFamily );
+  gtk_widget_set_name( label16,"label16" );
+  gtk_widget_ref( label16 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label16",label16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label16 );
+  gtk_box_pack_start( GTK_BOX( hbox5 ),label16,FALSE,FALSE,0 );
+  gtk_misc_set_alignment( GTK_MISC( label16 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label16 ),4,0 );
+
+  CBAFM=gtk_combo_new();
+  gtk_widget_set_name( CBAFM,"CBAFM" );
+  gtk_widget_ref( CBAFM );
+  gtk_widget_show( CBAFM );
+  gtk_box_pack_start( GTK_BOX( hbox5 ),CBAFM,TRUE,TRUE,0 );
+
+  EAFM=GTK_COMBO( CBAFM )->entry;
+  gtk_widget_set_name( EAFM,"EAFM" );
+  gtk_entry_set_editable( GTK_ENTRY( EAFM ),FALSE );
+  gtk_widget_ref( EAFM );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"EAFM",EAFM,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( EAFM );
+
   label4=gtk_label_new( "Misc" );
   gtk_widget_set_name( label4,"label4" );
   gtk_widget_ref( label4 );
@@ -1753,7 +1798,7 @@
   gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSPPQuality_motion_notify_event ),NULL );
 #endif
 
-  gtk_notebook_set_page( GTK_NOTEBOOK( notebook1 ),2 );
+  gtk_notebook_set_page( GTK_NOTEBOOK( notebook1 ),3 );
 
   gtk_window_add_accel_group( GTK_WINDOW( Preferences ),accel_group );
 
--- a/help_mp-bg.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-bg.h	Sat Aug 31 09:45:59 2002 +0000
@@ -421,12 +421,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "Íèùî"
- #define MSGTR_PREFERENCES_Codec1 "VFW (Win32)"
- #define MSGTR_PREFERENCES_Codec2 "OpenDivX/DivX4 (YV12)"
- #define MSGTR_PREFERENCES_Codec3 "DirectShow (Win32)"
- #define MSGTR_PREFERENCES_Codec4 "ffmpeg (libavcodec)"
- #define MSGTR_PREFERENCES_Codec5 "DivX4 (YUY2)"
- #define MSGTR_PREFERENCES_Codec6 "XAnim"
 #define MSGTR_PREFERENCES_AvailableDrivers "Íàëè÷íè äðàéâåðè:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "Áåç çâóê"
 #define MSGTR_PREFERENCES_NormalizeSound "Èçðàâíÿâàíå ñèëàòà íà çâóêà"
--- a/help_mp-cs.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-cs.h	Sat Aug 31 09:45:59 2002 +0000
@@ -438,12 +438,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "Nic"
-#define MSGTR_PREFERENCES_Codec1 "Pou¾ít VFW (Win32) kodeky"
-#define MSGTR_PREFERENCES_Codec2 "Pou¾ít OpenDivX/DivX4 kodek (YV12)"
-#define MSGTR_PREFERENCES_Codec3 "Pou¾ít DirectShow (Win32) kodeky"
-#define MSGTR_PREFERENCES_Codec4 "Pou¾ít ffmpeg (libavcodec) kodeky"
-#define MSGTR_PREFERENCES_Codec5 "Pou¾ít DivX4 kodek (YUY2)"
-#define MSGTR_PREFERENCES_Codec6 "Pou¾ít XAnim kodeky"
 #define MSGTR_PREFERENCES_AvailableDrivers "Dostupné ovladaèe:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "Nepøehrávat zvuk"
 #define MSGTR_PREFERENCES_NormalizeSound "Normalizovat zvuk"
--- a/help_mp-de.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-de.h	Sat Aug 31 09:45:59 2002 +0000
@@ -438,12 +438,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "Nichts"
-#define MSGTR_PREFERENCES_Codec1 "Verwende VFW (Win32) Codecs"
-#define MSGTR_PREFERENCES_Codec2 "Verwende OpenDivX/DivX4 Codec (YV12)"
-#define MSGTR_PREFERENCES_Codec3 "Verwende DirectShow (Win32) Codecs"
-#define MSGTR_PREFERENCES_Codec4 "Verwende ffmpeg (libavcodec) Codecs"
-#define MSGTR_PREFERENCES_Codec5 "Verwende DivX4 Codec (YUY2)"
-#define MSGTR_PREFERENCES_Codec6 "Verwende XAnim Codecs"
 #define MSGTR_PREFERENCES_AvailableDrivers "Verfügbare Treiber:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "Spiele keinen Ton"
 #define MSGTR_PREFERENCES_NormalizeSound "Normalisiere Ton"
--- a/help_mp-dk.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-dk.h	Sat Aug 31 09:45:59 2002 +0000
@@ -430,12 +430,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "Ingen"
-#define MSGTR_PREFERENCES_Codec1 "Benyt VFW (Win32) codecs"
-#define MSGTR_PREFERENCES_Codec2 "Benyt OpenDivX/DivX4 codec (YV12)"
-#define MSGTR_PREFERENCES_Codec3 "Benyt DirectShow (Win32) codecs"
-#define MSGTR_PREFERENCES_Codec4 "Benyt ffmpeg (libavcodec) codecs"
-#define MSGTR_PREFERENCES_Codec5 "benyt DivX4 codec (YUY2)"
-#define MSGTR_PREFERENCES_Codec6 "Benyt XAnim codecs"
 #define MSGTR_PREFERENCES_AvailableDrivers "Tilgængelige drivere:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "Afspil ikke lyd"
 #define MSGTR_PREFERENCES_NormalizeSound "Ensart lydstyrke"
--- a/help_mp-en.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-en.h	Sat Aug 31 09:45:59 2002 +0000
@@ -442,12 +442,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "None"
-#define MSGTR_PREFERENCES_Codec1 "Use VFW (Win32) codecs"
-#define MSGTR_PREFERENCES_Codec2 "Use OpenDivX/DivX4 codec (YV12)"
-#define MSGTR_PREFERENCES_Codec3 "Use DirectShow (Win32) codecs"
-#define MSGTR_PREFERENCES_Codec4 "Use ffmpeg (libavcodec) codecs"
-#define MSGTR_PREFERENCES_Codec5 "Use DivX4 codec (YUY2)"
-#define MSGTR_PREFERENCES_Codec6 "Use XAnim codecs"
 #define MSGTR_PREFERENCES_AvailableDrivers "Available drivers:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "Do not play sound"
 #define MSGTR_PREFERENCES_NormalizeSound "Normalize sound"
@@ -481,6 +475,7 @@
 #define MSGTR_PREFERENCES_NI "Use non-interleaved AVI parser"
 #define MSGTR_PREFERENCES_IDX "Rebuilt index table, if needed"
 #define MSGTR_PREFERENCES_VideoCodecFamily "Video codec family:"
+#define MSGTR_PREFERENCES_AudioCodecFamily "Audio codec family:"
 #define MSGTR_PREFERENCES_FRAME_OSD_Level "OSD level"
 #define MSGTR_PREFERENCES_FRAME_Subtitle "Subtitle"
 #define MSGTR_PREFERENCES_FRAME_Font "Font"
--- a/help_mp-hu.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-hu.h	Sat Aug 31 09:45:59 2002 +0000
@@ -345,12 +345,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "Egyik sem"
-#define MSGTR_PREFERENCES_Codec1 "VFW (Win32) kodek család"
-#define MSGTR_PREFERENCES_Codec2 "OpenDivX/DivX4 kodek"
-#define MSGTR_PREFERENCES_Codec3 "DirectShow (Win32) kodek család"
-#define MSGTR_PREFERENCES_Codec4 "ffmpeg (libavcodec) család"
-#define MSGTR_PREFERENCES_Codec5 "DivX4 (YUY2) kodek"
-#define MSGTR_PREFERENCES_Codec6 "XAnim kodek család"
 #define MSGTR_PREFERENCES_AvailableDrivers "Driverek:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "Hang nélkül"
 #define MSGTR_PREFERENCES_NormalizeSound "Hang normalizálása"
@@ -384,6 +378,7 @@
 #define MSGTR_PREFERENCES_NI "non-interleaved  AVI  feltételezése (hibás AVI-knál segíthet"
 #define MSGTR_PREFERENCES_IDX "Az AVI indexének újraépítése, ha szükséges"
 #define MSGTR_PREFERENCES_VideoCodecFamily "Video kodek család:"
+#define MSGTR_PREFERENCES_AudioCodecFamily "Audio kodek család:"
 #define MSGTR_PREFERENCES_FRAME_OSD_Level "OSD szint"
 #define MSGTR_PREFERENCES_FRAME_Subtitle "Felirat"
 #define MSGTR_PREFERENCES_FRAME_Font "Betû"
--- a/help_mp-nl.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-nl.h	Sat Aug 31 09:45:59 2002 +0000
@@ -431,12 +431,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "Geen"
-#define MSGTR_PREFERENCES_Codec1 "Gebruik VFW (Win32) codecs"
-#define MSGTR_PREFERENCES_Codec2 "Gebruik OpenDivX/DivX4 codec (YV12)"
-#define MSGTR_PREFERENCES_Codec3 "Gebruik DirectShow (Win32) codecs"
-#define MSGTR_PREFERENCES_Codec4 "Gebruik ffmpeg (libavcodec) codecs"
-#define MSGTR_PREFERENCES_Codec5 "Gebruik DivX4 codec (YUY2)"
-#define MSGTR_PREFERENCES_Codec6 "Gebruik XAnim codecs"
 #define MSGTR_PREFERENCES_AvailableDrivers "Beschikbare drivers:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "Speel geen geluid af"
 #define MSGTR_PREFERENCES_NormalizeSound "Normalizeer het geluid"
--- a/help_mp-pl.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-pl.h	Sat Aug 31 09:45:59 2002 +0000
@@ -441,12 +441,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "Puste"
-#define MSGTR_PREFERENCES_Codec1 "U¿yj kodeków VFW (Win32)"
-#define MSGTR_PREFERENCES_Codec2 "U¿yj kodeków OpenDivX/DivX4 (YV12)"
-#define MSGTR_PREFERENCES_Codec3 "U¿yj kodeków DirectShow (Win32)"
-#define MSGTR_PREFERENCES_Codec4 "U¿yj kodeków ffmpeg (libavcodec)"
-#define MSGTR_PREFERENCES_Codec5 "U¿yj kodeków DivX4 (YUY2)"
-#define MSGTR_PREFERENCES_Codec6 "U¿yj kodeków XAnim"
 #define MSGTR_PREFERENCES_AvailableDrivers "Dostêpne sterowniki:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "Nie odtwarzaj d¼wiêku"
 #define MSGTR_PREFERENCES_NormalizeSound "Normalizuj d¼wiêk"
--- a/help_mp-zh_CN.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/help_mp-zh_CN.h	Sat Aug 31 09:45:59 2002 +0000
@@ -403,12 +403,6 @@
 
 // --- preferences
 #define MSGTR_PREFERENCES_None "None"
-#define MSGTR_PREFERENCES_Codec1 "ʹÓÃVFW (Win32) codecs"
-#define MSGTR_PREFERENCES_Codec2 "ʹÓÃOpenDivX/DivX4 codec (YV12)"
-#define MSGTR_PREFERENCES_Codec3 "ʹÓÃDirectShow (Win32) codecs"
-#define MSGTR_PREFERENCES_Codec4 "ʹÓÃffmpeg (libavcodec) codecs"
-#define MSGTR_PREFERENCES_Codec5 "ʹÓÃDivX4 codec (YUY2)"
-#define MSGTR_PREFERENCES_Codec6 "ʹÓÃXAnim codecs"
 #define MSGTR_PREFERENCES_AvailableDrivers "¿ÉÓÃÇý¶¯:"
 #define MSGTR_PREFERENCES_DoNotPlaySound "²»²¥·ÅÉùÒô"
 #define MSGTR_PREFERENCES_NormalizeSound "ÉùÒô±ê×¼»¯"
--- a/mplayer.h	Sat Aug 31 08:18:56 2002 +0000
+++ b/mplayer.h	Sat Aug 31 09:45:59 2002 +0000
@@ -10,7 +10,8 @@
 extern int fullscreen;
 extern int vcd_track;
 
-//extern int    video_family; // OBSOLETE, use video_fm
+extern char * audio_fm;
+extern char * video_fm;
 extern char * video_driver;
 extern char * audio_driver;
 extern int    has_audio;