2 * AtmoDynData.h: class for holding all variable data - which may be passed
3 * between function calls, into threads instead of the use of global variables
5 * See the README.txt file for copyright information and how to reach the author(s).
9 #ifndef _AtmoDynData_h_
10 #define _AtmoDynData_h_
14 #include "AtmoThread.h"
15 #include "AtmoConfig.h"
16 #include "AtmoConnection.h"
18 #if !defined(_ATMO_VLC_PLUGIN_)
19 # include "AtmoDisplays.h"
21 # include <vlc_common.h>
22 # include <vlc_threads.h>
26 the idea behind this class is to avoid a mix of persistent value and
27 volatile values in CAtmoConfig class because some parameters and variables
28 exists only for the current process and won't be stored to the registry
30 (Simple thought its a container... )
32 you ask? why I didn't used a struct for it? ..mmh I like classes?
34 Problem: MultiThreading! todo semaphore, mutex!
36 Allways stop the current effect Thread before changing AtmoConnection or
42 CThread *m_pCurrentEffectThread;
43 CAtmoConnection *m_pAtmoConnection;
44 CAtmoConfig *m_pAtmoConfig;
46 #if !defined(_ATMO_VLC_PLUGIN_)
47 CAtmoDisplays *m_pAtmoDisplays;
49 CRITICAL_SECTION m_RemoteCallCriticalSection;
51 vlc_object_t *p_atmo_filter;
57 #if !defined(_ATMO_VLC_PLUGIN_)
58 CAtmoDynData(HINSTANCE hInst,
59 CAtmoConfig *pAtmoConfig,
60 CAtmoDisplays *pAtmoDisplays);
62 CAtmoDynData(vlc_object_t *p_atmo_filter,
63 CAtmoConfig *pAtmoConfig);
67 CThread *getEffectThread() { return m_pCurrentEffectThread; }
68 void setEffectThread(CThread *value) { m_pCurrentEffectThread = value; }
70 CAtmoConnection *getAtmoConnection() { return m_pAtmoConnection; }
71 void setAtmoConnection(CAtmoConnection *value) { m_pAtmoConnection = value; }
73 CAtmoConfig *getAtmoConfig() { return m_pAtmoConfig; }
75 #if !defined(_ATMO_VLC_PLUGIN_)
76 CAtmoDisplays *getAtmoDisplays() { return m_pAtmoDisplays; }
77 HINSTANCE getHinstance() { return m_hInst; }
79 vlc_object_t *getAtmoFilter() { return p_atmo_filter; }
82 void LockCriticalSection();
83 void UnLockCriticalSection();