]> git.sesse.net Git - vlc/blob - modules/video_filter/atmo/AtmoExternalCaptureInput.h
android_window: check subtitles bounds
[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 <vlc_common.h>
17 #  include <vlc_threads.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 :  public CAtmoInput
28 {
29 protected:
30 #if defined(_ATMO_VLC_PLUGIN_)
31     vlc_cond_t   m_WakeupCond;
32     vlc_mutex_t  m_WakeupLock;
33     vlc_object_t *m_pLog;
34 #else
35     HANDLE m_hWakeupEvent;
36     CRITICAL_SECTION m_BufferLock;
37 #endif
38
39     VLC_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(VLC_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
72 #endif