]> git.sesse.net Git - nageru/blob - nageru/decklink/DeckLinkAPITypes.h
Fix a dangling reference (found by GCC 14).
[nageru] / nageru / decklink / DeckLinkAPITypes.h
1 /* -LICENSE-START-
2 ** Copyright (c) 2018 Blackmagic Design
3 **
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:
10 ** 
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.
17 ** 
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.
25 ** -LICENSE-END-
26 */
27
28 #ifndef BMD_DECKLINKAPITYPES_H
29 #define BMD_DECKLINKAPITYPES_H
30
31
32 #ifndef BMD_CONST
33     #if defined(_MSC_VER)
34         #define BMD_CONST __declspec(selectany) static const
35     #else
36         #define BMD_CONST static const
37     #endif
38 #endif
39
40 #ifndef BMD_PUBLIC
41         #define BMD_PUBLIC
42 #endif
43
44 // Type Declarations
45
46 typedef int64_t BMDTimeValue;
47 typedef int64_t BMDTimeScale;
48 typedef uint32_t BMDTimecodeBCD;
49 typedef uint32_t BMDTimecodeUserBits;
50
51 // Interface ID Declarations
52
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};
54
55 /* Enum BMDTimecodeFlags - Timecode flags */
56
57 typedef uint32_t BMDTimecodeFlags;
58 enum _BMDTimecodeFlags {
59     bmdTimecodeFlagDefault                                       = 0,
60     bmdTimecodeIsDropFrame                                       = 1 << 0,
61     bmdTimecodeFieldMark                                         = 1 << 1,
62     bmdTimecodeColorFrame                                        = 1 << 2
63 };
64
65 /* Enum BMDVideoConnection - Video connection types */
66
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
75 };
76
77 /* Enum BMDAudioConnection - Audio connection types */
78
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
88 };
89
90 /* Enum BMDDeckControlConnection - Deck control connections */
91
92 typedef uint32_t BMDDeckControlConnection;
93 enum _BMDDeckControlConnection {
94     bmdDeckControlConnectionRS422Remote1                         = 1 << 0,
95     bmdDeckControlConnectionRS422Remote2                         = 1 << 1
96 };
97
98 // Forward Declarations
99
100 class IDeckLinkTimecode;
101
102 /* Interface IDeckLinkTimecode - Used for video frame timecode representation. */
103
104 class BMD_PUBLIC IDeckLinkTimecode : public IUnknown
105 {
106 public:
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;
112
113 protected:
114     virtual ~IDeckLinkTimecode () {} // call Release method to drop reference count
115 };
116
117 /* Functions */
118
119 extern "C" {
120
121
122 }
123
124
125 #endif /* defined(BMD_DECKLINKAPITYPES_H) */