/*****************************************************************************
* poll_iterate_thread
*****************************************************************************/
-static void poll_iterate_thread( poll_thread_t *p_pt )
+static void* poll_iterate_thread( vlc_object_t *p_this )
{
+ poll_thread_t *p_pt = (poll_thread_t*)p_this;
vlc_thread_ready( p_pt );
while( vlc_object_alive (p_pt) )
if( avahi_simple_poll_iterate( p_pt->simple_poll, 100 ) != 0 )
break;
+
+ return NULL;
}
/*****************************************************************************
*****************************************************************************/
static ssize_t Write( sout_access_out_t *, block_t * );
static int Seek ( sout_access_out_t *, off_t );
-static void ThreadControl( vlc_object_t * );
+static void* ThreadControl( vlc_object_t * );
struct sout_access_out_sys_t
{
/*****************************************************************************
* ThreadControl: manage control messages and pipe media to Read
*****************************************************************************/
-static void ThreadControl( vlc_object_t *p_this )
+static void* ThreadControl( vlc_object_t *p_this )
{
rtmp_control_thread_t *p_thread = (rtmp_control_thread_t *) p_this;
rtmp_packet_t *rtmp_packet;
p_thread->b_die = 1;
}
}
+ return NULL;
}
static ssize_t Write ( sout_access_out_t *, block_t * );
static int Seek ( sout_access_out_t *, off_t );
-static void ThreadWrite( vlc_object_t * );
+static void* ThreadWrite( vlc_object_t * );
static block_t *NewUDPPacket( sout_access_out_t *, mtime_t );
typedef struct sout_access_thread_t
/*****************************************************************************
* ThreadWrite: Write a packet on the network at the good time.
*****************************************************************************/
-static void ThreadWrite( vlc_object_t *p_this )
+static void* ThreadWrite( vlc_object_t *p_this )
{
sout_access_thread_t *p_thread = (sout_access_thread_t*)p_this;
mtime_t i_date_last = -1;
i_date_last = i_date;
}
+ return NULL;
}
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-static int Open ( vlc_object_t * );
-static void Close ( vlc_object_t * );
-static void Play ( aout_instance_t * );
-static int ALSAThread ( aout_instance_t * );
-static void ALSAFill ( aout_instance_t * );
+static int Open ( vlc_object_t * );
+static void Close ( vlc_object_t * );
+static void Play ( aout_instance_t * );
+static void* ALSAThread ( vlc_object_t * );
+static void ALSAFill ( aout_instance_t * );
static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name,
vlc_value_t newval, vlc_value_t oldval, void *p_unused );
/*****************************************************************************
* ALSAThread: asynchronous thread used to DMA the data to the device
*****************************************************************************/
-static int ALSAThread( aout_instance_t * p_aout )
+static void* ALSAThread( vlc_object_t* p_this )
{
+ aout_instance_t * p_aout = (aout_instance_t*)p_this;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
p_sys->p_status = (snd_pcm_status_t *)malloc(snd_pcm_status_sizeof());
cleanup:
snd_pcm_drop( p_sys->p_snd_pcm );
free( p_aout->output.p_sys->p_status );
- return 0;
+ return NULL;
}
/*****************************************************************************
static int CreateDSBuffer ( aout_instance_t *, int, int, int, int, int, bool );
static int CreateDSBufferPCM ( aout_instance_t *, int*, int, int, int, bool );
static void DestroyDSBuffer ( aout_instance_t * );
-static void DirectSoundThread ( notification_thread_t * );
+static void* DirectSoundThread( vlc_object_t * );
static int FillBuffer ( aout_instance_t *, int, aout_buffer_t * );
/*****************************************************************************
* We use this thread to emulate a callback mechanism. The thread probes for
* event notification and fills up the DS secondary buffer when needed.
*****************************************************************************/
-static void DirectSoundThread( notification_thread_t *p_notif )
+static void* DirectSoundThread( vlc_object_t *p_this )
{
+ notification_thread_t *p_notif = (notification_thread_t*)p_this;
aout_instance_t *p_aout = p_notif->p_aout;
bool b_sleek;
mtime_t last_time;
CloseHandle( p_notif->event );
msg_Dbg( p_notif, "DirectSoundThread exiting" );
+ return NULL;
}
static void Close ( vlc_object_t * );
static void Play ( aout_instance_t * );
-static int Thread ( aout_instance_t * );
+static void* Thread ( vlc_object_t * );
static void InterleaveS16( int16_t *, int16_t * );
/*****************************************************************************
* Thread: thread used to DMA the data to the device
*****************************************************************************/
-static int Thread( aout_instance_t * p_aout )
+static void* Thread( vlc_object_t *p_this )
{
+ aout_instance_t * p_aout = (aout_instance_t*)p_this;
aout_buffer_t * p_buffer;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
PCMAudioPlayer * pPlayer = p_sys->pPlayer;
#undef i
}
- return VLC_SUCCESS;
+ return NULL;
}
/*****************************************************************************
static void Close ( vlc_object_t * );
static void Play ( aout_instance_t * );
-static int OSSThread ( aout_instance_t * );
+static void* OSSThread ( vlc_object_t * );
static mtime_t BufferDuration( aout_instance_t * p_aout );
/*****************************************************************************
* OSSThread: asynchronous thread used to DMA the data to the device
*****************************************************************************/
-static int OSSThread( aout_instance_t * p_aout )
+static void* OSSThread( vlc_object_t *p_this )
{
+ aout_instance_t * p_aout = (aout_instance_t*)p_this;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
mtime_t next_date = 0;
}
}
- return VLC_SUCCESS;
+ return NULL;
}
#ifdef PORTAUDIO_IS_SERIOUSLY_BROKEN
static bool b_init = 0;
static pa_thread_t *pa_thread;
-static void PORTAUDIOThread( pa_thread_t * );
+static void* PORTAUDIOThread( vlc_object_t * );
#endif
/*****************************************************************************
* PORTAUDIOThread: all interactions with libportaudio.a are handled
* in this single thread. Otherwise libportaudio.a is _not_ happy :-(
*****************************************************************************/
-static void PORTAUDIOThread( pa_thread_t *pa_thread )
+static void* PORTAUDIOThread( vlc_object_t *p_this )
{
+ pa_thread_t *pa_thread = (pa_thread_t*)p_this;
aout_instance_t *p_aout;
aout_sys_t *p_sys;
int i_err;
vlc_cond_signal( &pa_thread->wait );
vlc_mutex_unlock( &pa_thread->lock_wait );
}
+ return NULL;
}
#endif
aout_buffer_t *, bool );
static void CALLBACK WaveOutCallback ( HWAVEOUT, UINT, DWORD, DWORD, DWORD );
-static void WaveOutThread( notification_thread_t * );
+static void* WaveOutThread( vlc_object_t * );
static int VolumeInfos( aout_instance_t *, audio_volume_t * );
static int VolumeGet( aout_instance_t *, audio_volume_t * );
* we are not authorized to use waveOutWrite() directly in the waveout
* callback.
*****************************************************************************/
-static void WaveOutThread( notification_thread_t *p_notif )
+static void* WaveOutThread( vlc_object_t *p_this )
{
+ notification_thread_t *p_notif = (notification_thread_t*)p_this;
aout_instance_t *p_aout = p_notif->p_aout;
aout_sys_t *p_sys = p_aout->output.p_sys;
aout_buffer_t *p_buffer = NULL;
while( !p_sys->start_date && vlc_object_alive (p_aout) )
WaitForSingleObject( p_sys->event, INFINITE );
if( !vlc_object_alive (p_aout) )
- return;
+ return NULL;
msg_Dbg( p_aout, "will start to play in %"PRId64" us",
(p_sys->start_date - AOUT_PTS_TOLERANCE/4)-mdate());
/* Cleanup and find out the current latency */
i_queued_frames = WaveOutClearDoneBuffers( p_sys );
- if( !vlc_object_alive (p_aout) ) return;
+ if( !vlc_object_alive (p_aout) ) return NULL;
/* Try to fill in as many frame buffers as possible */
for( i = 0; i < FRAMES_NUM; i++ )
}
}
- if( !vlc_object_alive (p_aout) ) return;
+ if( !vlc_object_alive (p_aout) ) return NULL;
/*
deal with the case that the loop didn't fillup the buffer to the
}
#undef waveout_warn
+ return NULL;
}
static int VolumeInfos( aout_instance_t * p_aout, audio_volume_t * pi_soft )
static block_t *EncodeAudio( encoder_t *, aout_buffer_t * );
struct thread_context_t;
-static int FfmpegThread( struct thread_context_t *p_context );
+static void* FfmpegThread( vlc_object_t *p_this );
static int FfmpegExecute( AVCodecContext *s,
int (*pf_func)(AVCodecContext *c2, void *arg2),
void **arg, int *ret, int count );
/****************************************************************************
* Ffmpeg threading system
****************************************************************************/
-static int FfmpegThread( struct thread_context_t *p_context )
+static void* FfmpegThread( vlc_object_t *p_this )
{
+ struct thread_context_t *p_context = (struct thread_context_t *)p_this;
while ( vlc_object_alive (p_context) && !p_context->b_error )
{
vlc_mutex_lock( &p_context->lock );
vlc_mutex_unlock( &p_context->lock );
}
- return 0;
+ return NULL;
}
static int FfmpegExecute( AVCodecContext *s,
void CloseAudio ( vlc_object_t *p_this );
static int GetBufInfo ( aout_instance_t * );
static void Play ( aout_instance_t * );
-static int QNXaoutThread ( aout_instance_t * );
+static void* QNXaoutThread ( vlc_object_t * );
/*****************************************************************************
* Open : creates a handle and opens an alsa device
/*****************************************************************************
* QNXaoutThread: asynchronous thread used to DMA the data to the device
*****************************************************************************/
-static int QNXaoutThread( aout_instance_t * p_aout )
+static void* QNXaoutThread( vlc_object_t *p_this )
{
+ aout_instance_t * p_aout = (aout_instance_t*)p_this;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
while ( vlc_object_alive (p_aout) )
}
}
- return 0;
+ return NULL;
}
static int OpenDialogs( vlc_object_t * );
-static void MainLoop ( intf_thread_t * );
+static void* MainLoop ( intf_thread_t * );
static void ShowDialog( intf_thread_t *, int, int, intf_dialog_args_t * );
/*****************************************************************************
}
}
-static void MainLoop( intf_thread_t *p_intf )
+static void* MainLoop( vlc_object_t * p_this )
{
+ intf_thread_t *p_intf = (intf_thread_t*)p_this;
MSG msg;
Interface *intf = 0;
/* Uninitialize OLE/COM */
CoUninitialize();
#endif
+ return NULL;
}
/*****************************************************************************
static int OpenDialogs ( vlc_object_t * );
static void Run ( intf_thread_t * );
-static void Init ( intf_thread_t * );
+static void* Init ( vlc_object_t * );
static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
}
}
-static void Init( intf_thread_t *p_intf )
+static void* Init( vlc_object_t * p_this )
{
+ intf_thread_t *p_intf = (intf_thread_t*)p_this;
#if !defined( WIN32 )
static char *p_args[] = { "" };
int i_args = 1;
#else
wxEntry( i_args, p_args );
#endif
+ return NULL;
}
/* following functions are local */
static void stop_osdvnc ( filter_t *p_filter );
-static void vnc_worker_thread ( vlc_object_t *p_thread_obj );
+static void* vnc_worker_thread ( vlc_object_t *p_thread_obj );
-static void update_request_thread( vlc_object_t *p_thread_obj );
+static void* update_request_thread( vlc_object_t *p_thread_obj );
static bool open_vnc_connection ( filter_t *p_filter );
}
-static void vnc_worker_thread( vlc_object_t *p_thread_obj )
+static void* vnc_worker_thread( vlc_object_t *p_thread_obj )
{
filter_t* p_filter = (filter_t*)(p_thread_obj->p_parent);
filter_sys_t *p_sys = p_filter->p_sys;
vlc_mutex_unlock( &p_sys->lock );
msg_Dbg( p_filter, "VNC message reader thread ended" );
+ return NULL;
}
-static void update_request_thread( vlc_object_t *p_thread_obj )
+static void* update_request_thread( vlc_object_t *p_thread_obj )
{
filter_t* p_filter = (filter_t*)(p_thread_obj->p_parent);
filter_sys_t *p_sys = p_filter->p_sys;
{
msg_Err( p_filter, "Could not write rfbFramebufferUpdateRequestMsg." );
p_sys->b_continue = false;
- return;
+ return NULL;
}
udr.incremental = 1;
}
msg_Dbg( p_filter, "VNC update request thread ended" );
+ return NULL;
}
static bool process_server_message ( filter_t *p_filter,