]> git.sesse.net Git - vlc/blob - modules/video_filter/atmo/AtmoInput.h
threads: Make sure we don't re-create a thread if the object has already one.
[vlc] / modules / video_filter / atmo / AtmoInput.h
1 /*
2  * AtmoInput.h:  abstract class for retrieving precalculated image data from
3  * different sources in the live view mode
4  *
5  *
6  * See the README.txt file for copyright information and how to reach the author(s).
7  *
8  * $Id$
9  */
10 #ifndef _AtmoInput_h_
11 #define _AtmoInput_h_
12
13 #include "AtmoDefs.h"
14 #include "AtmoDynData.h"
15
16 /*
17   basic definition of an AtmoLight data/image source ...
18 */
19 class CAtmoInput {
20
21 protected:
22     tColorPacket m_ColorPacket;
23     volatile ATMO_BOOL m_FrameArrived;
24     CAtmoDynData *m_pAtmoDynData;
25
26 public:
27     CAtmoInput(CAtmoDynData *pAtmoDynData);
28     virtual ~CAtmoInput(void);
29
30     // Opens the input-device.
31     // Returns true if the input-device was opened successfully.
32     virtual ATMO_BOOL Open(void) { return ATMO_FALSE; }
33
34     // Closes the input-device.
35     // Returns true if the input-device was closed successfully.
36     virtual ATMO_BOOL Close(void) { return ATMO_FALSE; }
37
38     // Returns the calculated tColorPacket for further processing (e.g. filtering).
39     virtual tColorPacket GetColorPacket(void) { return m_ColorPacket; }
40
41     // wait for the arrival of the next frame...(to come in sync again)
42     virtual void WaitForNextFrame(DWORD timeout);
43 };
44
45 #endif