-
Notifications
You must be signed in to change notification settings - Fork 7
/
mpconfig.cs
237 lines (196 loc) · 5.88 KB
/
mpconfig.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
#region license
/*
DirectShowLib - Provide access to DirectShow interfaces via .NET
Copyright (C) 2007
http://sourceforge.net/projects/directshownet/
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#endregion
using System;
using System.Runtime.InteropServices;
namespace DirectShowLib
{
#region Declarations
/// <summary>
/// From DDCOLOR_* defines
/// </summary>
[Flags]
public enum DDColor
{
None = 0x00000000,
Brightness = 0x00000001,
Contrast = 0x00000002,
Hue = 0x00000004,
Saturation = 0x00000008,
Sharpness = 0x00000010,
Gamma = 0x00000020,
ColorEnable = 0x00000040
}
/// <summary>
/// From DDCOLORCONTROL
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public class DDColorControl
{
public int dwSize;
public DDColor dwFlags;
public int lBrightness;
public int lContrast;
public int lHue;
public int lSaturation;
public int lSharpness;
public int lGamma;
public int lColorEnable;
public int dwReserved1;
}
public enum AspectRatioMode
{
Stretched,
LetterBox,
Crop,
StretchedAsPrimary
}
#endregion
#region Interfaces
[ComImport, System.Security.SuppressUnmanagedCodeSecurity,
Guid("EBF47182-8764-11d1-9E69-00C04FD7C15B"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IMixerPinConfig2 : IMixerPinConfig
{
#region IMixerPinConfig Methods
[PreserveSig]
new int SetRelativePosition(
int dwLeft,
int dwTop,
int dwRight,
int dwBottom);
[PreserveSig]
new int GetRelativePosition(
out int pdwLeft,
out int pdwTop,
out int pdwRight,
out int pdwBottom
);
[PreserveSig]
new int SetZOrder(
int dwZOrder
);
[PreserveSig]
new int GetZOrder(
out int pdwZOrder
);
[PreserveSig]
new int SetColorKey(
[MarshalAs(UnmanagedType.LPStruct)]ColorKey pColorKey
);
[PreserveSig]
new int GetColorKey(
[Out, MarshalAs(UnmanagedType.LPStruct)] ColorKey pColorKey,
out int pColor
);
[PreserveSig]
new int SetBlendingParameter(
int dwBlendingParameter
);
[PreserveSig]
new int GetBlendingParameter(
out int pdwBlendingParameter
);
[PreserveSig]
new int SetAspectRatioMode(
AspectRatioMode amAspectRatioMode
);
[PreserveSig]
new int GetAspectRatioMode(
out AspectRatioMode pamAspectRatioMode
);
[PreserveSig]
new int SetStreamTransparent(
[In, MarshalAs(UnmanagedType.Bool)] bool bStreamTransparent
);
[PreserveSig]
new int GetStreamTransparent(
[Out, MarshalAs(UnmanagedType.Bool)] out bool pbStreamTransparent
);
#endregion
[PreserveSig]
int SetOverlaySurfaceColorControls(
DDColorControl pColorControl
);
[PreserveSig]
int GetOverlaySurfaceColorControls(
DDColorControl pColorControl
);
}
[ComImport, System.Security.SuppressUnmanagedCodeSecurity,
Guid("593CDDE1-0759-11d1-9E69-00C04FD7C15B"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IMixerPinConfig
{
[PreserveSig]
int SetRelativePosition(
int dwLeft,
int dwTop,
int dwRight,
int dwBottom);
[PreserveSig]
int GetRelativePosition(
out int pdwLeft,
out int pdwTop,
out int pdwRight,
out int pdwBottom
);
[PreserveSig]
int SetZOrder(
int dwZOrder
);
[PreserveSig]
int GetZOrder(
out int pdwZOrder
);
[PreserveSig]
int SetColorKey(
[MarshalAs(UnmanagedType.LPStruct)] ColorKey pColorKey
);
[PreserveSig]
int GetColorKey(
[Out, MarshalAs(UnmanagedType.LPStruct)] ColorKey pColorKey,
out int pColor
);
[PreserveSig]
int SetBlendingParameter(
int dwBlendingParameter
);
[PreserveSig]
int GetBlendingParameter(
out int pdwBlendingParameter
);
[PreserveSig]
int SetAspectRatioMode(
AspectRatioMode amAspectRatioMode
);
[PreserveSig]
int GetAspectRatioMode(
out AspectRatioMode pamAspectRatioMode
);
[PreserveSig]
int SetStreamTransparent(
[In, MarshalAs(UnmanagedType.Bool)] bool bStreamTransparent
);
[PreserveSig]
int GetStreamTransparent(
[Out, MarshalAs(UnmanagedType.Bool)] out bool pbStreamTransparent
);
}
#endregion
}