AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
ntv2caption608types.h File Reference

Declares several data types used with 608/SD captioning. More...

#include "ajatypes.h"
#include "ajaexport.h"
#include "ntv2utils.h"
#include <ostream>
#include <string>
#include <set>
#include <map>
Include dependency graph for ntv2caption608types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NTV2Line21Attributes
 CEA-608 Character Attributes. More...
 
struct  CaptionData
 This structure encapsulates all possible CEA-608 caption data bytes that may be associated with a given frame or field. More...
 
class  NTV2Caption608ChangeInfo
 This class is used to respond to dynamic events that occur during CEA-608 caption decoding. More...
 
union  NTV2Caption608ChangeInfo::_u
 
struct  NTV2Caption608ChangeInfo::_u::_currentChannel
 
struct  NTV2Caption608ChangeInfo::_u::_currentRow
 
struct  NTV2Caption608ChangeInfo::_u::_currentColumn
 
struct  NTV2Caption608ChangeInfo::_u::_currentScreen
 
struct  NTV2Caption608ChangeInfo::_u::_captionMode
 
struct  NTV2Caption608ChangeInfo::_u::_screenChar
 
struct  NTV2Caption608ChangeInfo::_u::_screenAttr
 
class  NTV2Line21AttributePermutations
 An ordered set of all possible NTV2Line21Attributes permutations (excluding the "flashing" attribute, which is not required for glyph rendering). Call size() to discover how many there are. Call GetPermutation with an index >= 0 and < size() to get a specific attribute permutation. Call GetIndexFromAttribute to find out which permutation index corresponds to the given attribute. More...
 

Macros

#define NULL   0
 
#define IsValidLine21Row(__row__)   ((__row__) >= NTV2_CC608_MinRow && (__row__) <= NTV2_CC608_MaxRow)
 
#define IsValidLine21Column(__col__)   ((__col__) >= NTV2_CC608_MinCol && (__col__) <= NTV2_CC608_MaxCol)
 
#define IsValidLine21Field(_field_)   ((_field_) == NTV2_CC608_Field1 || (_field_) == NTV2_CC608_Field2)
 
#define IsLine21Field1(_field_)   ((_field_) == NTV2_CC608_Field1)
 
#define IsLine21Field2(_field_)   ((_field_) == NTV2_CC608_Field2)
 
#define IsValidLine21Channel(_chan_)   ((_chan_) >= NTV2_CC608_CC1 && (_chan_) < NTV2_CC608_ChannelMax)
 
#define IsLine21CaptionChannel(_chan_)   ((_chan_) >= NTV2_CC608_CC1 && (_chan_) <= NTV2_CC608_CC4)
 
#define IsLine21TextChannel(_chan_)   ((_chan_) >= NTV2_CC608_Text1 && (_chan_) <= NTV2_CC608_Text4)
 
#define IsLine21XDSChannel(_chan_)   ((_chan_) == NTV2_CC608_XDS)
 
#define IsField1Line21CaptionChannel(_chan_)   ((_chan_) == NTV2_CC608_CC1 || (_chan_) == NTV2_CC608_CC2 || (_chan_) == NTV2_CC608_Text1 || (_chan_) == NTV2_CC608_Text2)
 
#define IsField2Line21CaptionChannel(_chan_)   ((_chan_) == NTV2_CC608_CC3 || (_chan_) == NTV2_CC608_CC4 || (_chan_) == NTV2_CC608_Text3 || (_chan_) == NTV2_CC608_Text4)
 
#define IsValidLine21Mode(_mode_)   ((_mode_) >= NTV2_CC608_CapModePopOn && (_mode_) < NTV2_CC608_CapModeMax)
 
#define IsLine21PopOnMode(_mode_)   ((_mode_) == NTV2_CC608_CapModePopOn)
 
#define IsLine21PaintOnMode(_mode_)   ((_mode_) == NTV2_CC608_CapModePaintOn)
 
#define IsLine21RollUpMode(_mode_)   ((_mode_) >= NTV2_CC608_CapModeRollUp2 && (_mode_) <= NTV2_CC608_CapModeRollUp4)
 
#define IsValidLine21Color(_color_)   ((_color_) >= NTV2_CC608_White && (_color_) < NTV2_CC608_NumColors)
 
#define IsLine21WhiteColor(_color_)   ((_color_) == NTV2_CC608_White)
 
#define IsLine21BlackColor(_color_)   ((_color_) == NTV2_CC608_Black)
 
#define IsValidLine21Opacity(_opacity_)   ((_opacity_) >= NTV2_CC608_Opaque && (_opacity_) < NTV2_CC608_NumOpacities)
 
#define IsLine21Transparent(_opacity_)   ((_opacity_) == NTV2_CC608_Transparent)
 
#define IsLine21SemiTransparent(_opacity_)   ((_opacity_) == NTV2_CC608_SemiTransparent)
 
