Commit 8ab353b1 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

* 2nd review of /src/* \ libvlc.h (refs #438)

parent 96a74981
......@@ -102,7 +102,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
p_snapshot->p_data,
p_snapshot->i_datasize );
if( !p_pic )
RAISE( mediacontrol_InternalException, "Out of memory" );
RAISE( mediacontrol_InternalException, "out of memory" );
free( p_snapshot->p_data );
free( p_snapshot );
}
......@@ -119,7 +119,7 @@ mediacontrol_all_snapshots( mediacontrol_Instance *self,
{
exception=mediacontrol_exception_init( exception );
RAISE( mediacontrol_InternalException, "Unsupported method" );
RAISE( mediacontrol_InternalException, "unsupported method" );
return NULL;
}
......@@ -181,14 +181,14 @@ mediacontrol_display_text( mediacontrol_Instance *self,
psz_message = strdup( message );
if( !psz_message )
{
RAISE( mediacontrol_InternalException, "No more memory" );
RAISE( mediacontrol_InternalException, "no more memory" );
return;
}
p_vout = vlc_object_find( self->p_playlist, VLC_OBJECT_VOUT, FIND_CHILD );
if( ! p_vout )
{
RAISE( mediacontrol_InternalException, "No video output" );
RAISE( mediacontrol_InternalException, "no video output" );
return;
}
......
......@@ -67,14 +67,14 @@ mediacontrol_Instance* mediacontrol_new_from_object( int vlc_object_id,
p_object = ( vlc_object_t* )vlc_current_object( vlc_object_id );
if( ! p_object )
{
RAISE( mediacontrol_InternalException, "Unable to find vlc object" );
RAISE( mediacontrol_InternalException, "unable to find vlc object" );
return NULL;
}
p_vlc = vlc_object_find( p_object, VLC_OBJECT_ROOT, FIND_PARENT );
if( ! p_vlc )
{
RAISE( mediacontrol_InternalException, "Unable to initialize VLC" );
RAISE( mediacontrol_InternalException, "unable to initialize VLC" );
return NULL;
}
retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) );
......@@ -88,7 +88,7 @@ mediacontrol_Instance* mediacontrol_new_from_object( int vlc_object_id,
if( ! retval->p_playlist || ! retval->p_intf )
{
RAISE( mediacontrol_InternalException, "No available interface" );
RAISE( mediacontrol_InternalException, "no interface available" );
return NULL;
}
return retval;
......
......@@ -22,7 +22,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( ! ppsz_argv )
{
exception->code = mediacontrol_InternalException;
exception->message = "Out of memory";
exception->message = "out of memory";
return NULL;
}
ppsz_argv[0] = "vlc";
......@@ -32,7 +32,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( ! ppsz_argv[i_index + 1] )
{
exception->code = mediacontrol_InternalException;
exception->message = "Out of memory";
exception->message = "out of memory";
return NULL;
}
}
......@@ -44,7 +44,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( p_vlc_id < 0 )
{
exception->code = mediacontrol_InternalException;
exception->message = strdup( "Unable to create VLC" );
exception->message = strdup( "unable to create VLC" );
return NULL;
}
......@@ -53,21 +53,21 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( ! p_vlc )
{
exception->code = mediacontrol_InternalException;
exception->message = strdup( "Unable to find VLC object" );
exception->message = strdup( "unable to find VLC object" );
return NULL;
}
retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) );
if( ! retval )
{
exception->code = mediacontrol_InternalException;
exception->message = strdup( "Out of memory" );
exception->message = strdup( "out of memory" );
return NULL;
}
if( VLC_Init( p_vlc_id, i_count + 1, ppsz_argv ) != VLC_SUCCESS )
{
exception->code = mediacontrol_InternalException;
exception->message = strdup( "Cannot initialize VLC" );
exception->message = strdup( "cannot initialize VLC" );
return NULL;
}
......@@ -82,7 +82,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( ! retval->p_playlist || ! retval->p_intf )
{
exception->code = mediacontrol_InternalException;
exception->message = strdup( "No available interface" );
exception->message = strdup( "no interface available" );
return NULL;
}
......
......@@ -5,7 +5,7 @@
mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *exception )
{
exception->code = mediacontrol_InternalException;
exception->message = strdup( "The mediacontrol extension was compiled for plugin use only." );
exception->message = strdup( "The mediacontrol extension was compiled for plugin usage only." );
return NULL;
};
......
......@@ -564,7 +564,7 @@ static void SkipID3Tag( demux_t *p_demux )
/* Skip the entire tag */
stream_Read( p_demux->s, NULL, i_size );
msg_Dbg( p_demux, "ID3v2.%d revision %d tag found, skiping %d bytes",
msg_Dbg( p_demux, "ID3v2.%d revision %d tag found, skipping %d bytes",
version, revision, i_size );
return;
......
......@@ -2063,7 +2063,7 @@ static int InputSourceInit( input_thread_t *p_input,
else
{
psz_path = psz_mrl;
msg_Dbg( p_input, "trying to preparse %s", psz_path );
msg_Dbg( p_input, "trying to pre-parse %s", psz_path );
psz_demux = strdup( "" );
psz_access = strdup( "file" );
}
......
......@@ -807,7 +807,7 @@ static int AStreamSeekBlock( stream_t *s, int64_t i_pos )
if( !b_aseek )
{
msg_Err( s, "backward seek impossible (access non seekable)" );
msg_Err( s, "backward seeking impossible (access not seekable)" );
return VLC_EGENERIC;
}
......@@ -1327,7 +1327,7 @@ static void AStreamPrebufferStream( stream_t *s )
( (p_access->info.i_title > 1 || p_access->info.i_seekpoint > 1) ?
STREAM_CACHE_PREBUFFER_SIZE : STREAM_CACHE_TRACK_SIZE / 3 );
msg_Dbg( s, "pre buffering" );
msg_Dbg( s, "pre-buffering..." );
i_start = mdate();
for( ;; )
{
......@@ -1347,7 +1347,7 @@ static void AStreamPrebufferStream( stream_t *s )
i_byterate = ( I64C(1000000) * p_sys->stat.i_bytes ) /
(p_sys->stat.i_read_time+1);
msg_Dbg( s, "prebuffering done "I64Fd" bytes in "I64Fd"s - "
msg_Dbg( s, "pre-buffering done "I64Fd" bytes in "I64Fd"s - "
I64Fd" kbytes/s",
p_sys->stat.i_bytes,
p_sys->stat.i_read_time / I64C(1000000),
......
......@@ -191,7 +191,7 @@ int intf_RunThread( intf_thread_t *p_intf )
{
msg_Err( p_intf, "You cannot run the MacOS X module as an "
"extra interface. Please read the "
"README.MacOSX.rtf file");
"README.MacOSX.rtf file.");
return VLC_EGENERIC;
}
if( vlc_thread_create( p_intf, "interface", RunInterface,
......
......@@ -208,7 +208,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device )
i_ret = ioctl( i_fd, CDROMEJECT, 0 );
#else
msg_Warn( p_this, "CD-Rom ejection unsupported on this platform" );
msg_Warn( p_this, "CD-ROM ejection unsupported on this platform" );
i_ret = -1;
#endif
......
......@@ -1347,7 +1347,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
p_this->p_vlc->ppsz_argv = ppsz_argv;
#ifdef __APPLE__
/* When vlc.app is run by double clicking in Mac OS X, the 2nd arg
/* When VLC.app is run by double clicking in Mac OS X, the 2nd arg
* is the PSN - process serial number (a unique PID-ish thingie)
* still ok for real Darwin & when run from command line */
if ( (*pi_argc > 1) && (strncmp( ppsz_argv[ 1 ] , "-psn" , 4 ) == 0) )
......
......@@ -51,14 +51,14 @@ static int FindLanguage( const char * psz_lang )
"Italian", "it",
"Japanese", "ja",
"Korean", "ko",
"Georgian", "ka",
"Georgian", "ka",
"Dutch", "nl",
"Occitan", "oc",
"Brazillian Portuguese", "pt_BR",
"Occitan", "oc",
"Brazilian Portuguese", "pt_BR",
"Romanian", "ro",
"Russian", "ru",
"Turkish", "tr",
"Simplified Chinese", "zh_CN",
"Simplified Chinese", "zh_CN",
"Chinese Traditional", "zh_TW",
NULL
};
......
......@@ -1307,7 +1307,7 @@ static int CallEntry( module_t * p_module )
{
/* With a well-written module we shouldn't have to print an
* additional error message here, but just make sure. */
msg_Err( p_module, "failed calling symbol \"%s\" in file `%s'",
msg_Err( p_module, "Failed to call symbol \"%s\" in file `%s'",
psz_name, p_module->psz_filename );
return -1;
}
......
......@@ -378,7 +378,7 @@ void __vlc_object_destroy( vlc_object_t *p_this )
else if( i_delay == 20 )
{
msg_Err( p_this,
"we waited too long, cancelling destruction (id=%d,type=%d)",
"waited too long, cancelling destruction (id=%d,type=%d)",
p_this->i_object_id, p_this->i_object_type );
return;
}
......
......@@ -437,7 +437,7 @@ void __stats_TimerStop( vlc_object_t *p_obj, unsigned int i_id )
i_id );
if( !p_counter || p_counter->i_samples != 2 )
{
msg_Err( p_obj, "timer does not exist" );
msg_Err( p_obj, "Timer does not exist" );
return;
}
p_counter->pp_samples[0]->value.b_bool = VLC_FALSE;
......@@ -680,7 +680,7 @@ static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
int i_total;
if( !p_counter || p_counter->i_samples != 2 )
{
msg_Err( p_obj, "timer %s does not exist", p_counter->psz_name );
msg_Err( p_obj, "Timer %s does not exist", p_counter->psz_name );
return;
}
i_total = p_counter->pp_samples[1]->value.i_int;
......
......@@ -672,11 +672,11 @@ static int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
p_message = vlm_MessageNew( "load", NULL );
goto success;
case 2:
p_message = vlm_MessageNew( "load", "read file error" );
p_message = vlm_MessageNew( "load", "Read file error" );
goto error;
case 3:
p_message =
vlm_MessageNew( "load", "error while loading file" );
vlm_MessageNew( "load", "Error while loading file" );
goto error;
default:
p_message =
......
......@@ -702,7 +702,8 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
/* NOTE: Using i_idn here would not be thread-safe */
hints.ai_flags &= ~AI_IDN;
i_idn = VLC_FALSE;
msg_Dbg( p_this, "I18n Domain Names not supported - disabled" );
msg_Dbg( p_this, "localized Domain Names not supported - " \
"disabled" );
}
}
# endif
......
......@@ -1135,7 +1135,7 @@ void httpd_HostDelete( httpd_host_t *host )
for( i = 0; i < host->i_url; i++ )
{
msg_Err( host, "url still registered:%s", host->url[i]->psz_url );
msg_Err( host, "url still registered: %s", host->url[i]->psz_url );
}
for( i = 0; i < host->i_client; i++ )
{
......
......@@ -339,7 +339,7 @@ int __net_Select( vlc_object_t *p_this, int *pi_fd, v_socket_t **pp_vs,
}
else if( i_ret < 0 )
{
msg_Err( p_this, "network select error (%s)", strerror(errno) );
msg_Err( p_this, "network selection error (%s)", strerror(errno) );
return -1;
}
else if( i_ret == 0 )
......@@ -422,9 +422,9 @@ int __net_Write( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
if( i_ret < 0 )
{
#if defined(WIN32) || defined(UNDER_CE)
msg_Err( p_this, "network select error (%d)", WSAGetLastError() );
msg_Err( p_this, "network selection error (%d)", WSAGetLastError() );
#else
msg_Err( p_this, "network select error (%s)", strerror(errno) );
msg_Err( p_this, "network selection error (%s)", strerror(errno) );
#endif
return i_total > 0 ? i_total : -1;
}
......
......@@ -245,7 +245,7 @@ void rootwrap (void)
exit (1);
close (fd);
fputs ("Starting VLC root wrapper...", stderr);
fputs ("starting VLC root wrapper...", stderr);
pw = guess_user ();
if (pw == NULL)
......
......@@ -247,7 +247,7 @@ next_ai: /* failure */
if( SocksHandshakeTCP( p_this, i_handle, 5, psz_user, psz_pwd,
psz_host, i_port ) )
{
msg_Err( p_this, "failed to use the SOCKS server" );
msg_Err( p_this, "Failed to use the SOCKS server" );
net_Close( i_handle );
i_handle = -1;
}
......@@ -281,7 +281,7 @@ int *__net_ListenTCP( vlc_object_t *p_this, const char *psz_host, int i_port )
i_val = vlc_getaddrinfo( p_this, psz_host, i_port, &hints, &res );
if( i_val )
{
msg_Err( p_this, "cannot resolve %s port %d : %s", psz_host, i_port,
msg_Err( p_this, "Cannot resolve %s port %d : %s", psz_host, i_port,
vlc_gai_strerror( i_val ) );
return NULL;
}
......
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