[MPlayer-cvslog] r33813 - in trunk: command.c gui/interface.c gui/interface.h gui/ui/actions.c gui/ui/gtk/fileselect.c gui/win32/dialogs.c gui/win32/interface.c gui/win32/preferences.c libvo/video_out.c libvo/vo_dx...

ib subversion at mplayerhq.hu
Tue Jul 5 12:47:51 CEST 2011


Author: ib
Date: Tue Jul  5 12:47:51 2011
New Revision: 33813

Log:
Rename the gui() symbolic constants.

Use prefix GMP for the constants, rename them and use upper case
characters.

For optical reasons, change parameter arg from NULL to 0 where it
isn't used to pass anything.

Modified:
   trunk/command.c
   trunk/gui/interface.c
   trunk/gui/interface.h
   trunk/gui/ui/actions.c
   trunk/gui/ui/gtk/fileselect.c
   trunk/gui/win32/dialogs.c
   trunk/gui/win32/interface.c
   trunk/gui/win32/preferences.c
   trunk/libvo/video_out.c
   trunk/libvo/vo_dxr3.c
   trunk/libvo/vo_xover.c
   trunk/libvo/x11_common.c
   trunk/mplayer.c

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/command.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -1075,7 +1075,7 @@ static int mp_property_fullscreen(m_opti
     case M_PROPERTY_STEP_DOWN:
 #ifdef CONFIG_GUI
         if (use_gui)
-            gui(guiRunCommand, (void *) MP_CMD_VO_FULLSCREEN);
+            gui(GMP_RUN_COMMAND, (void *) MP_CMD_VO_FULLSCREEN);
         else
 #endif
         if (vo_config_count)
@@ -2801,10 +2801,10 @@ int run_command(MPContext *mpctx, mp_cmd
                     int i = 0;
                     if (n > 0)
                         for (i = 0; i < n; i++)
-                            gui(guiRunCommand, (void *)MP_CMD_PLAY_TREE_STEP);
+                            gui(GMP_RUN_COMMAND, (void *)MP_CMD_PLAY_TREE_STEP);
                     else
                         for (i = 0; i < -1 * n; i++)
-                            gui(guiRunCommand, (void *)-MP_CMD_PLAY_TREE_STEP);
+                            gui(GMP_RUN_COMMAND, (void *)-MP_CMD_PLAY_TREE_STEP);
                 } else
 #endif
                 {
@@ -2966,7 +2966,7 @@ int run_command(MPContext *mpctx, mp_cmd
 #ifdef CONFIG_GUI
             // playtree_iter isn't used by the GUI
             if (use_gui)
-                gui(guiRunCommand, (void *)MP_CMD_STOP);
+                gui(GMP_RUN_COMMAND, (void *)MP_CMD_STOP);
             else
 #endif
             // Go back to the starting point.

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/gui/interface.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -561,11 +561,11 @@ int gui(int type, void *arg)
         mixer = mpctx_get_mixer(guiInfo.mpcontext);
 
     switch (type) {
-    case guiSetContext:
+    case GMP_SET_CONTEXT:
         guiInfo.mpcontext = arg;
         break;
 
-    case guiSetState:
+    case GMP_SET_STATE:
 
         switch ((int)arg) {
         case GUI_STOP:
@@ -579,7 +579,7 @@ int gui(int type, void *arg)
         uiState();
         break;
 
-    case guiNewFile:
+    case GMP_NEW_FILE:
 
 // if ( guiInfo.Playing == 1 && guiInfo.FilenameChanged )
         if (guiInfo.FilenameChanged) {
@@ -598,9 +598,9 @@ int gui(int type, void *arg)
 
         break;
 
-    case guiRunCommand:
+    case GMP_RUN_COMMAND:
 
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] guiRunCommand: %d\n", (int)arg);
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GMP_RUN_COMMAND: %d\n", (int)arg);
 
         switch ((int)arg) {
         case MP_CMD_VO_FULLSCREEN:
@@ -626,9 +626,9 @@ int gui(int type, void *arg)
 
         break;
 
-    case guiPreparation:
+    case GMP_PREPARATION:
 
-        gui(guiNewFile, NULL);
+        gui(GMP_NEW_FILE, 0);
 
         switch (guiInfo.StreamType) {
         case STREAMTYPE_PLAYLIST:
@@ -839,7 +839,7 @@ int gui(int type, void *arg)
 
         break;
 
-    case guiSetStream:
+    case GMP_SET_STREAM:
 
         stream = arg;
         guiInfo.StreamType = stream->type;
@@ -847,7 +847,7 @@ int gui(int type, void *arg)
         switch (guiInfo.StreamType) {
 #ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
-            gui(guiSetDVD, stream->priv);
+            gui(GMP_SET_DVD, stream->priv);
             break;
 #endif
 
@@ -865,7 +865,7 @@ int gui(int type, void *arg)
         break;
 
 #ifdef CONFIG_DVDREAD
-    case guiSetDVD:
+    case GMP_SET_DVD:
         dvd = arg;
         guiInfo.DVD.titles   = dvd->vmg_file->tt_srpt->nr_of_srpts;
         guiInfo.DVD.chapters = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
@@ -881,11 +881,11 @@ int gui(int type, void *arg)
         break;
 #endif
 
-    case guiSetAfilter:
+    case GMP_SET_AFILTER:
         guiInfo.afilter = arg;
         break;
 
-    case guiSetVideo:
+    case GMP_SET_VIDEO:
 
         // video
 
@@ -910,14 +910,14 @@ int gui(int type, void *arg)
 
         break;
 
-    case guiSetAudio:
+    case GMP_SET_AUDIO:
 
         guiInfo.AudioChannels = arg ? ((sh_audio_t *)arg)->channels : 0;
 
         if (arg && !guiInfo.sh_video)
             guiInfo.MovieWindow = False;
 
-        gui(guiSetMixer, NULL);
+        gui(GMP_SET_MIXER, 0);
 
         if (gtkEnableAudioEqualizer) {
             equalizer_t eq;
@@ -936,7 +936,7 @@ int gui(int type, void *arg)
         wsVisibleWindow(&guiApp.subWindow, (guiInfo.MovieWindow ? wsShowWindow : wsHideWindow));
         break;
 
-    case guiSetMixer:
+    case GMP_SET_MIXER:
         if (mixer) {
             float l, r;
             static float last_balance = -1;
@@ -958,11 +958,11 @@ int gui(int type, void *arg)
         }
         break;
 
-    case guiReDraw:
+    case GMP_REDRAW:
         uiEventHandling(evRedraw, 0);
         break;
 
-    case guiSetVideoWindow:
+    case GMP_SETUP_VIDEO_WINDOW:
 
         if (!guiApp.subWindow.isFullScreen) {
             wsResizeWindow(&guiApp.subWindow, vo_dwidth, vo_dheight);
@@ -978,13 +978,13 @@ int gui(int type, void *arg)
         WinID = guiApp.subWindow.WindowID;
         break;
 
-    case guiXEvent:
+    case GMP_X_EVENT:
         guiInfo.event_struct = arg;
         wsEvents(wsDisplay, arg);
         gtkEventHandling();
         break;
 
-    case guiEndFile:
+    case GMP_END_FILE:
 
         if (!uiGotoTheNext && guiInfo.Playing) {
             uiGotoTheNext = 1;
@@ -1019,7 +1019,7 @@ int gui(int type, void *arg)
             } else
                 wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
 
-            gui(guiSetState, (void *)GUI_STOP);
+            gui(GMP_SET_STATE, (void *)GUI_STOP);
             uiSubRender = 1;
             wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
             wsClearWindow(guiApp.subWindow);

Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/gui/interface.h	Tue Jul  5 12:47:51 2011	(r33813)
@@ -35,22 +35,22 @@ extern int use_gui;             // this 
 
 #define GMPlayer "gmplayer"
 
-#define guiXEvent          0
-#define guiSetState        1
-#define guiRunCommand      2
-#define guiSetDVD          3
-#define guiSetAudio        6
+#define GMP_X_EVENT            0
+#define GMP_SET_STATE          1
+#define GMP_RUN_COMMAND        2
+#define GMP_SET_DVD            3
+#define GMP_SET_AUDIO          6
 #define guiReDrawSubWindow 7
-#define guiSetVideoWindow  8
-#define guiSetStream       9
-#define guiReDraw          10
-#define guiSetMixer        11
-#define guiNewFile         12
-#define guiSetVideo        13
-#define guiPreparation     16
-#define guiSetAfilter      17
-#define guiSetContext      18
-#define guiEndFile         19
+#define GMP_SETUP_VIDEO_WINDOW 8
+#define GMP_SET_STREAM         9
+#define GMP_REDRAW             10
+#define GMP_SET_MIXER          11
+#define GMP_NEW_FILE           12
+#define GMP_SET_VIDEO          13
+#define GMP_PREPARATION        16
+#define GMP_SET_AFILTER        17
+#define GMP_SET_CONTEXT        18
+#define GMP_END_FILE           19
 
 #define GUI_STOP  0
 #define GUI_PLAY  1

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/gui/ui/actions.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -103,7 +103,7 @@ void uiPlay(void)
         return;
     }
 
-    gui(guiSetState, (void *)GUI_PLAY);
+    gui(GMP_SET_STATE, (void *)GUI_PLAY);
     uiSubRender = 0;
     wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
     wsClearWindow(guiApp.subWindow);

Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/gui/ui/gtk/fileselect.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -510,7 +510,7 @@ static void fs_Ok_released( GtkButton * 
   }
  if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name_utf8() );
  if ( uiMainAutoPlay ) { uiMainAutoPlay=0; uiEventHandling( evPlay,0 ); }
-  else gui( guiSetState,(void *) GUI_STOP );
+  else gui( GMP_SET_STATE,(void *) GUI_STOP );
 }
 
 static void fs_Cancel_released( GtkButton * button,gpointer user_data )

Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/gui/win32/dialogs.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -708,7 +708,7 @@ static LRESULT CALLBACK SkinBrowserWndPr
                     int len = SendMessage(listbox, LB_GETTEXTLEN, index, 0);
                     if (len)
                     {
-                        if (guiInfo.Playing) gui(guiSetState, (void *) GUI_STOP);
+                        if (guiInfo.Playing) gui(GMP_SET_STATE, (void *) GUI_STOP);
                         free(skinName);
                         skinName = malloc(len + 1);
                         SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName);

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/gui/win32/interface.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -174,7 +174,7 @@ static void guiSetEvent(int event)
             GetVolumeInformation(dvd_device, dvdname, MAX_PATH, NULL, NULL, NULL, NULL, 0);
             capitalize(dvdname);
             mp_msg(MSGT_GPLAYER, MSGL_V, "Opening DVD %s -> %s\n", dvd_device, dvdname);
-            gui(guiPreparation, (void *) STREAMTYPE_DVD);
+            gui(GMP_PREPARATION, (void *) STREAMTYPE_DVD);
             mygui->playlist->clear_playlist(mygui->playlist);
             mygui->playlist->add_track(mygui->playlist, filename, NULL, dvdname, 0);
             mygui->startplay(mygui);
@@ -218,7 +218,7 @@ static void guiSetEvent(int event)
         }
         case evStop:
             if(guiInfo.Playing)
-                gui(guiSetState, (void *) GUI_STOP);
+                gui(GMP_SET_STATE, (void *) GUI_STOP);
             break;
         case evSetMoviePosition:
         {
@@ -288,7 +288,7 @@ static void guiSetEvent(int event)
                     guiInfo.Chapter = guiInfo.DVD.current_chapter;
                     guiInfo.Angle = guiInfo.DVD.current_angle;
                     guiInfo.DiskChanged = 1;
-                    gui(guiSetState, (void *) GUI_PLAY);
+                    gui(GMP_SET_STATE, (void *) GUI_PLAY);
                     break;
                 }
 #endif
@@ -297,8 +297,8 @@ static void guiSetEvent(int event)
                     guiInfo.FilenameChanged = guiInfo.NewPlay = 1;
                     update_playlistwindow();
                     uiGotoTheNext = guiInfo.Playing? 0 : 1;
-                    gui(guiSetState, (void *) GUI_STOP);
-                    gui(guiSetState, (void *) GUI_PLAY);
+                    gui(GMP_SET_STATE, (void *) GUI_STOP);
+                    gui(GMP_SET_STATE, (void *) GUI_PLAY);
                     break;
                }
            }
@@ -324,7 +324,7 @@ void uiPlay( void )
        return;
    }
    guiInfo.NewPlay = 1;
-   gui(guiSetState, (void *) GUI_PLAY);
+   gui(GMP_SET_STATE, (void *) GUI_PLAY);
 }
 
 void uiPause( void )
@@ -499,9 +499,9 @@ int gui(int type, void *arg)
 
     switch (type)
     {
-        case guiPreparation:
+        case GMP_PREPARATION:
         {
-            gui(guiNewFile, NULL);
+            gui(GMP_NEW_FILE, 0);
             guiInfo.DiskChanged = 0;
             guiInfo.FilenameChanged = 0;
             guiInfo.NewPlay = 0;
@@ -528,7 +528,7 @@ int gui(int type, void *arg)
                 strcpy(guiInfo.Filename, filename);
             break;
         }
-        case guiSetAudio:
+        case GMP_SET_AUDIO:
         {
             guiInfo.MovieWindow = (arg && !guiInfo.sh_video);
             // NOTE: This type doesn't mean (and never meant) that we have
@@ -538,10 +538,10 @@ int gui(int type, void *arg)
                 ShowWindow(mygui->subwindow, SW_HIDE);
             break;
         }
-        case guiSetContext:
+        case GMP_SET_CONTEXT:
             guiInfo.mpcontext = arg;
             break;
-        case guiSetVideo:
+        case GMP_SET_VIDEO:
         {
             guiInfo.sh_video = arg;
             if (arg)
@@ -559,7 +559,7 @@ int gui(int type, void *arg)
             }
             break;
         }
-        case guiSetVideoWindow:
+        case GMP_SETUP_VIDEO_WINDOW:
         {
             guiInfo.MovieWidth = vo_dwidth;
             guiInfo.MovieHeight = vo_dheight;
@@ -569,21 +569,21 @@ int gui(int type, void *arg)
                update_subwindow();
             break;
         }
-        case guiSetStream:
+        case GMP_SET_STREAM:
         {
             guiInfo.StreamType = stream->type;
             switch(stream->type)
             {
 #ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
-                    gui(guiSetDVD, stream->priv);
+                    gui(GMP_SET_DVD, stream->priv);
                     break;
 #endif
             }
             break;
         }
 #ifdef CONFIG_DVDREAD
-        case guiSetDVD:
+        case GMP_SET_DVD:
         {
             guiInfo.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts;
             guiInfo.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
@@ -599,13 +599,13 @@ int gui(int type, void *arg)
             break;
         }
 #endif
-        case guiReDraw:
+        case GMP_REDRAW:
             mygui->updatedisplay(mygui, mygui->mainwindow);
             break;
-        case guiSetAfilter:
+        case GMP_SET_AFILTER:
             guiInfo.afilter = arg;
             break;
-        case guiSetState:
+        case GMP_SET_STATE:
         {
             guiInfo.Playing = (int) arg;
             switch (guiInfo.Playing)
@@ -629,7 +629,7 @@ int gui(int type, void *arg)
             }
             break;
         }
-        case guiRunCommand:
+        case GMP_RUN_COMMAND:
         {
             mp_msg(MSGT_GPLAYER,MSGL_V, "cmd: %d\n", (int) arg);
             /* MPlayer asks us to quit */
@@ -660,7 +660,7 @@ int gui(int type, void *arg)
             }
             break;
         }
