1 // File generated by idl2d from
2 //   ../DeckLinkAPI.idl
3 module decklink4d.bmd.decklinkapi;
4 
5 import decklink4d.port;
6 
7 /* -LICENSE-START-
8 ** Copyright (c) 2013 Blackmagic Design
9 **
10 ** Permission is hereby granted, free of charge, to any person or organization
11 ** obtaining a copy of the software and accompanying documentation covered by
12 ** this license (the "Software") to use, reproduce, display, distribute,
13 ** execute, and transmit the Software, and to prepare derivative works of the
14 ** Software, and to permit third-parties to whom the Software is furnished to
15 ** do so, all subject to the following:
16 ** 
17 ** The copyright notices in the Software and this entire statement, including
18 ** the above license grant, this restriction and the following disclaimer,
19 ** must be included in all copies of the Software, in whole or in part, and
20 ** all derivative works of the Software, unless such copies or derivative
21 ** works are solely in the form of machine-executable object code generated by
22 ** a source language processor.
23 ** 
24 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
27 ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
28 ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
29 ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 ** DEALINGS IN THE SOFTWARE.
31 ** -LICENSE-END-
32 */
33 
34 /* DeckLink API */
35 
36 /+[uuid(D864517A-EDD5-466D-867D-C819F1C052BB),
37 version(1.0), helpstring("DeckLink API Library")]+/ /+ library DeckLinkAPI +/
38 
39 public import decklink4d.bmd.decklinkapitypes;
40 public import decklink4d.bmd.decklinkapimodes;
41 public import decklink4d.bmd.decklinkapidiscovery;
42 public import decklink4d.bmd.decklinkapiconfiguration;
43 public import decklink4d.bmd.decklinkapideckcontrol;
44 public import decklink4d.bmd.decklinkapistreaming;
45 
46 // Type Declarations
47 
48 // Enumeration Mapping
49 
50 alias uint BMDFrameFlags;
51 alias uint BMDVideoInputFlags;
52 alias uint BMDVideoInputFormatChangedEvents;
53 alias uint BMDDetectedVideoInputFormatFlags;
54 alias uint BMDAnalogVideoFlags;
55 alias uint BMDDeviceBusyState; 
56 
57 /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
58 
59 enum 
60 		/+[v1_enum]+/ /+	_BMDVideoOutputFlags+/
61 {
62     bmdVideoOutputFlagDefault                                    = 0,
63     bmdVideoOutputVANC                                           = 1 << 0,
64     bmdVideoOutputVITC                                           = 1 << 1,
65     bmdVideoOutputRP188                                          = 1 << 2,
66     bmdVideoOutputDualStream3D                                   = 1 << 4
67 }
68 alias int	_BMDVideoOutputFlags;
69 alias int BMDVideoOutputFlags;
70 
71 /* Enum BMDFrameFlags - Frame flags */
72 
73 /+[v1_enum]+/ enum /+	_BMDFrameFlags+/ : int 
74 {
75     bmdFrameFlagDefault                                          = 0,
76     bmdFrameFlagFlipVertical                                     = 1 << 0,
77 
78     /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
79 
80     bmdFrameHasNoInputSource                                     = 1 << 31
81 }
82 alias int	_BMDFrameFlags;
83 
84 /* Enum BMDVideoInputFlags - Flags applicable to video input */
85 
86 /+[v1_enum]+/ enum /+	_BMDVideoInputFlags+/ : int 
87 {
88     bmdVideoInputFlagDefault                                     = 0,
89     bmdVideoInputEnableFormatDetection                           = 1 << 0,
90     bmdVideoInputDualStream3D                                    = 1 << 1
91 }
92 alias int	_BMDVideoInputFlags;
93 
94 /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
95 
96 /+[v1_enum]+/ enum /+	_BMDVideoInputFormatChangedEvents+/ : int 
97 {
98     bmdVideoInputDisplayModeChanged                              = 1 << 0,
99     bmdVideoInputFieldDominanceChanged                           = 1 << 1,
100     bmdVideoInputColorspaceChanged                               = 1 << 2
101 }
102 alias int	_BMDVideoInputFormatChangedEvents;
103 
104 /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
105 
106 /+[v1_enum]+/ enum /+	_BMDDetectedVideoInputFormatFlags+/ : int 
107 {
108     bmdDetectedVideoInputYCbCr422                                = 1 << 0,
109     bmdDetectedVideoInputRGB444                                  = 1 << 1
110 }
111 alias int	_BMDDetectedVideoInputFormatFlags;
112 
113 /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
114 
115 enum 
116 		/+[v1_enum]+/ /+	_BMDOutputFrameCompletionResult+/
117 {
118     bmdOutputFrameCompleted,                                    
119     bmdOutputFrameDisplayedLate,                                
120     bmdOutputFrameDropped,                                      
121     bmdOutputFrameFlushed
122 }
123 alias int	_BMDOutputFrameCompletionResult;
124 alias int BMDOutputFrameCompletionResult;
125 
126 /* Enum BMDReferenceStatus - GenLock input status */
127 
128 enum 
129 		/+[v1_enum]+/ /+	_BMDReferenceStatus+/
130 {
131     bmdReferenceNotSupportedByHardware                           = 1 << 0,
132     bmdReferenceLocked                                           = 1 << 1
133 }
134 alias int	_BMDReferenceStatus;
135 alias int BMDReferenceStatus;
136 
137 /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
138 
139 enum 
140 		/+[v1_enum]+/ /+	_BMDAudioSampleRate+/
141 {
142     bmdAudioSampleRate48kHz                                      = 48000
143 }
144 alias int	_BMDAudioSampleRate;
145 alias int BMDAudioSampleRate;
146 
147 /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
148 
149 enum 
150 		/+[v1_enum]+/ /+	_BMDAudioSampleType+/
151 {
152     bmdAudioSampleType16bitInteger                               = 16,
153     bmdAudioSampleType32bitInteger                               = 32
154 }
155 alias int	_BMDAudioSampleType;
156 alias int BMDAudioSampleType;
157 
158 /* Enum BMDAudioOutputStreamType - Audio output stream type */
159 
160 enum 
161 		/+[v1_enum]+/ /+	_BMDAudioOutputStreamType+/
162 {
163     bmdAudioOutputStreamContinuous,                             
164     bmdAudioOutputStreamContinuousDontResample,                 
165     bmdAudioOutputStreamTimestamped
166 }
167 alias int	_BMDAudioOutputStreamType;
168 alias int BMDAudioOutputStreamType;
169 
170 /* Enum BMDDisplayModeSupport - Output mode supported flags */
171 
172 enum 
173 		/+[v1_enum]+/ /+	_BMDDisplayModeSupport+/
174 {
175     bmdDisplayModeNotSupported                                   = 0,
176     bmdDisplayModeSupported,                                    
177     bmdDisplayModeSupportedWithConversion
178 }
179 alias int	_BMDDisplayModeSupport;
180 alias int BMDDisplayModeSupport;
181 
182 /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
183 
184 enum 
185 		/+[v1_enum]+/ /+	_BMDTimecodeFormat+/
186 {
187     bmdTimecodeRP188VITC1                                        = /* 'rpv1' */ 0x72707631,	// RP188 timecode where DBB1 equals VITC1 (line 9)
188     bmdTimecodeRP188VITC2                                        = /* 'rp12' */ 0x72703132,	// RP188 timecode where DBB1 equals VITC2 (line 571)
189     bmdTimecodeRP188LTC                                          = /* 'rplt' */ 0x72706C74,	// RP188 timecode where DBB1 equals LTC (line 10)
190     bmdTimecodeRP188Any                                          = /* 'rp18' */ 0x72703138,	// For capture: return the first valid timecode in {VITC1, LTC ,VITC2} - For playback: set the timecode as VITC1
191     bmdTimecodeVITC                                              = /* 'vitc' */ 0x76697463,
192     bmdTimecodeVITCField2                                        = /* 'vit2' */ 0x76697432,
193     bmdTimecodeSerial                                            = /* 'seri' */ 0x73657269
194 }
195 alias int	_BMDTimecodeFormat;
196 alias int BMDTimecodeFormat;
197 
198 /* Enum BMDAnalogVideoFlags - Analog video display flags */
199 
200 /+[v1_enum]+/ enum /+	_BMDAnalogVideoFlags+/ : int 
201 {
202     bmdAnalogVideoFlagCompositeSetup75                           = 1 << 0,
203     bmdAnalogVideoFlagComponentBetacamLevels                     = 1 << 1
204 }
205 alias int	_BMDAnalogVideoFlags;
206 
207 /* Enum BMDAudioConnection - Audio connection types */
208 
209 enum 
210 		/+[v1_enum]+/ /+	_BMDAudioConnection+/
211 {
212     bmdAudioConnectionEmbedded                                   = /* 'embd' */ 0x656D6264,
213     bmdAudioConnectionAESEBU                                     = /* 'aes ' */ 0x61657320,
214     bmdAudioConnectionAnalog                                     = /* 'anlg' */ 0x616E6C67,
215     bmdAudioConnectionAnalogXLR                                  = /* 'axlr' */ 0x61786C72,
216     bmdAudioConnectionAnalogRCA                                  = /* 'arca' */ 0x61726361
217 }
218 alias int	_BMDAudioConnection;
219 alias int BMDAudioConnection;
220 
221 /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
222 
223 enum 
224 		/+[v1_enum]+/ /+	_BMDAudioOutputAnalogAESSwitch+/
225 {
226     bmdAudioOutputSwitchAESEBU                                   = /* 'aes ' */ 0x61657320,
227     bmdAudioOutputSwitchAnalog                                   = /* 'anlg' */ 0x616E6C67
228 }
229 alias int	_BMDAudioOutputAnalogAESSwitch;
230 alias int BMDAudioOutputAnalogAESSwitch;
231 
232 /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
233 
234 enum 
235 		/+[v1_enum]+/ /+	_BMDVideoOutputConversionMode+/
236 {
237     bmdNoVideoOutputConversion                                   = /* 'none' */ 0x6E6F6E65,
238     bmdVideoOutputLetterboxDownconversion                        = /* 'ltbx' */ 0x6C746278,
239     bmdVideoOutputAnamorphicDownconversion                       = /* 'amph' */ 0x616D7068,
240     bmdVideoOutputHD720toHD1080Conversion                        = /* '720c' */ 0x37323063,
241     bmdVideoOutputHardwareLetterboxDownconversion                = /* 'HWlb' */ 0x48576C62,
242     bmdVideoOutputHardwareAnamorphicDownconversion               = /* 'HWam' */ 0x4857616D,
243     bmdVideoOutputHardwareCenterCutDownconversion                = /* 'HWcc' */ 0x48576363,
244     bmdVideoOutputHardware720p1080pCrossconversion               = /* 'xcap' */ 0x78636170,
245     bmdVideoOutputHardwareAnamorphic720pUpconversion             = /* 'ua7p' */ 0x75613770,
246     bmdVideoOutputHardwareAnamorphic1080iUpconversion            = /* 'ua1i' */ 0x75613169,
247     bmdVideoOutputHardwareAnamorphic149To720pUpconversion        = /* 'u47p' */ 0x75343770,
248     bmdVideoOutputHardwareAnamorphic149To1080iUpconversion       = /* 'u41i' */ 0x75343169,
249     bmdVideoOutputHardwarePillarbox720pUpconversion              = /* 'up7p' */ 0x75703770,
250     bmdVideoOutputHardwarePillarbox1080iUpconversion             = /* 'up1i' */ 0x75703169
251 }
252 alias int	_BMDVideoOutputConversionMode;
253 alias int BMDVideoOutputConversionMode;
254 
255 /* Enum BMDVideoInputConversionMode - Video input conversion mode */
256 
257 enum 
258 		/+[v1_enum]+/ /+	_BMDVideoInputConversionMode+/
259 {
260     bmdNoVideoInputConversion                                    = /* 'none' */ 0x6E6F6E65,
261     bmdVideoInputLetterboxDownconversionFromHD1080               = /* '10lb' */ 0x31306C62,
262     bmdVideoInputAnamorphicDownconversionFromHD1080              = /* '10am' */ 0x3130616D,
263     bmdVideoInputLetterboxDownconversionFromHD720                = /* '72lb' */ 0x37326C62,
264     bmdVideoInputAnamorphicDownconversionFromHD720               = /* '72am' */ 0x3732616D,
265     bmdVideoInputLetterboxUpconversion                           = /* 'lbup' */ 0x6C627570,
266     bmdVideoInputAnamorphicUpconversion                          = /* 'amup' */ 0x616D7570
267 }
268 alias int	_BMDVideoInputConversionMode;
269 alias int BMDVideoInputConversionMode;
270 
271 /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
272 
273 enum 
274 		/+[v1_enum]+/ /+	_BMDVideo3DPackingFormat+/
275 {
276     bmdVideo3DPackingSidebySideHalf                              = /* 'sbsh' */ 0x73627368,
277     bmdVideo3DPackingLinebyLine                                  = /* 'lbyl' */ 0x6C62796C,
278     bmdVideo3DPackingTopAndBottom                                = /* 'tabo' */ 0x7461626F,
279     bmdVideo3DPackingFramePacking                                = /* 'frpk' */ 0x6672706B,
280     bmdVideo3DPackingLeftOnly                                    = /* 'left' */ 0x6C656674,
281     bmdVideo3DPackingRightOnly                                   = /* 'righ' */ 0x72696768
282 }
283 alias int	_BMDVideo3DPackingFormat;
284 alias int BMDVideo3DPackingFormat;
285 
286 /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
287 
288 enum 
289 		/+[v1_enum]+/ /+	_BMDIdleVideoOutputOperation+/
290 {
291     bmdIdleVideoOutputBlack                                      = /* 'blac' */ 0x626C6163,
292     bmdIdleVideoOutputLastFrame                                  = /* 'lafa' */ 0x6C616661,
293     bmdIdleVideoOutputDesktop                                    = /* 'desk' */ 0x6465736B
294 }
295 alias int	_BMDIdleVideoOutputOperation;
296 alias int BMDIdleVideoOutputOperation;
297 
298 /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
299 
300 enum 
301 		/+[v1_enum]+/ /+	_BMDDeckLinkAttributeID+/
302 {
303 
304     /* Flags */
305 
306     BMDDeckLinkSupportsInternalKeying                            = /* 'keyi' */ 0x6B657969,
307     BMDDeckLinkSupportsExternalKeying                            = /* 'keye' */ 0x6B657965,
308     BMDDeckLinkSupportsHDKeying                                  = /* 'keyh' */ 0x6B657968,
309     BMDDeckLinkSupportsInputFormatDetection                      = /* 'infd' */ 0x696E6664,
310     BMDDeckLinkHasReferenceInput                                 = /* 'hrin' */ 0x6872696E,
311     BMDDeckLinkHasSerialPort                                     = /* 'hspt' */ 0x68737074,
312     BMDDeckLinkHasAnalogVideoOutputGain                          = /* 'avog' */ 0x61766F67,
313     BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain               = /* 'ovog' */ 0x6F766F67,
314     BMDDeckLinkHasVideoInputAntiAliasingFilter                   = /* 'aafl' */ 0x6161666C,
315     BMDDeckLinkHasBypass                                         = /* 'byps' */ 0x62797073,
316     BMDDeckLinkSupportsDesktopDisplay                            = /* 'extd' */ 0x65787464,
317     BMDDeckLinkSupportsClockTimingAdjustment                     = /* 'ctad' */ 0x63746164,
318 
319     /* Integers */
320 
321     BMDDeckLinkMaximumAudioChannels                              = /* 'mach' */ 0x6D616368,
322     BMDDeckLinkNumberOfSubDevices                                = /* 'nsbd' */ 0x6E736264,
323     BMDDeckLinkSubDeviceIndex                                    = /* 'subi' */ 0x73756269,
324     BMDDeckLinkVideoOutputConnections                            = /* 'vocn' */ 0x766F636E,
325     BMDDeckLinkVideoInputConnections                             = /* 'vicn' */ 0x7669636E,
326     BMDDeckLinkDeviceBusyState                                   = /* 'dbst' */ 0x64627374,
327     BMDDeckLinkVideoIOSupport                                    = /* 'vios' */ 0x76696F73,	// Returns a BMDVideoIOSupport bit field
328 
329     /* Floats */
330 
331     BMDDeckLinkVideoInputGainMinimum                             = /* 'vigm' */ 0x7669676D,
332     BMDDeckLinkVideoInputGainMaximum                             = /* 'vigx' */ 0x76696778,
333     BMDDeckLinkVideoOutputGainMinimum                            = /* 'vogm' */ 0x766F676D,
334     BMDDeckLinkVideoOutputGainMaximum                            = /* 'vogx' */ 0x766F6778,
335 
336     /* Strings */
337 
338     BMDDeckLinkSerialPortDeviceName                              = /* 'slpn' */ 0x736C706E
339 }
340 alias int	_BMDDeckLinkAttributeID;
341 alias int BMDDeckLinkAttributeID;
342 
343 /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
344 
345 enum 
346 		/+[v1_enum]+/ /+	_BMDDeckLinkAPIInformationID+/
347 {
348     BMDDeckLinkAPIVersion                                        = /* 'vers' */ 0x76657273
349 }
350 alias int	_BMDDeckLinkAPIInformationID;
351 alias int BMDDeckLinkAPIInformationID;
352 
353 /* Enum BMDDeviceBusyState - Current device busy state */
354 
355 /+[v1_enum]+/ enum /+	_BMDDeviceBusyState+/ : int 
356 {
357     bmdDeviceCaptureBusy                                         = 1 << 0,
358     bmdDevicePlaybackBusy                                        = 1 << 1,
359     bmdDeviceSerialPortBusy                                      = 1 << 2
360 }
361 alias int	_BMDDeviceBusyState;
362 
363 /* Enum BMDVideoIOSupport - Device video input/output support */
364 
365 enum 
366 		/+[v1_enum]+/ /+	_BMDVideoIOSupport+/
367 {
368     bmdDeviceSupportsCapture                                     = 1 << 0,
369     bmdDeviceSupportsPlayback                                    = 1 << 1
370 }
371 alias int	_BMDVideoIOSupport;
372 alias int BMDVideoIOSupport;
373 
374 /* Enum BMD3DPreviewFormat - Linked Frame preview format */
375 
376 enum 
377 		/+[v1_enum]+/ /+	_BMD3DPreviewFormat+/
378 {
379     bmd3DPreviewFormatDefault                                    = /* 'defa' */ 0x64656661,
380     bmd3DPreviewFormatLeftOnly                                   = /* 'left' */ 0x6C656674,
381     bmd3DPreviewFormatRightOnly                                  = /* 'righ' */ 0x72696768,
382     bmd3DPreviewFormatSideBySide                                 = /* 'side' */ 0x73696465,
383     bmd3DPreviewFormatTopBottom                                  = /* 'topb' */ 0x746F7062
384 }
385 alias int	_BMD3DPreviewFormat;
386 alias int BMD3DPreviewFormat;
387 
388 /* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
389 
390 enum 
391 		/+[v1_enum]+/ /+	_BMDNotifications+/
392 {
393     bmdPreferencesChanged                                        = /* 'pref' */ 0x70726566
394 }
395 alias int	_BMDNotifications;
396 alias int BMDNotifications;
397 
398 // Forward Declarations
399 
400 /+ interface IDeckLinkVideoOutputCallback; +/
401 /+ interface IDeckLinkInputCallback; +/
402 /+ interface IDeckLinkMemoryAllocator; +/
403 /+ interface IDeckLinkAudioOutputCallback; +/
404 /+ interface IDeckLinkIterator; +/
405 /+ interface IDeckLinkAPIInformation; +/
406 /+ interface IDeckLinkOutput; +/
407 /+ interface IDeckLinkInput; +/
408 /+ interface IDeckLinkVideoFrame; +/
409 /+ interface IDeckLinkMutableVideoFrame; +/
410 /+ interface IDeckLinkVideoFrame3DExtensions; +/
411 /+ interface IDeckLinkVideoInputFrame; +/
412 /+ interface IDeckLinkVideoFrameAncillary; +/
413 /+ interface IDeckLinkAudioInputPacket; +/
414 /+ interface IDeckLinkScreenPreviewCallback; +/
415 /+ interface IDeckLinkGLScreenPreviewHelper; +/
416 /+ interface IDeckLinkDX9ScreenPreviewHelper; +/
417 /+ interface IDeckLinkNotificationCallback; +/
418 /+ interface IDeckLinkNotification; +/
419 /+ interface IDeckLinkAttributes; +/
420 /+ interface IDeckLinkKeyer; +/
421 /+ interface IDeckLinkVideoConversion; +/
422 
423 /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
424 
425 const GUID IID_IDeckLinkVideoOutputCallback = IDeckLinkVideoOutputCallback.iid;
426 
427 interface IDeckLinkVideoOutputCallback : IUnknown
428 {
429 extern(System):
430     static const GUID iid = { 0x20AA5225,0x1958,0x47CB,[ 0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE ] };
431     HRESULT ScheduledFrameCompleted(/+[in]+/ IDeckLinkVideoFrame completedFrame, in BMDOutputFrameCompletionResult result);
432     HRESULT ScheduledPlaybackHasStopped();
433 };
434 
435 /* Interface IDeckLinkInputCallback - Frame arrival callback. */
436 
437 const GUID IID_IDeckLinkInputCallback = IDeckLinkInputCallback.iid;
438 
439 interface IDeckLinkInputCallback : IUnknown
440 {
441 extern(System):
442     static const GUID iid = { 0xDD04E5EC,0x7415,0x42AB,[ 0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A ] };
443     HRESULT VideoInputFormatChanged(in BMDVideoInputFormatChangedEvents notificationEvents, /+[in]+/ IDeckLinkDisplayMode newDisplayMode, in BMDDetectedVideoInputFormatFlags detectedSignalFlags);
444     HRESULT VideoInputFrameArrived(/+[in]+/ IDeckLinkVideoInputFrame videoFrame, /+[in]+/ IDeckLinkAudioInputPacket audioPacket);
445 };
446 
447 /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
448 
449 const GUID IID_IDeckLinkMemoryAllocator = IDeckLinkMemoryAllocator.iid;
450 
451 interface IDeckLinkMemoryAllocator : IUnknown
452 {
453 extern(System):
454     static const GUID iid = { 0xB36EB6E7,0x9D29,0x4AA8,[ 0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8 ] };
455     HRESULT AllocateBuffer(in uint bufferSize, 
456 		/+[out]+/ void **allocatedBuffer);
457     HRESULT ReleaseBuffer(in void *buffer);
458 
459     HRESULT Commit();
460     HRESULT Decommit();
461 };
462 
463 /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
464 
465 const GUID IID_IDeckLinkAudioOutputCallback = IDeckLinkAudioOutputCallback.iid;
466 
467 interface IDeckLinkAudioOutputCallback : IUnknown
468 {
469 extern(System):
470     static const GUID iid = { 0x403C681B,0x7F46,0x4A12,[ 0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6 ] };
471     HRESULT RenderAudioSamples(in BOOL preroll);
472 };
473 
474 /* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */
475 
476 const GUID IID_IDeckLinkIterator = IDeckLinkIterator.iid;
477 
478 interface IDeckLinkIterator : IUnknown
479 {
480 extern(System):
481     static const GUID iid = { 0x50FB36CD,0x3063,0x4B73,[ 0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA ] };
482     HRESULT Next(/+[out]+/ IDeckLink *deckLinkInstance);
483 };
484 
485 /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
486 
487 const GUID IID_IDeckLinkAPIInformation = IDeckLinkAPIInformation.iid;
488 
489 interface IDeckLinkAPIInformation : IUnknown
490 {
491 extern(System):
492     static const GUID iid = { 0x7BEA3C68,0x730D,0x4322,[ 0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4 ] };
493     HRESULT GetFlag(in BMDDeckLinkAPIInformationID cfgID, 
494 		/+[out]+/ BOOL *value);
495     HRESULT GetInt(in BMDDeckLinkAPIInformationID cfgID, 
496 		/+[out]+/ LONGLONG *value);
497     HRESULT GetFloat(in BMDDeckLinkAPIInformationID cfgID, 
498 		/+[out]+/ double *value);
499     HRESULT GetString(in BMDDeckLinkAPIInformationID cfgID, 
500 		/+[out]+/ BMDSTR *value);
501 };
502 
503 /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
504 
505 const GUID IID_IDeckLinkOutput = IDeckLinkOutput.iid;
506 
507 interface IDeckLinkOutput : IUnknown
508 {
509 extern(System):
510     static const GUID iid = { 0xA3EF0963,0x0862,0x44ED,[ 0x92,0xA9,0xEE,0x89,0xAB,0xF4,0x31,0xC7 ] };
511     HRESULT DoesSupportVideoMode(in BMDDisplayMode displayMode, in BMDPixelFormat pixelFormat, in BMDVideoOutputFlags flags, 
512 		/+[out]+/ BMDDisplayModeSupport *result, 
513 		/+[out]+/ IDeckLinkDisplayMode *resultDisplayMode);
514     HRESULT GetDisplayModeIterator(/+[out]+/ IDeckLinkDisplayModeIterator *iterator);
515 
516     HRESULT SetScreenPreviewCallback(/+[in]+/ IDeckLinkScreenPreviewCallback previewCallback);
517 
518     /* Video Output */
519 
520     HRESULT EnableVideoOutput(in BMDDisplayMode displayMode, in BMDVideoOutputFlags flags);
521     HRESULT DisableVideoOutput();
522 
523     HRESULT SetVideoOutputFrameMemoryAllocator(/+[in]+/ IDeckLinkMemoryAllocator theAllocator);
524     HRESULT CreateVideoFrame(in int width, in int height, in int rowBytes, in BMDPixelFormat pixelFormat, in BMDFrameFlags flags, 
525 		/+[out]+/ IDeckLinkMutableVideoFrame *outFrame);
526     HRESULT CreateAncillaryData(in BMDPixelFormat pixelFormat, 
527 		/+[out]+/ IDeckLinkVideoFrameAncillary *outBuffer);
528 
529     HRESULT DisplayVideoFrameSync(/+[in]+/ IDeckLinkVideoFrame theFrame);
530     HRESULT ScheduleVideoFrame(/+[in]+/ IDeckLinkVideoFrame theFrame, in BMDTimeValue displayTime, in BMDTimeValue displayDuration, in BMDTimeScale timeScale);
531     HRESULT SetScheduledFrameCompletionCallback(/+[in]+/ IDeckLinkVideoOutputCallback theCallback);
532     HRESULT GetBufferedVideoFrameCount(/+[out]+/ uint *bufferedFrameCount);
533 
534     /* Audio Output */
535 
536     HRESULT EnableAudioOutput(in BMDAudioSampleRate sampleRate, in BMDAudioSampleType sampleType, in uint channelCount, in BMDAudioOutputStreamType streamType);
537     HRESULT DisableAudioOutput();
538 
539     HRESULT WriteAudioSamplesSync(in void *buffer, in uint sampleFrameCount, 
540 		/+[out]+/ uint *sampleFramesWritten);
541 
542     HRESULT BeginAudioPreroll();
543     HRESULT EndAudioPreroll();
544     HRESULT ScheduleAudioSamples(in void *buffer, in uint sampleFrameCount, in BMDTimeValue streamTime, in BMDTimeScale timeScale, 
545 		/+[out]+/ uint *sampleFramesWritten);
546 
547     HRESULT GetBufferedAudioSampleFrameCount(/+[out]+/ uint *bufferedSampleFrameCount);
548     HRESULT FlushBufferedAudioSamples();
549 
550     HRESULT SetAudioCallback(/+[in]+/ IDeckLinkAudioOutputCallback theCallback);
551 
552     /* Output Control */
553 
554     HRESULT StartScheduledPlayback(in BMDTimeValue playbackStartTime, in BMDTimeScale timeScale, in double playbackSpeed);
555     HRESULT StopScheduledPlayback(in BMDTimeValue stopPlaybackAtTime, 
556 		/+[out]+/ BMDTimeValue *actualStopTime, in BMDTimeScale timeScale);
557     HRESULT IsScheduledPlaybackRunning(/+[out]+/ BOOL *active);
558     HRESULT GetScheduledStreamTime(in BMDTimeScale desiredTimeScale, 
559 		/+[out]+/ BMDTimeValue *streamTime, 
560 		/+[out]+/ double *playbackSpeed);
561     HRESULT GetReferenceStatus(/+[out]+/ BMDReferenceStatus *referenceStatus);
562 
563     /* Hardware Timing */
564 
565     HRESULT GetHardwareReferenceClock(in BMDTimeScale desiredTimeScale, 
566 		/+[out]+/ BMDTimeValue *hardwareTime, 
567 		/+[out]+/ BMDTimeValue *timeInFrame, 
568 		/+[out]+/ BMDTimeValue *ticksPerFrame);
569 };
570 
571 /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
572 
573 const GUID IID_IDeckLinkInput = IDeckLinkInput.iid;
574 
575 interface IDeckLinkInput : IUnknown
576 {
577 extern(System):
578     static const GUID iid = { 0xAF22762B,0xDFAC,0x4846,[ 0xAA,0x79,0xFA,0x88,0x83,0x56,0x09,0x95 ] };
579     HRESULT DoesSupportVideoMode(in BMDDisplayMode displayMode, in BMDPixelFormat pixelFormat, in BMDVideoInputFlags flags, 
580 		/+[out]+/ BMDDisplayModeSupport *result, 
581 		/+[out]+/ IDeckLinkDisplayMode *resultDisplayMode);
582     HRESULT GetDisplayModeIterator(/+[out]+/ IDeckLinkDisplayModeIterator *iterator);
583 
584     HRESULT SetScreenPreviewCallback(/+[in]+/ IDeckLinkScreenPreviewCallback previewCallback);
585 
586     /* Video Input */
587 
588     HRESULT EnableVideoInput(in BMDDisplayMode displayMode, in BMDPixelFormat pixelFormat, in BMDVideoInputFlags flags);
589     HRESULT DisableVideoInput();
590     HRESULT GetAvailableVideoFrameCount(/+[out]+/ uint *availableFrameCount);
591     HRESULT SetVideoInputFrameMemoryAllocator(/+[in]+/ IDeckLinkMemoryAllocator theAllocator);
592 
593     /* Audio Input */
594 
595     HRESULT EnableAudioInput(in BMDAudioSampleRate sampleRate, in BMDAudioSampleType sampleType, in uint channelCount);
596     HRESULT DisableAudioInput();
597     HRESULT GetAvailableAudioSampleFrameCount(/+[out]+/ uint *availableSampleFrameCount);
598 
599     /* Input Control */
600 
601     HRESULT StartStreams();
602     HRESULT StopStreams();
603     HRESULT PauseStreams();
604     HRESULT FlushStreams();
605     HRESULT SetCallback(/+[in]+/ IDeckLinkInputCallback theCallback);
606 
607     /* Hardware Timing */
608 
609     HRESULT GetHardwareReferenceClock(in BMDTimeScale desiredTimeScale, 
610 		/+[out]+/ BMDTimeValue *hardwareTime, 
611 		/+[out]+/ BMDTimeValue *timeInFrame, 
612 		/+[out]+/ BMDTimeValue *ticksPerFrame);
613 };
614 
615 /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
616 
617 const GUID IID_IDeckLinkVideoFrame = IDeckLinkVideoFrame.iid;
618 
619 interface IDeckLinkVideoFrame : IUnknown
620 {
621 extern(System):
622     static const GUID iid = { 0x3F716FE0,0xF023,0x4111,[ 0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17 ] };
623     int GetWidth();
624     int GetHeight();
625     int GetRowBytes();
626     BMDPixelFormat GetPixelFormat();
627     BMDFrameFlags GetFlags();
628     HRESULT GetBytes(/+[out]+/ void **buffer);
629 
630     HRESULT GetTimecode(in BMDTimecodeFormat format, 
631 		/+[out]+/ IDeckLinkTimecode *timecode);
632     HRESULT GetAncillaryData(/+[out]+/ IDeckLinkVideoFrameAncillary *ancillary);
633 };
634 
635 /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
636 
637 const GUID IID_IDeckLinkMutableVideoFrame = IDeckLinkMutableVideoFrame.iid;
638 
639 interface IDeckLinkMutableVideoFrame : IDeckLinkVideoFrame
640 {
641     static const GUID iid = { 0x69E2639F,0x40DA,0x4E19,[ 0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90 ] };
642     HRESULT SetFlags(in BMDFrameFlags newFlags);
643 
644     HRESULT SetTimecode(in BMDTimecodeFormat format, /+[in]+/ IDeckLinkTimecode timecode);
645     HRESULT SetTimecodeFromComponents(in BMDTimecodeFormat format, in ubyte hours, in ubyte minutes, in ubyte seconds, in ubyte frames, in BMDTimecodeFlags flags);
646     HRESULT SetAncillaryData(/+[in]+/ IDeckLinkVideoFrameAncillary ancillary);
647     HRESULT SetTimecodeUserBits(in BMDTimecodeFormat format, in BMDTimecodeUserBits userBits);
648 };
649 
650 /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
651 
652 const GUID IID_IDeckLinkVideoFrame3DExtensions = IDeckLinkVideoFrame3DExtensions.iid;
653 
654 interface IDeckLinkVideoFrame3DExtensions : IUnknown
655 {
656 extern(System):
657     static const GUID iid = { 0xDA0F7E4A,0xEDC7,0x48A8,[ 0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7 ] };
658     BMDVideo3DPackingFormat Get3DPackingFormat();
659     HRESULT GetFrameForRightEye(/+[out]+/ IDeckLinkVideoFrame *rightEyeFrame);
660 };
661 
662 /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
663 
664 const GUID IID_IDeckLinkVideoInputFrame = IDeckLinkVideoInputFrame.iid;
665 
666 interface IDeckLinkVideoInputFrame : IDeckLinkVideoFrame
667 {
668     static const GUID iid = { 0x05CFE374,0x537C,0x4094,[ 0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44 ] };
669     HRESULT GetStreamTime(/+[out]+/ BMDTimeValue *frameTime, 
670 		/+[out]+/ BMDTimeValue *frameDuration, in BMDTimeScale timeScale);
671     HRESULT GetHardwareReferenceTimestamp(in BMDTimeScale timeScale, 
672 		/+[out]+/ BMDTimeValue *frameTime, 
673 		/+[out]+/ BMDTimeValue *frameDuration);
674 };
675 
676 /* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
677 
678 const GUID IID_IDeckLinkVideoFrameAncillary = IDeckLinkVideoFrameAncillary.iid;
679 
680 interface IDeckLinkVideoFrameAncillary : IUnknown
681 {
682 extern(System):
683     static const GUID iid = { 0x732E723C,0xD1A4,0x4E29,[ 0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04 ] };
684 
685     HRESULT GetBufferForVerticalBlankingLine(in uint lineNumber, 
686 		/+[out]+/ void **buffer);
687     BMDPixelFormat GetPixelFormat();
688     BMDDisplayMode GetDisplayMode();
689 };
690 
691 /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
692 
693 const GUID IID_IDeckLinkAudioInputPacket = IDeckLinkAudioInputPacket.iid;
694 
695 interface IDeckLinkAudioInputPacket : IUnknown
696 {
697 extern(System):
698     static const GUID iid = { 0xE43D5870,0x2894,0x11DE,[ 0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66 ] };
699     int GetSampleFrameCount();
700     HRESULT GetBytes(/+[out]+/ void **buffer);
701     HRESULT GetPacketTime(/+[out]+/ BMDTimeValue *packetTime, in BMDTimeScale timeScale);
702 };
703 
704 /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
705 
706 const GUID IID_IDeckLinkScreenPreviewCallback = IDeckLinkScreenPreviewCallback.iid;
707 
708 interface IDeckLinkScreenPreviewCallback : IUnknown
709 {
710 extern(System):
711     static const GUID iid = { 0xB1D3F49A,0x85FE,0x4C5D,[ 0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38 ] };
712     HRESULT DrawFrame(/+[in]+/ IDeckLinkVideoFrame theFrame);
713 };
714 
715 /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
716 
717 const GUID IID_IDeckLinkGLScreenPreviewHelper = IDeckLinkGLScreenPreviewHelper.iid;
718 
719 interface IDeckLinkGLScreenPreviewHelper : IUnknown
720 {
721 extern(System):
722     static const GUID iid = { 0x504E2209,0xCAC7,0x4C1A,[ 0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F ] };
723 
724     /* Methods must be called with OpenGL context set */
725 
726     HRESULT InitializeGL();
727     HRESULT PaintGL();
728     HRESULT SetFrame(/+[in]+/ IDeckLinkVideoFrame theFrame);
729     HRESULT Set3DPreviewFormat(in BMD3DPreviewFormat previewFormat);
730 };
731 
732 version (Windows)
733 {
734 	/* Interface IDeckLinkDX9ScreenPreviewHelper - Created with CoCreateInstance(). */
735 
736 	const GUID IID_IDeckLinkDX9ScreenPreviewHelper = IDeckLinkDX9ScreenPreviewHelper.iid;
737 
738 	interface IDeckLinkDX9ScreenPreviewHelper : IUnknown
739 	{
740 	extern(System):
741 		static const GUID iid = { 0x2094B522,0xD1A1,0x40C0,[ 0x9A,0xC7,0x1C,0x01,0x22,0x18,0xEF,0x02 ] };
742 		HRESULT Initialize(in void *device);
743 		HRESULT Render(in RECT *rc);
744 		HRESULT SetFrame(/+[in]+/ IDeckLinkVideoFrame theFrame);
745 		HRESULT Set3DPreviewFormat(in BMD3DPreviewFormat previewFormat);
746 	};
747 }
748 
749 version (OSX)
750 {
751 	const GUID IID_IDeckLinkCocoaScreenPreviewCallback = IDeckLinkCocoaScreenPreviewCallback.iid;
752 	
753 	interface IDeckLinkCocoaScreenPreviewCallback : IDeckLinkScreenPreviewCallback
754 	{
755 		static const GUID iid = { 0xD174152F,0x8F96,0x4C07,[0x83,0xA5,0xDD,0x5F,0x5A,0xF0,0xA2,0xAA] };
756 	}
757 }
758 
759 
760 /* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
761 
762 const GUID IID_IDeckLinkNotificationCallback = IDeckLinkNotificationCallback.iid;
763 
764 interface IDeckLinkNotificationCallback : IUnknown
765 {
766 extern(System):
767     static const GUID iid = { 0xb002a1ec,0x070d,0x4288,[ 0x82,0x89,0xbd,0x5d,0x36,0xe5,0xff,0x0d ] };
768     HRESULT Notify(in BMDNotifications topic, in ULONGLONG param1, in ULONGLONG param2);
769 };
770 
771 /* Interface IDeckLinkNotification - DeckLink Notification interface */
772 
773 const GUID IID_IDeckLinkNotification = IDeckLinkNotification.iid;
774 
775 interface IDeckLinkNotification : IUnknown
776 {
777 extern(System):
778     static const GUID iid = { 0x0a1fb207,0xe215,0x441b,[ 0x9b,0x19,0x6f,0xa1,0x57,0x59,0x46,0xc5 ] };
779     HRESULT Subscribe(in BMDNotifications topic, /+[in]+/ IDeckLinkNotificationCallback theCallback);
780     HRESULT Unsubscribe(in BMDNotifications topic, /+[in]+/ IDeckLinkNotificationCallback theCallback);
781 };
782 
783 /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
784 
785 const GUID IID_IDeckLinkAttributes = IDeckLinkAttributes.iid;
786 
787 interface IDeckLinkAttributes : IUnknown
788 {
789 extern(System):
790     static const GUID iid = { 0xABC11843,0xD966,0x44CB,[ 0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4 ] };
791     HRESULT GetFlag(in BMDDeckLinkAttributeID cfgID, 
792 		/+[out]+/ BOOL *value);
793     HRESULT GetInt(in BMDDeckLinkAttributeID cfgID, 
794 		/+[out]+/ LONGLONG *value);
795     HRESULT GetFloat(in BMDDeckLinkAttributeID cfgID, 
796 		/+[out]+/ double *value);
797     HRESULT GetString(in BMDDeckLinkAttributeID cfgID, 
798 		/+[out]+/ BMDSTR *value);
799 };
800 
801 /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
802 
803 const GUID IID_IDeckLinkKeyer = IDeckLinkKeyer.iid;
804 
805 interface IDeckLinkKeyer : IUnknown
806 {
807 extern(System):
808     static const GUID iid = { 0x89AFCAF5,0x65F8,0x421E,[ 0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3 ] };
809     HRESULT Enable(in BOOL isExternal);
810     HRESULT SetLevel(in ubyte level);
811     HRESULT RampUp(in uint numberOfFrames);
812     HRESULT RampDown(in uint numberOfFrames);
813     HRESULT Disable();
814 };
815 
816 /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
817 
818 const GUID IID_IDeckLinkVideoConversion = IDeckLinkVideoConversion.iid;
819 
820 interface IDeckLinkVideoConversion : IUnknown
821 {
822 extern(System):
823     static const GUID iid = { 0x3BBCB8A2,0xDA2C,0x42D9,[ 0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A ] };
824     HRESULT ConvertFrame(/+[in]+/ IDeckLinkVideoFrame srcFrame, /+[in]+/ IDeckLinkVideoFrame dstFrame);
825 };
826 
827 const GUID CLSID_CDeckLinkIterator = CDeckLinkIterator.iid;
828 
829 interface CDeckLinkIterator
830 {
831     static const GUID iid = { 0x1F2E109A,0x8F4F,0x49E4,[ 0x92,0x03,0x13,0x55,0x95,0xCB,0x6F,0xA5 ] };
832     /+
833 		/+[default]+/+/ /+ interface IDeckLinkIterator; +/
834 };
835 
836 const GUID CLSID_CDeckLinkAPIInformation = CDeckLinkAPIInformation.iid;
837 
838 interface CDeckLinkAPIInformation
839 {
840     static const GUID iid = { 0x263CA19F,0xED09,0x482E,[ 0x9F,0x9D,0x84,0x00,0x57,0x83,0xA2,0x37 ] };
841     /+
842 		/+[default]+/+/ /+ interface IDeckLinkAPIInformation; +/
843 };
844 
845 const GUID CLSID_CDeckLinkGLScreenPreviewHelper = CDeckLinkGLScreenPreviewHelper.iid;
846 
847 interface CDeckLinkGLScreenPreviewHelper
848 {
849     static const GUID iid = { 0xF63E77C7,0xB655,0x4A4A,[ 0x9A,0xD0,0x3C,0xA8,0x5D,0x39,0x43,0x43 ] };
850     /+
851 		/+[default]+/+/ /+ interface IDeckLinkGLScreenPreviewHelper; +/
852 };
853 
854 const GUID CLSID_CDeckLinkDX9ScreenPreviewHelper = CDeckLinkDX9ScreenPreviewHelper.iid;
855 
856 interface CDeckLinkDX9ScreenPreviewHelper
857 {
858     static const GUID iid = { 0xCC010023,0xE01D,0x4525,[ 0x9D,0x59,0x80,0xC8,0xAB,0x3D,0xC7,0xA0 ] };
859     /+
860 		/+[default]+/+/ /+ interface IDeckLinkDX9ScreenPreviewHelper; +/
861 };
862 
863 const GUID CLSID_CDeckLinkVideoConversion = CDeckLinkVideoConversion.iid;
864 
865 interface CDeckLinkVideoConversion
866 {
867     static const GUID iid = { 0x7DBBBB11,0x5B7B,0x467D,[ 0xAE,0xA4,0xCE,0xA4,0x68,0xFD,0x36,0x8C ] };
868     /+
869 		/+[default]+/+/ /+ interface IDeckLinkVideoConversion; +/
870 };