]> git.sesse.net Git - vlc/blob - modules/video_filter/atmo/AtmoDmxSerialConnection.h
Reenabled bob/linear/yadif2x modes in the deinterlace filter.
[vlc] / modules / video_filter / atmo / AtmoDmxSerialConnection.h
1 /*
2  * AtmoDmxSerialConnection.h: Class for communication with the serial DMX Interface of dzionsko,
3  * opens and configures the serial port
4  *
5  * See the README.txt file for copyright information and how to reach the author(s).
6  *
7  * $Id$
8  */
9 #ifndef _AtmoDmxSerialConnection_h_
10 #define _AtmoDmxSerialConnection_h_
11
12
13 #include "AtmoDefs.h"
14 #include "AtmoConnection.h"
15 #include "AtmoConfig.h"
16
17 #if defined(WIN32)
18 #   include <windows.h>
19 #endif
20
21 class CAtmoDmxSerialConnection : public CAtmoConnection {
22     private:
23         HANDLE m_hComport;
24         // DMX Channel Buffer including some Control Bytes for up to 256 DMX Channels
25                 unsigned char DMXout[259];
26         // contains the DMX Start Adress of each Atmo-Dmx-Channel
27         int *m_dmx_channels_base;
28
29 #if defined(WIN32)
30         DWORD  m_dwLastWin32Error;
31     public:
32         DWORD getLastError() { return m_dwLastWin32Error; }
33 #endif
34
35     public:
36        CAtmoDmxSerialConnection(CAtmoConfig *cfg);
37        virtual ~CAtmoDmxSerialConnection(void);
38
39            virtual ATMO_BOOL OpenConnection();
40
41        virtual void CloseConnection();
42
43        virtual ATMO_BOOL isOpen(void);
44
45        virtual ATMO_BOOL SendData(pColorPacket data);
46
47        virtual ATMO_BOOL HardwareWhiteAdjust(int global_gamma,
48                                              int global_contrast,
49                                              int contrast_red,
50                                              int contrast_green,
51                                              int contrast_blue,
52                                              int gamma_red,
53                                              int gamma_green,
54                                              int gamma_blue,
55                                              ATMO_BOOL storeToEeprom);
56
57            virtual ATMO_BOOL setChannelColor(int channel, tRGBColor color);
58
59        virtual ATMO_BOOL setChannelValues(int numValues,unsigned char *channel_values);
60
61        virtual int getNumChannels();
62
63 #if !defined(_ATMO_VLC_PLUGIN_)
64        virtual char *getChannelName(int ch);
65        virtual ATMO_BOOL ShowConfigDialog(HINSTANCE hInst, HWND parent, CAtmoConfig *cfg);
66 #endif
67
68        virtual const char *getDevicePath() { return "dmx"; }
69
70        virtual ATMO_BOOL CreateDefaultMapping(CAtmoChannelAssignment *ca);
71 };
72
73 #endif