[MPlayer-cvslog] r33985 - in trunk: gui/interface.c gui/interface.h gui/ui/actions.c gui/ui/gtk/fileselect.c gui/ui/gtk/preferences.c gui/ui/main.c gui/ui/render.c gui/win32/interface.c gui/win32/widgetrender.c mpl...
ib
subversion at mplayerhq.hu
Fri Aug 12 17:25:31 CEST 2011
Author: ib
Date: Fri Aug 12 17:25:30 2011
New Revision: 33985
Log:
Cosmetic: Rename some guiInfo members.
Rename TimeSec ElapsedTime and LengthInSec RunningTime for clarity.
Rename AudioFile AudioFilename and Subtitlename SubtitleFilename
for consistency.
Modified:
trunk/gui/interface.c
trunk/gui/interface.h
trunk/gui/ui/actions.c
trunk/gui/ui/gtk/fileselect.c
trunk/gui/ui/gtk/preferences.c
trunk/gui/ui/main.c
trunk/gui/ui/render.c
trunk/gui/win32/interface.c
trunk/gui/win32/widgetrender.c
trunk/mplayer.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/interface.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -273,7 +273,7 @@ void guiInit(void)
uiSetFileName(plCurrent->path, plCurrent->name, STREAMTYPE_FILE);
if (subdata)
- setdup(&guiInfo.Subtitlename, subdata->filename);
+ setdup(&guiInfo.SubtitleFilename, subdata->filename);
mplayerLoadFont();
@@ -606,7 +606,7 @@ int gui(int what, void *data)
// subtitle
-// subdata->filename=gstrdup( guiInfo.Subtitlename );
+// subdata->filename=gstrdup( guiInfo.SubtitleFilename );
stream_dump_type = 0;
if (gtkSubDumpMPSub)
@@ -626,8 +626,8 @@ int gui(int what, void *data)
if (gtkAutoSyncOn)
autosync = gtkAutoSync;
- if (guiInfo.AudioFile)
- audio_stream = gstrdup(guiInfo.AudioFile);
+ if (guiInfo.AudioFilename)
+ audio_stream = gstrdup(guiInfo.AudioFilename);
else if (guiInfo.NewPlay == GUI_FILE_NEW)
nfree(audio_stream);
@@ -788,13 +788,13 @@ int gui(int what, void *data)
setddup(&guiInfo.Filename, next->path, next->name);
guiInfo.StreamType = STREAMTYPE_FILE;
guiInfo.NewPlay = GUI_FILE_NEW;
- nfree(guiInfo.AudioFile);
- nfree(guiInfo.Subtitlename);
+ nfree(guiInfo.AudioFilename);
+ nfree(guiInfo.SubtitleFilename);
} else {
if (guiInfo.NewPlay == GUI_FILE_NEW)
break;
- guiInfo.TimeSec = 0;
+ guiInfo.ElapsedTime = 0;
guiInfo.Position = 0;
guiInfo.AudioChannels = 0;
guiInfo.MovieWindow = True;
Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/interface.h Fri Aug 12 17:25:30 2011 (r33985)
@@ -125,14 +125,14 @@ typedef struct {
int Track;
int AudioChannels;
int StreamType;
- int TimeSec;
- int LengthInSec;
+ int ElapsedTime;
+ int RunningTime;
char *Filename;
- char *Subtitlename;
+ char *SubtitleFilename;
- char *AudioFile;
+ char *AudioFilename;
} guiInterface_t;
extern guiInterface_t guiInfo;
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/ui/actions.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -263,8 +263,8 @@ void uiSetFileName(char *dir, char *name
setddup(&guiInfo.Filename, dir, name);
guiInfo.StreamType = type;
- nfree(guiInfo.AudioFile);
- nfree(guiInfo.Subtitlename);
+ nfree(guiInfo.AudioFilename);
+ nfree(guiInfo.SubtitleFilename);
}
void uiCurr(void)
Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/ui/gtk/fileselect.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -278,7 +278,7 @@ void ShowFileSelect( int type,int modal
gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
g_list_free( fsList_items );
gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsSubtitleFilterNames[k >= 0 ? k : i-2][0] );
- tmp=guiInfo.Subtitlename;
+ tmp=guiInfo.SubtitleFilename;
break;
/* case fsOtherSelector:
gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect );
@@ -299,7 +299,7 @@ void ShowFileSelect( int type,int modal
gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
g_list_free( fsList_items );
gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsAudioFileNames[k >= 0 ? k : i-2][0] );
- tmp=guiInfo.AudioFile;
+ tmp=guiInfo.AudioFilename;
break;
case fsFontSelector:
gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FontSelect );
@@ -492,19 +492,19 @@ static void fs_Ok_released( GtkButton *
setddup( &guiInfo.Filename,fsSelectedDirectory,fsSelectedFile );
guiInfo.StreamType=STREAMTYPE_FILE;
guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0;
- nfree( guiInfo.AudioFile );
- nfree( guiInfo.Subtitlename );
+ nfree( guiInfo.AudioFilename );
+ nfree( guiInfo.SubtitleFilename );
fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history
break;
case fsSubtitleSelector:
- setddup( &guiInfo.Subtitlename,fsSelectedDirectory,fsSelectedFile );
- mplayerLoadSubtitle( guiInfo.Subtitlename );
+ setddup( &guiInfo.SubtitleFilename,fsSelectedDirectory,fsSelectedFile );
+ mplayerLoadSubtitle( guiInfo.SubtitleFilename );
break;
/* case fsOtherSelector:
setddup( &guiInfo.Othername,fsSelectedDirectory,fsSelectedFile );
break;*/
case fsAudioSelector:
- setddup( &guiInfo.AudioFile,fsSelectedDirectory,fsSelectedFile );
+ setddup( &guiInfo.AudioFilename,fsSelectedDirectory,fsSelectedFile );
break;
case fsFontSelector:
setddup( &font_name,fsSelectedDirectory,fsSelectedFile );
Modified: trunk/gui/ui/gtk/preferences.c
==============================================================================
--- trunk/gui/ui/gtk/preferences.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/ui/gtk/preferences.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -313,7 +313,7 @@ void ShowPreferences( void )
case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ),TRUE ); break;
}
#if 0
- if ( guiInfo.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiInfo.Subtitlename );
+ if ( guiInfo.SubtitleFilename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiInfo.SubtitleFilename );
#endif
#ifdef CONFIG_ICONV
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/ui/main.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -108,8 +108,8 @@ static void guiInfoMediumClear (int what
if (what & CLEAR_FILE)
{
nfree(guiInfo.Filename);
- nfree(guiInfo.Subtitlename);
- nfree(guiInfo.AudioFile);
+ nfree(guiInfo.SubtitleFilename);
+ nfree(guiInfo.AudioFilename);
listSet(gtkDelPl, NULL);
}
@@ -143,8 +143,8 @@ void uiEventHandling( int msg,float para
break;
case evPlayNetwork:
- nfree( guiInfo.Subtitlename );
- nfree( guiInfo.AudioFile );
+ nfree( guiInfo.SubtitleFilename );
+ nfree( guiInfo.AudioFilename );
guiInfo.StreamType=STREAMTYPE_STREAM;
goto play;
case evSetURL:
@@ -272,7 +272,7 @@ NoPause:
break;
case evLoadSubtitle: gtkShow( evLoadSubtitle,NULL ); break;
case evDropSubtitle:
- nfree( guiInfo.Subtitlename );
+ nfree( guiInfo.SubtitleFilename );
mplayerLoadSubtitle( NULL );
break;
case evLoadAudioFile: gtkShow( evLoadAudioFile,NULL ); break;
@@ -660,8 +660,8 @@ void uiDandDHandler(int num,char** files
uiEventHandling( evPlay,0 );
}
if (subtitles) {
- nfree(guiInfo.Subtitlename);
- guiInfo.Subtitlename = subtitles;
- mplayerLoadSubtitle(guiInfo.Subtitlename);
+ nfree(guiInfo.SubtitleFilename);
+ guiInfo.SubtitleFilename = subtitles;
+ mplayerLoadSubtitle(guiInfo.SubtitleFilename);
}
}
Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/ui/render.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -148,44 +148,44 @@ static char *Translate(char *str)
break;
case '6':
- t = guiInfo.LengthInSec;
+ t = guiInfo.RunningTime;
goto calclengthhhmmss;
case '1':
- t = guiInfo.TimeSec;
+ t = guiInfo.ElapsedTime;
calclengthhhmmss:
snprintf(tmp, sizeof(tmp), "%02d:%02d:%02d", t / 3600, t / 60 % 60, t % 60);
av_strlcat(trbuf, tmp, sizeof(trbuf));
break;
case '7':
- t = guiInfo.LengthInSec;
+ t = guiInfo.RunningTime;
goto calclengthmmmmss;
case '2':
- t = guiInfo.TimeSec;
+ t = guiInfo.ElapsedTime;
calclengthmmmmss:
snprintf(tmp, sizeof(tmp), "%04d:%02d", t / 60, t % 60);
av_strlcat(trbuf, tmp, sizeof(trbuf));
break;
case '3':
- snprintf(tmp, sizeof(tmp), "%02d", guiInfo.TimeSec / 3600);
+ snprintf(tmp, sizeof(tmp), "%02d", guiInfo.ElapsedTime / 3600);
av_strlcat(trbuf, tmp, sizeof(trbuf));
break;
case '4':
- snprintf(tmp, sizeof(tmp), "%02d", (guiInfo.TimeSec / 60) % 60);
+ snprintf(tmp, sizeof(tmp), "%02d", (guiInfo.ElapsedTime / 60) % 60);
av_strlcat(trbuf, tmp, sizeof(trbuf));
break;
case '5':
- snprintf(tmp, sizeof(tmp), "%02d", guiInfo.TimeSec % 60);
+ snprintf(tmp, sizeof(tmp), "%02d", guiInfo.ElapsedTime % 60);
av_strlcat(trbuf, tmp, sizeof(trbuf));
break;
case '8':
- snprintf(tmp, sizeof(tmp), "%01d:%02d:%02d", guiInfo.TimeSec / 3600, (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60);
+ snprintf(tmp, sizeof(tmp), "%01d:%02d:%02d", guiInfo.ElapsedTime / 3600, (guiInfo.ElapsedTime / 60) % 60, guiInfo.ElapsedTime % 60);
av_strlcat(trbuf, tmp, sizeof(trbuf));
break;
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/win32/interface.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -341,8 +341,8 @@ void uiSetFileName(char *dir, char *name
setddup(&guiInfo.Filename, dir, name);
guiInfo.StreamType = type;
- nfree(guiInfo.AudioFile);
- nfree(guiInfo.Subtitlename);
+ nfree(guiInfo.AudioFilename);
+ nfree(guiInfo.SubtitleFilename);
}
void uiFullScreen( void )
@@ -664,7 +664,7 @@ int gui(int what, void *data)
if(guiInfo.NewPlay == GUI_FILE_NEW)
break;
- guiInfo.TimeSec = 0;
+ guiInfo.ElapsedTime = 0;
guiInfo.Position = 0;
guiInfo.AudioChannels = 0;
Modified: trunk/gui/win32/widgetrender.c
==============================================================================
--- trunk/gui/win32/widgetrender.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/gui/win32/widgetrender.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -127,17 +127,17 @@ static char *generatetextfromlabel(widge
}
strcpy(text, item->label);
if(item->type == tySlabel) return text;
- stringreplace(text, "$1", "%.2i:%.2i:%.2i", guiInfo.TimeSec / 3600,
- (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60);
- stringreplace(text, "$2", "%.4i:%.2i", guiInfo.TimeSec / 60, guiInfo.TimeSec % 60);
- stringreplace(text, "$3", "%.2i", guiInfo.TimeSec / 3600);
- stringreplace(text, "$4", "%.2i", (guiInfo.TimeSec / 60) % 60);
- stringreplace(text, "$5", "%.2i", guiInfo.TimeSec % 60);
- stringreplace(text, "$6", "%.2i:%.2i:%.2i", guiInfo.LengthInSec / 3600,
- (guiInfo.LengthInSec / 60) % 60, guiInfo.LengthInSec % 60);
- stringreplace(text, "$7", "%.4i:%.2i", guiInfo.LengthInSec / 60, guiInfo.LengthInSec % 60);
- stringreplace(text, "$8", "%i:%.2i:%.2i", guiInfo.TimeSec / 3600,
- (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60);
+ stringreplace(text, "$1", "%.2i:%.2i:%.2i", guiInfo.ElapsedTime / 3600,
+ (guiInfo.ElapsedTime / 60) % 60, guiInfo.ElapsedTime % 60);
+ stringreplace(text, "$2", "%.4i:%.2i", guiInfo.ElapsedTime / 60, guiInfo.ElapsedTime % 60);
+ stringreplace(text, "$3", "%.2i", guiInfo.ElapsedTime / 3600);
+ stringreplace(text, "$4", "%.2i", (guiInfo.ElapsedTime / 60) % 60);
+ stringreplace(text, "$5", "%.2i", guiInfo.ElapsedTime % 60);
+ stringreplace(text, "$6", "%.2i:%.2i:%.2i", guiInfo.RunningTime / 3600,
+ (guiInfo.RunningTime / 60) % 60, guiInfo.RunningTime % 60);
+ stringreplace(text, "$7", "%.4i:%.2i", guiInfo.RunningTime / 60, guiInfo.RunningTime % 60);
+ stringreplace(text, "$8", "%i:%.2i:%.2i", guiInfo.ElapsedTime / 3600,
+ (guiInfo.ElapsedTime / 60) % 60, guiInfo.ElapsedTime % 60);
stringreplace(text, "$v", "%3.2f", guiInfo.Volume);
stringreplace(text, "$V", "%3.1f", guiInfo.Volume);
stringreplace(text, "$b", "%3.2f", guiInfo.Balance);
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c Fri Aug 12 16:56:19 2011 (r33984)
+++ trunk/mplayer.c Fri Aug 12 17:25:30 2011 (r33985)
@@ -3967,10 +3967,10 @@ goto_enable_cache:
guiInfo.Position = demuxer_get_percent_pos(mpctx->demuxer);
}
if (mpctx->sh_video)
- guiInfo.TimeSec = mpctx->sh_video->pts;
+ guiInfo.ElapsedTime = mpctx->sh_video->pts;
else if (mpctx->sh_audio)
- guiInfo.TimeSec = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
- guiInfo.LengthInSec = demuxer_get_time_length(mpctx->demuxer);
+ guiInfo.ElapsedTime = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
+ guiInfo.RunningTime = demuxer_get_time_length(mpctx->demuxer);
gui(GUI_SET_MIXER, 0);
gui(GUI_REDRAW, 0);
if (guiInfo.Playing == GUI_STOP)
More information about the MPlayer-cvslog
mailing list