AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
AJAAncillaryData_FrameStatusInfo5251 Class Reference

This class handles "5251" Frame Status Information packets. More...

#include <ancillarydata_framestatusinfo5251.h>

Inheritance diagram for AJAAncillaryData_FrameStatusInfo5251:
[legend]
Collaboration diagram for AJAAncillaryData_FrameStatusInfo5251:
[legend]

Public Member Functions

 AJAAncillaryData_FrameStatusInfo5251 ()
 My default constructor. More...
 
 AJAAncillaryData_FrameStatusInfo5251 (const AJAAncillaryData_FrameStatusInfo5251 &inClone)
 My copy constructor. More...
 
 AJAAncillaryData_FrameStatusInfo5251 (const AJAAncillaryData_FrameStatusInfo5251 *pInClone)
 My copy constructor. More...
 
 AJAAncillaryData_FrameStatusInfo5251 (const AJAAncillaryData *pInData)
 Constructs me from a generic AJAAncillaryData object. More...
 
virtual ~AJAAncillaryData_FrameStatusInfo5251 ()
 My destructor. More...
 
virtual void Clear (void)
 Frees my allocated memory, if any, and resets my members to their default values. More...
 
virtual AJAAncillaryData_FrameStatusInfo5251operator= (const AJAAncillaryData_FrameStatusInfo5251 &inRHS)
 Assignment operator – replaces my contents with the right-hand-side value. More...
 
virtual AJAStatus ParsePayloadData (void)
 Parses out (interprets) the "local" ancillary data from my payload data. More...
 
virtual std::ostream & Print (std::ostream &inOutStream, const bool inDetailed=false) const
 Streams a human-readable representation of me to the given output stream. More...
 
- Public Member Functions inherited from AJAAncillaryData
 AJAAncillaryData ()
 My default constructor. More...
 
 AJAAncillaryData (const AJAAncillaryData &inClone)
 My copy constructor (from reference). More...
 
 AJAAncillaryData (const AJAAncillaryData *pInClone)
 My copy constructor (from pointer). More...
 
virtual ~AJAAncillaryData ()
 My destructor. More...
 
virtual AJAAncillaryDataClone (void) const
 
virtual uint16_t GetStreamInfo (void) const
 
virtual bool HasStreamInfo (void) const
 
virtual bool isHDMIAuxInfoFrame (void) const
 Returns whether or not this is an HDMI Aux Info Frame Packet. More...
 
virtual uint8_t Calculate8BitChecksum (void) const
 Generates an 8-bit checksum from the DID + SID + DC + payload data. More...
 
virtual uint16_t Calculate9BitChecksum (void) const
 Generates the official SMPTE 291 9-bit checksum from the DID + SID + DC + payload data. More...
 
virtual bool ChecksumOK (void) const
 Compares the received 8-bit checksum with a newly calculated 8-bit checksum. Returns 'true' if they match. More...
 
AJAAncillaryDataoperator= (const AJAAncillaryData &inRHS)
 
virtual bool operator== (const AJAAncillaryData &inRHS) const
 
virtual bool operator!= (const AJAAncillaryData &inRHS) const
 
virtual AJAStatus Compare (const AJAAncillaryData &inRHS, const bool inIgnoreLocation=true, const bool inIgnoreChecksum=true) const
 Compares me with another packet. More...
 
virtual AJAStatus SetDID (const uint8_t inDataID)
 Sets my Data ID (DID). More...
 
virtual AJAStatus SetSID (const uint8_t inSID)
 Sets my Secondary Data ID (SID) - (aka the Data Block Number (DBN) for "Type 1" SMPTE-291 packets). More...
 
virtual AJAStatus SetDIDSID (const AJAAncDIDSIDPair &inDIDSID)
 Sets both my Data ID (DID) and Secondary Data ID (SID). More...
 
virtual AJAStatus SetChecksum (const uint8_t inChecksum8, const bool inValidate=false)
 Sets my 8-bit checksum. Note that it is not usually necessary to generate an 8-bit checksum, since the ANC Insertion hardware ignores this field and (for SMPTE-291 Anc packets) generates and inserts its own "proper" 9-bit SMPTE-291 checksum. More...
 
virtual AJAStatus SetDataLocation (const AJAAncDataLoc &inLoc)
 Sets my ancillary data "location" within the video stream. More...
 
virtual AJAStatus SetLocationVideoLink (const AJAAncDataLink inLink)
 Sets my ancillary data "location" within the video stream. More...
 
virtual AJAStatus SetLocationDataStream (const AJAAncDataStream inStream)
 Sets my ancillary data "location" data stream value (DS1,DS2...). More...
 
