diff options
author | Chris White <chriswhite@gentoo.org> | 2004-07-28 21:00:19 +0000 |
---|---|---|
committer | Chris White <chriswhite@gentoo.org> | 2004-07-28 21:00:19 +0000 |
commit | 1808ad9aac40cabc1da88ef38c1a736ad7e94019 (patch) | |
tree | b51cc00ac23c81b3b98bfc61223ffbcd2b90e94f /media-video/mplayer | |
parent | ~amd64 (Manifest recommit) (diff) | |
download | gentoo-2-1808ad9aac40cabc1da88ef38c1a736ad7e94019.tar.gz gentoo-2-1808ad9aac40cabc1da88ef38c1a736ad7e94019.tar.bz2 gentoo-2-1808ad9aac40cabc1da88ef38c1a736ad7e94019.zip |
Re-added(?) myself as maintainer. Added alsa patch which addresses Bug #58619.
Diffstat (limited to 'media-video/mplayer')
-rw-r--r-- | media-video/mplayer/ChangeLog | 5 | ||||
-rw-r--r-- | media-video/mplayer/Manifest | 4 | ||||
-rw-r--r-- | media-video/mplayer/files/mplayer-1.0_pre5-alsa-gui.patch | 839 | ||||
-rw-r--r-- | media-video/mplayer/metadata.xml | 2 | ||||
-rw-r--r-- | media-video/mplayer/mplayer-1.0_pre5-r2.ebuild | 7 |
5 files changed, 853 insertions, 4 deletions
diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog index 4473d45dbe85..ec48cfc90a57 100644 --- a/media-video/mplayer/ChangeLog +++ b/media-video/mplayer/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for media-video/mplayer # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.182 2004/07/27 18:34:41 chriswhite Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.183 2004/07/28 21:00:19 chriswhite Exp $ + + 29 Jul 2004; Chris White <chriswhite@gentoo.org> : + Re-added(?) myself as maintainer. Fixed alsa gui bug in #58619. 27 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild, mplayer-1.0_pre5-r2.ebuild: diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest index 3fd56113142c..0b57260db17a 100644 --- a/media-video/mplayer/Manifest +++ b/media-video/mplayer/Manifest @@ -11,7 +11,7 @@ MD5 6b9e16c4f08ac48748812909ed431f31 mplayer-1.0_pre4-r3.ebuild 13034 MD5 d13f33f9022f7abccfe9b14f96531057 mplayer-1.0_pre4-r4.ebuild 13157 MD5 22266a1fc6bd8c724d1e31e39dc25213 mplayer-1.0_pre4-r7.ebuild 12630 MD5 071a354aa3c0e9290b6dcfc8c3621d87 mplayer-1.0_pre4.ebuild 11319 -MD5 0ce9e6498c17763c3c0244c99913f7e6 mplayer-1.0_pre5-r2.ebuild 13770 +MD5 1ca4c49801502535ce998edbb597cec5 mplayer-1.0_pre5-r2.ebuild 13932 MD5 1f9260386b063367f192b6d5d65d6aea files/real_demux.patch 3107 MD5 6c2dab3392aab51766253b416ad2a10c files/default-skin.diff 396 MD5 deb1dbbf5879ed31e1b83fb7def5b600 files/digest-mplayer-0.92-r1 355 @@ -55,4 +55,6 @@ MD5 084f1aa4fbe48d34c3154d5a4f238579 files/amd64_fix_the_blue_love.patch 17751 MD5 7dce8f2598e84e3d94186e2eb50f553b files/mplayer-1.0_pre4-mga-kernel2.6.patch 27826 MD5 38c7908ce49f7f6a272993ba5bc9dd09 files/mplayer-mythtv.patch 13755 MD5 e4581f6934f66ccecc8c1682664623d0 files/digest-mplayer-1.0_pre4-r7 358 +MD5 e4581f6934f66ccecc8c1682664623d0 files/digest-mplayer-1.0_pre4-r8 358 MD5 d77341e4aea32e3e992f01ce5cc12ae0 files/mplayer-1.0_pre5-r1-conf_locale.patch 853 +MD5 368c4627025375cafb694d5a1cf82aa2 files/mplayer-1.0_pre5-alsa-gui.patch 31662 diff --git a/media-video/mplayer/files/mplayer-1.0_pre5-alsa-gui.patch b/media-video/mplayer/files/mplayer-1.0_pre5-alsa-gui.patch new file mode 100644 index 000000000000..182f41f325d2 --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.0_pre5-alsa-gui.patch @@ -0,0 +1,839 @@ +Index: help/help_mp-en.h +=================================================================== +RCS file: /cvsroot/mplayer/main/help/help_mp-en.h,v +retrieving revision 1.121 +diff -u -r1.121 help_mp-en.h +--- help/help_mp-en.h 6 Jul 2004 11:14:29 -0000 1.121 ++++ help/help_mp-en.h 24 Jul 2004 22:15:47 -0000 +@@ -386,8 +387,7 @@ + #define MSGTR_SkinBrowser "Skin Browser" + #define MSGTR_Network "Network streaming..." + #define MSGTR_Preferences "Preferences" +-#define MSGTR_OSSPreferences "OSS driver configuration" +-#define MSGTR_SDLPreferences "SDL driver configuration" ++#define MSGTR_AudioPreferences "Audio driver configuration" + #define MSGTR_NoMediaOpened "No media opened." + #define MSGTR_VCDTrack "VCD track %d" + #define MSGTR_NoChapter "No chapter" +@@ -512,6 +512,7 @@ + #define MSGTR_PREFERENCES_Misc "Misc" + + #define MSGTR_PREFERENCES_None "None" ++#define MSGTR_PREFERENCES_DriverDefault "driver default" + #define MSGTR_PREFERENCES_AvailableDrivers "Available drivers:" + #define MSGTR_PREFERENCES_DoNotPlaySound "Do not play sound" + #define MSGTR_PREFERENCES_NormalizeSound "Normalize sound" +@@ -552,9 +553,9 @@ + #define MSGTR_PREFERENCES_FRAME_CodecDemuxer "Codec & demuxer" + #define MSGTR_PREFERENCES_FRAME_Cache "Cache" + #define MSGTR_PREFERENCES_FRAME_Misc "Misc" +-#define MSGTR_PREFERENCES_OSS_Device "Device:" +-#define MSGTR_PREFERENCES_OSS_Mixer "Mixer:" +-#define MSGTR_PREFERENCES_SDL_Driver "Driver:" ++#define MSGTR_PREFERENCES_Audio_Device "Device:" ++#define MSGTR_PREFERENCES_Audio_Mixer "Mixer:" ++#define MSGTR_PREFERENCES_Audio_MixerChannel "Mixer channel:" + #define MSGTR_PREFERENCES_Message "Please remember that you need to restart playback for some options to take effect!" + #define MSGTR_PREFERENCES_DXR3_VENC "Video encoder:" + #define MSGTR_PREFERENCES_DXR3_LAVC "Use LAVC (FFmpeg)" +Index: Gui/cfg.c +=================================================================== +RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v +retrieving revision 1.40 +diff -u -r1.40 cfg.c +--- Gui/cfg.c 8 Nov 2003 00:26:44 -0000 1.40 ++++ Gui/cfg.c 24 Jul 2004 22:15:49 -0000 +@@ -38,8 +38,14 @@ + float gtkAOExtraStereoMul = 1.0; + #ifdef USE_OSS_AUDIO + char * gtkAOOSSMixer; ++char * gtkAOOSSMixerChannel; + char * gtkAOOSSDevice; + #endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++char * gtkAOALSAMixer; ++char * gtkAOALSAMixerChannel; ++char * gtkAOALSADevice; ++#endif + #ifdef HAVE_SDL + char * gtkAOSDLDriver; + #endif +@@ -110,8 +116,14 @@ + { "ao_extra_stereo_coefficient",>kAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL }, + #ifdef USE_OSS_AUDIO + { "ao_oss_mixer",>kAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL }, ++ { "ao_oss_mixer_channel",>kAOOSSMixerChannel,CONF_TYPE_STRING,0,0,0,NULL }, + { "ao_oss_device",>kAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL }, + #endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++ { "ao_alsa_mixer",>kAOALSAMixer,CONF_TYPE_STRING,0,0,0,NULL }, ++ { "ao_alsa_mixer_channel",>kAOALSAMixerChannel,CONF_TYPE_STRING,0,0,0,NULL }, ++ { "ao_alsa_device",>kAOALSADevice,CONF_TYPE_STRING,0,0,0,NULL }, ++#endif + #ifdef HAVE_SDL + { "ao_sdl_subdriver",>kAOSDLDriver,CONF_TYPE_STRING,0,0,0,NULL }, + #endif +Index: Gui/cfg.h +=================================================================== +RCS file: /cvsroot/mplayer/main/Gui/cfg.h,v +retrieving revision 1.15 +diff -u -r1.15 cfg.h +--- Gui/cfg.h 20 Mar 2003 12:41:32 -0000 1.15 ++++ Gui/cfg.h 24 Jul 2004 22:15:49 -0000 +@@ -14,8 +14,14 @@ + extern float gtkAOExtraStereoMul; + #ifdef USE_OSS_AUDIO + extern char * gtkAOOSSMixer; ++extern char * gtkAOOSSMixerChannel; + extern char * gtkAOOSSDevice; + #endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++extern char * gtkAOALSAMixer; ++extern char * gtkAOALSAMixerChannel; ++extern char * gtkAOALSADevice; ++#endif + #ifdef HAVE_SDL + extern char * gtkAOSDLDriver; + #endif +Index: Gui/interface.c +=================================================================== +RCS file: /cvsroot/mplayer/main/Gui/interface.c,v +retrieving revision 1.95 +diff -u -r1.95 interface.c +--- Gui/interface.c 26 Jun 2004 13:26:10 -0000 1.95 ++++ Gui/interface.c 24 Jul 2004 22:15:53 -0000 +@@ -173,10 +173,6 @@ + guiIntfStruct.StreamType=-1; + + memset( >kEquChannels,0,sizeof( gtkEquChannels ) ); +-#ifdef USE_OSS_AUDIO +- if ( !gtkAOOSSMixer ) gtkAOOSSMixer=strdup( PATH_DEV_MIXER ); +- if ( !gtkAOOSSDevice ) gtkAOOSSDevice=strdup( PATH_DEV_DSP ); +-#endif + #ifdef HAVE_DXR3 + if ( !gtkDXR3Device ) gtkDXR3Device=strdup( "/dev/em8300-0" ); + #endif +@@ -797,19 +793,42 @@ + ao_plugin_cfg.pl_extrastereo_mul=gtkAOExtraStereoMul; + } + #ifdef USE_OSS_AUDIO +- mixer_device=gstrdup( gtkAOOSSMixer ); +- if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) && gtkAOOSSDevice ) ++ if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) ) + { +- char * tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 ); ++ char *tmp; ++ mixer_device = gtkAOOSSMixer; ++ mixer_channel = gtkAOOSSMixerChannel; ++ if (gtkAOOSSDevice) { ++ tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 ); + sprintf( tmp,"oss:%s",gtkAOOSSDevice ); ++ } else ++ tmp = "oss"; ++ gaddlist( &audio_driver_list,tmp ); ++ } ++#endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++ if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"alsa",4 ) ) ++ { ++ char *tmp; ++ mixer_device = gtkAOALSAMixer; ++ mixer_channel = gtkAOALSAMixerChannel; ++ if (gtkAOALSADevice) { ++ tmp = calloc( 1,strlen( gtkAOALSADevice ) + 14 ); ++ sprintf( tmp,"alsa:device=%s",gtkAOALSADevice ); ++ } else ++ tmp = "alsa"; + gaddlist( &audio_driver_list,tmp ); + } + #endif + #ifdef HAVE_SDL +- if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"sdl",3 ) && gtkAOSDLDriver ) ++ if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"sdl",3 ) ) + { +- char * tmp = calloc( 1,strlen( gtkAOSDLDriver ) + 10 ); ++ char *tmp; ++ if (gtkAOSDLDriver) { ++ tmp = calloc( 1,strlen( gtkAOSDLDriver ) + 10 ); + sprintf( tmp,"sdl:%s",gtkAOSDLDriver ); ++ } else ++ tmp = "sdl"; + gaddlist( &audio_driver_list,tmp ); + } + #endif +Index: Gui/mplayer/gtk/opts.c +=================================================================== +RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/opts.c,v +retrieving revision 1.63 +diff -u -r1.63 opts.c +--- Gui/mplayer/gtk/opts.c 26 Jun 2004 13:26:11 -0000 1.63 ++++ Gui/mplayer/gtk/opts.c 24 Jul 2004 22:15:59 -0000 +@@ -152,18 +152,9 @@ + static char * vo_driver[3]; + static int old_video_driver = 0; + +-#ifdef USE_OSS_AUDIO +- void ShowOSSConfig( void ); +- void HideOSSConfig( void ); +-#endif +-#ifdef HAVE_DXR3 +- void ShowDXR3Config( void ); +- void HideDXR3Config( void ); +-#endif +-#ifdef HAVE_SDL +- void ShowSDLConfig( void ); +- void HideSDLConfig( void ); +-#endif ++ void ShowAudioConfig(); ++ void HideAudioConfig(); ++ + static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ); + static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ); + static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ); +@@ -210,12 +201,10 @@ + gtk_clist_select_row( GTK_CLIST( CLADrivers ),old_audio_driver,0 ); + gtk_clist_get_text( GTK_CLIST( CLADrivers ),old_audio_driver,0,(char **)&ao_driver ); + gtk_widget_set_sensitive( AConfig,FALSE ); +-#ifdef USE_OSS_AUDIO +- if ( !strncmp( ao_driver[0],"oss",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE ); +-#endif +-#ifdef HAVE_SDL +- if ( !strncmp( ao_driver[0],"sdl",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE ); +-#endif ++ if ( !strncmp( ao_driver[0],"oss",3 ) || ++ !strncmp( ao_driver[0],"alsa",4 ) || ++ !strncmp( ao_driver[0],"sdl",3 ) ) ++ gtk_widget_set_sensitive( AConfig,TRUE ); + } + } + +@@ -465,12 +454,7 @@ + gtk_widget_hide( Preferences ); + gtk_widget_destroy( Preferences ); + Preferences=NULL; +-#ifdef USE_OSS_AUDIO +- HideOSSConfig(); +-#endif +-#ifdef HAVE_SDL +- HideSDLConfig(); +-#endif ++ HideAudioConfig(); + #ifdef HAVE_DXR3 + HideDXR3Config(); + #endif +@@ -615,12 +599,12 @@ + case bAConfig: + if ( !ao_driver[0] ) break; + gtk_widget_set_sensitive( AConfig,FALSE ); +-#ifdef USE_OSS_AUDIO +- if ( !strncmp( ao_driver[0],"oss",3 ) ) { ShowOSSConfig(); gtk_widget_set_sensitive( AConfig,TRUE ); } +-#endif +-#ifdef HAVE_SDL +- if ( !strncmp( ao_driver[0],"sdl",3 ) ) { ShowSDLConfig(); gtk_widget_set_sensitive( AConfig,TRUE ); } +-#endif ++ if ( !strncmp( ao_driver[0],"oss",3 ) || ++ !strncmp( ao_driver[0],"alsa",4 ) || ++ !strncmp( ao_driver[0],"sdl",3 ) ) { ++ ShowAudioConfig(); ++ gtk_widget_set_sensitive( AConfig,TRUE ); ++ } + break; + case bVconfig: + if ( !vo_driver[0] ) break; +@@ -737,12 +721,10 @@ + case 0: // audio driver + gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver ); + gtk_widget_set_sensitive( AConfig,FALSE ); +-#ifdef USE_OSS_AUDIO +- if ( !strncmp( ao_driver[0],"oss",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE ); +-#endif +-#ifdef HAVE_SDL +- if ( !strncmp( ao_driver[0],"sdl",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE ); +-#endif ++ if ( !strncmp( ao_driver[0],"oss",3 ) || ++ !strncmp( ao_driver[0],"alsa",4 ) || ++ !strncmp( ao_driver[0],"sdl",3 ) ) ++ gtk_widget_set_sensitive( AConfig,TRUE ); + break; + case 1: // video driver + gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); +@@ -1308,272 +1290,307 @@ + } + + #ifdef USE_OSS_AUDIO +- GtkWidget * OSSConfig; +-static GtkWidget * CEOssDevice; +-static GtkWidget * CEOssMixer; +-static GtkWidget * CBOssMixer; +-static GtkWidget * CBOssDevice; +-static GtkWidget * BOssOk; +-static GtkWidget * BOssCancel; +- +-void ShowOSSConfig( void ) +-{ +- if ( OSSConfig ) gtkActive( OSSConfig ); +- else OSSConfig=create_OSSConfig(); +- +- gtk_entry_set_text( GTK_ENTRY( CEOssMixer ),gtkAOOSSMixer ); +- gtk_entry_set_text( GTK_ENTRY( CEOssDevice ),gtkAOOSSDevice ); +- +- gtk_widget_show( OSSConfig ); +- gtkSetLayer( OSSConfig ); +-} +- +-void HideOSSConfig( void ) +-{ +- if ( !OSSConfig ) return; +- gtk_widget_hide( OSSConfig ); +- gtk_widget_destroy( OSSConfig ); +- OSSConfig=NULL; ++GList *appendOSSDevices(GList *l) { ++ // careful! the current implementation allows only string constants! ++ l = g_list_append(l, (gpointer)"/dev/dsp"); ++ if (gtkAOOSSDevice && strncmp(gtkAOOSSDevice, "/dev/sound", 10) == 0) { ++ l = g_list_append(l, (gpointer)"/dev/sound/dsp0"); ++ l = g_list_append(l, (gpointer)"/dev/sound/dsp1"); ++ l = g_list_append(l, (gpointer)"/dev/sound/dsp2"); ++ l = g_list_append(l, (gpointer)"/dev/sound/dsp3"); ++ } else { ++ l = g_list_append(l, (gpointer)"/dev/dsp0"); ++ l = g_list_append(l, (gpointer)"/dev/dsp1"); ++ l = g_list_append(l, (gpointer)"/dev/dsp2"); ++ l = g_list_append(l, (gpointer)"/dev/dsp3"); ++ } ++#ifdef HAVE_DXR3 ++ l = g_list_append(l, (gpointer)"/dev/em8300_ma"); ++ l = g_list_append(l, (gpointer)"/dev/em8300_ma-0"); ++ l = g_list_append(l, (gpointer)"/dev/em8300_ma-1"); ++ l = g_list_append(l, (gpointer)"/dev/em8300_ma-2"); ++ l = g_list_append(l, (gpointer)"/dev/em8300_ma-3"); ++#endif ++ return l; + } + +-static void ossButton( GtkButton * button,gpointer user_data ) +-{ +- switch( (int)user_data ) +- { +- case 1: +- gfree( (void **)>kAOOSSMixer ); gtkAOOSSMixer=strdup( gtk_entry_get_text( GTK_ENTRY( CEOssMixer ) ) ); +- gfree( (void **)>kAOOSSDevice ); gtkAOOSSDevice=strdup( gtk_entry_get_text( GTK_ENTRY( CEOssDevice ) ) ); +- case 0: +- HideOSSConfig(); +- break; ++GList *appendOSSMixers(GList *l) { ++ // careful! the current implementation allows only string constants! ++ l = g_list_append(l, (gpointer)"/dev/mixer"); ++ if (gtkAOOSSMixer && strncmp(gtkAOOSSMixer, "/dev/sound", 10) == 0) { ++ l = g_list_append(l, (gpointer)"/dev/sound/mixer0"); ++ l = g_list_append(l, (gpointer)"/dev/sound/mixer1"); ++ l = g_list_append(l, (gpointer)"/dev/sound/mixer2"); ++ l = g_list_append(l, (gpointer)"/dev/sound/mixer3"); ++ } else { ++ l = g_list_append(l, (gpointer)"/dev/mixer0"); ++ l = g_list_append(l, (gpointer)"/dev/mixer1"); ++ l = g_list_append(l, (gpointer)"/dev/mixer2"); ++ l = g_list_append(l, (gpointer)"/dev/mixer3"); + } ++ return l; + } + +-GtkWidget * create_OSSConfig( void ) +-{ +- GList * CBOssDevice_items=NULL; +- GList * CBOssMixer_items=NULL; +- GtkWidget * vbox604; +- GtkWidget * table2; +- GtkWidget * label; +- GtkWidget * hbuttonbox6; +- GtkAccelGroup * accel_group; +- +- accel_group=gtk_accel_group_new(); +- +- OSSConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL ); +- gtk_widget_set_name( OSSConfig,"OSSConfig" ); +- gtk_object_set_data( GTK_OBJECT( OSSConfig ),"OSSConfig",OSSConfig ); +- gtk_widget_set_usize( OSSConfig,270,92 ); +- gtk_window_set_title( GTK_WINDOW( OSSConfig ),MSGTR_OSSPreferences ); +- gtk_window_set_position( GTK_WINDOW( OSSConfig ),GTK_WIN_POS_CENTER ); +- gtk_window_set_policy( GTK_WINDOW( OSSConfig ),FALSE,FALSE,FALSE ); +- gtk_window_set_wmclass( GTK_WINDOW( OSSConfig ),"OSS Config","MPlayer" ); +- +- gtk_widget_realize( OSSConfig ); +- gtkAddIcon( OSSConfig ); +- +- vbox604=AddVBox( AddDialogFrame( OSSConfig ),0 ); +- +- table2=gtk_table_new( 2,2,FALSE ); +- gtk_widget_set_name( table2,"table2" ); +- gtk_widget_show( table2 ); +- gtk_box_pack_start( GTK_BOX( vbox604 ),table2,TRUE,TRUE,0 ); +- +- label=AddLabel( MSGTR_PREFERENCES_OSS_Device,NULL ); +- gtk_table_attach( GTK_TABLE( table2 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); +- +- label=AddLabel( MSGTR_PREFERENCES_OSS_Mixer,NULL ); +- gtk_table_attach( GTK_TABLE( table2 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); +- +- CBOssDevice=AddComboBox( NULL ); +- gtk_table_attach( GTK_TABLE( table2 ),CBOssDevice,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); +- +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp" ); +- if ( gtkAOOSSDevice && !strncmp( gtkAOOSSDevice,"/dev/sound",10 ) ) +- { +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/sound/dsp0" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/sound/dsp1" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/sound/dsp2" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/sound/dsp3" ); +- } +- else +- { +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp0" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp1" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp2" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/dsp3" ); +- } +-#ifdef HAVE_DXR3 +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma-0" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma-1" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma-2" ); +- CBOssDevice_items=g_list_append( CBOssDevice_items,(gpointer)"/dev/em8300_ma-3" ); +-#endif +- gtk_combo_set_popdown_strings( GTK_COMBO( CBOssDevice ),CBOssDevice_items ); +- g_list_free( CBOssDevice_items ); +- +- CEOssDevice=GTK_COMBO( CBOssDevice )->entry; +- gtk_widget_set_name( CEOssDevice,"CEOssDevice" ); +- gtk_widget_show( CEOssDevice ); +- +- CBOssMixer=AddComboBox( NULL ); +- gtk_table_attach( GTK_TABLE( table2 ),CBOssMixer,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer" ); +- if ( gtkAOOSSMixer && !strncmp( gtkAOOSSMixer,"/dev/sound",10 ) ) +- { +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/sound/mixer0" ); +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/sound/mixer1" ); +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/sound/mixer2" ); +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/sound/mixer3" ); +- } +- else +- { +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer0" ); +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer1" ); +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer2" ); +- CBOssMixer_items=g_list_append( CBOssMixer_items,(gpointer)"/dev/mixer3" ); +- } +- gtk_combo_set_popdown_strings( GTK_COMBO( CBOssMixer ),CBOssMixer_items ); +- g_list_free( CBOssMixer_items ); +- +- CEOssMixer=GTK_COMBO( CBOssMixer )->entry; +- gtk_widget_set_name( CEOssMixer,"CEOssMixer" ); +- gtk_widget_show( CEOssMixer ); +- +- AddHSeparator( vbox604 ); +- +- hbuttonbox6=AddHButtonBox( vbox604 ); +- gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox6 ),GTK_BUTTONBOX_END ); +- gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox6 ),10 ); +- BOssOk=AddButton( MSGTR_Ok,hbuttonbox6 ); +- BOssCancel=AddButton( MSGTR_Cancel,hbuttonbox6 ); +- +- gtk_signal_connect( GTK_OBJECT( OSSConfig ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&OSSConfig ); +- +- gtk_signal_connect( GTK_OBJECT( BOssOk ),"clicked",GTK_SIGNAL_FUNC( ossButton ),(void*)1 ); +- gtk_signal_connect( GTK_OBJECT( BOssCancel ),"clicked",GTK_SIGNAL_FUNC( ossButton ),(void*)0 ); +- +- gtk_widget_add_accelerator( BOssOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); +- gtk_widget_add_accelerator( BOssCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); ++GList *appendOSSMixerChannels(GList *l) { ++ l = g_list_append(l, (gpointer)"vol"); ++ l = g_list_append(l, (gpointer)"pcm"); ++ l = g_list_append(l, (gpointer)"line"); ++ return l; ++} ++#endif + +- gtk_window_add_accel_group( GTK_WINDOW( OSSConfig ),accel_group ); ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++GList *appendALSADevices(GList *l) { ++ l = g_list_append(l, (gpointer)"default"); ++ l = g_list_append(l, (gpointer)"hw#0.0"); ++ l = g_list_append(l, (gpointer)"hw#0.1"); ++ l = g_list_append(l, (gpointer)"hw#0.2"); ++ l = g_list_append(l, (gpointer)"surround40"); ++ l = g_list_append(l, (gpointer)"surround51"); ++ l = g_list_append(l, (gpointer)"plug:surround40"); ++ l = g_list_append(l, (gpointer)"plug:surround51"); ++ return l; ++} + +- return OSSConfig; ++GList *appendALSAMixers(GList *l) { ++ l = g_list_append(l, (gpointer)"default"); ++ return l; + } + ++GList *appendALSAMixerChannels(GList *l) { ++ l = g_list_append(l, (gpointer)"Master"); ++ l = g_list_append(l, (gpointer)"Line"); ++ l = g_list_append(l, (gpointer)"PCM"); ++ return l; ++} + #endif + + #ifdef HAVE_SDL +- GtkWidget * SDLConfig; +-static GtkWidget * CESDLDriver; +-static GtkWidget * CBSDLDriver; +-static GtkWidget * BSDLOk; +-static GtkWidget * BSDLCancel; +- +-void ShowSDLConfig( void ) +-{ +- if ( SDLConfig ) gtkActive( SDLConfig ); +- else SDLConfig=create_SDLConfig(); +- +- if ( gtkAOSDLDriver ) +- gtk_entry_set_text( GTK_ENTRY( CESDLDriver ), gtkAOSDLDriver ); +- +- gtk_widget_show( SDLConfig ); +- gtkSetLayer( SDLConfig ); ++GList *appendSDLDevices(GList *l) { ++ l = g_list_append(l, (gpointer)"alsa"); ++ l = g_list_append(l, (gpointer)"arts"); ++ l = g_list_append(l, (gpointer)"esd"); ++ l = g_list_append(l, (gpointer)"jack"); ++ l = g_list_append(l, (gpointer)"oss"); ++ l = g_list_append(l, (gpointer)"nas"); ++ return l; + } ++#endif + +-void HideSDLConfig( void ) +-{ +- if ( !SDLConfig ) return; +- gtk_widget_hide( SDLConfig ); +- gtk_widget_destroy( SDLConfig ); +- SDLConfig=NULL; ++// Gets text string from a gtk entry, interpreting ++// MSGTR_PREFERENCES_DriverDefault as null string. ++char *getGtkEntryText(GtkWidget *from) { ++ char *tmp = gtk_entry_get_text(GTK_ENTRY(from)); ++ if (strcmp(tmp, MSGTR_PREFERENCES_DriverDefault) == 0) { ++ tmp = NULL; ++ } ++ return tmp; + } + +-static void sdlButton( GtkButton * button,gpointer user_data ) +-{ +- switch( (int)user_data ) +- { +- case 1: +- gfree( (void **)>kAOSDLDriver ); gtkAOSDLDriver=strdup( gtk_entry_get_text( GTK_ENTRY( CESDLDriver ) ) ); +- case 0: +- HideSDLConfig(); +- break; ++// Sets text string of a gtk entry, interpreting ++// null string as MSGTR_PREFERENCES_DriverDefault. ++void setGtkEntryText(GtkWidget *dest, char *to) { ++ if (!to) { ++ to = MSGTR_PREFERENCES_DriverDefault; + } ++ gtk_entry_set_text(GTK_ENTRY(dest),to); + } + +-GtkWidget * create_SDLConfig( void ) +-{ +- GList * CBSDLDriver_items=NULL; +- GtkWidget * vbox604; +- GtkWidget * table2; +- GtkWidget * label; +- GtkWidget * hbuttonbox6; +- GtkAccelGroup * accel_group; ++ GtkWidget *AudioConfig; ++static GtkWidget *CEAudioDevice; ++static GtkWidget *CBAudioDevice; ++static GtkWidget *CEAudioMixer; ++static GtkWidget *CBAudioMixer; ++static GtkWidget *CEAudioMixerChannel; ++static GtkWidget *CBAudioMixerChannel; ++static GtkWidget *BAudioOk; ++static GtkWidget *BAudioCancel; ++ ++void ShowAudioConfig() { ++ if (AudioConfig) gtkActive(AudioConfig); ++ else AudioConfig = create_AudioConfig(); + +- accel_group=gtk_accel_group_new(); ++#ifdef USE_OSS_AUDIO ++ if (strncmp(ao_driver[0], "oss", 3) == 0) { ++ setGtkEntryText(CEAudioDevice, gtkAOOSSDevice); ++ setGtkEntryText(CEAudioMixer, gtkAOOSSMixer); ++ setGtkEntryText(CEAudioMixerChannel, gtkAOOSSMixerChannel); ++ } ++#endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++ if (strncmp(ao_driver[0], "alsa", 4) == 0) { ++ setGtkEntryText(CEAudioDevice, gtkAOALSADevice); ++ setGtkEntryText(CEAudioMixer, gtkAOALSAMixer); ++ setGtkEntryText(CEAudioMixerChannel, gtkAOALSAMixerChannel); ++ } ++#endif ++#ifdef HAVE_SDL ++ if (strncmp(ao_driver[0], "sdl", 3) == 0) { ++ setGtkEntryText(CEAudioDevice, gtkAOSDLDriver); ++ } ++#endif + +- SDLConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL ); +- gtk_widget_set_name( SDLConfig,"SDLConfig" ); +- gtk_object_set_data( GTK_OBJECT( SDLConfig ),"SDLConfig",SDLConfig ); +- gtk_widget_set_usize( SDLConfig,270,70 ); +- gtk_window_set_title( GTK_WINDOW( SDLConfig ),MSGTR_SDLPreferences ); +- gtk_window_set_position( GTK_WINDOW( SDLConfig ),GTK_WIN_POS_CENTER ); +- gtk_window_set_policy( GTK_WINDOW( SDLConfig ),FALSE,FALSE,FALSE ); +- gtk_window_set_wmclass( GTK_WINDOW( SDLConfig ),"SDL Config","MPlayer" ); +- +- gtk_widget_realize( SDLConfig ); +- gtkAddIcon( SDLConfig ); +- +- vbox604=AddVBox( AddDialogFrame( SDLConfig ),0 ); +- +- table2=gtk_table_new( 2,2,FALSE ); +- gtk_widget_set_name( table2,"table2" ); +- gtk_widget_show( table2 ); +- gtk_box_pack_start( GTK_BOX( vbox604 ),table2,TRUE,TRUE,0 ); +- +- label=AddLabel( MSGTR_PREFERENCES_SDL_Driver,NULL ); +- gtk_table_attach( GTK_TABLE( table2 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); +- +- CBSDLDriver=AddComboBox( NULL ); +- gtk_table_attach( GTK_TABLE( table2 ),CBSDLDriver,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); +- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer) NULL ); +- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"alsa" ); +- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"arts" ); +- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"esd" ); +- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"jack" ); +- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"oss" ); +- CBSDLDriver_items=g_list_append( CBSDLDriver_items,(gpointer)"nas" ); +- gtk_combo_set_popdown_strings( GTK_COMBO( CBSDLDriver ),CBSDLDriver_items ); +- g_list_free( CBSDLDriver_items ); +- +- CESDLDriver=GTK_COMBO( CBSDLDriver )->entry; +- gtk_widget_set_name( CESDLDriver,"CESDLDriver" ); +- gtk_widget_show( CESDLDriver ); +- +- AddHSeparator( vbox604 ); +- +- hbuttonbox6=AddHButtonBox( vbox604 ); +- gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox6 ),GTK_BUTTONBOX_END ); +- gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox6 ),10 ); +- BSDLOk=AddButton( MSGTR_Ok,hbuttonbox6 ); +- BSDLCancel=AddButton( MSGTR_Cancel,hbuttonbox6 ); ++ gtk_widget_show(AudioConfig); ++ gtkSetLayer(AudioConfig); ++} + +- gtk_signal_connect( GTK_OBJECT( SDLConfig ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&SDLConfig ); +- +- gtk_signal_connect( GTK_OBJECT( BSDLOk ),"clicked",GTK_SIGNAL_FUNC( sdlButton ),(void*)1 ); +- gtk_signal_connect( GTK_OBJECT( BSDLCancel ),"clicked",GTK_SIGNAL_FUNC( sdlButton ),(void*)0 ); ++void HideAudioConfig() { ++ if (!AudioConfig) return; ++ gtk_widget_hide(AudioConfig); ++ gtk_widget_destroy(AudioConfig); ++ AudioConfig=NULL; ++} + +- gtk_widget_add_accelerator( BSDLOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); +- gtk_widget_add_accelerator( BSDLCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); ++static void audioButton(GtkButton *button, gpointer user_data) { ++ switch( (int)user_data ) { ++ case 1: ++#ifdef USE_OSS_AUDIO ++ if (strncmp(ao_driver[0], "oss", 3) == 0) { ++ gfree(>kAOOSSDevice); ++ gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice)); ++ gfree(>kAOOSSMixer); ++ gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixer)); ++ gfree(>kAOOSSMixerChannel); ++ gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixerChannel)); ++ } ++#endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++ if (strncmp(ao_driver[0], "alsa", 4) == 0) { ++ gfree(>kAOALSADevice); ++ gtkAOALSADevice = gstrdup(getGtkEntryText(CEAudioDevice)); ++ gfree(>kAOALSAMixer); ++ gtkAOALSAMixer = gstrdup(getGtkEntryText(CEAudioMixer)); ++ gfree(>kAOALSAMixerChannel); ++ gtkAOALSAMixer = gstrdup(getGtkEntryText(CEAudioMixerChannel)); ++ } ++#endif ++#ifdef HAVE_SDL ++ if (strncmp(ao_driver[0], "sdl", 3) == 0) { ++ gfree(>kAOSDLDriver); ++ gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice)); ++ } ++#endif ++ case 0: ++ HideAudioConfig(); ++ break; ++ } ++} + +- gtk_window_add_accel_group( GTK_WINDOW( SDLConfig ),accel_group ); ++GtkWidget *create_AudioConfig() { ++ GList *items = NULL; ++ GtkWidget *vbox; ++ GtkWidget *table; ++ GtkWidget *label; ++ GtkWidget *hbuttonbox; ++ GtkAccelGroup *accel_group; ++ ++ AudioConfig = gtk_window_new(GTK_WINDOW_TOPLEVEL); ++ gtk_widget_set_name(AudioConfig, "AudioConfig"); ++ gtk_object_set_data(GTK_OBJECT(AudioConfig), "AudioConfig", AudioConfig); ++ gtk_window_set_title(GTK_WINDOW(AudioConfig), MSGTR_AudioPreferences); ++ gtk_window_set_position(GTK_WINDOW(AudioConfig), GTK_WIN_POS_CENTER); ++ gtk_window_set_policy(GTK_WINDOW(AudioConfig), FALSE, FALSE, FALSE); ++ gtk_window_set_wmclass(GTK_WINDOW(AudioConfig), "Audio Config", "MPlayer"); ++ ++ gtk_widget_realize(AudioConfig); ++ gtkAddIcon(AudioConfig); ++ ++ vbox = AddVBox(AddDialogFrame(AudioConfig), 0); ++ ++ table = gtk_table_new(2, 3, FALSE); ++ gtk_widget_set_name(table, "table"); ++ gtk_widget_show(table); ++ gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); ++ ++ label = AddLabel(MSGTR_PREFERENCES_Audio_Device, NULL); ++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); ++ ++ CBAudioDevice = AddComboBox(NULL); ++ gtk_table_attach(GTK_TABLE(table), CBAudioDevice, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); ++ items = g_list_append(items,(gpointer)MSGTR_PREFERENCES_DriverDefault); ++#ifdef USE_OSS_AUDIO ++ if (strncmp(ao_driver[0], "oss", 3) == 0) ++ items = appendOSSDevices(items); ++#endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++ if (strncmp(ao_driver[0], "alsa", 4) == 0) ++ items = appendALSADevices(items); ++#endif ++#ifdef HAVE_SDL ++ if (strncmp(ao_driver[0], "sdl", 3) == 0) ++ items = appendSDLDevices(items); ++#endif ++ gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioDevice), items); ++ g_list_free(items); ++ items = NULL; ++ ++ CEAudioDevice = GTK_COMBO(CBAudioDevice)->entry; ++ gtk_widget_set_name(CEAudioDevice, "CEAudioDevice"); ++ gtk_widget_show(CEAudioDevice); ++ ++ label = AddLabel(MSGTR_PREFERENCES_Audio_Mixer, NULL); ++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); ++ ++ CBAudioMixer = AddComboBox(NULL); ++ gtk_table_attach(GTK_TABLE(table), CBAudioMixer, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); ++ items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault); ++#ifdef USE_OSS_AUDIO ++ if (strncmp(ao_driver[0], "oss", 3) == 0) ++ items = appendOSSMixers(items); ++#endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++ if (strncmp(ao_driver[0], "alsa", 4) == 0) ++ items = appendALSAMixers(items); ++#endif ++ gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioMixer), items); ++ g_list_free(items); ++ items = NULL; ++ ++ CEAudioMixer = GTK_COMBO(CBAudioMixer)->entry; ++ gtk_widget_set_name(CEAudioMixer, "CEAudioMixer"); ++ gtk_widget_show(CEAudioMixer); ++ ++ label = AddLabel(MSGTR_PREFERENCES_Audio_MixerChannel, NULL); ++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); ++ ++ CBAudioMixerChannel = AddComboBox(NULL); ++ gtk_table_attach(GTK_TABLE(table), CBAudioMixerChannel, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); ++ items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault); ++#ifdef USE_OSS_AUDIO ++ if (strncmp(ao_driver[0], "oss", 3) == 0) ++ items = appendOSSMixerChannels(items); ++#endif ++#if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) ++ if (strncmp(ao_driver[0], "alsa", 4) == 0) ++ items = appendALSAMixerChannels(items); ++#endif ++ gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioMixerChannel), items); ++ g_list_free(items); ++ items = NULL; ++ ++ CEAudioMixerChannel = GTK_COMBO(CBAudioMixerChannel)->entry; ++ gtk_widget_set_name(CEAudioMixerChannel, "CEAudioMixerChannel"); ++ gtk_widget_show(CEAudioMixerChannel); ++ ++ AddHSeparator(vbox); ++ ++ hbuttonbox = AddHButtonBox(vbox); ++ gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END); ++ gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox), 10); ++ BAudioOk = AddButton(MSGTR_Ok, hbuttonbox); ++ BAudioCancel = AddButton(MSGTR_Cancel, hbuttonbox); ++ ++ gtk_signal_connect(GTK_OBJECT(AudioConfig), "destroy", GTK_SIGNAL_FUNC(WidgetDestroy), &AudioConfig); ++ gtk_signal_connect(GTK_OBJECT(BAudioOk), "clicked", GTK_SIGNAL_FUNC(audioButton), (void*)1); ++ gtk_signal_connect(GTK_OBJECT(BAudioCancel), "clicked", GTK_SIGNAL_FUNC(audioButton), (void*)0); ++ ++ accel_group = gtk_accel_group_new(); ++ gtk_widget_add_accelerator(BAudioOk, "clicked", accel_group, GDK_Return, 0, GTK_ACCEL_VISIBLE); ++ gtk_widget_add_accelerator(BAudioCancel, "clicked", accel_group, GDK_Escape, 0, GTK_ACCEL_VISIBLE); ++ gtk_window_add_accel_group(GTK_WINDOW(AudioConfig), accel_group); + +- return SDLConfig; ++ return AudioConfig; + } +-#endif + + #ifdef HAVE_DXR3 + // --- dxr3 config box +Index: Gui/mplayer/gtk/opts.h +=================================================================== +RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/opts.h,v +retrieving revision 1.7 +diff -u -r1.7 opts.h +--- Gui/mplayer/gtk/opts.h 2 Jan 2003 12:42:31 -0000 1.7 ++++ Gui/mplayer/gtk/opts.h 24 Jul 2004 22:15:59 -0000 +@@ -4,22 +4,12 @@ + + #include <gtk/gtk.h> + +-#ifdef USE_OSS_AUDIO +-extern GtkWidget * OSSConfig; +-#endif +-#ifdef HAVE_SDL +-extern GtkWidget * SDLConfig; +-#endif ++extern GtkWidget * AudioConfig; + extern GtkWidget * Preferences; + extern GtkWidget * prEFontName; + + extern GtkWidget * create_Preferences( void ); +-#ifdef USE_OSS_AUDIO +-extern GtkWidget * create_OSSConfig( void ); +-#endif +-#ifdef HAVE_SDL +-extern GtkWidget * create_SDLConfig( void ); +-#endif ++extern GtkWidget * create_AudioConfig( void ); + + extern void ShowPreferences( void ); + diff --git a/media-video/mplayer/metadata.xml b/media-video/mplayer/metadata.xml index 1cadc2e4ec21..574336c37a69 100644 --- a/media-video/mplayer/metadata.xml +++ b/media-video/mplayer/metadata.xml @@ -3,6 +3,6 @@ <pkgmetadata> <herd>video</herd> <maintainer> - <email>media-video@gentoo.org</email> + <email>chriswhite@gentoo.org</email> </maintainer> </pkgmetadata> diff --git a/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild b/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild index bbf3a2c9f3ea..a88c46d8e47f 100644 --- a/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild +++ b/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild,v 1.7 2004/07/27 18:34:41 chriswhite Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r2.ebuild,v 1.8 2004/07/28 21:00:19 chriswhite Exp $ inherit eutils flag-o-matic kmod @@ -127,6 +127,11 @@ src_unpack() { #bug #58082. Fixes LANGUAGE variable issues epatch ${FILESDIR}/mplayer-1.0_pre5-r1-conf_locale.patch + #mplayer gui uses oss all the time. + #this patch enables true alsa output in + #gmplayer. Fixes Bug #58619. + use alsa && epatch ${FILESDIR}/${P}-alsa-gui.patch + #Setup the matrox makefile if use matrox; then get_kernel_info |