1 // File generated by idl2d from
2 //   ../DeckLinkAPIDeckControl.idl
3 module decklink4d.bmd.decklinkapideckcontrol;
4 
5 import decklink4d.port;
6 import decklink4d.bmd.decklinkapitypes;
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 // Type Declarations
36 
37 // Enumeration Mapping
38 
39 alias uint BMDDeckControlStatusFlags;
40 alias uint BMDDeckControlExportModeOpsFlags; 
41 
42 /* Enum BMDDeckControlMode - DeckControl mode */
43 
44 enum 
45 		/+[v1_enum]+/ /+	_BMDDeckControlMode+/
46 {
47     bmdDeckControlNotOpened                                      = /* 'ntop' */ 0x6E746F70,
48     bmdDeckControlVTRControlMode                                 = /* 'vtrc' */ 0x76747263,
49     bmdDeckControlExportMode                                     = /* 'expm' */ 0x6578706D,
50     bmdDeckControlCaptureMode                                    = /* 'capm' */ 0x6361706D
51 }
52 alias int	_BMDDeckControlMode;
53 alias int BMDDeckControlMode;
54 
55 /* Enum BMDDeckControlEvent - DeckControl event */
56 
57 enum 
58 		/+[v1_enum]+/ /+	_BMDDeckControlEvent+/
59 {
60     bmdDeckControlAbortedEvent                                   = /* 'abte' */ 0x61627465,	// This event is triggered when a capture or edit-to-tape operation is aborted.
61 
62     /* Export-To-Tape events */
63 
64     bmdDeckControlPrepareForExportEvent                          = /* 'pfee' */ 0x70666565,	// This event is triggered a few frames before reaching the in-point. IDeckLinkInput::StartScheduledPlayback() should be called at this point.
65     bmdDeckControlExportCompleteEvent                            = /* 'exce' */ 0x65786365,	// This event is triggered a few frames after reaching the out-point. At this point, it is safe to stop playback.
66 
67     /* Capture events */
68 
69     bmdDeckControlPrepareForCaptureEvent                         = /* 'pfce' */ 0x70666365,	// This event is triggered a few frames before reaching the in-point. The serial timecode attached to IDeckLinkVideoInputFrames is now valid.
70     bmdDeckControlCaptureCompleteEvent                           = /* 'ccev' */ 0x63636576
71 }
72 alias int	_BMDDeckControlEvent;
73 alias int BMDDeckControlEvent;
74 
75 /* Enum BMDDeckControlVTRControlState - VTR Control state */
76 
77 enum 
78 		/+[v1_enum]+/ /+	_BMDDeckControlVTRControlState+/
79 {
80     bmdDeckControlNotInVTRControlMode                            = /* 'nvcm' */ 0x6E76636D,
81     bmdDeckControlVTRControlPlaying                              = /* 'vtrp' */ 0x76747270,
82     bmdDeckControlVTRControlRecording                            = /* 'vtrr' */ 0x76747272,
83     bmdDeckControlVTRControlStill                                = /* 'vtra' */ 0x76747261,
84     bmdDeckControlVTRControlShuttleForward                       = /* 'vtsf' */ 0x76747366,
85     bmdDeckControlVTRControlShuttleReverse                       = /* 'vtsr' */ 0x76747372,
86     bmdDeckControlVTRControlJogForward                           = /* 'vtjf' */ 0x76746A66,
87     bmdDeckControlVTRControlJogReverse                           = /* 'vtjr' */ 0x76746A72,
88     bmdDeckControlVTRControlStopped                              = /* 'vtro' */ 0x7674726F
89 }
90 alias int	_BMDDeckControlVTRControlState;
91 alias int BMDDeckControlVTRControlState;
92 
93 /* Enum BMDDeckControlStatusFlags - Deck Control status flags */
94 
95 /+[v1_enum]+/ enum /+	_BMDDeckControlStatusFlags+/ : int 
96 {
97     bmdDeckControlStatusDeckConnected                            = 1 << 0,
98     bmdDeckControlStatusRemoteMode                               = 1 << 1,
99     bmdDeckControlStatusRecordInhibited                          = 1 << 2,
100     bmdDeckControlStatusCassetteOut                              = 1 << 3
101 }
102 alias int	_BMDDeckControlStatusFlags;
103 
104 /* Enum BMDDeckControlExportModeOpsFlags - Export mode flags */
105 
106 /+[v1_enum]+/ enum /+	_BMDDeckControlExportModeOpsFlags+/ : int 
107 {
108     bmdDeckControlExportModeInsertVideo                          = 1 << 0,
109     bmdDeckControlExportModeInsertAudio1                         = 1 << 1,
110     bmdDeckControlExportModeInsertAudio2                         = 1 << 2,
111     bmdDeckControlExportModeInsertAudio3                         = 1 << 3,
112     bmdDeckControlExportModeInsertAudio4                         = 1 << 4,
113     bmdDeckControlExportModeInsertAudio5                         = 1 << 5,
114     bmdDeckControlExportModeInsertAudio6                         = 1 << 6,
115     bmdDeckControlExportModeInsertAudio7                         = 1 << 7,
116     bmdDeckControlExportModeInsertAudio8                         = 1 << 8,
117     bmdDeckControlExportModeInsertAudio9                         = 1 << 9,
118     bmdDeckControlExportModeInsertAudio10                        = 1 << 10,
119     bmdDeckControlExportModeInsertAudio11                        = 1 << 11,
120     bmdDeckControlExportModeInsertAudio12                        = 1 << 12,
121     bmdDeckControlExportModeInsertTimeCode                       = 1 << 13,
122     bmdDeckControlExportModeInsertAssemble                       = 1 << 14,
123     bmdDeckControlExportModeInsertPreview                        = 1 << 15,
124     bmdDeckControlUseManualExport                                = 1 << 16
125 }
126 alias int	_BMDDeckControlExportModeOpsFlags;
127 
128 /* Enum BMDDeckControlError - Deck Control error */
129 
130 enum 
131 		/+[v1_enum]+/ /+	_BMDDeckControlError+/
132 {
133     bmdDeckControlNoError                                        = /* 'noer' */ 0x6E6F6572,
134     bmdDeckControlModeError                                      = /* 'moer' */ 0x6D6F6572,
135     bmdDeckControlMissedInPointError                             = /* 'mier' */ 0x6D696572,
136     bmdDeckControlDeckTimeoutError                               = /* 'dter' */ 0x64746572,
137     bmdDeckControlCommandFailedError                             = /* 'cfer' */ 0x63666572,
138     bmdDeckControlDeviceAlreadyOpenedError                       = /* 'dalo' */ 0x64616C6F,
139     bmdDeckControlFailedToOpenDeviceError                        = /* 'fder' */ 0x66646572,
140     bmdDeckControlInLocalModeError                               = /* 'lmer' */ 0x6C6D6572,
141     bmdDeckControlEndOfTapeError                                 = /* 'eter' */ 0x65746572,
142     bmdDeckControlUserAbortError                                 = /* 'uaer' */ 0x75616572,
143     bmdDeckControlNoTapeInDeckError                              = /* 'nter' */ 0x6E746572,
144     bmdDeckControlNoVideoFromCardError                           = /* 'nvfc' */ 0x6E766663,
145     bmdDeckControlNoCommunicationError                           = /* 'ncom' */ 0x6E636F6D,
146     bmdDeckControlBufferTooSmallError                            = /* 'btsm' */ 0x6274736D,
147     bmdDeckControlBadChecksumError                               = /* 'chks' */ 0x63686B73,
148     bmdDeckControlUnknownError                                   = /* 'uner' */ 0x756E6572
149 }
150 alias int	_BMDDeckControlError;
151 alias int BMDDeckControlError;
152 
153 // Forward Declarations
154 
155 /+ interface IDeckLinkDeckControlStatusCallback; +/
156 /+ interface IDeckLinkDeckControl; +/
157 
158 /* Interface IDeckLinkDeckControlStatusCallback - Deck control state change callback. */
159 
160 const GUID IID_IDeckLinkDeckControlStatusCallback = IDeckLinkDeckControlStatusCallback.iid;
161 
162 interface IDeckLinkDeckControlStatusCallback : IUnknown
163 {
164 extern(System):
165     static const GUID iid = { 0x53436FFB,0xB434,0x4906,[ 0xBA,0xDC,0xAE,0x30,0x60,0xFF,0xE8,0xEF ] };
166     HRESULT TimecodeUpdate(in BMDTimecodeBCD currentTimecode);
167     HRESULT VTRControlStateChanged(in BMDDeckControlVTRControlState newState, in BMDDeckControlError error);
168     HRESULT DeckControlEventReceived(in BMDDeckControlEvent event, in BMDDeckControlError error);
169     HRESULT DeckControlStatusChanged(in BMDDeckControlStatusFlags flags, in uint mask);
170 };
171 
172 /* Interface IDeckLinkDeckControl - Deck Control main interface */
173 
174 const GUID IID_IDeckLinkDeckControl = IDeckLinkDeckControl.iid;
175 
176 interface IDeckLinkDeckControl : IUnknown
177 {
178 extern(System):
179     static const GUID iid = { 0x8E1C3ACE,0x19C7,0x4E00,[ 0x8B,0x92,0xD8,0x04,0x31,0xD9,0x58,0xBE ] };
180     HRESULT Open(in BMDTimeScale timeScale, in BMDTimeValue timeValue, in BOOL timecodeIsDropFrame, 
181 		/+[out]+/ BMDDeckControlError *error);
182     HRESULT Close(in BOOL standbyOn);
183     HRESULT GetCurrentState(/+[out]+/ BMDDeckControlMode *mode, 
184 		/+[out]+/ BMDDeckControlVTRControlState *vtrControlState, 
185 		/+[out]+/ BMDDeckControlStatusFlags *flags);
186     HRESULT SetStandby(in BOOL standbyOn);
187     HRESULT SendCommand(in ubyte *inBuffer, in uint inBufferSize, 
188 		/+[out]+/ ubyte *outBuffer, 
189 		/+[out]+/ uint *outDataSize, in uint outBufferSize, 
190 		/+[out]+/ BMDDeckControlError *error);
191     HRESULT Play(/+[out]+/ BMDDeckControlError *error);
192     HRESULT Stop(/+[out]+/ BMDDeckControlError *error);
193     HRESULT TogglePlayStop(/+[out]+/ BMDDeckControlError *error);
194     HRESULT Eject(/+[out]+/ BMDDeckControlError *error);
195     HRESULT GoToTimecode(in BMDTimecodeBCD timecode, 
196 		/+[out]+/ BMDDeckControlError *error);
197     HRESULT FastForward(in BOOL viewTape, 
198 		/+[out]+/ BMDDeckControlError *error);
199     HRESULT Rewind(in BOOL viewTape, 
200 		/+[out]+/ BMDDeckControlError *error);
201     HRESULT StepForward(/+[out]+/ BMDDeckControlError *error);
202     HRESULT StepBack(/+[out]+/ BMDDeckControlError *error);
203     HRESULT Jog(in double rate, 
204 		/+[out]+/ BMDDeckControlError *error);
205     HRESULT Shuttle(in double rate, 
206 		/+[out]+/ BMDDeckControlError *error);
207     HRESULT GetTimecodeString(/+[out]+/ BMDSTR *currentTimeCode, 
208 		/+[out]+/ BMDDeckControlError *error);
209     HRESULT GetTimecode(/+[out]+/ IDeckLinkTimecode *currentTimecode, 
210 		/+[out]+/ BMDDeckControlError *error);
211     HRESULT GetTimecodeBCD(/+[out]+/ BMDTimecodeBCD *currentTimecode, 
212 		/+[out]+/ BMDDeckControlError *error);
213     HRESULT SetPreroll(in uint prerollSeconds);
214     HRESULT GetPreroll(/+[out]+/ uint *prerollSeconds);
215     HRESULT SetExportOffset(in int exportOffsetFields);
216     HRESULT GetExportOffset(/+[out]+/ int *exportOffsetFields);
217     HRESULT GetManualExportOffset(/+[out]+/ int *deckManualExportOffsetFields);
218     HRESULT SetCaptureOffset(in int captureOffsetFields);
219     HRESULT GetCaptureOffset(/+[out]+/ int *captureOffsetFields);
220     HRESULT StartExport(in BMDTimecodeBCD inTimecode, in BMDTimecodeBCD outTimecode, in BMDDeckControlExportModeOpsFlags exportModeOps, 
221 		/+[out]+/ BMDDeckControlError *error);
222     HRESULT StartCapture(in BOOL useVITC, in BMDTimecodeBCD inTimecode, in BMDTimecodeBCD outTimecode, 
223 		/+[out]+/ BMDDeckControlError *error);
224     HRESULT GetDeviceID(/+[out]+/ ushort *deviceId, 
225 		/+[out]+/ BMDDeckControlError *error);
226     HRESULT Abort();
227     HRESULT CrashRecordStart(/+[out]+/ BMDDeckControlError *error);
228     HRESULT CrashRecordStop(/+[out]+/ BMDDeckControlError *error);
229     HRESULT SetCallback(/+[in]+/ IDeckLinkDeckControlStatusCallback callback);
230 };