]> git.sesse.net Git - vlc/blob - modules/video_filter/atmo/AtmoExternalCaptureInput.h
atmo filter: disable until it is fixed
[vlc] / modules / video_filter / atmo / AtmoExternalCaptureInput.h
1 #ifndef _AtmoExternalCaptureInput_h_
2 #define _AtmoExternalCaptureInput_h_
3
4 #include "AtmoDefs.h"
5
6 #if defined(WIN32)
7 #   include <windows.h>
8 # else
9 #   if defined(_ATMO_VLC_PLUGIN_)
10        // need bitmap info header
11 #      include <vlc_codecs.h>
12 #   endif
13 #endif
14
15 #if !defined(_ATMO_VLC_PLUGIN_)
16 #  include <comdef.h>           
17 #  include "AtmoWin_h.h"
18 #endif
19
20 #include "AtmoInput.h"
21 #include "AtmoThread.h"
22 #include "AtmoConfig.h"
23 #include "AtmoDynData.h"
24 #include "AtmoCalculations.h"
25
26
27 class CAtmoExternalCaptureInput :
28       public CAtmoInput,
29       public CThread
30 {
31 protected:
32 #if defined(_ATMO_VLC_PLUGIN_)
33     vlc_cond_t   m_WakeupCond;
34     vlc_mutex_t  m_WakeupLock;
35 #else
36     HANDLE m_hWakeupEvent;
37 #endif
38
39     BITMAPINFOHEADER m_CurrentFrameHeader;
40     void *m_pCurrentFramePixels;
41
42     virtual DWORD Execute(void);
43     void CalcColors();
44
45 public:
46     /*
47        this method is called from the com server AtmoLiveViewControlImpl!
48        or inside videolan from the filter method to start a new processing
49     */
50     void DeliverNewSourceDataPaket(BITMAPINFOHEADER *bmpInfoHeader,void *pixelData);
51
52 public:
53     CAtmoExternalCaptureInput(CAtmoDynData *pAtmoDynData);
54     virtual ~CAtmoExternalCaptureInput(void);
55
56     /*
57        Opens the input-device. Parameters (e.g. the device-name)
58        Returns true if the input-device was opened successfully.
59        input-device can be the GDI surface of screen (windows only)
60        or the videolan filter
61     */
62     virtual ATMO_BOOL Open(void);
63
64     /*
65      Closes the input-device.
66      Returns true if the input-device was closed successfully.
67     */
68     virtual ATMO_BOOL Close(void);
69
70     /*
71       this method is called from the AtmoLiveView thread - to get the
72       new color packet (a packet is an RGB triple for each channel)
73     */
74     virtual tColorPacket GetColorPacket(void);
75
76     /*
77       this method is also called from the AtmoLiveView thread - to
78       resync on a frame
79     */
80     virtual void WaitForNextFrame(DWORD timeout);
81 };
82
83 #endif