DeckLinkAPI_v8_1.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* -LICENSE-START-
  2. ** Copyright (c) 2011 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. #ifndef BMD_DECKLINKAPI_v8_1_H
  28. #define BMD_DECKLINKAPI_v8_1_H
  29. #include "DeckLinkAPI.h"
  30. // Interface ID Declarations
  31. #define IID_IDeckLinkDeckControlStatusCallback_v8_1 /* E5F693C1-4283-4716-B18F-C1431521955B */ (REFIID){0xE5,0xF6,0x93,0xC1,0x42,0x83,0x47,0x16,0xB1,0x8F,0xC1,0x43,0x15,0x21,0x95,0x5B}
  32. #define IID_IDeckLinkDeckControl_v8_1 /* 522A9E39-0F3C-4742-94EE-D80DE335DA1D */ (REFIID){0x52,0x2A,0x9E,0x39,0x0F,0x3C,0x47,0x42,0x94,0xEE,0xD8,0x0D,0xE3,0x35,0xDA,0x1D}
  33. /* Enum BMDDeckControlVTRControlState_v8_1 - VTR Control state */
  34. typedef uint32_t BMDDeckControlVTRControlState_v8_1;
  35. enum _BMDDeckControlVTRControlState_v8_1 {
  36. bmdDeckControlNotInVTRControlMode_v8_1 = 'nvcm',
  37. bmdDeckControlVTRControlPlaying_v8_1 = 'vtrp',
  38. bmdDeckControlVTRControlRecording_v8_1 = 'vtrr',
  39. bmdDeckControlVTRControlStill_v8_1 = 'vtra',
  40. bmdDeckControlVTRControlSeeking_v8_1 = 'vtrs',
  41. bmdDeckControlVTRControlStopped_v8_1 = 'vtro'
  42. };
  43. /* Interface IDeckLinkDeckControlStatusCallback_v8_1 - Deck control state change callback. */
  44. class BMD_PUBLIC IDeckLinkDeckControlStatusCallback_v8_1 : public IUnknown
  45. {
  46. public:
  47. virtual HRESULT TimecodeUpdate (/* in */ BMDTimecodeBCD currentTimecode) = 0;
  48. virtual HRESULT VTRControlStateChanged (/* in */ BMDDeckControlVTRControlState_v8_1 newState, /* in */ BMDDeckControlError error) = 0;
  49. virtual HRESULT DeckControlEventReceived (/* in */ BMDDeckControlEvent event, /* in */ BMDDeckControlError error) = 0;
  50. virtual HRESULT DeckControlStatusChanged (/* in */ BMDDeckControlStatusFlags flags, /* in */ uint32_t mask) = 0;
  51. protected:
  52. virtual ~IDeckLinkDeckControlStatusCallback_v8_1 () {}; // call Release method to drop reference count
  53. };
  54. /* Interface IDeckLinkDeckControl_v8_1 - Deck Control main interface */
  55. class BMD_PUBLIC IDeckLinkDeckControl_v8_1 : public IUnknown
  56. {
  57. public:
  58. virtual HRESULT Open (/* in */ BMDTimeScale timeScale, /* in */ BMDTimeValue timeValue, /* in */ bool timecodeIsDropFrame, /* out */ BMDDeckControlError *error) = 0;
  59. virtual HRESULT Close (/* in */ bool standbyOn) = 0;
  60. virtual HRESULT GetCurrentState (/* out */ BMDDeckControlMode *mode, /* out */ BMDDeckControlVTRControlState_v8_1 *vtrControlState, /* out */ BMDDeckControlStatusFlags *flags) = 0;
  61. virtual HRESULT SetStandby (/* in */ bool standbyOn) = 0;
  62. virtual HRESULT SendCommand (/* in */ uint8_t *inBuffer, /* in */ uint32_t inBufferSize, /* out */ uint8_t *outBuffer, /* out */ uint32_t *outDataSize, /* in */ uint32_t outBufferSize, /* out */ BMDDeckControlError *error) = 0;
  63. virtual HRESULT Play (/* out */ BMDDeckControlError *error) = 0;
  64. virtual HRESULT Stop (/* out */ BMDDeckControlError *error) = 0;
  65. virtual HRESULT TogglePlayStop (/* out */ BMDDeckControlError *error) = 0;
  66. virtual HRESULT Eject (/* out */ BMDDeckControlError *error) = 0;
  67. virtual HRESULT GoToTimecode (/* in */ BMDTimecodeBCD timecode, /* out */ BMDDeckControlError *error) = 0;
  68. virtual HRESULT FastForward (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
  69. virtual HRESULT Rewind (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
  70. virtual HRESULT StepForward (/* out */ BMDDeckControlError *error) = 0;
  71. virtual HRESULT StepBack (/* out */ BMDDeckControlError *error) = 0;
  72. virtual HRESULT Jog (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
  73. virtual HRESULT Shuttle (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
  74. virtual HRESULT GetTimecodeString (/* out */ const char **currentTimeCode, /* out */ BMDDeckControlError *error) = 0;
  75. virtual HRESULT GetTimecode (/* out */ IDeckLinkTimecode **currentTimecode, /* out */ BMDDeckControlError *error) = 0;
  76. virtual HRESULT GetTimecodeBCD (/* out */ BMDTimecodeBCD *currentTimecode, /* out */ BMDDeckControlError *error) = 0;
  77. virtual HRESULT SetPreroll (/* in */ uint32_t prerollSeconds) = 0;
  78. virtual HRESULT GetPreroll (/* out */ uint32_t *prerollSeconds) = 0;
  79. virtual HRESULT SetExportOffset (/* in */ int32_t exportOffsetFields) = 0;
  80. virtual HRESULT GetExportOffset (/* out */ int32_t *exportOffsetFields) = 0;
  81. virtual HRESULT GetManualExportOffset (/* out */ int32_t *deckManualExportOffsetFields) = 0;
  82. virtual HRESULT SetCaptureOffset (/* in */ int32_t captureOffsetFields) = 0;
  83. virtual HRESULT GetCaptureOffset (/* out */ int32_t *captureOffsetFields) = 0;
  84. virtual HRESULT StartExport (/* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* in */ BMDDeckControlExportModeOpsFlags exportModeOps, /* out */ BMDDeckControlError *error) = 0;
  85. virtual HRESULT StartCapture (/* in */ bool useVITC, /* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* out */ BMDDeckControlError *error) = 0;
  86. virtual HRESULT GetDeviceID (/* out */ uint16_t *deviceId, /* out */ BMDDeckControlError *error) = 0;
  87. virtual HRESULT Abort (void) = 0;
  88. virtual HRESULT CrashRecordStart (/* out */ BMDDeckControlError *error) = 0;
  89. virtual HRESULT CrashRecordStop (/* out */ BMDDeckControlError *error) = 0;
  90. virtual HRESULT SetCallback (/* in */ IDeckLinkDeckControlStatusCallback_v8_1 *callback) = 0;
  91. protected:
  92. virtual ~IDeckLinkDeckControl_v8_1 () {}; // call Release method to drop reference count
  93. };
  94. #endif // BMD_DECKLINKAPI_v8_1_H