Commit 4ca1e8b9 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix threaded function declaration.

parent dd15d24b
......@@ -48,7 +48,7 @@
static decoder_t * CreateDecoder( input_thread_t *, es_format_t *, int );
static void DeleteDecoder( decoder_t * );
static int DecoderThread( decoder_t * );
static void* DecoderThread( vlc_object_t * );
static int DecoderDecode( decoder_t * p_dec, block_t *p_block );
/* Buffers allocation callbacks for the decoders */
......@@ -576,8 +576,9 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
* \param p_dec the decoder
* \return 0
*/
static int DecoderThread( decoder_t * p_dec )
static void* DecoderThread( vlc_object_t *p_this )
{
decoder_t * p_dec = (decoder_t *)p_this;
block_t *p_block;
/* The decoder's main loop */
......
......@@ -309,7 +309,7 @@ typedef struct
static int DStreamRead ( stream_t *, void *p_read, int i_read );
static int DStreamPeek ( stream_t *, const uint8_t **pp_peek, int i_peek );
static int DStreamControl( stream_t *, int i_query, va_list );
static int DStreamThread ( stream_t * );
static void* DStreamThread ( vlc_object_t * );
stream_t *__stream_DemuxNew( vlc_object_t *p_obj, const char *psz_demux,
......@@ -534,8 +534,9 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
}
}
static int DStreamThread( stream_t *s )
static void* DStreamThread( vlc_object_t* p_this )
{
stream_t *s = (stream_t *)p_this;
d_stream_sys_t *p_sys = (d_stream_sys_t*)s->p_sys;
demux_t *p_demux;
......@@ -543,7 +544,7 @@ static int DStreamThread( stream_t *s )
if( !(p_demux = demux_New( s, "", p_sys->psz_name, "", s, p_sys->out,
false )) )
{
return VLC_EGENERIC;
return NULL;
}
p_sys->p_demux = p_demux;
......@@ -555,7 +556,7 @@ static int DStreamThread( stream_t *s )
}
vlc_object_kill( p_demux );
return VLC_SUCCESS;
return NULL;
}
/****************************************************************************
......
......@@ -53,8 +53,8 @@
*****************************************************************************/
static void Destructor( input_thread_t * p_input );
static int Run ( input_thread_t *p_input );
static int RunAndDestroy ( input_thread_t *p_input );
static void* Run ( vlc_object_t *p_this );
static void* RunAndDestroy ( vlc_object_t *p_this );
static input_thread_t * Create ( vlc_object_t *, input_item_t *,
const char *, bool, sout_instance_t * );
......@@ -396,7 +396,7 @@ int __input_Read( vlc_object_t *p_parent, input_item_t *p_item,
if( b_block )
{
RunAndDestroy( p_input );
RunAndDestroy( VLC_OBJECT(p_input) );
return VLC_SUCCESS;
}
else
......@@ -484,8 +484,9 @@ sout_instance_t * input_DetachSout( input_thread_t *p_input )
* This is the "normal" thread that spawns the input processing chain,
* reads the stream, cleans up and waits
*****************************************************************************/
static int Run( input_thread_t *p_input )
static void* Run( vlc_object_t *p_this )
{
input_thread_t *p_input = (input_thread_t *)p_this;
/* Signal that the thread is launched */
vlc_thread_ready( p_input );
......@@ -499,7 +500,7 @@ static int Run( input_thread_t *p_input )
/* Tell we're dead */
p_input->b_dead = true;
return 0;
return NULL;
}
MainLoop( p_input );
......@@ -531,7 +532,7 @@ static int Run( input_thread_t *p_input )
/* Clean up */
End( p_input );
return 0;
return NULL;
}
/*****************************************************************************
......@@ -539,8 +540,9 @@ static int Run( input_thread_t *p_input )
* This is the "just forget me" thread that spawns the input processing chain,
* reads the stream, cleans up and releases memory
*****************************************************************************/
static int RunAndDestroy( input_thread_t *p_input )
static void* RunAndDestroy( vlc_object_t *p_this )
{
input_thread_t *p_input = (input_thread_t *)p_this;
/* Signal that the thread is launched */
vlc_thread_ready( p_input );
......
......@@ -62,7 +62,7 @@
*****************************************************************************/
static void vlm_Destructor( vlm_t *p_vlm );
static int Manage( vlc_object_t * );
static void* Manage( vlc_object_t * );
static int vlm_MediaVodControl( void *, vod_media_t *, const char *, int, va_list );
/*****************************************************************************
......@@ -302,7 +302,7 @@ static int vlm_MediaVodControl( void *p_private, vod_media_t *p_vod_media,
/*****************************************************************************
* Manage:
*****************************************************************************/
static int Manage( vlc_object_t* p_object )
static void* Manage( vlc_object_t* p_object )
{
vlm_t *vlm = (vlm_t*)p_object;
int i, j;
......@@ -412,7 +412,7 @@ static int Manage( vlc_object_t* p_object )
msleep( 100000 );
}
return VLC_SUCCESS;
return NULL;
}
/* New API
......
......@@ -48,7 +48,7 @@
*****************************************************************************/
static interaction_t * InteractionGet( vlc_object_t * );
static void InteractionSearchInterface( interaction_t * );
static void InteractionLoop( vlc_object_t * );
static void* InteractionLoop( vlc_object_t * );
static void InteractionManage( interaction_t * );
static interaction_dialog_t *DialogGetById( interaction_t* , int );
......@@ -548,7 +548,7 @@ static int DialogSend( vlc_object_t *p_this, interaction_dialog_t *p_dialog )
}
}
static void InteractionLoop( vlc_object_t *p_this )
static void* InteractionLoop( vlc_object_t *p_this )
{
int i;
interaction_t *p_interaction = (interaction_t*) p_this;
......@@ -568,6 +568,7 @@ static void InteractionLoop( vlc_object_t *p_this )
DialogDestroy( p_dialog );
REMOVE_ELEM( p_interaction->pp_dialogs, p_interaction->i_dialogs, i );
}
return NULL;
}
/**
......
......@@ -49,7 +49,7 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static void RunInterface( intf_thread_t *p_intf );
static void* RunInterface( vlc_object_t *p_this );
#ifdef __APPLE__
static void MonitorLibVLCDeath( intf_thread_t *p_intf );
#endif
......@@ -193,8 +193,9 @@ void intf_StopThread( intf_thread_t *p_intf )
/*****************************************************************************
* RunInterface: setups necessary data and give control to the interface
*****************************************************************************/
static void RunInterface( intf_thread_t *p_intf )
static void* RunInterface( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
vlc_value_t val, text;
char *psz_intf;
......@@ -257,6 +258,7 @@ static void RunInterface( intf_thread_t *p_intf )
p_intf->p_module = module_Need( p_intf, "interface", psz_intf, 0 );
}
while( p_intf->p_module );
return NULL;
}
#ifdef __APPLE__
......
......@@ -79,7 +79,7 @@ extern "C"
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static void AppThread( vlc_object_t *p_appthread );
static void* AppThread( vlc_object_t *p_appthread );
/*****************************************************************************
* system_Init: create a BApplication object and fill in program path.
......@@ -120,7 +120,7 @@ void system_End( libvlc_int_t *p_this )
/*****************************************************************************
* AppThread: the BApplication thread.
*****************************************************************************/
static void AppThread( vlc_object_t * p_this )
static void* AppThread( vlc_object_t * p_this )
{
VlcApplication * BeApp =
new VlcApplication("application/x-vnd.videolan-vlc");
......@@ -129,6 +129,7 @@ static void AppThread( vlc_object_t * p_this )
BeApp->Run();
vlc_object_detach( p_this );
delete BeApp;
return NULL;
}
} /* extern "C" */
......
......@@ -1352,7 +1352,7 @@ error:
return false;
}
static void update_CheckReal( update_check_thread_t *p_uct );
static void* update_CheckReal( vlc_object_t *p_this );
/**
* Check for updates
......@@ -1380,8 +1380,9 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void
VLC_THREAD_PRIORITY_LOW, false );
}
void update_CheckReal( update_check_thread_t *p_uct )
void* update_CheckReal( vlc_object_t* p_this )
{
update_check_thread_t *p_uct = (update_check_thread_t *)p_this;
bool b_ret;
vlc_mutex_lock( &p_uct->p_update->lock );
......@@ -1395,6 +1396,7 @@ void update_CheckReal( update_check_thread_t *p_uct )
p_uct->p_update->p_check = NULL;
vlc_object_release( p_uct );
return NULL;
}
/**
......@@ -1453,7 +1455,7 @@ static char *size_str( long int l_size )
return i_retval == -1 ? NULL : psz_tmp;
}
static void update_DownloadReal( update_download_thread_t *p_udt );
static void* update_DownloadReal( vlc_object_t *p_this );
/**
* Download the file given in the update_t
......@@ -1480,8 +1482,9 @@ void update_Download( update_t *p_update, const char *psz_destdir )
VLC_THREAD_PRIORITY_LOW, false );
}
static void update_DownloadReal( update_download_thread_t *p_udt )
static void* update_DownloadReal( vlc_object_t *p_this )
{
update_download_thread_t *p_udt = (update_download_thread_t *)p_this;
int i_progress = 0;
long int l_size;
long int l_downloaded = 0;
......@@ -1682,6 +1685,7 @@ end:
p_udt->p_update->p_download = NULL;
vlc_object_release( p_udt );
return NULL;
}
update_release_t *update_GetRelease( update_t *p_update )
......
......@@ -120,7 +120,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
/*****************************************************************************
* system_Configure: check for system specific configuration options.
*****************************************************************************/
static void IPCHelperThread( vlc_object_t * );
static void* IPCHelperThread( vlc_object_t * );
LRESULT CALLBACK WMCOPYWNDPROC( HWND, UINT, WPARAM, LPARAM );
typedef struct
{
......@@ -262,7 +262,7 @@ void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv
#endif
}
static void IPCHelperThread( vlc_object_t *p_this )
static void* IPCHelperThread( vlc_object_t *p_this )
{
HWND ipcwindow;
MSG message;
......@@ -291,6 +291,7 @@ static void IPCHelperThread( vlc_object_t *p_this )
TranslateMessage( &message );
DispatchMessage( &message );
}
return NULL;
}
LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
......
......@@ -960,7 +960,7 @@ void httpd_StreamDelete( httpd_stream_t *stream )
/*****************************************************************************
* Low level
*****************************************************************************/
static void httpd_HostThread( httpd_host_t * );
static void* httpd_HostThread( vlc_object_t * );
/* create a new host */
httpd_host_t *httpd_HostNew( vlc_object_t *p_this, const char *psz_host,
......@@ -2019,8 +2019,9 @@ static void httpd_ClientTlsHsOut( httpd_client_t *cl )
}
}
static void httpd_HostThread( httpd_host_t *host )
static void* httpd_HostThread( vlc_object_t *p_this )
{
httpd_host_t *host = (httpd_host_t *)p_this;
tls_session_t *p_tls = NULL;
counter_t *p_total_counter = stats_CounterCreate( host, VLC_VAR_INTEGER, STATS_COUNTER );
counter_t *p_active_counter = stats_CounterCreate( host, VLC_VAR_INTEGER, STATS_COUNTER );
......@@ -2567,6 +2568,7 @@ retry:
stats_CounterClean( p_total_counter );
if( p_active_counter )
stats_CounterClean( p_active_counter );
return NULL;
}
#else /* ENABLE_HTTPD */
......
......@@ -31,7 +31,7 @@
#include "playlist_internal.h"
#include "../libvlc.h"
static void RunSD( services_discovery_t *p_sd );
static void* RunSD( vlc_object_t *p_this );
/*
* Services discovery
......@@ -202,8 +202,9 @@ services_discovery_RemoveItem ( services_discovery_t * p_sd, input_item_t * p_it
/***********************************************************************
* RunSD (Private)
***********************************************************************/
static void RunSD( services_discovery_t *p_sd )
static void* RunSD( vlc_object_t *p_this )
{
services_discovery_t *p_sd = (services_discovery_t *)p_this;
vlc_event_t event;
event.type = vlc_ServicesDiscoveryStarted;
......@@ -213,7 +214,7 @@ static void RunSD( services_discovery_t *p_sd )
event.type = vlc_ServicesDiscoveryEnded;
vlc_event_send( &p_sd->event_manager, &event );
return;
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