*****************************************************************************/
#define THRESHOLD_TEXT N_( "Motion threshold (10-100)" )
#define THRESHOLD_LONGTEXT N_( \
- "Amount of movement required for a mouse" \
- " gesture to be recorded." )
+ "Amount of movement required for a mouse gesture to be recorded." )
#define BUTTON_TEXT N_( "Trigger button" )
#define BUTTON_LONGTEXT N_( \
set_shortname( _("Gestures"));
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_CONTROL );
- add_integer( "gestures-threshold", 30, NULL, THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE );
+ add_integer( "gestures-threshold", 30, NULL,
+ THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE );
add_string( "gestures-button", "right", NULL,
BUTTON_TEXT, BUTTON_LONGTEXT, VLC_FALSE );
change_string_list( button_list, button_list_text, 0 );
{
return ( i_pattern >> ( i_num * 4 ) ) & 0xF;
}
-
+
/*****************************************************************************
* CloseIntf: destroy dummy interface
*****************************************************************************/
if( InitThread( p_intf ) < 0 )
{
- msg_Err( p_intf, "can't initialize intf" );
+ msg_Err( p_intf, "can't initialize intferface thread" );
return;
}
- msg_Dbg( p_intf, "intf initialized" );
+ msg_Dbg( p_intf, "interface thread initialized" );
/* Main loop */
while( !p_intf->b_die )
{
vlc_mutex_lock( &p_intf->change_lock );
- /*
+ /*
* mouse cursor
*/
if( p_intf->p_sys->b_got_gesture )
{
break;
}
-
+
playlist_Prev( p_playlist );
vlc_object_release( p_playlist );
break;
{
break;
}
-
+
playlist_Next( p_playlist );
vlc_object_release( p_playlist );
break;
p_intf->p_vlc->b_die = VLC_TRUE;
break;
case GESTURE(DOWN,LEFT,UP,RIGHT):
- msg_Dbg(p_intf, "a square!" );
+ msg_Dbg(p_intf, "a square was drawn!" );
break;
default:
break;
p_intf->p_sys->i_pattern = 0;
p_intf->p_sys->b_got_gesture = VLC_FALSE;
}
-
+
vlc_mutex_unlock( &p_intf->change_lock );
- /*
+ /*
* video output
*/
if( p_intf->p_sys->p_vout && p_intf->p_sys->p_vout->b_die )
p_intf->p_sys->p_input = p_input;
p_intf->p_sys->b_got_gesture = VLC_FALSE;
p_intf->p_sys->b_button_pressed = VLC_FALSE;
- p_intf->p_sys->i_threshold = config_GetInt( p_intf, "gestures-threshold" );
+ p_intf->p_sys->i_threshold =
+ config_GetInt( p_intf, "gestures-threshold" );
psz_button = config_GetPsz( p_intf, "gestures-button" );
if ( !strcmp( psz_button, "left" ) )
{
{
vlc_value_t val;
int pattern = 0;
-
+
signed int i_horizontal, i_vertical;
intf_thread_t *p_intf = (intf_thread_t *)p_data;
/* don't process new gestures before the last events are processed */
- if( p_intf->p_sys->b_got_gesture ) {
+ if( p_intf->p_sys->b_got_gesture )
+ {
return VLC_SUCCESS;
}
vlc_mutex_lock( &p_intf->change_lock );
- if( !strcmp(psz_var, "mouse-moved" ) && p_intf->p_sys->b_button_pressed ) {
+ if( !strcmp(psz_var, "mouse-moved" ) && p_intf->p_sys->b_button_pressed )
+ {
var_Get( p_intf->p_sys->p_vout, "mouse-x", &val );
p_intf->p_sys->i_mouse_x = val.i_int;
var_Get( p_intf->p_sys->p_vout, "mouse-y", &val );
i_vertical = p_intf->p_sys->i_mouse_y
- p_intf->p_sys->i_last_y;
i_vertical = i_vertical / p_intf->p_sys->i_threshold;
-
- if ( i_horizontal < 0 )
+
+ if( i_horizontal < 0 )
{
- msg_Dbg( p_intf, "left gesture(%d)", i_horizontal );
+ msg_Dbg( p_intf, "left gesture (%d)", i_horizontal );
pattern = LEFT;
}
- else if ( i_horizontal > 0 )
+ else if( i_horizontal > 0 )
{
- msg_Dbg( p_intf, "right gesture(%d)", i_horizontal );
+ msg_Dbg( p_intf, "right gesture (%d)", i_horizontal );
pattern = RIGHT;
}
- if ( i_vertical < 0 )
+ if( i_vertical < 0 )
{
- msg_Dbg( p_intf, "up gesture(%d)", i_vertical );
+ msg_Dbg( p_intf, "up gesture (%d)", i_vertical );
pattern = UP;
}
- else if ( i_vertical > 0 )
+ else if( i_vertical > 0 )
{
- msg_Dbg( p_intf, "down gesture(%d)", i_vertical );
+ msg_Dbg( p_intf, "down gesture (%d)", i_vertical );
pattern = DOWN;
}
- if (pattern )
+ if( pattern )
{
p_intf->p_sys->i_last_y = p_intf->p_sys->i_mouse_y;
p_intf->p_sys->i_last_x = p_intf->p_sys->i_mouse_x;
- if( gesture(p_intf->p_sys->i_pattern, p_intf->p_sys->i_num_gestures - 1 ) != pattern )
+ if( gesture( p_intf->p_sys->i_pattern,
+ p_intf->p_sys->i_num_gestures - 1 ) != pattern )
{
- p_intf->p_sys->i_pattern |= pattern << ( p_intf->p_sys->i_num_gestures * 4 );
+ p_intf->p_sys->i_pattern |=
+ pattern << ( p_intf->p_sys->i_num_gestures * 4 );
p_intf->p_sys->i_num_gestures++;
}
}
}
- if( !strcmp( psz_var, "mouse-button-down" ) && newval.i_int & p_intf->p_sys->i_button_mask
+ if( !strcmp( psz_var, "mouse-button-down" )
+ && newval.i_int & p_intf->p_sys->i_button_mask
&& !p_intf->p_sys->b_button_pressed )
{
p_intf->p_sys->b_button_pressed = VLC_TRUE;
var_Get( p_intf->p_sys->p_vout, "mouse-y", &val );
p_intf->p_sys->i_last_y = val.i_int;
}
- if( !strcmp( psz_var, "mouse-button-down" ) && !( newval.i_int & p_intf->p_sys->i_button_mask )
+ if( !strcmp( psz_var, "mouse-button-down" )
+ && !( newval.i_int & p_intf->p_sys->i_button_mask )
&& p_intf->p_sys->b_button_pressed )
{
p_intf->p_sys->b_button_pressed = VLC_FALSE;
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define BOOKMARK1_TEXT N_("Playlist bookmark 1")
-#define BOOKMARK2_TEXT N_("Playlist bookmark 2")
-#define BOOKMARK3_TEXT N_("Playlist bookmark 3")
-#define BOOKMARK4_TEXT N_("Playlist bookmark 4")
-#define BOOKMARK5_TEXT N_("Playlist bookmark 5")
-#define BOOKMARK6_TEXT N_("Playlist bookmark 6")
-#define BOOKMARK7_TEXT N_("Playlist bookmark 7")
-#define BOOKMARK8_TEXT N_("Playlist bookmark 8")
-#define BOOKMARK9_TEXT N_("Playlist bookmark 9")
-#define BOOKMARK10_TEXT N_("Playlist bookmark 10")
-#define BOOKMARK_LONGTEXT N_( \
- "This option allows you to define playlist bookmarks.")
+#define BOOKMARK1_TEXT N_("Playlist bookmark 1")
+#define BOOKMARK2_TEXT N_("Playlist bookmark 2")
+#define BOOKMARK3_TEXT N_("Playlist bookmark 3")
+#define BOOKMARK4_TEXT N_("Playlist bookmark 4")
+#define BOOKMARK5_TEXT N_("Playlist bookmark 5")
+#define BOOKMARK6_TEXT N_("Playlist bookmark 6")
+#define BOOKMARK7_TEXT N_("Playlist bookmark 7")
+#define BOOKMARK8_TEXT N_("Playlist bookmark 8")
+#define BOOKMARK9_TEXT N_("Playlist bookmark 9")
+#define BOOKMARK10_TEXT N_("Playlist bookmark 10")
+#define BOOKMARK_LONGTEXT N_("Define playlist bookmarks.")
vlc_module_begin();
set_shortname( _("Hotkeys") );
if( p_hotkeys[i].i_key == i_key )
{
i_action = p_hotkeys[i].i_action;
- i_times = p_hotkeys[i].i_times; /* times key pressed within max. delta time */
+ i_times = p_hotkeys[i].i_times;
+ /* times key pressed within max. delta time */
p_hotkeys[i].i_times = 0;
}
}
{
if( p_vout )
{
- var_Get( p_vout, "fullscreen", &val ); val.b_bool = !val.b_bool;
+ var_Get( p_vout, "fullscreen", &val );
+ val.b_bool = !val.b_bool;
var_Set( p_vout, "fullscreen", val );
}
else
FIND_ANYWHERE );
if( p_playlist )
{
- var_Get( p_playlist, "fullscreen", &val ); val.b_bool = !val.b_bool;
+ var_Get( p_playlist, "fullscreen", &val );
+ val.b_bool = !val.b_bool;
var_Set( p_playlist, "fullscreen", val );
vlc_object_release( p_playlist );
}
val.i_int = PAUSE_S;
var_Set( p_input, "state", val );
}
- else if( i_action == ACTIONID_JUMP_BACKWARD_EXTRASHORT && b_seekable )
+ else if( i_action == ACTIONID_JUMP_BACKWARD_EXTRASHORT
+ && b_seekable )
{
#define SET_TIME( a, b ) \
i_interval = config_GetInt( p_input, a "-jump-size" ); \
i_count = list.p_list->i_count;
if( i_count <= 1 )
{
- vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Subtitle track: %s"), _("N/A") );
+ vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
+ _("Subtitle track: %s"), _("N/A") );
continue;
}
for( i = 0; i < i_count; i++ )
/* value of spu-es was not in choices list */
if( i == i_count )
{
- msg_Warn( p_input, "invalid current subtitle track, selecting 0" );
+ msg_Warn( p_input,
+ "invalid current subtitle track, selecting 0" );
var_Set( p_input, "spu-es", list.p_list->p_values[0] );
i = 0;
}
FIND_ANYWHERE );
if( p_playlist )
{
- vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Next") );
+ vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
+ _("Next") );
playlist_Next( p_playlist );
vlc_object_release( p_playlist );
}
FIND_ANYWHERE );
if( p_playlist )
{
- vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Previous") );
+ vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
+ _("Previous") );
playlist_Prev( 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(p_input), DEFAULT_CHAN, _("Faster") );
+ vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
+ _("Faster") );
}
else if( i_action == ACTIONID_SLOWER )
{
vlc_value_t val;
val.b_bool = VLC_TRUE;
var_Set( p_input, "rate-slower", val );
- vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN, _("Slower") );
+ vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
+ _("Slower") );
}
else if( i_action == ACTIONID_POSITION && b_seekable )
{
else if( i_action == ACTIONID_DISC_MENU )
{
vlc_value_t val; val.i_int = 2;
-msg_Dbg( p_input, "set dvdmenu" );
var_Set( p_input, "title 0", val);
}
else if( i_action == ACTIONID_SUBDELAY_DOWN )
VLC_VAR_STRING|VLC_VAR_DOINHERIT );
if( p_playlist->status.p_item )
{
- config_PutPsz( p_intf, psz_bookmark_name,
+ config_PutPsz( p_intf, psz_bookmark_name,
p_playlist->status.p_item->input.psz_uri);
msg_Info( p_intf, "setting playlist bookmark %i to %s", i_num,
p_playlist->status.p_item->input.psz_uri);
#define HOST_TEXT N_( "Host address" )
#define HOST_LONGTEXT N_( \
- "You can set the address and port the http interface will bind to." )
+ "Address and port the http interface will bind to" )
#define SRC_TEXT N_( "Source directory" )
#define SRC_LONGTEXT N_( "Source directory" )
#define CHARSET_TEXT N_( "Charset" )
#define CHARSET_LONGTEXT N_( \
- "Charset declared in Content-Type header (default UTF-8)." )
+ "Charset declared in Content-Type header (default UTF-8)" )
#define HANDLERS_TEXT N_( "Handlers" )
#define HANDLERS_LONGTEXT N_( \
- "List of extensions and executable paths (for instance: " \
- "php=/usr/bin/php,pl=/usr/bin/perl)." )
+ "List of handler extensions and executable paths (for instance: " \
+ "php=/usr/bin/php,pl=/usr/bin/perl)" )
#define CERT_TEXT N_( "Certificate file" )
#define CERT_LONGTEXT N_( "HTTP interface x509 PEM certificate file " \
"(enables SSL)" )
if( !psz_src || *psz_src == '\0' )
{
- msg_Err( p_intf, "invalid src dir" );
+ msg_Err( p_intf, "invalid web interface source directory" );
goto failed;
}
if( p_sys->i_files <= 0 )
{
- msg_Err( p_intf, "cannot find any files (%s)", psz_src );
+ msg_Err( p_intf, "cannot find any file in directory %s", psz_src );
goto failed;
}
p_intf->pf_run = Run;
if( ( i_dir_content = utf8_scandir( psz_dir, &ppsz_dir_content, Filter,
InsensitiveAlphasort ) ) == -1 )
{
- msg_Warn( p_intf, "scandir error on %s (%s)", psz_dir,
+ msg_Warn( p_intf, "error while scaning dir %s (%s)", psz_dir,
strerror(errno) );
free( psz_dir );
return s;
if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL )
{
- msg_Err( p_intf, "cannot open dir (%s)", psz_dir );
+ msg_Err( p_intf, "cannot open directory (%s)", psz_dir );
return VLC_EGENERIC;
}
i_dirlen = strlen( psz_dir );
if( i_dirlen + 10 > MAX_DIR_SIZE )
{
- msg_Warn( p_intf, "skipping too deep dir (%s)", psz_dir );
+ msg_Warn( p_intf, "skipping too deep directory (%s)", psz_dir );
return 0;
}
{
i_value += 3600 * i_stock;
i_stock = 0;
- /* other characters which are not numbers are not important */
- while( ((p_value[0] < '0') || (p_value[0] > '9')) && (p_value[0] != '\0') )
+ /* other characters which are not numbers are not
+ * important */
+ while( ((p_value[0] < '0') || (p_value[0] > '9'))
+ && (p_value[0] != '\0') )
{
p_value++;
}
i_value += 60 * i_stock;
i_stock = 0;
p_value++;
- while( ((p_value[0] < '0') || (p_value[0] > '9')) && (p_value[0] != '\0') )
+ while( ((p_value[0] < '0') || (p_value[0] > '9'))
+ && (p_value[0] != '\0') )
{
p_value++;
}
{
i_value += i_stock;
i_stock = 0;
- while( ((p_value[0] < '0') || (p_value[0] > '9')) && (p_value[0] != '\0') )
+ while( ((p_value[0] < '0') || (p_value[0] > '9'))
+ && (p_value[0] != '\0') )
{
p_value++;
}
}
}
- /* if there is no known symbol, I consider it as seconds. Otherwise, i_stock = 0 */
+ /* if there is no known symbol, I consider it as seconds.
+ * Otherwise, i_stock = 0 */
i_value += i_stock;
switch(i_relative)
}
case POSITION_ABSOLUTE:
{
- val.f_float = __MIN( __MAX( ((float) i_value ) / 100.0 , 0.0 ) , 100.0 );
+ val.f_float = __MIN( __MAX( ((float) i_value ) / 100.0 ,
+ 0.0 ), 100.0 );
var_Set( p_sys->p_input, "position", val );
- msg_Dbg( p_intf, "requested seek percent: %d", i_value );
+ msg_Dbg( p_intf, "requested seek percent: %d%%", i_value );
break;
}
case POSITION_REL_FOR:
{
var_Get( p_sys->p_input, "position", &val );
- val.f_float += __MIN( __MAX( ((float) i_value ) / 100.0 , 0.0 ) , 100.0 );
+ val.f_float += __MIN( __MAX( ((float) i_value ) / 100.0,
+ 0.0 ) , 100.0 );
var_Set( p_sys->p_input, "position", val );
- msg_Dbg( p_intf, "requested seek percent forward: %d", i_value );
+ msg_Dbg( p_intf, "requested seek percent forward: %d%%",
+ i_value );
break;
}
case POSITION_REL_BACK:
{
var_Get( p_sys->p_input, "position", &val );
- val.f_float -= __MIN( __MAX( ((float) i_value ) / 100.0 , 0.0 ) , 100.0 );
+ val.f_float -= __MIN( __MAX( ((float) i_value ) / 100.0,
+ 0.0 ) , 100.0 );
var_Set( p_sys->p_input, "position", val );
- msg_Dbg( p_intf, "requested seek percent backward: %d", i_value );
+ msg_Dbg( p_intf, "requested seek percent backward: %d%%",
+ i_value );
break;
}
default:
{
- msg_Dbg( p_intf, "requested seek: what the f*** is going on here ?" );
+ msg_Dbg( p_intf, "invalid seek request" );
break;
}
}
i_fd = lirc_init( "vlc", 1 );
if( i_fd == -1 )
{
- msg_Err( p_intf, "lirc_init failed" );
+ msg_Err( p_intf, "lirc initialisation failed" );
free( p_intf->p_sys );
return 1;
}
if( lirc_readconfig( NULL, &p_intf->p_sys->config, NULL ) != 0 )
{
- msg_Err( p_intf, "lirc_readconfig failed" );
+ msg_Err( p_intf, "failure while reading lirc config" );
lirc_deinit();
free( p_intf->p_sys );
return 1;
if( strncmp( "key-", c, 4 ) )
{
- msg_Err( p_intf, "This doesn't appear to be a valid keycombo lirc sent us. Please look at the doc/lirc/example.lirc file in VLC" );
+ msg_Err( p_intf, "this doesn't appear to be a valid keycombo lirc sent us. Please look at the doc/lirc/example.lirc file in VLC" );
break;
}
keyval.i_int = config_GetInt( p_intf, c );
static mtime_t GetClockRef( intf_thread_t *, mtime_t );
#define NETSYNC_TEXT N_( "Act as master for network synchronisation" )
-#define NETSYNC_LONGTEXT N_( "Allows you to specify if this client should " \
+#define NETSYNC_LONGTEXT N_( "Specify if this client should " \
"act as the master client for the network synchronisation." )
#define MIP_TEXT N_( "Master client ip address" )
-#define MIP_LONGTEXT N_( "Allows you to specify the ip address of " \
+#define MIP_LONGTEXT N_( "Specify the ip address of " \
"the master client used for the network synchronisation." )
vlc_module_begin();
if( i_socket < 0 )
{
- msg_Err( p_intf, "failed opening UDP socket." );
+ msg_Err( p_intf, "failed opening UDP socket" ); /* str review: is this good enough? */
return;
}
/* We received something */
i_struct_size = sizeof( from );
i_read = recvfrom( i_socket, p_data, MAX_MSG_LENGTH, 0,
- (struct sockaddr*)&from,
+ (struct sockaddr*)&from,
(unsigned int *)&i_struct_size );
i_clockref = ntoh64(*(int64_t *)p_data);
#if 0
msg_Dbg( p_intf, "Slave clockref: "I64Fd" -> "I64Fd" -> "I64Fd", "
"clock diff: "I64Fd" drift: "I64Fd,
- i_clockref, i_master_clockref,
+ i_clockref, i_master_clockref,
i_client_clockref, i_diff_date, i_drift );
#endif
"If enabled the interface will uninstall the Service and exit." )
#define NAME_TEXT N_( "Display name of the Service" )
#define NAME_LONGTEXT N_( \
- "This allows you to change the display name of the Service." )
+ "Change the display name of the Service." )
#define OPTIONS_TEXT N_("Configuration options")
#define OPTIONS_LONGTEXT N_( \
- "This option allows you to specify configuration options that will be " \
+ "Specify configuration options that will be " \
"used by the Service (eg. --foo=bar --no-foobar). It should be specified "\
"at install time so the Service is properly configured.")
#define EXTRAINTF_TEXT N_("Extra interface modules")
#define EXTRAINTF_LONGTEXT N_( \
- "This option allows you to select additional interfaces spawned by the " \
+ "Select additional interfaces spawned by the " \
"Service. It should be specified at install time so the Service is " \
"properly configured. Use a comma separated list of interface modules. " \
"(common values are: logger, sap, rc, http)")
if( StartServiceCtrlDispatcher( dispatchTable ) == 0 )
{
- msg_Err( p_intf, "StartServiceCtrlDispatcher failed" );
+ msg_Err( p_intf, "StartServiceCtrlDispatcher failed" ); /* str review */
}
free( p_intf->p_sys->psz_service );
SC_HANDLE handle = OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACCESS );
if( handle == NULL )
{
- msg_Err( p_intf, "could not connect to SCM database" );
+ msg_Err( p_intf,
+ "could not connect to Services Control Manager database" );
return VLC_EGENERIC;
}
SC_HANDLE handle = OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACCESS );
if( handle == NULL )
{
- msg_Err( p_intf, "could not connect to SCM database" );
+ msg_Err( p_intf,
+ "could not connect to Services Control Manager database" );
return VLC_EGENERIC;
}
if( InitThread( p_intf ) < 0 )
{
- msg_Err( p_intf, "cannot initialize intf" );
+ msg_Err( p_intf, "cannot initialize interface" );
return;
}