-        case guiNewFile:
+        case GMP_NEW_FILE:
         {
             audio_id = -1;
             video_id = -1;
@@ -686,7 +686,7 @@ int gui(int type, void *arg)
             if(gtkAutoSyncOn) autosync = gtkAutoSync;
             break;
         }
-        case guiSetMixer:
+        case GMP_SET_MIXER:
         {
             if(audio_out)
             {
@@ -702,7 +702,7 @@ int gui(int type, void *arg)
             }
             break;
         }
-        case guiEndFile:
+        case GMP_END_FILE:
         {
           if(!uiGotoTheNext && guiInfo.Playing)
           {
@@ -746,7 +746,7 @@ int gui(int type, void *arg)
               style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX;
               SetWindowLong(mygui->subwindow, GWL_STYLE, style);
           }
-          gui(guiSetState, (void *) GUI_STOP);
+          gui(GMP_SET_STATE, (void *) GUI_STOP);
           break;
         }
         default:

Modified: trunk/gui/win32/preferences.c
==============================================================================
--- trunk/gui/win32/preferences.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/gui/win32/preferences.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -575,7 +575,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                 case ID_APPLY:
                 {
                     int strl;
-                    if(guiInfo.Playing) gui(guiSetState, (void *)GUI_STOP);
+                    if(guiInfo.Playing) gui(GMP_SET_STATE, (void *)GUI_STOP);
 
                     /* Set the video driver */
                     free(video_driver_list[0]);

Modified: trunk/libvo/video_out.c
==============================================================================
--- trunk/libvo/video_out.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/libvo/video_out.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -372,7 +372,7 @@ int config_video_out(const vo_functions_
 #ifdef CONFIG_GUI
     if (use_gui) {
       // GUI creates and manages window for us
-      gui(guiSetVideoWindow, 0);
+      gui(GMP_SETUP_VIDEO_WINDOW, 0);
     }
 #endif
   }

Modified: trunk/libvo/vo_dxr3.c
==============================================================================
--- trunk/libvo/vo_dxr3.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/libvo/vo_dxr3.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -491,7 +491,7 @@ static int config(uint32_t width, uint32
 		vo_dheight = d_height;
 #ifdef CONFIG_GUI
 		if (use_gui)
-			gui(guiSetVideoWindow, 0);
+			gui(GMP_SETUP_VIDEO_WINDOW, 0);
 #endif
 		XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &xwin_attribs);
 		depth = xwin_attribs.depth;

Modified: trunk/libvo/vo_xover.c
==============================================================================
--- trunk/libvo/vo_xover.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/libvo/vo_xover.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -269,7 +269,7 @@ static int config(uint32_t width, uint32
   vo_dwidth=d_width; vo_dheight=d_height;
 
 #ifdef CONFIG_GUI
-  if(use_gui) gui( guiSetVideoWindow,0 ); // the GUI will set up / resize the window
+  if(use_gui) gui(GMP_SETUP_VIDEO_WINDOW, 0); // the GUI will set up / resize the window
   else
     {
 #endif

Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/libvo/x11_common.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -821,7 +821,7 @@ int vo_x11_check_events(Display * mydisp
 #ifdef CONFIG_GUI
         if (use_gui)
         {
-            gui(guiXEvent, &Event);
+            gui(GMP_X_EVENT, &Event);
             if (vo_window != Event.xany.window)
                 continue;
         }

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Tue Jul  5 11:33:09 2011	(r33812)
+++ trunk/mplayer.c	Tue Jul  5 12:47:51 2011	(r33813)
@@ -584,7 +584,7 @@ void uninit_player(unsigned int mask)
             uninit_audio(mpctx->sh_audio);
 #ifdef CONFIG_GUI
         if (use_gui)
-            gui(guiSetAfilter, NULL);
+            gui(GMP_SET_AFILTER, NULL);
 #endif
         mpctx->sh_audio      = NULL;
         mpctx->mixer.afilter = NULL;
@@ -1334,7 +1334,7 @@ static int build_afilter_chain(sh_audio_
     if (!sh_audio) {
 #ifdef CONFIG_GUI
         if (use_gui)
-            gui(guiSetAfilter, NULL);
+            gui(GMP_SET_AFILTER, NULL);
 #endif
         mpctx->mixer.afilter = NULL;
         return 0;
@@ -1359,7 +1359,7 @@ static int build_afilter_chain(sh_audio_
     mpctx->mixer.afilter = sh_audio->afilter;
 #ifdef CONFIG_GUI
     if (use_gui)
-        gui(guiSetAfilter, sh_audio->afilter);
+        gui(GMP_SET_AFILTER, sh_audio->afilter);
 #endif
     return result;
 }
@@ -2537,7 +2537,7 @@ static void pause_loop(void)
     }
 #ifdef CONFIG_GUI
     if (use_gui)
-        gui(guiSetState, (void *)GUI_PAUSE);
+        gui(GMP_SET_STATE, (void *)GUI_PAUSE);
 #endif
     if (mpctx->video_out && mpctx->sh_video && vo_config_count)
         mpctx->video_out->control(VOCTRL_PAUSE, NULL);
@@ -2557,7 +2557,7 @@ static void pause_loop(void)
 #ifdef CONFIG_GUI
         if (use_gui) {
             guiEventHandling();
-            gui(guiReDraw, NULL);
+            gui(GMP_REDRAW, 0);
             if (guiInfo.Playing != GUI_PAUSE || (rel_seek_secs || abs_seek_pos))
                 break;
         }
@@ -2604,7 +2604,7 @@ static void pause_loop(void)
         if (guiInfo.Playing == GUI_STOP)
             mpctx->eof = 1;
         else
-            gui(guiSetState, (void *)GUI_PLAY);
+            gui(GMP_SET_STATE, (void *)GUI_PLAY);
     }
 #endif
 }
@@ -3051,8 +3051,8 @@ int main(int argc, char *argv[])
 #ifdef CONFIG_GUI
     if (use_gui) {
         guiInit();
-        gui(guiSetContext, mpctx);
-        gui(guiSetState, (void *)(gui_no_filename ? GUI_STOP : GUI_PLAY));
+        gui(GMP_SET_CONTEXT, mpctx);
+        gui(GMP_SET_STATE, (void *)(gui_no_filename ? GUI_STOP : GUI_PLAY));
     }
 #endif
 
@@ -3090,18 +3090,18 @@ play_next_file:
 #ifdef CONFIG_GUI
     if (use_gui) {
         mpctx->file_format = DEMUXER_TYPE_UNKNOWN;
-        gui(guiNewFile, 0);
+        gui(GMP_NEW_FILE, 0);
         while (guiInfo.Playing != GUI_PLAY) {
             mp_cmd_t *cmd;
             usec_sleep(20000);
             guiEventHandling();
-            gui(guiReDraw, NULL);
+            gui(GMP_REDRAW, 0);
             if ((cmd = mp_input_get_cmd(0, 0, 0)) != NULL) {
-                gui(guiRunCommand, (void *)cmd->id);
+                gui(GMP_RUN_COMMAND, (void *)cmd->id);
                 mp_cmd_free(cmd);
             }
         }
-        gui(guiPreparation, NULL);
+        gui(GMP_PREPARATION, 0);
         if (guiInfo.StreamType == STREAMTYPE_STREAM) {
             play_tree_t *entry = play_tree_new();
             play_tree_add_file(entry, guiInfo.Filename);
@@ -3244,7 +3244,7 @@ play_next_file:
 
 #ifdef CONFIG_GUI
     if (use_gui)
-        gui(guiSetStream, mpctx->stream);
+        gui(GMP_SET_STREAM, mpctx->stream);
 #endif
 
     if (mpctx->file_format == DEMUXER_TYPE_PLAYLIST) {
@@ -3677,9 +3677,9 @@ goto_enable_cache:
 
 #ifdef CONFIG_GUI
         if (use_gui) {
-            if (!gui(guiSetVideo, mpctx->sh_video))
+            if (!gui(GMP_SET_VIDEO, mpctx->sh_video))
                 goto goto_next_file;
-            gui(guiSetAudio, mpctx->sh_audio);
+            gui(GMP_SET_AUDIO, mpctx->sh_audio);
         }
 #endif
 
@@ -3995,8 +3995,8 @@ goto_enable_cache:
                 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);
-                gui(guiSetMixer, NULL);
-                gui(guiReDraw, NULL);
+                gui(GMP_SET_MIXER, 0);
+                gui(GMP_REDRAW, 0);
                 if (guiInfo.Playing == GUI_STOP)
                     break;                  // STOP
                 if (guiInfo.Playing == GUI_PAUSE)
@@ -4103,7 +4103,7 @@ goto_next_file:  // don't jump here afte
 #ifdef CONFIG_DVDREAD
         if (!guiInfo.DiskChanged)
 #endif
-        gui(guiEndFile, NULL);
+        gui(GMP_END_FILE, 0);
     }
 #endif
 


More information about the MPlayer-cvslog mailing list