#include <ntv2captionlogging.h>
|
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) |
|
Definition at line 77 of file ntv2captionlogging.h.
◆ CNTV2CaptionLogConfig()
CNTV2CaptionLogConfig::CNTV2CaptionLogConfig |
( |
const std::string |
inLogLabel = std::string() | ) |
|
Default constructor.
- Parameters
-
[in] | inLogLabel | Optionally specifies a label for this instance's log output. |
◆ ~CNTV2CaptionLogConfig()
virtual CNTV2CaptionLogConfig::~CNTV2CaptionLogConfig |
( |
| ) |
|
|
virtual |
◆ AppendToLogLabel()
virtual void CNTV2CaptionLogConfig::AppendToLogLabel |
( |
const std::string & |
inString | ) |
|
|
virtual |
Appends the given string to my current log label.
- Parameters
-
[in] | inString | Specifies the string to append to my current log label. |
◆ DumpMemory()
static std::ostream& CNTV2CaptionLogConfig::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 |
|
) |
| |
|
static |
Dumps a contiguous chunk of memory in hex, octal, decimal, with or without ascii, to the given output stream.
- Parameters
-
pInStartAddress | A valid, non-NULL pointer to the start of the host memory to be dumped. |
inByteCount | The number of bytes to be dumped. |
inOutputStream | Output stream that will receive the dump. |
inRadix | 16=hex, 10=decimal, 8=octal, 2=binary – all others disallowed. |
inBytesPerGroup | Number of bytes to dump per contiguous group of numbers. |
inGroupsPerLine | Number of contiguous groups of numbers to dump per output line. If zero, no grouping is done, and address & ASCII display is suppressed. |
inAddressRadix | 0=omit, 2=binary, 8=octal, 10=decimal, 16=hex – all others disallowed. |
inShowAscii | True = also dump ASCII characters; false = don't dump ASCII characters. Overridden to false if inGroupsPerLine is zero. |
inAddrOffset | Specifies a value to be added to the addresses that appear in the dump. Ignored if inGroupsPerLine is zero. |
- Returns
- A non-constant reference to the output stream that received the dump.
◆ DumpYBytes_2vuy() [1/2]
static std::ostream& CNTV2CaptionLogConfig::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 |
|
) |
| |
|
static |
Dumps the luma values in hexadecimal from the given line of '2vuy' video to the given output stream.
- Parameters
-
inVideoLine | A vector of 8-bit values comprising the '2vuy' video line. It is assumed this is SD video, and the line width is at least 720 pixels (1440 elements). |
inOutputStream | Specifies the output stream that will receive the dump. |
inFromPixel | Specifies starting pixel, a zero-based index. Defaults to the first pixel in the line. |
inToPixel | Specifies the last pixel to appear in the dump, a zero-based index. Defaults to the last pixel in the line (assuming 720 pixel SD). |
inShowRuler | If true, precedes the dump with a "ruler" to indicate pixel locations. Defaults to true. |
inHiliteRangeFrom | Specifies the starting pixel to hilight, a zero-based pixel index. Defaults to 9999, which indicates no highlighting should appear in the dump. If this value matches inHiliteRangeTo, only a single pixel will be highlighted. |
inHiliteRangeTo | Specifies the last pixel to hilight, a zero-based pixel index. Defaults to 9999, which indicates no highlighting should appear in the dump. If this value matches inHiliteRangeFrom, only a single pixel will be highlighted. |
- Returns
- A non-constant reference to the output stream that received the dump.
◆ DumpYBytes_2vuy() [2/2]
static std::ostream& CNTV2CaptionLogConfig::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 |
|
) |
| |
|
static |
Dumps the luma values in hexadecimal from the given line of '2vuy' video to the given output stream.
- Parameters
-
pInVideoLine | A valid, non-NULL pointer to the first byte of the line of '2vuy' video in host memory. It is assumed this is SD video, and the line width is at least 720 pixels. |
inOutputStream | Specifies the output stream that will receive the dump. |
inFromPixel | Specifies starting pixel, a zero-based index. Defaults to the first pixel in the line. |
inToPixel | Specifies the last pixel to appear in the dump, a zero-based index. Defaults to the last pixel in the line (assuming 720 pixel SD). |
inShowRuler | If true, precedes the dump with a "ruler" to indicate pixel locations. Defaults to true. |
inHiliteRangeFrom | Specifies the starting pixel to hilight, a zero-based pixel index. Defaults to 9999, which indicates no highlighting should appear in the dump. If this value matches inHiliteRangeTo, only a single pixel will be highlighted. |
inHiliteRangeTo | Specifies the last pixel to hilight, a zero-based pixel index. Defaults to 9999, which indicates no highlighting should appear in the dump. If this value matches inHiliteRangeFrom, only a single pixel will be highlighted. |
- Returns
- A non-constant reference to the output stream that received the dump.
◆ GetLogLabel()
virtual const std::string& CNTV2CaptionLogConfig::GetLogLabel |
( |
void |
| ) |
const |
|
virtual |
Answers with my current logging label.
- Returns
- My current logging label.
◆ GetLogMask()
Answers with my current caption logging bit mask.
- Returns
- My current caption logging mask.
Definition at line 193 of file ntv2captionlogging.h.
◆ GetSeverityLabel()
static std::string CNTV2CaptionLogConfig::GetSeverityLabel |
( |
const unsigned |
inSeverity | ) |
|
|
static |
◆ HexDump32Bytes()
static std::string CNTV2CaptionLogConfig::HexDump32Bytes |
( |
const void * |
pInStartAddress, |
|
|
const size_t |
inByteCount, |
|
|
const size_t |
inLimitBytes = 32 |
|
) |
| |
|
static |
- Returns
- A string containing a hex dump of up to 32 bytes from the given buffer.
- Parameters
-
pInStartAddress | A valid, non-NULL pointer to the start of the host memory to be dumped. |
inByteCount | The maximum number of bytes from the buffer to be dumped. |
inLimitBytes | The maximum number of bytes to be dumped. Defaults to 32. |
◆ Log()
virtual std::ostream& CNTV2CaptionLogConfig::Log |
( |
void |
| ) |
const |
|
virtual |
◆ LogIf()
virtual std::ostream& CNTV2CaptionLogConfig::LogIf |
( |
const NTV2CaptionLogMask |
inLogMask | ) |
const |
|
virtual |
◆ SetLogLabel()
virtual void CNTV2CaptionLogConfig::SetLogLabel |
( |
const std::string & |
inNewLabel | ) |
|
|
virtual |
Specifies my logging label.
- Parameters
-
[in] | inNewLabel | Specifies my new logging label. |
◆ SetLogMask()
◆ SetLogStream()
virtual void CNTV2CaptionLogConfig::SetLogStream |
( |
std::ostream & |
inOutputStream | ) |
|
|
virtual |
◆ TestLogMask()
virtual bool CNTV2CaptionLogConfig::TestLogMask |
( |
const NTV2CaptionLogMask |
inLogMask, |
|
|
const bool |
inExact = false |
|
) |
| const |
|
inlinevirtual |
Answers true if the given log mask bits are set in my current log mask.
- Parameters
-
[in] | inLogMask | Specifies the log mask bits of interest. |
[in] | inExact | If true, the log mask must match exactly; otherwise any matching bit will constitute a match. Defaults to false (any matching bit). |
- Returns
- True if all given log mask bits are set; otherwise false.
Definition at line 202 of file ntv2captionlogging.h.
◆ mLogLabel
std::string CNTV2CaptionLogConfig::mLogLabel |
|
protected |
◆ mLogMask
◆ mpLabelLock
void* CNTV2CaptionLogConfig::mpLabelLock |
|
mutableprotected |
Protects my debug label from simultaneous access by more than one thread.
Definition at line 233 of file ntv2captionlogging.h.
The documentation for this class was generated from the following file: