access_t *p_access = (access_t *) p_ev->p_access;
access_sys_t *p_sys = (access_sys_t *) p_access->p_sys;
int result = 0;
+ int canc = vlc_savecancel ();
AVCPlay( p_access, p_sys->i_node );
}
AVCStop( p_access, p_sys->i_node );
+ vlc_restorecancel (canc);
return NULL;
}
p_ev->i_key_action = 0;
p_ev->b_still = false;
+ int canc = vlc_savecancel ();
+
/* catch all key event */
var_AddCallback( p_ev->p_libvlc, "key-action", EventKey, p_ev );
vlc_object_release( p_vout );
}
var_DelCallback( p_ev->p_libvlc, "key-action", EventKey, p_ev );
-
+ vlc_restorecancel (canc);
vlc_mutex_destroy( &p_ev->lock );
return NULL;
vlc_object_lock( p_thread );
while( vlc_object_alive( p_thread) )
{
+ int canc = vlc_savecancel ();
b_paused = p_thread->b_paused;
if( b_paused && b_was_paused )
b_was_paused = b_paused;
vlc_object_timedwait( p_thread, mdate() + 10000000 );
+ vlc_restorecancel (canc);
}
vlc_object_unlock( p_thread );
return NULL;
{
rtmp_control_thread_t *p_thread = (rtmp_control_thread_t *) p_this;
rtmp_packet_t *rtmp_packet;
+ int canc = vlc_savecancel ();
rtmp_init_handler( p_thread->rtmp_handler );
block_FifoWake( p_thread->p_fifo_input );
}
}
+ vlc_restorecancel (canc);
return NULL;
}
access_t *p_src = p_access->p_source;
block_t *p_block;
+ int canc = vlc_savecancel ();
while( vlc_object_alive (p_access) )
{
/* Get a new block from the source */
/* Send dummy packet to avoid deadlock in Block() */
block_FifoPut( p_sys->p_fifo, block_New( p_access, 0 ) );
+ vlc_restorecancel (canc);
return NULL;
}
{
poll_thread_t *p_pt = (poll_thread_t*)p_this;
vlc_thread_ready( p_pt );
+ int canc = vlc_savecancel ();
while( vlc_object_alive (p_pt) )
if( avahi_simple_poll_iterate( p_pt->simple_poll, 100 ) != 0 )
break;
+ vlc_restorecancel (canc);
return NULL;
}
{
rtmp_control_thread_t *p_thread = (rtmp_control_thread_t *) p_this;
rtmp_packet_t *rtmp_packet;
+ int canc = vlc_savecancel ();
rtmp_init_handler( p_thread->rtmp_handler );
p_thread->b_die = 1;
}
}
+ vlc_restorecancel (canc);
return NULL;
}
mtime_t i_date_last = -1;
mtime_t i_to_send = p_thread->i_group;
int i_dropped_packets = 0;
+ int canc = vlc_savecancel ();
while( vlc_object_alive (p_thread) )
{
i_date_last = i_date;
}
+ vlc_restorecancel (canc);
return NULL;
}
{
aout_instance_t * p_aout = (aout_instance_t*)p_this;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
+ int canc = vlc_savecancel ();
p_sys->p_status = (snd_pcm_status_t *)malloc(snd_pcm_status_sizeof());
/* Wait for the exact time to start playing (avoids resampling) */
cleanup:
snd_pcm_drop( p_sys->p_snd_pcm );
free( p_aout->output.p_sys->p_status );
+ vlc_restorecancel (canc);
return NULL;
}
mtime_t last_time;
HRESULT dsresult;
long l_queued = 0;
+ int canc = vlc_savecancel ();
/* We don't want any resampling when using S/PDIF output */
b_sleek = p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i');
/* free the event */
CloseHandle( p_notif->event );
+ vlc_restorecancel (canc);
msg_Dbg( p_notif, "DirectSoundThread exiting" );
return NULL;
}
aout_buffer_t * p_buffer;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
PCMAudioPlayer * pPlayer = p_sys->pPlayer;
+ int canc = vlc_savecancel ();
while( vlc_object_alive (p_aout) )
{
#undef i
}
+ vlc_restorecancel (canc);
return NULL;
}
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;
+ int canc = vlc_savecancel ();
while ( vlc_object_alive (p_aout) )
{
}
}
+ vlc_restorecancel (canc);
return NULL;
}
aout_instance_t *p_aout;
aout_sys_t *p_sys;
int i_err;
+ int canc = vlc_savecancel ();
while( vlc_object_alive (pa_thread) )
{
vlc_cond_signal( &pa_thread->wait );
vlc_mutex_unlock( &pa_thread->lock_wait );
}
+ vlc_restorecancel (canc);
return NULL;
}
#endif
bool b_sleek;
mtime_t next_date;
uint32_t i_buffer_length = 64;
+ int canc = vlc_savecancel ();
/* We don't want any resampling when using S/PDIF */
b_sleek = p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i');
}
#undef waveout_warn
+ vlc_restorecancel (canc);
return NULL;
}
static void* FfmpegThread( vlc_object_t *p_this )
{
struct thread_context_t *p_context = (struct thread_context_t *)p_this;
+ int canc = vlc_savecancel ();
while ( vlc_object_alive (p_context) && !p_context->b_error )
{
vlc_mutex_lock( &p_context->lock );
vlc_mutex_unlock( &p_context->lock );
}
+ vlc_restorecancel (canc);
return NULL;
}
vlc_thread_ready( p_timeout );
+ int canc = vlc_savecancel ();
/* Avoid lock */
while( vlc_object_alive (p_timeout) )
{
p_timeout->i_remain -= 200000;
msleep( 200000 ); /* 200 ms */
}
+ vlc_restorecancel (canc);
}
/*****************************************************************************
event_thread_t *p_ev = (event_thread_t*)p_this;
demux_sys_t *p_sys = p_ev->p_demux->p_sys;
vlc_object_t *p_vout = NULL;
+ int canc = vlc_savecancel ();
p_ev->b_moved = false;
p_ev->b_clicked = false;
vlc_mutex_destroy( &p_ev->lock );
+ vlc_restorecancel (canc);
return VLC_SUCCESS;
}
{
aout_instance_t * p_aout = (aout_instance_t*)p_this;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
+ int canc = vlc_savecancel ();
while ( vlc_object_alive (p_aout) )
{
}
}
+ vlc_restorecancel (canc);
return NULL;
}
char dummy[] = "";
char *argv[] = { dummy };
int argc = 1;
+ int canc = vlc_savecancel ();
Q_INIT_RESOURCE( vlc );
/* Save the path */
config_PutPsz( p_intf, "qt-filedialog-path", p_intf->p_sys->psz_filepath );
free( psz_path );
+ vlc_restorecancel (canc);
+ return NULL;
}
/*****************************************************************************
intf_thread_t *p_intf = (intf_thread_t*)p_this;
MSG msg;
Interface *intf = 0;
+ int canc = vlc_savecancel ();
if( !hInstance ) hInstance = GetModuleHandle(NULL);
/* Uninitialize OLE/COM */
CoUninitialize();
#endif
+ vlc_restorecancel (canc);
return NULL;
}
static char *p_args[] = { "" };
int i_args = 1;
#endif
+ int canc = vlc_savecancel ();
/* Hack to pass the p_intf pointer to the new wxWidgets Instance object */
#ifdef wxTheApp
#else
wxEntry( i_args, p_args );
#endif
+ vlc_restorecancel (canc);
return NULL;
}
if( p_fontconfig )
{
mtime_t t1, t2;
+ int canc = vlc_savecancel ();
//msg_Dbg( p_this, "Building font database..." );
msg_Dbg( p_this, "Building font database..." );
vlc_mutex_unlock( p_lock );
var_SetBool( p_this, "build-done", true );
+ vlc_restorecancel (canc);
}
return NULL;
}
static char **pp_args = p_args;
#endif
static int i_args = 1;
+ int canc = vlc_savecancel ();
/* FIXME: deprecated ? */
#if defined(MODULE_NAME_IS_gtk2_main) || defined(MODULE_NAME_IS_gnome2_main)
gtk_main();
gdk_threads_leave();
+ vlc_restorecancel (canc);
return NULL;
}
{
qte_thread_t *p_this = (qte_thread_t*)p_vlc_obj;
int i_argc = 1;
+ int canc = vlc_savecancel ();
p_this->b_gui_server = false;
if( config_GetInt( p_this, "qte-guiserver" ) )
vlc_thread_ready( p_this );
p_this->p_qte_application->exec();
+ vlc_restorecancel (canc);
return NULL;
}
{
vod_t *p_vod = (vod_t*)p_this;
vod_sys_t *p_sys = p_vod->p_sys;
+ int canc = vlc_savecancel ();
while( vlc_object_alive (p_vod) )
{
free( cmd.psz_session );
free( cmd.psz_arg );
}
+
+ vlc_restorecancel (canc);
return NULL;
}
while( vlc_object_alive (p_this) )
{
int i = (int) (100.0 * rand() / (RAND_MAX));
+ /* FIXME: not thread-safe */
sprintf( psz_var, "blork-%i", i );
val.i_int = i + 200;
+ int canc = vlc_savecancel ();
var_Set( p_parent, psz_var, val );
+ vlc_restorecancel (canc);
/* This is quite heavy, but we only have 10 threads. Keep cool. */
msleep( 1000 );
{
sout_stream_id_t *id = (sout_stream_id_t *)p_this;
unsigned i_caching = id->i_caching;
+ int canc = vlc_savecancel ();
while( vlc_object_alive (id) )
{
rtp_add_sink( id, fd, true );
}
}
+ vlc_restorecancel (canc);
return NULL;
}
sout_stream_sys_t *p_sys = (sout_stream_sys_t*)p_this;
sout_stream_id_t *id = p_sys->id_video;
picture_t *p_pic;
+ int canc = vlc_savecancel ();
while( vlc_object_alive (p_sys) && !p_sys->b_error )
{
}
block_ChainRelease( p_sys->p_buffers );
+ vlc_restorecancel (canc);
return NULL;
}
atmo_thread_t *pAtmoThread = (atmo_thread_t *)obj;
CThread *pThread = (CThread *)pAtmoThread->p_thread;
if(pThread) {
+ int canc;
+
// give feedback I'am running?
vlc_thread_ready( pThread->m_pAtmoThread );
- pThread->Execute();
-
+ canc = vlc_savecancel ();
+ pThread->Execute();
+ vlc_restorecancel (canc);
}
return NULL;
}
uint8_t *p_source = NULL;
+ int canc = vlc_savecancel ();
/* initialize AtmoWin for this thread! */
AtmoInitialize(p_fadethread->p_filter , true);
}
/* call indirect to OleUnitialize() for this thread */
AtmoFinalize(p_fadethread->p_filter, 0);
+ vlc_restorecancel (canc);
}
/*****************************************************************************
filter_t* p_filter = (filter_t*)(p_thread_obj->p_parent);
filter_sys_t *p_sys = p_filter->p_sys;
vlc_object_t *p_update_request_thread;
+ int canc = vlc_savecancel ();
msg_Dbg( p_filter, "VNC worker thread started" );
vlc_mutex_unlock( &p_sys->lock );
msg_Dbg( p_filter, "VNC message reader thread ended" );
+ vlc_restorecancel (canc);
return NULL;
}
{
filter_t* p_filter = (filter_t*)(p_thread_obj->p_parent);
filter_sys_t *p_sys = p_filter->p_sys;
+ int canc = vlc_savecancel ();
msg_Dbg( p_filter, "VNC update request thread started" );
}
msg_Dbg( p_filter, "VNC update request thread ended" );
+ vlc_restorecancel (canc);
return NULL;
}
vlc_value_t val;
unsigned int i_width, i_height, i_x, i_y;
HMODULE hkernel32;
+ int canc = vlc_savecancel ();
/* Initialisation */
p_event->p_vout->pf_control = Control;
p_event->p_vout->p_sys->i_changes = 0;
DirectXCloseWindow( p_event->p_vout );
+ vlc_restorecancel (canc);
return NULL;
}
static void* RunQtThread( vlc_object_t *p_this )
{
event_thread_t *p_event = (event_thread_t *)p_this;
+ int canc = vlc_savecancel ();
msg_Dbg( p_event->p_vout, "RunQtThread starting" );
#ifdef NEED_QTE_MAIN
#endif
msg_Dbg( p_event->p_vout, "RunQtThread terminating" );
+ vlc_restorecancel (canc);
return NULL;
}
int timed=0;
int timestart=0;
int mspf=0;
+ int canc = vlc_savecancel ();
/* Get on OpenGL provider */
p_thread->p_opengl =
(vout_thread_t *)vlc_object_create( p_this, VLC_OBJECT_OPENGL );
if( p_thread->p_opengl == NULL )
+ {
+ vlc_restorecancel (canc);
return NULL;
+ }
vlc_object_attach( p_thread->p_opengl, p_this );
/* Initialize vout parameters */
msg_Err( p_thread, "unable to initialize OpenGL" );
vlc_object_detach( p_thread->p_opengl );
vlc_object_release( p_thread->p_opengl );
+ vlc_restorecancel (canc);
return NULL;
}
module_Unneed( p_thread->p_opengl, p_thread->p_module );
vlc_object_detach( p_thread->p_opengl );
vlc_object_release( p_thread->p_opengl );
+ vlc_restorecancel (canc);
return NULL;
}
int16_t p_data[2][512];
int i_data = 0, i_count = 0;
PluginInfo *p_plugin_info;
+ int canc = vlc_savecancel ();
var_Get( p_this, "goom-width", &width );
var_Get( p_this, "goom-height", &height );
}
goom_close( p_plugin_info );
+ vlc_restorecancel (canc);
return NULL;
}