[MPlayer-cvslog] r33820 - in trunk: gui/interface.c gui/interface.h gui/win32/interface.c mplayer.c

ib subversion at mplayerhq.hu
Tue Jul 5 15:48:55 CEST 2011


Author: ib
Date: Tue Jul  5 15:48:55 2011
New Revision: 33820

Log:
Make guiEventHandling() a gui() call.

The new parameter to use is GUI_HANDLE_EVENTS.

Modified:
   trunk/gui/interface.c
   trunk/gui/interface.h
   trunk/gui/win32/interface.c
   trunk/mplayer.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Jul  5 14:05:06 2011	(r33819)
+++ trunk/gui/interface.c	Tue Jul  5 15:48:55 2011	(r33820)
@@ -598,6 +598,12 @@ int gui(int what, void *arg)
 
         break;
 
+    case GUI_HANDLE_EVENTS:
+        if (!guiInfo.Playing || !guiInfo.MovieWindow)
+            wsHandleEvents();
+        gtkEventHandling();
+        break;
+
     case GUI_RUN_COMMAND:
 
         mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_COMMAND: %d\n", (int)arg);
@@ -1026,14 +1032,6 @@ int gui(int what, void *arg)
     return True;
 }
 
-void guiEventHandling(void)
-{
-    if (!guiInfo.Playing || !guiInfo.MovieWindow)
-        wsHandleEvents();
-
-    gtkEventHandling();
-}
-
 // ---
 #if defined(MP_DEBUG) && 0
 void list(void)

Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h	Tue Jul  5 14:05:06 2011	(r33819)
+++ trunk/gui/interface.h	Tue Jul  5 15:48:55 2011	(r33820)
@@ -49,6 +49,7 @@ extern int use_gui;             // this 
 #define GUI_SET_AFILTER        17
 #define GUI_SET_CONTEXT        18
 #define GUI_END_FILE           19
+#define GUI_HANDLE_EVENTS      20
 
 #define GUI_STOP  0
 #define GUI_PLAY  1
@@ -231,7 +232,6 @@ int gstrcmp(const char *a, const char *b
 char *gstrdup(const char *str);
 void *gtkSet(int cmd, float fparam, void *vparam);
 void guiDone(void);
-void guiEventHandling(void);
 void guiExit(enum exit_reason how);
 int gui(int what, void *arg);
 void guiInit(void);

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Tue Jul  5 14:05:06 2011	(r33819)
+++ trunk/gui/win32/interface.c	Tue Jul  5 15:48:55 2011	(r33820)
@@ -680,6 +680,8 @@ int gui(int what, void *arg)
             if(gtkAutoSyncOn) autosync = gtkAutoSync;
             break;
         }
+        case GUI_HANDLE_EVENTS:
+          break;
         case GUI_SET_MIXER:
         {
             if(audio_out)
@@ -911,5 +913,3 @@ static int update_subwindow(void)
     SendMessage(mygui->subwindow, WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp);
     return 0;
 }
-
-void guiEventHandling(void) {}

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Tue Jul  5 14:05:06 2011	(r33819)
+++ trunk/mplayer.c	Tue Jul  5 15:48:55 2011	(r33820)
@@ -2556,7 +2556,7 @@ static void pause_loop(void)
             mpctx->video_out->check_events();
 #ifdef CONFIG_GUI
         if (use_gui) {
-            guiEventHandling();
+            gui(GUI_HANDLE_EVENTS, 0);
             gui(GUI_REDRAW, 0);
             if (guiInfo.Playing != GUI_PAUSE || (rel_seek_secs || abs_seek_pos))
                 break;
@@ -3094,7 +3094,7 @@ play_next_file:
         while (guiInfo.Playing != GUI_PLAY) {
             mp_cmd_t *cmd;
             usec_sleep(20000);
-            guiEventHandling();
+            gui(GUI_HANDLE_EVENTS, 0);
             gui(GUI_REDRAW, 0);
             if ((cmd = mp_input_get_cmd(0, 0, 0)) != NULL) {
                 gui(GUI_RUN_COMMAND, (void *)cmd->id);
@@ -3812,7 +3812,7 @@ goto_enable_cache:
 
 #ifdef CONFIG_GUI
                 if (use_gui)
-                    guiEventHandling();
+                    gui(GUI_HANDLE_EVENTS, 0);
 #endif
 
                 current_module = "vo_check_events";
@@ -3983,7 +3983,7 @@ goto_enable_cache:
 
 #ifdef CONFIG_GUI
             if (use_gui) {
-                guiEventHandling();
+                gui(GUI_HANDLE_EVENTS, 0);
                 if (mpctx->demuxer->file_format == DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength > 2) {
                     // get pos from frame number / total frames
                     guiInfo.Position = (float)mpctx->d_video->pack_no * 100.0f / mpctx->sh_video->video.dwLength;


More information about the MPlayer-cvslog mailing list