8 #ifndef NTV2PUBLICINTERFACE_H 9 #define NTV2PUBLICINTERFACE_H 13 #if !defined(NTV2_BUILDING_DRIVER) 25 #if defined(MSWindows) 26 #pragma warning(disable:4800) // int/bool conversion 27 #pragma warning(disable:4127) // Stop MSVC from bitching about "do{...}while(false)" macros 29 #endif // user-space clients only 31 #if defined (MSWindows) 33 #elif defined (AJAMac) 34 #pragma GCC diagnostic ignored "-Wunused-private-field" 37 #if !defined (NTV2_BUILDING_DRIVER) 85 #endif // NTV2_BUILDING_DRIVER 88 #if !defined (NTV2_BUILDING_DRIVER) 90 #define NTV2_RPC_ENCODE_DECL bool RPCEncode (NTV2_RPC_BLOB_TYPE & outBlob); 91 #define NTV2_RPC_DECODE_DECL bool RPCDecode (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex); 92 #define NTV2_RPC_DECODECLIENT_DECL bool RPCDecodeClient (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex); 93 #define NTV2_RPC_ENCODECLIENT_DECL bool RPCEncodeClient (NTV2_RPC_BLOB_TYPE & inBlob); 94 #define NTV2_RPC_DECODESERVER_DECL bool RPCDecodeServer (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex); 95 #define NTV2_RPC_ENCODESERVER_DECL bool RPCEncodeServer (NTV2_RPC_BLOB_TYPE & inBlob); 97 #define NTV2_RPC_CODEC_DECLS NTV2_RPC_ENCODE_DECL \ 98 NTV2_RPC_DECODE_DECL \ 99 NTV2_RPC_DECODECLIENT_DECL \ 100 NTV2_RPC_ENCODECLIENT_DECL \ 101 NTV2_RPC_DECODESERVER_DECL \ 102 NTV2_RPC_ENCODESERVER_DECL 105 #define NTV2_RPC_BUFFER_ENCODE_DECL bool RPCEncode (NTV2_RPC_BLOB_TYPE & outBlob, bool fillBuffer=true); 106 #define NTV2_RPC_BUFFER_DECODE_DECL bool RPCDecode (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex, bool fillBuffer=true); 107 #define NTV2_RPC_BUFFER_DECODE2_DECL bool RPCDecodeNoAllocate (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex); 108 #define NTV2_RPC_BUFFER_CODEC_DECLS NTV2_RPC_BUFFER_ENCODE_DECL \ 109 NTV2_RPC_BUFFER_DECODE_DECL \ 110 NTV2_RPC_BUFFER_DECODE2_DECL 113 #define NTV2_RPC_CODEC_DECLS 114 #define NTV2_RPC_BUFFER_CODEC_DECLS 115 #endif // NTV2_BUILDING_DRIVER 714 #define kRegCh1ColorCorrectioncontrol kRegCh1ColorCorrectionControl // CamelCase fixed in SDK 16.0 715 #define kRegCh2ColorCorrectioncontrol kRegCh2ColorCorrectionControl // CamelCase fixed in SDK 16.0 1162 #define NTV2_HDMIAuxMaxFrames 8 1163 #define NTV2_HDMIAuxDataSize 32 3393 #define NWL_REG_START 18000 3395 #define NWL_REG_START 0 3569 #define XLNX_MAX_CHANNELS 4 3570 #define XLNX_REG_TARGET_SIZE 0x400 3571 #define XLNX_REG_CHANNEL_SIZE 0x40 3572 #define XLNX_SUBSYSTEM_ID 0x1fc 3756 #define kTransferFlagVideoDMA1 (BIT(0)) // use dma channel 1 for video transfer 3757 #define kTransferFlagVideoDMA2 (BIT(1)) // use dma channel 2 for video transfer 3758 #define kTransferFlagVideoDMA3 (BIT(2)) // use dma channel 3 for video tranfer 3759 #define kTransferFlagVideoDMA4 (BIT(3)) // use dma channel 4 for video transfer 3760 #define kTransferFlagVideoDMAAny (BIT(0)+BIT(1)+BIT(2)+BIT(3)) 3761 #define kTransferFlagAudioDMA1 (BIT(4)) // use dma channel 1 for audio transfer 3762 #define kTransferFlagAudioDMA2 (BIT(5)) // use dma channel 2 for audio transfer 3763 #define kTransferFlagAudioDMA3 (BIT(6)) // use dma channel 3 for audio transfer 3764 #define kTransferFlagAudioDMA4 (BIT(7)) // use dma channel 4 for audio transfer 3765 #define kTransferFlagAudioDMAAny (BIT(4)+BIT(5)+BIT(6)+BIT(7)) 3766 #define kTransferFlagDMAAny (BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)) 3767 #define kTransferFlagQuadFrame (BIT(8)) // transfer a quad hd or 4k frame 3768 #define kTransferFlagP2PPrepare (BIT(9)) // prepare p2p target for synchronous transfer (no message) 3769 #define kTransferFlagP2PComplete (BIT(10)) // complete synchronous p2p transfer 3770 #define kTransferFlagP2PTarget (BIT(11)) // prepare p2p target for asynchronous transfer (with message) 3771 #define kTransferFlagP2PTransfer (BIT(12)) // transfer to p2p sync or async target 3773 #define MAX_FRAMEBUFFERS 512 // Max for Corvid88 3775 #define KONAIP_REGS_START 0x40000 3782 #define XENA2_CHANNEL2_OFFSET (0x2000000) // 32 MBytes..not applicable 3785 #define XENA2_FRAMEBUFFER_SIZE (0x800000) // 8 MBytes 3789 #define XENA2_NUM_FRAMEBUFFERS (16) 3790 #define XENA2_NTV2_VERTICALINTERRUPT_GLOBAL_EVENT_NAME "_Xena2VerticalInterruptSignalEvent" 3794 #define KHD_NTV2_CHANGE_GLOBAL_EVENT_NAME "_HDChangeSignalEvent" 3800 #define NTV2_MIN_FRAMEBUFFERSIZE KSD_FRAMEBUFFER_SIZE 3801 #define NTV2_MAX_FRAMEBUFFERSIZE KHD_FRAMEBUFFER_SIZE 3802 #define NTV2_MIN_FRAMEBUFFERS HDNTV_NUM_FRAMEBUFFERS 3804 #define NTV2_MAX_FRAMEBUFFERS MAX_FRAMEBUFFERS 3806 #define NTV2_MAX_FRAMEBUFFERS BONES_NUM_FRAMEBUFFERS 3809 #define NTV2_UART_FIFO_SIZE (127) 3811 #define NTV2_PROGRAM_READY_BIT ( BIT_8 ) 3812 #define NTV2_PROGRAM_DONE_BIT ( BIT_9 ) 3813 #define NTV2_PROGRAM_RESET_BIT ( BIT_10 ) 3816 #define NTV2_FS1_FALLBACK_MODE_BIT ( BIT_11 ) 3819 #define NTV2_FS1_CPLD_ENH_MODE_BIT ( BIT_12 ) 3877 #define MAX_NUM_EVENT_CODES (eNumInterruptTypes) 3878 #define NTV2_IS_VALID_INTERRUPT_ENUM(__e__) ((__e__) >= eOutput1 && (__e__) < eNumInterruptTypes) 3879 #define NTV2_IS_INPUT_INTERRUPT(__e__) ( (__e__) == eInput1 \ 3880 || (__e__) == eInput2 \ 3881 || (__e__) == eInput3 \ 3882 || (__e__) == eInput4 \ 3883 || (__e__) == eInput5 \ 3884 || (__e__) == eInput6 \ 3885 || (__e__) == eInput7 \ 3886 || (__e__) == eInput8 ) 3888 #define NTV2_IS_OUTPUT_INTERRUPT(__e__) ( (__e__) == eOutput1 \ 3889 || (__e__) == eOutput2 \ 3890 || (__e__) == eOutput3 \ 3891 || (__e__) == eOutput4 \ 3892 || (__e__) == eOutput5 \ 3893 || (__e__) == eOutput6 \ 3894 || (__e__) == eOutput7 \ 3895 || (__e__) == eOutput8 ) 3908 #if !defined (NTV2_BUILDING_DRIVER) 4017 #define NTV2_STRUCT_BEGIN(__struct_name__) class AJAExport __struct_name__ {public: 4018 #define NTV2_STRUCT_END(__struct_name__) }; 4019 #define NTV2_BEGIN_PRIVATE private: 4020 #define NTV2_END_PRIVATE public: 4021 #define NTV2_BEGIN_PROTECTED protected: 4022 #define NTV2_END_PROTECTED public: 4024 #if defined (_DEBUG) 4025 #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__) bool NTV2_IS_STRUCT_VALID (void) const {return __hr__.IsValid() && __tr__.IsValid();} 4026 #define NTV2_ASSERT_STRUCT_VALID do {NTV2_ASSERT (NTV2_IS_STRUCT_VALID ());} while (false) 4028 #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__) 4029 #define NTV2_ASSERT_STRUCT_VALID 4031 #else // defined (NTV2_BUILDING_DRIVER) 4032 #define NTV2_STRUCT_BEGIN(__struct_name__) typedef struct __struct_name__ { 4033 #define NTV2_STRUCT_END(__struct_name__) } __struct_name__; 4034 #define NTV2_BEGIN_PRIVATE 4035 #define NTV2_END_PRIVATE 4036 #define NTV2_BEGIN_PROTECTED 4037 #define NTV2_END_PROTECTED 4038 #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__) 4039 #define NTV2_ASSERT_STRUCT_VALID 4040 #endif // !defined (NTV2_BUILDING_DRIVER) 4052 #if !defined(NTV2_BUILDING_DRIVER) 4061 : registerNumber (inRegNum),
4062 registerValue (inValue),
4063 registerMask (inMask),
4064 registerShift (inShift)
4076 const ULWord inMask = 0xFFFFFFFF,
const ULWord inShift = 0)
4077 {setRegNum(inRegNum).setValue(inValue).setMask(inMask).setShift(inShift);}
4082 {registerNumber = registerValue = registerMask = registerShift = 0xFFFFFFFF;}
4088 inline bool IsValid (
void)
const {
return !(regNum() == 0xFFFFFFFF && value() == 0xFFFFFFFF && mask() == 0xFFFFFFFF && shift() == 0xFFFFFFFF)
4089 && mask() && shift() < 32;}
4098 && mask() == inRHS.
mask() && shift() == inRHS.
shift();}
4113 std::ostream & Print (std::ostream & outputStream,
const bool inAsCode =
false)
const;
4132 #endif // !defined(NTV2_BUILDING_DRIVER) 4137 #if !defined (NTV2_BUILDING_DRIVER) 4168 #endif // !defined (NTV2_BUILDING_DRIVER) 4177 #if !defined (NTV2_BUILDING_DRIVER) 4179 #endif // !defined (NTV2_BUILDING_DRIVER) 4182 #define MAX_ROUTING_ENTRIES 32 4214 #if !defined(NTV2_BUILDING_DRIVER) 4217 #endif // user-space clients only 4221 #define RP188_STRUCT_SET(_struct_,_dbb_,_lo_,_hi_) do \ 4223 (_struct_).DBB = (_dbb_); \ 4224 (_struct_).Low = (_lo_); \ 4225 (_struct_).High = (_hi_); \ 4228 #define RP188_PSTRUCT_SET(_pStruct_,_dbb_,_lo_,_hi_) do \ 4230 (_pStruct_)->DBB = (_dbb_); \ 4231 (_pStruct_)->Low = (_lo_); \ 4232 (_pStruct_)->High = (_hi_); \ 4236 #define RP188_FRAMEUNITS_MASK 0x0000000F // Frames (units digit) in bits 3- 0 of .Low word 4237 #define RP188_FRAMETENS_MASK 0x00000300 // Frames (tens digit) in bits 9- 8 of .Low word 4238 #define RP188_SECONDUNITS_MASK 0x000F0000 // Seconds (units digit) in bits 19-16 of .Low word 4239 #define RP188_SECONDTENS_MASK 0x07000000 // Seconds (tens digit) in bits 26-24 of .Low word 4240 #define RP188_LOW_TIME_MASK (RP188_FRAMEUNITS_MASK | RP188_FRAMETENS_MASK | RP188_SECONDUNITS_MASK | RP188_SECONDTENS_MASK) 4242 #define RP188_MINUTESUNITS_MASK 0x0000000F // Minutes (units digit) in bits 3- 0 of .High word 4243 #define RP188_MINUTESTENS_MASK 0x00000700 // Minutes (tens digit) in bits 10- 8 of .High word 4244 #define RP188_HOURUNITS_MASK 0x000F0000 // Hours (units digit) in bits 19-16 of .High word 4245 #define RP188_HOURTENS_MASK 0x03000000 // Hours (tens digit) in bits 25-24 of .High word 4246 #define RP188_HIGH_TIME_MASK (RP188_MINUTESUNITS_MASK | RP188_MINUTESTENS_MASK | RP188_HOURUNITS_MASK | RP188_HOURTENS_MASK) 4249 #define NEW_RP188_RCVD 0x00010000 // new RP188 data was received on ANY of the channels (LTC, VITC, etc.) (capture only) 4250 #define NEW_SELECT_RP188_RCVD 0x00020000 // new RP188 data was received on the selected channel (capture only) 4251 #define RP188_720P_FRAMEID 0x00400000 // 720p FrameID (capture only - set by driver software) 4252 #define RP188_CHANGED_FLAG 0x00800000 // RP188 data changed compared to last frame (capture only - set by driver software) 4260 #define NTV2_COLORCORRECTOR_WORDSPERTABLE (512) // number of ULONG words in EACH color table 4261 #define NTV2_COLORCORRECTOR_TOTALWORDS (NTV2_COLORCORRECTOR_WORDSPERTABLE * 3) // total number of ULONG words in all 3 tables 4262 #define NTV2_COLORCORRECTOR_TABLESIZE (NTV2_COLORCORRECTOR_TOTALWORDS * 4) // total length in bytes of all 3 tables: numWords * numColors * bytes/word 4266 #define NTV2_12BIT_COLORCORRECTOR_WORDSPERTABLE (2048) // number of ULONG words in EACH color table 4267 #define NTV2_12BIT_COLORCORRECTOR_TOTALWORDS (NTV2_12BIT_COLORCORRECTOR_WORDSPERTABLE * 3) // total number of ULONG words in all 3 tables 4268 #define NTV2_12BIT_COLORCORRECTOR_TABLESIZE (NTV2_12BIT_COLORCORRECTOR_TOTALWORDS * 4) // total length in bytes of all 3 tables: numWords * numColors * bytes/word 4294 #define kRegColorCorrectionLUTOddShift 22 4295 #define kRegColorCorrectionLUTEvenShift 6 4299 #define kColorCorrectionLUTOffset_Red (0x0800) 4300 #define kColorCorrectionLUTOffset_Green (0x1000) 4301 #define kColorCorrectionLUTOffset_Blue (0x1800) 4304 #define kRegColorCorrection12BitLUTOddShift 16 4305 #define kRegColorCorrection12BitLUTEvenShift 0 4307 #define kRegColorCorrection10To12BitLUTOddShift 18 4308 #define kRegColorCorrection10To12BitLUTEvenShift 2 4312 #define kColorCorrectionLUTOffset_Base (0x0800) // BYTE offset 4313 #define kColorCorrection12BitLUTOffset_Base (0xe000) // BYTE offset 4317 #define kColorCorrectionLUTV3WidgetOffset (0xd800) // byte offset 4318 #define kColorCorrectionLUTV3WidgetSize (16) // byte size 4319 #define kColorCorrectionLUTV3DataOffset (0xe000) // byte offset 4376 #define NTV2_IS_VALID_AUTOCIRCVIDPROCMODE(__m__) ((__m__) >= AUTOCIRCVIDPROCMODE_MIX && (__m__) < AUTOCIRCVIDPROCMODE_INVALID) 4390 #if !defined (NTV2_BUILDING_DRIVER) 4394 #endif // user-space clients only 4409 #define OBSOLETE_ANC_STRUCT CUSTOM_ANC_STRUCT 4438 #define NTV2_IS_AUTO_CIRC_XFER_CMD(__m__) ((__m__) == eTransferAutoCirculate && (__m__) == eTransferAutoCirculateEx && (__m__) == eTransferAutoCirculateEx2) 4456 #define NTV2_IS_VALID_AUTO_CIRC_STATE(__m__) ((__m__) >= NTV2_AUTOCIRCULATE_DISABLED && (__m__) < NTV2_AUTOCIRCULATE_INVALID) 4470 #if !defined(NTV2_DEPRECATE_18_0) 4472 #endif // !defined(NTV2_DEPRECATE_18_0) 4474 #define NTV2_IS_VALID_TASK_MODE(__m__) ((__m__) == NTV2_DISABLE_TASKS || (__m__) == NTV2_STANDARD_TASKS || (__m__) == NTV2_OEM_TASKS) 4475 #define NTV2_IS_STANDARD_TASKS(__m__) ((__m__) == NTV2_STANDARD_TASKS) 4476 #define NTV2_IS_DRIVER_ACTIVE_TASKS(__m__) ((__m__) == NTV2_STANDARD_TASKS || (__m__) == NTV2_OEM_TASKS) 4487 #pragma pack(4) // removes 64 bit alignment on non-64 bit fields 4512 #if !defined (NTV2_BUILDING_DRIVER) 4514 #endif // !defined (NTV2_BUILDING_DRIVER) 4573 #if !defined (NTV2_BUILDING_DRIVER) 4578 #endif // user-space clients only 4694 #if !defined (NTV2_BUILDING_DRIVER) 4697 #endif // user-space clients only 4787 #if !defined (NTV2_BUILDING_DRIVER) 4790 #endif // user-space clients only 4847 #define AUTOCIRCULATE_TASK_VERSION 0x00000001 4848 #define AUTOCIRCULATE_TASK_MAX_TASKS 128 4864 #define NTV2_IS_VALID_TASK_TYPE(_x_) ((_x_) > eAutoCircTaskNone && (_x_) < MAX_NUM_AutoCircTaskTypes) 4866 #define NTV2_IS_REGISTER_READ_TASK(_x_) ((_x_) == eAutoCircTaskRegisterRead) 4867 #define NTV2_IS_REGISTER_WRITE_TASK(_x_) ((_x_) == eAutoCircTaskRegisterWrite) 4868 #define NTV2_IS_REGISTER_TASK(_x_) (NTV2_IS_REGISTER_WRITE_TASK (_x_) || NTV2_IS_REGISTER_READ_TASK (_x_)) 4870 #define NTV2_IS_TIMECODE_READ_TASK(_x_) ((_x_) == eAutoCircTaskTimeCodeRead) 4871 #define NTV2_IS_TIMECODE_WRITE_TASK(_x_) ((_x_) == eAutoCircTaskTimeCodeWrite) 4872 #define NTV2_IS_TIMECODE_TASK(_x_) (NTV2_IS_TIMECODE_WRITE_TASK (_x_) || NTV2_IS_TIMECODE_READ_TASK (_x_)) 4914 #if !defined (NTV2_BUILDING_DRIVER) 4918 #endif // user-space clients only 4945 #if !defined (NTV2_BUILDING_DRIVER) 4948 #endif // user-space clients only 4966 #define NTV2_BITFILE_DATETIME_STRINGLENGTH (16) 4967 #define NTV2_BITFILE_DESIGNNAME_STRINGLENGTH (100) 4968 #define NTV2_BITFILE_PARTNAME_STRINGLENGTH (16) 4971 #define NTV2_BITFILE_STRUCT_VERSION (4) 4980 #define NTV2_BITFILE_RESERVED_ULWORDS (234) // added whichFPGA 5092 #define NTV2_BUILD_STRINGLENGTH (1024) 5093 #define NTV2_BUILD_STRUCT_VERSION (0) 5095 #define NTV2_BUILD_RESERVED_BYTES (1016) 5108 #pragma options align=reset 5143 #if !defined(R2_DEPRECATED) 5222 #endif //R2_DEPRECATED 5272 #define KONA_DEBUGFILTER_STRINGLENGTH 128 5540 #if defined(__CPLUSPLUS__) || defined(__cplusplus) 5541 #define NTV2DriverVersionEncode(__maj__, __min__, __pt__, __bld__) ((ULWord(__maj__) & 0x0000007F) << 22) \ 5542 | ((ULWord(__min__) & 0x0000003F) << 16) \ 5543 | ((ULWord(__pt__ ) & 0x0000003F) << 10) \ 5544 | ((ULWord(__bld__) & 0x000003FF) << 0) 5545 #define NTV2DriverVersionDecode_Major(__vers__) ((ULWord(__vers__) >> 22) & 0x0000007F) 5546 #define NTV2DriverVersionDecode_Minor(__vers__) ((ULWord(__vers__) >> 16) & 0x0000003F) 5547 #define NTV2DriverVersionDecode_Point(__vers__) ((ULWord(__vers__) >> 10) & 0x0000003F) 5548 #define NTV2DriverVersionDecode_Build(__vers__) ((ULWord(__vers__) >> 0) & 0x000003FF) 5550 #define NTV2DriverVersionEncode(__maj__, __min__, __pt__, __bld__) (((ULWord)(__maj__) & 0x0000007F) << 22) \ 5551 | (((ULWord)(__min__) & 0x0000003F) << 16) \ 5552 | (((ULWord)(__pt__ ) & 0x0000003F) << 10) \ 5553 | (((ULWord)(__bld__) & 0x000003FF) << 0) 5554 #define NTV2DriverVersionDecode_Major(__vers__) (((ULWord)(__vers__) >> 22) & 0x0000007F) 5555 #define NTV2DriverVersionDecode_Minor(__vers__) (((ULWord)(__vers__) >> 16) & 0x0000003F) 5556 #define NTV2DriverVersionDecode_Point(__vers__) (((ULWord)(__vers__) >> 10) & 0x0000003F) 5557 #define NTV2DriverVersionDecode_Build(__vers__) (((ULWord)(__vers__) >> 0) & 0x000003FF) 5559 #define NTV2DriverVersionBuildTypeToOrdinal(__ch__) ((__ch__) == 'd' ? 3UL : ((__ch__) == 'a' ? 2UL : ((__ch__) == 'b' ? 1UL : 0UL))) 5560 #define NTV2DriverVersionEncodedBuildType (NTV2DriverVersionBuildTypeToOrdinal(AJA_NTV2_SDK_BUILD_TYPE[0]) << 30) 5563 #define NTV2SDKVersionEncode NTV2DriverVersionEncode 5564 #define NTV2SDKVersionDecode_Major NTV2DriverVersionDecode_Major 5565 #define NTV2SDKVersionDecode_Minor NTV2DriverVersionDecode_Minor 5566 #define NTV2SDKVersionDecode_Point NTV2DriverVersionDecode_Point 5567 #define NTV2SDKVersionDecode_Build NTV2DriverVersionDecode_Build 5572 #if AJATargetBigEndian 5573 #if defined(__CPLUSPLUS__) || defined(__cplusplus) 5574 #define NTV2_4CC(_str_) ( (uint32_t((UByte*(_str_))[0]) << 0) | \ 5575 (uint32_t((UByte*(_str_))[1]) << 8) | \ 5576 (uint32_t((UByte*(_str_))[2]) << 16) | \ 5577 (uint32_t((UByte*(_str_))[3]) << 24)) 5579 #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( ((uint32_t(_a_)) << 0) | \ 5580 ((uint32_t(_b_)) << 8) | \ 5581 ((uint32_t(_c_)) << 16) | \ 5582 ((uint32_t(_d_)) << 24)) 5583 #if !defined (NTV2_BUILDING_DRIVER) 5584 #define NTV2_4CC_AS_STRING(_x_) std::string (1, ((_x_) & 0x000000FF) >> 0) + \ 5585 std::string (1, ((_x_) & 0x0000FF00) >> 8) + \ 5586 std::string (1, ((_x_) & 0x00FF0000) >> 16) + \ 5587 std::string (1, ((_x_) & 0xFF000000) >> 24) 5588 #endif // !defined (NTV2_BUILDING_DRIVER) 5590 #define NTV2_4CC(_str_) ( ((uint32_t)(((UByte *)(_str_))[0]) << 0) | \ 5591 ((uint32_t)(((UByte *)(_str_))[1]) << 8) | \ 5592 ((uint32_t)(((UByte *)(_str_))[2]) << 16) | \ 5593 ((uint32_t)(((UByte *)(_str_))[3]) << 24)) 5595 #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( (((uint32_t)(_a_)) << 0) | \ 5596 (((uint32_t)(_b_)) << 8) | \ 5597 (((uint32_t)(_c_)) << 16) | \ 5598 (((uint32_t)(_d_)) << 24)) 5601 #if defined(__CPLUSPLUS__) || defined(__cplusplus) 5602 #define NTV2_4CC(_str_) ( (uint32_t((UByte*(_str_))[3]) << 0) | \ 5603 (uint32_t((UByte*(_str_))[2]) << 8) | \ 5604 (uint32_t((UByte*(_str_))[1]) << 16) | \ 5605 (uint32_t((UByte*(_str_))[0]) << 24)) 5607 #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( ((uint32_t(_a_)) << 24) | \ 5608 ((uint32_t(_b_)) << 16) | \ 5609 ((uint32_t(_c_)) << 8) | \ 5610 ((uint32_t(_d_)) << 0) ) 5611 #if !defined (NTV2_BUILDING_DRIVER) 5612 #define NTV2_4CC_AS_STRING(_x_) std::string(1, char((uint32_t(_x_) & 0xFF000000) >> 24)) + \ 5613 std::string(1, char((uint32_t(_x_) & 0x00FF0000) >> 16)) + \ 5614 std::string(1, char((uint32_t(_x_) & 0x0000FF00) >> 8)) + \ 5615 std::string(1, char((uint32_t(_x_) & 0x000000FF) >> 0)) 5616 #endif // !defined (NTV2_BUILDING_DRIVER) 5618 #define NTV2_4CC(_str_) ( ((uint32_t)(((UByte *)(_str_))[3]) << 0) | \ 5619 ((uint32_t)(((UByte *)(_str_))[2]) << 8) | \ 5620 ((uint32_t)(((UByte *)(_str_))[1]) << 16) | \ 5621 ((uint32_t)(((UByte *)(_str_))[0]) << 24)) 5623 #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( (((uint32_t)(_a_)) << 24) | \ 5624 (((uint32_t)(_b_)) << 16) | \ 5625 (((uint32_t)(_c_)) << 8) | \ 5626 (((uint32_t)(_d_)) << 0) ) 5628 #endif // else Little-Endian 5631 #define NTV2_CURRENT_HEADER_VERSION 0 5632 #define NTV2_CURRENT_TRAILER_VERSION 0 5634 #define AUTOCIRCULATE_STRUCT_VERSION 0 5636 #define NTV2_HEADER_TAG NTV2_FOURCC ('N', 'T', 'V', '2') 5637 #define NTV2_TRAILER_TAG NTV2_FOURCC ('n', 't', 'v', '2') 5639 #define NTV2_IS_VALID_HEADER_TAG(_x_) ((_x_) == NTV2_HEADER_TAG) 5640 #define NTV2_IS_VALID_TRAILER_TAG(_x_) ((_x_) == NTV2_TRAILER_TAG) 5642 #define NTV2_TYPE_VIRTUAL_DATA_RW NTV2_FOURCC ('v', 'd', 'a', 't') 5643 #define NTV2_TYPE_BANKGETSET NTV2_FOURCC ('b', 'n', 'k', 'S') 5644 #define NTV2_TYPE_ACCONTROL NTV2_FOURCC ('c', 'o', 'n', 't') 5645 #define NTV2_TYPE_ACSTATUS NTV2_FOURCC ('s', 't', 'a', 't') 5646 #define NTV2_TYPE_ACXFER NTV2_FOURCC ('x', 'f', 'e', 'r') 5647 #define NTV2_TYPE_ACXFERSTATUS NTV2_FOURCC ('x', 'f', 's', 't') 5648 #define NTV2_TYPE_ACTASK NTV2_FOURCC ('t', 'a', 's', 'k') 5649 #define NTV2_TYPE_ACFRAMESTAMP NTV2_FOURCC ('s', 't', 'm', 'p') 5650 #define NTV2_TYPE_GETREGS NTV2_FOURCC ('r', 'e', 'g', 'R') 5651 #define NTV2_TYPE_SETREGS NTV2_FOURCC ('r', 'e', 'g', 'W') 5652 #define NTV2_TYPE_SDISTATS NTV2_FOURCC ('s', 'd', 'i', 'S') 5653 #define NTV2_TYPE_AJADEBUGLOGGING NTV2_FOURCC ('d', 'b', 'l', 'g') 5654 #define NTV2_TYPE_AJABUFFERLOCK NTV2_FOURCC ('b', 'f', 'l', 'k') 5655 #define NTV2_TYPE_AJABITSTREAM NTV2_FOURCC ('b', 't', 's', 't') 5656 #define NTV2_TYPE_AJASTREAMCHANNEL NTV2_FOURCC ('s', 't', 'c', 'h') 5657 #define NTV2_TYPE_AJASTREAMBUFFER NTV2_FOURCC ('s', 't', 'b', 'u') 5658 #define NTV2_TYPE_AJAMAILBUFFER NTV2_FOURCC ('m', 'a', 'i', 'l') 5659 #if defined(NTV2_DEPRECATE_16_3) 5660 #define AUTOCIRCULATE_TYPE_STATUS NTV2_TYPE_ACSTATUS 5661 #define AUTOCIRCULATE_TYPE_XFER NTV2_TYPE_ACXFER 5662 #define AUTOCIRCULATE_TYPE_XFERSTATUS NTV2_TYPE_ACXFERSTATUS 5663 #define AUTOCIRCULATE_TYPE_TASK NTV2_TYPE_ACTASK 5664 #define AUTOCIRCULATE_TYPE_FRAMESTAMP NTV2_TYPE_ACFRAMESTAMP 5665 #define AUTOCIRCULATE_TYPE_GETREGS NTV2_TYPE_GETREGS 5666 #define AUTOCIRCULATE_TYPE_SETREGS NTV2_TYPE_SETREGS 5667 #define AUTOCIRCULATE_TYPE_SDISTATS NTV2_TYPE_SDISTATS 5668 #endif // defined(NTV2_DEPRECATE_16_3) 5670 #define NTV2_IS_VALID_STRUCT_TYPE(_x_) ( (_x_) == NTV2_TYPE_ACSTATUS || \ 5671 (_x_) == NTV2_TYPE_ACXFER || \ 5672 (_x_) == NTV2_TYPE_ACXFERSTATUS || \ 5673 (_x_) == NTV2_TYPE_ACTASK || \ 5674 (_x_) == NTV2_TYPE_ACFRAMESTAMP || \ 5675 (_x_) == NTV2_TYPE_GETREGS || \ 5676 (_x_) == NTV2_TYPE_SETREGS || \ 5677 (_x_) == NTV2_TYPE_SDISTATS || \ 5678 (_x_) == NTV2_TYPE_BANKGETSET || \ 5679 (_x_) == NTV2_TYPE_VIRTUAL_DATA_RW || \ 5680 (_x_) == NTV2_TYPE_AJADEBUGLOGGING || \ 5681 (_x_) == NTV2_TYPE_AJABUFFERLOCK || \ 5682 (_x_) == NTV2_TYPE_AJABITSTREAM || \ 5683 (_x_) == NTV2_TYPE_AJASTREAMCHANNEL || \ 5684 (_x_) == NTV2_TYPE_AJASTREAMBUFFER || \ 5685 (_x_) == NTV2_TYPE_AJAMAILBUFFER) 5688 #define NTV2Buffer_ALLOCATED BIT(0) 5689 #define NTV2Buffer_PAGE_ALIGNED BIT(1) 5690 #define NTV2Buffer_SHARED BIT(2) 5691 #define NTV2Buffer_SHARED_GLOBAL BIT(4) 5694 #define NTV2Buffer_TO_ULWORD64(__p__) ((sizeof(int*) == 4) ? (ULWord64(ULWord64(__p__) << 32) | 0x00000000BAADF00D) : ULWord64(__p__)) 5695 #if !defined(NTV2_DEPRECATE_17_0) 5696 #define NTV2_POINTER_ALLOCATED NTV2Buffer_ALLOCATED 5697 #define NTV2_POINTER_PAGE_ALIGNED NTV2Buffer_PAGE_ALIGNED 5698 #define NTV2_POINTER_TO_ULWORD64(_p_) NTV2Buffer_TO_ULWORD64(_p_) 5699 #endif // defined(NTV2_DEPRECATE_17_0) 5703 #define AUTOCIRCULATE_WITH_RP188 BIT(0) 5704 #define AUTOCIRCULATE_WITH_LTC BIT(1) 5705 #define AUTOCIRCULATE_WITH_FBFCHANGE BIT(2) 5706 #define AUTOCIRCULATE_WITH_FBOCHANGE BIT(3) 5707 #define AUTOCIRCULATE_WITH_COLORCORRECT BIT(4) 5708 #define AUTOCIRCULATE_WITH_VIDPROC BIT(5) 5709 #define AUTOCIRCULATE_WITH_ANC BIT(6) 5710 #define AUTOCIRCULATE_WITH_AUDIO_CONTROL BIT(7) 5711 #define AUTOCIRCULATE_WITH_FIELDS BIT(8) 5712 #define AUTOCIRCULATE_WITH_HDMIAUX BIT(9) 5713 #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO1 BIT(10) 5714 #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO2 BIT(11) 5715 #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO3 BIT(12) 5717 #define AUTOCIRCULATE_FRAME_FULL BIT(20) 5718 #define AUTOCIRCULATE_FRAME_FIELD0 BIT(21) 5719 #define AUTOCIRCULATE_FRAME_FIELD1 BIT(22) 5721 #define AUTOCIRCULATE_P2P_PREPARE BIT(28) 5722 #define AUTOCIRCULATE_P2P_COMPLETE BIT(29) 5723 #define AUTOCIRCULATE_P2P_TARGET BIT(30) 5724 #define AUTOCIRCULATE_P2P_TRANSFER BIT(31) 5726 #define DMABUFFERLOCK_LOCK BIT(0) 5727 #define DMABUFFERLOCK_UNLOCK_ALL BIT(1) 5728 #define DMABUFFERLOCK_MAP BIT(2) 5729 #define DMABUFFERLOCK_UNLOCK BIT(3) 5730 #define DMABUFFERLOCK_AUTO BIT(4) 5731 #define DMABUFFERLOCK_MANUAL BIT(5) 5732 #define DMABUFFERLOCK_MAX_SIZE BIT(6) 5733 #define DMABUFFERLOCK_RDMA BIT(7) 5736 #define BITSTREAM_WRITE BIT(0) 5737 #define BITSTREAM_FRAGMENT BIT(1) 5738 #define BITSTREAM_SWAP BIT(2) 5739 #define BITSTREAM_RESET_CONFIG BIT(3) 5740 #define BITSTREAM_RESET_MODULE BIT(4) 5741 #define BITSTREAM_READ_REGISTERS BIT(5) 5742 #define BITSTREAM_SUSPEND BIT(6) 5743 #define BITSTREAM_RESUME BIT(7) 5746 #define BITSTREAM_EXT_CAP 0 5747 #define BITSTREAM_VENDOR_HEADER 1 5748 #define BITSTREAM_JTAG_ID 2 5749 #define BITSTREAM_VERSION 3 5750 #define BITSTREAM_MCAP_STATUS 4 5751 #define BITSTREAM_MCAP_CONTROL 5 5752 #define BITSTREAM_MCAP_DATA 6 5753 #define BITSTREAM_NUM_REGISTERS 7 5755 #if !defined (NTV2_BUILDING_DRIVER) 5757 #define Hex(__x__) std::hex << (__x__) << std::dec 5758 #define xHex(__x__) "0x" << Hex(__x__) 5759 #define HexN(__x__,__n__) std::hex << std::setw(int(__n__)) << (__x__) << std::dec 5760 #define xHexN(__x__,__n__) "0x" << HexN((__x__),(__n__)) 5761 #define Hex0N(__x__,__n__) std::hex << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ') 5762 #define xHex0N(__x__,__n__) "0x" << Hex0N((__x__),(__n__)) 5763 #define HEX(__x__) std::hex << std::uppercase << (__x__) << std::dec << std::nouppercase 5764 #define xHEX(__x__) "0x" << HEX(__x__) 5765 #define HEXN(__x__,__n__) std::hex << std::uppercase << std::setw(int(__n__)) << (__x__) << std::dec << std::nouppercase 5766 #define xHEXN(__x__,__n__) "0x" << HEXN((__x__),(__n__)) 5767 #define HEX0N(__x__,__n__) std::hex << std::uppercase << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ') << std::nouppercase 5768 #define xHEX0N(__x__,__n__) "0x" << HEX0N((__x__),(__n__)) 5769 #define DEC(__x__) std::dec << std::right << (int(__x__)) 5770 #define DECN(__x__,__n__) std::dec << std::setw(int(__n__)) << std::right << (__x__) 5771 #define DEC0N(__x__,__n__) std::dec << std::setw(int(__n__)) << std::setfill('0') << std::right << (__x__) << std::dec << std::setfill(' ') 5772 #define OCT(__x__) std::oct << (__x__) << std::dec 5773 #define OCT0N(__x__,__n__) std::oct << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ') 5774 #define oOCT(__x__) "o" << std::oct << (__x__) << std::dec 5775 #define oOCT0N(__x__,__n__) "o" << std::oct << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ') 5776 #define BIN064(__x__) std::bitset<8>((uint64_t(__x__)&0xFF00000000000000)>>56) << "." \ 5777 << std::bitset<8>((uint64_t(__x__)&0x00FF000000000000)>>48) << "." \ 5778 << std::bitset<8>((uint64_t(__x__)&0x0000FF0000000000)>>40) << "." \ 5779 << std::bitset<8>((uint64_t(__x__)&0x000000FF00000000)>>32) << "." \ 5780 << std::bitset<8>((uint64_t(__x__)&0x00000000FF000000)>>24) << "." \ 5781 << std::bitset<8>((uint64_t(__x__)&0x0000000000FF0000)>>16) << "." \ 5782 << std::bitset<8>((uint64_t(__x__)&0x000000000000FF00)>>8) << "." \ 5783 << std::bitset<8>( uint64_t(__x__)&0x00000000000000FF) 5784 #define BIN032(__x__) std::bitset<8>((uint32_t(__x__)&0xFF000000)>>24) << "." \ 5785 << std::bitset<8>((uint32_t(__x__)&0x00FF0000)>>16) << "." \ 5786 << std::bitset<8>((uint32_t(__x__)&0x0000FF00)>>8) << "." \ 5787 << std::bitset<8>( uint32_t(__x__)&0x000000FF) 5788 #define BIN016(__x__) std::bitset<8>((uint16_t(__x__)&0xFF00)>>8) << "." \ 5789 << std::bitset<8>( uint16_t(__x__)&0x00FF) 5790 #define BIN012(__x__) std::bitset<12>((uint16_t(__x__)&0x0FFF)) 5791 #define BIN010(__x__) std::bitset<10>((uint16_t(__x__)&0x03FF)) 5792 #define BIN08(__x__) std::bitset<8>(uint8_t(__x__)) 5793 #define BIN04(__x__) std::bitset<4>(uint8_t(__x__)) 5794 #define BIN0N(__x__,__n__) std::bitset<__n__>(uint8_t(__x__)) 5795 #define bBIN064(__x__) "b" << BIN064(__x__) 5796 #define bBIN032(__x__) "b" << BIN032(__x__) 5797 #define bBIN016(__x__) "b" << BIN016(__x__) 5798 #define bBIN012(__x__) "b" << BIN012(__x__) 5799 #define bBIN010(__x__) "b" << BIN010(__x__) 5800 #define bBIN08(__x__) "b" << BIN08(__x__) 5801 #define bBIN04(__x__) "b" << BIN04(__x__) 5802 #define bBIN0N(__x__,__n__) "b" << BIN0N(__x__,__n__) 5803 #define fDEC(__x__,__w__,__p__) std::dec << std::fixed << std::setw(__w__) << std::setprecision(__p__) << (__x__) 5804 #endif // !defined (NTV2_BUILDING_DRIVER) 5807 #if defined (AJAMac) 5808 #pragma pack (push, 4) 5809 #endif // defined (AJAMac) 5817 #if !defined (NTV2_BUILDING_DRIVER) 5829 inline bool isValid (
void)
const {
return magnitude() > 0;}
5832 inline operator bool()
const {
return isValid();}
5876 #if !defined(NTV2_DEPRECATE_17_5) 5886 #endif // !defined(NTV2_DEPRECATE_17_5) 5892 inline uint64_t
magnitude(
void)
const {
return (uint64_t(width()) << 32) | uint64_t(height());}
5896 #endif // !defined (NTV2_BUILDING_DRIVER) 5903 #if !defined(NTV2_DEPRECATE_17_5) 5905 #endif // !defined(NTV2_DEPRECATE_17_5) 5927 #if !defined (NTV2_BUILDING_DRIVER) 5934 mElementsPerSegment (0),
5935 mInitialSrcOffset (0),
5936 mInitialDstOffset (0),
5937 mSrcElementsPerRow (0),
5938 mDstElementsPerRow (0) {setElementLength(1);}
5943 inline bool isValid (
void)
const {
return getSegmentCount() && getSegmentLength() ?
true :
false;}
5956 inline ULWord getElementLength (
void)
const {
return ULWord(1 << (mFlags & 3));}
5969 {
return getSourceOffset() + getSourcePitch() * getSegmentCount() + getSegmentLength();}
5975 {
return getDestOffset() + getDestPitch() * getSegmentCount() + getSegmentLength();}
5983 std::ostream & Print (std::ostream & inStrm,
const bool inDumpSegments =
false)
const;
5990 std::string getSourceCode (
const bool inInclDecl =
true)
const;
5996 bool containsElementAtOffset (
const ULWord inElementOffset)
const;
6035 {mNumSegments = inNumSegments;
return *
this;}
6043 {mElementsPerSegment = inNumElements;
return *
this;}
6060 {mInitialSrcOffset = inOffset;
return *
this;}
6068 {mSrcElementsPerRow = inPitch;
return *
this;}
6077 { mFlags &= ~(
BIT(8));
6097 {
return setDestOffset(inOffset).
setDestPitch(inPitch);}
6120 { mFlags &= ~(
BIT(9));
6141 if (inBytesPerElement && inBytesPerElement < 9)
6142 if (!(inBytesPerElement & (inBytesPerElement - 1)))
6144 ULWord num(inBytesPerElement), lengthBits(0);
6147 mFlags = (mFlags & ~3UL) | (lengthBits & 3UL);
6161 static const bool Direction_TopToBottom =
true;
6163 static const bool Direction_TopDown =
true;
6164 static const bool Direction_Normal =
true;
6165 static const bool Direction_BottomToTop =
false;
6166 static const bool Direction_BottomUp =
false;
6167 static const bool Direction_Flipped =
false;
6168 #endif // !defined (NTV2_BUILDING_DRIVER) 6174 ULWord mElementsPerSegment;
6175 ULWord mInitialSrcOffset;
6176 ULWord mInitialDstOffset;
6177 ULWord mSrcElementsPerRow;
6178 ULWord mDstElementsPerRow;
6224 #if defined (AJAMac) 6234 #if !defined (NTV2_BUILDING_DRIVER) 6245 explicit NTV2Buffer (
const void * pInUserPointer,
const size_t inByteCount);
6277 if (
sizeof(
int*) == 4)
6278 return reinterpret_cast <
void*>((fUserSpacePtr & 0xFFFFFFFF00000000) >> 32);
6280 return reinterpret_cast <
void*>(fUserSpacePtr);
6314 inline bool IsNULL (
void)
const {
return GetHostPointer() ==
AJA_NULL || GetByteCount() == 0;}
6319 inline operator bool()
const {
return !IsNULL();}
6324 inline operator size_t()
const {
return size_t(GetByteCount());}
6333 void * GetHostAddress (
const ULWord inByteOffset,
const bool inFromEnd =
false)
const;
6344 template<
typename T>
bool Find (
const T & inValue,
int & inOutIndex)
const 6346 const bool isAscending(inOutIndex >= 0);
6347 const int maxNdx(
int(GetByteCount()) /
sizeof(T));
6348 if (isAscending && inOutIndex >= maxNdx)
6350 if (!isAscending && (1 - inOutIndex) >= maxNdx)
6352 const T * pValues(*
this);
6355 for (
int ndx(inOutIndex); ndx < maxNdx; ndx++)
6356 if (pValues[ndx] == inValue)
6357 {inOutIndex = ndx;
return true;}
6361 const int minNdx(0 - maxNdx);
6362 for (
int ndx(inOutIndex); ndx >= minNdx; ndx++)
6363 if (pValues[maxNdx + ndx] == inValue)
6364 {inOutIndex = ndx;
return true;}
6383 bool IsContentEqual (
const NTV2Buffer & inBuffer,
const ULWord inByteOffset = 0,
const ULWord inByteCount = 0xFFFFFFFF)
const;
6393 bool NextDifference (
const NTV2Buffer & inBuffer,
ULWord & byteOffset)
const;
6414 bool GetRingChangedByteRange (
const NTV2Buffer & inBuffer,
ULWord & outByteOffsetFirst,
ULWord & outByteOffsetLast)
const;
6431 bool Allocate (
const size_t inByteCount,
const bool inPageAligned =
false);
6437 bool Deallocate (
void);
6444 template<
typename T>
bool Fill (
const T & inValue)
6446 T* pT =
reinterpret_cast<T*
>(GetHostPointer());
6451 size_t bufferSize = GetByteCount() /
sizeof(T);
6452 if (bufferSize == 0) {
6456 for (
size_t i = 0; i < bufferSize; ++i) {
6476 if (!segData.Fill(inValue))
6486 const void * pSrc (segData.GetHostAddress(srcOffset));
6487 void * pDst (GetHostAddress(dstOffset));
6488 if (!pSrc)
return false;
6489 if (!pDst)
return false;
6490 if (dstOffset + bytesPerSeg > GetByteCount())
6492 ::memcpy (pDst, pSrc, bytesPerSeg);
6493 srcOffset += bytesPerSeg;
6494 dstOffset += dstPitch;
6505 bool Truncate (
const size_t inByteCount);
6523 bool Set (
const void * pInUserPointer,
const size_t inByteCount);
6536 bool SetAndFill (
const void * pInUserPointer,
const size_t inByteCount,
const UByte inValue);
6556 bool SetFromHexString (
const std::string & inStr);
6564 bool CopyFrom (
const void * pInSrcBuffer,
const ULWord inByteCount);
6603 bool ByteSwap64 (
void);
6610 bool ByteSwap32 (
void);
6617 bool ByteSwap16 (
void);
6629 std::ostream & Print (std::ostream & inOutStream)
const;
6635 std::string AsString (
UWord inDumpMaxBytes = 0)
const;
6644 std::string AsCode (
const size_t inBytesPerWord = 4,
const std::string & inVarName =
"",
const bool inUseSTL =
false,
const bool inByteSwap =
false)
const;
6654 bool toHexString (std::string & outStr,
const size_t inLineBreakInterval = 0)
const;
6676 std::ostream & Dump ( std::ostream & inOutputStream = std::cout,
6677 const size_t inStartByteOffset = 0,
6678 const size_t inByteCount = 0,
6679 const size_t inRadix = 16,
6680 const size_t inBytesPerGroup = 4,
6681 const size_t inGroupsPerLine = 8,
6682 const size_t inAddressRadix = 0,
6683 const bool inShowAscii =
false,
6684 const size_t inAddrOffset = 0)
const;
6707 std::string & Dump ( std::string & inOutputString,
6708 const size_t inStartByteOffset = 0,
6709 const size_t inByteCount = 0,
6710 const size_t inRadix = 16,
6711 const size_t inBytesPerGroup = 4,
6712 const size_t inGroupsPerLine = 8,
6713 const size_t inAddressRadix = 0,
6714 const bool inShowAscii =
false,
6715 const size_t inAddrOffset = 0)
const;
6725 template<
typename T>
operator const T*()
const {
return reinterpret_cast<const T*
>(GetHostPointer());}
6730 template<
typename T>
operator T*()
const {
return reinterpret_cast<T*
>(GetHostPointer());}
6750 inline uint8_t
U8 (
const int inIndex)
const {
const uint8_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];}
6758 inline uint8_t &
U8 (
const int inIndex) {uint8_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];}
6760 inline int8_t
I8 (
const int inIndex)
const {
const int8_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];}
6761 inline int8_t &
I8 (
const int inIndex) {int8_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];}
6762 inline uint16_t
U16 (
const int inIndex)
const {
const uint16_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/2) + inIndex : inIndex];}
6763 inline uint16_t &
U16 (
const int inIndex) {uint16_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/2) + inIndex : inIndex];}
6764 inline int16_t
I16 (
const int inIndex)
const {
const int16_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/2) + inIndex : inIndex];}
6765 inline int16_t &
I16 (
const int inIndex) {int16_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/2) + inIndex : inIndex];}
6766 inline uint32_t
U32 (
const int inIndex)
const {
const uint32_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/4) + inIndex : inIndex];}
6767 inline uint32_t &
U32 (
const int inIndex) {uint32_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/4) + inIndex : inIndex];}
6768 inline int32_t
I32 (
const int inIndex)
const {
const int32_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/4) + inIndex : inIndex];}
6769 inline int32_t &
I32 (
const int inIndex) {int32_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/4) + inIndex : inIndex];}
6770 inline uint64_t
U64 (
const int inIndex)
const {
const uint64_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/8) + inIndex : inIndex];}
6771 inline uint64_t &
U64 (
const int inIndex) {uint64_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/8) + inIndex : inIndex];}
6772 inline int64_t
I64 (
const int inIndex)
const {
const int64_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/8) + inIndex : inIndex];}
6773 inline int64_t &
I64 (
const int inIndex) {int64_t* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/8) + inIndex : inIndex];}
6774 inline float FL (
const int inIndex)
const {
const float* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/
sizeof(
float)) + inIndex : inIndex];}
6775 inline float &
FL (
const int inIndex) {
float* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/
sizeof(
float)) + inIndex : inIndex];}
6776 inline double DBL (
const int inIndex)
const {
const double* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/
sizeof(
double)) + inIndex : inIndex];}
6777 inline double &
DBL (
const int inIndex) {
double* pVal(*
this);
return pVal[inIndex < 0 ? int(GetByteCount()/
sizeof(
double)) + inIndex : inIndex];}
6798 bool GetU64s (
ULWord64Sequence & outU64s,
const size_t inU64Offset = 0,
const size_t inMaxSize = 16,
const bool inByteSwap =
false)
const;
6828 bool GetU32s (
ULWordSequence & outU32s,
const size_t inU32Offset = 0,
const size_t inMaxSize = 32,
const bool inByteSwap =
false)
const;
6858 bool GetU16s (
UWordSequence & outU16s,
const size_t inU16Offset = 0,
const size_t inMaxSize = 64,
const bool inByteSwap =
false)
const;
6872 inline UWordSequence GetU16s (
const size_t inU16Offset = 0,
const size_t inMaxSize = 64,
const bool inByteSwap =
false)
const {
UWordSequence result;
GetU16s(result, inU16Offset, inMaxSize, inByteSwap);
return result;}
6884 bool GetU8s (
UByteSequence & outU8s,
const size_t inU8Offset = 0,
const size_t inMaxSize = 128)
const;
6914 bool GetString (std::string & outString,
const size_t inU8Offset = 0,
const size_t inMaxSize = 128)
const;
6925 inline std::string
GetString (
const size_t inU8Offset = 0,
const size_t inMaxSize = 128)
const {std::string result;
GetString(result, inU8Offset, inMaxSize);
return result;}
6936 bool PutU64s (
const ULWord64Sequence & inU64s,
const size_t inU64Offset = 0,
const bool inByteSwap =
false);
6947 bool PutU32s (
const ULWordSequence & inU32s,
const size_t inU32Offset = 0,
const bool inByteSwap =
false);
6958 bool PutU16s (
const UWordSequence & inU16s,
const size_t inU16Offset = 0,
const bool inByteSwap =
false);
6967 bool PutU8s (
const UByteSequence & inU8s,
const size_t inU8Offset = 0);
6977 static size_t DefaultPageSize (
void);
6984 static bool SetDefaultPageSize (
const size_t inNewSize);
6989 static size_t HostPageSize (
void);
6993 #endif // user-space clients only 6996 #if !defined(NTV2_DEPRECATE_17_0) 6998 #endif // !defined(NTV2_DEPRECATE_17_0 7009 #if defined (NTV2_BUILDING_DRIVER) 7010 #define NTV2_RP188_from_RP188_STRUCT(_n_,_r_) { (_n_).fDBB = (_r_).DBB; \ 7011 (_n_).fLo = (_r_).Low; \ 7012 (_n_).fHi = (_r_).High; } 7014 #define NTV2_RP188P_from_RP188_STRUCT(_np_,_r_) { (_np_)->fDBB = (_r_).DBB; \ 7015 (_np_)->fLo = (_r_).Low; \ 7016 (_np_)->fHi = (_r_).High; } 7018 #define RP188_STRUCT_from_NTV2_RP188(_r_,_n_) { (_r_).DBB = (_n_).fDBB; \ 7019 (_r_).Low = (_n_).fLo; \ 7020 (_r_).High = (_n_).fHi; } 7022 #define RP188_STRUCT_from_NTV2_RP188P(_r_,_np_) { (_r_).DBB = (_np_)->fDBB; \ 7023 (_r_).Low = (_np_)->fLo; \ 7024 (_r_).High = (_np_)->fHi; } 7026 #define NTV2_RP188_IS_VALID(_n_) ((_n_).fDBB != 0xFFFFFFFF || (_n_).fLo != 0xFFFFFFFF || (_n_).fHi != 0xFFFFFFFF) 7035 inline explicit NTV2_RP188 (
const ULWord inDBB = 0xFFFFFFFF,
const ULWord inLow = 0xFFFFFFFF,
const ULWord inHigh = 0xFFFFFFFF) : fDBB (inDBB), fLo (inLow), fHi (inHigh) {}
7041 inline explicit NTV2_RP188 (
const RP188_STRUCT & inOldRP188) : fDBB (inOldRP188.DBB), fLo (inOldRP188.Low), fHi (inOldRP188.High) {}
7046 inline bool IsValid (
void)
const {
return fDBB != 0xFFFFFFFF || fLo != 0xFFFFFFFF || fHi != 0xFFFFFFFF;}
7067 inline void Set (
const ULWord inDBB = 0xFFFFFFFF,
const ULWord inLow = 0xFFFFFFFF,
const ULWord inHigh = 0xFFFFFFFF) {fDBB = inDBB; fLo = inLow; fHi = inHigh;}
7078 inline operator bool ()
const {
return IsValid();}
7081 #endif // user-space clients only 7084 #if !defined (NTV2_BUILDING_DRIVER) 7103 #endif // !defined (NTV2_BUILDING_DRIVER) 7119 bool mFrameTRSError;
7125 #if !defined (NTV2_BUILDING_DRIVER) 7141 std::ostream & Print (std::ostream & inOutStream)
const;
7142 #endif // !defined (NTV2_BUILDING_DRIVER) 7163 #if !defined (NTV2_BUILDING_DRIVER) 7182 bool SetFromRegValue (
const ULWord inData);
7189 std::ostream & Print (std::ostream & inOutStream)
const;
7190 #endif // !defined (NTV2_BUILDING_DRIVER) 7210 #if !defined (NTV2_BUILDING_DRIVER) 7233 std::ostream & Print (std::ostream & inOutStream)
const;
7242 static std::string FourCCToString (
const ULWord in4CC);
7245 #endif // user-space clients only 7257 #if !defined (NTV2_BUILDING_DRIVER) 7266 #endif // user-space clients only 7295 ULWord acNumActiveBytesPerRow;
7298 ULWord acSegmentDevicePitch;
7302 #if !defined (NTV2_BUILDING_DRIVER) 7325 void Set (
const ULWord inNumSegments,
const ULWord inNumActiveBytesPerRow,
const ULWord inHostBytesPerRow,
const ULWord inDeviceBytesPerRow);
7343 #endif // user-space clients only 7362 #if !defined (NTV2_BUILDING_DRIVER) 7399 #endif // user-space clients only 7425 #if !defined (NTV2_BUILDING_DRIVER) 7532 inline uint16_t
GetEndFrame (
void)
const {
return uint16_t(acEndFrame);}
7648 std::string operator [] (
const unsigned inIndexNum)
const;
7657 #endif // user-space clients only 7661 #if !defined (NTV2_BUILDING_DRIVER) 7684 #endif // !defined (NTV2_BUILDING_DRIVER) 7703 #if !defined (NTV2_BUILDING_DRIVER) 7735 bool GetGoodRegisters (
NTV2RegNumSet & outGoodRegNums)
const;
7758 bool GetRequestedRegisterNumbers (
NTV2RegNumSet & outRegNums)
const;
7773 bool PatchRegister (
const ULWord inRegNum,
const ULWord inValue);
7780 std::ostream & Print (std::ostream & inOutStream)
const;
7802 #endif // !defined (NTV2_BUILDING_DRIVER) 7819 #if !defined (NTV2_BUILDING_DRIVER) 7839 bool GetFailedRegisterWrites (
NTV2RegWrites & outFailedRegWrites)
const;
7847 bool GetRequestedRegisterWrites (
NTV2RegWrites & outRegWrites)
const;
7855 std::ostream & Print (std::ostream & inOutStream)
const;
7865 inline explicit NTV2SetRegisters (
const NTV2SetRegisters & inObj) : mHeader(0xFEFEFEFE, 0), mInNumRegisters(0), mInRegInfos(0), mOutNumFailures(0), mOutBadRegIndexes(0)
7870 #endif // !defined (NTV2_BUILDING_DRIVER) 7885 #if !defined (NTV2_BUILDING_DRIVER) 7905 std::ostream & Print (std::ostream & inOutStream)
const;
7920 #endif // !defined (NTV2_BUILDING_DRIVER) 7935 #if !defined (NTV2_BUILDING_DRIVER) 7943 explicit NTV2VirtualData (
const ULWord inTag,
const void* inVirtualData,
const size_t inVirtualDataSize,
const bool inDoWrite =
false);
7950 std::ostream & Print (std::ostream & inOutStream)
const;
7960 #endif // !defined (NTV2_BUILDING_DRIVER) 7976 #if !defined (NTV2_BUILDING_DRIVER) 8006 std::ostream & Print (std::ostream & inOutStream)
const;
8010 #endif // !defined (NTV2_BUILDING_DRIVER) 8041 ULWord acAudioExpectedAddress;
8048 ULWord acAudioInStopAddress;
8050 ULWord acAudioOutStopAddress;
8052 ULWord acAudioOutStartAddress;
8054 ULWord acTotalBytesTransferred;
8091 ULWord acCurrentAudioExpectedAddress;
8111 #if !defined (NTV2_BUILDING_DRIVER) 8157 bool GetInputTimeCodes (
NTV2TimeCodes & outTimeCodes,
const NTV2Channel inSDIInput,
const bool inValidOnly =
true)
const;
8196 std::string operator [] (
const unsigned inIndexNum)
const;
8206 #endif // !defined (NTV2_BUILDING_DRIVER) 8229 #if !defined (NTV2_BUILDING_DRIVER) 8295 #endif // !defined (NTV2_BUILDING_DRIVER) 8385 ULWord acPeerToPeerFlags;
8394 #if !defined (NTV2_BUILDING_DRIVER) 8436 : acHeader(0xFEFEFEFE, 0), acVideoBuffer(0), acAudioBuffer(0),
8437 acANCBuffer(0), acANCField2Buffer(0), acOutputTimeCodes(0), acHDMIAuxData(0)
8472 bool SetBuffers (
ULWord * pInVideoBuffer,
const ULWord inVideoByteCount,
8473 ULWord * pInAudioBuffer,
const ULWord inAudioByteCount,
8488 bool SetVideoBuffer (
ULWord * pInVideoBuffer,
const ULWord inVideoByteCount);
8500 bool SetAudioBuffer (
ULWord * pInAudioBuffer,
const ULWord inAudioByteCount);
8523 bool SetAncBuffers (
ULWord * pInANCBuffer,
const ULWord inANCByteCount,
8539 inline const NTV2Buffer &
GetAncBuffer (
const bool inField2 =
false)
const {
return inField2 ? acANCField2Buffer : acANCBuffer;}
8577 bool SetAllOutputTimeCodes (
const NTV2_RP188 & inTimecode,
const bool inIncludeF2 =
true);
8712 bool EnableSegmentedDMAs (
const ULWord inNumSegments,
const ULWord inNumActiveBytesPerLine,
8713 const ULWord inHostBytesPerLine,
const ULWord inDeviceBytesPerLine);
8718 bool DisableSegmentedDMAs (
void);
8723 bool SegmentedDMAsEnabled (
void)
const;
8733 #endif // user-space clients only 8750 #if !defined (NTV2_BUILDING_DRIVER) 8762 std::ostream & Print (std::ostream & inOutStream)
const;
8766 #endif // !defined (NTV2_BUILDING_DRIVER) 8786 #if !defined (NTV2_BUILDING_DRIVER) 8826 bool SetBuffer (
const NTV2Buffer & inBuffer);
8836 return SetBuffer(
NTV2Buffer(pInBuffer, inByteCount));
8868 std::ostream & Print (std::ostream & inOutStream)
const;
8872 #endif // !defined (NTV2_BUILDING_DRIVER) 8890 #if !defined (NTV2_BUILDING_DRIVER) 8923 bool SetBuffer (
const NTV2Buffer & inBuffer);
8950 std::ostream & Print (std::ostream & inOutStream)
const;
8960 #endif // !defined (NTV2_BUILDING_DRIVER) 8965 #define NTV2_STREAM_CHANNEL_INITIALIZE BIT(0) 8966 #define NTV2_STREAM_CHANNEL_RELEASE BIT(1) 8967 #define NTV2_STREAM_CHANNEL_START BIT(2) 8968 #define NTV2_STREAM_CHANNEL_STOP BIT(3) 8969 #define NTV2_STREAM_CHANNEL_FLUSH BIT(4) 8970 #define NTV2_STREAM_CHANNEL_STATUS BIT(5) 8971 #define NTV2_STREAM_CHANNEL_WAIT BIT(6) 8974 #define NTV2_STREAM_CHANNEL_STATE_DISABLED BIT(0) 8975 #define NTV2_STREAM_CHANNEL_STATE_INITIALIZED BIT(1) 8976 #define NTV2_STREAM_CHANNEL_STATE_RELEASED BIT(2) 8977 #define NTV2_STREAM_CHANNEL_STATE_IDLE BIT(3) 8978 #define NTV2_STREAM_CHANNEL_STATE_ACTIVE BIT(4) 8979 #define NTV2_STREAM_CHANNEL_STATE_ERROR BIT(5) 8982 #define NTV2_STREAM_BUFFER_QUEUE BIT(1) 8983 #define NTV2_STREAM_BUFFER_RELEASE BIT(2) 8984 #define NTV2_STREAM_BUFFER_STATUS BIT(3) 8987 #define NTV2_STREAM_BUFFER_STATE_QUEUED BIT(0) 8988 #define NTV2_STREAM_BUFFER_STATE_LINKED BIT(1) 8989 #define NTV2_STREAM_BUFFER_STATE_COMPLETED BIT(2) 8990 #define NTV2_STREAM_BUFFER_STATE_FLUSHED BIT(3) 8991 #define NTV2_STREAM_BUFFER_STATE_RELEASED BIT(4) 8992 #define NTV2_STREAM_BUFFER_STATE_ERROR BIT(5) 8995 #define NTV2_STREAM_STATUS_SUCCESS BIT(0) 8996 #define NTV2_STREAM_STATUS_FAIL BIT(1) 8997 #define NTV2_STREAM_STATUS_STATE BIT(2) 8998 #define NTV2_STREAM_STATUS_MESSAGE BIT(3) 8999 #define NTV2_STREAM_STATUS_INVALID BIT(4) 9000 #define NTV2_STREAM_STATUS_TIMEOUT BIT(5) 9001 #define NTV2_STREAM_STATUS_RESOURCE BIT(6) 9002 #define NTV2_STREAM_STATUS_OWNER BIT(7) 9021 #if !defined (NTV2_BUILDING_DRIVER) 9056 std::ostream & Print (std::ostream & inOutStream)
const;
9060 #endif // !defined (NTV2_BUILDING_DRIVER) 9083 #if !defined (NTV2_BUILDING_DRIVER) 9094 std::ostream & Print (std::ostream & inOutStream)
const;
9098 #endif // !defined (NTV2_BUILDING_DRIVER) 9103 #define NTV2_MAIL_BUFFER_SEND BIT(0) 9104 #define NTV2_MAIL_BUFFER_RECEIVE BIT(1) 9107 #define NTV2_MAIL_BUFFER_SUCCESS BIT(0) 9108 #define NTV2_MAIL_BUFFER_FAIL BIT(1) 9109 #define NTV2_MAIL_BUFFER_OVERFLOW BIT(2) 9110 #define NTV2_MAIL_BUFFER_TIMEOUT BIT(3) 9111 #define NTV2_MAIL_BUFFER_TRYAGAIN BIT(4) 9114 #define NTV2_MAIL_BUFFER_MAX 4096 9128 #if !defined (NTV2_BUILDING_DRIVER) 9139 std::ostream & Print (std::ostream & inOutStream)
const;
9143 #endif // !defined (NTV2_BUILDING_DRIVER) 9147 #if !defined (NTV2_BUILDING_DRIVER) 9621 #endif // !defined (NTV2_BUILDING_DRIVER) 9623 #if defined (AJAMac) 9625 #endif // defined (AJAMac) 9628 #if !defined(NTV2_DEPRECATE_17_6) 9632 #define HEVC_STREAM_MAX 4 9635 #define HEVC_GPIO_MAX 64 9638 #define HEVC_VERSION_STRING_SIZE 64 9641 #define HEVC_ADDITIONAL_DATA_SIZE ((4 + 4 + 256) * 16) 9644 #define HEVC_STATE_FLAG_VIDEO_STARTED 0x00000001U // codec video input capture started 9647 #define HEVC_TRANSFER_FLAG_IS_LAST_FRAME 0x00000001U // last stream frame 9650 #define HEVC_STATUS_SUCCESS 0x00000001U 9653 #define HEVC_FATAL_ERROR_INFO_REG 0x08000100U // codec error register base 9654 #define HEVC_FATAL_ERROR_INFO_COUNT 64 // number of codec error registers 9657 #define HEVC_DEBUG_DRIVER_REGISTER 0x080000FCU // register address of debug bits 9658 #define HEVC_DEBUG_MASK_INFO 0x00000001 // general probe and cleanup 9659 #define HEVC_DEBUG_MASK_WARNING 0x00000002 // general warinings 9660 #define HEVC_DEBUG_MASK_ERROR 0x00000004 // general erros 9661 #define HEVC_DEBUG_MASK_INT_PRIMARY 0x00000008 // primary interrupt info 9662 #define HEVC_DEBUG_MASK_INT_COMMAND 0x00000010 // command tasklet info 9663 #define HEVC_DEBUG_MASK_INT_VEI 0x00000020 // raw stream tasklet info 9664 #define HEVC_DEBUG_MASK_INT_SEO 0x00000040 // encoded stream tasklet info 9665 #define HEVC_DEBUG_MASK_INT_ERROR 0x00000080 // interrupt errors 9666 #define HEVC_DEBUG_MASK_REGISTER_INFO 0x00000100 // register read/write info 9667 #define HEVC_DEBUG_MASK_REGISTER_STATE 0x00000200 // detailed register access info 9668 #define HEVC_DEBUG_MASK_REGISTER_ERROR 0x00000400 // register access errors 9669 #define HEVC_DEBUG_MASK_COMMAND_INFO 0x00000800 // command queue info 9670 #define HEVC_DEBUG_MASK_COMMAND_STATE 0x00001000 // detailed command processing info 9671 #define HEVC_DEBUG_MASK_COMMAND_ERROR 0x00002000 // command queue errors 9672 #define HEVC_DEBUG_MASK_STREAM_INFO 0x00004000 // stream (dma) queue info 9673 #define HEVC_DEBUG_MASK_STREAM_STATE 0x00008000 // detailed stream processing info 9674 #define HEVC_DEBUG_MASK_STREAM_COPY 0x00010000 // stream data copy info 9675 #define HEVC_DEBUG_MASK_STREAM_SEGMENT 0x00020000 // stream data segment info 9676 #define HEVC_DEBUG_MASK_STREAM_FRAME 0x00040000 // stream vif frame info 9677 #define HEVC_DEBUG_MASK_STREAM_ERROR 0x00080000 // stream queue errors 9678 #define HEVC_DEBUG_MASK_MEMORY_ALLOC 0x00100000 // buffer memory allocation info 9679 #define HEVC_DEBUG_MASK_MEMORY_ERROR 0x00200000 // buffer memory allocation errors 9680 #define HEVC_DEBUG_MASK_DMA_INFO 0x00400000 // dma send info 9681 #define HEVC_DEBUG_MASK_DMA_DESCRIPTOR 0x00800000 // dma descriptor dump 9682 #define HEVC_DEBUG_MASK_DMA_ERROR 0x01000000 // dma errors 9683 #define HEVC_DEBUG_MASK_STATUS_INFO 0x02000000 // status info requests 9684 #define HEVC_DEBUG_MASK_RESERVED_0 0x04000000 9685 #define HEVC_DEBUG_MASK_RESERVED_1 0x08000000 9686 #define HEVC_DEBUG_MASK_RESERVED_2 0x10000000 9687 #define HEVC_DEBUG_MASK_RESERVED_3 0x20000000 9688 #define HEVC_DEBUG_MASK_RESERVED_4 0x40000000 9689 #define HEVC_DEBUG_MASK_RESERVED_5 0x80000000 9692 #define HEVC_NTV2_GPIO_REGISTER_LOW 510 9693 #define HEVC_NTV2_GPIO_REGISTER_HIGH 511 9859 #define Hevc_ParamTarget_None 0x00000000 9860 #define Hevc_ParamTarget_Vbr 0x00000001 // change variable bitrate 9861 #define Hevc_ParamTarget_Cbr 0x00000002 // change constant bitrate 9862 #define Hevc_ParamTarget_Resolution 0x00000004 // change size, crop, pan, etc. 9863 #define Hevc_ParamTarget_Frame_Rate 0x00000008 // change frame rate 9864 #define Hevc_ParamTarget_All 0x0000000f 10234 #if !defined(NTV2_BUILDING_DRIVER) 10253 #endif // !defined(NTV2_BUILDING_DRIVER) 10273 #if !defined(NTV2_BUILDING_DRIVER) 10290 const float kMult(0.00002f), kMultLum(0.0001f);
10324 #endif // !defined(NTV2_BUILDING_DRIVER) 10345 #define NTV2_IS_VALID_HDR_PRIMARY(__val__) ((__val__) <= 0x0000C350) 10346 #define NTV2_IS_VALID_HDR_MASTERING_LUMINENCE(__val__) (true) 10347 #define NTV2_IS_VALID_HDR_LIGHT_LEVEL(__val__) (true) 10349 #if 0 && defined(_DEBUG) 10351 #define NTV2_PRETEND_DEVICE 10352 #define NTV2_PRETEND_DEVICE_FROM DEVICE_ID_IOX3 10353 #define NTV2_PRETEND_DEVICE_TO DEVICE_ID_KONAHDMI 10355 #endif // NTV2PUBLICINTERFACE_H
NTV2_RP188(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Constructs an NTV2_RP188 from each of its DBB, low and high ULWord components.
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
NTV2SegmentedXferInfo & setSourceDirection(const bool inTopDown)
Sets the scan direction for the source.
NTV2AutoCirculateState state
UWordSequence::iterator UWordSequenceIter
A handy non-const iterator for iterating over a UWordSequence.
NTV2VideoFrameBufferOrientation frameBufferOrientation
#define NTV2_STRUCT_END(__struct_name__)
HevcGpioControl gpioControl
RP188_STRUCT LTCEmbedded6
ULWord dmaCardFrameOffset
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
struct HDRDriverValues HDRDriverValues
const FRAME_STAMP & GetFrameInfo(void) const
Returns a constant reference to my FRAME_STAMP.
NTV2StandardSet::const_iterator NTV2StandardSetConstIter
A handy const iterator for iterating over an NTV2StandardSet.
LWord64 avrEnqueueDuration
ULWord GetCapturedAudioByteCount(void) const
ULWord audioInStopAddress
For record - end position (exclusive) in buffer of audio (includes base offset)
ULWord transferCharacteristics
std::set< NTV2FrameBufferFormat > NTV2FrameBufferFormatSet
A set of distinct NTV2FrameBufferFormat values.
UByteSequence::iterator UByteSequenceIter
A handy non-const iterator for iterating over a UByteSequence.
uint8_t staticMetadataDescriptorID
FRAME_STAMP_STRUCT frameStamp
struct AUTOCIRCULATE_TASK_STRUCT_64 * PAUTOCIRCULATE_TASK_STRUCT_64
struct AUTOCIRCULATE_P2P_STRUCT * PAUTOCIRCULATE_P2P_STRUCT
ULWord frame
The frame requested or -1 if not available.
LWord64 maxDequeueDuration
NTV2HDMIOutAudioRegisters
HevcFirmwareType firmwareType
const NTV2AudioChannelsMuted16 NTV2AudioChannelsEnableAll
All 16 audio channels unmuted/enabled.
bool NTV2DeviceGetSupportedStandards(const NTV2DeviceID inDeviceID, NTV2StandardSet &outStandards)
Returns a set of distinct NTV2Standard values supported on the given device.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2RegWrites::const_iterator NTV2RegWritesConstIter
A handy const (read-only) iterator for iterating over the contents of an NTV2RegisterWrites instance...
NTV2TCIndexes::const_iterator NTV2TCIndexSetConstIter
A handy const interator for iterating over an NTV2TCIndexes set.
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
bool IsOutput(void) const
std::set< NTV2TCIndex > NTV2TCIndexSet
A set of distinct NTV2TCIndex values.
NTV2Crosspoint channelSpec
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
struct AUTOCIRCULATE_STATUS_STRUCT AUTOCIRCULATE_STATUS_STRUCT
NTV2VideoFrameBufferOrientation
Determines the order that raster lines are written into, or read out of, frame buffer memory on the d...
std::set< NTV2TCIndex > NTV2TCIndexes
The AutoCirculate channel is running.
ULWord dmaSegmentHostPitch
ULWord currentAudioStartAddress
As found by isr.
std::string NTV2ChannelSetToStr(const NTV2ChannelSet &inObj, const bool inCompact=true)
struct HevcPciId HevcPciId
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::LoadBitstream.
char standardFirmwareSingle[64]
#define NTV2_IS_STRUCT_VALID_IMPL(__hr__, __tr__)
LWord64 currentTime
Current processor time ... on Windows, this is derived from KeQueryPerformanceCounter.
uint16_t & U16(const int inIndex)
int8_t I8(const int inIndex) const
std::set< NTV2FrameRate > NTV2FrameRateSet
A set of distinct NTV2FrameRate values. New in SDK 17.0.
ULWord dmaCardFrameNumber
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
mVideoBuffer Allocate(mFormatDesc.GetTotalRasterBytes())
NTV2TaskMode NTV2EveryFrameTaskMode
ULWord GetVersion(void) const
ADV7402AHDProcAmpRegisters HD
CUSTOM_ANC_STRUCT customAncInfo
This field is obsolete. Do not use.
enum _NTV2OERegisters NTV2OERegisters
NTV2RegWritesConstIter NTV2RegReadsConstIter
A handy const (read-only) iterator for iterating over the contents of an NTV2RegisterReads instance...
std::vector< double > NTV2DoubleArray
An array of double-precision floating-point values.
struct BUILD_INFO_STRUCT * PBUILD_INFO_STRUCT
NTV2HDMIColorSpace
Indicates or specifies HDMI Color Space.
ULWordSet NTV2RegisterNumberSet
A set of distinct ULWord values.
bool WithCustomAnc(void) const
ULWord audioOutStartAddress
For play - end position (exclusive) in buffer of audio.
NTV2RegInfo(const ULWord inRegNum=0, const ULWord inValue=0, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Constructs me from the given parameters.
BOOL_ bDisableExtraAudioInfo
~NTV2StreamBuffer()
My default destructor, which frees all allocatable fields that I own.
ULWord getElementLength(void) const
int16_t & I16(const int inIndex)
CUSTOM_ANC_STRUCT customAncInfo
This field is obsolete. Do not use.
NTV2RegInfo & setMask(const ULWord val)
struct hevc_stream_statistics HevcStreamStatistics
The AutoCirculate channel is starting, waiting for the first VBI and/or call to CNTV2Card::AutoCircul...
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
defined(NTV2_DEPRECATE_17_6)
RP188_STRUCT LTCEmbedded5
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
ULWord getTotalBytes(void) const
ULWord OptionFlags(void) const
AutoCircVidProcInfo vidProcInfo
#define NTV2_IS_VALID_TRAILER_TAG(_x_)
UByte NTV2DID
An ancillary Data IDentifier.
struct HevcDeviceStatus HevcDeviceStatus
int64_t I64(const int inIndex) const
NTV2Crosspoint channelSpec
ULWord GetCapturedAudioByteCount(void) const
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
float & FL(const int inIndex)
ULWord GetType(void) const
RP188_STRUCT LTCEmbedded8
uint16_t minMasteringLuminance
struct HevcMessageRegister HevcMessageRegister
ULWord GetBufferLevel(void) const
#define KONA_DEBUGFILTER_STRINGLENGTH
enum NTV2VideoFrameBufferOrientation NTV2FBOrientation
bool WithFBOChange(void) const
std::ostream & NTV2PrintChannelList(const NTV2ChannelList &inObj, const bool inCompact=true, std::ostream &inOutStream=std::cout)
Streams a human-readable dump of the given NTV2ChannelList into the specified output stream...
The AutoCirculate channel is initializing, waiting for CNTV2Card::AutoCirculateStart to be called...
ULWord GetNumAvailableOutputFrames(void) const
NTV2DoubleArray::iterator NTV2DoubleArrayIter
Handy non-const iterator to iterate over an NTV2DoubleArray.
bool isSourceTopDown(void) const
std::ostream & NTV2PrintChannelSet(const NTV2ChannelSet &inObj, const bool inCompact=true, std::ostream &inOutStream=std::cout)
Streams a human-readable dump of the given NTV2ChannelSet into the specified output stream...
void SetMaxLockSize(const ULWord64 inNumBytes)
Sets the maximum lock size for use in a subsequent call to CNTV2Card::DMABufferLock.
NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter
A handy const interator for iterating over an NTV2TimeCodeList.
NTV2SegmentedXferInfo & setSourceOffset(const ULWord inOffset)
Sets my source offset.
int16_t I16(const int inIndex) const
AutoCircTaskType
These are the available AutoCirculate task types.
uint32_t U32(const int inIndex) const
ULWordSet::iterator ULWordSetIter
ULWordSequence::const_iterator ULWordSequenceConstIter
A handy const iterator for iterating over a ULWordSequence.
void SetConnectionID(const ULWord inValue)
uint64_t & U64(const int inIndex)
ULWord bytesRead
Total audio and video bytes transfered.
bool SetFrameUserCookie(const ULWord64 &inUserCookie)
Intended for playout, replaces my current acUserCookie value with the new value.
LWord64 lastInput1VerticalTimeStamp
#define NTV2_STREAM_CHANNEL_STATE_ERROR
Used in NTV2StreamChannel stream error.
ULWord GetTag(void) const
bool IsValid(void) const
Answers true if I'm valid, or false if I'm not valid.
ULWord GetByteCount(void) const
ULWord audioExpectedAddress
The address that was used to transfer.
NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter
std::ostream & NTV2PrintULWordVector(const NTV2ULWordVector &inObj, std::ostream &inOutStream=std::cout)
Streams a human-readable dump of the given NTV2ULWordVector into the specified output stream...
std::map< ULWord, ULWord > NTV2RegisterValueMap
A mapping of distinct NTV2RegisterNumbers to their corresponding ULWord values.
ULWord getDestPitch(void) const
bool WithAudio(void) const
ULWordSetConstIter NTV2RegNumSetConstIter
A const iterator that iterates over a set of distinct NTV2RegisterNumbers.
struct RP188_STRUCT RP188_STRUCT
struct HevcEncodedInfo HevcEncodedInfo
NTV2AudioSystemSet NTV2MakeAudioSystemSet(const NTV2AudioSystem inFirstAudioSystem, const UWord inCount=1)
NTV2HDMIOutputStatus(const ULWord inData)
Constructs a NTV2HDMIOutputStatus from a register data value.
NTV2VideoFrameBufferOrientation frameBufferOrientation
VirtualProcAmpRegisters_base HD
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
RP188_STRUCT LTCEmbedded2
HevcFirmwareType firmwareType
NTV2ClockMonitorWidgetRegisters
std::bitset< 16 > NTV2AudioChannelsMuted16
Per-audio-channel mute state for up to 16 audio channels.
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
AUTOCIRCULATE_DATA(const AUTO_CIRC_COMMAND inCommand=AUTO_CIRC_COMMAND_INVALID, const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_INVALID)
UByteSequence::const_iterator UByteSequenceConstIter
A handy const iterator for iterating over a UByteSequence.
NTV2FrameSize(const ULWord inWidth=0, const ULWord inHeight=0)
My constructor.
HevcGpioDirection gpioDirection
NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelQuad values.
Specifies any/all input/output kinds.
bool CanAcceptMoreOutputFrames(void) const
bool validPrimariesAndWhitePoint(void) const
HevcDeviceStatus deviceStatus
UByteSequence NTV2_RPC_BLOB_TYPE
void MakeInvalid(void)
Invalidates me, setting my register number, value, mask and shift values to 0xFFFFFFFF.
NTV2FrameBufferFormatSet NTV2PixelFormats
struct AUTOCIRCULATE_TASK_STRUCT * PAUTOCIRCULATE_TASK_STRUCT
AUTO_CIRC_COMMAND eCommand
float minMasteringLuminance
UByteSequence GetU8s(const size_t inU8Offset=0, const size_t inMaxSize=128) const
ULWord currentFrame
Last vertical blank frame for this channel's auto-circulate. (at the time of the IOCTL_NTV2_GET_FRAME...
FGSizesMap::const_iterator FGSizesMapCI
HevcGpioDirection direction
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
NTV2FrameSize NTV2FrameDimensions
bool IsIdle(void)
Is the stream idle.
int32_t & I32(const int inIndex)
const NTV2AudioChannelsMuted16 NTV2AudioChannelsMuteAll
All 16 audio channels muted/disabled.
uint16_t maxFrameAverageLightLevel
NTV2AutoCirculateState GetState(void) const
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
_NTV2MultiRasterRegisters
const NTV2Buffer & requestedRegisterNumbers(void) const
bool isSourceBottomUp(void) const
ULWord GetNumFailedWrites(void) const
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
HevcVersion driverVersion
struct DMA_TRANSFER_STRUCT_64 * PDMA_TRANSFER_STRUCT_64
NTV2HDMIRange
Indicates or specifies the HDMI RGB range.
RP188_STRUCT LTCEmbedded7
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
uint16_t minMasteringLuminance
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Describes a segmented data transfer (copy or move) from a source memory location to a destination loc...
#define NTV2_BEGIN_PRIVATE
NTV2SegmentedXferInfo & setSegmentInfo(const ULWord inNumSegs, const ULWord inSegLength)
Sets both my segment count and length.
std::vector< NTV2RegInfo > NTV2RegWrites
An ordered sequence of zero or more NTV2RegInfo structs intended for WriteRegister.
ULWord dmaSegmentCardPitch
uint32_t & U32(const int inIndex)
HevcEncodeMode encodeMode
NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter
A handy const iterator for iterating over an NTV2FrameRateSet.
struct AutoCircGenericTask AutoCircGenericTask
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
NTV2AudioRateSet::const_iterator NTV2AudioRateSetConstIter
A handy const iterator for iterating over an NTV2AudioRateSet.
std::set< NTV2AudioChannelQuad > NTV2AudioChannelQuads
A set of distinct NTV2AudioChannelQuad values.
uint8_t electroOpticalTransferFunction
std::set< NTV2Standard > NTV2StandardSet
A set of distinct NTV2Standard values.
std::string NTV2AudioSystemSetToStr(const NTV2AudioSystemSet &inObj, const bool inCompact=true)
ULWord GetProcessedFrameCount(void) const
NTV2Crosspoint channelSpec
const NTV2Buffer & GetAudioBuffer(void) const
Output (playout, display) mode, which reads from device SDRAM.
BOOL_ bDisableExtraAudioInfo
HevcChangeSequence changeSequence
NTV2SegmentedXferInfo & setDestFlipped(const bool inFlipped=Direction_Flipped)
Sets the scan direction for the destination.
NTV2_RP188(const RP188_STRUCT &inOldRP188)
Constructs an NTV2_RP188 from the given RP188_STRUCT.
bool NTV2GetSupportedStandards(NTV2StandardSet &outStandards)
Returns a set of all NTV2Standard values supported (used) by any/all supported NTV2 devices...
NTV2LocalProcBlockRegisters
std::vector< uint8_t > UByteSequence
An ordered sequence of UByte (uint8_t) values.
ULWord64Sequence GetU64s(const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const
ULWordSet::const_iterator ULWordSetConstIter
struct AutoCircVidProcInfo AutoCircVidProcInfo
AUTO_CIRC_COMMAND eCommand
This struct replaces the old RP188_STRUCT.
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter
A handy const iterator for iterating over an NTV2GeometrySet.
AutoCircGenericTask * taskArray
NTV2LocalProcRegisterShift
ULWord height(void) const
ULWord regNum(void) const
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
struct HevcDeviceTransfer HevcDeviceTransfer
ULWord64 rdtscCurrentTime
NTV2RegInfo & setRegNum(const ULWord val)
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
bool Fill(const T &inValue)
Fills me with the given scalar value.
bool Find(const T &inValue, int &inOutIndex) const
Searches me for the given scalar value of type T starting at a given index position.
struct INTERRUPT_TIMESTAMP_STRUCT * PINTERRUPT_TIMESTAMP_STRUCT
bool IsProvidedByClient(void) const
ULWord currentReps
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
ULWord GetSegmentCount(void) const
NTV2Buffer & outRegisterValues(void)
enum _NTV2MultiRasterRegisters NTV2MultiRasterRegisters
struct AUTOCIRCULATE_TRANSFER_STATUS_STRUCT * PAUTOCIRCULATE_TRANSFER_STATUS_STRUCT
#define NTV2_RPC_BUFFER_CODEC_DECLS
NTV2FrameRate
Identifies a particular video frame rate.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
double & DBL(const int inIndex)
uint16_t maxContentLightLevel
HevcPictureData pictureData
ULWordSetIter NTV2RegNumSetIter
A non-constant iterator that iterates over a set of distinct NTV2RegisterNumbers. ...
NTV2Standard
Identifies a particular video standard.
0: Disabled (never recommended): device configured exclusively by client application(s).
bool IsStarting(void) const
AutoCircTimeCodeTask timeCodeTask
ULWord GetDroppedFrameCount(void) const
struct HevcPictureData HevcPictureData
bool IsAllocatedBySDK(void) const
uint8_t electroOpticalTransferFunction
ULWord GetSizeInBytes(void) const
My total size, in bytes, including header, body and trailer (but excluding embedded NTV2Buffer data) ...
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Enumerations for controlling NTV2 devices.
~NTV2MailBuffer()
My default destructor, which frees all allocatable fields that I own.
NTV2RegisterValueMap::iterator NTV2RegValueMapIter
A non-constant iterator that iterates over NTV2RegisterValueMap entries.
ULWord getDestEndOffset(void) const
void Set(const ULWord inRegNum, const ULWord inValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Sets me from the given parameters.
This is used to perform virtual data reads or writes.
bool IsQuarterSizeExpandModeEnabled(void) const
struct HevcEncodedData HevcEncodedData
struct hevc_gpio_state HevcGpioState
#define NTV2_IS_ACTIVE_COLOR_CORRECTION_MODE(__x__)
bool WithHDMIAuxData(void) const
NTV2FrameSize & swap(void)
Swaps my width and height.
NTV2HDMIOutputStatus()
Constructs a default NTV2HDMIOutputStatus.
NTV2ColorCorrectionInfo_32 colorCorrectionInfo
int64_t & I64(const int inIndex)
const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus(void) const
Returns a constant reference to my AUTOCIRCULATE_TRANSFER_STATUS.
bool NTV2GetSupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of all NTV2PixelFormat values supported (used) by any/all supported NTV2 devices...
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
Defines the import/export macros for producing DLLs or LIBs.
The AutoCirculate channel is stopping.
NTV2Crosspoint channelSpec
ULWord GetProcessedFrameCount(void) const
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock.
HevcEncodeMode encodeMode
struct HDRFloatValues HDRFloatValues
ULWord GetBufferLevel(void) const
ULWord colourDescriptionPresentFlag
BOOL_ bDisableExtraAudioInfo
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
struct AUTOCIRCULATE_TASK_STRUCT AUTOCIRCULATE_TASK_STRUCT
NTV2ColorCorrectionMode mode
enum _AutoCircCommand_ NTV2AutoCirculateCommand
Reports HDMI output status information.
Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal devel...
BOOL_ bWithColorCorrection
NTV2RegWritesIter NTV2RegReadsIter
A handy non-const iterator for iterating over the contents of an NTV2RegisterReads instance...
NTV2AutoCirculateState state
struct hevcMessageHeader HevcMessageHeader
ULWord GetResultStatus(void) const
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
enum _INTERRUPT_ENUMS_ INTERRUPT_ENUMS
struct HevcDeviceCommand HevcDeviceCommand
ULWord GetRequestedRegisterCount(void) const
bool IsStopped(void) const
uint16_t maxContentLightLevel
2: OEM (recommended): device configured by client application(s) with some driver involvement...
NTV2SegmentedXferInfo()
Constructs me as empty/invalid.
LWord64 lastOutputVerticalTimeStamp
NTV2QuarterSizeExpandMode
NTV2ColorCorrectionInfo colorCorrectionInfo
NTV2RegisterNumberSet NTV2RegNumSet
A set of distinct NTV2RegisterNumbers.
This is used to atomically perform bank-selected register reads or writes.
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
ULWord videoSegmentHostPitch
ULWord64Sequence::iterator ULWord64SequenceIter
A handy non-const iterator for iterating over a ULWord64Sequence.
struct AUTOCIRCULATE_TRANSFER_STRUCT AUTOCIRCULATE_TRANSFER_STRUCT
ULWord GetHeaderVersion(void) const
NTV2SegmentedXferInfo & setDestPitch(const ULWord inPitch)
Sets my destination pitch.
enum _NTV2XptValidROMRegisters NTV2XptValidROMRegisters
struct AUTOCIRCULATE_DATA AUTOCIRCULATE_DATA
NTV2ColorCorrectionInfo_64 colorCorrectionInfo
#define NTV2_SHOULD_BE_DEPRECATED(__f__)
All new NTV2 structs start with this common header.
NTV2RegWrites NTV2RegisterReads
NTV2FrameBufferFormat frameBufferFormat
ProgramState programState
uint16_t maxMasteringLuminance
std::vector< uint16_t > UWordSequence
An ordered sequence of UWord (uint16_t) values.
bool NTV2DeviceGetSupportedFrameRates(const NTV2DeviceID inDeviceID, NTV2FrameRateSet &outRates)
Returns a set of distinct NTV2FrameRate values supported on the given device.
#define NTV2_IS_INPUT_CROSSPOINT(__x__)
std::set< NTV2FrameGeometry > NTV2GeometrySet
A set of distinct NTV2FrameGeometry values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
UWordSequence::const_iterator UWordSequenceConstIter
A handy const iterator for iterating over a UWordSequence.
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
uint16_t maxMasteringLuminance
ULWord GetPointerSize(void) const
#define NTV2_RPC_CODEC_DECLS
NTV2HDMIProtocol
Indicates or specifies the HDMI protocol.
struct HevcMessageStatus HevcMessageStatus
The AutoCirculate channel is starting, waiting for the start time specified in the call to CNTV2Card:...
ULWord GetDroppedFrameCount(void) const
bool NTV2DeviceGetSupportedVideoFormats(const NTV2DeviceID inDeviceID, NTV2VideoFormatSet &outFormats)
Returns a set of distinct NTV2VideoFormat values supported on the given device.
enum _NTV2HDMIRegisters NTV2HDMIRegisters
ULWord64 audioClockCurrentTime
48kHz clock in reg 28 extended to 64 bits
uint16_t maxFrameAverageLightLevel
struct HevcPictureInfo HevcPictureInfo
AutoCircVidProcInfo vidProcInfo
double DBL(const int inIndex) const
std::string GetString(const size_t inU8Offset=0, const size_t inMaxSize=128) const
std::ostream & NTV2PrintAudioSystemSet(const NTV2AudioSystemSet &inObj, const bool inCompact=true, std::ostream &inOutStream=std::cout)
Streams a human-readable dump of the given NTV2AudioSystemSet into the specified output stream...
The AutoCirculate channel is stopped.
NTV2RegWrites::iterator NTV2RegisterWritesIter
bool WithRP188(void) const
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
NTV2FrameBufferFormat frameBufferFormat
#define NTV2_END_PROTECTED
void Clear(void)
Resets the struct to its initialized state.
enum _AutoCircCommand_ NTV2AutoCircCmd
NTV2QuarterSizeExpandMode videoQuarterSizeExpand
NTV2DIDSet::const_iterator NTV2DIDSetConstIter
Handy const iterator to iterate over an NTV2DIDSet.
std::set< NTV2AudioRate > NTV2AudioRateSet
A set of distinct NTV2AudioRate values. New in SDK 18.0.
LWord GetActiveFrame(void) const
ULWord getDestOffset(void) const
NTV2RoutingEntry & operator=(const NTV2RegInfo &inRHS)
Assigns an NTV2RegInfo to me.
LWord64 minEnqueueDuration
int8_t & I8(const int inIndex)
HDRRegValues & setDCIP3(void)
LWord64 minDequeueDuration
#define NTV2_IS_VALID_STRUCT_TYPE(_x_)
The AutoCirculate channel is paused.
NTV2Crosspoint channelSpec
bool IsPageAligned(void) const
This is used by the CNTV2Card::ReadRegisters function.
NTV2ColorCorrectionMode mode
uint16_t maxContentLightLevel
NTV2Crosspoint backgroundVideoCrosspoint
bool standardMultipleCheck
ULWord videoSegmentCardPitch
#define NTV2_BUILD_STRINGLENGTH
NTV2FrameSize & reset(void)
Sets both my width and height to zero (an invalid state).
const NTV2Buffer & GetVideoBuffer(void) const
bool validPrimariesAndWhitePoint(void) const
This is used to prelock a video/audio/anc buffer used as the source or target of DMA transfers...
NTV2AutoCirculateState
Describes the state of an AutoCirculate channel. See AUTOCIRCULATE_STATUS.
bool NTV2DeviceGetSupportedPixelFormats(const NTV2DeviceID inDeviceID, NTV2PixelFormats &outFormats)
Returns a set of distinct NTV2FrameBufferFormat values supported on the given device.
struct FRAME_STAMP_STRUCT FRAME_STAMP_STRUCT
ULWord getTotalElements(void) const
std::ostream & Print(std::ostream &oss) const
AutoCircRegisterTask registerTask
HevcGpioFunction gpioFunction
NTV2SegmentedXferInfo & setDestOffset(const ULWord inOffset)
Sets my destination offset.
ULWord getSourceEndOffset(void) const
This is used for bitstream maintainance. (New in SDK 16.0)
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
ULWord audioInStartAddress
For record - first position in buffer of audio (includes base offset)
ULWord videoSegmentCardPitch
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
LWord64 maxEnqueueDuration
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Returns a set of distinct NTV2OutputDest values supported on the given device.
uint16_t GetEndFrame(void) const
NTV2DIDSet::iterator NTV2DIDSetIter
Handy non-const iterator to iterate over an NTV2DIDSet.
ULWord GetCapturedAuxByteCount(const bool inField2=false) const
std::ostream & operator<<(std::ostream &inOutStr, const NTV2AudioChannelPairs &inSet)
Handy ostream writer for NTV2AudioChannelPairs.
const ULWord LUTTablePartitionSize
LWord64 lastInput2VerticalTimeStamp
#define NTV2_STREAM_CHANNEL_STATE_ACTIVE
Used in NTV2StreamChannel stream active.
struct NTV2RoutingEntry NTV2RoutingEntry
HevcStreamStatistics encStats[4]
NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter
A handy const iterator for iterating over an NTV2InputSourceSet.
std::string NTV2AutoCirculateStateToString(const NTV2AutoCirculateState inState)
#define AUTOCIRCULATE_WITH_FBOCHANGE
Use this to AutoCirculate with the possibility of frame buffer orientation changes.
#define NTV2_IS_VALID_HEADER_TAG(_x_)
void ClearResultStatus(void)
NTV2RegisterNumber RegisterNum
struct AUTOCIRCULATE_P2P_STRUCT CHANNEL_P2P_STRUCT
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
_NTV2XptValidROMRegisters
ULWord64 audioClockCurrentTime
union AutoCircGenericTask::@39 u
struct HevcMessageDebug HevcMessageDebug
#define HEVC_VERSION_STRING_SIZE
uint8_t staticMetadataDescriptorID
NTV2Buffer & outBadRegIndexes(void)
NTV2Crosspoint channelSpec
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
bool IsActive(void)
Is the stream active.
const FRAME_STAMP & GetFrameStamp(void) const
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
bool HasError(void)
Has the stream encountered an error.
LWord GetTransferFrameNumber(void) const
NTV2SegmentedXferInfo & setSourcePitch(const ULWord inPitch)
Sets my source pitch.
NTV2FrameGeometry
Identifies a particular video frame geometry.
ULWord64 messageBusAddress
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelOctet values.
uint16_t maxFrameAverageLightLevel
AutoCircVidProcInfo vidProcInfo
NTV2FrameSize & setWidth(const ULWord inValue)
Sets my width dimension.
NTV2Crosspoint channelSpec
NTV2RegNumSet GetRegisterNumbers(const NTV2RegReads &inRegInfos)
void Set(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Sets my fields from the given DBB, low and high ULWord components.
bool IsStopping(void) const
ULWord GetCapturedAncByteCount(const bool inField2=false) const
NTV2Crosspoint foregroundKeyCrosspoint
ULWordSequence GetU32s(const size_t inU32Offset=0, const size_t inMaxSize=32, const bool inByteSwap=false) const
Describes the horizontal and vertical size dimensions of a raster, bitmap, frame or image...
ULWord encTransferQueueLevel
NTV2SegmentedXferInfo & setSegmentLength(const ULWord inNumElements)
Sets my segment length.
#define NTV2_BITFILE_RESERVED_ULWORDS
std::vector< uint64_t > ULWord64Sequence
An ordered sequence of ULWord64 (uint64_t) values.
bool ResetUsing(const NTV2RegisterReads &inRegReads)
Resets me, starting over, using the given NTV2RegisterReads vector.
struct AUTOCIRCULATE_TRANSFER_STRUCT_64 * PAUTOCIRCULATE_TRANSFER_STRUCT_64
#define NTV2Buffer_PAGE_ALIGNED
Allocated page-aligned?
struct HevcMessageCommand HevcMessageCommand
Pointer64 ccLookupTables
only used in 3way color correction mode.
bool IsActive(void) const
AUTO_CIRC_COMMAND eCommand
This struct is used to augment the default full-frame AutoCirculate DMA transfer to accommodate multi...
NTV2RotaryEncoderRegister
#define NTV2_STRUCT_BEGIN(__struct_name__)
#define NTV2_BITFILE_PARTNAME_STRINGLENGTH
NTV2SegmentedXferInfo & setDestInfo(const ULWord inOffset, const ULWord inPitch)
A convenience function that sets both my destination offset and pitch.
NTV2ColorCorrectionMode mode
ULWord * ccLookupTables
only used in 3way color correction mode.
ULWord GetFrameCount(void) const
NTV2VideoFormatSet & operator+=(NTV2VideoFormatSet &inOutSet, const NTV2VideoFormatSet inSet)
Appends the given NTV2VideoFormatSet contents into the given set.
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
RP188_STRUCT LTCEmbedded3
#define HEVC_ADDITIONAL_DATA_SIZE
#define AUTOCIRCULATE_WITH_COLORCORRECT
Use this to AutoCirculate with color correction.
std::vector< NTV2_RP188 > NTV2TimeCodeList
An ordered sequence of zero or more NTV2_RP188 structures. An NTV2TCIndex enum value can be used as a...
struct HevcMessageInfo HevcMessageInfo
HevcGpioState gpioState[64]
#define NTV2_IS_OUTPUT_CROSSPOINT(__x__)
NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter
A const iterator that iterates over NTV2RegisterValueMap entries.
uint16_t U16(const int inIndex) const
Fixed_ transitionSoftness
ULWord numRegisters(void) const
NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter
Handy const iterator to iterate over an NTV2DoubleArray.
1: Standard/Retail: device configured by AJA ControlPanel, service/daemon, and driver.
Specifies channel or FrameStore 1 (or the first item).
~NTV2Bitstream()
My default destructor, which frees all allocatable fields that I own.
UWordSequence GetU16s(const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const
NTV2SegmentedXferInfo & setSourceFlipped(const bool inFlipped=Direction_Flipped)
Sets the scan direction for the source.
bool NTV2DeviceGetSupportedInputSources(const NTV2DeviceID inDeviceID, NTV2InputSourceSet &outInputSources, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Returns a set of distinct NTV2InputSource values supported on the given device.
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
struct ColorSpaceConverterCustomCoefficients NTV2CSCCustomCoeffs
#define NTV2_ASSERT_STRUCT_VALID
NTV2FrameSize & setHeight(const ULWord inValue)
Sets my height dimension.
Fixed_ transitionCoefficient
NTV2Crosspoint channelSpec
HevcDeviceMode deviceMode
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
ULWord currenthUser
Contains validCount (Play - reps remaining, Record - drops on frame)
bool SetBuffer(const ULWord *pInBuffer, const ULWord inByteCount)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock. ...
bool NTV2GetUnsupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of NTV2PixelFormat values not suported by any NTV2 device.
ULWord getSourcePitch(void) const
NTV2RegWritesIter NTV2RegisterReadsIter
NTV2RegInfo & setValue(const ULWord val)
bool toRegValues(HDRRegValues &outVals) const
NTV2FrameBufferFormat GetFrameBufferFormat(void) const
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
ULWord * ccLookupTables
only used in 3way color correction mode.
HDRFloatValues & zero(void)
bool operator<(const value_t lhs, const value_t rhs) noexcept
comparison operator for JSON types
ULWord & outNumFailures(void)
bool setFromRegValues(const HDRRegValues &inRegValues)
This object is embedded in the AUTOCIRCULATE_TRANSFER struct that's returned from the CNTV2Card::Auto...
uint64_t magnitude(void) const
ULWord videoSegmentHostPitch
ADV7189BProcAmpRegisters SD
ULWord dmaNumberOfSegments
bool HasAvailableInputFrame(void) const
Input (capture) mode, which writes into device SDRAM.
void EnableQuarterSizeExpandMode(void)
Enables quarter-size expansion mode.
bool NTV2DeviceGetSupportedGeometries(const NTV2DeviceID inDeviceID, NTV2GeometrySet &outGeometries)
Returns a set of distinct NTV2FrameGeometry values supported on the given device. ...
char userFirmwareSingle[64]
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
#define NTV2_DEPRECATED_17_5(__f__)
ULWord getSegmentLength(void) const
float FL(const int inIndex) const
bool isDestBottomUp(void) const
NTV2SegmentedXferInfo & setSegmentCount(const ULWord inNumSegments)
Sets my segment count.
ULWord currentAudioExpectedAddress
As set by play.
This class/object reports information about the current and/or requested AutoCirculate frame...
char userFirmwareMultiple[64]
std::map< NTV2FrameGeometry, ULWord > FGSizesMap
ULWord getSourceOffset(void) const
NTV2ChannelList::const_iterator NTV2ChannelListConstIter
A handy const iterator into an NTV2ChannelList.
#define NTV2_BUILD_RESERVED_BYTES
bool SetBuffer(const ULWord *pInBuffer, const ULWord inByteCount)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::LoadBitstream. ...
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
RP188_STRUCT currentRP188
Last vertical blank timecode (RP-188)
struct HevcDeviceInfo HevcDeviceInfo
ULWord GetConnectionID(void) const
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
const NTV2Buffer & regInfos(void) const
bool IsRunning(void) const
struct AUTOCIRCULATE_TRANSFER_STRUCT_32 * PAUTOCIRCULATE_TRANSFER_STRUCT_32
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
ULWord64Sequence::const_iterator ULWord64SequenceConstIter
A handy const iterator for iterating over a ULWord64Sequence.
VirtualProcAmpRegisters_base SD
CUSTOM_ANC_STRUCT customAncInfo
This field is obsolete. Do not use.
uint64_t U64(const int inIndex) const
void * GetHostPointer(void) const
struct AUTOCIRCULATE_TRANSFER_STRUCT * PAUTOCIRCULATE_TRANSFER_STRUCT
uint8_t staticMetadataDescriptorID
_NTV2NonPCMAudioDetectRegisters
RP188_STRUCT LTCEmbedded4
bool WithColorCorrect(void) const
NTV2SegmentedXferInfo & setDestDirection(const bool inTopDown)
Sets the scan direction for the destination.
This is used by the CNTV2Card::ReadSDIStatistics function.
NTV2RegWrites::iterator NTV2RegWritesIter
A handy non-const iterator for iterating over the contents of an NTV2RegisterWrites instance...
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Color correction data used with AUTOCIRCULATE_WITH_COLORCORRECT option.
uint8_t electroOpticalTransferFunction
ULWord GetCapturedAncByteCount(const bool inField2=false) const
ULWord & outNumRegisters(void)
std::set< NTV2AudioChannelOctet > NTV2AudioChannelOctets
A set of distinct NTV2AudioChannelOctet values.
#define NTV2Buffer_ALLOCATED
Allocated using Allocate function?
uint8_t & U8(const int inIndex)
struct HevcTransferData HevcTransferData
NTV2SegmentedXferInfo & setSourceInfo(const ULWord inOffset, const ULWord inPitch)
A convenience function that sets both my source offset and pitch.
uint8_t U8(const int inIndex) const
ULWord audioOutStopAddress
For play - first position in buffer of audio.
UByte additionalData[((4+4+256) *16)]
std::vector< NTV2RegInfo > NTV2RegisterWrites
NTV2FrameSize(const NTV2FrameGeometry inFG)
enum NTV2RXSDIStatusRegister NTV2RXSDIStatusRegisters
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
struct HevcMessageTransfer HevcMessageTransfer
LWord64 currentFrameTime
Vertical blank start of current frame.
UByte additionalData[((4+4+256) *16)]
NTV2Buffer & outGoodRegisterNumbers(void)
bool Fill(const T &inValue, const NTV2SegmentedXferInfo &inXferInfo)
Fills a portion of me with the given scalar value.
bool IsPaused(void) const
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
LWord64 avrDequeueDuration
std::string NTV2ChannelListToStr(const NTV2ChannelList &inObj, const bool inCompact=true)
HDRRegValues & zero(void)
NTV2FrameBufferFormat frameBufferFormat
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
#define NTV2_DEPRECATED_f(__f__)
NTV2AudioSystem GetAudioSystem(void) const
#define NTV2_BEGIN_PROTECTED
NTV2Crosspoint backgroundKeyCrosspoint
int32_t I32(const int inIndex) const
AutoCircTaskType taskType
NTV2QuarterSizeExpandMode videoQuarterSizeExpand
NTV2Crosspoint channelSpec
enum _NTV2NonPCMAudioDetectRegisters NTV2NonPCMAudioDetectRegisters
#define AUTOCIRCULATE_WITH_FIELDS
Use this to AutoCirculate with fields as frames for interlaced formats.
~NTV2StreamChannel()
My default destructor, which frees all allocatable fields that I own.
struct NTV2ColorCorrectionInfo_64 NTV2ColorCorrectionInfo_64
#define NTV2_BITFILE_DESIGNNAME_STRINGLENGTH
bool IsSegmented(void) const
LWord GetTransferFrame(void) const
ULWord GetQueueDepth(void)
Gets the queue depth.
AutoCircGenericTask * taskArray
#define AUTOCIRCULATE_WITH_HDMIAUX
Use this to AutoCirculate with HDMI auxiliary data.
bool IsFieldMode(void) const
NTV2Mode GetMode(void) const
ULWord videoFullRangeFlag
bool WithFBFChange(void) const
bool NTV2GetUnsupportedStandards(NTV2StandardSet &outStandards)
Returns a set of NTV2Standard values not suported by any NTV2 device.
NTV2LocalProcRegisterMask
This is used to enable or disable AJADebug logging in the driver.
HevcEncodedData encodedData
struct BITFILE_INFO_STRUCT * PBITFILE_INFO_STRUCT
NTV2Crosspoint foregroundVideoCrosspoint
Declares enums for virtual registers used in all platform drivers and the SDK.
~NTV2BufferLock()
My default destructor, which frees all allocatable fields that I own.
#define NTV2_STREAM_CHANNEL_STATE_IDLE
Used in NTV2StreamChannel stream idle.
HevcStreamStatistics rawStats[4]
NTV2HDMIBitDepth
Indicates or specifies the HDMI video bit depth.
const NTV2Buffer & GetAncBuffer(const bool inField2=false) const
struct HevcVersion HevcVersion
ULWord rawTransferQueueLevel
NTV2RegInfo & setShift(const ULWord val)
struct HDRRegValues HDRRegValues
defined(NTV2_DEPRECATE_17_6)
uint16_t GetStartFrame(void) const
void DisableQuarterSizeExpandMode(void)
Enables quarter-size expansion mode.
HDRRegValues & setBT2020(void)
bool WithVidProc(void) const
#define AUTOCIRCULATE_WITH_LTC
Use this to AutoCirculate with analog LTC.
ULWord getSegmentCount(void) const
struct AUTOCIRCULATE_TASK_STRUCT_32 * PAUTOCIRCULATE_TASK_STRUCT_32
ULWord64 audioClockStartTime
ULWord64 GetRawHostPointer(void) const
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
This is used by the CNTV2Card::WriteRegisters function.
ULWord64 audioClockTimeStamp
48kHz clock (in reg 28, extended to 64 bits) at time of play or record.
ULWord videoSegmentCardPitch
struct HevcDeviceRegister HevcDeviceRegister
NTV2FrameBufferFormatSetConstIter NTV2PixelFormatsConstIter
NTV2VideoFrameBufferOrientation frameBufferOrientation
ULWord videoSegmentHostPitch
#define MAX_ROUTING_ENTRIES
char standardFirmwareMultiple[64]
void Clear(void)
Resets the struct to its initialized state.
NTV2RegReadsConstIter FindFirstMatchingRegisterNumber(const uint32_t inRegNum, const NTV2RegReads &inRegInfos)
Returns a const iterator to the first entry in the NTV2RegInfo collection with a matching register nu...
bool isDestTopDown(void) const
All new NTV2 structs end with this common trailer.
struct AUTOCIRCULATE_P2P_STRUCT * PCHANNEL_P2P_STRUCT
NTV2QuarterSizeExpandMode videoQuarterSizeExpand
#define NTV2_BITFILE_DATETIME_STRINGLENGTH
ULWordSequence::iterator ULWordSequenceIter
A handy non-const iterator for iterating over a ULWordSequence.
ULWord currentFieldCount
At Call Field0 or Field1 currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter
A handy const iterator for iterating over an NTV2FrameBufferFormatSet.
NTV2AutoCirculateState GetState(void) const
uint16_t maxMasteringLuminance
struct HevcDeviceDebug HevcDeviceDebug