Mercurial > mplayer.hg
changeset 34052:9f19a87d2062
Remove gui() instruction GUI_SET_FILE.
Move the preparation part to GUI_PREPARE and the part
resetting variable guiInfo.sh_video to GUI_END_FILE.
author | ib |
---|---|
date | Tue, 27 Sep 2011 14:15:42 +0000 |
parents | 1be07d02d453 |
children | 77c1b5736020 |
files | gui/interface.c gui/interface.h gui/win32/interface.c mplayer.c |
diffstat | 4 files changed, 36 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Mon Sep 26 17:25:45 2011 +0000 +++ b/gui/interface.c Tue Sep 27 14:15:42 2011 +0000 @@ -344,26 +344,6 @@ uiState(); break; - case GUI_SET_FILE: - -// if ( guiInfo.Playing == 1 && guiInfo.NewPlay == GUI_FILE_NEW ) - if (guiInfo.NewPlay == GUI_FILE_NEW) { - dvd_title = 0; - audio_id = -1; - video_id = -1; - dvdsub_id = -1; - vobsub_id = -1; - - stream_cache_size = -1; - autosync = 0; - force_fps = 0; - } - - guiInfo.sh_video = NULL; - wsPostRedisplay(&guiApp.subWindow); - - break; - case GUI_HANDLE_EVENTS: if (!guiInfo.Playing || !guiInfo.VideoWindow) wsHandleEvents(); @@ -400,9 +380,19 @@ case GUI_PREPARE: - gui(GUI_SET_FILE, 0); + wsVisibleMouse(&guiApp.subWindow, wsHideMouseCursor); - wsVisibleMouse(&guiApp.subWindow, wsHideMouseCursor); + if (guiInfo.NewPlay == GUI_FILE_NEW) { + dvd_title = 0; + audio_id = -1; + video_id = -1; + dvdsub_id = -1; + vobsub_id = -1; + + stream_cache_size = -1; + autosync = 0; + force_fps = 0; + } switch (guiInfo.StreamType) { case STREAMTYPE_PLAYLIST: @@ -767,6 +757,8 @@ uiEventHandling(evRedraw, 1); + guiInfo.sh_video = NULL; + if (!uiGotoTheNext && guiInfo.Playing) { uiGotoTheNext = 1; break;
--- a/gui/interface.h Mon Sep 26 17:25:45 2011 +0000 +++ b/gui/interface.h Tue Sep 27 14:15:42 2011 +0000 @@ -49,7 +49,6 @@ GUI_SET_AFILTER, GUI_SET_AUDIO, GUI_SET_CONTEXT, - GUI_SET_FILE, GUI_SET_MIXER, GUI_SET_STATE, GUI_SET_STREAM,
--- a/gui/win32/interface.c Mon Sep 26 17:25:45 2011 +0000 +++ b/gui/win32/interface.c Tue Sep 27 14:15:42 2011 +0000 @@ -446,7 +446,28 @@ { case GUI_PREPARE: { - gui(GUI_SET_FILE, 0); + audio_id = -1; + video_id = -1; + dvdsub_id = -1; + vobsub_id = -1; + stream_cache_size = -1; + autosync = 0; + dvd_title = 0; + force_fps = 0; + if(!mygui->playlist->tracks) return 0; + filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename; + guiInfo.Track = mygui->playlist->current + 1; + if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); + if(gtkAOExtraStereo) + { + char *name = malloc(12 + 20 + 1); + snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); + name[12 + 20] = 0; + greplace(&af_cfg.list, "extrastereo", name); + free(name); + } + if(gtkCacheOn) stream_cache_size = gtkCacheSize; + if(gtkAutoSyncOn) autosync = gtkAutoSync; guiInfo.NewPlay = 0; switch(guiInfo.StreamType) { @@ -594,32 +615,6 @@ } break; } - case GUI_SET_FILE: - { - audio_id = -1; - video_id = -1; - dvdsub_id = -1; - vobsub_id = -1; - stream_cache_size = -1; - autosync = 0; - dvd_title = 0; - force_fps = 0; - if(!mygui->playlist->tracks) return 0; - filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename; - guiInfo.Track = mygui->playlist->current + 1; - if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); - if(gtkAOExtraStereo) - { - char *name = malloc(12 + 20 + 1); - snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); - name[12 + 20] = 0; - greplace(&af_cfg.list, "extrastereo", name); - free(name); - } - if(gtkCacheOn) stream_cache_size = gtkCacheSize; - if(gtkAutoSyncOn) autosync = gtkAutoSync; - break; - } case GUI_HANDLE_EVENTS: break; case GUI_SET_MIXER: