[MPlayer-cvslog] r33734 - in trunk: gui/interface.h gui/ui/actions.c gui/ui/gtk/equalizer.c gui/ui/gtk/menu.c gui/ui/render.c gui/win32/interface.c gui/win32/widgetrender.c mplayer.c
ib
subversion at mplayerhq.hu
Mon Jun 27 12:02:05 CEST 2011
Author: ib
Date: Mon Jun 27 12:02:04 2011
New Revision: 33734
Log:
Rename guiInterface_t member AudioType AudioChannels.
Additionally, simplify code in mplayer.c.
Modified:
trunk/gui/interface.h
trunk/gui/ui/actions.c
trunk/gui/ui/gtk/equalizer.c
trunk/gui/ui/gtk/menu.c
trunk/gui/ui/render.c
trunk/gui/win32/interface.c
trunk/gui/win32/widgetrender.c
trunk/mplayer.c
Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h Sun Jun 26 16:55:51 2011 (r33733)
+++ trunk/gui/interface.h Mon Jun 27 12:02:04 2011 (r33734)
@@ -178,7 +178,7 @@ typedef struct {
float Balance;
int Track;
- int AudioType;
+ int AudioChannels;
int StreamType;
int AudioOnly;
int TimeSec;
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Sun Jun 26 16:55:51 2011 (r33733)
+++ trunk/gui/ui/actions.c Mon Jun 27 12:02:04 2011 (r33734)
@@ -113,7 +113,7 @@ void uiEnd(void)
guiInfo.TimeSec = 0;
guiInfo.Position = 0;
- guiInfo.AudioType = 0;
+ guiInfo.AudioChannels = 0;
guiInfo.NoWindow = False;
#ifdef CONFIG_DVDREAD
Modified: trunk/gui/ui/gtk/equalizer.c
==============================================================================
--- trunk/gui/ui/gtk/equalizer.c Sun Jun 26 16:55:51 2011 (r33733)
+++ trunk/gui/ui/gtk/equalizer.c Mon Jun 27 12:02:04 2011 (r33734)
@@ -105,17 +105,17 @@ static void eqSetChannelNames( void )
str[1]="";
str[0]=MSGTR_EQU_All;
gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- if ( guiInfo.AudioType > 1 )
+ if ( guiInfo.AudioChannels > 1 )
{
str[0]=gtkEquChannel1; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
str[0]=gtkEquChannel2; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
}
- if ( guiInfo.AudioType > 2 )
+ if ( guiInfo.AudioChannels > 2 )
{
str[0]=gtkEquChannel3; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
str[0]=gtkEquChannel4; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
}
- if ( guiInfo.AudioType > 4 )
+ if ( guiInfo.AudioChannels > 4 )
{
str[0]=gtkEquChannel5; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
str[0]=gtkEquChannel6; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
Modified: trunk/gui/ui/gtk/menu.c
==============================================================================
--- trunk/gui/ui/gtk/menu.c Sun Jun 26 16:55:51 2011 (r33733)
+++ trunk/gui/ui/gtk/menu.c Mon Jun 27 12:02:04 2011 (r33734)
@@ -609,7 +609,7 @@ GtkWidget * create_PopUpMenu( void )
AddSeparator( Menu );
MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute );
- if ( !guiInfo.AudioType ) gtk_widget_set_sensitive( MenuItem,FALSE );
+ if ( !guiInfo.AudioChannels ) gtk_widget_set_sensitive( MenuItem,FALSE );
AddMenuItem( window1, (const char*)playlist_xpm, Menu,MSGTR_MENU_PlayList, evPlayList );
AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser );
AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_MENU_Preferences, evPreferences );
Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c Sun Jun 26 16:55:51 2011 (r33733)
+++ trunk/gui/ui/render.c Mon Jun 27 12:02:04 2011 (r33734)
@@ -254,7 +254,7 @@ calclengthmmmmss:
break;
}
- switch (guiInfo.AudioType) {
+ switch (guiInfo.AudioChannels) {
case 0:
av_strlcat(trbuf, "n", sizeof(trbuf));
break;
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Sun Jun 26 16:55:51 2011 (r33733)
+++ trunk/gui/win32/interface.c Mon Jun 27 12:02:04 2011 (r33734)
@@ -411,7 +411,7 @@ void uiEnd( void )
guiInfo.TimeSec = 0;
guiInfo.Position = 0;
- guiInfo.AudioType = 0;
+ guiInfo.AudioChannels = 0;
#ifdef CONFIG_DVDREAD
guiInfo.DVD.current_title = 1;
Modified: trunk/gui/win32/widgetrender.c
==============================================================================
--- trunk/gui/win32/widgetrender.c Sun Jun 26 16:55:51 2011 (r33733)
+++ trunk/gui/win32/widgetrender.c Mon Jun 27 12:02:04 2011 (r33734)
@@ -156,8 +156,8 @@ static char *generatetextfromlabel(widge
else if(guiInfo.Playing == GUI_PAUSE) stringreplace(text, NULL, "e");
}
- if(guiInfo.AudioType == 0) stringreplace(text, "$a", "n");
- else if(guiInfo.AudioType == 1) stringreplace(text, "$a", "m");
+ if(guiInfo.AudioChannels == 0) stringreplace(text, "$a", "n");
+ else if(guiInfo.AudioChannels == 1) stringreplace(text, "$a", "m");
else stringreplace(text, "$a", "t");
if(guiInfo.StreamType == 0)
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c Sun Jun 26 16:55:51 2011 (r33733)
+++ trunk/mplayer.c Mon Jun 27 12:02:04 2011 (r33734)
@@ -3677,10 +3677,7 @@ goto_enable_cache:
#ifdef CONFIG_GUI
if (use_gui) {
- if (mpctx->sh_audio)
- guiInfo.AudioType = mpctx->sh_audio->channels;
- else
- guiInfo.AudioType = 0;
+ guiInfo.AudioChannels = mpctx->sh_audio ? mpctx->sh_audio->channels : 0;
if (!mpctx->sh_video && mpctx->sh_audio)
guiGetEvent(guiSetAudioOnly, (char *)1);
else
More information about the MPlayer-cvslog
mailing list