AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
AJAAncDataLoc Struct Reference

Defines where the ancillary data can be found within a video stream. More...

#include <ancillarydata.h>

Public Member Functions

 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)
 
bool operator== (const AJAAncDataLoc &inRHS) const
 
bool operator!= (const AJAAncDataLoc &inRHS) const
 
bool operator< (const AJAAncDataLoc &inRHS) const
 
bool IsValid (void) const
 
virtual AJAStatus Compare (const AJAAncDataLoc &inRHS) const
 Compares me with another location. More...
 
virtual std::string CompareWithInfo (const AJAAncDataLoc &inRHS) const
 Compares me with another location and returns a string that describes what's different. More...
 
AJAAncDataLocReset (void)
 Resets all of my location elements to an unknown, invalid state. More...
 
bool IsDataLinkA (void) const
 
bool IsDataLinkB (void) const
 
bool IsLumaChannel (void) const
 
bool IsChromaChannel (void) const
 
AJAAncDataSpace GetDataSpace (void) const
 
bool IsVanc (void) const
 
bool IsHanc (void) const
 
uint16_t GetHorizontalOffset (void) const
 
std::ostream & Print (std::ostream &ostrm, const bool inCompact=true) const
 Writes a human-readable rendition of me into the given output stream. More...
 
AJAAncDataLocSetDataLink (const AJAAncDataLink inLink)
 Sets my data link value to the given value (if valid). More...
 
AJAAncDataLocSetDataStream (const AJAAncDataStream inStream)
 Sets my data link value to the given value (if valid). More...
 
AJAAncDataLocSetDataChannel (const AJAAncDataChannel inChannel)
 Sets my data video stream value to the given value (if valid). More...
 
AJAAncDataLocSetDataVideoStream (const AJAAncDataChannel inChannel)
 
AJAAncDataLocSetDataSpace (const AJAAncDataSpace inSpace)
 Sets my data space value to the given value (if valid). More...
 
AJAAncDataLocSetLineNumber (const uint16_t inLineNum)
 Sets my anc data line number value. More...
 
AJAAncDataLocSetHorizontalOffset (uint16_t inHOffset)
 Specifies the horizontal packet position in the raster. More...
 
uint64_t OrdinalValue (void) const
 

Detailed Description

Defines where the ancillary data can be found within a video stream.

Definition at line 225 of file ancillarydata.h.

Constructor & Destructor Documentation

◆ AJAAncDataLoc()

AJAAncDataLoc::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 
)
inline

Definition at line 229 of file ancillarydata.h.

Member Function Documentation

◆ Compare()

AJAStatus AJAAncDataLoc::Compare ( const AJAAncDataLoc inRHS) const
virtual

Compares me with another location.

Parameters
[in]inRHSThe location I'm to be compared with.
Returns
AJA_STATUS_SUCCESS if equal; otherwise AJA_STATUS_FAIL.

Definition at line 1317 of file ancillarydata.cpp.

◆ CompareWithInfo()

string AJAAncDataLoc::CompareWithInfo ( const AJAAncDataLoc inRHS) const
virtual

Compares me with another location and returns a string that describes what's different.

Parameters
[in]inRHSThe location I'm to be compared with.
Returns
Empty string if equal; otherwise a string that contains one or more differences found, delimited by newline characters.

Definition at line 1336 of file ancillarydata.cpp.

◆ GetDataSpace()

AJAAncDataSpace AJAAncDataLoc::GetDataSpace ( void  ) const
inline
Returns
"VANC" if my horizontal offset is "Any VANC", or "HANC" if my H offset is "Any HANC"; otherwise "UNKNOWN".
Note
To be truly accurate, this function would need to know the video standard/geometry to determine if my line number precedes SAV, and if my horizontal offset is after EAV.

Definition at line 316 of file ancillarydata.h.

◆ GetHorizontalOffset()

uint16_t AJAAncDataLoc::GetHorizontalOffset ( void  ) const
inline
Returns
The 12-bit horizontal offset of the packet. For HD, this is the number of luma samples (see SMPTE ST274). For SD, this is the number of Y/C muxed words (see SMPTE ST125). Can also be one of these predefined values:

Definition at line 339 of file ancillarydata.h.

◆ IsChromaChannel()

bool AJAAncDataLoc::IsChromaChannel ( void  ) const
inline

Definition at line 308 of file ancillarydata.h.

◆ IsDataLinkA()

bool AJAAncDataLoc::IsDataLinkA ( void  ) const
inline

Definition at line 301 of file ancillarydata.h.

◆ IsDataLinkB()

bool AJAAncDataLoc::IsDataLinkB ( void  ) const
inline

Definition at line 302 of file ancillarydata.h.

◆ IsHanc()

bool AJAAncDataLoc::IsHanc ( void  ) const
inline

Definition at line 325 of file ancillarydata.h.

◆ IsLumaChannel()

bool AJAAncDataLoc::IsLumaChannel ( void  ) const
inline

Definition at line 307 of file ancillarydata.h.

◆ IsValid()

bool AJAAncDataLoc::IsValid ( void  ) const
inline

Definition at line 262 of file ancillarydata.h.

