Home | History | Annotate | Download | only in include
      1 /* -LICENSE-START-
      2 ** Copyright (c) 2014 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 // Type Declarations
     41 
     42 typedef int64_t BMDTimeValue;
     43 typedef int64_t BMDTimeScale;
     44 typedef uint32_t BMDTimecodeBCD;
     45 typedef uint32_t BMDTimecodeUserBits;
     46 
     47 // Interface ID Declarations
     48 
     49 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};
     50 
     51 /* Enum BMDTimecodeFlags - Timecode flags */
     52 
     53 typedef uint32_t BMDTimecodeFlags;
     54 enum _BMDTimecodeFlags {
     55     bmdTimecodeFlagDefault                                       = 0,
     56     bmdTimecodeIsDropFrame                                       = 1 << 0
     57 };
     58 
     59 /* Enum BMDVideoConnection - Video connection types */
     60 
     61 typedef uint32_t BMDVideoConnection;
     62 enum _BMDVideoConnection {
     63     bmdVideoConnectionSDI                                        = 1 << 0,
     64     bmdVideoConnectionHDMI                                       = 1 << 1,
     65     bmdVideoConnectionOpticalSDI                                 = 1 << 2,
     66     bmdVideoConnectionComponent                                  = 1 << 3,
     67     bmdVideoConnectionComposite                                  = 1 << 4,
     68     bmdVideoConnectionSVideo                                     = 1 << 5
     69 };
     70 
     71 // Forward Declarations
     72 
     73 class IDeckLinkTimecode;
     74 
     75 /* Interface IDeckLinkTimecode - Used for video frame timecode representation. */
     76 
     77 class IDeckLinkTimecode : public IUnknown
     78 {
     79 public:
     80     virtual BMDTimecodeBCD GetBCD (void) = 0;
     81     virtual HRESULT GetComponents (/* out */ uint8_t *hours, /* out */ uint8_t *minutes, /* out */ uint8_t *seconds, /* out */ uint8_t *frames) = 0;
     82     virtual HRESULT GetString (/* out */ CFStringRef *timecode) = 0;
     83     virtual BMDTimecodeFlags GetFlags (void) = 0;
     84     virtual HRESULT GetTimecodeUserBits (/* out */ BMDTimecodeUserBits *userBits) = 0;
     85 
     86 protected:
     87     virtual ~IDeckLinkTimecode () {}; // call Release method to drop reference count
     88 };
     89 
     90 /* Functions */
     91 
     92 extern "C" {
     93 
     94 
     95 };
     96 
     97 
     98 #endif /* defined(BMD_DECKLINKAPITYPES_H) */
     99