1 // File generated by idl2d from 2 // ../DeckLinkAPIStreaming.idl 3 module decklink4d.bmd.decklinkapistreaming; 4 5 import decklink4d.port; 6 import decklink4d.bmd.decklinkapi; 7 8 /* -LICENSE-START- 9 ** Copyright (c) 2013 Blackmagic Design 10 ** 11 ** Permission is hereby granted, free of charge, to any person or organization 12 ** obtaining a copy of the software and accompanying documentation covered by 13 ** this license (the "Software") to use, reproduce, display, distribute, 14 ** execute, and transmit the Software, and to prepare derivative works of the 15 ** Software, and to permit third-parties to whom the Software is furnished to 16 ** do so, all subject to the following: 17 ** 18 ** The copyright notices in the Software and this entire statement, including 19 ** the above license grant, this restriction and the following disclaimer, 20 ** must be included in all copies of the Software, in whole or in part, and 21 ** all derivative works of the Software, unless such copies or derivative 22 ** works are solely in the form of machine-executable object code generated by 23 ** a source language processor. 24 ** 25 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 28 ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 29 ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 30 ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 31 ** DEALINGS IN THE SOFTWARE. 32 ** -LICENSE-END- 33 */ 34 35 /* Enum BMDStreamingDeviceMode - Device modes */ 36 37 enum 38 /+[v1_enum]+/ /+ _BMDStreamingDeviceMode+/ 39 { 40 bmdStreamingDeviceIdle = /* 'idle' */ 0x69646C65, 41 bmdStreamingDeviceEncoding = /* 'enco' */ 0x656E636F, 42 bmdStreamingDeviceStopping = /* 'stop' */ 0x73746F70, 43 bmdStreamingDeviceUnknown = /* 'munk' */ 0x6D756E6B 44 } 45 alias int _BMDStreamingDeviceMode; 46 alias int BMDStreamingDeviceMode; 47 48 /* Enum BMDStreamingEncodingFrameRate - Encoded frame rates */ 49 50 enum 51 /+[v1_enum]+/ /+ _BMDStreamingEncodingFrameRate+/ 52 { 53 54 /* Interlaced rates */ 55 56 bmdStreamingEncodedFrameRate50i = /* 'e50i' */ 0x65353069, 57 bmdStreamingEncodedFrameRate5994i = /* 'e59i' */ 0x65353969, 58 bmdStreamingEncodedFrameRate60i = /* 'e60i' */ 0x65363069, 59 60 /* Progressive rates */ 61 62 bmdStreamingEncodedFrameRate2398p = /* 'e23p' */ 0x65323370, 63 bmdStreamingEncodedFrameRate24p = /* 'e24p' */ 0x65323470, 64 bmdStreamingEncodedFrameRate25p = /* 'e25p' */ 0x65323570, 65 bmdStreamingEncodedFrameRate2997p = /* 'e29p' */ 0x65323970, 66 bmdStreamingEncodedFrameRate30p = /* 'e30p' */ 0x65333070, 67 bmdStreamingEncodedFrameRate50p = /* 'e50p' */ 0x65353070, 68 bmdStreamingEncodedFrameRate5994p = /* 'e59p' */ 0x65353970, 69 bmdStreamingEncodedFrameRate60p = /* 'e60p' */ 0x65363070 70 } 71 alias int _BMDStreamingEncodingFrameRate; 72 alias int BMDStreamingEncodingFrameRate; 73 74 /* Enum BMDStreamingEncodingSupport - Output encoding mode supported flag */ 75 76 enum 77 /+[v1_enum]+/ /+ _BMDStreamingEncodingSupport+/ 78 { 79 bmdStreamingEncodingModeNotSupported = 0, 80 bmdStreamingEncodingModeSupported, 81 bmdStreamingEncodingModeSupportedWithChanges 82 } 83 alias int _BMDStreamingEncodingSupport; 84 alias int BMDStreamingEncodingSupport; 85 86 /* Enum BMDStreamingVideoCodec - Video codecs */ 87 88 enum 89 /+[v1_enum]+/ /+ _BMDStreamingVideoCodec+/ 90 { 91 bmdStreamingVideoCodecH264 = /* 'H264' */ 0x48323634 92 } 93 alias int _BMDStreamingVideoCodec; 94 alias int BMDStreamingVideoCodec; 95 96 /* Enum BMDStreamingH264Profile - H264 encoding profile */ 97 98 enum 99 /+[v1_enum]+/ /+ _BMDStreamingH264Profile+/ 100 { 101 bmdStreamingH264ProfileHigh = /* 'high' */ 0x68696768, 102 bmdStreamingH264ProfileMain = /* 'main' */ 0x6D61696E, 103 bmdStreamingH264ProfileBaseline = /* 'base' */ 0x62617365 104 } 105 alias int _BMDStreamingH264Profile; 106 alias int BMDStreamingH264Profile; 107 108 /* Enum BMDStreamingH264Level - H264 encoding level */ 109 110 enum 111 /+[v1_enum]+/ /+ _BMDStreamingH264Level+/ 112 { 113 bmdStreamingH264Level12 = /* 'lv12' */ 0x6C763132, 114 bmdStreamingH264Level13 = /* 'lv13' */ 0x6C763133, 115 bmdStreamingH264Level2 = /* 'lv2 ' */ 0x6C763220, 116 bmdStreamingH264Level21 = /* 'lv21' */ 0x6C763231, 117 bmdStreamingH264Level22 = /* 'lv22' */ 0x6C763232, 118 bmdStreamingH264Level3 = /* 'lv3 ' */ 0x6C763320, 119 bmdStreamingH264Level31 = /* 'lv31' */ 0x6C763331, 120 bmdStreamingH264Level32 = /* 'lv32' */ 0x6C763332, 121 bmdStreamingH264Level4 = /* 'lv4 ' */ 0x6C763420, 122 bmdStreamingH264Level41 = /* 'lv41' */ 0x6C763431, 123 bmdStreamingH264Level42 = /* 'lv42' */ 0x6C763432 124 } 125 alias int _BMDStreamingH264Level; 126 alias int BMDStreamingH264Level; 127 128 /* Enum BMDStreamingH264EntropyCoding - H264 entropy coding */ 129 130 enum 131 /+[v1_enum]+/ /+ _BMDStreamingH264EntropyCoding+/ 132 { 133 bmdStreamingH264EntropyCodingCAVLC = /* 'EVLC' */ 0x45564C43, 134 bmdStreamingH264EntropyCodingCABAC = /* 'EBAC' */ 0x45424143 135 } 136 alias int _BMDStreamingH264EntropyCoding; 137 alias int BMDStreamingH264EntropyCoding; 138 139 /* Enum BMDStreamingAudioCodec - Audio codecs */ 140 141 enum 142 /+[v1_enum]+/ /+ _BMDStreamingAudioCodec+/ 143 { 144 bmdStreamingAudioCodecAAC = /* 'AAC ' */ 0x41414320 145 } 146 alias int _BMDStreamingAudioCodec; 147 alias int BMDStreamingAudioCodec; 148 149 /* Enum BMDStreamingEncodingModePropertyID - Encoding mode properties */ 150 151 enum 152 /+[v1_enum]+/ /+ _BMDStreamingEncodingModePropertyID+/ 153 { 154 155 /* Integers, Video Properties */ 156 157 bmdStreamingEncodingPropertyVideoFrameRate = /* 'vfrt' */ 0x76667274, // Uses values of type BMDStreamingEncodingFrameRate 158 bmdStreamingEncodingPropertyVideoBitRateKbps = /* 'vbrt' */ 0x76627274, 159 160 /* Integers, H264 Properties */ 161 162 bmdStreamingEncodingPropertyH264Profile = /* 'hprf' */ 0x68707266, 163 bmdStreamingEncodingPropertyH264Level = /* 'hlvl' */ 0x686C766C, 164 bmdStreamingEncodingPropertyH264EntropyCoding = /* 'hent' */ 0x68656E74, 165 166 /* Flags, H264 Properties */ 167 168 bmdStreamingEncodingPropertyH264HasBFrames = /* 'hBfr' */ 0x68426672, 169 170 /* Integers, Audio Properties */ 171 172 bmdStreamingEncodingPropertyAudioCodec = /* 'acdc' */ 0x61636463, 173 bmdStreamingEncodingPropertyAudioSampleRate = /* 'asrt' */ 0x61737274, 174 bmdStreamingEncodingPropertyAudioChannelCount = /* 'achc' */ 0x61636863, 175 bmdStreamingEncodingPropertyAudioBitRateKbps = /* 'abrt' */ 0x61627274 176 } 177 alias int _BMDStreamingEncodingModePropertyID; 178 alias int BMDStreamingEncodingModePropertyID; 179 180 // Forward Declarations 181 182 /+ interface IBMDStreamingDeviceNotificationCallback; +/ 183 /+ interface IBMDStreamingH264InputCallback; +/ 184 /+ interface IBMDStreamingDiscovery; +/ 185 /+ interface IBMDStreamingVideoEncodingMode; +/ 186 /+ interface IBMDStreamingMutableVideoEncodingMode; +/ 187 /+ interface IBMDStreamingVideoEncodingModePresetIterator; +/ 188 /+ interface IBMDStreamingDeviceInput; +/ 189 /+ interface IBMDStreamingH264NALPacket; +/ 190 /+ interface IBMDStreamingAudioPacket; +/ 191 /+ interface IBMDStreamingMPEG2TSPacket; +/ 192 /+ interface IBMDStreamingH264NALParser; +/ 193 194 /* Interface IBMDStreamingDeviceNotificationCallback - Device notification callbacks. */ 195 196 const GUID IID_IBMDStreamingDeviceNotificationCallback = IBMDStreamingDeviceNotificationCallback.iid; 197 198 interface IBMDStreamingDeviceNotificationCallback : IUnknown 199 { 200 extern(System): 201 static const GUID iid = { 0xF9531D64,0x3305,0x4B29,[ 0xA3,0x87,0x7F,0x74,0xBB,0x0D,0x0E,0x84 ] }; 202 HRESULT StreamingDeviceArrived(/+[in]+/ IDeckLink device); 203 HRESULT StreamingDeviceRemoved(/+[in]+/ IDeckLink device); 204 HRESULT StreamingDeviceModeChanged(/+[in]+/ IDeckLink device, in BMDStreamingDeviceMode mode); 205 }; 206 207 /* Interface IBMDStreamingH264InputCallback - H264 input callbacks. */ 208 209 const GUID IID_IBMDStreamingH264InputCallback = IBMDStreamingH264InputCallback.iid; 210 211 interface IBMDStreamingH264InputCallback : IUnknown 212 { 213 extern(System): 214 static const GUID iid = { 0x823C475F,0x55AE,0x46F9,[ 0x89,0x0C,0x53,0x7C,0xC5,0xCE,0xDC,0xCA ] }; 215 HRESULT H264NALPacketArrived(/+[in]+/ IBMDStreamingH264NALPacket nalPacket); 216 HRESULT H264AudioPacketArrived(/+[in]+/ IBMDStreamingAudioPacket audioPacket); 217 HRESULT MPEG2TSPacketArrived(/+[in]+/ IBMDStreamingMPEG2TSPacket tsPacket); 218 HRESULT H264VideoInputConnectorScanningChanged(); 219 HRESULT H264VideoInputConnectorChanged(); 220 HRESULT H264VideoInputModeChanged(); 221 }; 222 223 /* Interface IBMDStreamingDiscovery - Installs device notifications */ 224 225 const GUID IID_IBMDStreamingDiscovery = IBMDStreamingDiscovery.iid; 226 227 interface IBMDStreamingDiscovery : IUnknown 228 { 229 extern(System): 230 static const GUID iid = { 0x2C837444,0xF989,0x4D87,[ 0x90,0x1A,0x47,0xC8,0xA3,0x6D,0x09,0x6D ] }; 231 HRESULT InstallDeviceNotifications(/+[in]+/ IBMDStreamingDeviceNotificationCallback theCallback); 232 HRESULT UninstallDeviceNotifications(); 233 }; 234 235 /* Interface IBMDStreamingVideoEncodingMode - Represents an encoded video mode. */ 236 237 const GUID IID_IBMDStreamingVideoEncodingMode = IBMDStreamingVideoEncodingMode.iid; 238 239 interface IBMDStreamingVideoEncodingMode : IUnknown 240 { 241 extern(System): 242 static const GUID iid = { 0x1AB8035B,0xCD13,0x458D,[ 0xB6,0xDF,0x5E,0x8F,0x7C,0x21,0x41,0xD9 ] }; 243 HRESULT GetName(/+[out]+/ BMDSTR *name); 244 uint GetPresetID(); 245 uint GetSourcePositionX(); 246 uint GetSourcePositionY(); 247 uint GetSourceWidth(); 248 uint GetSourceHeight(); 249 uint GetDestWidth(); 250 uint GetDestHeight(); 251 HRESULT GetFlag(in BMDStreamingEncodingModePropertyID cfgID, 252 /+[out]+/ BOOL* value); 253 HRESULT GetInt(in BMDStreamingEncodingModePropertyID cfgID, 254 /+[out]+/ LONGLONG* value); 255 HRESULT GetFloat(in BMDStreamingEncodingModePropertyID cfgID, 256 /+[out]+/ double* value); 257 HRESULT GetString(in BMDStreamingEncodingModePropertyID cfgID, 258 /+[out]+/ BMDSTR *value); 259 HRESULT CreateMutableVideoEncodingMode(/+[out]+/ IBMDStreamingMutableVideoEncodingMode * newEncodingMode); 260 }; 261 262 /* Interface IBMDStreamingMutableVideoEncodingMode - Represents a mutable encoded video mode. */ 263 264 const GUID IID_IBMDStreamingMutableVideoEncodingMode = IBMDStreamingMutableVideoEncodingMode.iid; 265 266 interface IBMDStreamingMutableVideoEncodingMode : IBMDStreamingVideoEncodingMode 267 { 268 static const GUID iid = { 0x19BF7D90,0x1E0A,0x400D,[ 0xB2,0xC6,0xFF,0xC4,0xE7,0x8A,0xD4,0x9D ] }; 269 HRESULT SetSourceRect(in uint posX, in uint posY, in uint width, in uint height); 270 HRESULT SetDestSize(in uint width, in uint height); 271 HRESULT SetFlag(in BMDStreamingEncodingModePropertyID cfgID, in BOOL value); 272 HRESULT SetInt(in BMDStreamingEncodingModePropertyID cfgID, in LONGLONG value); 273 HRESULT SetFloat(in BMDStreamingEncodingModePropertyID cfgID, in double value); 274 HRESULT SetString(in BMDStreamingEncodingModePropertyID cfgID, in BMDSTR value); 275 }; 276 277 /* Interface IBMDStreamingVideoEncodingModePresetIterator - Enumerates encoding mode presets */ 278 279 const GUID IID_IBMDStreamingVideoEncodingModePresetIterator = IBMDStreamingVideoEncodingModePresetIterator.iid; 280 281 interface IBMDStreamingVideoEncodingModePresetIterator : IUnknown 282 { 283 extern(System): 284 static const GUID iid = { 0x7AC731A3,0xC950,0x4AD0,[ 0x80,0x4A,0x83,0x77,0xAA,0x51,0xC6,0xC4 ] }; 285 HRESULT Next(/+[out]+/ IBMDStreamingVideoEncodingMode * videoEncodingMode); 286 }; 287 288 /* Interface IBMDStreamingDeviceInput - Created by QueryInterface from IDeckLink */ 289 290 const GUID IID_IBMDStreamingDeviceInput = IBMDStreamingDeviceInput.iid; 291 292 interface IBMDStreamingDeviceInput : IUnknown 293 { 294 extern(System): 295 static const GUID iid = { 0x24B6B6EC,0x1727,0x44BB,[ 0x98,0x18,0x34,0xFF,0x08,0x6A,0xCF,0x98 ] }; 296 297 /* Input modes */ 298 299 HRESULT DoesSupportVideoInputMode(in BMDDisplayMode inputMode, 300 /+[out]+/ BOOL* result); 301 HRESULT GetVideoInputModeIterator(/+[out]+/ IDeckLinkDisplayModeIterator * iterator); 302 HRESULT SetVideoInputMode(in BMDDisplayMode inputMode); 303 HRESULT GetCurrentDetectedVideoInputMode(/+[out]+/ BMDDisplayMode* detectedMode); 304 305 /* Capture modes */ 306 307 HRESULT GetVideoEncodingMode(/+[out]+/ IBMDStreamingVideoEncodingMode * encodingMode); 308 HRESULT GetVideoEncodingModePresetIterator(in BMDDisplayMode inputMode, 309 /+[out]+/ IBMDStreamingVideoEncodingModePresetIterator * iterator); 310 HRESULT DoesSupportVideoEncodingMode(in BMDDisplayMode inputMode, /+[in]+/ IBMDStreamingVideoEncodingMode encodingMode, 311 /+[out]+/ BMDStreamingEncodingSupport* result, 312 /+[out]+/ IBMDStreamingVideoEncodingMode * changedEncodingMode); 313 HRESULT SetVideoEncodingMode(/+[in]+/ IBMDStreamingVideoEncodingMode encodingMode); 314 315 /* Input control */ 316 317 HRESULT StartCapture(); 318 HRESULT StopCapture(); 319 HRESULT SetCallback(/+[in]+/ IUnknown theCallback); 320 }; 321 322 /* Interface IBMDStreamingH264NALPacket - Represent an H.264 NAL packet */ 323 324 const GUID IID_IBMDStreamingH264NALPacket = IBMDStreamingH264NALPacket.iid; 325 326 interface IBMDStreamingH264NALPacket : IUnknown 327 { 328 extern(System): 329 static const GUID iid = { 0xE260E955,0x14BE,0x4395,[ 0x97,0x75,0x9F,0x02,0xCC,0x0A,0x9D,0x89 ] }; 330 int GetPayloadSize(); 331 HRESULT GetBytes(/+[out]+/ void** buffer); 332 HRESULT GetBytesWithSizePrefix(/+[out]+/ void** buffer); // Contains a 32-bit unsigned big endian size prefix 333 HRESULT GetDisplayTime(in ULONGLONG requestedTimeScale, 334 /+[out]+/ ULONGLONG* displayTime); 335 HRESULT GetPacketIndex(/+[out]+/ uint* packetIndex); 336 }; 337 338 /* Interface IBMDStreamingAudioPacket - Represents a chunk of audio data */ 339 340 const GUID IID_IBMDStreamingAudioPacket = IBMDStreamingAudioPacket.iid; 341 342 interface IBMDStreamingAudioPacket : IUnknown 343 { 344 extern(System): 345 static const GUID iid = { 0xD9EB5902,0x1AD2,0x43F4,[ 0x9E,0x2C,0x3C,0xFA,0x50,0xB5,0xEE,0x19 ] }; 346 BMDStreamingAudioCodec GetCodec(); 347 int GetPayloadSize(); 348 HRESULT GetBytes(/+[out]+/ void** buffer); 349 HRESULT GetPlayTime(in ULONGLONG requestedTimeScale, 350 /+[out]+/ ULONGLONG* playTime); 351 HRESULT GetPacketIndex(/+[out]+/ uint* packetIndex); 352 }; 353 354 /* Interface IBMDStreamingMPEG2TSPacket - Represent an MPEG2 Transport Stream packet */ 355 356 const GUID IID_IBMDStreamingMPEG2TSPacket = IBMDStreamingMPEG2TSPacket.iid; 357 358 interface IBMDStreamingMPEG2TSPacket : IUnknown 359 { 360 extern(System): 361 static const GUID iid = { 0x91810D1C,0x4FB3,0x4AAA,[ 0xAE,0x56,0xFA,0x30,0x1D,0x3D,0xFA,0x4C ] }; 362 int GetPayloadSize(); 363 HRESULT GetBytes(/+[out]+/ void** buffer); 364 }; 365 366 /* Interface IBMDStreamingH264NALParser - For basic NAL parsing */ 367 368 const GUID IID_IBMDStreamingH264NALParser = IBMDStreamingH264NALParser.iid; 369 370 interface IBMDStreamingH264NALParser : IUnknown 371 { 372 extern(System): 373 static const GUID iid = { 0x5867F18C,0x5BFA,0x4CCC,[ 0xB2,0xA7,0x9D,0xFD,0x14,0x04,0x17,0xD2 ] }; 374 HRESULT IsNALSequenceParameterSet(/+[in]+/ IBMDStreamingH264NALPacket nal); 375 HRESULT IsNALPictureParameterSet(/+[in]+/ IBMDStreamingH264NALPacket nal); 376 HRESULT GetProfileAndLevelFromSPS(/+[in]+/ IBMDStreamingH264NALPacket nal, 377 /+[out]+/ uint* profileIdc, 378 /+[out]+/ uint* profileCompatability, 379 /+[out]+/ uint* levelIdc); 380 }; 381 382 const GUID CLSID_CBMDStreamingDiscovery = CBMDStreamingDiscovery.iid; 383 384 interface CBMDStreamingDiscovery 385 { 386 static const GUID iid = { 0x0CAA31F6,0x8A26,0x40B0,[ 0x86,0xA4,0xBF,0x58,0xDC,0xCA,0x71,0x0C ] }; 387 /+ 388 /+[default]+/+/ /+ interface IBMDStreamingDiscovery; +/ 389 }; 390 391 const GUID CLSID_CBMDStreamingH264NALParser = CBMDStreamingH264NALParser.iid; 392 393 interface CBMDStreamingH264NALParser 394 { 395 static const GUID iid = { 0x7753EFBD,0x951C,0x407C,[ 0x97,0xA5,0x23,0xC7,0x37,0xB7,0x3B,0x52 ] }; 396 /+ 397 /+[default]+/+/ /+ interface IBMDStreamingH264NALParser; +/ 398 }; 399