|
AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
Go to the documentation of this file.
8 #ifndef AJA_ANCILLARYDATA_H
9 #define AJA_ANCILLARYDATA_H
29 #define ToAJAAncPktDIDSID(_d_,_s_) (uint16_t((_d_) << 8) | uint16_t(_s_))
30 #define FromAJAAncPktDIDSID(_k_,_d_,_s_) (_d_) = uint8_t(((_k_) & 0xFF00) >> 8); (_d_) = uint8_t(_k_ & 0x00FF);
64 #define IS_VALID_AJAAncDataType(_x_) ((_x_) >= AJAAncDataType_Unknown && (_x_) < AJAAncDataType_Size)
65 #define IS_KNOWN_AJAAncDataType(_x_) ((_x_) > AJAAncDataType_Unknown && (_x_) < AJAAncDataType_Size)
89 #define IS_VALID_AJAAncDataLink(_x_) ((_x_) >= AJAAncDataLink_A && (_x_) < AJAAncDataLink_Unknown)
113 #define IS_VALID_AJAAncDataStream(_x_) ((_x_) >= AJAAncDataStream_1 && (_x_) < AJAAncDataStream_Unknown)
114 #define IS_LINKA_AJAAncDataStream(_x_) ((_x_) == AJAAncDataStream_1)
115 #define IS_LINKB_AJAAncDataStream(_x_) ((_x_) == AJAAncDataStream_2)
138 #define IS_VALID_AJAAncDataChannel(_x_) ((_x_) >= AJAAncDataChannel_C && (_x_) < AJAAncDataChannel_Unknown)
160 #define IS_VALID_AncChannelSearchSelect(_x_) ((_x_) >= AncChannelSearch_Y && (_x_) < AncChannelSearch_Invalid)
183 #define IS_VALID_AJAAncDataSpace(_x_) ((_x_) >= AJAAncDataSpace_VANC && (_x_) < AJAAncDataSpace_Unknown)
184 #define IS_HANC_AJAAncDataSpace(_x_) ((_x_) == AJAAncDataSpace_HANC)
185 #define IS_VANC_AJAAncDataSpace(_x_) ((_x_) == AJAAncDataSpace_VANC)
196 #define AJAAncDataLineNumber_Unknown uint16_t(0x0000)
197 #define AJAAncDataLineNumber_DontCare uint16_t(0x07FF)
198 #define AJAAncDataLineNumber_Anywhere (AJAAncDataLineNumber_DontCare)
199 #define AJAAncDataLineNumber_AnyVanc uint16_t(0x07FE)
200 #define AJAAncDataLineNumber_Future uint16_t(0x07FD)
202 #define IS_UNKNOWN_AJAAncDataLineNumber(_x_) ((_x_) == AJAAncDataLineNumber_Unknown)
203 #define IS_IRRELEVANT_AJAAncDataLineNumber(_x_) ((_x_) == AJAAncDataLineNumber_DontCare)
204 #define IS_GOOD_AJAAncDataLineNumber(_x_) ((_x_) > 0 && (_x_) < AJAAncDataLineNumber_DontCare)
209 #define AJAAncDataHorizOffset_Unknown uint16_t(0x0000)
210 #define AJAAncDataHorizOffset_Anywhere uint16_t(0x0FFF)
211 #define AJAAncDataHorizOffset_AnyHanc uint16_t(0x0FFE)
212 #define AJAAncDataHorizOffset_AnyVanc uint16_t(0x0FFD)
213 #define AJAAncDataHorizOffset_Future uint16_t(0x0FFC)
236 SetDataLink(inLink).SetDataChannel(inChannel).SetLineNumber(inLineNum).SetHorizontalOffset(inHorizOffset).SetDataStream(inStream);
242 bool equal = (GetDataLink() == inRHS.GetDataLink()
243 && GetDataStream() == inRHS.GetDataStream()
244 && GetDataChannel() == inRHS.GetDataChannel()
246 && GetLineNumber() == inRHS.GetLineNumber());
257 const uint64_t lhs (OrdinalValue());
284 virtual std::string CompareWithInfo (
const AJAAncDataLoc & inRHS)
const;
327 inline uint16_t GetLineNumber (
void)
const {
return mLineNum;}
347 std::ostream & Print (std::ostream & ostrm,
const bool inCompact =
true)
const;
369 #if AJA_NTV2_SDK_VERSION_AT_LEAST(16,3)
409 { inHOffset &= 0x0FFF;
411 mHorizOffset = inHOffset;
413 mHorizOffset = inHOffset;
415 mHorizOffset = inHOffset;
417 mHorizOffset = inHOffset;
434 return ((uint64_t(mLineNum) << 27)
435 | (uint64_t(GetDataSpace()) << 24)
437 | (uint64_t(mChannel) << 9)
438 | (uint64_t(mStream) << 2)
447 uint16_t mHorizOffset;
482 #define IS_VALID_AJAAncDataCoding(_x_) ((_x_) >= AJAAncDataCoding_Digital && (_x_) < AJAAncDataCoding_Size)
508 #define IS_VALID_AJAAncBufferFormat(_x_) ((_x_) >= AJAAncBufferFormat_Unknown && (_x_) < AJAAncBufferFormat_Size)
509 #define IS_KNOWN_AJAAncBufferFormat(_x_) ((_x_) > AJAAncBufferFormat_Unknown && (_x_) < AJAAncBufferFormat_Size)
575 virtual void Clear (
void);
585 virtual inline uint8_t GetDID (
void)
const {
return m_DID;}
586 virtual inline uint8_t GetSID (
void)
const {
return m_SID;}
587 virtual inline uint32_t GetDC (
void)
const {
return uint32_t(m_payload.size());}
590 virtual inline size_t GetPayloadByteCount (
void)
const {
return size_t(GetDC());}
591 virtual AJAAncDataType GetAncillaryDataType (
void)
const {
return m_ancType;}
592 virtual inline uint32_t GetFrameID (
void)
const {
return m_frameID;}
594 virtual inline const AJAAncDataLoc & GetDataLocation (
void)
const {
return m_location;}
595 virtual inline AJAAncDataLoc & GetDataLocation (
void) {
return m_location;}
596 virtual inline AJAAncDataCoding GetDataCoding (
void)
const {
return m_coding;}
598 virtual uint8_t GetChecksum (
void)
const {
return m_checksum;}
600 virtual inline AJAAncDataLink GetLocationVideoLink (
void)
const {
return GetDataLocation().GetDataLink();}
601 virtual inline AJAAncDataStream GetLocationDataStream (
void)
const {
return GetDataLocation().GetDataStream();}
602 virtual inline AJAAncDataChannel GetLocationDataChannel (
void)
const {
return GetDataLocation().GetDataChannel();}
604 virtual inline uint16_t GetLocationLineNumber (
void)
const {
return GetDataLocation().GetLineNumber();}
605 virtual inline uint16_t GetLocationHorizOffset (
void)
const {
return GetDataLocation().GetHorizontalOffset();}
606 virtual uint16_t GetStreamInfo (
void)
const;
607 virtual inline const uint64_t & UserData (
void)
const {
return m_userData;}
609 virtual uint8_t GetAuxType (
void)
const {
return m_auxType;}
610 virtual uint8_t GetAuxHB1 (
void)
const {
return m_auxHB1;}
611 virtual uint8_t GetAuxHB2 (
void)
const {
return m_auxHB2;}
617 virtual inline bool IsEmpty (
void)
const {
return GetDC() == 0;}
618 virtual inline bool IsLumaChannel (
void)
const {
return GetDataLocation().IsLumaChannel ();}
619 virtual inline bool IsChromaChannel (
void)
const {
return GetDataLocation().IsChromaChannel ();}
620 virtual inline bool IsVanc (
void)
const {
return GetDataLocation().IsVanc ();}
621 virtual inline bool IsHanc (
void)
const {
return GetDataLocation().IsHanc ();}
642 virtual uint8_t Calculate8BitChecksum (
void)
const;
649 virtual uint16_t Calculate9BitChecksum (
void)
const;
656 virtual bool ChecksumOK (
void)
const {
return m_checksum == Calculate8BitChecksum ();}
679 virtual AJAStatus Compare (
const AJAAncillaryData & inRHS,
const bool inIgnoreLocation =
true,
const bool inIgnoreChecksum =
true)
const;
693 virtual AJAStatus SetDID (
const uint8_t inDataID);
700 virtual AJAStatus SetSID (
const uint8_t inSID);
718 virtual AJAStatus SetChecksum (
const uint8_t inChecksum8,
const bool inValidate =
false);
753 virtual AJAStatus SetLocationLineNumber (
const uint16_t inLineNum);
760 virtual AJAStatus SetLocationHorizOffset (
const uint16_t inOffset);
783 virtual inline uint64_t & UserData (
void) {
return m_userData;}
796 virtual uint8_t GetPayloadByteAtIndex (
const uint32_t inIndex0)
const;
801 virtual inline const uint8_t *
GetPayloadData (
void)
const {
return m_payload.empty() ?
NULL : &(m_payload[0]);}
809 virtual AJAStatus GetPayloadData (uint8_t * pBuffer,
const uint32_t inByteCapacity)
const;
831 virtual AJAStatus SetPayloadByteAtIndex (
const uint8_t inDataByte,
const uint32_t inIndex0);
839 virtual AJAStatus SetPayloadData (
const uint8_t * pInData,
const uint32_t inByteCount);
847 virtual AJAStatus AppendPayloadData (
const uint8_t * pInBuffer,
const uint32_t inByteCount);
869 virtual AJAStatus SetFromSMPTE334 (
const uint16_t * pInData,
const uint32_t inNumWords,
const AJAAncDataLoc & inLocInfo);
876 virtual AJAStatus ParsePayloadData (
void);
911 virtual AJAStatus InitWithReceivedData (
const uint8_t * pInData,
912 const size_t inMaxBytes,
914 uint32_t & outPacketByteCount);
923 virtual AJAStatus InitAuxWithReceivedData (
const uint8_t * pInData,
924 const size_t inMaxBytes,
926 uint32_t & outPacketByteCount);
934 virtual AJAStatus InitWithReceivedData (
const std::vector<uint8_t> & inData,
948 virtual AJAStatus InitWithReceivedData (
const ULWordSequence & inData, uint16_t & inOutStartIndex,
const bool inIgnoreChecksum =
false);
963 virtual AJAStatus GetRawPacketSize (uint32_t & outPacketSize)
const;
972 virtual AJAStatus GenerateTransmitData (uint8_t * pBuffer,
const size_t inMaxBytes, uint32_t & outPacketSize);
1002 virtual std::ostream & Print (std::ostream & inOutStream,
const bool inDetailed =
false)
const;
1009 virtual std::ostream & DumpPayload (std::ostream & inOutStream)
const;
1019 virtual std::string CompareWithInfo (
const AJAAncillaryData & inRHS,
const bool inIgnoreLocation =
true,
const bool inIgnoreChecksum =
true)
const;
1021 virtual std::string IDAsString (
void)
const;
1027 virtual std::string AsString (
const uint16_t inDumpMaxBytes = 0)
const;
1035 static std::string DIDSIDToString (
const uint8_t inDID,
const uint8_t inSDID);
1042 static std::string AuxPacketTypeToString (
const uint8_t inAuxPktType);
1048 static bool AuxPacketTypeIsValid (
const uint8_t inAuxPktType);
1058 static uint16_t AddEvenParity (
const uint8_t inDataByte);
1081 static bool GetAncPacketsFromVANCLine (
const UWordSequence & inYUV16Line,
1104 static bool Unpack8BitYCbCrToU16sVANCLine (
const void * pInYUV8Line,
1106 const uint32_t inNumPixels);
1126 static bool Unpack8BitYCbCrToU16sVANCLineSD (
const void * pInYUV8Line,
1128 const uint32_t inNumPixels);
1130 static void GetInstanceCounts (uint32_t & outConstructed, uint32_t & outDestructed);
1131 static uint32_t GetNumActiveInstances (
void);
1132 static uint32_t GetNumConstructed (
void);
1133 static uint32_t GetNumDestructed (
void);
1134 static void ResetInstanceCounts (
void);
1143 AJAStatus AllocDataMemory (
const uint32_t inNumBytes);
1147 virtual uint8_t GetGUMPHeaderByte2 (
void)
const;
1196 static bool BufferStartsWithRTPHeader (
const NTV2Buffer & inBuffer);
1198 static inline size_t GetHeaderWordCount (
void) {
return 5;}
1199 static inline size_t GetHeaderByteCount (
void) {
return GetHeaderWordCount() *
sizeof(uint32_t);}
1205 static const std::string & FieldSignalToString (
const uint8_t inFBits);
1216 virtual bool IsNULL (
void)
const;
1218 virtual bool IsValid (
void)
const;
1219 virtual inline bool IsEndOfFieldOrFrame (
void)
const {
return mMarkerBit;}
1220 virtual inline uint8_t GetPayloadType (
void)
const {
return mPayloadType;}
1221 virtual inline uint32_t GetSequenceNumber (
void)
const {
return mSequenceNumber;}
1222 virtual inline uint32_t GetTimeStamp (
void)
const {
return mTimeStamp;}
1223 virtual inline uint32_t GetSyncSourceID (
void)
const {
return mSyncSourceID;}
1224 virtual inline uint16_t GetPayloadLength (
void)
const {
return mPayloadLength;}
1225 virtual inline uint8_t GetAncPacketCount (
void)
const {
return mAncCount;}
1226 virtual inline uint8_t GetFieldSignal (
void)
const {
return mFieldSignal & 3;}
1227 virtual inline bool IsProgressive (
void)
const {
return mFieldSignal == 0;}
1228 virtual inline bool NoFieldSpecified (
void)
const {
return IsProgressive();}
1229 virtual inline bool IsField1 (
void)
const {
return mFieldSignal == 2;}
1230 virtual inline bool IsField2 (
void)
const {
return mFieldSignal == 3;}
1231 virtual inline bool IsValidFieldSignal (
void)
const {
return mFieldSignal != 1;}
1232 virtual inline bool HasPaddingBytes (
void)
const {
return mPBit;}
1233 virtual inline bool HasExtendedHeader (
void)
const {
return mXBit;}
1252 virtual std::ostream & Print (std::ostream & inOutStream)
const;
1267 virtual bool WriteToULWordVector (
ULWordSequence & outVector,
const bool inReset =
true)
const;
1277 virtual bool WriteToBuffer (
NTV2Buffer & outBuffer,
const ULWord inU32Offset = 0)
const;
1285 virtual bool ReadFromULWordVector (
const ULWordSequence & inVector);
1293 virtual bool ReadFromBuffer (
const NTV2Buffer & inBuffer);
1382 virtual bool SetFromPacketHeaderULWordAtIndex (
const unsigned inIndex0,
const uint32_t inULWord);
1397 virtual bool GetPacketHeaderULWordForIndex (
const unsigned inIndex0, uint32_t & outULWord)
const;
1411 uint8_t mPayloadType;
1412 uint32_t mSequenceNumber;
1413 uint32_t mTimeStamp;
1414 uint32_t mSyncSourceID;
1415 uint16_t mPayloadLength;
1419 uint8_t mFieldSignal;
1449 virtual uint32_t GetULWord (
void)
const;
1451 virtual inline bool IsCBitSet (
void)
const {
return mCBit;}
1452 virtual inline bool IsSBitSet (
void)
const {
return mSBit;}
1453 virtual inline uint16_t GetLineNumber (
void)
const {
return mLineNum;}
1454 virtual inline uint16_t GetHorizOffset (
void)
const {
return mHOffset;}
1455 virtual inline uint8_t GetStreamNumber (
void)
const {
return mStreamNum;}
1463 virtual std::ostream & Print (std::ostream & inOutStream)
const;
1536 virtual bool SetFromULWord (
const uint32_t inULWord);
1545 virtual bool ReadFromULWordVector (
const ULWordSequence & inVector,
const unsigned inIndex0);
1554 virtual bool WriteToULWordVector (
ULWordSequence & outVector,
const bool inReset =
true)
const;
1574 #if !defined(NTV2_DEPRECATE_16_3)
1593 #define AJAAncillaryDataChannel_C AJAAncDataChannel_C
1594 #define AJAAncillaryDataChannel_Both AJAAncDataChannel_Both
1595 #define AJAAncillaryDataChannel_Y AJAAncDataChannel_Y
1596 #define AJAAncillaryDataChannel_Unknown AJAAncDataChannel_Unknown
1597 #define AJAAncillaryDataChannel_Size AJAAncDataChannel_Size
1598 #define IS_VALID_AJAAncillaryDataVideoStream(_x_) (IS_VALID_AJAAncDataChannel(_x_))
1599 #define AJAAncillaryDataVideoStream_C AJAAncillaryDataChannel_C
1600 #define AJAAncillaryDataVideoStream_Y AJAAncillaryDataChannel_Y
1601 #define AJAAncillaryDataVideoStream_Unknown AJAAncillaryDataChannel_Unknown
1602 #define AJAAncillaryDataVideoStream_Size AJAAncillaryDataChannel_Size
1603 #define IS_VALID_AJAAncillaryDataChannel IS_VALID_AJAAncDataChannel
1604 #define AJAAncillaryDataChannelToString AJAAncDataChannelToString
1606 #define AJAAncillaryDataSpace_VANC AJAAncDataSpace_VANC
1607 #define AJAAncillaryDataSpace_HANC AJAAncDataSpace_HANC
1608 #define AJAAncillaryDataSpace_Unknown AJAAncDataSpace_Unknown
1609 #define AJAAncillaryDataSpace_Size AJAAncDataSpace_Size
1610 #define IS_VALID_AJAAncillaryDataSpace IS_VALID_AJAAncDataSpace
1611 #define IS_HANC_AJAAncillaryDataSpace IS_HANC_AJAAncDataSpace
1612 #define IS_VANC_AJAAncillaryDataSpace IS_VANC_AJAAncDataSpace
1613 #define AJAAncillaryDataSpaceToString AJAAncDataSpaceToString
1615 #define AJAAncillaryDataStream_1 AJAAncDataStream_1
1616 #define AJAAncillaryDataStream_2 AJAAncDataStream_2
1617 #define AJAAncillaryDataStream_3 AJAAncDataStream_3
1618 #define AJAAncillaryDataStream_4 AJAAncDataStream_4
1619 #define AJAAncillaryDataStream_Unknown AJAAncDataStream_Unknown
1620 #define AJAAncillaryDataStream_Size AJAAncDataStream_Size
1621 #define IS_VALID_AJAAncillaryDataStream IS_VALID_AJAAncDataStream
1622 #define IS_LINKA_AJAAncillaryDataStream IS_LINKA_AJAAncDataStream
1623 #define IS_LINKB_AJAAncillaryDataStream IS_LINKB_AJAAncDataStream
1624 #define AJAAncillaryDataStreamToString AJAAncDataStreamToString
1626 #define AJAAncillaryDataLink_A AJAAncDataLink_A
1627 #define AJAAncillaryDataLink_B AJAAncDataLink_B
1628 #define AJAAncillaryDataLink_LeftEye AJAAncDataLink_LeftEye
1629 #define AJAAncillaryDataLink_RightEye AJAAncDataLink_RightEye
1630 #define AJAAncillaryDataLink_Unknown AJAAncDataLink_Unknown
1631 #define AJAAncillaryDataLink_Size AJAAncDataLink_Size
1632 #define IS_VALID_AJAAncillaryDataLink IS_VALID_AJAAncDataLink
1633 #define AJAAncillaryDataLinkToString AJAAncDataLinkToString
1635 #define AJAAncillaryDataType_Unknown AJAAncDataType_Unknown
1636 #define AJAAncillaryDataType_Smpte2016_3 AJAAncDataType_Smpte2016_3
1637 #define AJAAncillaryDataType_Timecode_ATC AJAAncDataType_Timecode_ATC
1638 #define AJAAncillaryDataType_Timecode_VITC AJAAncDataType_Timecode_VITC
1639 #define AJAAncillaryDataType_Cea708 AJAAncDataType_Cea708
1640 #define AJAAncillaryDataType_Cea608_Vanc AJAAncDataType_Cea608_Vanc
1641 #define AJAAncillaryDataType_Cea608_Line21 AJAAncDataType_Cea608_Line21
1642 #define AJAAncillaryDataType_Smpte352 AJAAncDataType_Smpte352
1643 #define AJAAncillaryDataType_Smpte2051 AJAAncDataType_Smpte2051
1644 #define AJAAncillaryDataType_FrameStatusInfo524D AJAAncDataType_FrameStatusInfo524D
1645 #define AJAAncillaryDataType_FrameStatusInfo5251 AJAAncDataType_FrameStatusInfo5251
1646 #define AJAAncillaryDataType_HDR_SDR AJAAncDataType_HDR_SDR
1647 #define AJAAncillaryDataType_HDR_HDR10 AJAAncDataType_HDR_HDR10
1648 #define AJAAncillaryDataType_HDR_HLG AJAAncDataType_HDR_HLG
1649 #define AJAAncillaryDataType_Size AJAAncDataType_Size
1650 #define IS_VALID_AJAAncillaryDataType IS_VALID_AJAAncDataType
1651 #define IS_KNOWN_AJAAncillaryDataType IS_KNOWN_AJAAncDataType
1652 #define AJAAncillaryDataTypeToString AJAAncDataTypeToString
1653 #define AJAAncillaryData_AnalogDID AJAAncData_AnalogDID
1654 #define AJAAncillaryData_AnalogSID AJAAncData_AnalogSID
1656 #define AJAAncillaryDataCoding_Digital AJAAncDataCoding_Digital
1657 #define AJAAncillaryDataCoding_Raw AJAAncDataCoding_Raw
1658 #define AJAAncillaryDataCoding_Analog AJAAncDataCoding_Raw
1659 #define AJAAncillaryDataCoding_Unknown AJAAncDataCoding_Unknown
1660 #define AJAAncillaryDataCoding_Size AJAAncDataCoding_Size
1661 #define IS_VALID_AJAAncillaryDataCoding(_x_) IS_VALID_AJAAncDataCoding(_x_)
1662 #define AJAAncillaryDataCodingToString AJAAncDataCodingToString
1664 #define AJAAncillaryBufferFormat_Unknown AJAAncBufferFormat_Unknown
1665 #define AJAAncillaryBufferFormat_FBVANC AJAAncBufferFormat_FBVANC
1666 #define AJAAncillaryBufferFormat_SDI AJAAncBufferFormat_SDI
1667 #define AJAAncillaryBufferFormat_RTP AJAAncBufferFormat_RTP
1668 #define AJAAncillaryBufferFormat_Invalid AJAAncBufferFormat_Invalid
1669 #define AJAAncillaryBufferFormat_Size AJAAncBufferFormat_Invalid
1670 #define IS_VALID_AJAAncillaryBufferFormat(_x_) IS_VALID_AJAAncBufferFormat(_x_)
1671 #define IS_KNOWN_AJAAncillaryBufferFormat(_x_) IS_KNOWN_AJAAncBufferFormat(_x_)
1672 #define AJAAncillaryBufferFormatToString AJAAncBufferFormatToString
1673 #endif // !defined(NTV2_DEPRECATE_16_3)
1675 #endif // AJA_ANCILLARYDATA_H
uint64_t OrdinalValue(void) const
static uint8_t GetGUMPHeaderByte1(void)
uint32_t m_frameID
ID of my originating frame, if known.
@ AJAAncBufferFormat_FBVANC
Frame buffer VANC lines.
@ AJAAncDataStream_3
The ancillary data is associated with DS3 of the video stream (Link B).
AJAAncDataSpace AJAAncillaryDataSpace
const std::string & AJAAncDataLinkToString(const AJAAncDataLink inValue, const bool inCompact=true)
const std::string & AJAAncillaryDataVideoStreamToString(const AJAAncillaryDataVideoStream inValue, const bool inCompact=true)
Defines where the ancillary data can be found within a video stream.
bool IsDataLinkB(void) const
@ AJAAncDataChannel_Unknown
It is not known which channel of the video stream the ancillary data is associated with.
uint64_t m_userData
User data (for client use)
virtual bool HasStreamInfo(void) const
#define AJAAncDataLineNumber_Unknown
Packet line number is unknown.
@ AJAAncDataType_Cea608_Vanc
CEA608 SD Closed Captioning (SMPTE 334 VANC packet)
std::vector< uint8_t > ByteVector
uint8_t m_DID
Official SMPTE ancillary packet ID (w/o parity)
AJAAncDataLink AJAAncillaryDataLink
bool IsChromaChannel(void) const
virtual bool ChecksumOK(void) const
Compares the received 8-bit checksum with a newly calculated 8-bit checksum. Returns 'true' if they m...
#define IS_VALID_AJAAncDataSpace(_x_)
@ AJAAncDataType_Unknown
Includes data that is valid, but we don't recognize.
AJAAncDataType AJAAncillaryDataType
Declares common types used in the ajabase library.
#define IS_VALID_AJAAncDataLink(_x_)
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
const std::string & AJAAncDataSpaceToString(const AJAAncDataSpace inValue, const bool inCompact=true)
std::string AJAAncDataLocToString(const AJAAncDataLoc &inValue, const bool inCompact=true)
#define ToAJAAncPktDIDSID(_d_, _s_)
AJAAncillaryData AJAAncData
ByteVector::size_type ByteVectorIndex
AJAAncDataChannel
Identifies which component of a video stream in which the ancillary data is placed or found.
@ AJAAncDataCoding_Unknown
It is not known which coding type the ancillary data is using.
AJAAncDataLoc m_location
Location of the ancillary data in the video stream (Y or C, HANC or VANC, etc.)
AJAAncDataLoc & SetLineNumber(const uint16_t inLineNum)
Sets my anc data line number value.
AJAAncillaryDataChannel AJAAncillaryDataVideoStream
@ AncChannelSearch_C
Only look in chroma samples.
AJAAncDataSpace
Identified the raster section of a video stream that contains the ancillary data. Deprecated in favor...
@ AJAAncBufferFormat_Size
@ AJAAncDataLink_B
The ancillary data is associated with Link B of the video stream.
ByteVector::const_iterator ByteVectorConstIter
@ AJAAncDataType_Smpte352
SMPTE 352 "Payload ID".
AJAAncDataType
Identifies the ancillary data types that are known to this module.
virtual AJAStatus GeneratePayloadData(void)
Generates the payload data from the "local" ancillary data.
@ AJAAncDataType_Timecode_VITC
SMPTE 12-M Vertical Interval Timecode (aka "VITC")
const std::string & AJAAncDataTypeToString(const AJAAncDataType inValue, const bool inCompact=true)
bool operator<(const value_t lhs, const value_t rhs) noexcept
comparison operator for JSON types
AJAAncBufferFormat m_bufferFmt
My originating buffer format, if known.
AJAAncillaryData AJAAncPacket
AJAAncillaryData AJAAuxiliaryData
@ AJAAncDataLink_Unknown
It is not known which link of the video stream the ancillary data is associated with.
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
AJAAncDataLoc & Reset(void)
Resets all of my location elements to an unknown, invalid state.
@ AJAAncBufferFormat_Invalid
Invalid.
uint8_t m_auxType
HDMI Aux Header Byte 0 (Packet Type)
AJAAncDataLoc & SetDataStream(const AJAAncDataStream inStream)
Sets my data link value to the given value (if valid).
AJAAncillaryData AJAAuxPacket
@ AJAAncDataLink_LeftEye
The ancillary data is associated with the Left Eye stereoscopic video stream.
@ AJAAncBufferFormat_HDMI
HDMI.
Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal devel...
@ AJAAncDataCoding_Raw
The ancillary data is in the form of a digitized waveform (e.g. CEA-608 captions, VITC,...
#define AJAAncDataHorizOffset_Anywhere
Unspecified – Packet placed/found in any legal area of raster line.
std::string AncChannelSearchSelectToString(const AncChannelSearchSelect inSelect, const bool inCompact=true)
bool IsDataLinkA(void) const
bool IsLumaChannel(void) const
virtual bool isHDMIAuxInfoFrame(void) const
Returns whether or not this is an HDMI Aux Info Frame Packet.
uint16_t GetHorizontalOffset(void) const
virtual AJAStatus SetDIDSID(const AJAAncDIDSIDPair &inDIDSID)
Sets both my Data ID (DID) and Secondary Data ID (SID).
virtual std::ostream & Print(std::ostream &inOutStream, const bool inDetailed=false) const
Streams a human-readable representation of me to the given output stream.
const std::string & AJAAncBufferFormatToString(const AJAAncBufferFormat inValue, const bool inCompact=true)
uint8_t m_auxHB2
HDMI Aux Header Byte 2 (Header Data)
#define AJAAncDataHorizOffset_AnyVanc
VANC – Packet placed/found in any legal area of raster line after SAV, but before EAV.
@ AJAAncDataSpace_HANC
Ancillary data found between EAV and SAV (.
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
@ AJAAncDataChannel_Y
The ancillary data is associated with the luminance (Y) channel of the video stream.
virtual bool GotValidReceiveData(void) const
virtual const uint8_t * GetPayloadData(void) const
std::vector< uint16_t > UWordSequence
An ordered sequence of UWord (uint16_t) values.
AJAAncDataLoc & SetDataSpace(const AJAAncDataSpace inSpace)
Sets my data space value to the given value (if valid).
std::string AJAAncHorizOffsetToString(const uint16_t inValue)
std::pair< uint8_t, uint8_t > AJAAncDIDSIDPair
AJAAncDataCoding m_coding
Analog or digital data.
AJAAncDataStream
Identifies which data stream the ancillary data is associated with.
AJAAncDataLoc * AJAAncDataLocPtr
@ AJAAncDataType_HDMI_Aux
HDMI Auxiliary data.
@ AJAAncDataType_Smpte2016_3
SMPTE 2016-3 VANC Aspect Format Description (AFD) metadata.
virtual AJAAncillaryData & SetBufferFormat(const AJAAncBufferFormat inFmt)
Sets my originating buffer format.
@ AJAAncBufferFormat_SDI
SDI (AJA "GUMP")
struct AJAAncDataLoc AJAAncDataLoc
Defines where the ancillary data can be found within a video stream.
Defines for the NTV2 SDK version number, used by ajantv2/includes/ntv2enums.h. See the ajantv2/includ...
AJAAncDataChannel AJAAncillaryDataChannel
#define IS_VALID_AJAAncDataChannel(_x_)
bool m_rcvDataValid
This is set true (or not) by ParsePayloadData()
#define IS_VALID_AJAAncDataStream(_x_)
AJAAncDataLoc & SetHorizontalOffset(uint16_t inHOffset)
Specifies the horizontal packet position in the raster.
#define AJAAncDataHorizOffset_AnyHanc
HANC – Packet placed/found in any legal area of raster line after EAV.
AJAAncDataLink
Identifies which link of a video stream the ancillary data is associated with.
virtual AJAStatus AppendPayload(const AJAAncillaryData *pInAncData)
uint8_t m_SID
Official SMPTE secondary ID (or DBN - w/o parity)
virtual AJAAncillaryData & SetFrameID(const uint32_t inFrameID)
Sets my originating frame identifier.
uint16_t AJAAncPktDIDSID
Packet DID/SID pair: DID (MS 8 bits) and SID (LS 8 bits)
AJAAncDataCoding AJAAncillaryDataCoding
@ AJAAncDataType_FrameStatusInfo5251
Frame Status Information, such as Active Frame flag.
const std::string & AJAAncDataStreamToString(const AJAAncDataStream inValue, const bool inCompact=true)
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
@ AJAAncDataType_Smpte2051
SMPTE 2051 "Two Frame Marker".
#define NTV2_DEPRECATED_f(__f__)
@ AJAAncDataStream_1
The ancillary data is associated with DS1 of the video stream (Link A).
ByteVector m_payload
My payload data (DC = size)
@ AJAAncDataChannel_C
The ancillary data is associated with the chrominance (C) channel of the video stream.
AJAAncBufferFormat AJAAncillaryBufferFormat
#define IS_HANC_AJAAncDataSpace(_x_)
#define IS_VANC_AJAAncDataSpace(_x_)
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
@ AJAAncDataType_Cea708
CEA708 (SMPTE 334) HD Closed Captioning.
const std::string & AJAAncDataCodingToString(const AJAAncDataCoding inValue, const bool inCompact=true)
AncChannelSearchSelect
Specifies which channel of a video stream in which to look for Anc data.
@ AJAAncDataStream_4
The ancillary data is associated with DS4 of the video stream (Link B).
AJAAncDataLoc & SetDataLink(const AJAAncDataLink inLink)
Sets my data link value to the given value (if valid).
const uint8_t AJAAncData_AnalogSID
const std::string & AJAAncDataChannelToString(const AJAAncDataChannel inValue, const bool inCompact=true)
@ AncChannelSearch_Invalid
Invalid.
@ AJAAncDataStream_2
The ancillary data is associated with DS2 of the video stream (Link A).
@ AJAAncDataLink_RightEye
The ancillary data is associated with the Right Eye stereoscopic video stream.
@ AJAAncDataType_FrameStatusInfo524D
Frame Status Information, such as Active Frame flag.
@ AJAAncDataCoding_Digital
The ancillary data is in the form of a SMPTE-291 Ancillary Packet.
AJAAncDataCoding
Identifies the ancillary data coding type: digital or non-digital (analog/raw).
AJAAncBufferFormat
Identifies the type of anc buffer the packet originated from: GUMP, RTP, VANC, or unknown.
#define AJAAncDataHorizOffset_Unknown
Unknown.
@ AJAAncBufferFormat_RTP
RTP/IP.
bool IsRaw(const NTV2FrameBufferFormat format)
AJAAncDataLoc(const AJAAncDataLink inLink=AJAAncDataLink_Unknown, const AJAAncDataChannel inChannel=AJAAncDataChannel_Unknown, const AJAAncDataSpace inIgnored=AJAAncDataSpace_Unknown, const uint16_t inLineNum=uint16_t(0x0000), const uint16_t inHorizOffset=uint16_t(0x0000), const AJAAncDataStream inStream=AJAAncDataStream_1)
AJAAncDataLoc & SetDataVideoStream(const AJAAncDataChannel inChannel)
uint8_t m_auxHB1
HDMI Aux Header Byte 1 (Header Data)
Declares enums and structs used by all platform drivers and the SDK.
AJAAncDataLoc & SetDataChannel(const AJAAncDataChannel inChannel)
Sets my data video stream value to the given value (if valid).
const uint8_t AJAAncData_AnalogDID
@ AJAAncDataSpace_VANC
Ancillary data found between SAV and EAV (.
@ AJAAncDataStream_Unknown
It is not known which data stream the ancillary data is associated with.
AJAAncDataType m_ancType
One of a known set of ancillary data types (or "Custom" if not identified)
@ AJAAncBufferFormat_Unknown
Unknown or "don't care".
std::ostream & operator<<(std::ostream &inOutStream, const AJAAncDIDSIDPair &inData)
Writes a human-readable rendition of the given AJAAncDIDSIDPair into the given output stream.
AJAAncillaryDataLocation * AJAAncillaryDataLocationPtr
@ AJAAncDataSpace_Unknown
It's unknown which raster section contains the ancillary data (.
@ AJAAncDataType_Cea608_Line21
CEA608 SD Closed Captioning ("Line 21" waveform)
std::pair< uint8_t, uint8_t > AJAAncillaryDIDSIDPair
A DID/SID pair, typically used as an indexing key.
virtual uint8_t GetGUMPHeaderByte3(void) const
enum AJAAncDataStream AJAAncillaryDataStream
@ AJAAncDataLink_A
The ancillary data is associated with Link A of the video stream.
@ AJAAncDataChannel_Both
SD ONLY – The ancillary data is associated with both the chroma and luma channels.
std::vector< U16Packet > U16Packets
An ordered sequence of zero or more U16Packet values.
@ AJAAncDataType_Timecode_ATC
SMPTE 12-M Ancillary Timecode (formerly known as "RP-188")
AJAAncillaryData AJAAuxData
UWordSequence U16Packet
An ordered sequence of 10-bit packet words stored in uint16_t values.
uint8_t m_checksum
My 8-bit checksum: DID + SID + DC + payload (w/o parity) [note: NOT the same as the 9-bit checksum in...
@ AncChannelSearch_Both
Look both luma and chroma samples (SD only)
@ AJAAncDataType_HDR_HDR10
std::string AJAAncLineNumberToString(const uint16_t inValue)
AJAAncDataLoc AJAAncillaryDataLocation
AJAAncDataSpace GetDataSpace(void) const
@ AncChannelSearch_Y
Only look in luma samples.