AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
CNTV2Caption708Service Class Reference

#include <ntv2caption708service.h>

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

Public Member Functions

 CNTV2Caption708Service ()
 
virtual ~CNTV2Caption708Service ()
 
virtual void InitService (const int inServiceIndex)
 
virtual bool SetServiceInfo (const NTV2_CC708ServiceInfo &inNewSvcInfo)
 
virtual bool ParseInputServiceBlockToLocalQueue (const UByte *pInData, const size_t inByteCount)
 Parses the given Service Block into elementary commands and enqueues them as independent Service Blocks. More...
 
virtual size_t GetCommandSize (const UByte *pInData, const size_t inByteCount) const
 Answers with the size of the 708 command that starts at the first byte in the given buffer. More...
 
virtual size_t Parse708Command (const UByte *pInData, const size_t inByteCount)
 Parses the 708 command that starts at the first byte in the given buffer. More...
 
virtual size_t DebugParse708Command (const UByte *pInData, const size_t inByteCount) const
 
virtual bool SetCurrentWindow (const int inWindowID)
 Specifies my current window ID, replacing the former value. See CEA-708-D section 8.10.5.1. Subsequent calls to SetWindowAttributes, SetPenAttributes, SetPenLocation, etc. will affect this window. More...
 
virtual bool ClearWindows (const UByte inWindowMap)
 Clears text from the given set of windows. See CEA-708-D section 8.10.5.3. More...
 
virtual bool DeleteWindows (const UByte inWindowMap)
 Deletes the window definitions for the given set of windows. See CEA-708-D section 8.10.5.4. More...
 
virtual bool DisplayWindows (const UByte inWindowMap)
 Shows (unhides) the given set of windows. See CEA-708-D section 8.10.5.5. More...
 
virtual bool HideWindows (const UByte inWindowMap)
 Hides the given set of windows. See CEA-708-D section 8.10.5.6. More...
 
virtual bool ToggleWindows (const UByte inWindowMap)
 Toggles the display/hide status for the given set of windows. See CEA-708C section 8.10.5.7. More...
 
virtual bool DefineWindow (const int inWindowID, const CC708WindowParms &inParameters)
 Defines a new window with the given ID and initial parameters, or updates the existing window's parameters. In either case, the given window becomes the new "current" window. See CEA-708-D section 8.10.5.2. More...
 
virtual bool SetWindowAttributes (const CC708WindowAttr &inAttributes)
 Specifies new attributes for my current window. See CEA-708-D section 8.10.5.8. More...
 
virtual void SetPenAttributes (const CC708PenAttr &inAttributes)
 Specifies new pen attributes for my current window. See CEA-708-D section 8.10.5.9. More...
 
virtual void SetPenColor (const CC708PenColor &inColor)
 Specifies a new pen color for my current window. See CEA-708-D section 8.10.5.10. More...
 
virtual void SetPenLocation (const CC708PenLocation &inLocation)
 Specifies a new pen location for my current window. See CEA-708-D section 8.10.5.11. More...
 
virtual void Delay (const int inTenthsSec)
 Delays service data interpretation. See CEA-708-D Section 8.10.5.12. More...
 
virtual void DelayCancel (void)
 Cancels an Active Delay Command. See CEA-708-D section 8.10.5.13. More...
 
virtual void Reset (void)
 Resets the Caption Channel Service. See CEA-708-D section 8.10.5.14. More...
 
virtual void AddCharacter (const UByte inChar, const CC708CodeGroup inCodeGroup)
 
virtual void DoETX (void)
 
virtual void DoBS (void)
 
virtual void DoFF (void)
 
virtual void DoCR (void)
 
virtual void DoHCR (void)
 
virtual bool PeekNextServiceBlockInfo (size_t &outBlockSize, size_t &outDataSize, int &outServiceNum, bool &outIsExtended) const
 
virtual size_t PopServiceBlock (std::vector< UByte > &outData)
 
virtual size_t PopServiceBlockData (std::vector< UByte > &outData)
 
virtual size_t PopServiceBlock (UByte *pData)
 
virtual size_t PopServiceBlockData (UByte *pData)
 
virtual NTV2CaptionLogMask SetLogMask (const NTV2CaptionLogMask inLogMask)
 Specifies what, if any, debug information I will write to my log stream. More...
 
- Public Member Functions inherited from CNTV2CaptionLogConfig
 CNTV2CaptionLogConfig (const std::string inLogLabel=std::string())
 Default constructor. More...
 
virtual ~CNTV2CaptionLogConfig ()
 
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

Definition at line 19 of file ntv2caption708service.h.

Constructor & Destructor Documentation

◆ CNTV2Caption708Service()

CNTV2Caption708Service::CNTV2Caption708Service ( )

◆ ~CNTV2Caption708Service()

virtual CNTV2Caption708Service::~CNTV2Caption708Service ( )
virtual

Member Function Documentation

◆ AddCharacter()

virtual void CNTV2Caption708Service::AddCharacter ( const UByte  inChar,
const CC708CodeGroup  inCodeGroup 
)
virtual

◆ ClearWindows()

virtual bool CNTV2Caption708Service::ClearWindows ( const UByte  inWindowMap)
virtual

Clears text from the given set of windows. See CEA-708-D section 8.10.5.3.

Parameters
[in]inWindowMapSpecifies the set of windows to be affected, where each bit of the given 8-bit value corresponds to a window ID (0 thru 7). If the map's bit is set, the window having the ID corresponding to that bit will be affected.
Returns
True if successful; otherwise false.

◆ DebugParse708Command()

virtual size_t CNTV2Caption708Service::DebugParse708Command ( const UByte pInData,
const size_t  inByteCount 
) const
virtual

◆ DefineWindow()

virtual bool CNTV2Caption708Service::DefineWindow ( const int  inWindowID,
const CC708WindowParms inParameters 
)
virtual

Defines a new window with the given ID and initial parameters, or updates the existing window's parameters. In either case, the given window becomes the new "current" window. See CEA-708-D section 8.10.5.2.

Parameters
[in]inWindowIDSpecifies the new window's ID.
[in]inParametersSpecifies the new window's initial parameters.
Returns
True if successful; otherwise false.

◆ Delay()

virtual void CNTV2Caption708Service::Delay ( const int  inTenthsSec)
virtual

Delays service data interpretation. See CEA-708-D Section 8.10.5.12.

Todo:
Currently not implemented.

◆ DelayCancel()

virtual void CNTV2Caption708Service::DelayCancel ( void  )
virtual

Cancels an Active Delay Command. See CEA-708-D section 8.10.5.13.

Todo:
Currently not implemented.

◆ DeleteWindows()

virtual bool CNTV2Caption708Service::DeleteWindows ( const UByte  inWindowMap)
virtual

Deletes the window definitions for the given set of windows. See CEA-708-D section 8.10.5.4.

Parameters
[in]inWindowMapSpecifies the set of windows to be affected, where each bit of the given 8-bit value corresponds to a window ID (0 thru 7). If the map's bit is set, the window having the ID corresponding to that bit will be affected.
Returns
True if successful; otherwise false.

◆ DisplayWindows()

virtual bool CNTV2Caption708Service::DisplayWindows ( const UByte  inWindowMap)
virtual

Shows (unhides) the given set of windows. See CEA-708-D section 8.10.5.5.

Parameters
[in]inWindowMapSpecifies the set of windows to be affected, where each bit of the given 8-bit value corresponds to a window ID (0 thru 7). If the map's bit is set, the window having the ID corresponding to that bit will be affected.
Returns
True if successful; otherwise false.

◆ DoBS()

virtual void CNTV2Caption708Service::DoBS ( void  )
virtual

◆ DoCR()

virtual void CNTV2Caption708Service::DoCR ( void  )
virtual

◆ DoETX()

virtual void CNTV2Caption708Service::DoETX ( void  )
virtual

◆ DoFF()

virtual void CNTV2Caption708Service::DoFF ( void  )
virtual

◆ DoHCR()

virtual void CNTV2Caption708Service::DoHCR ( void  )
virtual

◆ GetCommandSize()

virtual size_t CNTV2Caption708Service::GetCommandSize ( const UByte pInData,
const size_t  inByteCount 
) const
virtual

Answers with the size of the 708 command that starts at the first byte in the given buffer.

Parameters
[in]pInDataSpecifies the valid, non-NULL address of the command buffer.
[in]inByteCountSpecifies the number of valid data bytes in the buffer.
Returns
The size of the command, in bytes, if parsed correctly; otherwise zero.

◆ HideWindows()

virtual bool CNTV2Caption708Service::HideWindows ( const UByte  inWindowMap)
virtual

Hides the given set of windows. See CEA-708-D section 8.10.5.6.

Parameters
[in]inWindowMapSpecifies the set of windows to be affected, where each bit of the given 8-bit value corresponds to a window ID (0 thru 7). If the map's bit is set, the window having the ID corresponding to that bit will be affected.
Returns
True if successful; otherwise false.

◆ InitService()

virtual void CNTV2Caption708Service::InitService ( const int  inServiceIndex)
virtual

◆ Parse708Command()

virtual size_t CNTV2Caption708Service::Parse708Command ( const UByte pInData,
const size_t  inByteCount 
)
virtual

Parses the 708 command that starts at the first byte in the given buffer.

Parameters
[in]pInDataSpecifies the valid, non-NULL address of the command buffer.
[in]inByteCountSpecifies the number of valid data bytes in the buffer.
Returns
The size of the command, in bytes, if parsed correctly; otherwise zero.

◆ ParseInputServiceBlockToLocalQueue()

virtual bool CNTV2Caption708Service::ParseInputServiceBlockToLocalQueue ( const UByte pInData,
const size_t  inByteCount 
)
virtual

Parses the given Service Block into elementary commands and enqueues them as independent Service Blocks.

Parameters
[in]pInDataSpecifies a valid, non-NULL address of the first Data Word of Service Block (NOT the Service Block header!).
[in]inByteCountSpecifies the number of data bytes in the Service Block.
Returns
True if successful; otherwise false.

◆ PeekNextServiceBlockInfo()

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

◆ PopServiceBlock() [1/2]

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

◆ PopServiceBlock() [2/2]

virtual size_t CNTV2Caption708Service::PopServiceBlock ( UByte pData)
virtual

◆ PopServiceBlockData() [1/2]

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

◆ PopServiceBlockData() [2/2]

virtual size_t CNTV2Caption708Service::PopServiceBlockData ( UByte pData)
virtual

◆ Reset()

virtual void CNTV2Caption708Service::Reset ( void  )
virtual

Resets the Caption Channel Service. See CEA-708-D section 8.10.5.14.

◆ SetCurrentWindow()

virtual bool CNTV2Caption708Service::SetCurrentWindow ( const int  inWindowID)
virtual

Specifies my current window ID, replacing the former value. See CEA-708-D section 8.10.5.1. Subsequent calls to SetWindowAttributes, SetPenAttributes, SetPenLocation, etc. will affect this window.

Parameters
[in]inWindowIDSpecifies the window that is to become the current one. Must be 0 thru 7.
Returns
True if successful; otherwise false.

◆ SetLogMask()

virtual NTV2CaptionLogMask CNTV2Caption708Service::SetLogMask ( const NTV2CaptionLogMask  inLogMask)
virtual

Specifies what, if any, debug information I will write to my log stream.

Parameters
[in]inLogMaskA bit mask that specifies what information will be logged.

Reimplemented from CNTV2CaptionLogConfig.

◆ SetPenAttributes()

virtual void CNTV2Caption708Service::SetPenAttributes ( const CC708PenAttr inAttributes)
virtual

Specifies new pen attributes for my current window. See CEA-708-D section 8.10.5.9.

Parameters
[in]inAttributesSpecifies the pen attributes to use.

◆ SetPenColor()

virtual void CNTV2Caption708Service::SetPenColor ( const CC708PenColor inColor)
virtual

Specifies a new pen color for my current window. See CEA-708-D section 8.10.5.10.

Parameters
[in]inColorSpecifies the pen color to use.

◆ SetPenLocation()

virtual void CNTV2Caption708Service::SetPenLocation ( const CC708PenLocation inLocation)
virtual

Specifies a new pen location for my current window. See CEA-708-D section 8.10.5.11.

Parameters
[in]inLocationSpecifies the pen location to use.

◆ SetServiceInfo()

virtual bool CNTV2Caption708Service::SetServiceInfo ( const NTV2_CC708ServiceInfo inNewSvcInfo)
virtual

◆ SetWindowAttributes()

virtual bool CNTV2Caption708Service::SetWindowAttributes ( const CC708WindowAttr inAttributes)
virtual

Specifies new attributes for my current window. See CEA-708-D section 8.10.5.8.

Parameters
[in]inAttributesSpecifies the window attributes to use.
Returns
True if successful; otherwise false.

◆ ToggleWindows()

virtual bool CNTV2Caption708Service::ToggleWindows ( const UByte  inWindowMap)
virtual

Toggles the display/hide status for the given set of windows. See CEA-708C section 8.10.5.7.

Parameters
[in]inWindowMapSpecifies the set of windows to be affected, where each bit of the given 8-bit value corresponds to a window ID (0 thru 7). If the map's bit is set, the window having the ID corresponding to that bit will be affected.
Returns
True if successful; otherwise false.

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