vlc_object_attach( m_pAtmoThread, m_pOwner);
- vlc_mutex_init( m_pAtmoThread, &m_TerminateLock );
- err = vlc_cond_init( m_pAtmoThread, &m_TerminateCond );
+ vlc_mutex_init( &m_TerminateLock );
+ err = vlc_cond_init( &m_TerminateCond );
if(err) {
msg_Err( m_pAtmoThread, "vlc_cond_init failed %d",err);
}
#if defined(_ATMO_VLC_PLUGIN_)
-void CThread::ThreadProc(atmo_thread_t *pAtmoThread)
+void *CThread::ThreadProc(vlc_object_t *obj)
{
+ atmo_thread_t *pAtmoThread = (atmo_thread_t *)obj;
CThread *pThread = (CThread *)pAtmoThread->p_thread;
if(pThread) {
- // give feedback I'am running?
- vlc_thread_ready( pThread->m_pAtmoThread );
-
- pThread->Execute();
+ int canc;
+ canc = vlc_savecancel ();
+ pThread->Execute();
+ vlc_restorecancel (canc);
}
+ return NULL;
}
#else
if(vlc_thread_create( m_pAtmoThread,
"Atmo-CThread-Class",
CThread::ThreadProc,
- VLC_THREAD_PRIORITY_LOW,
- false ))
+ VLC_THREAD_PRIORITY_LOW ))
{
msg_Err( m_pOwner, "cannot launch one of the AtmoLight threads");
}