◆ IsVanc()

bool AJAAncDataLoc::IsVanc ( void  ) const
inline

Definition at line 324 of file ancillarydata.h.

◆ operator!=()

bool AJAAncDataLoc::operator!= ( const AJAAncDataLoc inRHS) const
inline

Definition at line 253 of file ancillarydata.h.

◆ operator<()

bool AJAAncDataLoc::operator< ( const AJAAncDataLoc inRHS) const
inline

Definition at line 255 of file ancillarydata.h.

◆ operator==()

bool AJAAncDataLoc::operator== ( const AJAAncDataLoc inRHS) const
inline

Definition at line 239 of file ancillarydata.h.

◆ OrdinalValue()

uint64_t AJAAncDataLoc::OrdinalValue ( void  ) const
inline
Returns
A 64-bit unsigned ordinal value used for sorting/comparing. In highest to lowest order of magnitude:
  • line number, ascending
  • data space, ascending (VANC precedes HANC)
  • horizontal offset, ascending
  • data channel, ascending (Chroma highest, then Luma, then Unknown lowest)
  • data stream, ascending (DS1 highest, then DS2, ... then Unknown lowest)
  • data link, ascending (Link "A" highest, then Link "B", then Unknown lowest)

Definition at line 431 of file ancillarydata.h.

◆ Print()

ostream & AJAAncDataLoc::Print ( std::ostream &  ostrm,
const bool  inCompact = true 
) const

Writes a human-readable rendition of me into the given output stream.

Parameters
ostrmSpecifies the output stream.
[in]inCompactSpecify 'true' for compact output; otherwise 'false' for more detail.
Returns
The given output stream.

Definition at line 1307 of file ancillarydata.cpp.

◆ Reset()

AJAAncDataLoc& AJAAncDataLoc::Reset ( void  )
inline

Resets all of my location elements to an unknown, invalid state.

Returns
A reference to myself.

Definition at line 290 of file ancillarydata.h.

◆ SetDataChannel()

AJAAncDataLoc& AJAAncDataLoc::SetDataChannel ( const AJAAncDataChannel  inChannel)
inline

Sets my data video stream value to the given value (if valid).

Parameters
[in]inChannelSpecifies the new data channel value to use. Must be valid.
Returns
A non-const reference to myself.

Definition at line 368 of file ancillarydata.h.

◆ SetDataLink()

AJAAncDataLoc& AJAAncDataLoc::SetDataLink ( const AJAAncDataLink  inLink)
inline

Sets my data link value to the given value (if valid).

Parameters
[in]inLinkSpecifies the new data link value to use. Must be valid.
Returns
A non-const reference to myself.

Definition at line 354 of file ancillarydata.h.

◆ SetDataSpace()

AJAAncDataLoc& AJAAncDataLoc::SetDataSpace ( const AJAAncDataSpace  inSpace)
inline

Sets my data space value to the given value (if valid).

Parameters
[in]inSpaceSpecifies the new data space value to use. Must be valid.
Returns
A non-const reference to myself.

Definition at line 378 of file ancillarydata.h.

◆ SetDataStream()

AJAAncDataLoc& AJAAncDataLoc::SetDataStream ( const AJAAncDataStream  inStream)
inline

Sets my data link value to the given value (if valid).

Parameters
[in]inStreamSpecifies the new data stream value to use. Must be valid.
Returns
A non-const reference to myself.

Definition at line 361 of file ancillarydata.h.

◆ SetDataVideoStream()

AJAAncDataLoc& AJAAncDataLoc::SetDataVideoStream ( const AJAAncDataChannel  inChannel)
inline

Definition at line 370 of file ancillarydata.h.

◆ SetHorizontalOffset()

AJAAncDataLoc& AJAAncDataLoc::SetHorizontalOffset ( uint16_t  inHOffset)
inline

Specifies the horizontal packet position in the raster.

Parameters
[in]inHOffsetSpecifies my new horizontal offset. Only the least-significant 12 bits are used.
  • Use AJAAncDataLoc::AJAAncDataHorizOffset_AnyVanc for any legal area of the raster line after SAV. This will reset my AJAAncDataSpace to AJAAncDataSpace_VANC.
  • Use AJAAncDataLoc::AJAAncDataHorizOffset_AnyHanc for any legal area of the raster line after EAV. This will reset my AJAAncDataSpace to AJAAncDataSpace_HANC.
  • For HD, this is the number of luma samples (see SMPTE ST274).
  • For SD, this is the number of Y/C muxed words (see SMPTE ST125).
  • Use AJAAncDataHorizOffset_Unknown for zero – i.e., immediately after SAV.
Returns
A non-const reference to myself.

Definition at line 408 of file ancillarydata.h.

◆ SetLineNumber()

AJAAncDataLoc& AJAAncDataLoc::SetLineNumber ( const uint16_t  inLineNum)
inline

Sets my anc data line number value.

Parameters
[in]inLineNumSpecifies the new line number value to use. Can also be AJAAncDataLineNumber_DontCare.
Returns
A non-const reference to myself.

Definition at line 393 of file ancillarydata.h.


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