]> git.sesse.net Git - vlc/commitdiff
* vout_OSDMessage doxygen doc update
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 17 Feb 2004 03:12:00 +0000 (03:12 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 17 Feb 2004 03:12:00 +0000 (03:12 +0000)
* fix broken vout_OSDMessage in other files

modules/control/hotkeys.c
modules/gui/macosx/controls.m
src/video_output/video_text.c

index de91423b337c5ba83ef445dfb99db77483a23d81..b3bc452f8c3c237fbae4456a1e0cc56f00115fdb 100755 (executable)
@@ -2,7 +2,7 @@
  * hotkeys.c: Hotkey handling for vlc
  *****************************************************************************
  * Copyright (C) 2004 VideoLAN
- * $Id: hotkeys.c,v 1.16 2004/01/25 16:17:03 anil Exp $
+ * $Id: hotkeys.c,v 1.17 2004/02/17 03:12:00 hartman Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -232,24 +232,20 @@ static void Run( intf_thread_t *p_intf )
         if( i_action == ACTIONID_QUIT )
         {
             p_intf->p_vlc->b_die = VLC_TRUE;
-            vout_OSDMessage( VLC_OBJECT(p_intf), _( "Quit" ) );
+            vout_OSDMessage( p_intf, _( "Quit" ) );
             continue;
         }
         else if( i_action == ACTIONID_VOL_UP )
         {
             audio_volume_t i_newvol;
-            char string[9];
             aout_VolumeUp( p_intf, 1, &i_newvol );
-            sprintf( string, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX );
-            vout_OSDMessage( VLC_OBJECT(p_intf), string );
+            vout_OSDMessage( p_intf, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX );
         }
         else if( i_action == ACTIONID_VOL_DOWN )
         {
             audio_volume_t i_newvol;
-            char string[9];
             aout_VolumeDown( p_intf, 1, &i_newvol );
-            sprintf( string, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX );
-            vout_OSDMessage( VLC_OBJECT(p_intf), string );
+            vout_OSDMessage( p_intf, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX);
         }
         else if( i_action == ACTIONID_VOL_MUTE )
         {
@@ -257,13 +253,11 @@ static void Run( intf_thread_t *p_intf )
             aout_VolumeMute( p_intf, &i_newvol );
             if( i_newvol == 0 )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Mute" ) );
+                vout_OSDMessage( p_intf, _( "Mute" ) );
             }
             else
             {
-                char string[9];
-                sprintf( string, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX );
-                vout_OSDMessage( VLC_OBJECT(p_intf), string );
+                vout_OSDMessage( p_intf, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX );
             }
         }
         else if( i_action == ACTIONID_FULLSCREEN )
@@ -297,7 +291,7 @@ static void Run( intf_thread_t *p_intf )
             }
             if( p_input && val.i_int != PAUSE_S )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Pause" ) );
+                vout_OSDMessage( p_intf, _( "Pause" ) );
                 val.i_int = PAUSE_S;
                 var_Set( p_input, "state", val );
             }
@@ -311,7 +305,7 @@ static void Run( intf_thread_t *p_intf )
                     if( p_playlist->i_size )
                     {
                         vlc_mutex_unlock( &p_playlist->object_lock );
-                        vout_OSDMessage( VLC_OBJECT(p_intf), _( "Play" ) );
+                        vout_OSDMessage( p_intf, _( "Play" ) );
                         playlist_Play( p_playlist );
                         vlc_object_release( p_playlist );
                     }
@@ -322,43 +316,43 @@ static void Run( intf_thread_t *p_intf )
         {
             if( i_action == ACTIONID_PAUSE )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Pause" ) );
+                vout_OSDMessage( p_intf, _( "Pause" ) );
                 val.i_int = PAUSE_S;
                 var_Set( p_input, "state", val );
             }
             else if( i_action == ACTIONID_JUMP_BACKWARD_10SEC )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Jump -10 seconds" ) );
+                vout_OSDMessage( p_intf, _( "Jump -10 seconds" ) );
                 val.i_time = -10000000;
                 var_Set( p_input, "time-offset", val );
             }
             else if( i_action == ACTIONID_JUMP_FORWARD_10SEC )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Jump +10 seconds" ) );
+                vout_OSDMessage( p_intf, _( "Jump +10 seconds" ) );
                 val.i_time = 10000000;
                 var_Set( p_input, "time-offset", val );
             }
             else if( i_action == ACTIONID_JUMP_BACKWARD_1MIN )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Jump -1 minute" ) );
+                vout_OSDMessage( p_intf, _( "Jump -1 minute" ) );
                 val.i_time = -60000000;
                 var_Set( p_input, "time-offset", val );
             }
             else if( i_action == ACTIONID_JUMP_FORWARD_1MIN )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Jump +1 minute" ) );
+                vout_OSDMessage( p_intf, _( "Jump +1 minute" ) );
                 val.i_time = 60000000;
                 var_Set( p_input, "time-offset", val );
             }
             else if( i_action == ACTIONID_JUMP_BACKWARD_5MIN )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Jump -5 minutes" ) );
+                vout_OSDMessage( p_intf, _( "Jump -5 minutes" ) );
                 val.i_time = -300000000;
                 var_Set( p_input, "time-offset", val );
             }
             else if( i_action == ACTIONID_JUMP_FORWARD_5MIN )
             {
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Jump +5 minutes" ) );
+                vout_OSDMessage( p_intf, _( "Jump +5 minutes" ) );
                 val.i_time = 300000000;
                 var_Set( p_input, "time-offset", val );
             }
@@ -423,16 +417,12 @@ static void Run( intf_thread_t *p_intf )
                                                                                                                             
                     if( dur != -1 )
                     {
-                        char psz_position[2*MSTRTIME_MAX_SIZE + 3];
                         secstotimestr( psz_duration, dur/1000000 );
-                        strcpy( psz_position, psz_time );
-                        strcat( psz_position, " / " );
-                        strcat( psz_position, psz_duration );
-                        vout_OSDMessage( VLC_OBJECT(p_playlist), psz_position );
+                        vout_OSDMessage( p_playlist, "%s / %s", psz_time, psz_duration );
                     }
                     else if( i_seconds > 0 )
                     { 
-                        vout_OSDMessage( VLC_OBJECT(p_playlist), psz_time );
+                        vout_OSDMessage( p_playlist, psz_time );
                     }
                     vlc_object_release( p_playlist );
                 }
index 3952dc8e267f4e2118a34f73433beae5e11e85f7..c40da9475c4f492e1414b7a01f48ce38c546fe2d 100644 (file)
@@ -2,11 +2,11 @@
  * controls.m: MacOS X interface module
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: controls.m,v 1.60 2004/01/25 17:01:57 murray Exp $
+ * $Id: controls.m,v 1.61 2004/02/17 03:12:00 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
- *          Derk-Jan Hartman <thedj@users.sourceforge.net>
+ *          Derk-Jan Hartman <hartman at videolan dot org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -56,7 +56,7 @@
     }
     if( p_input && val.i_int != PAUSE_S )
     {
-        vout_OSDMessage( VLC_OBJECT(p_intf), _( "Pause" ) );
+        vout_OSDMessage( p_intf, _( "Pause" ) );
         val.i_int = PAUSE_S;
         var_Set( p_input, "state", val );
     }
@@ -70,7 +70,7 @@
             if( p_playlist->i_size )
             {
                 vlc_mutex_unlock( &p_playlist->object_lock );
-                vout_OSDMessage( VLC_OBJECT(p_intf), _( "Play" ) );
+                vout_OSDMessage( p_intf, _( "Play" ) );
                 playlist_Play( p_playlist );
                 vlc_object_release( p_playlist );
             }
