6
// Copyright 2011 Novell, Inc
8
// Permission is hereby granted, free of charge, to any person obtaining
9
// a copy of this software and associated documentation files (the
10
// "Software"), to deal in the Software without restriction, including
11
// without limitation the rights to use, copy, modify, merge, publish,
12
// distribute, sublicense, and/or sell copies of the Software, and to
13
// permit persons to whom the Software is furnished to do so, subject to
14
// the following conditions:
16
// The above copyright notice and this permission notice shall be
17
// included in all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
using System.Runtime.InteropServices;
30
using MonoMac.CoreFoundation;
31
using MonoMac.ObjCRuntime;
33
namespace MonoMac.CoreVideo {
34
public enum CVAttachmentMode : uint {
35
ShouldNotPropagate = 0,
40
public enum CVPixelBufferLock {
41
ReadOnly = 0x00000001,
44
public struct CVPlanarComponentInfo {
49
public struct CVPlanarPixelBufferInfo {
50
public CVPlanarComponentInfo[] ComponentInfo;
53
public struct CVPlanarPixelBufferInfo_YCbCrPlanar {
54
public CVPlanarComponentInfo ComponentInfoY;
55
public CVPlanarComponentInfo ComponentInfoCb;
56
public CVPlanarComponentInfo ComponentInfoCr;
59
public enum CVReturn {
63
InvalidArgument = -6661,
64
AllocationFailed = -6662,
65
InvalidDisplay = -6670,
66
DisplayLinkAlreadyRunning = -6671,
67
DisplayLinkNotRunning = -6672,
68
DisplayLinkCallbacksNotSet = -6673,
69
InvalidPixelFormat = -6680,
71
InvalidPixelBufferAttributes = -6682,
72
PixelBufferNotOpenGLCompatible = -6683,
73
PoolAllocationFailed = -6690,
74
InvalidPoolAttributes = -6691,
78
public enum CVPixelFormatType : uint {
79
// FIXME: These all start with integers; what should we do here?
80
CV1Monochrome = 0x00000001,
81
CV2Indexed = 0x00000002,
82
CV4Indexed = 0x00000004,
83
CV8Indexed = 0x00000008,
84
CV1IndexedGray_WhiteIsZero = 0x00000021,
85
CV2IndexedGray_WhiteIsZero = 0x00000022,
86
CV4IndexedGray_WhiteIsZero = 0x00000024,
87
CV8IndexedGray_WhiteIsZero = 0x00000028,
88
CV16BE555 = 0x00000010,
90
CV32ARGB = 0x00000020,
91
CV16LE555 = 0x4c353535,
92
CV16LE5551 = 0x35353531,
93
CV16BE565 = 0x42353635,
94
CV16LE565 = 0x4c353635,
96
CV32BGRA = 0x42475241,
97
CV32ABGR = 0x41424752,
98
CV32RGBA = 0x52474241,
99
CV64ARGB = 0x62363461,
100
CV48RGB = 0x62343872,
101
CV32AlphaGray = 0x62333261,
102
CV16Gray = 0x62313667,
103
CV422YpCbCr8 = 0x32767579,
104
CV4444YpCbCrA8 = 0x76343038,
105
CV4444YpCbCrA8R = 0x72343038,
106
CV444YpCbCr8 = 0x76333038,
107
CV422YpCbCr16 = 0x76323136,
108
CV422YpCbCr10 = 0x76323130,
109
CV444YpCbCr10 = 0x76343130,
110
CV420YpCbCr8Planar = 0x79343230,
111
CV420YpCbCr8PlanarFullRange = 0x66343230,
112
CV422YpCbCr_4A_8BiPlanar = 0x61327679,
113
CV420YpCbCr8BiPlanarVideoRange = 0x34323076,
114
CV420YpCbCr8BiPlanarFullRange = 0x34323066,
115
CV422YpCbCr8_yuvs = 0x79757673,
116
CV422YpCbCr8FullRange = 0x79757666,
117
CV30RGB = 0x5231306b,
118
CV4444AYpCbCr8 = 0x79343038,
119
CV4444AYpCbCr16 = 0x79343136,
121
OneComponent8 = 0x4C303038,
123
TwoComponent8 = 0x32433038
126
public enum CVOptionFlags : long {
130
public struct CVTimeStamp {
131
public UInt32 Version;
132
public Int32 VideoTimeScale;
133
public Int64 VideoTime;
134
public UInt64 HostTime;
135
public double RateScalar;
136
public Int64 VideoRefreshPeriod;
137
public CVSMPTETime SMPTETime;
139
public UInt64 Reserved;
142
public struct CVSMPTETime {
143
public Int16 Subframes;
144
public Int16 SubframeDivisor;
145
public UInt32 Counter;
149
public Int16 Minutes;
150
public Int16 Seconds;
155
public enum CVTimeFlags {
156
IsIndefinite = 1 << 0
160
public enum CVTimeStampFlags {
161
VideoTimeValid = (1 << 0),
162
HostTimeValid = (1 << 1),
163
SMPTETimeValid = (1 << 2),
164
VideoRefreshPeriodValid = (1 << 3),
165
RateScalarValid = (1 << 4),
166
TopField = (1 << 16),
167
BottomField = (1 << 17),
168
VideoHostTimeValid = (VideoTimeValid | HostTimeValid),
169
IsInterlaced = (TopField | BottomField)
173
public enum CVSMPTETimeFlags {
178
public enum CVSMPTETimeType {
189
public struct CVFillExtendedPixelsCallBackData {
191
public CVFillExtendedPixelsCallBack FillCallBack;
192
public IntPtr UserInfo;
195
public delegate bool CVFillExtendedPixelsCallBack (IntPtr pixelBuffer, IntPtr refCon);