#define IsLine21Opaque(_opacity_)   ((_opacity_) == NTV2_CC608_Opaque)
 
#define IsValidLine21CharacterSet(_charset_)   ((_charset_) >= NTV2_CC608_DefaultCharacterSet && (_charset_) < NTV2_CC608_NumCharacterSets)
 

Typedefs

typedef enum NTV2Line21Field NTV2Line21Field
 The two CEA-608 interlace fields. More...
 
typedef enum NTV2Line21Channel NTV2Line21Channel
 The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS. More...
 
typedef enum NTV2Line21Mode NTV2Line21Mode
 The CEA-608 modes: pop-on, roll-up (2, 3 and 4-line), and paint-on. More...
 
typedef enum NTV2Line21Color NTV2Line21Color
 The CEA-608 color values: white, green, blue, cyan, red, yellow, magenta, and black. More...
 
typedef enum NTV2Line21Opacity NTV2Line21Opacity
 The CEA-608 character opacity values: opaque, semi-transparent, and transparent. More...
 
typedef enum NTV2Line21CharacterSet NTV2Line21CharacterSet
 The available CEA-608 character sets. More...
 
typedef enum NTV2Line21CharacterSet NTV2Line21CharSet
 
typedef ULWord NTV2_CC608_CodePoint
 Describes a unique CEA-608 caption character code point in 32 bits: 0xSS00XXYY, where... SS == NTV2Line21CharacterSet XX == CEA608 byte 1 (parity stripped) YY == CEA608 byte 2 (parity stripped) More...
 
typedef std::set< NTV2_CC608_CodePointNTV2CodePointSet
 A set of unique CEA-608 caption character code points. More...
 
typedef NTV2CodePointSet::const_iterator NTV2CodePointSetConstIter
 
typedef struct NTV2Line21Attributes NTV2Line21Attributes
 CEA-608 Character Attributes. More...
 
typedef struct NTV2Line21Attributes NTV2Line21Attrs
 
typedef NTV2Line21AttrsNTV2Line21AttrsPtr
 
typedef NTV2Line21AttrsPtr NTV2Line21AttributesPtr
 
typedef struct CaptionData CaptionData
 This structure encapsulates all possible CEA-608 caption data bytes that may be associated with a given frame or field. More...
 
typedef void() NTV2Caption608Changed(void *pInstance, const NTV2Caption608ChangeInfo &inChangeInfo)
 This callback is used to respond to dynamic events that occur during CEA-608 caption decoding. More...
 

Enumerations

enum  NTV2Line21Field { NTV2_CC608_Field_Invalid = 0, NTV2_CC608_Field1 = 1, NTV2_CC608_Field2 = 2, NTV2_CC608_Field_Max = NTV2_CC608_Field2 }
 The two CEA-608 interlace fields. More...
 
enum  NTV2Line21Channel {
  NTV2_CC608_CC1, NTV2_CC608_CC2, NTV2_CC608_CC3, NTV2_CC608_CC4,
  NTV2_CC608_TextChannelOffset, NTV2_CC608_Text1 = NTV2_CC608_TextChannelOffset, NTV2_CC608_Text2, NTV2_CC608_Text3,
  NTV2_CC608_Text4, NTV2_CC608_XDS, NTV2_CC608_ChannelMax, NTV2_CC608_ChannelInvalid = NTV2_CC608_ChannelMax
}
 The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS. More...
 
enum  NTV2Line21Mode {
  NTV2_CC608_CapModeMin, NTV2_CC608_CapModeUnknown = NTV2_CC608_CapModeMin, NTV2_CC608_CapModePopOn, NTV2_CC608_CapModeRollUp2,
  NTV2_CC608_CapModeRollUp3, NTV2_CC608_CapModeRollUp4, NTV2_CC608_CapModePaintOn, NTV2_CC608_CapModeMax
}
 The CEA-608 modes: pop-on, roll-up (2, 3 and 4-line), and paint-on. More...
 
enum  NTV2Line21Color {
  NTV2_CC608_White, NTV2_CC608_Green, NTV2_CC608_Blue, NTV2_CC608_Cyan,
  NTV2_CC608_Red, NTV2_CC608_Yellow, NTV2_CC608_Magenta, NTV2_CC608_Black,
  NTV2_CC608_NumColors, NTV2_608_INVALID_COLOR = NTV2_CC608_NumColors
}
 The CEA-608 color values: white, green, blue, cyan, red, yellow, magenta, and black. More...
 
enum  NTV2Line21Opacity { NTV2_CC608_Opaque, NTV2_CC608_SemiTransparent, NTV2_CC608_Transparent, NTV2_CC608_NumOpacities }
 The CEA-608 character opacity values: opaque, semi-transparent, and transparent. More...
 
enum  NTV2Line21CharacterSet {
  NTV2_CC608_DefaultCharacterSet, NTV2_CC608_DoubleSizeCharacterSet, NTV2_CC608_PrivateCharacterSet1, NTV2_CC608_PrivateCharacterSet2,
  NTV2_CC608_PRChinaCharacterSet, NTV2_CC608_KoreanCharacterSet, NTV2_CC608_RegisteredCharacterSet1, NTV2_CC608_NumCharacterSets
}
 The available CEA-608 character sets. More...
 

Functions

const UWord NTV2_CC608_MinRow (1)
 The minimum row index number (located at the top of the screen). More...
 
const UWord NTV2_CC608_MaxRow (15)
 The maximum permissible row index number (located at the bottom of the screen). More...
 
const UWord NTV2_CC608_MinCol (1)
 The minimum column index number (located at the left edge of the screen). More...
 
const UWord NTV2_CC608_MaxCol (32)
 The maximum column index number (located at the right edge of the screen). More...
 
const std::string & NTV2Line21FieldToStr (const NTV2Line21Field inLine21Field)
 Converts the given NTV2Line21Field value into a human-readable string. More...
 
const std::string & NTV2Line21ChannelToStr (const NTV2Line21Channel inLine21Channel, const bool inCompact=true)
 Converts the given NTV2Line21Channel value into a human-readable string. More...
 
const std::string & NTV2Line21ModeToStr (const NTV2Line21Mode inLine21Mode)
 Converts the given NTV2Line21Mode value into a human-readable string. More...
 
const std::string & NTV2Line21ColorToStr (const NTV2Line21Color inLine21Color, const bool inCompact=true)
 Converts the given NTV2Line21Color value into a human-readable string. More...
 
bool NTV2Line21ColorToYUV8 (const NTV2Line21Color inLine21Color, UByte &outY, UByte &outCb, UByte &outCr)
 Converts a given CEA-608 color value into three 8-bit Y, Cb, Cr component values. More...
 
bool NTV2Line21ColorToRGB8 (const NTV2Line21Color inLine21Color, UByte &outR, UByte &outG, UByte &outB, const bool inIsHD=false)
 Converts a given CEA-608 color value into three 8-bit RGB component values. More...
 
const std::string & NTV2Line21OpacityToStr (const NTV2Line21Opacity inLine21Opacity, const bool inCompact=true)
 Converts the given NTV2Line21Opacity value into a human-readable string. More...
 
const std::string & NTV2Line21CharacterSetToStr (const NTV2Line21CharacterSet inLine21CharSet)
 Converts the given NTV2Line21CharacterSet value into a human-readable string. More...
 
std::string NTV2CodePointSetToString (const NTV2CodePointSet &inSet)
 
NTV2_CC608_CodePoint Make608CodePoint (const UByte in608Byte1, const UByte in608Byte2, const NTV2Line21CharacterSet inCharSet=NTV2_CC608_DefaultCharacterSet)
 Constructs a unique CEA-608 caption character code point from its three components. More...
 
std::string NTV2CC608CodePointToUtf8String (const NTV2_CC608_CodePoint in608CodePoint)
 Returns a string containing the UTF-8 character sequence that best represents the given CEA-608 code point. More...
 
UWord NTV2CC608CodePointToUtf16Char (const NTV2_CC608_CodePoint in608CodePoint)
 Returns the UTF-16 character that best represents the given CEA-608 code point. More...
 
NTV2Line21CharacterSet GetLine21CharacterSet (const NTV2_CC608_CodePoint inCodePoint)
 Extracts the NTV2Line21CharacterSet from the given NTV2_CC608_CodePoint. More...
 
UByte Get608Byte1 (const NTV2_CC608_CodePoint inCodePoint)
 Extracts the first CEA-608 byte from the given NTV2_CC608_CodePoint. More...
 
UByte Get608Byte2 (const NTV2_CC608_CodePoint inCodePoint)
 Extracts the second CEA-608 byte from the given NTV2_CC608_CodePoint. More...
 
std::ostream & operator<< (std::ostream &inOutStream, const NTV2Line21Attrs &inData)
 Writes a human-readable rendition of the given NTV2Line21Attributes into the given output stream. More...
 
std::string NTV2Line21AttributesToStr (const NTV2Line21Attributes inLine21Attributes)
 Converts the given NTV2Line21Attributes value into a human-readable string. More...
 
NTV2Line21Field StrToNTV2Line21Field (const std::string &inStr)
 Converts the given string into the equivalent NTV2Line21Field value. More...
 
NTV2Line21Channel StrToNTV2Line21Channel (const std::string &inStr)
 Converts the given string into the equivalent NTV2Line21Channel value. More...
 
NTV2Line21Mode StrToNTV2Line21Mode (const std::string &inStr)
 Converts the given string into the equivalent NTV2Line21Mode value. More...
 
