AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
CNTV2Caption708ServiceBlockQueue Class Reference

I am a simple, thread-safe queue of CEA-708 caption service blocks. More...

#include <ntv2caption708serviceblockqueue.h>

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

Public Member Functions

 CNTV2Caption708ServiceBlockQueue ()
 
virtual ~CNTV2Caption708ServiceBlockQueue ()
 
virtual void Flush (void)
 Flushes me. More...
 
virtual bool IsEmpty (void) const
 Returns true if I'm currently empty. More...
 
virtual size_t GetCurrentDepth (void) const
 Returns the number of Service Blocks that I contain. More...
 
virtual size_t GetHighestDepth (void) const
 Returns the highest number of Service Blocks that I contain or ever have contained since I was instantiated. More...
 
virtual size_t GetEnqueueTally (void) const
 Returns the number of "push" calls that have been made since I was instantiated. More...
 
virtual size_t GetDequeueTally (void) const
 Returns the number of "pop" calls that have been made since I was instantiated. More...
 
virtual size_t GetEnqueueByteTally (void) const
 Returns the total number of bytes that have been enqueued since I was instantiated. More...
 
virtual size_t GetDequeueByteTally (void) const
 Returns the total number of bytes that have been dequeued since I was instantiated. More...
 
virtual bool PushServiceBlock (const UByte *pInServiceBlockData, const size_t inServiceBlockByteCount)
 Enqueues the given service block. More...
 
virtual bool PeekNextServiceBlockInfo (size_t &outBlockSize, size_t &outDataSize, int &outServiceNum, bool &outIsExtended) const
 Returns information about the [next] Service Block that's sitting at the top of my queue, if any. My queue is left unchanged. More...
 
virtual size_t PopServiceBlock (std::vector< UByte > &outData)
 Pops the next Service Block off my queue and copies it into the byte vector. More...
 
virtual size_t PopServiceBlockData (std::vector< UByte > &outData)
 Pops the next Service Block off my queue and copies just its data into the designated buffer. More...
 
virtual size_t PopServiceBlock (UByte *pOutDataBuffer)
 
virtual size_t PopServiceBlockData (UByte *pOutDataBuffer)
 
virtual void SetDebugChannel (const int inChannelNum)
 Sets my channel number (used in log messages). More...
 
virtual std::ostream & Print (std::ostream &inOutStrm, const bool inWithData=false) const
 
- Public Member Functions inherited from CNTV2CaptionLogConfig
 CNTV2CaptionLogConfig (const std::string inLogLabel=std::string())
 Default constructor. More...
 
virtual ~CNTV2CaptionLogConfig ()
 
virtual NTV2CaptionLogMask SetLogMask (const NTV2CaptionLogMask inLogMask)
 Specifies what, if any, debug information I will write to my log stream. More...
 
virtual NTV2CaptionLogMask GetLogMask (void) const
 Answers with my current caption logging bit mask. More...
 
virtual bool TestLogMask (const NTV2CaptionLogMask inLogMask, const bool inExact=false) const
 Answers true if the given log mask bits are set in my current log mask. More...
 
virtual void SetLogLabel (const std::string &inNewLabel)
 Specifies my logging label. More...
 
virtual void AppendToLogLabel (const std::string &inString)
 Appends the given string to my current log label. More...
 
virtual const std::string & GetLogLabel (void) const
 Answers with my current logging label. More...
 
virtual void SetLogStream (std::ostream &inOutputStream)
 
virtual std::ostream & LogIf (const NTV2CaptionLogMask inLogMask) const
 
virtual std::ostream & Log (void) const
 

Additional Inherited Members

- Static Public Member Functions inherited from CNTV2CaptionLogConfig
static std::ostream & DumpMemory (const void *pInStartAddress, const size_t inByteCount, std::ostream &inOutputStream=std::cout, const size_t inRadix=16, const size_t inBytesPerGroup=4, const size_t inGroupsPerLine=8, const size_t inAddressRadix=16, const bool inShowAscii=true, const size_t inAddrOffset=0)
 Dumps a contiguous chunk of memory in hex, octal, decimal, with or without ascii, to the given output stream. More...
 
static std::string HexDump32Bytes (const void *pInStartAddress, const size_t inByteCount, const size_t inLimitBytes=32)
 
static std::ostream & DumpYBytes_2vuy (const UByte *pInVideoLine, std::ostream &inOutputStream, const unsigned inFromPixel=0, const unsigned inToPixel=719, const bool inShowRuler=true, const unsigned inHiliteRangeFrom=9999, const unsigned inHiliteRangeTo=9999)
 Dumps the luma values in hexadecimal from the given line of '2vuy' video to the given output stream. More...
 
static std::ostream & DumpYBytes_2vuy (const std::vector< uint8_t > &inVideoLine, std::ostream &inOutputStream, const size_t inFromPixel=0, const size_t inToPixel=719, const bool inShowRuler=true, const size_t inHiliteRangeFrom=9999, const size_t inHiliteRangeTo=9999)
 Dumps the luma values in hexadecimal from the given line of '2vuy' video to the given output stream. More...
 
static std::string GetSeverityLabel (const unsigned inSeverity)
 
- Protected Attributes inherited from CNTV2CaptionLogConfig
NTV2CaptionLogMask mLogMask
 Determines what messages are logged. More...
 
std::string mLogLabel
 My debug label. More...
 
void * mpLabelLock
 Protects my debug label from simultaneous access by more than one thread. More...
 

Detailed Description

I am a simple, thread-safe queue of CEA-708 caption service blocks.

Definition at line 28 of file ntv2caption708serviceblockqueue.h.

Constructor & Destructor Documentation

◆ CNTV2Caption708ServiceBlockQueue()

CNTV2Caption708ServiceBlockQueue::CNTV2Caption708ServiceBlockQueue ( )
explicit

◆ ~CNTV2Caption708ServiceBlockQueue()

virtual CNTV2Caption708ServiceBlockQueue::~CNTV2Caption708ServiceBlockQueue ( )
virtual

Member Function Documentation

◆ Flush()

virtual void CNTV2Caption708ServiceBlockQueue::Flush ( void  )
virtual

Flushes me.

◆ GetCurrentDepth()

virtual size_t CNTV2Caption708ServiceBlockQueue::GetCurrentDepth ( void  ) const
virtual

Returns the number of Service Blocks that I contain.

◆ GetDequeueByteTally()

virtual size_t CNTV2Caption708ServiceBlockQueue::GetDequeueByteTally ( void  ) const
virtual

Returns the total number of bytes that have been dequeued since I was instantiated.

◆ GetDequeueTally()

virtual size_t CNTV2Caption708ServiceBlockQueue::GetDequeueTally ( void  ) const
virtual

Returns the number of "pop" calls that have been made since I was instantiated.

◆ GetEnqueueByteTally()

virtual size_t CNTV2Caption708ServiceBlockQueue::GetEnqueueByteTally ( void  ) const
virtual

Returns the total number of bytes that have been enqueued since I was instantiated.

◆ GetEnqueueTally()

virtual size_t CNTV2Caption708ServiceBlockQueue::GetEnqueueTally ( void  ) const
virtual

Returns the number of "push" calls that have been made since I was instantiated.

◆ GetHighestDepth()

virtual size_t CNTV2Caption708ServiceBlockQueue::GetHighestDepth ( void  ) const
virtual

Returns the highest number of Service Blocks that I contain or ever have contained since I was instantiated.

◆ IsEmpty()

virtual bool CNTV2Caption708ServiceBlockQueue::IsEmpty ( void  ) const
virtual

Returns true if I'm currently empty.

◆ PeekNextServiceBlockInfo()

virtual bool CNTV2Caption708ServiceBlockQueue::PeekNextServiceBlockInfo ( size_t &  outBlockSize,
size_t &  outDataSize,
int &  outServiceNum,
bool &  outIsExtended 
) const
virtual

Returns information about the [next] Service Block that's sitting at the top of my queue, if any. My queue is left unchanged.

Parameters
outBlockSizeReceives the size of the service block, in bytes.
outDataSizeReceives the size of the service block data, in bytes.
outServiceNumReceives the Service Number.
outIsExtendedReceives "true" if the service block is an "extended" one; otherwise, receives "false".
Returns
True if successful; otherwise false.

◆ PopServiceBlock() [1/2]

virtual size_t CNTV2Caption708ServiceBlockQueue::PopServiceBlock ( std::vector< UByte > &  outData)
virtual

Pops the next Service Block off my queue and copies it into the byte vector.

Parameters
[out]outDataReceives the service block byte(s).
Note
This method copies the entire Service Block. To copy just the data, use PopServiceBlockData.
Returns
The number of bytes that were copied.

◆ PopServiceBlock() [2/2]

virtual size_t CNTV2Caption708ServiceBlockQueue::PopServiceBlock ( UByte pOutDataBuffer)
virtual
Deprecated:
Use vector<UByte> version instead.

◆ PopServiceBlockData() [1/2]

virtual size_t CNTV2Caption708ServiceBlockQueue::PopServiceBlockData ( std::vector< UByte > &  outData)
virtual

Pops the next Service Block off my queue and copies just its data into the designated buffer.

Parameters
[out]outDataReceives just the data byte(s) from the service block.
Note
This method copies just the data byte(s) from the Service Block. To copy the entire Service Block, use PopServiceBlock.
Returns
The number of bytes that were copied.

◆ PopServiceBlockData() [2/2]

virtual size_t CNTV2Caption708ServiceBlockQueue::PopServiceBlockData ( UByte pOutDataBuffer)
virtual
Deprecated:
Use vector<UByte> version instead.

◆ Print()

virtual std::ostream& CNTV2Caption708ServiceBlockQueue::Print ( std::ostream &  inOutStrm,
const bool  inWithData = false 
) const
virtual

◆ PushServiceBlock()

virtual bool CNTV2Caption708ServiceBlockQueue::PushServiceBlock ( const UByte pInServiceBlockData,
const size_t  inServiceBlockByteCount 
)
virtual

Enqueues the given service block.

Parameters
pInServiceBlockDataA valid, non-NULL pointer to a buffer containing the service block data, including the header.
inServiceBlockByteCountSpecifies the exact number of valid bytes in the source buffer to be copied into my queue.
Returns
True if successful; otherwise false.

◆ SetDebugChannel()

virtual void CNTV2Caption708ServiceBlockQueue::SetDebugChannel ( const int  inChannelNum)
virtual

Sets my channel number (used in log messages).

Parameters
inChannelNumSpecifies my channel number used in log messages.

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