virtual AJAStatus SetLocationDataChannel (const AJAAncDataChannel inChannel)
 Sets my ancillary data "location" data channel value (Y or C). More...
 
virtual AJAStatus SetLocationLineNumber (const uint16_t inLineNum)
 Sets my ancillary data "location" frame line number. More...
 
virtual AJAStatus SetLocationHorizOffset (const uint16_t inOffset)
 Sets my ancillary data "location" horizontal offset. More...
 
virtual AJAStatus SetDataCoding (const AJAAncDataCoding inCodingType)
 Sets my ancillary data coding type (e.g. digital or analog/raw waveform). More...
 
virtual AJAAncillaryDataSetFrameID (const uint32_t inFrameID)
 Sets my originating frame identifier. More...
 
virtual AJAAncillaryDataSetBufferFormat (const AJAAncBufferFormat inFmt)
 Sets my originating buffer format. More...
 
virtual uint8_t GetPayloadByteAtIndex (const uint32_t inIndex0) const
 
virtual const uint8_t * GetPayloadData (void) const
 
virtual AJAStatus GetPayloadData (uint8_t *pBuffer, const uint32_t inByteCapacity) const
 Copies my payload data into an external buffer. More...
 
virtual AJAStatus GetPayloadData (UWordSequence &outUDWs, const bool inAddParity=true) const
 Appends my payload data onto the given UDW vector as 10-bit User Data Words (UDWs), adding parity as needed. More...
 
virtual AJAStatus SetPayloadByteAtIndex (const uint8_t inDataByte, const uint32_t inIndex0)
 
virtual AJAStatus SetPayloadData (const uint8_t *pInData, const uint32_t inByteCount)
 Copy data from external memory into my local payload memory. More...
 
virtual AJAStatus AppendPayloadData (const uint8_t *pInBuffer, const uint32_t inByteCount)
 Appends data from an external buffer onto the end of my existing payload. More...
 
virtual AJAStatus AppendPayload (const AJAAncillaryData &inAncData)
 Appends payload data from another AJAAncillaryData object to my existing payload. More...
 
virtual AJAStatus AppendPayload (const AJAAncillaryData *pInAncData)
 
virtual AJAStatus SetFromSMPTE334 (const uint16_t *pInData, const uint32_t inNumWords, const AJAAncDataLoc &inLocInfo)
 Copies payload data from an external 16-bit source into local payload memory. More...
 
virtual bool GotValidReceiveData (void) const
 
virtual AJAStatus GeneratePayloadData (void)
 Generates the payload data from the "local" ancillary data. More...
 
virtual AJAStatus InitWithReceivedData (const uint8_t *pInData, const size_t inMaxBytes, const AJAAncDataLoc &inLocationInfo, uint32_t &outPacketByteCount)
 Initializes me from "raw" ancillary data received from hardware (ingest) – see SDI Anc Buffer Data Format. More...
 
virtual AJAStatus InitAuxWithReceivedData (const uint8_t *pInData, const size_t inMaxBytes, uint32_t &outPacketByteCount)
 Initializes me from "raw" ancillary data received from hardware (ingest) – see SDI Anc Buffer Data Format. More...
 
virtual AJAStatus InitWithReceivedData (const std::vector< uint8_t > &inData, const AJAAncDataLoc &inLocationInfo)
 Initializes me from "raw" ancillary data received from hardware (ingest) – see SDI Anc Buffer Data Format. More...
 
virtual AJAStatus InitWithReceivedData (const ULWordSequence &inData, uint16_t &inOutStartIndex, const bool inIgnoreChecksum=false)
 Initializes me from the given 32-bit IP packet words received from hardware (ingest). More...
 
virtual AJAStatus GetRawPacketSize (uint32_t &outPacketSize) const
 Returns the number of "raw" ancillary data bytes that will be generated by AJAAncillaryData::GenerateTransmitData (for playback mode). More...
 
virtual AJAStatus GenerateTransmitData (uint8_t *pBuffer, const size_t inMaxBytes, uint32_t &outPacketSize)
 Generates "raw" ancillary data from my internal ancillary data (playback) – see SDI Anc Buffer Data Format. More...
 
virtual AJAStatus GenerateTransmitData (UWordSequence &outData)
 Generates "raw" 10-bit ancillary packet component data from my internal ancillary data (playback). More...
 
virtual AJAStatus GenerateTransmitData (ULWordSequence &outData)
 Generates the 32-bit IP packet words necessary for constructing an outgoing IP/RTP stream. More...
 
