AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
CaptionSource Class Reference
Inheritance diagram for CaptionSource:
[legend]

Public Member Functions

 CaptionSource (const double inCharsPerMinute, istream *pInInputStream, const string &inFilePath, const bool inDeleteInputStream=(0))
 My only constructor. More...
 
virtual ~CaptionSource ()
 My destructor. If was told at construction time that I was to be responsible for deleting the input stream, then I'll delete it here. More...
 
virtual string GetNextCaptionCharacter (void)
 Returns the next character read from my input stream. If my text input stream has reached EOF, I set my "finished" flag and return zero. More...
 
virtual string GetNextCaptionWord (bool &outLineBreak)
 Returns the next "word" read from my input stream. If my text input stream has reached EOF, I set my "finished" flag and return an empty string. If the returned word is longer than my maximum allowable word length, the string is truncated to that maximum length. More...
 
virtual string GetNextCaptionRow (const bool inBreakLinesOnNewLineChars=(0))
 Returns the next "sentence" read from my input stream. I build the "sentence" by reading "words" using my GetNextCaptionWord function. I always try to return a sentence as close to my designated maximum sentence length as possible. In Text Mode, there's no limit to the length of the row text. More...
 
virtual void SetTextMode (const bool inIsTextMode)
 Sets my text mode. If I'm in text mode, I don't do any word breaking or line/row truncation. More...
 

Detailed Description

Definition at line 277 of file ntv2ccplayer.cpp.

Constructor & Destructor Documentation

◆ CaptionSource()

CaptionSource::CaptionSource ( const double  inCharsPerMinute,
istream *  pInInputStream,
const string &  inFilePath,
const bool  inDeleteInputStream = (0) 
)
inlineexplicit

My only constructor.

Parameters
[in]inCharsPerMinuteSpecifies the maximum rate at which I will emit characters.
[in]pInInputStreamSpecifies a valid, non-NULL pointer to the input stream to use.
[in]inFilePathSpecifies the input stream file path (if any)
[in]inDeleteInputStreamIf true, I will delete the input stream object when I'm destroyed; otherwise it's the caller's responsibility.

Definition at line 289 of file ntv2ccplayer.cpp.

◆ ~CaptionSource()

virtual CaptionSource::~CaptionSource ( )
inlinevirtual

My destructor. If was told at construction time that I was to be responsible for deleting the input stream, then I'll delete it here.

Definition at line 311 of file ntv2ccplayer.cpp.

Member Function Documentation

◆ GetNextCaptionCharacter()

virtual string CaptionSource::GetNextCaptionCharacter ( void  )
inlinevirtual

Returns the next character read from my input stream. If my text input stream has reached EOF, I set my "finished" flag and return zero.

Returns
A string containing a single UTF8-encoded unicode character.

Definition at line 328 of file ntv2ccplayer.cpp.

◆ GetNextCaptionRow()

virtual string CaptionSource::GetNextCaptionRow ( const bool  inBreakLinesOnNewLineChars = (0))
inlinevirtual

Returns the next "sentence" read from my input stream. I build the "sentence" by reading "words" using my GetNextCaptionWord function. I always try to return a sentence as close to my designated maximum sentence length as possible. In Text Mode, there's no limit to the length of the row text.

Definition at line 465 of file ntv2ccplayer.cpp.

◆ GetNextCaptionWord()

virtual string CaptionSource::GetNextCaptionWord ( bool &  outLineBreak)
inlinevirtual

Returns the next "word" read from my input stream. If my text input stream has reached EOF, I set my "finished" flag and return an empty string. If the returned word is longer than my maximum allowable word length, the string is truncated to that maximum length.

Parameters
[out]outLineBreakReturns true if a newline or line break was encountered in the resulting caption word; otherwise returns false.

Definition at line 433 of file ntv2ccplayer.cpp.

◆ SetTextMode()

virtual void CaptionSource::SetTextMode ( const bool  inIsTextMode)
inlinevirtual

Sets my text mode. If I'm in text mode, I don't do any word breaking or line/row truncation.

Parameters
[in]inIsTextModeSpecify true if I'm supplying caption data to a text channel (Tx1, Tx2, Tx3 or Tx4). Specify false if I'm supplying caption data to a normal caption channel (CC1, CC2, CC3, or CC4).

Definition at line 570 of file ntv2ccplayer.cpp.


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