AtmoDynData.h

Go to the documentation of this file.
00001 /*
00002  * AtmoDynData.h: class for holding all variable data - which may be passed
00003  * between function calls, into threads instead of the use of global variables
00004  *
00005  * See the README.txt file for copyright information and how to reach the author(s).
00006  *
00007  * $Id: f33fa812f68b45dc81189aefb47a2cf0610fe7a9 $
00008  */
00009 #ifndef _AtmoDynData_h_
00010 #define _AtmoDynData_h_
00011 
00012 #include <stdio.h>
00013 
00014 #include "AtmoDefs.h"
00015 
00016 #include "AtmoThread.h"
00017 #include "AtmoConfig.h"
00018 #include "AtmoConnection.h"
00019 #include "AtmoPacketQueue.h"
00020 #include "AtmoInput.h"
00021 
00022 #if !defined(_ATMO_VLC_PLUGIN_)
00023 #    include "AtmoDisplays.h"
00024 #else
00025 #   include <vlc_common.h>
00026 #   include <vlc_threads.h>
00027 #endif
00028 
00029 class CAtmoInput;
00030 
00031 /*
00032   the idea behind this class is to avoid a mix of persistent value and
00033   volatile values in CAtmoConfig class because some parameters and variables
00034   exists only for the current process and won't be stored to the registry
00035 
00036   (Simple thought its a container... )
00037 
00038   you ask? why I didn't used a struct for it? ..mmh I like classes?
00039 
00040   Allways stop the current effect Thread before changing AtmoConnection or
00041   AtmoConfig!
00042 */
00043 class CAtmoDynData
00044 {
00045 private:
00046     /*
00047       thread creating the current output (depends on active effect)
00048     */
00049     CThread *m_pCurrentEffectThread;
00050 
00051     /*
00052       in Modus Live View the packetQueue is the connection
00053       between the output processing and the pixelsource
00054     */
00055     CAtmoPacketQueue *m_pLivePacketQueue;
00056 
00057     /*
00058       thread for getting and preparing the pixeldata in color
00059       packets for each zone
00060     */
00061     CAtmoInput *m_pLiveInput;
00062     LivePictureSource m_LivePictureSource;
00063 
00064     /*
00065     connection to the current configure hardware device
00066     */
00067     CAtmoConnection *m_pAtmoConnection;
00068 
00069     /*
00070      all global persistent parameters
00071     */
00072     CAtmoConfig *m_pAtmoConfig;
00073 
00074 #if !defined(_ATMO_VLC_PLUGIN_)
00075     CAtmoDisplays *m_pAtmoDisplays;
00076     HINSTANCE m_hInst;
00077     CRITICAL_SECTION m_RemoteCallCriticalSection;
00078     char m_WorkDir[MAX_PATH];
00079 #else
00080     vlc_object_t *p_atmo_filter;
00081     vlc_mutex_t  m_lock;
00082 #endif
00083 
00084 
00085 public:
00086 #if !defined(_ATMO_VLC_PLUGIN_)
00087      CAtmoDynData(HINSTANCE hInst,
00088                   CAtmoConfig *pAtmoConfig,
00089                   CAtmoDisplays *pAtmoDisplays);
00090 #else
00091      CAtmoDynData(vlc_object_t *p_atmo_filter,
00092                   CAtmoConfig *pAtmoConfig);
00093 #endif
00094     ~CAtmoDynData(void);
00095 
00096     CThread *getEffectThread()           { return m_pCurrentEffectThread; }
00097     void setEffectThread(CThread *value) { m_pCurrentEffectThread = value; }
00098 
00099 
00100     CAtmoPacketQueue *getLivePacketQueue() { return m_pLivePacketQueue; }
00101     void setLivePacketQueue(CAtmoPacketQueue *pQueue) { m_pLivePacketQueue = pQueue; }
00102 
00103     CAtmoInput *getLiveInput() { return m_pLiveInput; }
00104     void setLiveInput(CAtmoInput *value) {  m_pLiveInput = value; }
00105 
00106     LivePictureSource getLivePictureSource() { return m_LivePictureSource; }
00107     void setLivePictureSource(LivePictureSource lps) { m_LivePictureSource = lps; }
00108 
00109     CAtmoConnection *getAtmoConnection() { return m_pAtmoConnection; }
00110     void setAtmoConnection(CAtmoConnection *value) { m_pAtmoConnection = value; }
00111 
00112     CAtmoConfig *getAtmoConfig() { return m_pAtmoConfig; }
00113 
00114     void ReloadZoneDefinitionBitmaps();
00115     void CalculateDefaultZones();
00116 
00117 #if !defined(_ATMO_VLC_PLUGIN_)
00118     CAtmoDisplays *getAtmoDisplays() { return m_pAtmoDisplays; }
00119     HINSTANCE getHinstance() { return m_hInst; }
00120     void setWorkDir(const char *dir);
00121     char *getWorkDir();
00122 #else
00123     vlc_object_t *getAtmoFilter() { return p_atmo_filter; }
00124 #endif
00125 
00126     void LockCriticalSection();
00127     void UnLockCriticalSection();
00128 };
00129 
00130 #endif

Generated on Tue May 25 08:04:59 2010 for VLC by  doxygen 1.5.6