]> git.sesse.net Git - vlc/blob - modules/video_filter/atmo/AtmoDefs.h
update module LIST file.
[vlc] / modules / video_filter / atmo / AtmoDefs.h
1 /*
2  * AtmoDefs.h: a lot of globals defines for the color computation - most of this file
3  * is an one  to one copy of "defs.h" from Atmo VDR Plugin
4  *
5  * See the README.txt file for copyright information and how to reach the author(s).
6  *
7  * $Id$
8  */
9
10 #ifndef _AtmoDefs_h_
11 #define _AtmoDefs_h_
12
13 #if defined(__LIBVLC__)
14 #   include "config.h"
15 #   include <vlc/vlc.h>
16
17 /* some things need to be changed if this code is used inside VideoLan Filter Module */
18 #   define _ATMO_VLC_PLUGIN_
19 #   define ATMO_BOOL vlc_bool_t
20 #   define ATMO_TRUE VLC_TRUE
21 #   define ATMO_FALSE VLC_FALSE
22
23 #else
24
25     typedef int ATMO_BOOL;
26 #   define ATMO_TRUE   1
27 #   define ATMO_FALSE  0
28 #   define MakeWord(ch1,ch2)  ((((int)(ch1)&255)<<8) | \
29                            ((int)(ch2)&255))
30
31 #   define MakeDword(ch1,ch2,ch3,ch4) ((((DWORD)(ch1)&255) << 24) | \
32                                    (((DWORD)(ch2)&255) << 16) | \
33                                    (((DWORD)(ch3)&255) << 8) | \
34                                    (((DWORD)(ch4)&255)))
35
36
37 #endif
38
39
40 #if !defined(WIN32)
41
42 #define INVALID_HANDLE_VALUE -1
43 typedef int HANDLE;
44 typedef unsigned long DWORD;
45
46 #define BI_RGB 0L
47
48 #if !defined(_BITMAPFILEHEADER_)
49 #define _BITMAPFILEHEADER_
50 typedef struct
51 #ifdef HAVE_ATTRIBUTE_PACKED
52     __attribute__((__packed__))
53 #endif
54 {
55         uint16_t   bfType;
56         uint32_t   bfSize;
57         uint16_t   bfReserved1;
58         uint16_t   bfReserved2;
59         uint32_t   bfOffBits;
60 } BITMAPFILEHEADER, *LPBITMAPFILEHEADER, *PBITMAPFILEHEADER;
61 #endif
62
63 #endif
64
65
66
67
68
69
70
71 // maximal Anzahl Kanäle...
72 #define ATMO_NUM_CHANNELS   5
73
74 // capture width/height
75 #define CAP_WIDTH    64
76 #define CAP_HEIGHT   48
77
78 // imagesize
79 #define IMAGE_SIZE   (CAP_WIDTH * CAP_HEIGHT)
80
81
82 enum AtmoConnectionType
83 {
84       actSerialPort = 0,
85       actDummy = 1,
86       actDMX = 2
87 };
88 static const char *AtmoDeviceTypes[] = {
89       "Atmo",
90       "Dummy",
91       "DMX"
92   };
93 #define ATMO_DEVICE_COUNT 3
94
95 #if defined(_ATMO_VLC_PLUGIN_)
96 enum EffectMode {
97       emUndefined = -1,
98       emDisabled = 0,
99       emStaticColor = 1,
100       emLivePicture = 2
101    };
102 #else
103 enum EffectMode {
104       emUndefined = -1,
105       emDisabled = 0,
106       emStaticColor = 1,
107       emLivePicture = 2,
108       emColorChange = 3,
109       emLrColorChange = 4
110    };
111 #endif
112
113
114
115
116 enum AtmoFilterMode {
117      afmNoFilter,
118      afmCombined,
119      afmPercent
120 };
121
122 typedef struct {
123     ATMO_BOOL system;
124     char name[64];
125     int mappings[ATMO_NUM_CHANNELS];
126 } tChannelAssignment;
127
128
129 // --- tRGBColor --------------------------------------------------------------
130 typedef struct
131 {
132   unsigned char r, g, b;
133 } tRGBColor;
134
135 // --- tColorPacket -----------------------------------------------------------
136 typedef struct
137 {
138   tRGBColor channel[ATMO_NUM_CHANNELS];
139 } tColorPacket;
140
141 // --- tRGBColorLongInt -------------------------------------------------------
142 typedef struct
143 {
144   long int r, g, b;
145 } tRGBColorLongInt;
146
147 // --- tColorPacketLongInt ----------------------------------------------------
148 typedef struct
149 {
150   tRGBColorLongInt channel[ATMO_NUM_CHANNELS];
151 } tColorPacketLongInt;
152
153 // --- tWeightPacket ----------------------------------------------------------
154 typedef struct
155 {
156   int channel[ATMO_NUM_CHANNELS];
157 } tWeightPacket;
158
159 // --- tHSVColor --------------------------------------------------------------
160 typedef struct
161 {
162   unsigned char h, s, v;
163 } tHSVColor;
164
165 #endif