2 ** Copyright (c) 2018 Blackmagic Design
4 ** Permission is hereby granted, free of charge, to any person or organization
5 ** obtaining a copy of the software and accompanying documentation covered by
6 ** this license (the "Software") to use, reproduce, display, distribute,
7 ** execute, and transmit the Software, and to prepare derivative works of the
8 ** Software, and to permit third-parties to whom the Software is furnished to
9 ** do so, all subject to the following:
11 ** The copyright notices in the Software and this entire statement, including
12 ** the above license grant, this restriction and the following disclaimer,
13 ** must be included in all copies of the Software, in whole or in part, and
14 ** all derivative works of the Software, unless such copies or derivative
15 ** works are solely in the form of machine-executable object code generated by
16 ** a source language processor.
18 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
21 ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
22 ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
23 ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 ** DEALINGS IN THE SOFTWARE.
28 #ifndef BMD_DECKLINKAPITYPES_H
29 #define BMD_DECKLINKAPITYPES_H
34 #define BMD_CONST __declspec(selectany) static const
36 #define BMD_CONST static const
46 typedef int64_t BMDTimeValue;
47 typedef int64_t BMDTimeScale;
48 typedef uint32_t BMDTimecodeBCD;
49 typedef uint32_t BMDTimecodeUserBits;
51 // Interface ID Declarations
53 BMD_CONST REFIID IID_IDeckLinkTimecode = /* BC6CFBD3-8317-4325-AC1C-1216391E9340 */ {0xBC,0x6C,0xFB,0xD3,0x83,0x17,0x43,0x25,0xAC,0x1C,0x12,0x16,0x39,0x1E,0x93,0x40};
55 /* Enum BMDTimecodeFlags - Timecode flags */
57 typedef uint32_t BMDTimecodeFlags;
58 enum _BMDTimecodeFlags {
59 bmdTimecodeFlagDefault = 0,
60 bmdTimecodeIsDropFrame = 1 << 0,
61 bmdTimecodeFieldMark = 1 << 1,
62 bmdTimecodeColorFrame = 1 << 2
65 /* Enum BMDVideoConnection - Video connection types */
67 typedef uint32_t BMDVideoConnection;
68 enum _BMDVideoConnection {
69 bmdVideoConnectionSDI = 1 << 0,
70 bmdVideoConnectionHDMI = 1 << 1,
71 bmdVideoConnectionOpticalSDI = 1 << 2,
72 bmdVideoConnectionComponent = 1 << 3,
73 bmdVideoConnectionComposite = 1 << 4,
74 bmdVideoConnectionSVideo = 1 << 5
77 /* Enum BMDAudioConnection - Audio connection types */
79 typedef uint32_t BMDAudioConnection;
80 enum _BMDAudioConnection {
81 bmdAudioConnectionEmbedded = 1 << 0,
82 bmdAudioConnectionAESEBU = 1 << 1,
83 bmdAudioConnectionAnalog = 1 << 2,
84 bmdAudioConnectionAnalogXLR = 1 << 3,
85 bmdAudioConnectionAnalogRCA = 1 << 4,
86 bmdAudioConnectionMicrophone = 1 << 5,
87 bmdAudioConnectionHeadphones = 1 << 6
90 /* Enum BMDDeckControlConnection - Deck control connections */
92 typedef uint32_t BMDDeckControlConnection;
93 enum _BMDDeckControlConnection {
94 bmdDeckControlConnectionRS422Remote1 = 1 << 0,
95 bmdDeckControlConnectionRS422Remote2 = 1 << 1
98 // Forward Declarations
100 class IDeckLinkTimecode;
102 /* Interface IDeckLinkTimecode - Used for video frame timecode representation. */
104 class BMD_PUBLIC IDeckLinkTimecode : public IUnknown
107 virtual BMDTimecodeBCD GetBCD (void) = 0;
108 virtual HRESULT GetComponents (/* out */ uint8_t *hours, /* out */ uint8_t *minutes, /* out */ uint8_t *seconds, /* out */ uint8_t *frames) = 0;
109 virtual HRESULT GetString (/* out */ const char **timecode) = 0;
110 virtual BMDTimecodeFlags GetFlags (void) = 0;
111 virtual HRESULT GetTimecodeUserBits (/* out */ BMDTimecodeUserBits *userBits) = 0;
114 virtual ~IDeckLinkTimecode () {} // call Release method to drop reference count
125 #endif /* defined(BMD_DECKLINKAPITYPES_H) */