[MPlayer-cvslog] r33989 - in trunk/gui: interface.c interface.h ui/actions.c ui/gtk/menu.c ui/main.c ui/render.c win32/interface.c win32/widgetrender.c
ib
subversion at mplayerhq.hu
Mon Aug 15 15:27:58 CEST 2011
Author: ib
Date: Mon Aug 15 15:27:58 2011
New Revision: 33989
Log:
Cosmetic: Rename guiInfo members.
Change Movie into Video.
Modified:
trunk/gui/interface.c
trunk/gui/interface.h
trunk/gui/ui/actions.c
trunk/gui/ui/gtk/menu.c
trunk/gui/ui/main.c
trunk/gui/ui/render.c
trunk/gui/win32/interface.c
trunk/gui/win32/widgetrender.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Mon Aug 15 11:38:32 2011 (r33988)
+++ trunk/gui/interface.c Mon Aug 15 15:27:58 2011 (r33989)
@@ -57,8 +57,8 @@
#endif
guiInterface_t guiInfo = {
+ .VideoWindow = True,
.StreamType = STREAMTYPE_DUMMY,
- .MovieWindow = True,
.Balance = 50.0f
};
@@ -401,7 +401,7 @@ int gui(int what, void *data)
break;
case GUI_HANDLE_EVENTS:
- if (!guiInfo.Playing || !guiInfo.MovieWindow)
+ if (!guiInfo.Playing || !guiInfo.VideoWindow)
wsHandleEvents();
gtkEventHandling();
break;
@@ -498,12 +498,12 @@ int gui(int what, void *data)
{
int i = 0;
- guiInfo.MovieWindow = True;
+ guiInfo.VideoWindow = True;
while (video_out_drivers[i++]) {
if (video_out_drivers[i - 1]->control(VOCTRL_GUISUPPORT, NULL) == VO_TRUE) {
if ((video_driver_list && !gstrcmp(video_driver_list[0], (char *)video_out_drivers[i - 1]->info->short_name)) && (video_out_drivers[i - 1]->control(VOCTRL_GUI_NOWINDOW, NULL) == VO_TRUE)) {
- guiInfo.MovieWindow = False;
+ guiInfo.VideoWindow = False;
break;
}
}
@@ -709,7 +709,7 @@ int gui(int what, void *data)
guiInfo.AudioChannels = data ? ((sh_audio_t *)data)->channels : 0;
if (data && !guiInfo.sh_video)
- guiInfo.MovieWindow = False;
+ guiInfo.VideoWindow = False;
gui(GUI_SET_MIXER, 0);
@@ -727,7 +727,7 @@ int gui(int what, void *data)
}
}
- wsVisibleWindow(&guiApp.subWindow, (guiInfo.MovieWindow ? wsShowWindow : wsHideWindow));
+ wsVisibleWindow(&guiApp.subWindow, (guiInfo.VideoWindow ? wsShowWindow : wsHideWindow));
break;
case GUI_SET_MIXER:
@@ -763,8 +763,8 @@ int gui(int what, void *data)
wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y);
}
- guiInfo.MovieWidth = vo_dwidth;
- guiInfo.MovieHeight = vo_dheight;
+ guiInfo.VideoWidth = vo_dwidth;
+ guiInfo.VideoHeight = vo_dheight;
if (guiWinID >= 0)
wsMoveWindow(&guiApp.mainWindow, False, 0, vo_dheight);
@@ -799,7 +799,7 @@ int gui(int what, void *data)
guiInfo.ElapsedTime = 0;
guiInfo.Position = 0;
guiInfo.AudioChannels = 0;
- guiInfo.MovieWindow = True;
+ guiInfo.VideoWindow = True;
#ifdef CONFIG_DVDREAD
guiInfo.Track = 1;
Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h Mon Aug 15 11:38:32 2011 (r33988)
+++ trunk/gui/interface.h Mon Aug 15 15:27:58 2011 (r33989)
@@ -98,9 +98,9 @@ typedef struct {
sh_video_t *sh_video;
af_stream_t *afilter;
- int MovieWidth;
- int MovieHeight;
- int MovieWindow;
+ int VideoWidth;
+ int VideoHeight;
+ int VideoWindow;
int StreamType; // public, read access by MPlayer
int AudioChannels;
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Mon Aug 15 11:38:32 2011 (r33988)
+++ trunk/gui/ui/actions.c Mon Aug 15 15:27:58 2011 (r33989)
@@ -43,12 +43,12 @@ int uiGotoTheNext = 1;
void uiFullScreen(void)
{
- if (!guiInfo.MovieWindow && guiInfo.Playing)
+ if (!guiInfo.VideoWindow && guiInfo.Playing)
return;
if (guiInfo.Playing && guiApp.subWindow.isFullScreen) {
- guiApp.subWindow.OldWidth = guiInfo.MovieWidth;
- guiApp.subWindow.OldHeight = guiInfo.MovieHeight;
+ guiApp.subWindow.OldWidth = guiInfo.VideoWidth;
+ guiApp.subWindow.OldHeight = guiInfo.VideoHeight;
switch (guiApp.sub.x) {
case -1:
Modified: trunk/gui/ui/gtk/menu.c
==============================================================================
--- trunk/gui/ui/gtk/menu.c Mon Aug 15 11:38:32 2011 (r33988)
+++ trunk/gui/ui/gtk/menu.c Mon Aug 15 15:27:58 2011 (r33989)
@@ -617,16 +617,16 @@ GtkWidget * create_PopUpMenu( void )
AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_MENU_Preferences, evPreferences );
AddMenuItem( window1, (const char*)equalizer_xpm, Menu,MSGTR_Equalizer, evEqualizer );
- if ( guiInfo.MovieWindow )
+ if ( guiInfo.VideoWindow )
{
int b1 = 0, b2 = 0, b_half = 0;
AddSeparator( Menu );
if ( !guiApp.subWindow.isFullScreen && guiInfo.Playing )
{
- if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth * 2 )&&
- ( guiApp.subWindow.Height == guiInfo.MovieHeight * 2 ) ) b2=1;
- else if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth / 2 ) &&
- ( guiApp.subWindow.Height == guiInfo.MovieHeight / 2 ) ) b_half=1;
+ if ( ( guiApp.subWindow.Width == guiInfo.VideoWidth * 2 )&&
+ ( guiApp.subWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=1;
+ else if ( ( guiApp.subWindow.Width == guiInfo.VideoWidth / 2 ) &&
+ ( guiApp.subWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=1;
else b1=1;
} else b1=!guiApp.subWindow.isFullScreen;
H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize );
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Mon Aug 15 11:38:32 2011 (r33988)
+++ trunk/gui/ui/main.c Mon Aug 15 15:27:58 2011 (r33989)
@@ -262,7 +262,7 @@ NoPause:
case evStop:
guiInfo.Playing=GUI_STOP;
uiState();
- guiInfo.MovieWindow=True;
+ guiInfo.VideoWindow=True;
break;
case evLoadPlay:
@@ -338,10 +338,10 @@ set_volume:
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth / 2, guiInfo.MovieHeight / 2 );
+ wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
wsMoveWindow( &guiApp.subWindow, False,
- ( wsMaxX - guiInfo.MovieWidth/2 )/2 + wsOrgX,
- ( wsMaxY - guiInfo.MovieHeight/2 )/2 + wsOrgY );
+ ( wsMaxX - guiInfo.VideoWidth/2 )/2 + wsOrgX,
+ ( wsMaxY - guiInfo.VideoHeight/2 )/2 + wsOrgY );
}
break;
case evDoubleSize:
@@ -352,10 +352,10 @@ set_volume:
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth * 2, guiInfo.MovieHeight * 2 );
+ wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
wsMoveWindow( &guiApp.subWindow, False,
- ( wsMaxX - guiInfo.MovieWidth*2 )/2 + wsOrgX,
- ( wsMaxY - guiInfo.MovieHeight*2 )/2 + wsOrgY );
+ ( wsMaxX - guiInfo.VideoWidth*2 )/2 + wsOrgX,
+ ( wsMaxY - guiInfo.VideoHeight*2 )/2 + wsOrgY );
}
break;
case evNormalSize:
@@ -366,10 +366,10 @@ set_volume:
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth, guiInfo.MovieHeight );
+ wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
wsMoveWindow( &guiApp.subWindow, False,
- ( wsMaxX - guiInfo.MovieWidth )/2 + wsOrgX,
- ( wsMaxY - guiInfo.MovieHeight )/2 + wsOrgY );
+ ( wsMaxX - guiInfo.VideoWidth )/2 + wsOrgX,
+ ( wsMaxY - guiInfo.VideoHeight )/2 + wsOrgY );
break;
} else if ( !guiApp.subWindow.isFullScreen ) break;
case evFullScreen:
Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c Mon Aug 15 11:38:32 2011 (r33988)
+++ trunk/gui/ui/render.c Mon Aug 15 15:27:58 2011 (r33989)
@@ -210,12 +210,12 @@ calclengthmmmmss:
break;
case 'x':
- snprintf(tmp, sizeof(tmp), "%d", guiInfo.MovieWidth);
+ snprintf(tmp, sizeof(tmp), "%d", guiInfo.VideoWidth);
av_strlcat(trbuf, tmp, sizeof(trbuf));
break;
case 'y':
- snprintf(tmp, sizeof(tmp), "%d", guiInfo.MovieHeight);
+ snprintf(tmp, sizeof(tmp), "%d", guiInfo.VideoHeight);
av_strlcat(trbuf, tmp, sizeof(trbuf));
break;
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Mon Aug 15 11:38:32 2011 (r33988)
+++ trunk/gui/win32/interface.c Mon Aug 15 15:27:58 2011 (r33989)
@@ -473,7 +473,7 @@ int gui(int what, void *data)
}
case GUI_SET_AUDIO:
{
- guiInfo.MovieWindow = (data && !guiInfo.sh_video);
+ guiInfo.VideoWindow = (data && !guiInfo.sh_video);
// NOTE: This type doesn't mean (and never meant) that we have
// *just* audio, so there probably should be a check before
// hiding (see gui/interface.c).
@@ -503,10 +503,10 @@ int gui(int what, void *data)
}
case GUI_SETUP_VIDEO_WINDOW:
{
- guiInfo.MovieWidth = vo_dwidth;
- guiInfo.MovieHeight = vo_dheight;
+ guiInfo.VideoWidth = vo_dwidth;
+ guiInfo.VideoHeight = vo_dheight;
- sub_aspect = (float)guiInfo.MovieWidth/guiInfo.MovieHeight;
+ sub_aspect = (float)guiInfo.VideoWidth/guiInfo.VideoHeight;
if(WinID != -1)
update_subwindow();
break;
@@ -794,13 +794,13 @@ static int update_subwindow(void)
ShowWindow(mygui->subwindow, SW_HIDE);
return 0;
}
- else if(!guiInfo.MovieWindow)
+ else if(!guiInfo.VideoWindow)
return 0;
else ShowWindow(mygui->subwindow, SW_SHOW);
}
/* we've come out of fullscreen at the end of file */
- if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && guiInfo.MovieWindow)
+ if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && guiInfo.VideoWindow)
ShowWindow(mygui->subwindow, SW_SHOWNORMAL);
/* get our current window coordinates */
@@ -828,8 +828,8 @@ static int update_subwindow(void)
}
else
{
- rd.right = rd.left+guiInfo.MovieWidth;
- rd.bottom = rd.top+guiInfo.MovieHeight;
+ rd.right = rd.left+guiInfo.VideoWidth;
+ rd.bottom = rd.top+guiInfo.VideoHeight;
if (movie_aspect > 0.0) // forced aspect from the cmdline
sub_aspect = movie_aspect;
Modified: trunk/gui/win32/widgetrender.c
==============================================================================
--- trunk/gui/win32/widgetrender.c Mon Aug 15 11:38:32 2011 (r33988)
+++ trunk/gui/win32/widgetrender.c Mon Aug 15 15:27:58 2011 (r33989)
@@ -144,8 +144,8 @@ static char *generatetextfromlabel(widge
stringreplace(text, "$B", "%3.1f", guiInfo.Balance);
stringreplace(text, "$t", "%.2i", guiInfo.Track);
stringreplace(text, "$o", "%s", guiInfo.Filename);
- stringreplace(text, "$x", "%i", guiInfo.MovieWidth);
- stringreplace(text, "$y", "%i", guiInfo.MovieHeight);
+ stringreplace(text, "$x", "%i", guiInfo.VideoWidth);
+ stringreplace(text, "$y", "%i", guiInfo.VideoHeight);
stringreplace(text, "$C", "%s", guiInfo.sh_video ? codecname : "");
stringreplace(text, "$$", "$");
More information about the MPlayer-cvslog
mailing list