|
AJA NTV2 SDK
17.0.1.1246
NTV2 SDK 17.0.1.1246
|
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);
63 #define IS_VALID_AJAAncDataType(_x_) ((_x_) >= AJAAncDataType_Unknown && (_x_) < AJAAncDataType_Size)
64 #define IS_KNOWN_AJAAncDataType(_x_) ((_x_) > AJAAncDataType_Unknown && (_x_) < AJAAncDataType_Size)
88 #define IS_VALID_AJAAncDataLink(_x_) ((_x_) >= AJAAncDataLink_A && (_x_) < AJAAncDataLink_Unknown)
112 #define IS_VALID_AJAAncDataStream(_x_) ((_x_) >= AJAAncDataStream_1 && (_x_) < AJAAncDataStream_Unknown)
113 #define IS_LINKA_AJAAncDataStream(_x_) ((_x_) == AJAAncDataStream_1)
114 #define IS_LINKB_AJAAncDataStream(_x_) ((_x_) == AJAAncDataStream_2)
137 #define IS_VALID_AJAAncDataChannel(_x_) ((_x_) >= AJAAncDataChannel_C && (_x_) < AJAAncDataChannel_Unknown)
159 #define IS_VALID_AncChannelSearchSelect(_x_) ((_x_) >= AncChannelSearch_Y && (_x_) < AncChannelSearch_Invalid)
182 #define IS_VALID_AJAAncDataSpace(_x_) ((_x_) >= AJAAncDataSpace_VANC && (_x_) < AJAAncDataSpace_Unknown)
183 #define IS_HANC_AJAAncDataSpace(_x_) ((_x_) == AJAAncDataSpace_HANC)
184 #define IS_VANC_AJAAncDataSpace(_x_) ((_x_) == AJAAncDataSpace_VANC)
195 #define AJAAncDataLineNumber_Unknown uint16_t(0x0000)
196 #define AJAAncDataLineNumber_DontCare uint16_t(0x07FF)
197 #define AJAAncDataLineNumber_Anywhere (AJAAncDataLineNumber_DontCare)
198 #define AJAAncDataLineNumber_AnyVanc uint16_t(0x07FE)
199 #define AJAAncDataLineNumber_Future uint16_t(0x07FD)
201 #define IS_UNKNOWN_AJAAncDataLineNumber(_x_) ((_x_) == AJAAncDataLineNumber_Unknown)
202 #define IS_IRRELEVANT_AJAAncDataLineNumber(_x_) ((_x_) == AJAAncDataLineNumber_DontCare)
203 #define IS_GOOD_AJAAncDataLineNumber(_x_) ((_x_) > 0 && (_x_) < AJAAncDataLineNumber_DontCare)
208 #define AJAAncDataHorizOffset_Unknown uint16_t(0x0000)
209 #define AJAAncDataHorizOffset_Anywhere uint16_t(0x0FFF)
210 #define AJAAncDataHorizOffset_AnyHanc uint16_t(0x0FFE)
211 #define AJAAncDataHorizOffset_AnyVanc uint16_t(0x0FFD)
212 #define AJAAncDataHorizOffset_Future uint16_t(0x0FFC)
235 SetDataLink(inLink).SetDataChannel(inChannel).SetLineNumber(inLineNum).SetHorizontalOffset(inHorizOffset).SetDataStream(inStream);
241 bool equal = (GetDataLink() == inRHS.GetDataLink()
242 && GetDataStream() == inRHS.GetDataStream()
243 && GetDataChannel() == inRHS.GetDataChannel()
245 && GetLineNumber() == inRHS.GetLineNumber());
252 inline bool operator != (
const AJAAncDataLoc & inRHS)
const {
return !(*
this == inRHS);}
256 const uint64_t lhs (OrdinalValue());
283 virtual std::string CompareWithInfo (
const AJAAncDataLoc & inRHS)
const;
326 inline uint16_t GetLineNumber (
void)
const {
return mLineNum;}
346 std::ostream & Print (std::ostream & ostrm,
const bool inCompact =
true)
const;
368 #if AJA_NTV2_SDK_VERSION_AT_LEAST(16,3)
408 { inHOffset &= 0x0FFF;
410 mHorizOffset = inHOffset;
412 mHorizOffset = inHOffset;
414 mHorizOffset = inHOffset;
416 mHorizOffset = inHOffset;
433 return ((uint64_t(mLineNum) << 27)
434 | (uint64_t(GetDataSpace()) << 24)
436 | (uint64_t(mChannel) << 9)
437 | (uint64_t(mStream) << 2)
446 uint16_t mHorizOffset;
481 #define IS_VALID_AJAAncDataCoding(_x_) ((_x_) >= AJAAncDataCoding_Digital && (_x_) < AJAAncDataCoding_Size)
506 #define IS_VALID_AJAAncBufferFormat(_x_) ((_x_) >= AJAAncBufferFormat_Unknown && (_x_) < AJAAncBufferFormat_Size)
507 #define IS_KNOWN_AJAAncBufferFormat(_x_) ((_x_) > AJAAncBufferFormat_Unknown && (_x_) < AJAAncBufferFormat_Size)
573 virtual void Clear (
void);
583 virtual inline uint8_t GetDID (
void)
const {
return m_DID;}
584 virtual inline uint8_t GetSID (
void)
const {
return m_SID;}
585 virtual inline uint32_t GetDC (
void)
const {
return uint32_t(m_payload.size());}
588 virtual inline size_t GetPayloadByteCount (
void)
const {
return size_t(GetDC());}
589 virtual AJAAncDataType GetAncillaryDataType (
void)
const {
return m_ancType;}
590 virtual inline uint32_t GetFrameID (
void)
const {
return m_frameID;}
592 virtual inline const AJAAncDataLoc & GetDataLocation (
void)
const {
return m_location;}
593 virtual inline AJAAncDataLoc & GetDataLocation (
void) {
return m_location;}
594 virtual inline AJAAncDataCoding GetDataCoding (
void)
const {
return m_coding;}
596 virtual uint8_t GetChecksum (
void)
const {
return m_checksum;}
598 virtual inline AJAAncDataLink GetLocationVideoLink (
void)
const {
return GetDataLocation().GetDataLink();}
599 virtual inline AJAAncDataStream GetLocationDataStream (
void)
const {
return GetDataLocation().GetDataStream();}
600 virtual inline AJAAncDataChannel GetLocationDataChannel (
void)
const {
return GetDataLocation().GetDataChannel();}
602 virtual inline uint16_t GetLocationLineNumber (
void)
const {
return GetDataLocation().GetLineNumber();}
603 virtual inline uint16_t GetLocationHorizOffset (
void)
const {
return GetDataLocation().GetHorizontalOffset();}
604 virtual uint16_t GetStreamInfo (
void)
const;
605 virtual inline const uint64_t & UserData (
void)
const {
return m_userData;}
611 virtual inline bool IsEmpty (
void)
const {
return GetDC() == 0;}
612 virtual inline bool IsLumaChannel (
void)
const {
return GetDataLocation().IsLumaChannel ();}
613 virtual inline bool IsChromaChannel (
void)
const {
return GetDataLocation().IsChromaChannel ();}
614 virtual inline bool IsVanc (
void)
const {
return GetDataLocation().IsVanc ();}
615 virtual inline bool IsHanc (
void)
const {
return GetDataLocation().IsHanc ();}
629 virtual uint8_t Calculate8BitChecksum (
void)
const;
636 virtual uint16_t Calculate9BitChecksum (
void)
const;
643 virtual bool ChecksumOK (
void)
const {
return m_checksum == Calculate8BitChecksum ();}
657 virtual inline bool operator != (
const AJAAncillaryData & inRHS)
const {
return !(*
this == inRHS);}
666 virtual AJAStatus Compare (
const AJAAncillaryData & inRHS,
const bool inIgnoreLocation =
true,
const bool inIgnoreChecksum =
true)
const;
680 virtual AJAStatus SetDID (
const uint8_t inDataID);
687 virtual AJAStatus SetSID (
const uint8_t inSID);
705 virtual AJAStatus SetChecksum (
const uint8_t inChecksum8,
const bool inValidate =
false);
740 virtual AJAStatus SetLocationLineNumber (
const uint16_t inLineNum);
747 virtual AJAStatus SetLocationHorizOffset (
const uint16_t inOffset);
770 virtual inline uint64_t & UserData (
void) {
return m_userData;}
783 virtual uint8_t GetPayloadByteAtIndex (
const uint32_t inIndex0)
const;
788 virtual inline const uint8_t *
GetPayloadData (
void)
const {
return m_payload.empty() ?
NULL : &(m_payload[0]);}
796 virtual AJAStatus GetPayloadData (uint8_t * pBuffer,
const uint32_t inByteCapacity)
const;
818 virtual AJAStatus SetPayloadByteAtIndex (
const uint8_t inDataByte,
const uint32_t inIndex0);
826 virtual AJAStatus SetPayloadData (
const uint8_t * pInData,
const uint32_t inByteCount);
834 virtual AJAStatus AppendPayloadData (
const uint8_t * pInBuffer,
const uint32_t inByteCount);
856 virtual AJAStatus SetFromSMPTE334 (
const uint16_t * pInData,
const uint32_t inNumWords,
const AJAAncDataLoc & inLocInfo);
863 virtual AJAStatus ParsePayloadData (
void);
898 virtual AJAStatus InitWithReceivedData (
const uint8_t * pInData,
899 const size_t inMaxBytes,
901 uint32_t & outPacketByteCount);
908 virtual AJAStatus InitWithReceivedData (
const std::vector<uint8_t> & inData,
922 virtual AJAStatus InitWithReceivedData (
const ULWordSequence & inData, uint16_t & inOutStartIndex,
const bool inIgnoreChecksum =
false);
937 virtual AJAStatus GetRawPacketSize (uint32_t & outPacketSize)
const;
946 virtual AJAStatus GenerateTransmitData (uint8_t * pBuffer,
const size_t inMaxBytes, uint32_t & outPacketSize);
976 virtual std::ostream & Print (std::ostream & inOutStream,
const bool inDetailed =
false)
const;
983 virtual std::ostream & DumpPayload (std::ostream & inOutStream)
const;
993 virtual std::string CompareWithInfo (
const AJAAncillaryData & inRHS,
const bool inIgnoreLocation =
true,
const bool inIgnoreChecksum =
true)
const;
995 virtual std::string IDAsString (
void)
const;
1001 virtual std::string AsString (
const uint16_t inDumpMaxBytes = 0)
const;
1009 static std::string DIDSIDToString (
const uint8_t inDID,
const uint8_t inSDID);
1016 static uint16_t AddEvenParity (
const uint8_t inDataByte);
1039 static bool GetAncPacketsFromVANCLine (
const UWordSequence & inYUV16Line,
1058 static bool Unpack8BitYCbCrToU16sVANCLine (
const void * pInYUV8Line,
1060 const uint32_t inNumPixels);
1062 static void GetInstanceCounts (uint32_t & outConstructed, uint32_t & outDestructed);
1063 static uint32_t GetNumActiveInstances (
void);
1064 static uint32_t GetNumConstructed (
void);
1065 static uint32_t GetNumDestructed (
void);
1066 static void ResetInstanceCounts (
void);
1075 AJAStatus AllocDataMemory (
const uint32_t inNumBytes);
1079 virtual uint8_t GetGUMPHeaderByte2 (
void)
const;
1124 static bool BufferStartsWithRTPHeader (
const NTV2Buffer & inBuffer);
1126 static inline size_t GetHeaderWordCount (
void) {
return 5;}
1127 static inline size_t GetHeaderByteCount (
void) {
return GetHeaderWordCount() *
sizeof(uint32_t);}
1133 static const std::string & FieldSignalToString (
const uint8_t inFBits);
1144 virtual bool IsNULL (
void)
const;
1146 virtual bool IsValid (
void)
const;
1147 virtual inline bool IsEndOfFieldOrFrame (
void)
const {
return mMarkerBit;}
1148 virtual inline uint8_t GetPayloadType (
void)
const {
return mPayloadType;}
1149 virtual inline uint32_t GetSequenceNumber (
void)
const {
return mSequenceNumber;}
1150 virtual inline uint32_t GetTimeStamp (
void)
const {
return mTimeStamp;}
1151 virtual inline uint32_t GetSyncSourceID (
void)
const {
return mSyncSourceID;}
1152 virtual inline uint16_t GetPayloadLength (
void)
const {
return mPayloadLength;}
1153 virtual inline uint8_t GetAncPacketCount (
void)
const {
return mAncCount;}
1154 virtual inline uint8_t GetFieldSignal (
void)
const {
return mFieldSignal & 3;}
1155 virtual inline bool IsProgressive (
void)
const {
return mFieldSignal == 0;}
1156 virtual inline bool NoFieldSpecified (
void)
const {
return IsProgressive();}
1157 virtual inline bool IsField1 (
void)
const {
return mFieldSignal == 2;}
1158 virtual inline bool IsField2 (
void)
const {
return mFieldSignal == 3;}
1159 virtual inline bool IsValidFieldSignal (
void)
const {
return mFieldSignal != 1;}
1160 virtual inline bool HasPaddingBytes (
void)
const {
return mPBit;}
1161 virtual inline bool HasExtendedHeader (
void)
const {
return mXBit;}
1180 virtual std::ostream & Print (std::ostream & inOutStream)
const;
1195 virtual bool WriteToULWordVector (
ULWordSequence & outVector,
const bool inReset =
true)
const;
1205 virtual bool WriteToBuffer (
NTV2Buffer & outBuffer,
const ULWord inU32Offset = 0)
const;
1213 virtual bool ReadFromULWordVector (
const ULWordSequence & inVector);
1221 virtual bool ReadFromBuffer (
const NTV2Buffer & inBuffer);
1310 virtual bool SetFromPacketHeaderULWordAtIndex (
const unsigned inIndex0,
const uint32_t inULWord);
1325 virtual bool GetPacketHeaderULWordForIndex (
const unsigned inIndex0, uint32_t & outULWord)
const;
1339 uint8_t mPayloadType;
1340 uint32_t mSequenceNumber;
1341 uint32_t mTimeStamp;
1342 uint32_t mSyncSourceID;
1343 uint16_t mPayloadLength;
1347 uint8_t mFieldSignal;
1377 virtual uint32_t GetULWord (
void)
const;
1379 virtual inline bool IsCBitSet (
void)
const {
return mCBit;}
1380 virtual inline bool IsSBitSet (
void)
const {
return mSBit;}
1381 virtual inline uint16_t GetLineNumber (
void)
const {
return mLineNum;}
1382 virtual inline uint16_t GetHorizOffset (
void)
const {
return mHOffset;}
1383 virtual inline uint8_t GetStreamNumber (
void)
const {
return mStreamNum;}
1391 virtual std::ostream & Print (std::ostream & inOutStream)
const;
1464 virtual bool SetFromULWord (
const uint32_t inULWord);
1473 virtual bool ReadFromULWordVector (
const ULWordSequence & inVector,
const unsigned inIndex0);
1482 virtual bool WriteToULWordVector (
ULWordSequence & outVector,
const bool inReset =
true)
const;
1502 #if !defined(NTV2_DEPRECATE_16_3)
1521 #define AJAAncillaryDataChannel_C AJAAncDataChannel_C
1522 #define AJAAncillaryDataChannel_Both AJAAncDataChannel_Both
1523 #define AJAAncillaryDataChannel_Y AJAAncDataChannel_Y
1524 #define AJAAncillaryDataChannel_Unknown AJAAncDataChannel_Unknown
1525 #define AJAAncillaryDataChannel_Size AJAAncDataChannel_Size
1526 #define IS_VALID_AJAAncillaryDataVideoStream(_x_) (IS_VALID_AJAAncDataChannel(_x_))
1527 #define AJAAncillaryDataVideoStream_C AJAAncillaryDataChannel_C
1528 #define AJAAncillaryDataVideoStream_Y AJAAncillaryDataChannel_Y
1529 #define AJAAncillaryDataVideoStream_Unknown AJAAncillaryDataChannel_Unknown
1530 #define AJAAncillaryDataVideoStream_Size AJAAncillaryDataChannel_Size
1531 #define IS_VALID_AJAAncillaryDataChannel IS_VALID_AJAAncDataChannel
1532 #define AJAAncillaryDataChannelToString AJAAncDataChannelToString
1534 #define AJAAncillaryDataSpace_VANC AJAAncDataSpace_VANC
1535 #define AJAAncillaryDataSpace_HANC AJAAncDataSpace_HANC
1536 #define AJAAncillaryDataSpace_Unknown AJAAncDataSpace_Unknown
1537 #define AJAAncillaryDataSpace_Size AJAAncDataSpace_Size
1538 #define IS_VALID_AJAAncillaryDataSpace IS_VALID_AJAAncDataSpace
1539 #define IS_HANC_AJAAncillaryDataSpace IS_HANC_AJAAncDataSpace
1540 #define IS_VANC_AJAAncillaryDataSpace IS_VANC_AJAAncDataSpace
1541 #define AJAAncillaryDataSpaceToString AJAAncDataSpaceToString
1543 #define AJAAncillaryDataStream_1 AJAAncDataStream_1
1544 #define AJAAncillaryDataStream_2 AJAAncDataStream_2
1545 #define AJAAncillaryDataStream_3 AJAAncDataStream_3
1546 #define AJAAncillaryDataStream_4 AJAAncDataStream_4
1547 #define AJAAncillaryDataStream_Unknown AJAAncDataStream_Unknown
1548 #define AJAAncillaryDataStream_Size AJAAncDataStream_Size
1549 #define IS_VALID_AJAAncillaryDataStream IS_VALID_AJAAncDataStream
1550 #define IS_LINKA_AJAAncillaryDataStream IS_LINKA_AJAAncDataStream
1551 #define IS_LINKB_AJAAncillaryDataStream IS_LINKB_AJAAncDataStream
1552 #define AJAAncillaryDataStreamToString AJAAncDataStreamToString
1554 #define AJAAncillaryDataLink_A AJAAncDataLink_A
1555 #define AJAAncillaryDataLink_B AJAAncDataLink_B
1556 #define AJAAncillaryDataLink_LeftEye AJAAncDataLink_LeftEye
1557 #define AJAAncillaryDataLink_RightEye AJAAncDataLink_RightEye
1558 #define AJAAncillaryDataLink_Unknown AJAAncDataLink_Unknown
1559 #define AJAAncillaryDataLink_Size AJAAncDataLink_Size
1560 #define IS_VALID_AJAAncillaryDataLink IS_VALID_AJAAncDataLink
1561 #define AJAAncillaryDataLinkToString AJAAncDataLinkToString
1563 #define AJAAncillaryDataType_Unknown AJAAncDataType_Unknown
1564 #define AJAAncillaryDataType_Smpte2016_3 AJAAncDataType_Smpte2016_3
1565 #define AJAAncillaryDataType_Timecode_ATC AJAAncDataType_Timecode_ATC
1566 #define AJAAncillaryDataType_Timecode_VITC AJAAncDataType_Timecode_VITC
1567 #define AJAAncillaryDataType_Cea708 AJAAncDataType_Cea708
1568 #define AJAAncillaryDataType_Cea608_Vanc AJAAncDataType_Cea608_Vanc
1569 #define AJAAncillaryDataType_Cea608_Line21 AJAAncDataType_Cea608_Line21
1570 #define AJAAncillaryDataType_Smpte352 AJAAncDataType_Smpte352
1571 #define AJAAncillaryDataType_Smpte2051 AJAAncDataType_Smpte2051
1572 #define AJAAncillaryDataType_FrameStatusInfo524D AJAAncDataType_FrameStatusInfo524D
1573 #define AJAAncillaryDataType_FrameStatusInfo5251 AJAAncDataType_FrameStatusInfo5251
1574 #define AJAAncillaryDataType_HDR_SDR AJAAncDataType_HDR_SDR
1575 #define AJAAncillaryDataType_HDR_HDR10 AJAAncDataType_HDR_HDR10
1576 #define AJAAncillaryDataType_HDR_HLG AJAAncDataType_HDR_HLG
1577 #define AJAAncillaryDataType_Size AJAAncDataType_Size
1578 #define IS_VALID_AJAAncillaryDataType IS_VALID_AJAAncDataType
1579 #define IS_KNOWN_AJAAncillaryDataType IS_KNOWN_AJAAncDataType
1580 #define AJAAncillaryDataTypeToString AJAAncDataTypeToString
1581 #define AJAAncillaryData_AnalogDID AJAAncData_AnalogDID
1582 #define AJAAncillaryData_AnalogSID AJAAncData_AnalogSID
1584 #define AJAAncillaryDataCoding_Digital AJAAncDataCoding_Digital
1585 #define AJAAncillaryDataCoding_Raw AJAAncDataCoding_Raw
1586 #define AJAAncillaryDataCoding_Analog AJAAncDataCoding_Raw
1587 #define AJAAncillaryDataCoding_Unknown AJAAncDataCoding_Unknown
1588 #define AJAAncillaryDataCoding_Size AJAAncDataCoding_Size
1589 #define IS_VALID_AJAAncillaryDataCoding(_x_) IS_VALID_AJAAncDataCoding(_x_)
1590 #define AJAAncillaryDataCodingToString AJAAncDataCodingToString
1592 #define AJAAncillaryBufferFormat_Unknown AJAAncBufferFormat_Unknown
1593 #define AJAAncillaryBufferFormat_FBVANC AJAAncBufferFormat_FBVANC
1594 #define AJAAncillaryBufferFormat_SDI AJAAncBufferFormat_SDI
1595 #define AJAAncillaryBufferFormat_RTP AJAAncBufferFormat_RTP
1596 #define AJAAncillaryBufferFormat_Invalid AJAAncBufferFormat_Invalid
1597 #define AJAAncillaryBufferFormat_Size AJAAncBufferFormat_Invalid
1598 #define IS_VALID_AJAAncillaryBufferFormat(_x_) IS_VALID_AJAAncBufferFormat(_x_)
1599 #define IS_KNOWN_AJAAncillaryBufferFormat(_x_) IS_KNOWN_AJAAncBufferFormat(_x_)
1600 #define AJAAncillaryBufferFormatToString AJAAncBufferFormatToString
1601 #endif // !defined(NTV2_DEPRECATE_16_3)
1603 #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 line.
@ 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)
AJAAncBufferFormat m_bufferFmt
My originating buffer format, if known.
AJAAncillaryData AJAAncPacket
@ AJAAncDataLink_Unknown
It is not known which link of the video stream the ancillary data is associated with.
AJAAncDataLoc & Reset(void)
Resets all of my location elements to an unknown, invalid state.
@ AJAAncBufferFormat_Invalid
Invalid.
AJAAncDataLoc & SetDataStream(const AJAAncDataStream inStream)
Sets my data link value to the given value (if valid).
@ AJAAncDataLink_LeftEye
The ancillary data is associated with the Left Eye stereoscopic video stream.
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
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)
#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_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 ("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)
@ 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)
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")
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.