AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2xdscaptiondecodechannel608.h
Go to the documentation of this file.
1 
7 #ifndef __NTV2_CEA608_DECODEXDSCHANNEL_
8 #define __NTV2_CEA608_DECODEXDSCHANNEL_
9 
10 #include "ntv2captionlogging.h"
11 #include "ntv2caption608types.h"
13 #include <string>
14 
15 #ifdef MSWindows
16  #include "windows.h"
17  #include "stdio.h"
18 #elif defined (AJAMac)
19  #pragma GCC diagnostic ignored "-Wunused-private-field"
20 #endif
21 
22 
23 // CEA-608 Extended Data Service (XDS) Classes
24 typedef enum NTV2_CC608_XDSClass
25 {
34 
36 
38 
39 
40 // CEA-608 Extended Data Service (XDS) Types
41 typedef enum NTV2_CC608_XDSType
42 {
44 
45  // "Current Class" Packet Types
64 
65  // "Channel Class" Packet Types
70 
71  // "Miscellaneous Class" Packet Types
80 
81  // "Public Service Class" Types
84 
86 
88 
89 
110 
112 {
113  // CLASS METHODS
114  public:
115  static bool Create (CNTV2XDSDecodeChannel608Ptr & outObj);
116  static NTV2Line21Channel GetCurrentChannel (UByte char608_1, UByte char608_2, NTV2Line21Field field);
117 
118 
119  // INSTANCE METHODS
120  public:
121  virtual ~CNTV2XDSDecodeChannel608 ();
122 
123  virtual void Init (void);
124  virtual void Reset (void);
125 
126  virtual bool NewData (const UByte inByte1, const UByte inByte2, const NTV2Line21Field inField);
127 
128  virtual bool SubscribeChangeNotification (NTV2Caption608Changed * pInCallback, void * pInUserData = NULL);
129  virtual bool UnsubscribeChangeNotification (NTV2Caption608Changed * pInCallback, void * pInUserData = NULL);
130 
131 
132  // PRIVATE INSTANCE METHODS
133  private:
134  virtual bool NewCurrentClassData (const UByte inByte1, const UByte inByte2, const NTV2Line21Field inField);
135  virtual bool NewFutureClassData (const UByte inByte1, const UByte inByte2, const NTV2Line21Field inField);
136  virtual bool NewChannelClassData (const UByte inByte1, const UByte inByte2, const NTV2Line21Field inField);
137  virtual bool NewMiscClassData (const UByte inByte1, const UByte inByte2, const NTV2Line21Field inField);
138  virtual bool NewPublicServiceClassData (const UByte inByte1, const UByte inByte2, const NTV2Line21Field inField);
139  virtual bool NewReservedClassData (const UByte inByte1, const UByte inByte2, const NTV2Line21Field inField);
140  virtual bool NewPrivateDataClassData (const UByte inByte1, const UByte inByte2, const NTV2Line21Field inField);
141 
142  // Hidden constructors and assignment operator
143  explicit CNTV2XDSDecodeChannel608 ();
144  explicit CNTV2XDSDecodeChannel608 (const CNTV2XDSDecodeChannel608 & inObj);
145  virtual CNTV2XDSDecodeChannel608 & operator = (const CNTV2XDSDecodeChannel608 & inObj);
146 
147 
148  // PRIVATE CLASS METHODS
149  private:
150  static std::string GetClassString (const NTV2_CC608_XDSClass theClass);
151  static std::string GetTypeString (const NTV2_CC608_XDSType theType);
152 
153 
154  // INSTANCE DATA
155  private:
156  NTV2_CC608_XDSClass mCurrClass;
157  NTV2_CC608_XDSType mCurrType;
158 
159  UByte mProgramIDNumberData [4];
160  int mProgramIDNumberCount;
161 
162  UByte mLengthTimeInShowData [6];
163  int mLengthTimeInShowCount;
164 
165  char mProgramNameStr [33];
166 
167  UByte mProgramTypeData [2];
168  int mProgramTypeCount;
169 
170  UByte mContentAdvisoryData [2];
171  int mContentAdvisoryCount;
172 
173  UByte mAudioServicesData [2];
174  int mAudioServicesCount;
175 
176  UByte mCaptioningServicesData [8];
177  int mCaptioningServicesCount;
178 
179  UByte mCopyRedistributionData [2];
180  int mCopyRedistributionCount;
181 
182  UByte mCompositePacket1Data [33];
183  int mCompositePacket1Count;
184 
185  UByte mCompositePacket2Data [33];
186  int mCompositePacket2Count;
187 
188  char mProgramDescriptionRow1Str [33];
189  char mProgramDescriptionRow2Str [33];
190  char mProgramDescriptionRow3Str [33];
191  char mProgramDescriptionRow4Str [33];
192  char mProgramDescriptionRow5Str [33];
193  char mProgramDescriptionRow6Str [33];
194  char mProgramDescriptionRow7Str [33];
195  char mProgramDescriptionRow8Str [33];
196 
197 
198  char mNetworkNameStr [33];
199 
200  UByte mCallLettersData [6];
201  int mCallLettersCount;
202 
203  UByte mTapeDelayData [2];
204  int mTapeDelayCount;
205 
206  UByte mTransmissionSignalIDData [4];
207  int mTransmissionSignalIDCount;
208 
209 
210  UByte mTimeOfDayData [6];
211  int mTimeOfDayCount;
212 
213  UByte mImpulseCaptureIDData [6];
214  int mImpulseCaptureIDCount;
215 
216  UByte mSupplementalDataLocationData [32];
217  int mSupplementalDataLocationCount;
218 
219  UByte mLocalTimeZoneData [2];
220  int mLocalTimeZoneCount;
221 
222  UByte mOutOfBandChannelNumberData [2];
223  int mOutOfBandChannelNumberCount;
224 
225  UByte mChannelMapPointerData [2];
226  int mChannelMapPointerCount;
227 
228  UByte mChannelMapHeaderData [4];
229  int mChannelMapHeaderCount;
230 
231  UByte mChannelMapData [10];
232  int mChannelMapCount;
233 
234  char mNWSCodeStr [33];
235  char mNWSMessageStr [33];
236 
237  int mDebugPrintOffset;
238 
239  NTV2Caption608Changed * mpCallback;
240  void * mpSubscriberData;
241 
242 }; // CNTV2XDSDecodeChannel608
243 
244 #endif // __NTV2_CEA608_DECODEXDSCHANNEL_
NTV2_CC608_XDSProgramDescRow8Type
@ NTV2_CC608_XDSProgramDescRow8Type
Definition: ntv2xdscaptiondecodechannel608.h:63
NTV2_CC608_XDSChannelMapHeaderType
@ NTV2_CC608_XDSChannelMapHeaderType
Definition: ntv2xdscaptiondecodechannel608.h:78
NTV2_CC608_XDSUnknownClass
@ NTV2_CC608_XDSUnknownClass
Definition: ntv2xdscaptiondecodechannel608.h:26
CNTV2XDSDecodeChannel608
Definition: ntv2xdscaptiondecodechannel608.h:111
ntv2caption608types.h
Declares several data types used with 608/SD captioning.
NTV2_CC608_XDSChannelMapPointerType
@ NTV2_CC608_XDSChannelMapPointerType
Definition: ntv2xdscaptiondecodechannel608.h:77
NULL
#define NULL
Definition: ntv2caption608types.h:19
AJARefPtr< CNTV2XDSDecodeChannel608 >
NTV2_CC608_XDSProgramDescRow3Type
@ NTV2_CC608_XDSProgramDescRow3Type
Definition: ntv2xdscaptiondecodechannel608.h:58
NTV2_CC608_XDSProgramDescRow1Type
@ NTV2_CC608_XDSProgramDescRow1Type
Definition: ntv2xdscaptiondecodechannel608.h:56
NTV2_CC608_XDSCompositePacket1Type
@ NTV2_CC608_XDSCompositePacket1Type
Definition: ntv2xdscaptiondecodechannel608.h:54
NTV2_CC608_XDSTransmissionSignalIDType
@ NTV2_CC608_XDSTransmissionSignalIDType
Definition: ntv2xdscaptiondecodechannel608.h:69
NTV2_CC608_XDSCaptionServicesType
@ NTV2_CC608_XDSCaptionServicesType
Definition: ntv2xdscaptiondecodechannel608.h:52
CNTV2XDSDecodeChannel608Ptr
AJARefPtr< CNTV2XDSDecodeChannel608 > CNTV2XDSDecodeChannel608Ptr
Definition: ntv2xdscaptiondecodechannel608.h:108
NTV2_CC608_XDSImpulseCaptureIDType
@ NTV2_CC608_XDSImpulseCaptureIDType
Definition: ntv2xdscaptiondecodechannel608.h:73
NTV2_CC608_XDSCompositePacket2Type
@ NTV2_CC608_XDSCompositePacket2Type
Definition: ntv2xdscaptiondecodechannel608.h:55
NTV2_CC608_XDSLocalTimeZoneType
@ NTV2_CC608_XDSLocalTimeZoneType
Definition: ntv2xdscaptiondecodechannel608.h:75
NTV2_CC608_XDSClass
NTV2_CC608_XDSClass
Definition: ntv2xdscaptiondecodechannel608.h:24
NTV2_CC608_XDSNWSMessage
@ NTV2_CC608_XDSNWSMessage
Definition: ntv2xdscaptiondecodechannel608.h:83
NTV2_CC608_XDSTimeOfDayType
@ NTV2_CC608_XDSTimeOfDayType
Definition: ntv2xdscaptiondecodechannel608.h:72
NTV2_CC608_XDSLengthTimeInShowType
@ NTV2_CC608_XDSLengthTimeInShowType
Definition: ntv2xdscaptiondecodechannel608.h:47
NTV2_CC608_XDSNetworkNameType
@ NTV2_CC608_XDSNetworkNameType
Definition: ntv2xdscaptiondecodechannel608.h:66
NTV2_CC608_XDSUnknownType
@ NTV2_CC608_XDSUnknownType
Definition: ntv2xdscaptiondecodechannel608.h:43
NTV2_CC608_XDSContentAdvisoryType
@ NTV2_CC608_XDSContentAdvisoryType
Definition: ntv2xdscaptiondecodechannel608.h:50
NTV2_CC608_XDSProgramDescRow5Type
@ NTV2_CC608_XDSProgramDescRow5Type
Definition: ntv2xdscaptiondecodechannel608.h:60
NTV2_CC608_XDSProgramNameType
@ NTV2_CC608_XDSProgramNameType
Definition: ntv2xdscaptiondecodechannel608.h:48
NTV2_CC608_XDSType
NTV2_CC608_XDSType
Definition: ntv2xdscaptiondecodechannel608.h:41
NTV2_CC608_XDSProgramIDNumberType
@ NTV2_CC608_XDSProgramIDNumberType
Definition: ntv2xdscaptiondecodechannel608.h:46
NTV2_CC608_XDSOutOfBandChannelType
@ NTV2_CC608_XDSOutOfBandChannelType
Definition: ntv2xdscaptiondecodechannel608.h:76
NTV2_CC608_XDSNumClasses
@ NTV2_CC608_XDSNumClasses
Definition: ntv2xdscaptiondecodechannel608.h:35
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_XDSNWSCode
@ NTV2_CC608_XDSNWSCode
Definition: ntv2xdscaptiondecodechannel608.h:82
UByte
uint8_t UByte
Definition: ajatypes.h:241
NTV2_CC608_XDSChannelClass
@ NTV2_CC608_XDSChannelClass
Definition: ntv2xdscaptiondecodechannel608.h:29
NTV2_CC608_XDSAudioServicesType
@ NTV2_CC608_XDSAudioServicesType
Definition: ntv2xdscaptiondecodechannel608.h:51
NTV2_CC608_XDSChannelMapType
@ NTV2_CC608_XDSChannelMapType
Definition: ntv2xdscaptiondecodechannel608.h:79
NTV2Line21Channel
NTV2Line21Channel
The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS.
Definition: ntv2caption608types.h:82
NTV2_CC608_XDSSupplementalDataLocationType
@ NTV2_CC608_XDSSupplementalDataLocationType
Definition: ntv2xdscaptiondecodechannel608.h:74
NTV2_CC608_XDSProgramDescRow7Type
@ NTV2_CC608_XDSProgramDescRow7Type
Definition: ntv2xdscaptiondecodechannel608.h:62
NTV2_CC608_XDSNumTypes
@ NTV2_CC608_XDSNumTypes
Definition: ntv2xdscaptiondecodechannel608.h:85
AJAExport
#define AJAExport
Definition: export.h:33
NTV2_CC608_XDSReservedClass
@ NTV2_CC608_XDSReservedClass
Definition: ntv2xdscaptiondecodechannel608.h:32
NTV2_CC608_XDSProgramTypeType
@ NTV2_CC608_XDSProgramTypeType
Definition: ntv2xdscaptiondecodechannel608.h:49
NTV2_CC608_XDSProgramDescRow6Type
@ NTV2_CC608_XDSProgramDescRow6Type
Definition: ntv2xdscaptiondecodechannel608.h:61
NTV2_CC608_XDSProgramDescRow2Type
@ NTV2_CC608_XDSProgramDescRow2Type
Definition: ntv2xdscaptiondecodechannel608.h:57
NTV2_CC608_XDSFutureClass
@ NTV2_CC608_XDSFutureClass
Definition: ntv2xdscaptiondecodechannel608.h:28
CNTV2CaptionLogConfig
Definition: ntv2captionlogging.h:77
NTV2_CC608_XDSPrivateDataClass
@ NTV2_CC608_XDSPrivateDataClass
Definition: ntv2xdscaptiondecodechannel608.h:33
NTV2_CC608_XDSCopyRedistributionType
@ NTV2_CC608_XDSCopyRedistributionType
Definition: ntv2xdscaptiondecodechannel608.h:53
NTV2Line21Field
NTV2Line21Field
The two CEA-608 interlace fields.
Definition: ntv2caption608types.h:56
NTV2_CC608_XDSPublicServiceClass
@ NTV2_CC608_XDSPublicServiceClass
Definition: ntv2xdscaptiondecodechannel608.h:31
ajarefptr.h
Defines the AJARefPtr template class.
NTV2_CC608_XDSCurrentClass
@ NTV2_CC608_XDSCurrentClass
Definition: ntv2xdscaptiondecodechannel608.h:27
NTV2_CC608_XDSTapeDelayType
@ NTV2_CC608_XDSTapeDelayType
Definition: ntv2xdscaptiondecodechannel608.h:68
ntv2captionlogging.h
Declares the NTV2CaptionLogMask, and the CNTV2CaptionLogConfig class.
NTV2_CC608_XDSProgramDescRow4Type
@ NTV2_CC608_XDSProgramDescRow4Type
Definition: ntv2xdscaptiondecodechannel608.h:59
NTV2_CC608_XDSCallLettersType
@ NTV2_CC608_XDSCallLettersType
Definition: ntv2xdscaptiondecodechannel608.h:67
NTV2_CC608_XDSMiscClass
@ NTV2_CC608_XDSMiscClass
Definition: ntv2xdscaptiondecodechannel608.h:30