AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
#include <ntv2captiondecoder608.h>
Public Member Functions | |
virtual bool | IsFlashCycleOff (void) const |
virtual | ~CNTV2CaptionDecoder608 () |
My destructor. More... | |
virtual NTV2CaptionLogMask | SetLogMask (const NTV2CaptionLogMask inLogMask) |
Specifies what, if any, debug information I will write to my log stream. More... | |
virtual bool | BurnCaptions (UByte *pBuf, const NTV2FrameDimensions fd, const NTV2PixelFormat pf, const UWord rb) |
virtual CNTV2CaptionDecodeChannel608Ptr | Get608ChannelDecoder (const NTV2Line21Channel inChannel) const |
Decoder Operation | |
virtual void | Reset (void) |
Flushes me, clearing all in-progress data. More... | |
virtual bool | SetDisplayChannel (const NTV2Line21Channel inChannel) |
Changes the caption channel that I'm focused on (or that I'm currently "burning" into video). More... | |
virtual NTV2Line21Channel | GetDisplayChannel (void) const |
Answers with the caption channel that I'm currently focused on (or that I'm currently "burning" into video). More... | |
virtual void | IdleFrame (void) |
Call this once per video frame when I'm doing display "burn-in", whether there is new caption data to parse or not. This keeps "flash" mode regular during "burn-in". More... | |
virtual bool | ProcessNew608FrameData (const CaptionData &inCC608Data) |
Notifies me that new frame data has arrived. Clients should call this method once per video frame with the four bytes (2 per field) of new captioning data. More... | |
Caption Screen Access | |
virtual UByte | GetOnAirCharacterWithAttributes (const UWord inRow, const UWord inCol, NTV2Line21Attrs &outAttrs) const |
Retrieves the "on-air" character and its attributes at the given on-screen row and column position. More... | |
virtual UWord | GetOnAirUTF16CharacterWithAttributes (const UWord inRow, const UWord inCol, NTV2Line21Attrs &outAttrs) const |
Returns the UTF-16 character that best represents the caption character at the given screen position. More... | |
virtual std::string | GetOnAirCharacter (const UWord inRow, const UWord inCol, NTV2Line21Attrs &outAttrs) const |
Retrieves the "on-air" character and its attributes at the given row and column position. More... | |
virtual std::string | GetOnAirCharacter (const UWord inRow, const UWord inCol) const |
Retrieves the "on-air" character at the given on-screen row and column position. More... | |
virtual std::string | GetOnAirCharacters (const UWord inRowNumber=0) const |
Retrieves all "on-air" characters either for all rows, or a specific row. More... | |
Caption Display Rendering | |
virtual bool | BurnCaptions (NTV2Buffer &inFB, const NTV2FormatDesc &inFD) |
Blits all of my current caption channel's "on-air" captions into the given host buffer with the correct colors, display attributes and positioning. More... | |
Text Mode Operation | |
virtual UWord | GetTextModeDisplayRowCount (const NTV2Line21Channel inChannel) |
Returns the number of rows used for displaying Text Mode captions for the given (TxN) caption channel. More... | |
virtual bool | SetTextModeDisplayRowCount (const NTV2Line21Channel inChannel, const UWord inNumRows) |
Changes the number of rows used for displaying Text Mode captions for the given (TxN) caption channel. More... | |
virtual const NTV2Line21Attrs & | GetTextModeDisplayAttributes (const NTV2Line21Channel inChannel) const |
Returns the display attributes that Text Mode captions are currently using (assuming my caption channel is Tx1/Tx2/Tx3/Tx4). More... | |
virtual bool | SetTextModeDisplayAttributes (const NTV2Line21Channel inChannel, const NTV2Line21Attrs &inAttrs) |
Sets the display attributes that Text Mode captions will use henceforth for the given (TxN) caption channel. More... | |
Change Notification | |
virtual bool | SubscribeChangeNotification (NTV2Caption608Changed *pInCallback, void *pInUserData=0) |
Subscribes to change notifications. More... | |
virtual bool | UnsubscribeChangeNotification (NTV2Caption608Changed *pInCallback, void *pInUserData=0) |
Unsubscribes a prior change notification subscription. More... | |
Decoder Debug Helpers | |
virtual void | DebugPrintCurrentScreen (const bool inAllChannels=false, const bool inShowChars=true, const bool inShowTextChannels=false) |
virtual void | SetDebugRowsOfInterest (const NTV2Line21Channel inChannel, const UWord inFromRow, const UWord inToRow, const bool inAdd=false) |
virtual void | SetDebugColumnsOfInterest (const NTV2Line21Channel inChannel, const UWord inFromCol, const UWord inToCol, const bool inAdd=false) |
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 |
Static Public Member Functions | |
static bool | Create (CNTV2CaptionDecoder608Ptr &outEncoder) |
Creates a new CNTV2CaptionEncoder608 instance. More... | |
static CaptionData | DecodeCaptionData (const UByte *pFB, const NTV2PixelFormat pf, const NTV2VideoFormat vf, const NTV2FrameGeometry fg=NTV2_FG_720x486) |
@deprecate This function is obsolete 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 int | CharacterFlashCycleFrames = 30 |
Determines the flash/blink rate for characters having the "flash" attribute. It's the number of frames required to complete a full cycle from "on" thru "off". Defaults to 30 frames, or about a second at 29.97 fps. More... | |
Global Decoder Operation Options | |
static bool | UseNewBurnCaptionsMethod |
Default is false. Reserved for future use. More... | |
static bool | RenderPrePostSpaces |
Default is true. If true, BurnCaptions leads & follows character runs with blank space. More... | |
static bool | AutoCallIdleFrame |
Default is false. If true, ProcessNew608FrameData will automatically call IdleFrame. More... | |
static bool | AutoFlashOnAirChars |
Default is false. If true, GetOnAir... functions will automatically "flash" (periodically return spaces) 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... | |
Definition at line 67 of file ntv2captiondecoder608.h.
|
virtual |
My destructor.
|
virtual |
Blits all of my current caption channel's "on-air" captions into the given host buffer with the correct colors, display attributes and positioning.
inFB | Specifies a valid host buffer that is to be blitted into. | |
[in] | inFD | Describes the raster and pixel format of the given host buffer. |
|
virtual |
|
static |
Creates a new CNTV2CaptionEncoder608 instance.
[out] | outEncoder | Receives the newly-created encoder instance. |
|
virtual |
|
static |
@deprecate This function is obsolete
|
virtual |
|
inlinevirtual |
Answers with the caption channel that I'm currently focused on (or that I'm currently "burning" into video).
Definition at line 108 of file ntv2captiondecoder608.h.
|
inlinevirtual |
Retrieves the "on-air" character at the given on-screen row and column position.
[in] | inRow | Specifies the row number of interest (1-15). |
[in] | inCol | Specifies the column number of interest (1-32). |
Definition at line 191 of file ntv2captiondecoder608.h.
|
virtual |
Retrieves the "on-air" character and its attributes at the given row and column position.
[in] | inRow | Specifies the row number of interest (1-15). |
[in] | inCol | Specifies the column number of interest (1-32). |
[out] | outAttrs | Receives the attributes of the "on-air" character of interest. |
|
virtual |
Retrieves all "on-air" characters either for all rows, or a specific row.
[in] | inRowNumber | Optionally specifies the row number of interest (1 thru 15). Specify zero (the default) to return all rows. |
|
virtual |
Retrieves the "on-air" character and its attributes at the given on-screen row and column position.
[in] | inRow | Specifies the row number of interest. Must be 1-15. |
[in] | inCol | Specifies the column number of interest. Must be 1-32. |
[out] | outAttrs | Receives the attributes of the "on-air" character of interest. |
|
virtual |
Returns the UTF-16 character that best represents the caption character at the given screen position.
[in] | inRow | The row number of interest (1-15). |
[in] | inCol | The column number of interest (1-32). |
[out] | outAttrs | Receives the NTV2Line21Attributes of the on-screen character. |
|
virtual |
Returns the display attributes that Text Mode captions are currently using (assuming my caption channel is Tx1/Tx2/Tx3/Tx4).
[in] | inChannel | Specifies the [Text] caption channel of interest. |
|
virtual |
Returns the number of rows used for displaying Text Mode captions for the given (TxN) caption channel.
[in] | inChannel | Specifies the [Text] caption channel of interest. |
|
virtual |
Call this once per video frame when I'm doing display "burn-in", whether there is new caption data to parse or not. This keeps "flash" mode regular during "burn-in".
|
inlinevirtual |
Definition at line 291 of file ntv2captiondecoder608.h.
|
virtual |
Notifies me that new frame data has arrived. Clients should call this method once per video frame with the four bytes (2 per field) of new captioning data.
[in] | inCC608Data | Specifies the caption data that arrived for the lastest frame. |
|
virtual |
Flushes me, clearing all in-progress data.
|
virtual |
|
virtual |
|
virtual |
Changes the caption channel that I'm focused on (or that I'm currently "burning" into video).
[in] | inChannel | Specifies the new caption channel that I am to focus on. |
|
virtual |
Specifies what, if any, debug information I will write to my log stream.
[in] | inLogMask | A bit mask that specifies what information will be logged. |
Reimplemented from CNTV2CaptionLogConfig.
|
virtual |
Sets the display attributes that Text Mode captions will use henceforth for the given (TxN) caption channel.
[in] | inChannel | Specifies the [Text] caption channel to be configured. |
[in] | inAttrs | Specifies the new display attributes for Text Mode captions will have going forward. |
|
virtual |
Changes the number of rows used for displaying Text Mode captions for the given (TxN) caption channel.
[in] | inChannel | Specifies the [Text] caption channel to be configured. |
[in] | inNumRows | Specifies the number of rows to use for displaying Text Mode captions. Must be at least 1 and no more than 32. |
|
virtual |
Subscribes to change notifications.
[in] | pInCallback | Specifies a pointer to the callback function to be called if/when changes occur. |
[in] | pInUserData | Optionally specifies a data pointer to be passed to the callback function. |
|
virtual |
Unsubscribes a prior change notification subscription.
[in] | pInCallback | Specifies a pointer to the callback function that was specified in the prior call to SubscribeChangeNotification. |
[in] | pInUserData | Specifies the userData pointer that was specified in the prior call to SubscribeChangeNotification. |
|
static |
Default is false. If true, ProcessNew608FrameData will automatically call IdleFrame.
Definition at line 338 of file ntv2captiondecoder608.h.
|
static |
Default is false. If true, GetOnAir... functions will automatically "flash" (periodically return spaces)
Definition at line 339 of file ntv2captiondecoder608.h.
|
static |
Determines the flash/blink rate for characters having the "flash" attribute. It's the number of frames required to complete a full cycle from "on" thru "off". Defaults to 30 frames, or about a second at 29.97 fps.
Definition at line 83 of file ntv2captiondecoder608.h.
|
static |
Default is true. If true, BurnCaptions leads & follows character runs with blank space.
Definition at line 337 of file ntv2captiondecoder608.h.
|
static |
Default is false. Reserved for future use.
Definition at line 336 of file ntv2captiondecoder608.h.