virtual std::ostream & DumpPayload (std::ostream &inOutStream) const
 Dumps a human-readable representation of my payload bytes into the given output stream. More...
 
virtual std::string CompareWithInfo (const AJAAncillaryData &inRHS, const bool inIgnoreLocation=true, const bool inIgnoreChecksum=true) const
 Compares me with another packet and returns a string that describes what's different. More...
 
virtual std::string IDAsString (void) const
 
virtual std::string AsString (const uint16_t inDumpMaxBytes=0) const
 

Static Public Member Functions

static AJAAncDataType RecognizeThisAncillaryData (const AJAAncillaryData *pInAncData)
 
- Static Public Member Functions inherited from AJAAncillaryData
static uint16_t AddEvenParity (const uint8_t inDataByte)
 
static bool GetAncPacketsFromVANCLine (const UWordSequence &inYUV16Line, const AncChannelSearchSelect inChanSelect, U16Packets &outRawPackets, U16Packet &outWordOffsets)
 Extracts whatever VANC packets are found inside the given 16-bit YUV line buffer. More...
 
static bool Unpack8BitYCbCrToU16sVANCLine (const void *pInYUV8Line, U16Packet &outU16YUVLine, const uint32_t inNumPixels)
 Converts a single line of NTV2_FBF_8BIT_YCBCR data from the given source buffer into an ordered sequence of uint16_t values that contain the resulting 10-bit even-parity data. More...
 
static bool Unpack8BitYCbCrToU16sVANCLineSD (const void *pInYUV8Line, UWordSequence &outU16YUVLine, const uint32_t inNumPixels)
 SD version of Unpack8BitYCbCrToU16sVANCLine. More...
 
static void GetInstanceCounts (uint32_t &outConstructed, uint32_t &outDestructed)
 
static uint32_t GetNumActiveInstances (void)
 
static uint32_t GetNumConstructed (void)
 
static uint32_t GetNumDestructed (void)
 
static void ResetInstanceCounts (void)
 
static std::string DIDSIDToString (const uint8_t inDID, const uint8_t inSDID)
 
static std::string AuxPacketTypeToString (const uint8_t inAuxPktType)
 
static bool AuxPacketTypeIsValid (const uint8_t inAuxPktType)
 

Protected Member Functions

void Init (void)
 
- Protected Member Functions inherited from AJAAncillaryData
void Init (void)
 
AJAStatus AllocDataMemory (const uint32_t inNumBytes)
 
AJAStatus FreeDataMemory (void)
 
virtual uint8_t GetGUMPHeaderByte2 (void) const
 
virtual uint8_t GetGUMPHeaderByte3 (void) const
 

Additional Inherited Members

- Public Types inherited from AJAAncillaryData
typedef UWordSequence U16Packet
 An ordered sequence of 10-bit packet words stored in uint16_t values. More...
 
typedef std::vector< U16PacketU16Packets
 An ordered sequence of zero or more U16Packet values. More...
 
- Protected Types inherited from AJAAncillaryData
typedef std::vector< uint8_t > ByteVector
 
typedef ByteVector::size_type ByteVectorIndex
 
typedef ByteVector::const_iterator ByteVectorConstIter
 
- Static Protected Member Functions inherited from AJAAncillaryData
static uint8_t GetGUMPHeaderByte1 (void)
 
- Protected Attributes inherited from AJAAncillaryData
uint8_t m_DID
 Official SMPTE ancillary packet ID (w/o parity) More...
 
uint8_t m_SID
 Official SMPTE secondary ID (or DBN - w/o parity) More...
 
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 a SMPTE-291 packet!]. More...
 
AJAAncDataLoc m_location
 Location of the ancillary data in the video stream (Y or C, HANC or VANC, etc.) More...
 
AJAAncDataCoding m_coding
 Analog or digital data. More...
 
ByteVector m_payload
 My payload data (DC = size) More...
 
bool m_rcvDataValid
 This is set true (or not) by ParsePayloadData() More...
 
AJAAncDataType m_ancType
 One of a known set of ancillary data types (or "Custom" if not identified) More...
 
AJAAncBufferFormat m_bufferFmt
 My originating buffer format, if known. More...
 
uint32_t m_frameID
 ID of my originating frame, if known. More...
 
uint64_t m_userData
 User data (for client use) More...
 
uint8_t m_auxType
 HDMI Aux Header Byte 0 (Packet Type) More...
 
uint8_t m_auxHB1
 HDMI Aux Header Byte 1 (Header Data) More...
 
uint8_t m_auxHB2
 HDMI Aux Header Byte 2 (Header Data) More...
 

Detailed Description

This class handles "5251" Frame Status Information packets.

Definition at line 23 of file ancillarydata_framestatusinfo5251.h.

Constructor & Destructor Documentation

◆ AJAAncillaryData_FrameStatusInfo5251() [1/4]

AJAAncillaryData_FrameStatusInfo5251::AJAAncillaryData_FrameStatusInfo5251 ( )

My default constructor.

Definition at line 18 of file ancillarydata_framestatusinfo5251.cpp.

◆ AJAAncillaryData_FrameStatusInfo5251() [2/4]

AJAAncillaryData_FrameStatusInfo5251::AJAAncillaryData_FrameStatusInfo5251 ( const AJAAncillaryData_FrameStatusInfo5251 inClone)

My copy constructor.

Parameters
[in]inCloneThe AJAAncillaryData object to be cloned.

Definition at line 25 of file ancillarydata_framestatusinfo5251.cpp.

◆ AJAAncillaryData_FrameStatusInfo5251() [3/4]

AJAAncillaryData_FrameStatusInfo5251::AJAAncillaryData_FrameStatusInfo5251 ( const AJAAncillaryData_FrameStatusInfo5251 pInClone)

My copy constructor.

Parameters
[in]pInCloneA valid pointer to the AJAAncillaryData object to be cloned.

Definition at line 33 of file ancillarydata_framestatusinfo5251.cpp.

◆ AJAAncillaryData_FrameStatusInfo5251() [4/4]

AJAAncillaryData_FrameStatusInfo5251::AJAAncillaryData_FrameStatusInfo5251 ( const AJAAncillaryData pInData)

Constructs me from a generic AJAAncillaryData object.

Parameters
[in]pInDataA valid pointer to the AJAAncillaryData object.

Definition at line 42 of file ancillarydata_framestatusinfo5251.cpp.

◆ ~AJAAncillaryData_FrameStatusInfo5251()

AJAAncillaryData_FrameStatusInfo5251::~AJAAncillaryData_FrameStatusInfo5251 ( )
virtual

My destructor.

Definition at line 49 of file ancillarydata_framestatusinfo5251.cpp.

Member Function Documentation

◆ Clear()

void AJAAncillaryData_FrameStatusInfo5251::Clear ( void  )
virtual

Frees my allocated memory, if any, and resets my members to their default values.

Reimplemented from AJAAncillaryData.

Definition at line 65 of file ancillarydata_framestatusinfo5251.cpp.

◆ Init()

void AJAAncillaryData_FrameStatusInfo5251::Init ( void  )
protected

Definition at line 54 of file ancillarydata_framestatusinfo5251.cpp.

◆ operator=()

AJAAncillaryData_FrameStatusInfo5251 & AJAAncillaryData_FrameStatusInfo5251::operator= ( const AJAAncillaryData_FrameStatusInfo5251 inRHS)
virtual

Assignment operator – replaces my contents with the right-hand-side value.

Parameters
[in]inRHSThe value to be assigned to me.
Returns
A reference to myself.

Definition at line 72 of file ancillarydata_framestatusinfo5251.cpp.

◆ ParsePayloadData()

AJAStatus AJAAncillaryData_FrameStatusInfo5251::ParsePayloadData ( void  )
virtual

Parses out (interprets) the "local" ancillary data from my payload data.

Returns
AJA_STATUS_SUCCESS if successful.

Reimplemented from AJAAncillaryData.

Definition at line 88 of file ancillarydata_framestatusinfo5251.cpp.

◆ Print()

ostream & AJAAncillaryData_FrameStatusInfo5251::Print ( std::ostream &  inOutStream,
const bool  inDetailed = false 
) const
virtual

Streams a human-readable representation of me to the given output stream.

Parameters
inOutStreamSpecifies the output stream.
[in]inDetailedSpecify 'true' for a detailed representation; otherwise use 'false' for a brief one.
Returns
The given output stream.

Reimplemented from AJAAncillaryData.

Definition at line 123 of file ancillarydata_framestatusinfo5251.cpp.

◆ RecognizeThisAncillaryData()

AJAAncDataType AJAAncillaryData_FrameStatusInfo5251::RecognizeThisAncillaryData ( const AJAAncillaryData pInAncData)
static
Parameters
[in]pInAncDataA valid pointer to a base AJAAncillaryData object that contains the Anc data to inspect.
Returns
AJAAncDataType if I recognize this Anc data (or AJAAncDataType_Unknown if unrecognized).

Definition at line 112 of file ancillarydata_framestatusinfo5251.cpp.


The documentation for this class was generated from the following files: