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

ib subversion at mplayerhq.hu
Tue Jul 12 10:59:47 CEST 2011


Author: ib
Date: Tue Jul 12 10:59:47 2011
New Revision: 33879

Log:
Cosmetic: Change parameter names of gui() and mplayer().

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

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Jul 12 10:45:52 2011	(r33878)
+++ trunk/gui/interface.c	Tue Jul 12 10:59:47 2011	(r33879)
@@ -349,7 +349,7 @@ static void add_vf(char *str)
     mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_AddingVideoFilter, str);
 }
 
-int gui(int what, void *arg)
+int gui(int what, void *data)
 {
     mixer_t *mixer = NULL;
     stream_t *stream;
@@ -363,17 +363,17 @@ int gui(int what, void *arg)
 
     switch (what) {
     case GUI_SET_CONTEXT:
-        guiInfo.mpcontext = arg;
+        guiInfo.mpcontext = data;
         break;
 
     case GUI_SET_STATE:
 
-        switch ((int)arg) {
+        switch ((int)data) {
         case GUI_STOP:
         case GUI_PLAY:
 // if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.subWindow,wsHideWindow );
         case GUI_PAUSE:
-            guiInfo.Playing = (int)arg;
+            guiInfo.Playing = (int)data;
             break;
         }
 
@@ -407,9 +407,9 @@ int gui(int what, void *arg)
 
     case GUI_RUN_COMMAND:
 
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_COMMAND: %d\n", (int)arg);
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_COMMAND: %d\n", (int)data);
 
-        switch ((int)arg) {
+        switch ((int)data) {
         case MP_CMD_VO_FULLSCREEN:
             uiEventHandling(evFullScreen, 0);
             break;
@@ -648,7 +648,7 @@ int gui(int what, void *arg)
 
     case GUI_SET_STREAM:
 
-        stream = arg;
+        stream = data;
         guiInfo.StreamType = stream->type;
 
         switch (guiInfo.StreamType) {
@@ -683,14 +683,14 @@ int gui(int what, void *arg)
         break;
 
     case GUI_SET_AFILTER:
-        guiInfo.afilter = arg;
+        guiInfo.afilter = data;
         break;
 
     case GUI_SET_VIDEO:
 
         // video
 
-        guiInfo.sh_video = arg;
+        guiInfo.sh_video = data;
 
         if (guiInfo.StreamType == STREAMTYPE_STREAM)
             btnSet(evSetMoviePosition, btnDisabled);
@@ -708,9 +708,9 @@ int gui(int what, void *arg)
 
     case GUI_SET_AUDIO:
 
-        guiInfo.AudioChannels = arg ? ((sh_audio_t *)arg)->channels : 0;
+        guiInfo.AudioChannels = data ? ((sh_audio_t *)data)->channels : 0;
 
-        if (arg && !guiInfo.sh_video)
+        if (data && !guiInfo.sh_video)
             guiInfo.MovieWindow = False;
 
         gui(GUI_SET_MIXER, 0);
@@ -775,7 +775,7 @@ int gui(int what, void *arg)
         break;
 
     case GUI_HANDLE_X_EVENT:
-        wsEvents(wsDisplay, arg);
+        wsEvents(wsDisplay, data);
         gtkEventHandling();
         break;
 
@@ -927,47 +927,47 @@ int guiPlaylistAdd(play_tree_t *my_playt
 
 /* GUI -> MPlayer */
 
-void mplayer(int what, float fparam, void *vparam)
+void mplayer(int what, float value, void *data)
 {
-    equalizer_t *eq = (equalizer_t *)vparam;
+    equalizer_t *eq = (equalizer_t *)data;
 
     switch (what) {
         // subtitle
 
 #ifndef CONFIG_FREETYPE
     case MPLAYER_SET_FONT_FACTOR:
-        font_factor = fparam;
+        font_factor = value;
         mplayerLoadFont();
         break;
 #else
     case MPLAYER_SET_FONT_OUTLINE:
-        subtitle_font_thickness = (8.0f / 100.0f) * fparam;
+        subtitle_font_thickness = (8.0f / 100.0f) * value;
         mplayerLoadFont();
         break;
 
     case MPLAYER_SET_FONT_BLUR:
-        subtitle_font_radius = (8.0f / 100.0f) * fparam;
+        subtitle_font_radius = (8.0f / 100.0f) * value;
         mplayerLoadFont();
         break;
 
     case MPLAYER_SET_FONT_TEXTSCALE:
-        text_font_scale_factor = fparam;
+        text_font_scale_factor = value;
         mplayerLoadFont();
         break;
 
     case MPLAYER_SET_FONT_OSDSCALE:
-        osd_font_scale_factor = fparam;
+        osd_font_scale_factor = value;
         mplayerLoadFont();
         break;
 
     case MPLAYER_SET_FONT_ENCODING:
         nfree(subtitle_font_encoding);
-        subtitle_font_encoding = gstrdup((char *)vparam);
+        subtitle_font_encoding = gstrdup((char *)data);
         mplayerLoadFont();
         break;
 
     case MPLAYER_SET_FONT_AUTOSCALE:
-        subtitle_autoscale = (int)fparam;
+        subtitle_autoscale = (int)value;
         mplayerLoadFont();
         break;
 #endif
@@ -975,12 +975,12 @@ void mplayer(int what, float fparam, voi
 #ifdef CONFIG_ICONV
     case MPLAYER_SET_SUB_ENCODING:
         nfree(sub_cp);
-        sub_cp = gstrdup((char *)vparam);
+        sub_cp = gstrdup((char *)data);
         break;
 #endif
 
     case MPLAYER_SET_EXTRA_STEREO:
-        gtkAOExtraStereoMul = fparam;
+        gtkAOExtraStereoMul = value;
         if (guiInfo.afilter)
             af_control_any_rev(guiInfo.afilter, AF_CONTROL_ES_MUL | AF_CONTROL_SET, &gtkAOExtraStereoMul);
         break;
@@ -992,36 +992,36 @@ void mplayer(int what, float fparam, voi
         mp_cmd       = calloc(1, sizeof(*mp_cmd));
         mp_cmd->id   = MP_CMD_PANSCAN;
         mp_cmd->name = strdup("panscan");
-        mp_cmd->args[0].v.f = fparam;
+        mp_cmd->args[0].v.f = value;
         mp_cmd->args[1].v.i = 1;
         mp_input_queue_cmd(mp_cmd);
     }
     break;
 
     case MPLAYER_SET_AUTO_QUALITY:
-        auto_quality = (int)fparam;
+        auto_quality = (int)value;
         break;
 
     // set equalizers
 
     case MPLAYER_SET_CONTRAST:
         if (guiInfo.sh_video)
-            set_video_colors(guiInfo.sh_video, "contrast", (int)fparam);
+            set_video_colors(guiInfo.sh_video, "contrast", (int)value);
         break;
 
     case MPLAYER_SET_BRIGHTNESS:
         if (guiInfo.sh_video)
-            set_video_colors(guiInfo.sh_video, "brightness", (int)fparam);
+            set_video_colors(guiInfo.sh_video, "brightness", (int)value);
         break;
 
     case MPLAYER_SET_HUE:
         if (guiInfo.sh_video)
-            set_video_colors(guiInfo.sh_video, "hue", (int)fparam);
+            set_video_colors(guiInfo.sh_video, "hue", (int)value);
         break;
 
     case MPLAYER_SET_SATURATION:
         if (guiInfo.sh_video)
-            set_video_colors(guiInfo.sh_video, "saturation", (int)fparam);
+            set_video_colors(guiInfo.sh_video, "saturation", (int)value);
         break;
 
     case MPLAYER_SET_EQUALIZER:
@@ -1053,7 +1053,7 @@ void mplayer(int what, float fparam, voi
     }
 
     case MPLAYER_EXIT_GUI:
-        exit_player_with_rc((enum exit_reason)fparam, (enum exit_reason)fparam >= EXIT_ERROR);
+        exit_player_with_rc((enum exit_reason)value, (enum exit_reason)value >= EXIT_ERROR);
         break;
     }
 }

Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h	Tue Jul 12 10:45:52 2011	(r33878)
+++ trunk/gui/interface.h	Tue Jul 12 10:59:47 2011	(r33879)
@@ -139,7 +139,7 @@ extern guiInterface_t guiInfo;
 
 /* MPlayer -> GUI */
 
-int gui(int what, void *arg);
+int gui(int what, void *data);
 void guiDone(void);
 void guiInit(void);
 int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config);
@@ -147,7 +147,7 @@ int guiPlaylistInitialize(play_tree_t *m
 
 /* GUI -> MPlayer */
 
-void mplayer(int what, float fparam, void *vparam);
+void mplayer(int what, float value, void *data);
 void mplayerLoadFont(void);
 void mplayerLoadSubtitle(const char *name);
 void gmp_msg(int mod, int lev, const char *format, ...);

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Tue Jul 12 10:45:52 2011	(r33878)
+++ trunk/gui/win32/interface.c	Tue Jul 12 10:59:47 2011	(r33879)
@@ -429,9 +429,9 @@ void guiDone(void)
 }
 
 /* this function gets called by mplayer to update the gui */
-int gui(int what, void *arg)
+int gui(int what, void *data)
 {
-    stream_t *stream = arg;
+    stream_t *stream = data;
 #ifdef CONFIG_DVDREAD
     dvd_priv_t *dvdp;
 #endif
@@ -478,7 +478,7 @@ int gui(int what, void *arg)
         }
         case GUI_SET_AUDIO:
         {
-            guiInfo.MovieWindow = (arg && !guiInfo.sh_video);
+            guiInfo.MovieWindow = (data && !guiInfo.sh_video);
             // NOTE: This type doesn't mean (and never meant) that we have
             // *just* audio, so there probably should be a check before
             // hiding (see gui/interface.c).
@@ -487,14 +487,14 @@ int gui(int what, void *arg)
             break;
         }
         case GUI_SET_CONTEXT:
-            guiInfo.mpcontext = arg;
+            guiInfo.mpcontext = data;
             break;
         case GUI_SET_VIDEO:
         {
-            guiInfo.sh_video = arg;
-            if (arg)
+            guiInfo.sh_video = data;
+            if (data)
             {
-                sh_video_t *sh = arg;
+                sh_video_t *sh = data;
                 codecname = sh->codec->name;
 
                 /* we have video, show the subwindow */
@@ -544,11 +544,11 @@ int gui(int what, void *arg)
             mygui->updatedisplay(mygui, mygui->mainwindow);
             break;
         case GUI_SET_AFILTER:
-            guiInfo.afilter = arg;
+            guiInfo.afilter = data;
             break;
         case GUI_SET_STATE:
         {
-            guiInfo.Playing = (int) arg;
+            guiInfo.Playing = (int) data;
             switch (guiInfo.Playing)
             {
                 case GUI_PLAY:
@@ -572,9 +572,9 @@ int gui(int what, void *arg)
         }
         case GUI_RUN_COMMAND:
         {
-            mp_msg(MSGT_GPLAYER,MSGL_V, "cmd: %d\n", (int) arg);
+            mp_msg(MSGT_GPLAYER,MSGL_V, "cmd: %d\n", (int) data);
             /* MPlayer asks us to quit */
-            switch((int) arg)
+            switch((int) data)
             {
                 case MP_CMD_VO_FULLSCREEN:
                     uiFullScreen();


More information about the MPlayer-cvslog mailing list