NTV2Line21Color StrToNTV2Line21Color (const std::string &inStr)
 Converts the given string into the equivalent NTV2Line21Color value. More...
 
NTV2Line21Opacity StrToNTV2Line21Opacity (const std::string &inStr)
 Converts the given string into the equivalent NTV2Line21Opacity value. More...
 
NTV2Line21CharacterSet StrToNTV2Line21CharacterSet (const std::string &inStr)
 Converts the given string into the equivalent NTV2Line21CharacterSet value. More...
 
NTV2Line21Attributes StrToNTV2Line21Attributes (const std::string &inStr)
 Converts the given string into the equivalent NTV2Line21Attributes value. More...
 
std::ostream & operator<< (std::ostream &inOutStream, const CaptionData &inData)
 Streams a human-readable representation of the given CaptionData into the given output stream. More...
 
std::ostream & operator<< (std::ostream &oss, const NTV2Caption608ChangeInfo &inInfo)
 Streams a human-readable representation of the given NTV2Caption608ChangeInfo into the given output stream. More...
 

Detailed Description

Declares several data types used with 608/SD captioning.

Definition in file ntv2caption608types.h.

Macro Definition Documentation

◆ IsField1Line21CaptionChannel

#define IsField1Line21CaptionChannel (   _chan_)    ((_chan_) == NTV2_CC608_CC1 || (_chan_) == NTV2_CC608_CC2 || (_chan_) == NTV2_CC608_Text1 || (_chan_) == NTV2_CC608_Text2)

Definition at line 106 of file ntv2caption608types.h.

◆ IsField2Line21CaptionChannel

#define IsField2Line21CaptionChannel (   _chan_)    ((_chan_) == NTV2_CC608_CC3 || (_chan_) == NTV2_CC608_CC4 || (_chan_) == NTV2_CC608_Text3 || (_chan_) == NTV2_CC608_Text4)

Definition at line 107 of file ntv2caption608types.h.

◆ IsLine21BlackColor

#define IsLine21BlackColor (   _color_)    ((_color_) == NTV2_CC608_Black)

Definition at line 172 of file ntv2caption608types.h.

◆ IsLine21CaptionChannel

#define IsLine21CaptionChannel (   _chan_)    ((_chan_) >= NTV2_CC608_CC1 && (_chan_) <= NTV2_CC608_CC4)

Definition at line 103 of file ntv2caption608types.h.

◆ IsLine21Field1

#define IsLine21Field1 (   _field_)    ((_field_) == NTV2_CC608_Field1)

Definition at line 67 of file ntv2caption608types.h.

◆ IsLine21Field2

#define IsLine21Field2 (   _field_)    ((_field_) == NTV2_CC608_Field2)

Definition at line 68 of file ntv2caption608types.h.

◆ IsLine21Opaque

#define IsLine21Opaque (   _opacity_)    ((_opacity_) == NTV2_CC608_Opaque)

Definition at line 227 of file ntv2caption608types.h.

◆ IsLine21PaintOnMode

#define IsLine21PaintOnMode (   _mode_)    ((_mode_) == NTV2_CC608_CapModePaintOn)

Definition at line 138 of file ntv2caption608types.h.

◆ IsLine21PopOnMode

#define IsLine21PopOnMode (   _mode_)    ((_mode_) == NTV2_CC608_CapModePopOn)

Definition at line 137 of file ntv2caption608types.h.

◆ IsLine21RollUpMode

#define IsLine21RollUpMode (   _mode_)    ((_mode_) >= NTV2_CC608_CapModeRollUp2 && (_mode_) <= NTV2_CC608_CapModeRollUp4)

Definition at line 139 of file ntv2caption608types.h.

◆ IsLine21SemiTransparent

#define IsLine21SemiTransparent (   _opacity_)    ((_opacity_) == NTV2_CC608_SemiTransparent)

Definition at line 226 of file ntv2caption608types.h.

◆ IsLine21TextChannel

#define IsLine21TextChannel (   _chan_)    ((_chan_) >= NTV2_CC608_Text1 && (_chan_) <= NTV2_CC608_Text4)

Definition at line 104 of file ntv2caption608types.h.

◆ IsLine21Transparent

#define IsLine21Transparent (   _opacity_)    ((_opacity_) == NTV2_CC608_Transparent)

Definition at line 225 of file ntv2caption608types.h.

◆ IsLine21WhiteColor

#define IsLine21WhiteColor (   _color_)    ((_color_) == NTV2_CC608_White)

Definition at line 171 of file ntv2caption608types.h.

◆ IsLine21XDSChannel

#define IsLine21XDSChannel (   _chan_)    ((_chan_) == NTV2_CC608_XDS)

Definition at line 105 of file ntv2caption608types.h.

◆ IsValidLine21Channel