@@ -92,7 +92,7 @@
                                                        FIND_ANYWHERE );
     if( p_playlist != NULL )
     {
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Stop" ) );
+        vout_OSDMessage( p_intf, _( "Stop" ) );
         playlist_Stop( p_playlist );
         vlc_object_release( p_playlist );
     }
         vlc_value_t val; val.b_bool = VLC_TRUE;
 
         var_Set( p_input, "rate-faster", val );
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Faster" ) );
+        vout_OSDMessage( p_intf, _( "Faster" ) );
         vlc_object_release( p_input );
     }
 }
         vlc_value_t val; val.b_bool = VLC_TRUE;
 
         var_Set( p_input, "rate-slower", val );
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Slower" ) );
+        vout_OSDMessage( p_intf, _( "Slower" ) );
         vlc_object_release( p_input );
     }
 }
     {
         playlist_Prev( p_playlist );
         vlc_object_release( p_playlist );
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Previous" ) );
+        vout_OSDMessage( p_intf, _( "Previous" ) );
     }
 }
 
     {
         playlist_Next( p_playlist );
         vlc_object_release( p_playlist );
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Next" ) );
+        vout_OSDMessage( p_intf, _( "Next" ) );
     }
 }
 
     var_Set( p_playlist, "random", val );
     if( val.b_bool )
     {
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Random On" ) );
+        vout_OSDMessage( p_intf, _( "Random On" ) );
     }
     else
     {
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Random Off" ) );
+        vout_OSDMessage( p_intf, _( "Random Off" ) );
     }    
 
     p_intf->p_sys->b_playlist_update = VLC_TRUE;
     var_Set( p_playlist, "repeat", val );
     if( val.b_bool )
     {
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Repeat All" ) );
+        vout_OSDMessage( p_intf, _( "Repeat All" ) );
     }
     else
     {
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Repeat Off" ) );
+        vout_OSDMessage( p_intf, _( "Repeat Off" ) );
     }
 
     p_intf->p_sys->b_playlist_update = VLC_TRUE;    
     var_Set( p_playlist, "loop", val );
     if( val.b_bool )
     {
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Repeat One" ) );
+        vout_OSDMessage( p_intf, _( "Repeat One" ) );
     }
     else
     {
-        vout_OSDMessage( (vlc_object_t *)p_intf, _( "Repeat Off" ) );
+        vout_OSDMessage( p_intf, _( "Repeat Off" ) );
     }    
 
     p_intf->p_sys->b_playlist_update = VLC_TRUE;
 {
     intf_thread_t * p_intf = [NSApp getIntf];
     audio_volume_t i_volume;
-    char string[9];
 
     aout_VolumeGet( p_intf, &i_volume );
 
     [o_volumeslider setFloatValue: (float)(i_volume / AOUT_VOLUME_STEP)];
 
-    sprintf( string, "Vol %d%%", i_volume*100/AOUT_VOLUME_MAX );
-    vout_OSDMessage( (vlc_object_t *)p_intf, string );
+    vout_OSDMessage( p_intf, "Vol %d%%", i_volume*100/AOUT_VOLUME_MAX );
 }
 
 - (IBAction)windowAction:(id)sender
index e34cc4c51c582848d0d072aaa6f574828e290c46..a4efdc201023a19e651f7ff14c269842b6d054b1 100644 (file)
@@ -2,7 +2,7 @@
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999-2004 VideoLAN
- * $Id: video_text.c,v 1.51 2004/02/15 18:22:26 sigmunau Exp $
+ * $Id: video_text.c,v 1.52 2004/02/17 03:12:00 hartman Exp $
  *
  * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -88,7 +88,7 @@ void vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string,
  * \brief Write an informative message at the default location,
  *        for the default duration and only if the OSD option is enabled.
  * \param p_caller The object that called the function.
- * \param psz_string The text to be shown
+ * \param psz_format printf style formatting
  **/
 void __vout_OSDMessage( vlc_object_t *p_caller, char *psz_format, ... )
 {