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

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

parent 96a74981
...@@ -102,7 +102,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self, ...@@ -102,7 +102,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
p_snapshot->p_data, p_snapshot->p_data,
p_snapshot->i_datasize ); p_snapshot->i_datasize );
if( !p_pic ) if( !p_pic )
RAISE( mediacontrol_InternalException, "Out of memory" ); RAISE( mediacontrol_InternalException, "out of memory" );
free( p_snapshot->p_data ); free( p_snapshot->p_data );
free( p_snapshot ); free( p_snapshot );
} }
...@@ -119,7 +119,7 @@ mediacontrol_all_snapshots( mediacontrol_Instance *self, ...@@ -119,7 +119,7 @@ mediacontrol_all_snapshots( mediacontrol_Instance *self,
{ {
exception=mediacontrol_exception_init( exception ); exception=mediacontrol_exception_init( exception );
RAISE( mediacontrol_InternalException, "Unsupported method" ); RAISE( mediacontrol_InternalException, "unsupported method" );
return NULL; return NULL;
} }
...@@ -181,14 +181,14 @@ mediacontrol_display_text( mediacontrol_Instance *self, ...@@ -181,14 +181,14 @@ mediacontrol_display_text( mediacontrol_Instance *self,
psz_message = strdup( message ); psz_message = strdup( message );
if( !psz_message ) if( !psz_message )
{ {
RAISE( mediacontrol_InternalException, "No more memory" ); RAISE( mediacontrol_InternalException, "no more memory" );
return; return;
} }
p_vout = vlc_object_find( self->p_playlist, VLC_OBJECT_VOUT, FIND_CHILD ); p_vout = vlc_object_find( self->p_playlist, VLC_OBJECT_VOUT, FIND_CHILD );
if( ! p_vout ) if( ! p_vout )
{ {
RAISE( mediacontrol_InternalException, "No video output" ); RAISE( mediacontrol_InternalException, "no video output" );
return; return;
} }
......
...@@ -67,14 +67,14 @@ mediacontrol_Instance* mediacontrol_new_from_object( int vlc_object_id, ...@@ -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 ); p_object = ( vlc_object_t* )vlc_current_object( vlc_object_id );
if( ! p_object ) if( ! p_object )
{ {
RAISE( mediacontrol_InternalException, "Unable to find vlc object" ); RAISE( mediacontrol_InternalException, "unable to find vlc object" );
return NULL; return NULL;
} }
p_vlc = vlc_object_find( p_object, VLC_OBJECT_ROOT, FIND_PARENT ); p_vlc = vlc_object_find( p_object, VLC_OBJECT_ROOT, FIND_PARENT );
if( ! p_vlc ) if( ! p_vlc )
{ {
RAISE( mediacontrol_InternalException, "Unable to initialize VLC" ); RAISE( mediacontrol_InternalException, "unable to initialize VLC" );
return NULL; return NULL;
} }
retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) ); retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) );
...@@ -88,7 +88,7 @@ mediacontrol_Instance* mediacontrol_new_from_object( int vlc_object_id, ...@@ -88,7 +88,7 @@ mediacontrol_Instance* mediacontrol_new_from_object( int vlc_object_id,
if( ! retval->p_playlist || ! retval->p_intf ) if( ! retval->p_playlist || ! retval->p_intf )
{ {
RAISE( mediacontrol_InternalException, "No available interface" ); RAISE( mediacontrol_InternalException, "no interface available" );
return NULL; return NULL;
} }
return retval; return retval;
......
...@@ -22,7 +22,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex ...@@ -22,7 +22,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( ! ppsz_argv ) if( ! ppsz_argv )
{ {
exception->code = mediacontrol_InternalException; exception->code = mediacontrol_InternalException;
exception->message = "Out of memory"; exception->message = "out of memory";
return NULL; return NULL;
} }
ppsz_argv[0] = "vlc"; ppsz_argv[0] = "vlc";
...@@ -32,7 +32,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex ...@@ -32,7 +32,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( ! ppsz_argv[i_index + 1] ) if( ! ppsz_argv[i_index + 1] )
{ {
exception->code = mediacontrol_InternalException; exception->code = mediacontrol_InternalException;
exception->message = "Out of memory"; exception->message = "out of memory";
return NULL; return NULL;
} }
} }
...@@ -44,7 +44,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex ...@@ -44,7 +44,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( p_vlc_id < 0 ) if( p_vlc_id < 0 )
{ {
exception->code = mediacontrol_InternalException; exception->code = mediacontrol_InternalException;
exception->message = strdup( "Unable to create VLC" ); exception->message = strdup( "unable to create VLC" );
return NULL; return NULL;
} }
...@@ -53,21 +53,21 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex ...@@ -53,21 +53,21 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( ! p_vlc ) if( ! p_vlc )
{ {
exception->code = mediacontrol_InternalException; exception->code = mediacontrol_InternalException;
exception->message = strdup( "Unable to find VLC object" ); exception->message = strdup( "unable to find VLC object" );
return NULL; return NULL;
} }
retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) ); retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) );
if( ! retval ) if( ! retval )
{ {
exception->code = mediacontrol_InternalException; exception->code = mediacontrol_InternalException;
exception->message = strdup( "Out of memory" ); exception->message = strdup( "out of memory" );
return NULL; return NULL;
} }
if( VLC_Init( p_vlc_id, i_count + 1, ppsz_argv ) != VLC_SUCCESS ) if( VLC_Init( p_vlc_id, i_count + 1, ppsz_argv ) != VLC_SUCCESS )
{ {
exception->code = mediacontrol_InternalException; exception->code = mediacontrol_InternalException;
exception->message = strdup( "Cannot initialize VLC" ); exception->message = strdup( "cannot initialize VLC" );
return NULL; return NULL;
} }
...@@ -82,7 +82,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex ...@@ -82,7 +82,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
if( ! retval->p_playlist || ! retval->p_intf ) if( ! retval->p_playlist || ! retval->p_intf )
{ {
exception->code = mediacontrol_InternalException; exception->code = mediacontrol_InternalException;
exception->message = strdup( "No available interface" ); exception->message = strdup( "no interface available" );
return NULL; return NULL;
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *exception ) mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *exception )
{ {
exception->code = mediacontrol_InternalException; 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; return NULL;
}; };
......
...@@ -564,7 +564,7 @@ static void SkipID3Tag( demux_t *p_demux ) ...@@ -564,7 +564,7 @@ static void SkipID3Tag( demux_t *p_demux )
/* Skip the entire tag */ /* Skip the entire tag */
stream_Read( p_demux->s, NULL, i_size ); 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 ); version, revision, i_size );
return; return;
......
...@@ -2063,7 +2063,7 @@ static int InputSourceInit( input_thread_t *p_input, ...@@ -2063,7 +2063,7 @@ static int InputSourceInit( input_thread_t *p_input,
else else
{ {
psz_path = psz_mrl; 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_demux = strdup( "" );
psz_access = strdup( "file" ); psz_access = strdup( "file" );
} }
......
...@@ -807,7 +807,7 @@ static int AStreamSeekBlock( stream_t *s, int64_t i_pos ) ...@@ -807,7 +807,7 @@ static int AStreamSeekBlock( stream_t *s, int64_t i_pos )
if( !b_aseek ) if( !b_aseek )
{ {
msg_Err( s, "backward seek impossible (access non seekable)" ); msg_Err( s, "backward seeking impossible (access not seekable)" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -1327,7 +1327,7 @@ static void AStreamPrebufferStream( stream_t *s ) ...@@ -1327,7 +1327,7 @@ static void AStreamPrebufferStream( stream_t *s )
( (p_access->info.i_title > 1 || p_access->info.i_seekpoint > 1) ? ( (p_access->info.i_title > 1 || p_access->info.i_seekpoint > 1) ?
STREAM_CACHE_PREBUFFER_SIZE : STREAM_CACHE_TRACK_SIZE / 3 ); STREAM_CACHE_PREBUFFER_SIZE : STREAM_CACHE_TRACK_SIZE / 3 );
msg_Dbg( s, "pre buffering" ); msg_Dbg( s, "pre-buffering..." );
i_start = mdate(); i_start = mdate();
for( ;; ) for( ;; )
{ {
...@@ -1347,7 +1347,7 @@ static void AStreamPrebufferStream( stream_t *s ) ...@@ -1347,7 +1347,7 @@ static void AStreamPrebufferStream( stream_t *s )
i_byterate = ( I64C(1000000) * p_sys->stat.i_bytes ) / i_byterate = ( I64C(1000000) * p_sys->stat.i_bytes ) /
(p_sys->stat.i_read_time+1); (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", I64Fd" kbytes/s",
p_sys->stat.i_bytes, p_sys->stat.i_bytes,
p_sys->stat.i_read_time / I64C(1000000), p_sys->stat.i_read_time / I64C(1000000),
......
...@@ -191,7 +191,7 @@ int intf_RunThread( intf_thread_t *p_intf ) ...@@ -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 " msg_Err( p_intf, "You cannot run the MacOS X module as an "
"extra interface. Please read the " "extra interface. Please read the "
"README.MacOSX.rtf file"); "README.MacOSX.rtf file.");
return VLC_EGENERIC; return VLC_EGENERIC;
} }
if( vlc_thread_create( p_intf, "interface", RunInterface, if( vlc_thread_create( p_intf, "interface", RunInterface,
......
...@@ -208,7 +208,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device ) ...@@ -208,7 +208,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device )
i_ret = ioctl( i_fd, CDROMEJECT, 0 ); i_ret = ioctl( i_fd, CDROMEJECT, 0 );
#else #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; i_ret = -1;
#endif #endif
......
...@@ -1347,7 +1347,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[], ...@@ -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; p_this->p_vlc->ppsz_argv = ppsz_argv;
#ifdef __APPLE__ #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) * is the PSN - process serial number (a unique PID-ish thingie)
* still ok for real Darwin & when run from command line */ * still ok for real Darwin & when run from command line */
if ( (*pi_argc > 1) && (strncmp( ppsz_argv[ 1 ] , "-psn" , 4 ) == 0) ) if ( (*pi_argc > 1) && (strncmp( ppsz_argv[ 1 ] , "-psn" , 4 ) == 0) )
......
...@@ -54,7 +54,7 @@ static int FindLanguage( const char * psz_lang ) ...@@ -54,7 +54,7 @@ static int FindLanguage( const char * psz_lang )
"Georgian", "ka", "Georgian", "ka",
"Dutch", "nl", "Dutch", "nl",
"Occitan", "oc", "Occitan", "oc",
"Brazillian Portuguese", "pt_BR", "Brazilian Portuguese", "pt_BR",
"Romanian", "ro", "Romanian", "ro",
"Russian", "ru", "Russian", "ru",
"Turkish", "tr", "Turkish", "tr",
......
...@@ -1307,7 +1307,7 @@ static int CallEntry( module_t * p_module ) ...@@ -1307,7 +1307,7 @@ static int CallEntry( module_t * p_module )
{ {
/* With a well-written module we shouldn't have to print an /* With a well-written module we shouldn't have to print an
* additional error message here, but just make sure. */ * 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 ); psz_name, p_module->psz_filename );
return -1; return -1;
} }
......
...@@ -378,7 +378,7 @@ void __vlc_object_destroy( vlc_object_t *p_this ) ...@@ -378,7 +378,7 @@ void __vlc_object_destroy( vlc_object_t *p_this )
else if( i_delay == 20 ) else if( i_delay == 20 )
{ {
msg_Err( p_this, 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 ); p_this->i_object_id, p_this->i_object_type );
return; return;
} }
......
...@@ -437,7 +437,7 @@ void __stats_TimerStop( vlc_object_t *p_obj, unsigned int i_id ) ...@@ -437,7 +437,7 @@ void __stats_TimerStop( vlc_object_t *p_obj, unsigned int i_id )
i_id ); i_id );
if( !p_counter || p_counter->i_samples != 2 ) 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; return;
} }
p_counter->pp_samples[0]->value.b_bool = VLC_FALSE; 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, ...@@ -680,7 +680,7 @@ static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
int i_total; int i_total;
if( !p_counter || p_counter->i_samples != 2 ) 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; return;
} }
i_total = p_counter->pp_samples[1]->value.i_int; 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, ...@@ -672,11 +672,11 @@ static int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
p_message = vlm_MessageNew( "load", NULL ); p_message = vlm_MessageNew( "load", NULL );
goto success; goto success;
case 2: case 2:
p_message = vlm_MessageNew( "load", "read file error" ); p_message = vlm_MessageNew( "load", "Read file error" );
goto error; goto error;
case 3: case 3:
p_message = p_message =
vlm_MessageNew( "load", "error while loading file" ); vlm_MessageNew( "load", "Error while loading file" );
goto error; goto error;
default: default:
p_message = p_message =
......
...@@ -702,7 +702,8 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node, ...@@ -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 */ /* NOTE: Using i_idn here would not be thread-safe */
hints.ai_flags &= ~AI_IDN; hints.ai_flags &= ~AI_IDN;
i_idn = VLC_FALSE; 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 # endif
......
...@@ -1135,7 +1135,7 @@ void httpd_HostDelete( httpd_host_t *host ) ...@@ -1135,7 +1135,7 @@ void httpd_HostDelete( httpd_host_t *host )
for( i = 0; i < host->i_url; i++ ) 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++ ) 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, ...@@ -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 ) 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; return -1;
} }
else if( i_ret == 0 ) else if( i_ret == 0 )
...@@ -422,9 +422,9 @@ int __net_Write( vlc_object_t *p_this, int fd, v_socket_t *p_vs, ...@@ -422,9 +422,9 @@ int __net_Write( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
if( i_ret < 0 ) if( i_ret < 0 )
{ {
#if defined(WIN32) || defined(UNDER_CE) #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 #else
msg_Err( p_this, "network select error (%s)", strerror(errno) ); msg_Err( p_this, "network selection error (%s)", strerror(errno) );
#endif #endif
return i_total > 0 ? i_total : -1; return i_total > 0 ? i_total : -1;
} }
......
...@@ -245,7 +245,7 @@ void rootwrap (void) ...@@ -245,7 +245,7 @@ void rootwrap (void)
exit (1); exit (1);
close (fd); close (fd);
fputs ("Starting VLC root wrapper...", stderr); fputs ("starting VLC root wrapper...", stderr);
pw = guess_user (); pw = guess_user ();
if (pw == NULL) if (pw == NULL)
......
...@@ -247,7 +247,7 @@ next_ai: /* failure */ ...@@ -247,7 +247,7 @@ next_ai: /* failure */
if( SocksHandshakeTCP( p_this, i_handle, 5, psz_user, psz_pwd, if( SocksHandshakeTCP( p_this, i_handle, 5, psz_user, psz_pwd,
psz_host, i_port ) ) 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 ); net_Close( i_handle );
i_handle = -1; i_handle = -1;
} }
...@@ -281,7 +281,7 @@ int *__net_ListenTCP( vlc_object_t *p_this, const char *psz_host, int i_port ) ...@@ -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 ); i_val = vlc_getaddrinfo( p_this, psz_host, i_port, &hints, &res );
if( i_val ) 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 ) ); vlc_gai_strerror( i_val ) );
return NULL; return NULL;
} }
......
...@@ -357,8 +357,8 @@ int __net_OpenUDP( vlc_object_t *p_this, const char *psz_bind, int i_bind, ...@@ -357,8 +357,8 @@ int __net_OpenUDP( vlc_object_t *p_this, const char *psz_bind, int i_bind,
{ {
if( sock.i_handle != -1 ) if( sock.i_handle != -1 )
{ {
msg_Warn( p_this, "net: lame IPv6/IPv4 dual-stack present. " msg_Warn( p_this, "net: lame IPv6/IPv4 dual-stack present, "
"Using only IPv4." ); "using only IPv4." );
net_Close( fd6 ); net_Close( fd6 );
} }
else else
......
...@@ -69,7 +69,7 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file ) ...@@ -69,7 +69,7 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
{ {
vlc_value_t val; vlc_value_t val;
msg_Dbg( p_this, "creating osd menu object" ); msg_Dbg( p_this, "creating OSD menu object" );
if( ( p_osd = vlc_object_create( p_this, VLC_OBJECT_OSDMENU ) ) == NULL ) if( ( p_osd = vlc_object_create( p_this, VLC_OBJECT_OSDMENU ) ) == NULL )
{ {
msg_Err( p_this, "out of memory" ); msg_Err( p_this, "out of memory" );
...@@ -112,7 +112,7 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file ) ...@@ -112,7 +112,7 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
return p_osd; return p_osd;
error: error:
msg_Err( p_this, "creating osd menu object failed" ); msg_Err( p_this, "creating OSD menu object failed" );
vlc_mutex_unlock( lockval.p_address ); vlc_mutex_unlock( lockval.p_address );
vlc_object_destroy( p_osd ); vlc_object_destroy( p_osd );
return NULL; return NULL;
......
...@@ -88,7 +88,7 @@ static osd_menu_t *osd_MenuNew( osd_menu_t *p_menu, const char *psz_path, int i_ ...@@ -88,7 +88,7 @@ static osd_menu_t *osd_MenuNew( osd_menu_t *p_menu, const char *psz_path, int i_
p_menu->p_state = (osd_menu_state_t *) malloc( sizeof( osd_menu_state_t ) ); p_menu->p_state = (osd_menu_state_t *) malloc( sizeof( osd_menu_state_t ) );
if( !p_menu->p_state ) if( !p_menu->p_state )
msg_Err( p_menu, "memory allocation for OSD Menu state failed." ); msg_Err( p_menu, "Memory allocation for OSD Menu state failed" );
if( psz_path != NULL ) if( psz_path != NULL )
p_menu->psz_path = strdup( psz_path ); p_menu->psz_path = strdup( psz_path );
...@@ -323,7 +323,7 @@ int osd_ConfigLoader( vlc_object_t *p_this, const char *psz_file, ...@@ -323,7 +323,7 @@ int osd_ConfigLoader( vlc_object_t *p_this, const char *psz_file,
fd = utf8_fopen( psz_file, "r" ); fd = utf8_fopen( psz_file, "r" );
if( !fd ) if( !fd )
{ {
msg_Err( p_this, "failed opening osd definition file %s", psz_file ); msg_Err( p_this, "failed to open OSD definition file %s", psz_file );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -132,7 +132,7 @@ playlist_item_t *__playlist_ItemCopy( vlc_object_t *p_obj, ...@@ -132,7 +132,7 @@ playlist_item_t *__playlist_ItemCopy( vlc_object_t *p_obj,
if( p_item->i_children != -1 ) if( p_item->i_children != -1 )
{ {
msg_Warn( p_obj, "not copying playlist items children" ); msg_Warn( p_obj, "not copying playlist-item's children" );
p_res->i_children = -1; p_res->i_children = -1;
p_res->pp_children = NULL; p_res->pp_children = NULL;
} }
......
...@@ -146,7 +146,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename , ...@@ -146,7 +146,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
p_module = module_Need( p_playlist, "playlist export", psz_type, VLC_TRUE); p_module = module_Need( p_playlist, "playlist export", psz_type, VLC_TRUE);
if( !p_module ) if( !p_module )
{ {
msg_Warn( p_playlist, "failed to export playlist" ); msg_Warn( p_playlist, "exporting playlist failed" );
vlc_mutex_unlock( &p_playlist->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock );
return VLC_ENOOBJ; return VLC_ENOOBJ;
} }
......
...@@ -559,7 +559,7 @@ static mtime_t ObjectGarbageCollector( playlist_t *p_playlist, int i_type, ...@@ -559,7 +559,7 @@ static mtime_t ObjectGarbageCollector( playlist_t *p_playlist, int i_type,
} }
if( i_type == VLC_OBJECT_VOUT ) if( i_type == VLC_OBJECT_VOUT )
{ {
msg_Dbg( p_playlist, "garbage collector destroying 1 vout" ); msg_Dbg( p_playlist, "garbage collector destroys 1 vout" );
vlc_object_detach( p_obj ); vlc_object_detach( p_obj );
vlc_object_release( p_obj ); vlc_object_release( p_obj );
vout_Destroy( (vout_thread_t *)p_obj ); vout_Destroy( (vout_thread_t *)p_obj );
......
...@@ -684,7 +684,7 @@ playlist_item_t *playlist_FindNextFromParent( playlist_t *p_playlist, ...@@ -684,7 +684,7 @@ playlist_item_t *playlist_FindNextFromParent( playlist_t *p_playlist,
if( p_playlist->b_go_next ) if( p_playlist->b_go_next )
{ {
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "Moving on to next node: search from %s", msg_Dbg( p_playlist, "moving on to next node: search from %s",
p_root->input.psz_name ); p_root->input.psz_name );
#endif #endif
p_next = playlist_RecursiveFindNext( p_playlist, i_view, p_next = playlist_RecursiveFindNext( p_playlist, i_view,
...@@ -699,7 +699,7 @@ playlist_item_t *playlist_FindNextFromParent( playlist_t *p_playlist, ...@@ -699,7 +699,7 @@ playlist_item_t *playlist_FindNextFromParent( playlist_t *p_playlist,
else else
{ {
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "Not moving on to next node: you loose" ); msg_Dbg( p_playlist, "not moving on to next node: you loose" );
#endif #endif
return NULL; return NULL;
} }
...@@ -728,18 +728,18 @@ playlist_item_t *playlist_FindPrevFromParent( playlist_t *p_playlist, ...@@ -728,18 +728,18 @@ playlist_item_t *playlist_FindPrevFromParent( playlist_t *p_playlist,
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
if( p_item != NULL ) if( p_item != NULL )
{ {
msg_Dbg( p_playlist, "Finding prev of %s within %s", msg_Dbg( p_playlist, "finding prev of %s within %s",
p_item->input.psz_name, p_node->input.psz_name ); p_item->input.psz_name, p_node->input.psz_name );
} }
else else
{ {
msg_Dbg( p_playlist, "Finding prev from %s",p_node->input.psz_name ); msg_Dbg( p_playlist, "finding prev from %s",p_node->input.psz_name );
} }
#endif #endif
if( !p_node || p_node->i_children == -1 ) if( !p_node || p_node->i_children == -1 )
{ {
msg_Err( p_playlist,"invalid arguments for FindPrevFromParent" ); msg_Err( p_playlist,"Invalid arguments for FindPrevFromParent" );
return NULL; return NULL;
} }
...@@ -807,7 +807,7 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist, ...@@ -807,7 +807,7 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist,
i = -1; i = -1;
} }
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist,"Current item found, child %i of %s", msg_Dbg( p_playlist,"current item found, child %i of %s",
i , p_parent->input.psz_name ); i , p_parent->input.psz_name );
#endif #endif
/* We found our item */ /* We found our item */
...@@ -815,13 +815,13 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist, ...@@ -815,13 +815,13 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist,
{ {
/* Too far... */ /* Too far... */
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "Going up the tree,at parent of %s", msg_Dbg( p_playlist, "going up the tree, at parent of %s",
p_parent->input.psz_name ); p_parent->input.psz_name );
#endif #endif
if( p_parent == p_root ) if( p_parent == p_root )
{ {
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "At root item (%s)", msg_Dbg( p_playlist, "at root item (%s)",
p_root->input.psz_name ); p_root->input.psz_name );
#endif #endif
/* Hmm, seems it's the end for you, guy ! */ /* Hmm, seems it's the end for you, guy ! */
...@@ -833,7 +833,7 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist, ...@@ -833,7 +833,7 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist,
p_parent, i_view ); p_parent, i_view );
if( p_parent_parent == NULL ) if( p_parent_parent == NULL )
{ {
msg_Warn( p_playlist, "Unable to find parent !"); msg_Warn( p_playlist, "unable to find parent!");
return NULL; return NULL;
} }
return playlist_RecursiveFindNext( p_playlist, i_view,p_root, return playlist_RecursiveFindNext( p_playlist, i_view,p_root,
...@@ -845,7 +845,7 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist, ...@@ -845,7 +845,7 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist,
{ {
/* Cool, we have found a real item to play */ /* Cool, we have found a real item to play */
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "Playing child %i of %s", msg_Dbg( p_playlist, "playing child %i of %s",
i+1 , p_parent->input.psz_name ); i+1 , p_parent->input.psz_name );
#endif #endif
return p_parent->pp_children[i+1]; return p_parent->pp_children[i+1];
...@@ -903,7 +903,7 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist, ...@@ -903,7 +903,7 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
i = -1; i = -1;
} }
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist,"Current item found, child %i of %s", msg_Dbg( p_playlist,"current item found, child %i of %s",
i , p_parent->input.psz_name ); i , p_parent->input.psz_name );
#endif #endif
/* We found our item */ /* We found our item */
...@@ -911,13 +911,13 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist, ...@@ -911,13 +911,13 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
{ {
/* Too far... */ /* Too far... */
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "Going up the tree,at parent of %s", msg_Dbg( p_playlist, "going up the tree, at parent of %s",
p_parent->input.psz_name ); p_parent->input.psz_name );
#endif #endif
if( p_parent == p_root ) if( p_parent == p_root )
{ {
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "At root item (%s)", msg_Dbg( p_playlist, "at root item (%s)",
p_root->input.psz_name ); p_root->input.psz_name );
#endif #endif
/* Hmm, seems it's the end for you, guy ! */ /* Hmm, seems it's the end for you, guy ! */
...@@ -929,7 +929,7 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist, ...@@ -929,7 +929,7 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
if( p_parent_parent == NULL ) if( p_parent_parent == NULL )
{ {
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "Mmmh, couldn't find parent" ); msg_Dbg( p_playlist, "mmmh, couldn't find parent" );
#endif #endif
return NULL; return NULL;
} }
...@@ -942,7 +942,7 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist, ...@@ -942,7 +942,7 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
{ {
/* Cool, we have found a real item to play */ /* Cool, we have found a real item to play */
#ifdef PLAYLIST_DEBUG #ifdef PLAYLIST_DEBUG
msg_Dbg( p_playlist, "Playing child %i of %s", msg_Dbg( p_playlist, "playing child %i of %s",
i-1, p_parent->input.psz_name ); i-1, p_parent->input.psz_name );
#endif #endif
return p_parent->pp_children[i-1]; return p_parent->pp_children[i-1];
......
...@@ -69,7 +69,7 @@ int sout_AnnounceRegister( sout_instance_t *p_sout, ...@@ -69,7 +69,7 @@ int sout_AnnounceRegister( sout_instance_t *p_sout,
return VLC_ENOMEM; return VLC_ENOMEM;
} }
vlc_object_yield( p_announce ); vlc_object_yield( p_announce );
msg_Dbg( p_sout,"Creation done" ); msg_Dbg( p_sout, "creation done" );
} }
i_ret = announce_Register( p_announce, p_session, p_method ); i_ret = announce_Register( p_announce, p_session, p_method );
...@@ -110,7 +110,7 @@ session_descriptor_t *sout_AnnounceRegisterSDP( sout_instance_t *p_sout, ...@@ -110,7 +110,7 @@ session_descriptor_t *sout_AnnounceRegisterSDP( sout_instance_t *p_sout,
if( p_method->i_type != METHOD_TYPE_SAP ) if( p_method->i_type != METHOD_TYPE_SAP )
{ {
msg_Warn( p_sout,"forcing SAP announcement"); msg_Warn( p_sout, "forcing SAP announcement");
} }
p_session = sout_AnnounceSessionCreate(); p_session = sout_AnnounceSessionCreate();
...@@ -139,7 +139,7 @@ int sout_AnnounceUnRegister( sout_instance_t *p_sout, ...@@ -139,7 +139,7 @@ int sout_AnnounceUnRegister( sout_instance_t *p_sout,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( !p_announce ) if( !p_announce )
{ {
msg_Dbg( p_sout, "Unable to remove announce: no announce handler" ); msg_Dbg( p_sout, "unable to remove announce: no announce handler" );
return VLC_ENOOBJ; return VLC_ENOOBJ;
} }
i_ret = announce_UnRegister( p_announce, p_session ); i_ret = announce_UnRegister( p_announce, p_session );
...@@ -289,7 +289,7 @@ int announce_Register( announce_handler_t *p_announce, ...@@ -289,7 +289,7 @@ int announce_Register( announce_handler_t *p_announce,
} }
else else
{ {
msg_Dbg( p_announce, "Announce type unsupported" ); msg_Dbg( p_announce, "announce type unsupported" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS;; return VLC_SUCCESS;;
......
...@@ -123,7 +123,7 @@ sap_handler_t *announce_SAPHandlerCreate( announce_handler_t *p_announce ) ...@@ -123,7 +123,7 @@ sap_handler_t *announce_SAPHandlerCreate( announce_handler_t *p_announce )
if( vlc_thread_create( p_sap, "sap handler", RunThread, if( vlc_thread_create( p_sap, "sap handler", RunThread,
VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) ) VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
{ {
msg_Dbg( p_announce, "Unable to spawn SAP handler thread"); msg_Dbg( p_announce, "unable to spawn SAP handler thread");
free( p_sap ); free( p_sap );
return NULL; return NULL;
}; };
...@@ -246,7 +246,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap, ...@@ -246,7 +246,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
if( p_session->psz_uri == NULL ) if( p_session->psz_uri == NULL )
{ {
vlc_mutex_unlock( &p_sap->object_lock ); vlc_mutex_unlock( &p_sap->object_lock );
msg_Err( p_sap, "*FIXME* Unexpected NULL URI for SAP announce" ); msg_Err( p_sap, "*FIXME* unexpected NULL URI for SAP announce" );
msg_Err( p_sap, "This should not happen. VLC needs fixing." ); msg_Err( p_sap, "This should not happen. VLC needs fixing." );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -497,7 +497,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap, ...@@ -497,7 +497,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
p_sap->i_sessions, p_sap->i_sessions,
p_sap->i_sessions, p_sap->i_sessions,
p_sap_session ); p_sap_session );
msg_Dbg( p_sap,"Addresses: %i Sessions: %i", msg_Dbg( p_sap,"%i addresses, %i sessions",
p_sap->i_addresses,p_sap->i_sessions); p_sap->i_addresses,p_sap->i_sessions);
/* Remember the SAP session for later deletion */ /* Remember the SAP session for later deletion */
...@@ -560,7 +560,7 @@ static int announce_SendSAPAnnounce( sap_handler_t *p_sap, ...@@ -560,7 +560,7 @@ static int announce_SendSAPAnnounce( sap_handler_t *p_sap,
if( p_session->i_next < mdate() ) if( p_session->i_next < mdate() )
{ {
#ifdef EXTRA_DEBUG #ifdef EXTRA_DEBUG
msg_Dbg( p_sap, "Sending announce"); msg_Dbg( p_sap, "sending announce");
#endif #endif
i_ret = net_Write( p_sap, p_session->p_address->i_wfd, NULL, i_ret = net_Write( p_sap, p_session->p_address->i_wfd, NULL,
p_session->psz_data, p_session->psz_data,
...@@ -687,7 +687,7 @@ static int CalculateRate( sap_handler_t *p_sap, sap_address_t *p_address ) ...@@ -687,7 +687,7 @@ static int CalculateRate( sap_handler_t *p_sap, sap_address_t *p_address )
p_address->i_interval = MAX_INTERVAL; p_address->i_interval = MAX_INTERVAL;
} }
#ifdef EXTRA_DEBUG #ifdef EXTRA_DEBUG
msg_Dbg( p_sap,"%s:%i : Rate=%i, Interval = %i s", msg_Dbg( p_sap,"%s:%i: rate=%i, interval = %i s",
p_address->psz_address,SAP_PORT, i_rate, p_address->i_interval ); p_address->psz_address,SAP_PORT, i_rate, p_address->i_interval );
#endif #endif
......
...@@ -86,8 +86,8 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest ) ...@@ -86,8 +86,8 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
{ {
if( !strcmp( p_sout->psz_sout, psz_dest ) ) if( !strcmp( p_sout->psz_sout, psz_dest ) )
{ {
msg_Dbg( p_parent, "sout keep : reusing sout" ); msg_Dbg( p_parent, "sout keep: reusing sout" );
msg_Dbg( p_parent, "sout keep : you probably want to use " msg_Dbg( p_parent, "sout keep: you probably want to use "
"gather stream_out" ); "gather stream_out" );
vlc_object_detach( p_sout ); vlc_object_detach( p_sout );
vlc_object_attach( p_sout, p_parent ); vlc_object_attach( p_sout, p_parent );
...@@ -96,7 +96,7 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest ) ...@@ -96,7 +96,7 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
} }
else else
{ {
msg_Dbg( p_parent, "sout keep : destroying unusable sout" ); msg_Dbg( p_parent, "sout keep: destroying unusable sout" );
vlc_object_release( p_sout ); vlc_object_release( p_sout );
sout_DeleteInstance( p_sout ); sout_DeleteInstance( p_sout );
} }
...@@ -107,7 +107,7 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest ) ...@@ -107,7 +107,7 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
while( ( p_sout = vlc_object_find( p_parent, VLC_OBJECT_SOUT, while( ( p_sout = vlc_object_find( p_parent, VLC_OBJECT_SOUT,
FIND_PARENT ) ) != NULL ) FIND_PARENT ) ) != NULL )
{ {
msg_Dbg( p_parent, "sout keep : destroying old sout" ); msg_Dbg( p_parent, "sout keep: destroying old sout" );
vlc_object_release( p_sout ); vlc_object_release( p_sout );
sout_DeleteInstance( p_sout ); sout_DeleteInstance( p_sout );
} }
...@@ -157,7 +157,7 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest ) ...@@ -157,7 +157,7 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
if( p_sout->p_stream == NULL ) if( p_sout->p_stream == NULL )
{ {
msg_Err( p_sout, "stream chained failed for `%s'", p_sout->psz_chain ); msg_Err( p_sout, "stream chain failed for `%s'", p_sout->psz_chain );
FREE( p_sout->psz_sout ); FREE( p_sout->psz_sout );
FREE( p_sout->psz_chain ); FREE( p_sout->psz_chain );
...@@ -474,8 +474,8 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, char *psz_mux, ...@@ -474,8 +474,8 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, char *psz_mux,
if( b_answer ) if( b_answer )
{ {
msg_Dbg( p_sout, "muxer prefers waiting for all ES before " msg_Dbg( p_sout, "muxer prefers to wait for all ES before "
"starting muxing" ); "starting to mux" );
p_mux->b_waiting_stream = VLC_TRUE; p_mux->b_waiting_stream = VLC_TRUE;
} }
} }
...@@ -511,7 +511,7 @@ sout_input_t *sout_MuxAddStream( sout_mux_t *p_mux, es_format_t *p_fmt ) ...@@ -511,7 +511,7 @@ sout_input_t *sout_MuxAddStream( sout_mux_t *p_mux, es_format_t *p_fmt )
if( !p_mux->b_add_stream_any_time && !p_mux->b_waiting_stream ) if( !p_mux->b_add_stream_any_time && !p_mux->b_waiting_stream )
{ {
msg_Err( p_mux, "cannot add a new stream (unsupported while muxing " msg_Err( p_mux, "cannot add a new stream (unsupported while muxing "
"for this format)" ); "to this format)" );
return NULL; return NULL;
} }
...@@ -557,7 +557,7 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -557,7 +557,7 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
{ {
if( p_mux->pf_delstream( p_mux, p_input ) < 0 ) if( p_mux->pf_delstream( p_mux, p_input ) < 0 )
{ {
msg_Err( p_mux, "cannot del this stream from mux" ); msg_Err( p_mux, "cannot delete this stream from mux" );
} }
/* remove the entry */ /* remove the entry */
...@@ -565,7 +565,7 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -565,7 +565,7 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
if( p_mux->i_nb_inputs == 0 ) if( p_mux->i_nb_inputs == 0 )
{ {
msg_Warn( p_mux, "no more input stream for this mux" ); msg_Warn( p_mux, "no more input streams for this mux" );
} }
block_FifoRelease( p_input->p_fifo ); block_FifoRelease( p_input->p_fifo );
......
...@@ -281,7 +281,7 @@ void vout_IntfInit( vout_thread_t *p_vout ) ...@@ -281,7 +281,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
vlc_ureduce( &p_vout->i_par_num, &p_vout->i_par_den, vlc_ureduce( &p_vout->i_par_num, &p_vout->i_par_den,
p_vout->i_par_num, p_vout->i_par_den, 0 ); p_vout->i_par_num, p_vout->i_par_den, 0 );
msg_Dbg( p_vout, "monitor pixel aspect-ratio overriding: %i:%i", msg_Dbg( p_vout, "overriding monitor pixel aspect-ratio: %i:%i",
p_vout->i_par_num, p_vout->i_par_den ); p_vout->i_par_num, p_vout->i_par_den );
b_force_par = VLC_TRUE; b_force_par = VLC_TRUE;
} }
......
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