#define IsValidLine21Channel (   _chan_)    ((_chan_) >= NTV2_CC608_CC1 && (_chan_) < NTV2_CC608_ChannelMax)

Definition at line 102 of file ntv2caption608types.h.

◆ IsValidLine21CharacterSet

#define IsValidLine21CharacterSet (   _charset_)    ((_charset_) >= NTV2_CC608_DefaultCharacterSet && (_charset_) < NTV2_CC608_NumCharacterSets)

Definition at line 258 of file ntv2caption608types.h.

◆ IsValidLine21Color

#define IsValidLine21Color (   _color_)    ((_color_) >= NTV2_CC608_White && (_color_) < NTV2_CC608_NumColors)

Definition at line 170 of file ntv2caption608types.h.

◆ IsValidLine21Column

#define IsValidLine21Column (   __col__)    ((__col__) >= NTV2_CC608_MinCol && (__col__) <= NTV2_CC608_MaxCol)

Definition at line 50 of file ntv2caption608types.h.

◆ IsValidLine21Field

#define IsValidLine21Field (   _field_)    ((_field_) == NTV2_CC608_Field1 || (_field_) == NTV2_CC608_Field2)

Definition at line 66 of file ntv2caption608types.h.

◆ IsValidLine21Mode

#define IsValidLine21Mode (   _mode_)    ((_mode_) >= NTV2_CC608_CapModePopOn && (_mode_) < NTV2_CC608_CapModeMax)

Definition at line 136 of file ntv2caption608types.h.

◆ IsValidLine21Opacity

#define IsValidLine21Opacity (   _opacity_)    ((_opacity_) >= NTV2_CC608_Opaque && (_opacity_) < NTV2_CC608_NumOpacities)

Definition at line 224 of file ntv2caption608types.h.

◆ IsValidLine21Row

#define IsValidLine21Row (   __row__)    ((__row__) >= NTV2_CC608_MinRow && (__row__) <= NTV2_CC608_MaxRow)

Definition at line 49 of file ntv2caption608types.h.

◆ NULL

#define NULL   0

Definition at line 19 of file ntv2caption608types.h.

Typedef Documentation

◆ CaptionData

typedef struct CaptionData CaptionData

This structure encapsulates all possible CEA-608 caption data bytes that may be associated with a given frame or field.

Note
The "field 3" data bytes is used when translating 30fps video to 24fps and removing 3:2 pulldown.

◆ NTV2_CC608_CodePoint

Describes a unique CEA-608 caption character code point in 32 bits: 0xSS00XXYY, where... SS == NTV2Line21CharacterSet XX == CEA608 byte 1 (parity stripped) YY == CEA608 byte 2 (parity stripped)

Definition at line 276 of file ntv2caption608types.h.

◆ NTV2Caption608Changed

typedef void() NTV2Caption608Changed(void *pInstance, const NTV2Caption608ChangeInfo &inChangeInfo)

This callback is used to respond to dynamic events that occur during CEA-608 caption decoding.

Parameters
[in]pInstanceAn instance pointer.
[in]inChangeInfoThe details about the change that transpired.

Definition at line 872 of file ntv2caption608types.h.

◆ NTV2CodePointSet

A set of unique CEA-608 caption character code points.

Definition at line 282 of file ntv2caption608types.h.

◆ NTV2CodePointSetConstIter

typedef NTV2CodePointSet::const_iterator NTV2CodePointSetConstIter

Definition at line 283 of file ntv2caption608types.h.

◆ NTV2Line21Attributes

CEA-608 Character Attributes.

Note
The non-bool elements in the struct must be "unsigned", otherwise they'll be considered signed. For example, NTV2_CC608_Black (= 7) will be read as "-1" in the following case: int x = attr.bgColor. If it's "unsigned", the value will correctly read out as "7".

◆ NTV2Line21AttributesPtr

◆ NTV2Line21Attrs

◆ NTV2Line21AttrsPtr

Definition at line 568 of file ntv2caption608types.h.

◆ NTV2Line21Channel

The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS.

◆ NTV2Line21CharacterSet

The available CEA-608 character sets.

◆ NTV2Line21CharSet

◆ NTV2Line21Color

The CEA-608 color values: white, green, blue, cyan, red, yellow, magenta, and black.

◆ NTV2Line21Field

The two CEA-608 interlace fields.

◆ NTV2Line21Mode

The CEA-608 modes: pop-on, roll-up (2, 3 and 4-line), and paint-on.

◆ NTV2Line21Opacity

The CEA-608 character opacity values: opaque, semi-transparent, and transparent.

Enumeration Type Documentation

◆ NTV2Line21Channel

The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS.

Enumerator
NTV2_CC608_CC1 

Caption channel 1, the primary caption channel.

NTV2_CC608_CC2 

Caption channel 2, the secondary caption channel.

