~ubuntu-branches/ubuntu/saucy/monodevelop/saucy

« back to all changes in this revision

Viewing changes to external/maccore/src/CoreVideo/CoreVideo.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-05-27 18:08:20 UTC
  • mfrom: (1.8.5) (1.5.8 sid)
  • Revision ID: package-import@ubuntu.com-20120527180820-f1ub6lhg0s50wci1
Tags: 3.0.2+dfsg-3
* [fcecfe7] Fix monodevelop-core-addins.pc.in to point to actual 
  installed location of assemblies.
* [26e1a07] DebSrc 3.0 does not support Quilt's -p parameter, so 
  manually adjust the path in the patch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// 
 
2
// CoreVideo.cs
 
3
//
 
4
// Authors: Mono Team
 
5
//     
 
6
// Copyright 2011 Novell, Inc
 
7
//
 
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:
 
15
// 
 
16
// The above copyright notice and this permission notice shall be
 
17
// included in all copies or substantial portions of the Software.
 
18
// 
 
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.
 
26
//
 
27
using System;
 
28
using System.Drawing;
 
29
using System.Runtime.InteropServices;
 
30
using MonoMac.CoreFoundation;
 
31
using MonoMac.ObjCRuntime;
 
32
 
 
33
namespace MonoMac.CoreVideo {
 
34
        public enum CVAttachmentMode : uint {
 
35
                ShouldNotPropagate    = 0,
 
36
                ShouldPropagate       = 1,
 
37
        }
 
38
 
 
39
        [Flags]
 
40
        public enum CVPixelBufferLock {
 
41
                ReadOnly = 0x00000001,
 
42
        }       
 
43
 
 
44
        public struct CVPlanarComponentInfo {
 
45
                public int Offset;
 
46
                public uint RowBytes;
 
47
        }
 
48
 
 
49
        public struct CVPlanarPixelBufferInfo {
 
50
                public CVPlanarComponentInfo[] ComponentInfo;
 
51
        }
 
52
 
 
53
        public struct CVPlanarPixelBufferInfo_YCbCrPlanar {
 
54
                public CVPlanarComponentInfo ComponentInfoY;
 
55
                public CVPlanarComponentInfo ComponentInfoCb;
 
56
                public CVPlanarComponentInfo ComponentInfoCr;
 
57
        }
 
58
 
 
59
        public enum CVReturn {
 
60
                Success = 0,
 
61
                First = -6660,
 
62
                Error = -6660,
 
63
                InvalidArgument = -6661,
 
64
                AllocationFailed = -6662,
 
65
                InvalidDisplay = -6670,
 
66
                DisplayLinkAlreadyRunning = -6671,
 
67
                DisplayLinkNotRunning = -6672,
 
68
                DisplayLinkCallbacksNotSet = -6673,
 
69
                InvalidPixelFormat = -6680,
 
70
                InvalidSize = -6681,
 
71
                InvalidPixelBufferAttributes = -6682,
 
72
                PixelBufferNotOpenGLCompatible = -6683,
 
73
                PoolAllocationFailed = -6690,
 
74
                InvalidPoolAttributes = -6691,
 
75
                Last = -6699,
 
76
        }
 
77
 
 
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,
 
89
                CV24RGB          = 0x00000018,
 
90
                CV32ARGB         = 0x00000020,
 
91
                CV16LE555        = 0x4c353535,
 
92
                CV16LE5551       = 0x35353531,
 
93
                CV16BE565        = 0x42353635,
 
94
                CV16LE565        = 0x4c353635,
 
95
                CV24BGR          = 0x32344247,
 
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,
 
120
                //[Since (5,1)]
 
121
                OneComponent8 = 0x4C303038,
 
122
                //[Since (5,1)]
 
123
                TwoComponent8 = 0x32433038
 
124
        }
 
125
 
 
126
        public enum CVOptionFlags : long {
 
127
                None = 0,
 
128
        }
 
129
 
 
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;
 
138
                public UInt64           Flags;
 
139
                public UInt64           Reserved;
 
140
        }
 
141
        
 
142
        public struct CVSMPTETime {
 
143
                public Int16    Subframes;
 
144
                public Int16    SubframeDivisor;
 
145
                public UInt32   Counter;
 
146
                public UInt32   Type;
 
147
                public UInt32   Flags;
 
148
                public Int16    Hours;
 
149
                public Int16    Minutes;
 
150
                public Int16    Seconds;
 
151
                public Int16    Frames;
 
152
        }
 
153
 
 
154
        [Flags]
 
155
        public enum CVTimeFlags {
 
156
                IsIndefinite = 1 << 0
 
157
        }
 
158
 
 
159
        [Flags]
 
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)
 
170
        }       
 
171
 
 
172
        [Flags]
 
173
        public enum CVSMPTETimeFlags {
 
174
                Valid     = (1 << 0),
 
175
                Running   = (1 << 1)
 
176
        }
 
177
 
 
178
        public enum CVSMPTETimeType {
 
179
                Type24        = 0,
 
180
                Type25        = 1,
 
181
                Type30Drop    = 2,
 
182
                Type30        = 3,
 
183
                Type2997      = 4,
 
184
                Type2997Drop  = 5,
 
185
                Type60        = 6,
 
186
                Type5994      = 7
 
187
        }
 
188
 
 
189
        public struct CVFillExtendedPixelsCallBackData {
 
190
                public int Version;
 
191
                public CVFillExtendedPixelsCallBack FillCallBack;
 
192
                public IntPtr UserInfo;
 
193
        } 
 
194
 
 
195
        public delegate bool CVFillExtendedPixelsCallBack (IntPtr pixelBuffer, IntPtr refCon);
 
196
}