AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
ntv2caption608types.h
Go to the documentation of this file.
1 
7 #ifndef __NTV2_CAPTION608TYPES_
8 #define __NTV2_CAPTION608TYPES_
9 
10 #include "ajatypes.h"
11 #include "ajaexport.h"
12 #include "ntv2utils.h"
13 #include <ostream>
14 #include <string>
15 #include <set>
16 #include <map>
17 
18 #if !defined(NULL)
19  #define NULL 0
20 #endif
21 
22 
23 
28 const UWord NTV2_CC608_MinRow (1);
29 
34 const UWord NTV2_CC608_MaxRow (15);
35 
40 const UWord NTV2_CC608_MinCol (1);
41 
46 const UWord NTV2_CC608_MaxCol (32);
47 
48 
49 #define IsValidLine21Row(__row__) ((__row__) >= NTV2_CC608_MinRow && (__row__) <= NTV2_CC608_MaxRow)
50 #define IsValidLine21Column(__col__) ((__col__) >= NTV2_CC608_MinCol && (__col__) <= NTV2_CC608_MaxCol)
51 
52 
56 typedef enum NTV2Line21Field
57 {
62 
64 
65 
66 #define IsValidLine21Field(_field_) ((_field_) == NTV2_CC608_Field1 || (_field_) == NTV2_CC608_Field2)
67 #define IsLine21Field1(_field_) ((_field_) == NTV2_CC608_Field1)
68 #define IsLine21Field2(_field_) ((_field_) == NTV2_CC608_Field2)
69 
70 
76 AJAExport const std::string & NTV2Line21FieldToStr (const NTV2Line21Field inLine21Field);
77 
78 
82 typedef enum NTV2Line21Channel
83 {
88 
94 
96 
100 
101 
102 #define IsValidLine21Channel(_chan_) ((_chan_) >= NTV2_CC608_CC1 && (_chan_) < NTV2_CC608_ChannelMax)
103 #define IsLine21CaptionChannel(_chan_) ((_chan_) >= NTV2_CC608_CC1 && (_chan_) <= NTV2_CC608_CC4)
104 #define IsLine21TextChannel(_chan_) ((_chan_) >= NTV2_CC608_Text1 && (_chan_) <= NTV2_CC608_Text4)
105 #define IsLine21XDSChannel(_chan_) ((_chan_) == NTV2_CC608_XDS)
106 #define IsField1Line21CaptionChannel(_chan_) ((_chan_) == NTV2_CC608_CC1 || (_chan_) == NTV2_CC608_CC2 || (_chan_) == NTV2_CC608_Text1 || (_chan_) == NTV2_CC608_Text2)
107 #define IsField2Line21CaptionChannel(_chan_) ((_chan_) == NTV2_CC608_CC3 || (_chan_) == NTV2_CC608_CC4 || (_chan_) == NTV2_CC608_Text3 || (_chan_) == NTV2_CC608_Text4)
108 
109 
117 AJAExport const std::string & NTV2Line21ChannelToStr (const NTV2Line21Channel inLine21Channel, const bool inCompact = true);
118 
119 
123 typedef enum NTV2Line21Mode
124 {
134 
135 
136 #define IsValidLine21Mode(_mode_) ((_mode_) >= NTV2_CC608_CapModePopOn && (_mode_) < NTV2_CC608_CapModeMax)
137 #define IsLine21PopOnMode(_mode_) ((_mode_) == NTV2_CC608_CapModePopOn)
138 #define IsLine21PaintOnMode(_mode_) ((_mode_) == NTV2_CC608_CapModePaintOn)
139 #define IsLine21RollUpMode(_mode_) ((_mode_) >= NTV2_CC608_CapModeRollUp2 && (_mode_) <= NTV2_CC608_CapModeRollUp4)
140 
141 
147 AJAExport const std::string & NTV2Line21ModeToStr (const NTV2Line21Mode inLine21Mode);
148 
149 
153 typedef enum NTV2Line21Color
154 {
163 
166 
168 
169 
170 #define IsValidLine21Color(_color_) ((_color_) >= NTV2_CC608_White && (_color_) < NTV2_CC608_NumColors)
171 #define IsLine21WhiteColor(_color_) ((_color_) == NTV2_CC608_White)
172 #define IsLine21BlackColor(_color_) ((_color_) == NTV2_CC608_Black)
173 
174 
182 AJAExport const std::string & NTV2Line21ColorToStr (const NTV2Line21Color inLine21Color, const bool inCompact = true);
183 
184 
193 AJAExport bool NTV2Line21ColorToYUV8 (const NTV2Line21Color inLine21Color, UByte & outY, UByte & outCb, UByte & outCr);
194 
195 
207 AJAExport bool NTV2Line21ColorToRGB8 (const NTV2Line21Color inLine21Color, UByte & outR, UByte & outG, UByte & outB, const bool inIsHD = false);
208 
209 
213 typedef enum NTV2Line21Opacity
214 {
218 
220 
222 
223 
224 #define IsValidLine21Opacity(_opacity_) ((_opacity_) >= NTV2_CC608_Opaque && (_opacity_) < NTV2_CC608_NumOpacities)
225 #define IsLine21Transparent(_opacity_) ((_opacity_) == NTV2_CC608_Transparent)
226 #define IsLine21SemiTransparent(_opacity_) ((_opacity_) == NTV2_CC608_SemiTransparent)
227 #define IsLine21Opaque(_opacity_) ((_opacity_) == NTV2_CC608_Opaque)
228 
229 
237 AJAExport const std::string & NTV2Line21OpacityToStr (const NTV2Line21Opacity inLine21Opacity, const bool inCompact = true);
238 
239 
244 {
245  NTV2_CC608_DefaultCharacterSet, // Plain ol' normal U.S./Latin characters
252 
254 
256 
257 
258 #define IsValidLine21CharacterSet(_charset_) ((_charset_) >= NTV2_CC608_DefaultCharacterSet && (_charset_) < NTV2_CC608_NumCharacterSets)
259 
260 
266 AJAExport const std::string & NTV2Line21CharacterSetToStr (const NTV2Line21CharacterSet inLine21CharSet);
267 
268 
277 
278 
282 typedef std::set <NTV2_CC608_CodePoint> NTV2CodePointSet;
283 typedef NTV2CodePointSet::const_iterator NTV2CodePointSetConstIter;
284 
285 AJAExport std::string NTV2CodePointSetToString (const NTV2CodePointSet & inSet); // conflicts with classes lib --- std::ostream & operator << (std::ostream & inOutStream, const NTV2CodePointSet & inSet);
286 
287 
295 inline NTV2_CC608_CodePoint Make608CodePoint (const UByte in608Byte1, const UByte in608Byte2, const NTV2Line21CharacterSet inCharSet = NTV2_CC608_DefaultCharacterSet)
296 {
297  return NTV2_CC608_CodePoint (ULWord (inCharSet << 24) | ULWord (in608Byte1 << 8) | ULWord (in608Byte2));
298 }
299 
307 AJAExport std::string NTV2CC608CodePointToUtf8String (const NTV2_CC608_CodePoint in608CodePoint);
308 
315 
316 
323 {
324  return NTV2Line21CharacterSet ((inCodePoint & 0xFF000000) >> 24);
325 }
326 
327 
333 inline UByte Get608Byte1 (const NTV2_CC608_CodePoint inCodePoint)
334 {
335  return UByte ((inCodePoint & 0x00FF00) >> 8);
336 }
337 
338 
344 inline UByte Get608Byte2 (const NTV2_CC608_CodePoint inCodePoint)
345 {
346  return UByte (inCodePoint & 0x000000FF);
347 }
348 
349 
358 {
359  public:
364  explicit NTV2Line21Attributes ();
365 
375  explicit NTV2Line21Attributes ( const NTV2Line21Color inFGColor,
376  const NTV2Line21Color inBGColor = NTV2_CC608_Black,
377  const NTV2Line21Opacity inOpacity = NTV2_CC608_Opaque,
378  const bool inItalics = false,
379  const bool inUnderline = false,
380  const bool inFlash = false);
381  inline NTV2Line21Attributes ( const NTV2Line21Attributes & inRHS) { bFlash = inRHS.bFlash;
382  bItalic = inRHS.bItalic;
383  bUnderline = inRHS.bUnderline;
384  fgColor = inRHS.fgColor;
385  bgColor = inRHS.bgColor;
386  bgOpacity = inRHS.bgOpacity; }
387  inline NTV2Line21Attributes & operator = (const NTV2Line21Attributes & inRHS) { bFlash = inRHS.bFlash;
388  bItalic = inRHS.bItalic;
389  bUnderline = inRHS.bUnderline;
390  fgColor = inRHS.fgColor;
391  bgColor = inRHS.bgColor;
392  bgOpacity = inRHS.bgOpacity; return *this;}
393 
399  inline bool IsSet (void) const { return bFlash || bItalic || bUnderline
400  || fgColor != NTV2_CC608_White
401  || bgColor != NTV2_CC608_Black
402  || bgOpacity != NTV2_CC608_Opaque; }
403 
407  inline NTV2Line21Color GetColor (void) const { return NTV2Line21Color(fgColor); }
408 
412  inline NTV2Line21Color GetBGColor (void) const { return NTV2Line21Color(bgColor); }
413 
417  inline NTV2Line21Opacity GetOpacity (void) const { return NTV2Line21Opacity(bgOpacity); }
418 
422  inline bool IsItalicized (void) const { return bItalic; }
423 
427  inline bool IsUnderlined (void) const { return bUnderline; }
428 
432  inline bool IsFlashing (void) const { return bFlash; }
433 
438  inline NTV2Line21Attributes & AddItalics (void) { bItalic = true; return *this; }
439 
444  inline NTV2Line21Attributes & RemoveItalics (void) { bItalic = false; return *this; }
445 
451  inline NTV2Line21Attributes & SetItalics (const bool inItalics) { bItalic = inItalics; return *this; }
452 
453 
458  inline NTV2Line21Attributes & AddUnderline (void) { bUnderline = true; return *this; }
459 
464  inline NTV2Line21Attributes & RemoveUnderline (void) { bUnderline = false; return *this; }
465 
471  inline NTV2Line21Attributes & SetUnderline (const bool inUnderline) { bUnderline = inUnderline; return *this; }
472 
473 
478  inline NTV2Line21Attributes & AddFlash (void) { bFlash = true; return *this; }
479 
484  inline NTV2Line21Attributes & RemoveFlash (void) { bFlash = false; return *this; }
485 
491  inline NTV2Line21Attributes & SetFlash (const bool inFlash) { bFlash = inFlash; return *this; }
492 
493 
499  inline NTV2Line21Attributes & SetColor (const NTV2Line21Color inFGColor) { fgColor = inFGColor; return *this; }
500 
506  inline NTV2Line21Attributes & SetBGColor (const NTV2Line21Color inBGColor) { bgColor = inBGColor; return *this; }
507 
513  inline NTV2Line21Attributes & SetOpacity (const NTV2Line21Opacity inOpacity) { bgOpacity = inOpacity; return *this; }
514 
515 
520  inline void Clear (void) { bFlash = bItalic = bUnderline = false;
521  fgColor = NTV2_CC608_White;
522  bgColor = NTV2_CC608_Black;
523  bgOpacity = NTV2_CC608_Opaque; }
524 
530  inline bool operator < (const NTV2Line21Attributes & inRHS) const { return GetHashKey () < inRHS.GetHashKey (); }
531 
537  inline bool operator == (const NTV2Line21Attributes & inRHS) const { return GetHashKey () == inRHS.GetHashKey (); }
538 
544  inline bool operator != (const NTV2Line21Attributes & inRHS) const { return !(*this == inRHS);}
545 
549  std::string GetHexString (void) const;
550 
554  uint16_t GetHashKey (void) const;
555 
556 
557  // Instance Data
558  private:
559  bool bFlash :1;
560  bool bItalic :1;
561  bool bUnderline :1;
562  unsigned fgColor :3;
563  unsigned bgColor :3;
564  unsigned bgOpacity :2;
565 
567 
570 
571 
578 AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2Line21Attrs & inData);
579 
580 
581 
582 // CONVERSION TO/FROM STRINGS
583 
584 
590 AJAExport std::string NTV2Line21AttributesToStr (const NTV2Line21Attributes inLine21Attributes);
591 
592 
598 AJAExport NTV2Line21Field StrToNTV2Line21Field (const std::string & inStr);
599 
600 
606 AJAExport NTV2Line21Channel StrToNTV2Line21Channel (const std::string & inStr);
607 
608 
614 AJAExport NTV2Line21Mode StrToNTV2Line21Mode (const std::string & inStr);
615 
616 
622 AJAExport NTV2Line21Color StrToNTV2Line21Color (const std::string & inStr);
623 
624 
630 AJAExport NTV2Line21Opacity StrToNTV2Line21Opacity (const std::string & inStr);
631 
632 
639 
640 
646 AJAExport NTV2Line21Attributes StrToNTV2Line21Attributes (const std::string & inStr);
647 
648 
649 
655 typedef struct AJAExport CaptionData
656 {
660 
664 
668 
669  public:
673  explicit inline CaptionData () { bGotField1Data = bGotField2Data = bGotField3Data = false; f1_char1 = f1_char2 = f2_char1 = f2_char2 = f3_char1 = f3_char2 = 0xFF; }
674 
678  explicit CaptionData (const UByte inF1Char1, const UByte inF1Char2);
679 
683  explicit CaptionData (const UByte inF1Char1, const UByte inF1Char2, const UByte inF2Char1, const UByte inF2Char2);
684 
688  inline bool HasF1Data (void) const {return (bGotField1Data && (f1_char1 != 0x80 || f1_char2 != 0x80));}
689 
693  inline bool HasF2Data (void) const {return (bGotField2Data && (f2_char1 != 0x80 || f2_char2 != 0x80));}
694 
698  inline bool HasData (void) const {return HasF1Data() || HasF2Data();}
699 
703  inline bool IsF1Invalid (void) const {return f1_char1 == 0xFF && f1_char2 == 0xFF;}
704 
708  inline bool IsF2Invalid (void) const {return f2_char1 == 0xFF && f2_char2 == 0xFF;}
709 
713  inline bool IsError (void) const {return IsF1Invalid() && IsF2Invalid();}
714 
720  inline CaptionData & SetF1Data (const CaptionData & inRHS) {f1_char1 = inRHS.f1_char1; f1_char2 = inRHS.f1_char2; bGotField1Data = inRHS.bGotField1Data; return *this;}
721 
728  inline CaptionData & SetF1Data (const UByte inF1Char1, const UByte inF1Char2) {f1_char1 = inF1Char1; f1_char2 = inF1Char2; bGotField1Data = inF1Char1 != 0xFF && inF1Char2 != 0xFF; return *this;}
729 
735  inline CaptionData & SetF2Data (const CaptionData & inRHS) {f2_char1 = inRHS.f2_char1; f2_char2 = inRHS.f2_char2; bGotField2Data = inRHS.bGotField2Data; return *this;}
736 
743  inline CaptionData & SetF2Data (const UByte inF2Char1, const UByte inF2Char2) {f2_char1 = inF2Char1; f2_char2 = inF2Char2; bGotField2Data = inF2Char1 != 0xFF && inF2Char2 != 0xFF; return *this;}
744 
748  inline void Clear (void) {bGotField1Data = bGotField2Data = bGotField3Data = false; f1_char1 = f1_char2 = f2_char1 = f2_char2 = f3_char1 = f3_char2 = 0x80;}
749 
753  inline void Zero (void) {bGotField1Data = bGotField2Data = bGotField3Data = false; f1_char1 = f1_char2 = f2_char1 = f2_char2 = f3_char1 = f3_char2 = 0x00;}
754 
761  bool operator == (const CaptionData & inRHS) const;
762  bool operator < (const CaptionData & inRHS) const;
763  inline bool operator != (const CaptionData & inRHS) const {return !(*this == inRHS);}
764 } CaptionData;
765 
766 
773 AJAExport std::ostream & operator << (std::ostream & inOutStream, const CaptionData & inData);
774 
775 
780 {
781  public:
785  typedef enum NTV2Caption608Change
786  {
787  NTV2DecoderChange_None = 0,
788  NTV2DecoderChange_CurrentChannel = 1,
789  NTV2DecoderChange_CurrentRow = 2,
790  NTV2DecoderChange_CurrentColumn = 4,
791  NTV2DecoderChange_CurrentScreen = 8,
792  NTV2DecoderChange_CaptionMode = 16,
793  NTV2DecoderChange_ScreenCharacter = 32,
794  NTV2DecoderChange_ScreenAttribute = 64,
795  NTV2DecoderChange_DrawScreen = 128,
796  NTV2DecoderChange_All = 0xFFFF
797  } NTV2Caption608Change;
798 
799  public:
800  explicit NTV2Caption608ChangeInfo (const NTV2Line21Channel inChannel);
801  explicit NTV2Caption608ChangeInfo (const NTV2Line21Channel inOldChannel, const NTV2Line21Channel inNewChannel);
802  explicit NTV2Caption608ChangeInfo (const NTV2Line21Channel inChannel, const UWord inWhatChanged, const UWord inOldValue, const UWord inNewValue);
803  explicit NTV2Caption608ChangeInfo (const NTV2Line21Channel inChannel, const UWord inScreen, const UWord inRow, const UWord inColumn, const NTV2_CC608_CodePoint inOldValue, const NTV2_CC608_CodePoint inNewValue);
804  explicit NTV2Caption608ChangeInfo (const NTV2Line21Channel inChannel, const UWord inScreen, const UWord inRow, const UWord inColumn, const NTV2Line21Attributes & inOldValue, const NTV2Line21Attributes & inNewValue);
805  std::ostream & Print (std::ostream & inOutStrm) const;
806 
807  public:
808  union _u
809  {
811  {
813  } currentChannel;
814  struct _currentRow
815  {
818  } currentRow;
820  {
823  } currentColumn;
825  {
828  } currentScreen;
830  {
833  } captionMode;
834  struct _screenChar
835  {
841  } screenChar;
842  struct _screenAttr
843  {
847  uint16_t mOld;
848  uint16_t mNew;
849  } screenAttr;
850  } u;
851 
854 
855 }; // NTV2Caption608ChangeInfo
856 
857 
864 inline std::ostream & operator << (std::ostream & oss, const NTV2Caption608ChangeInfo & inInfo) {return inInfo.Print(oss);}
865 
866 
872 typedef void (NTV2Caption608Changed) (void * pInstance, const NTV2Caption608ChangeInfo & inChangeInfo);
873 
874 
883 {
884  public:
889 
895  const NTV2Line21Attrs & GetPermutation (const size_t inIndex) const;
896 
901  inline ULWord size (void) const {return 3 * 2 * 8 * 2 * 8;}
902 
908  size_t GetIndexFromAttribute (const NTV2Line21Attributes & inAttribute) const;
909 
915  inline const NTV2Line21Attrs & operator [] (const size_t inIndex) const {return GetPermutation(inIndex);}
916 
917  private:
918  NTV2Line21Attrs mAttribs [3 * 2 * 8 * 2 * 8]; // 3 opacities x w/wo underline x 8 BG colors x w/wo italics x 8 FG colors
919 
920 }; // NTV2Line21AttributePermutations
921 
922 #endif // __NTV2_CAPTION608TYPES_
NTV2CodePointSetConstIter
NTV2CodePointSet::const_iterator NTV2CodePointSetConstIter
Definition: ntv2caption608types.h:283
NTV2_CC608_PrivateCharacterSet1
@ NTV2_CC608_PrivateCharacterSet1
Definition: ntv2caption608types.h:247
NTV2_CC608_Blue
@ NTV2_CC608_Blue
Definition: ntv2caption608types.h:157
CaptionData::Clear
void Clear(void)
Sets all of my "got data" fields to "false" and all my character values to 0x80.
Definition: ntv2caption608types.h:748
NTV2_CC608_SemiTransparent
@ NTV2_CC608_SemiTransparent
Definition: ntv2caption608types.h:216
CaptionData::CaptionData
CaptionData()
Default constructor. Sets my caption bytes to 0xFF, and "gotFieldData" values to false.
Definition: ntv2caption608types.h:673
NTV2_CC608_Black
@ NTV2_CC608_Black
Definition: ntv2caption608types.h:162
CaptionData
struct CaptionData CaptionData
This structure encapsulates all possible CEA-608 caption data bytes that may be associated with a giv...
ajaexport.h
Defines the import/export macros for producing DLLs or LIBs.
NTV2Caption608ChangeInfo::mChannel
NTV2Line21Channel mChannel
Caption channel being changed.
Definition: ntv2caption608types.h:853
StrToNTV2Line21Attributes
NTV2Line21Attributes StrToNTV2Line21Attributes(const std::string &inStr)
Converts the given string into the equivalent NTV2Line21Attributes value.
CaptionData::HasF1Data
bool HasF1Data(void) const
Definition: ntv2caption608types.h:688
NTV2Line21Attributes::SetFlash
NTV2Line21Attributes & SetFlash(const bool inFlash)
Sets my flashing attribute setting.
Definition: ntv2caption608types.h:491
NTV2Line21Opacity
NTV2Line21Opacity
The CEA-608 character opacity values: opaque, semi-transparent, and transparent.
Definition: ntv2caption608types.h:213
NTV2_CC608_NumCharacterSets
@ NTV2_CC608_NumCharacterSets
Definition: ntv2caption608types.h:253
NTV2_CC608_MinCol
const UWord NTV2_CC608_MinCol(1)
The minimum column index number (located at the left edge of the screen).
CaptionData::f2_char1
UByte f2_char1
Caption Byte 1 of Field 2.
Definition: ntv2caption608types.h:662
NTV2_CC608_Text4
@ NTV2_CC608_Text4
Definition: ntv2caption608types.h:93
NTV2Line21Attributes::AddUnderline
NTV2Line21Attributes & AddUnderline(void)
Enables my underline attribute setting.
Definition: ntv2caption608types.h:458
NTV2Caption608ChangeInfo::_u::_currentChannel::mOld
UWord mOld
Caption channel change. This is the old NTV2Line21Channel value. (The new, current value is in my mCh...
Definition: ntv2caption608types.h:812
NTV2_CC608_NumOpacities
@ NTV2_CC608_NumOpacities
Definition: ntv2caption608types.h:219
NTV2Line21ColorToStr
const std::string & NTV2Line21ColorToStr(const NTV2Line21Color inLine21Color, const bool inCompact=true)
Converts the given NTV2Line21Color value into a human-readable string.
NTV2Caption608ChangeInfo::_u::_currentScreen::mOld
UWord mOld
Current screen change. This is the old screen number.
Definition: ntv2caption608types.h:826
CaptionData::IsF1Invalid
bool IsF1Invalid(void) const
Definition: ntv2caption608types.h:703
NTV2CC608CodePointToUtf16Char
UWord NTV2CC608CodePointToUtf16Char(const NTV2_CC608_CodePoint in608CodePoint)
Returns the UTF-16 character that best represents the given CEA-608 code point.
CaptionData::SetF1Data
CaptionData & SetF1Data(const UByte inF1Char1, const UByte inF1Char2)
Sets my F1 data bytes.
Definition: ntv2caption608types.h:728
NTV2_CC608_CC4
@ NTV2_CC608_CC4
Definition: ntv2caption608types.h:87
NTV2Caption608ChangeInfo::_u::_currentRow
Definition: ntv2caption608types.h:814
NTV2_CC608_CapModePaintOn
@ NTV2_CC608_CapModePaintOn
Paint-on caption mode.
Definition: ntv2caption608types.h:131
NTV2_CC608_Cyan
@ NTV2_CC608_Cyan
Definition: ntv2caption608types.h:158
NTV2_CC608_Red
@ NTV2_CC608_Red
Definition: ntv2caption608types.h:159
CaptionData::IsF2Invalid
bool IsF2Invalid(void) const
Definition: ntv2caption608types.h:708
NTV2_CC608_CC2
@ NTV2_CC608_CC2
Caption channel 2, the secondary caption channel.
Definition: ntv2caption608types.h:85
NTV2_CC608_TextChannelOffset
@ NTV2_CC608_TextChannelOffset
Definition: ntv2caption608types.h:89
NTV2Line21Attributes::IsSet
bool IsSet(void) const
Returns true if I'm any different from the default, i.e., if IsFlashing(), IsItalicized(),...
Definition: ntv2caption608types.h:399
NTV2Line21Attributes::SetBGColor
NTV2Line21Attributes & SetBGColor(const NTV2Line21Color inBGColor)
Sets my background color attribute.
Definition: ntv2caption608types.h:506
NTV2Line21Color
NTV2Line21Color
The CEA-608 color values: white, green, blue, cyan, red, yellow, magenta, and black.
Definition: ntv2caption608types.h:153
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::operator<
bool operator<(const value_t lhs, const value_t rhs) noexcept
comparison operator for JSON types
Definition: json.hpp:2902
Get608Byte1
UByte Get608Byte1(const NTV2_CC608_CodePoint inCodePoint)
Extracts the first CEA-608 byte from the given NTV2_CC608_CodePoint.
Definition: ntv2caption608types.h:333
NTV2Caption608ChangeInfo::_u::_screenAttr::mColumn
UWord mColumn
The column number that contains the character whose attributes are changing.
Definition: ntv2caption608types.h:846
NTV2_CC608_CapModeMin
@ NTV2_CC608_CapModeMin
Definition: ntv2caption608types.h:125
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::operator==
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition: json.hpp:14737
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.
NTV2Line21Attributes::SetItalics
NTV2Line21Attributes & SetItalics(const bool inItalics)
Sets my italics setting.
Definition: ntv2caption608types.h:451
NTV2_CC608_CapModeMax
@ NTV2_CC608_CapModeMax
Definition: ntv2caption608types.h:132
NTV2Line21AttributesPtr
NTV2Line21AttrsPtr NTV2Line21AttributesPtr
Definition: ntv2caption608types.h:569
CaptionData::f1_char2
UByte f1_char2
Caption Byte 2 of Field 1.
Definition: ntv2caption608types.h:659
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::void
j template void())
Definition: json.hpp:4893
NTV2_CC608_DefaultCharacterSet
@ NTV2_CC608_DefaultCharacterSet
Definition: ntv2caption608types.h:245
NTV2_CC608_Field_Invalid
@ NTV2_CC608_Field_Invalid
Definition: ntv2caption608types.h:58
NTV2Line21Attributes::IsUnderlined
bool IsUnderlined(void) const
Returns true if I'm underlined; otherwise returns false.
Definition: ntv2caption608types.h:427
ajatypes.h
Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal devel...
NTV2Line21Attributes::SetColor
NTV2Line21Attributes & SetColor(const NTV2Line21Color inFGColor)
Sets my foreground color attribute.
Definition: ntv2caption608types.h:499
NTV2Line21Attributes::IsItalicized
bool IsItalicized(void) const
Returns true if I'm italicized; otherwise returns false.
Definition: ntv2caption608types.h:422
NTV2Caption608ChangeInfo::_u::_screenAttr::mScreenNum
UWord mScreenNum
The number of the screen backbuffer that's changing.
Definition: ntv2caption608types.h:844
StrToNTV2Line21Opacity
NTV2Line21Opacity StrToNTV2Line21Opacity(const std::string &inStr)
Converts the given string into the equivalent NTV2Line21Opacity value.
Get608Byte2
UByte Get608Byte2(const NTV2_CC608_CodePoint inCodePoint)
Extracts the second CEA-608 byte from the given NTV2_CC608_CodePoint.
Definition: ntv2caption608types.h:344
NTV2Line21Attributes::GetHashKey
uint16_t GetHashKey(void) const
Returns my magnitude used to implement operator < for sorting or using a Line21 attribute as an index...
NTV2Caption608ChangeInfo
This class is used to respond to dynamic events that occur during CEA-608 caption decoding.
Definition: ntv2caption608types.h:779
NTV2_CC608_Text2
@ NTV2_CC608_Text2
Definition: ntv2caption608types.h:91
NTV2Caption608ChangeInfo::_u::_captionMode::mNew
UWord mNew
Current NTV2Line21Mode change. This is the new NTV2Line21Mode value.
Definition: ntv2caption608types.h:832
NTV2_CC608_White
@ NTV2_CC608_White
Definition: ntv2caption608types.h:155
NTV2_CC608_Magenta
@ NTV2_CC608_Magenta
Definition: ntv2caption608types.h:161
CaptionData::f3_char2
UByte f3_char2
Caption Byte 2 of Field 3.
Definition: ntv2caption608types.h:667
ULWord
uint32_t ULWord
Definition: ajatypes.h:253
NTV2_CC608_ChannelInvalid
@ NTV2_CC608_ChannelInvalid
Definition: ntv2caption608types.h:98
NTV2_CC608_Field2
@ NTV2_CC608_Field2
Definition: ntv2caption608types.h:60
CaptionData::SetF2Data
CaptionData & SetF2Data(const CaptionData &inRHS)
Copies my F2 data bytes from the given CaptionData instance.
Definition: ntv2caption608types.h:735
NTV2_CC608_CapModeUnknown
@ NTV2_CC608_CapModeUnknown
Unknown or invalid caption mode.
Definition: ntv2caption608types.h:126
NTV2_CC608_Transparent
@ NTV2_CC608_Transparent
Definition: ntv2caption608types.h:217
CaptionData::Zero
void Zero(void)
Sets all of my "got data" fields to "false" and all my character values to zero.
Definition: ntv2caption608types.h:753
NTV2Line21Attributes::Clear
void Clear(void)
Clears all of my attributes, returning me to a default state, i.e., no flashing, no italics,...
Definition: ntv2caption608types.h:520
NTV2Caption608ChangeInfo::_u::_screenAttr
Definition: ntv2caption608types.h:842
NTV2Line21ModeToStr
const std::string & NTV2Line21ModeToStr(const NTV2Line21Mode inLine21Mode)
Converts the given NTV2Line21Mode value into a human-readable string.
NTV2Line21CharSet
enum NTV2Line21CharacterSet NTV2Line21CharSet
NTV2Line21Attributes::IsFlashing
bool IsFlashing(void) const
Returns true if I'm flashing; otherwise returns false.
Definition: ntv2caption608types.h:432
NTV2Line21OpacityToStr
const std::string & NTV2Line21OpacityToStr(const NTV2Line21Opacity inLine21Opacity, const bool inCompact=true)
Converts the given NTV2Line21Opacity value into a human-readable string.
GetLine21CharacterSet
NTV2Line21CharacterSet GetLine21CharacterSet(const NTV2_CC608_CodePoint inCodePoint)
Extracts the NTV2Line21CharacterSet from the given NTV2_CC608_CodePoint.
Definition: ntv2caption608types.h:322
CaptionData::HasData
bool HasData(void) const
Definition: ntv2caption608types.h:698
NTV2Caption608ChangeInfo::_u::_screenAttr::mNew
uint16_t mNew
The new character NTV2Line21Attributes.
Definition: ntv2caption608types.h:848
StrToNTV2Line21Color
NTV2Line21Color StrToNTV2Line21Color(const std::string &inStr)
Converts the given string into the equivalent NTV2Line21Color value.
StrToNTV2Line21Channel
NTV2Line21Channel StrToNTV2Line21Channel(const std::string &inStr)
Converts the given string into the equivalent NTV2Line21Channel value.
UWord
uint16_t UWord
Definition: ajatypes.h:251
NTV2Line21Attributes::SetOpacity
NTV2Line21Attributes & SetOpacity(const NTV2Line21Opacity inOpacity)
Sets my background opacity attribute.
Definition: ntv2caption608types.h:513
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2_CC608_DoubleSizeCharacterSet
@ NTV2_CC608_DoubleSizeCharacterSet
Definition: ntv2caption608types.h:246
CaptionData::bGotField3Data
bool bGotField3Data
True if Field 3 bytes have been set. This is used only when translating 30fps video to 24fps and remo...
Definition: ntv2caption608types.h:665
NTV2Caption608ChangeInfo::_u::_screenChar::mRow
UWord mRow
Display character change. The row number that contains the character that's being changed.
Definition: ntv2caption608types.h:837
NTV2Caption608ChangeInfo::mWhatChanged
UWord mWhatChanged
Bit mask that indicates what changed.
Definition: ntv2caption608types.h:852
NTV2_CC608_XDS
@ NTV2_CC608_XDS
Definition: ntv2caption608types.h:95
StrToNTV2Line21Field
NTV2Line21Field StrToNTV2Line21Field(const std::string &inStr)
Converts the given string into the equivalent NTV2Line21Field value.
NTV2_CC608_CapModeRollUp4
@ NTV2_CC608_CapModeRollUp4
4-row roll-up from bottom
Definition: ntv2caption608types.h:130
NTV2Caption608ChangeInfo::_u::_currentScreen::mNew
UWord mNew
Current screen change. This is the new screen number.
Definition: ntv2caption608types.h:827
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 ...
NTV2_CC608_Green
@ NTV2_CC608_Green
Definition: ntv2caption608types.h:156
CaptionData::bGotField2Data
bool bGotField2Data
True if Field 2 bytes have been set; otherwise false.
Definition: ntv2caption608types.h:661
NTV2Line21AttributePermutations
An ordered set of all possible NTV2Line21Attributes permutations (excluding the "flashing" attribute,...
Definition: ntv2caption608types.h:882
CaptionData::SetF2Data
CaptionData & SetF2Data(const UByte inF2Char1, const UByte inF2Char2)
Sets my F2 data bytes.
Definition: ntv2caption608types.h:743
NTV2Line21CharacterSetToStr
const std::string & NTV2Line21CharacterSetToStr(const NTV2Line21CharacterSet inLine21CharSet)
Converts the given NTV2Line21CharacterSet value into a human-readable string.
NTV2_CC608_NumColors
@ NTV2_CC608_NumColors
Definition: ntv2caption608types.h:164
NTV2Line21AttributePermutations::size
ULWord size(void) const
Returns my size (the total number of attribute permutations that I have).
Definition: ntv2caption608types.h:901
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.
NTV2Line21Attributes::NTV2Line21Attributes
NTV2Line21Attributes(const NTV2Line21Attributes &inRHS)
Definition: ntv2caption608types.h:381
NTV2Caption608ChangeInfo::_u::_screenChar::mColumn
UWord mColumn
Display character change. The column number that contains the character that's being changed.
Definition: ntv2caption608types.h:838
NTV2_CC608_ChannelMax
@ NTV2_CC608_ChannelMax
Definition: ntv2caption608types.h:97
NTV2Caption608ChangeInfo::_u::_screenChar::mScreenNum
UWord mScreenNum
Display character change. This is the number of the screen backbuffer that's changing.
Definition: ntv2caption608types.h:836
NTV2_CC608_MaxCol
const UWord NTV2_CC608_MaxCol(32)
The maximum column index number (located at the right edge of the screen).
NTV2Line21FieldToStr
const std::string & NTV2Line21FieldToStr(const NTV2Line21Field inLine21Field)
Converts the given NTV2Line21Field value into a human-readable string.
NTV2Line21Attributes::GetBGColor
NTV2Line21Color GetBGColor(void) const
Returns my background color.
Definition: ntv2caption608types.h:412
NTV2Caption608ChangeInfo::_u::_currentColumn::mOld
UWord mOld
Current column change. This is the old column number.
Definition: ntv2caption608types.h:821
NTV2Line21Attributes
struct NTV2Line21Attributes NTV2Line21Attributes
CEA-608 Character Attributes.
NTV2_CC608_CapModeRollUp2
@ NTV2_CC608_CapModeRollUp2
2-row roll-up from bottom
Definition: ntv2caption608types.h:128
CaptionData::SetF1Data
CaptionData & SetF1Data(const CaptionData &inRHS)
Copies my F1 data bytes from the given CaptionData instance.
Definition: ntv2caption608types.h:720
Make608CodePoint
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.
Definition: ntv2caption608types.h:295
NTV2_CC608_CodePoint
ULWord NTV2_CC608_CodePoint
Describes a unique CEA-608 caption character code point in 32 bits: 0xSS00XXYY, where....
Definition: ntv2caption608types.h:276
NTV2Caption608Changed
void() NTV2Caption608Changed(void *pInstance, const NTV2Caption608ChangeInfo &inChangeInfo)
This callback is used to respond to dynamic events that occur during CEA-608 caption decoding.
Definition: ntv2caption608types.h:872
NTV2_CC608_RegisteredCharacterSet1
@ NTV2_CC608_RegisteredCharacterSet1
Definition: ntv2caption608types.h:251
NTV2Line21Attributes::RemoveUnderline
NTV2Line21Attributes & RemoveUnderline(void)
Disables my underline attribute setting.
Definition: ntv2caption608types.h:464
NTV2_CC608_PrivateCharacterSet2
@ NTV2_CC608_PrivateCharacterSet2
Definition: ntv2caption608types.h:248
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::operator!=
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition: json.hpp:14762
NTV2Caption608ChangeInfo::_u
Definition: ntv2caption608types.h:808
NTV2Line21ChannelToStr
const std::string & NTV2Line21ChannelToStr(const NTV2Line21Channel inLine21Channel, const bool inCompact=true)
Converts the given NTV2Line21Channel value into a human-readable string.
NTV2Line21Mode
NTV2Line21Mode
The CEA-608 modes: pop-on, roll-up (2, 3 and 4-line), and paint-on.
Definition: ntv2caption608types.h:123
UByte
uint8_t UByte
Definition: ajatypes.h:248
StrToNTV2Line21Mode
NTV2Line21Mode StrToNTV2Line21Mode(const std::string &inStr)
Converts the given string into the equivalent NTV2Line21Mode value.
NTV2_608_INVALID_COLOR
@ NTV2_608_INVALID_COLOR
Definition: ntv2caption608types.h:165
NTV2_CC608_CC1
@ NTV2_CC608_CC1
Caption channel 1, the primary caption channel.
Definition: ntv2caption608types.h:84
NTV2_CC608_Text1
@ NTV2_CC608_Text1
Definition: ntv2caption608types.h:90
NTV2Caption608ChangeInfo::_u::_screenAttr::mOld
uint16_t mOld
The old character NTV2Line21Attributes.
Definition: ntv2caption608types.h:847
NTV2Line21Channel
NTV2Line21Channel
The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS.
Definition: ntv2caption608types.h:82
NTV2Caption608ChangeInfo::_u::_currentRow::mOld
UWord mOld
Current row change. This is the old row number.
Definition: ntv2caption608types.h:816
NTV2Caption608ChangeInfo::_u::_captionMode::mOld
UWord mOld
Current NTV2Line21Mode change. This is the old NTV2Line21Mode value.
Definition: ntv2caption608types.h:831
CaptionData::IsError
bool IsError(void) const
Definition: ntv2caption608types.h:713
NTV2_CC608_MinRow
const UWord NTV2_CC608_MinRow(1)
The minimum row index number (located at the top of the screen).
AJAExport
#define AJAExport
Definition: export.h:33
NTV2_CC608_CapModeRollUp3
@ NTV2_CC608_CapModeRollUp3
3-row roll-up from bottom
Definition: ntv2caption608types.h:129
NTV2Line21Attrs
struct NTV2Line21Attributes NTV2Line21Attrs
NTV2_CC608_Field_Max
@ NTV2_CC608_Field_Max
Definition: ntv2caption608types.h:61
NTV2Caption608ChangeInfo::_u::_currentColumn
Definition: ntv2caption608types.h:819
NTV2Line21Attributes::RemoveItalics
NTV2Line21Attributes & RemoveItalics(void)
Removes italics.
Definition: ntv2caption608types.h:444
NTV2Line21Attributes::SetUnderline
NTV2Line21Attributes & SetUnderline(const bool inUnderline)
Sets my underline attribute setting.
Definition: ntv2caption608types.h:471
NTV2_CC608_PRChinaCharacterSet
@ NTV2_CC608_PRChinaCharacterSet
Definition: ntv2caption608types.h:249
NTV2_CC608_Text3
@ NTV2_CC608_Text3
Definition: ntv2caption608types.h:92
NTV2Line21Attributes::AddFlash
NTV2Line21Attributes & AddFlash(void)
Enables my flashing attribute setting.
Definition: ntv2caption608types.h:478
StrToNTV2Line21CharacterSet
NTV2Line21CharacterSet StrToNTV2Line21CharacterSet(const std::string &inStr)
Converts the given string into the equivalent NTV2Line21CharacterSet value.
NTV2_CC608_Field1
@ NTV2_CC608_Field1
Definition: ntv2caption608types.h:59
operator<<
std::ostream & operator<<(std::ostream &inOutStream, const NTV2Line21Attrs &inData)
Writes a human-readable rendition of the given NTV2Line21Attributes into the given output stream.
NTV2Line21Attributes::GetColor
NTV2Line21Color GetColor(void) const
Returns my foreground color.
Definition: ntv2caption608types.h:407
NTV2Caption608ChangeInfo::_u::_screenChar
Definition: ntv2caption608types.h:834
NTV2Line21AttrsPtr
NTV2Line21Attrs * NTV2Line21AttrsPtr
Definition: ntv2caption608types.h:568
NTV2CodePointSetToString
std::string NTV2CodePointSetToString(const NTV2CodePointSet &inSet)
NTV2Line21Attributes::GetOpacity
NTV2Line21Opacity GetOpacity(void) const
Returns my background opacity.
Definition: ntv2caption608types.h:417
NTV2Caption608ChangeInfo::_u::_screenChar::mNew
NTV2_CC608_CodePoint mNew
Display character change. The new character NTV2_CC608_CodePoint value.
Definition: ntv2caption608types.h:840
CaptionData::bGotField1Data
bool bGotField1Data
True if Field 1 bytes have been set; otherwise false.
Definition: ntv2caption608types.h:657
NTV2_CC608_KoreanCharacterSet
@ NTV2_CC608_KoreanCharacterSet
Definition: ntv2caption608types.h:250
NTV2Line21Field
NTV2Line21Field
The two CEA-608 interlace fields.
Definition: ntv2caption608types.h:56
NTV2Line21Attributes
CEA-608 Character Attributes.
Definition: ntv2caption608types.h:357
CaptionData
This structure encapsulates all possible CEA-608 caption data bytes that may be associated with a giv...
Definition: ntv2caption608types.h:655
NTV2Caption608ChangeInfo::_u::_screenChar::mOld
NTV2_CC608_CodePoint mOld
Display character change. The old character NTV2_CC608_CodePoint value.
Definition: ntv2caption608types.h:839
NTV2_CC608_Opaque
@ NTV2_CC608_Opaque
Definition: ntv2caption608types.h:215
CaptionData::f2_char2
UByte f2_char2
Caption Byte 2 of Field 2.
Definition: ntv2caption608types.h:663
NTV2_CC608_Yellow
@ NTV2_CC608_Yellow
Definition: ntv2caption608types.h:160
NTV2Line21CharacterSet
NTV2Line21CharacterSet
The available CEA-608 character sets.
Definition: ntv2caption608types.h:243
NTV2Caption608ChangeInfo::_u::_currentColumn::mNew
UWord mNew
Current column change. This is the new column number.
Definition: ntv2caption608types.h:822
NTV2Caption608ChangeInfo::Print
std::ostream & Print(std::ostream &inOutStrm) const
CaptionData::HasF2Data
bool HasF2Data(void) const
Definition: ntv2caption608types.h:693
NTV2Line21Attributes::AddItalics
NTV2Line21Attributes & AddItalics(void)
Enables italics.
Definition: ntv2caption608types.h:438
CaptionData::f3_char1
UByte f3_char1
Caption Byte 1 of Field 3.
Definition: ntv2caption608types.h:666
NTV2_CC608_CapModePopOn
@ NTV2_CC608_CapModePopOn
Pop-on caption mode.
Definition: ntv2caption608types.h:127
NTV2Caption608ChangeInfo::_u::_screenAttr::mRow
UWord mRow
The row number that contains the character whose attributes are changing.
Definition: ntv2caption608types.h:845
NTV2Line21Attributes::RemoveFlash
NTV2Line21Attributes & RemoveFlash(void)
Disables my flashing attribute setting.
Definition: ntv2caption608types.h:484
NTV2Caption608ChangeInfo::_u::_currentChannel
Definition: ntv2caption608types.h:810
NTV2Caption608ChangeInfo::_u::_currentScreen
Definition: ntv2caption608types.h:824
NTV2Caption608ChangeInfo::NTV2Caption608Change
NTV2Caption608Change
Used to determine what changed. Also can be used to choose which changes to pay attention to.
Definition: ntv2caption608types.h:785
CaptionData::f1_char1
UByte f1_char1
Caption Byte 1 of Field 1.
Definition: ntv2caption608types.h:658
NTV2Caption608ChangeInfo::_u::_currentRow::mNew
UWord mNew
Current row change. This is the new row number.
Definition: ntv2caption608types.h:817
NTV2Line21AttributesToStr
std::string NTV2Line21AttributesToStr(const NTV2Line21Attributes inLine21Attributes)
Converts the given NTV2Line21Attributes value into a human-readable string.
NTV2Caption608ChangeInfo::_u::_captionMode
Definition: ntv2caption608types.h:829
NTV2_CC608_CC3
@ NTV2_CC608_CC3
Definition: ntv2caption608types.h:86
NTV2CodePointSet
std::set< NTV2_CC608_CodePoint > NTV2CodePointSet
A set of unique CEA-608 caption character code points.
Definition: ntv2caption608types.h:282
NTV2_CC608_MaxRow
const UWord NTV2_CC608_MaxRow(15)
The maximum permissible row index number (located at the bottom of the screen).