NTV2_CC608_CC3 
NTV2_CC608_CC4 
NTV2_CC608_TextChannelOffset 
NTV2_CC608_Text1 
NTV2_CC608_Text2 
NTV2_CC608_Text3 
NTV2_CC608_Text4 
NTV2_CC608_XDS 
NTV2_CC608_ChannelMax 
NTV2_CC608_ChannelInvalid 

Definition at line 82 of file ntv2caption608types.h.

◆ NTV2Line21CharacterSet

The available CEA-608 character sets.

Enumerator
NTV2_CC608_DefaultCharacterSet 
NTV2_CC608_DoubleSizeCharacterSet 
NTV2_CC608_PrivateCharacterSet1 
NTV2_CC608_PrivateCharacterSet2 
NTV2_CC608_PRChinaCharacterSet 
NTV2_CC608_KoreanCharacterSet 
NTV2_CC608_RegisteredCharacterSet1 
NTV2_CC608_NumCharacterSets 

Definition at line 243 of file ntv2caption608types.h.

◆ NTV2Line21Color

The CEA-608 color values: white, green, blue, cyan, red, yellow, magenta, and black.

Enumerator
NTV2_CC608_White 
NTV2_CC608_Green 
NTV2_CC608_Blue 
NTV2_CC608_Cyan 
NTV2_CC608_Red 
NTV2_CC608_Yellow 
NTV2_CC608_Magenta 
NTV2_CC608_Black 
NTV2_CC608_NumColors 
NTV2_608_INVALID_COLOR 

Definition at line 153 of file ntv2caption608types.h.

◆ NTV2Line21Field

The two CEA-608 interlace fields.

Enumerator
NTV2_CC608_Field_Invalid 
NTV2_CC608_Field1 
NTV2_CC608_Field2 
NTV2_CC608_Field_Max 

Definition at line 56 of file ntv2caption608types.h.

◆ NTV2Line21Mode

The CEA-608 modes: pop-on, roll-up (2, 3 and 4-line), and paint-on.

Enumerator
NTV2_CC608_CapModeMin 
NTV2_CC608_CapModeUnknown 

Unknown or invalid caption mode.

NTV2_CC608_CapModePopOn 

Pop-on caption mode.

NTV2_CC608_CapModeRollUp2 

2-row roll-up from bottom

NTV2_CC608_CapModeRollUp3 

3-row roll-up from bottom

NTV2_CC608_CapModeRollUp4 

4-row roll-up from bottom

NTV2_CC608_CapModePaintOn 

Paint-on caption mode.

NTV2_CC608_CapModeMax 

Definition at line 123 of file ntv2caption608types.h.

◆ NTV2Line21Opacity

The CEA-608 character opacity values: opaque, semi-transparent, and transparent.

Enumerator
NTV2_CC608_Opaque 
NTV2_CC608_SemiTransparent 
NTV2_CC608_Transparent 
NTV2_CC608_NumOpacities 

Definition at line 213 of file ntv2caption608types.h.

Function Documentation

◆ Get608Byte1()

UByte Get608Byte1 ( const NTV2_CC608_CodePoint  inCodePoint)
inline

Extracts the first CEA-608 byte from the given NTV2_CC608_CodePoint.

Parameters
[in]inCodePointSpecifies the CEA-608 code point.
Returns
The first CEA-608 byte from the given code point.

Definition at line 333 of file ntv2caption608types.h.

◆ Get608Byte2()

UByte Get608Byte2 ( const NTV2_CC608_CodePoint  inCodePoint)
inline

Extracts the second CEA-608 byte from the given NTV2_CC608_CodePoint.

Parameters
[in]inCodePointSpecifies the CEA-608 code point.
Returns
The second CEA-608 byte from the given code point.

Definition at line 344 of file ntv2caption608types.h.

◆ GetLine21CharacterSet()

NTV2Line21CharacterSet GetLine21CharacterSet ( const NTV2_CC608_CodePoint  inCodePoint)
inline

Extracts the NTV2Line21CharacterSet from the given NTV2_CC608_CodePoint.

Parameters
[in]inCodePointSpecifies the CEA-608 code point.
Returns
The code point's NTV2Line21CharacterSet.

Definition at line 322 of file ntv2caption608types.h.

◆ Make608CodePoint()

NTV2_CC608_CodePoint Make608CodePoint ( const UByte  in608Byte1,
const UByte  in608Byte2,
const NTV2Line21CharacterSet  inCharSet = NTV2_CC608_DefaultCharacterSet 
)
inline

Constructs a unique CEA-608 caption character code point from its three components.

Parameters
[in]in608Byte1The first CEA-608 byte (with no parity).
[in]in608Byte2The second byte (with no parity).
[in]inCharSetSpecifies the NTV2Line21CharacterSet. Defaults to NTV2_CC608_DefaultCharacterSet (North American).
Returns
The constructed NTV2_CC608_CodePoint.

Definition at line 295 of file ntv2caption608types.h.

◆ NTV2_CC608_MaxCol()

const UWord NTV2_CC608_MaxCol ( 32  )

The maximum column index number (located at the right edge of the screen).

Note
All CEA-608 row/column indices are 1-based.

◆ NTV2_CC608_MaxRow()

const UWord NTV2_CC608_MaxRow ( 15  )

The maximum permissible row index number (located at the bottom of the screen).

Note
All CEA-608 row/column indices are 1-based.

◆ NTV2_CC608_MinCol()

const UWord NTV2_CC608_MinCol ( )

The minimum column index number (located at the left edge of the screen).

Note
All CEA-608 row/column indices are 1-based.

◆ NTV2_CC608_MinRow()

const UWord NTV2_CC608_MinRow ( )

The minimum row index number (located at the top of the screen).

Note
All CEA-608 row/column indices are 1-based.

◆ NTV2CC608CodePointToUtf16Char()

UWord NTV2CC608CodePointToUtf16Char ( const NTV2_CC608_CodePoint  in608CodePoint)

Returns the UTF-16 character that best represents the given CEA-608 code point.

Parameters
[in]in608CodePointSpecifies the CEA-608 code point of interest.
Returns
The UTF-16 character that best represents the given CEA-608 character (or zero upon failure).

◆ NTV2CC608CodePointToUtf8String()

std::string NTV2CC608CodePointToUtf8String ( const NTV2_CC608_CodePoint  in608CodePoint)

Returns a string containing the UTF-8 character sequence that best represents the given CEA-608 code point.

Parameters
[in]in608CodePointSpecifies the CEA-608 code point of interest.
Returns
A string that contains the UTF8 character sequence that best represents the given CEA-608 character. The returned string will be empty upon failure, or if there is no best representation for the character.

◆ NTV2CodePointSetToString()

std::string NTV2CodePointSetToString ( const NTV2CodePointSet inSet)

◆ NTV2Line21AttributesToStr()

std::string NTV2Line21AttributesToStr ( const NTV2Line21Attributes  inLine21Attributes)

Converts the given NTV2Line21Attributes value into a human-readable string.

Parameters
[in]inLine21AttributesSpecifies the value to be converted.
Returns
The human-readable string.

◆ NTV2Line21ChannelToStr()

const std::string& NTV2Line21ChannelToStr ( const NTV2Line21Channel  inLine21Channel,
const bool  inCompact = true 
)

Converts the given NTV2Line21Channel value into a human-readable string.

Parameters
[in]inLine21ChannelSpecifies the value to be converted.
[in]inCompactSpecify true for a compact string; otherwise false for a more verbose string. Defaults to true (compact).
Returns
The human-readable string.

◆ NTV2Line21CharacterSetToStr()

const std::string& NTV2Line21CharacterSetToStr ( const NTV2Line21CharacterSet  inLine21CharSet)

Converts the given NTV2Line21CharacterSet value into a human-readable string.

Parameters
[in]inLine21CharSetSpecifies the value to be converted.
Returns
The human-readable string.

◆ NTV2Line21ColorToRGB8()

bool NTV2Line21ColorToRGB8 ( const NTV2Line21Color  inLine21Color,
UByte outR,
UByte outG,
UByte outB,
const bool  inIsHD = false 
)

Converts a given CEA-608 color value into three 8-bit RGB component values.

Parameters
[in]inLine21ColorSpecifies the NTV2Line21Color to be converted to 8-bit RGB.
[out]outRReceives the 8-bit red value.
[out]outGReceives the 8-bit blue value.
[out]outBReceives the 8-bit green value.
[in]inIsHDSpecify true to use Rec709 conversion; otherwise false for Rec601. Defaults to false (Rec601).
Returns
True if successful; otherwise false.
Todo:
Currently uses SD color conversion. Needs to account for HD/SD.

◆ NTV2Line21ColorToStr()

const std::string& NTV2Line21ColorToStr ( const NTV2Line21Color  inLine21Color,
const bool  inCompact = true 
)

Converts the given NTV2Line21Color value into a human-readable string.

Parameters
[in]inLine21ColorSpecifies the value to be converted.
[in]inCompactSpecify true for a compact string; otherwise false for a more verbose string. Defaults to true (compact).
Returns
The human-readable string.

◆ NTV2Line21ColorToYUV8()

bool NTV2Line21ColorToYUV8 ( const NTV2Line21Color  inLine21Color,
UByte outY,
UByte outCb,
UByte outCr 
)

Converts a given CEA-608 color value into three 8-bit Y, Cb, Cr component values.

Parameters
[in]inLine21ColorSpecifies the NTV2Line21Color to be converted to 8-bit YUV.
[out]outYReceives the 8-bit luminance value.
[out]outCbReceives the 8-bit (blue) chrominance value.
[out]outCrReceives the 8-bit (red) chrominance value.
Returns
True if successful; otherwise false.

◆ NTV2Line21FieldToStr()

const std::string& NTV2Line21FieldToStr ( const NTV2Line21Field  inLine21Field)

Converts the given NTV2Line21Field value into a human-readable string.

Parameters
[in]inLine21FieldSpecifies the value to be converted.
Returns
The human-readable string.

◆ NTV2Line21ModeToStr()

const std::string& NTV2Line21ModeToStr ( const NTV2Line21Mode  inLine21Mode)

Converts the given NTV2Line21Mode value into a human-readable string.

Parameters
[in]inLine21ModeSpecifies the value to be converted.
Returns
The human-readable string.

◆ NTV2Line21OpacityToStr()

const std::string& NTV2Line21OpacityToStr ( const NTV2Line21Opacity  inLine21Opacity,
const bool  inCompact = true 
)

Converts the given NTV2Line21Opacity value into a human-readable string.

Parameters
[in]inLine21OpacitySpecifies the value to be converted.
[in]inCompactSpecify true for a compact string; otherwise false for a more verbose string. Defaults to true (compact).
Returns
The human-readable string.

◆ operator<<() [1/3]

std::ostream& operator<< ( std::ostream &  inOutStream,
const CaptionData inData 
)

Streams a human-readable representation of the given CaptionData into the given output stream.

Parameters
[in]inOutStreamThe output stream to receive the human-readable representation.
[in]inDataThe CaptionData to be streamed.
Returns
A reference to the given output stream.

◆ operator<<() [2/3]

std::ostream& operator<< ( std::ostream &  inOutStream,
const NTV2Line21Attrs inData 
)

Writes a human-readable rendition of the given NTV2Line21Attributes into the given output stream.

Parameters
inOutStreamSpecifies the output stream to be written.
[in]inDataSpecifies the NTV2Line21Attributes to be rendered into the output stream.
Returns
A non-constant reference to the specified output stream.

◆ operator<<() [3/3]

std::ostream& operator<< ( std::ostream &  oss,
const NTV2Caption608ChangeInfo inInfo 
)
inline

Streams a human-readable representation of the given NTV2Caption608ChangeInfo into the given output stream.

Parameters
ossThe output stream to receive the human-readable representation.
[in]inInfoThe NTV2Caption608ChangeInfo to be streamed.
Returns
A reference to the given output stream.

Definition at line 864 of file ntv2caption608types.h.

◆ StrToNTV2Line21Attributes()

NTV2Line21Attributes StrToNTV2Line21Attributes ( const std::string &  inStr)

Converts the given string into the equivalent NTV2Line21Attributes value.

Parameters
[in]inStrSpecifies the string to be converted.
Returns
The equivalent NTV2Line21Attributes value.

◆ StrToNTV2Line21Channel()

NTV2Line21Channel StrToNTV2Line21Channel ( const std::string &  inStr)

Converts the given string into the equivalent NTV2Line21Channel value.

Parameters
[in]inStrSpecifies the string to be converted.
Returns
The equivalent NTV2Line21Channel value.

◆ StrToNTV2Line21CharacterSet()

NTV2Line21CharacterSet StrToNTV2Line21CharacterSet ( const std::string &  inStr)

Converts the given string into the equivalent NTV2Line21CharacterSet value.

Parameters
[in]inStrSpecifies the string to be converted.
Returns
The equivalent NTV2Line21CharacterSet value.

◆ StrToNTV2Line21Color()

NTV2Line21Color StrToNTV2Line21Color ( const std::string &  inStr)

Converts the given string into the equivalent NTV2Line21Color value.

Parameters
[in]inStrSpecifies the string to be converted.
Returns
The equivalent NTV2Line21Color value.

◆ StrToNTV2Line21Field()

NTV2Line21Field StrToNTV2Line21Field ( const std::string &  inStr)

Converts the given string into the equivalent NTV2Line21Field value.

Parameters
[in]inStrSpecifies the string to be converted.
Returns
The equivalent NTV2Line21Field value.

◆ StrToNTV2Line21Mode()

NTV2Line21Mode StrToNTV2Line21Mode ( const std::string &  inStr)

Converts the given string into the equivalent NTV2Line21Mode value.

Parameters
[in]inStrSpecifies the string to be converted.
Returns
The equivalent NTV2Line21Mode value.

◆ StrToNTV2Line21Opacity()

NTV2Line21Opacity StrToNTV2Line21Opacity ( const std::string &  inStr)

Converts the given string into the equivalent NTV2Line21Opacity value.

Parameters
[in]inStrSpecifies the string to be converted.
Returns
The equivalent NTV2Line21Opacity value.