Mercurial > mplayer.hg
changeset 33890:c51e44dd38e2
Remove needless guiInfo member DiskChanged.
Use existing member NewPlay for this, because DiskChanged means
NewPlay but with the same file.
The #ifdef CONFIG_DVDREAD has been removed, because this affects
CONFIG_VCD as well and NewPlay is always available.
author | ib |
---|---|
date | Fri, 12 Aug 2011 13:14:13 +0000 |
parents | ab5aca1a07ce |
children | efab1fd86316 |
files | gui/interface.c gui/interface.h gui/ui/main.c gui/win32/interface.c mplayer.c |
diffstat | 5 files changed, 20 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Fri Aug 12 10:23:25 2011 +0000 +++ b/gui/interface.c Fri Aug 12 13:14:13 2011 +0000 @@ -633,7 +633,6 @@ // audio_stream = NULL; - guiInfo.DiskChanged = 0; guiInfo.FilenameChanged = 0; guiInfo.NewPlay = 0; @@ -789,11 +788,12 @@ plLastPlayed = next; setddup(&guiInfo.Filename, next->path, next->name); guiInfo.StreamType = STREAMTYPE_FILE; - guiInfo.FilenameChanged = guiInfo.NewPlay = 1; + guiInfo.FilenameChanged = 1; + guiInfo.NewPlay = GUI_FILE_NEW; nfree(guiInfo.AudioFile); nfree(guiInfo.Subtitlename); } else { - if (guiInfo.FilenameChanged || guiInfo.NewPlay) + if (guiInfo.FilenameChanged || (guiInfo.NewPlay == GUI_FILE_NEW)) break; guiInfo.TimeSec = 0;
--- a/gui/interface.h Fri Aug 12 10:23:25 2011 +0000 +++ b/gui/interface.h Fri Aug 12 13:14:13 2011 +0000 @@ -59,6 +59,9 @@ #define GUI_PLAY 1 #define GUI_PAUSE 2 +#define GUI_FILE_SAME 1 +#define GUI_FILE_NEW 2 + enum { MPLAYER_EXIT_GUI, MPLAYER_SET_AUTO_QUALITY, @@ -91,7 +94,6 @@ sh_video_t *sh_video; af_stream_t *afilter; - int DiskChanged; int NewPlay; #ifdef CONFIG_DVDREAD
--- a/gui/ui/main.c Fri Aug 12 10:23:25 2011 +0000 +++ b/gui/ui/main.c Fri Aug 12 13:14:13 2011 +0000 @@ -201,6 +201,7 @@ case STREAMTYPE_STREAM: case STREAMTYPE_FILE: guiInfoMediumClear( CLEAR_ALL - CLEAR_FILE ); + guiInfo.NewPlay=GUI_FILE_NEW; break; #ifdef CONFIG_VCD case STREAMTYPE_VCD: @@ -211,7 +212,7 @@ { if ( !guiInfo.Track ) guiInfo.Track=2; - guiInfo.DiskChanged=1; + guiInfo.NewPlay=GUI_FILE_SAME; } break; #endif @@ -222,12 +223,11 @@ uiSetFileName( NULL,dvd_device,STREAMTYPE_DVD ); if ( guiInfo.Playing != GUI_PAUSE ) { - guiInfo.DiskChanged=1; + guiInfo.NewPlay=GUI_FILE_SAME; } break; #endif } - guiInfo.NewPlay=1; uiPlay(); break; #ifdef CONFIG_DVDREAD @@ -391,7 +391,7 @@ if ( guiInfo.StreamType == STREAMTYPE_DVD || guiInfo.StreamType == STREAMTYPE_VCD ) goto play_dvd_2; else #endif - guiInfo.NewPlay=1; + guiInfo.NewPlay=GUI_FILE_NEW; break; // --- timer events
--- a/gui/win32/interface.c Fri Aug 12 10:23:25 2011 +0000 +++ b/gui/win32/interface.c Fri Aug 12 13:14:13 2011 +0000 @@ -117,7 +117,7 @@ guiInfo.Track = dvd_title; guiInfo.Chapter = dvd_chapter; guiInfo.Angle = dvd_angle; - guiInfo.DiskChanged = 1; + guiInfo.NewPlay = GUI_FILE_SAME; uiSetFileName(NULL, dvd_device, STREAMTYPE_DVD); dvdname[0] = 0; @@ -235,14 +235,15 @@ #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: { - guiInfo.DiskChanged = 1; + guiInfo.NewPlay = GUI_FILE_SAME; gui(GUI_SET_STATE, (void *) GUI_PLAY); break; } #endif default: { - guiInfo.FilenameChanged = guiInfo.NewPlay = 1; + guiInfo.FilenameChanged = 1; + guiInfo.NewPlay = GUI_FILE_NEW; update_playlistwindow(); uiGotoTheNext = guiInfo.Playing? 0 : 1; gui(GUI_SET_STATE, (void *) GUI_STOP); @@ -271,7 +272,7 @@ uiPause(); return; } - guiInfo.NewPlay = 1; + guiInfo.NewPlay = GUI_FILE_NEW; gui(GUI_SET_STATE, (void *) GUI_PLAY); } @@ -447,7 +448,6 @@ case GUI_PREPARE: { gui(GUI_SET_FILE, 0); - guiInfo.DiskChanged = 0; guiInfo.FilenameChanged = 0; guiInfo.NewPlay = 0; switch(guiInfo.StreamType) @@ -657,12 +657,13 @@ if(movie_aspect >= 0) movie_aspect = -1; - uiGotoTheNext = guiInfo.FilenameChanged = guiInfo.NewPlay = 1; + uiGotoTheNext = guiInfo.FilenameChanged = 1; + guiInfo.NewPlay = GUI_FILE_NEW; uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_STREAM); //sprintf(guiInfo.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename); } - if(guiInfo.FilenameChanged && guiInfo.NewPlay) + if(guiInfo.FilenameChanged && (guiInfo.NewPlay == GUI_FILE_NEW)) break; guiInfo.TimeSec = 0;
--- a/mplayer.c Fri Aug 12 10:23:25 2011 +0000 +++ b/mplayer.c Fri Aug 12 13:14:13 2011 +0000 @@ -3977,7 +3977,7 @@ break; // STOP if (guiInfo.Playing == GUI_PAUSE) mpctx->osd_function = OSD_PAUSE; - if (guiInfo.DiskChanged || guiInfo.NewPlay) + if (guiInfo.NewPlay) goto goto_next_file; #ifdef CONFIG_DVDREAD if (mpctx->stream->type == STREAMTYPE_DVD) { @@ -4076,9 +4076,7 @@ #ifdef CONFIG_GUI if (use_gui) { -#ifdef CONFIG_DVDREAD - if (!guiInfo.DiskChanged) -#endif + if (guiInfo.NewPlay != GUI_FILE_SAME) gui(GUI_END_FILE, 0); } #endif