2 * AtmoDynData.cpp: class for holding all variable data - which may be
3 * passed between function calls, into threads instead of the use
6 * See the README.txt file for copyright information and how to reach the author(s).
11 #include "AtmoDynData.h"
13 #if defined(_ATMO_VLC_PLUGIN_)
14 CAtmoDynData::CAtmoDynData(vlc_object_t *p_atmo_filter, CAtmoConfig *pAtmoConfig) {
15 this->p_atmo_filter = p_atmo_filter;
16 this->m_pAtmoConfig = pAtmoConfig;
17 this->m_pAtmoConnection = NULL;
18 this->m_pCurrentEffectThread = NULL;
20 vlc_mutex_init( &m_lock );
24 CAtmoDynData::CAtmoDynData(HINSTANCE hInst, CAtmoConfig *pAtmoConfig, CAtmoDisplays *pAtmoDisplays) {
25 this->m_pAtmoConfig = pAtmoConfig;
26 this->m_pAtmoDisplays = pAtmoDisplays;
27 this->m_pAtmoConnection = NULL;
28 this->m_pCurrentEffectThread = NULL;
29 this->m_hInst = hInst;
30 InitializeCriticalSection(&m_RemoteCallCriticalSection);
34 CAtmoDynData::~CAtmoDynData(void)
36 #if defined(_ATMO_VLC_PLUGIN_)
37 vlc_mutex_destroy( &m_lock );
39 DeleteCriticalSection(&m_RemoteCallCriticalSection);
43 void CAtmoDynData::LockCriticalSection() {
44 #if defined(_ATMO_VLC_PLUGIN_)
45 vlc_mutex_lock( &m_lock );
47 EnterCriticalSection(&m_RemoteCallCriticalSection);
51 void CAtmoDynData::UnLockCriticalSection() {
52 #if defined(_ATMO_VLC_PLUGIN_)
53 vlc_mutex_unlock( &m_lock );
55 LeaveCriticalSection(&m_RemoteCallCriticalSection);