Commit 5130db5c authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* vout_OSDMessage doxygen doc update

* fix broken vout_OSDMessage in other files
parent aa7904da
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* hotkeys.c: Hotkey handling for vlc * hotkeys.c: Hotkey handling for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 VideoLAN * 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> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -232,24 +232,20 @@ static void Run( intf_thread_t *p_intf ) ...@@ -232,24 +232,20 @@ static void Run( intf_thread_t *p_intf )
if( i_action == ACTIONID_QUIT ) if( i_action == ACTIONID_QUIT )
{ {
p_intf->p_vlc->b_die = VLC_TRUE; p_intf->p_vlc->b_die = VLC_TRUE;
vout_OSDMessage( VLC_OBJECT(p_intf), _( "Quit" ) ); vout_OSDMessage( p_intf, _( "Quit" ) );
continue; continue;
} }
else if( i_action == ACTIONID_VOL_UP ) else if( i_action == ACTIONID_VOL_UP )
{ {
audio_volume_t i_newvol; audio_volume_t i_newvol;
char string[9];
aout_VolumeUp( p_intf, 1, &i_newvol ); aout_VolumeUp( p_intf, 1, &i_newvol );
sprintf( string, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX ); vout_OSDMessage( p_intf, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX );
vout_OSDMessage( VLC_OBJECT(p_intf), string );
} }
else if( i_action == ACTIONID_VOL_DOWN ) else if( i_action == ACTIONID_VOL_DOWN )
{ {
audio_volume_t i_newvol; audio_volume_t i_newvol;
char string[9];
aout_VolumeDown( p_intf, 1, &i_newvol ); aout_VolumeDown( p_intf, 1, &i_newvol );
sprintf( string, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX ); vout_OSDMessage( p_intf, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX);
vout_OSDMessage( VLC_OBJECT(p_intf), string );
} }
else if( i_action == ACTIONID_VOL_MUTE ) else if( i_action == ACTIONID_VOL_MUTE )
{ {
...@@ -257,13 +253,11 @@ static void Run( intf_thread_t *p_intf ) ...@@ -257,13 +253,11 @@ static void Run( intf_thread_t *p_intf )
aout_VolumeMute( p_intf, &i_newvol ); aout_VolumeMute( p_intf, &i_newvol );
if( i_newvol == 0 ) if( i_newvol == 0 )
{ {
vout_OSDMessage( VLC_OBJECT(p_intf), _( "Mute" ) ); vout_OSDMessage( p_intf, _( "Mute" ) );
} }
else else
{ {
char string[9]; vout_OSDMessage( p_intf, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX );
sprintf( string, "Vol %d%%", i_newvol*100/AOUT_VOLUME_MAX );
vout_OSDMessage( VLC_OBJECT(p_intf), string );
} }
} }
else if( i_action == ACTIONID_FULLSCREEN ) else if( i_action == ACTIONID_FULLSCREEN )
...@@ -297,7 +291,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -297,7 +291,7 @@ static void Run( intf_thread_t *p_intf )
} }
if( p_input && val.i_int != PAUSE_S ) 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; val.i_int = PAUSE_S;
var_Set( p_input, "state", val ); var_Set( p_input, "state", val );
} }
...@@ -311,7 +305,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -311,7 +305,7 @@ static void Run( intf_thread_t *p_intf )
if( p_playlist->i_size ) if( p_playlist->i_size )
{ {
vlc_mutex_unlock( &p_playlist->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock );
vout_OSDMessage( VLC_OBJECT(p_intf), _( "Play" ) ); vout_OSDMessage( p_intf, _( "Play" ) );
playlist_Play( p_playlist ); playlist_Play( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -322,43 +316,43 @@ static void Run( intf_thread_t *p_intf ) ...@@ -322,43 +316,43 @@ static void Run( intf_thread_t *p_intf )
{ {
if( i_action == ACTIONID_PAUSE ) if( i_action == ACTIONID_PAUSE )
{ {
vout_OSDMessage( VLC_OBJECT(p_intf), _( "Pause" ) ); vout_OSDMessage( p_intf, _( "Pause" ) );
val.i_int = PAUSE_S; val.i_int = PAUSE_S;
var_Set( p_input, "state", val ); var_Set( p_input, "state", val );
} }
else if( i_action == ACTIONID_JUMP_BACKWARD_10SEC ) 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; val.i_time = -10000000;
var_Set( p_input, "time-offset", val ); var_Set( p_input, "time-offset", val );
} }
else if( i_action == ACTIONID_JUMP_FORWARD_10SEC ) 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; val.i_time = 10000000;
var_Set( p_input, "time-offset", val ); var_Set( p_input, "time-offset", val );
} }
else if( i_action == ACTIONID_JUMP_BACKWARD_1MIN ) 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; val.i_time = -60000000;
var_Set( p_input, "time-offset", val ); var_Set( p_input, "time-offset", val );
} }
else if( i_action == ACTIONID_JUMP_FORWARD_1MIN ) 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; val.i_time = 60000000;
var_Set( p_input, "time-offset", val ); var_Set( p_input, "time-offset", val );
} }
else if( i_action == ACTIONID_JUMP_BACKWARD_5MIN ) 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; val.i_time = -300000000;
var_Set( p_input, "time-offset", val ); var_Set( p_input, "time-offset", val );
} }
else if( i_action == ACTIONID_JUMP_FORWARD_5MIN ) 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; val.i_time = 300000000;
var_Set( p_input, "time-offset", val ); var_Set( p_input, "time-offset", val );
} }
...@@ -423,16 +417,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -423,16 +417,12 @@ static void Run( intf_thread_t *p_intf )
if( dur != -1 ) if( dur != -1 )
{ {
char psz_position[2*MSTRTIME_MAX_SIZE + 3];
secstotimestr( psz_duration, dur/1000000 ); secstotimestr( psz_duration, dur/1000000 );
strcpy( psz_position, psz_time ); vout_OSDMessage( p_playlist, "%s / %s", psz_time, psz_duration );
strcat( psz_position, " / " );
strcat( psz_position, psz_duration );
vout_OSDMessage( VLC_OBJECT(p_playlist), psz_position );
} }
else if( i_seconds > 0 ) else if( i_seconds > 0 )
{ {
vout_OSDMessage( VLC_OBJECT(p_playlist), psz_time ); vout_OSDMessage( p_playlist, psz_time );
} }
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* controls.m: MacOS X interface module * controls.m: MacOS X interface module
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * 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 * 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 * it under the terms of the GNU General Public License as published by
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
} }
if( p_input && val.i_int != PAUSE_S ) 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; val.i_int = PAUSE_S;
var_Set( p_input, "state", val ); var_Set( p_input, "state", val );
} }
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
if( p_playlist->i_size ) if( p_playlist->i_size )
{ {
vlc_mutex_unlock( &p_playlist->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock );
vout_OSDMessage( VLC_OBJECT(p_intf), _( "Play" ) ); vout_OSDMessage( p_intf, _( "Play" ) );
playlist_Play( p_playlist ); playlist_Play( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Stop" ) ); vout_OSDMessage( p_intf, _( "Stop" ) );
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
vlc_value_t val; val.b_bool = VLC_TRUE; vlc_value_t val; val.b_bool = VLC_TRUE;
var_Set( p_input, "rate-faster", val ); 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_object_release( p_input );
} }
} }
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
vlc_value_t val; val.b_bool = VLC_TRUE; vlc_value_t val; val.b_bool = VLC_TRUE;
var_Set( p_input, "rate-slower", val ); 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 ); vlc_object_release( p_input );
} }
} }
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
{ {
playlist_Prev( p_playlist ); playlist_Prev( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Previous" ) ); vout_OSDMessage( p_intf, _( "Previous" ) );
} }
} }
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
{ {
playlist_Next( p_playlist ); playlist_Next( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Next" ) ); vout_OSDMessage( p_intf, _( "Next" ) );
} }
} }
...@@ -170,11 +170,11 @@ ...@@ -170,11 +170,11 @@
var_Set( p_playlist, "random", val ); var_Set( p_playlist, "random", val );
if( val.b_bool ) if( val.b_bool )
{ {
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Random On" ) ); vout_OSDMessage( p_intf, _( "Random On" ) );
} }
else 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; p_intf->p_sys->b_playlist_update = VLC_TRUE;
...@@ -198,11 +198,11 @@ ...@@ -198,11 +198,11 @@
var_Set( p_playlist, "repeat", val ); var_Set( p_playlist, "repeat", val );
if( val.b_bool ) if( val.b_bool )
{ {
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Repeat All" ) ); vout_OSDMessage( p_intf, _( "Repeat All" ) );
} }
else 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; p_intf->p_sys->b_playlist_update = VLC_TRUE;
...@@ -226,11 +226,11 @@ ...@@ -226,11 +226,11 @@
var_Set( p_playlist, "loop", val ); var_Set( p_playlist, "loop", val );
if( val.b_bool ) if( val.b_bool )
{ {
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Repeat One" ) ); vout_OSDMessage( p_intf, _( "Repeat One" ) );
} }
else 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; p_intf->p_sys->b_playlist_update = VLC_TRUE;
...@@ -317,14 +317,12 @@ ...@@ -317,14 +317,12 @@
{ {
intf_thread_t * p_intf = [NSApp getIntf]; intf_thread_t * p_intf = [NSApp getIntf];
audio_volume_t i_volume; audio_volume_t i_volume;
char string[9];
aout_VolumeGet( p_intf, &i_volume ); aout_VolumeGet( p_intf, &i_volume );
[o_volumeslider setFloatValue: (float)(i_volume / AOUT_VOLUME_STEP)]; [o_volumeslider setFloatValue: (float)(i_volume / AOUT_VOLUME_STEP)];
sprintf( string, "Vol %d%%", i_volume*100/AOUT_VOLUME_MAX ); vout_OSDMessage( p_intf, "Vol %d%%", i_volume*100/AOUT_VOLUME_MAX );
vout_OSDMessage( (vlc_object_t *)p_intf, string );
} }
- (IBAction)windowAction:(id)sender - (IBAction)windowAction:(id)sender
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video_text.c : text manipulation functions * video_text.c : text manipulation functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2004 VideoLAN * 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> * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -88,7 +88,7 @@ void vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string, ...@@ -88,7 +88,7 @@ void vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string,
* \brief Write an informative message at the default location, * \brief Write an informative message at the default location,
* for the default duration and only if the OSD option is enabled. * for the default duration and only if the OSD option is enabled.
* \param p_caller The object that called the function. * \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, ... ) void __vout_OSDMessage( vlc_object_t *p_caller, char *psz_format, ... )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment