AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
Instances of me can encode two ASCII characters into a "line 21" closed-captioning waveform. Conversely, my CNTV2Line21Captioner::DecodeLine class method can decode a "line 21" waveform to the two characters it contains. More...
#include <ntv2line21captioner.h>
Public Member Functions | |
CNTV2Line21Captioner () | |
720 pixels x 2 bytes per pixel More... | |
virtual | ~CNTV2Line21Captioner () |
My default destructor. More... | |
virtual UByte * | EncodeLine (const UByte inByte1, const UByte inByte2) |
Encodes the two given characters as an EIA-608-compliant "line 21" waveform into my private line data buffer. Client applications will probably want to copy this waveform data into their own host frame buffer for eventual transmission to an SDI output. Returns the starting address of my private line buffer. More... | |
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 |
Static Public Member Functions | |
static bool | DecodeLine (const UByte *pLineData, UByte &outChar1, UByte &outChar2) |
Decodes the supplied line of 8-bit uncompressed ('2vuy') data and, if successful, returns the two 8-bit characters. More... | |
static bool | DecodeLine (const std::vector< uint8_t > &inLineData, std::vector< uint8_t > &outData) |
Decodes the supplied line of 8-bit uncompressed ('2vuy') data and, if successful, returns the 8-bit decoded data. More... | |
static const UByte * | FindFirstDataBit_NTSC (const void *pInVideoLine) |
Searches for a valid captioning clock run-in in the given 8-bit uncompressed ('2vuy') line. More... | |
static std::vector< uint8_t >::size_type | FindFirstDataBit_NTSC (const std::vector< uint8_t > &in2VUYLine) |
Searches for a valid captioning clock run-in in the given 8-bit uncompressed ('2vuy') line. More... | |
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) |
Static Public Attributes | |
static const UWord | CC_LINE_WIDTH_PIXELS = 720 |
static const UWord | ENCODE_LINE_LENGTH_BYTES = CC_LINE_WIDTH_PIXELS * 2 |
Standard-Definition only – assume fixed line width of 720 pixels. More... | |
Additional Inherited Members | |
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... | |
Instances of me can encode two ASCII characters into a "line 21" closed-captioning waveform. Conversely, my CNTV2Line21Captioner::DecodeLine class method can decode a "line 21" waveform to the two characters it contains.
In either use case, I assume a 720-pixel line (e.g. Standard Definition "NTSC"), and the closed captioning is represented by an EIA-608 waveform. I do not handle other forms of closed captioning transmission (e.g., EIA-708, digital ancillary packets, etc.).
Definition at line 34 of file ntv2line21captioner.h.
CNTV2Line21Captioner::CNTV2Line21Captioner | ( | ) |
720 pixels x 2 bytes per pixel
My default constructor.
|
virtual |
My default destructor.
|
static |
Decodes the supplied line of 8-bit uncompressed ('2vuy') data and, if successful, returns the 8-bit decoded data.
[in] | inLineData | A line of 8-bit uncompressed '2vuy' data that contains the "line 21" waveform data to be decoded. |
[out] | outData | Receives the data bytes (including parity) decoded from the line. |
|
static |
Decodes the supplied line of 8-bit uncompressed ('2vuy') data and, if successful, returns the two 8-bit characters.
[in] | pLineData | Specifies a valid, non-NULL pointer to the first byte in a frame buffer that contains the "line 21" waveform data to be decoded. |
[out] | outChar1 | Receives the first caption data byte decoded from the line. |
[out] | outChar2 | Receives the second caption data byte decoded from the line. |
|
virtual |
Encodes the two given characters as an EIA-608-compliant "line 21" waveform into my private line data buffer. Client applications will probably want to copy this waveform data into their own host frame buffer for eventual transmission to an SDI output. Returns the starting address of my private line buffer.
[in] | inByte1 | The first character to be encoded. The data byte MUST include parity. |
[in] | inByte2 | The second character to be encoded. The data byte MUST include parity. |
|
static |
Searches for a valid captioning clock run-in in the given 8-bit uncompressed ('2vuy') line.
[in] | in2VUYLine | A buffer containing the line of 8-bit '2vuy' video to be searched. |
|
static |
Searches for a valid captioning clock run-in in the given 8-bit uncompressed ('2vuy') line.
[in] | pInVideoLine | A valid pointer to a buffer containing the line of 8-bit '2vuy' video to be searched. Must be at least 1440 bytes in length. |
|
static |
Definition at line 82 of file ntv2line21captioner.h.
|
static |
Standard-Definition only – assume fixed line width of 720 pixels.
Definition at line 83 of file ntv2line21captioner.h.