AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
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_
#define NULL
Defines the AJARefPtr template class.
AJARefPtr< CNTV2XDSDecodeChannel608 > CNTV2XDSDecodeChannel608Ptr
Declares the NTV2CaptionLogMask, and the CNTV2CaptionLogConfig class.
uint8_t UByte
Definition: ajatypes.h:218
void() NTV2Caption608Changed(void *pInstance, const NTV2Caption608ChangeInfo &inChangeInfo)
This callback is used to respond to dynamic events that occur during CEA-608 caption decoding...
#define AJAExport
Definition: export.h:33
NTV2Line21Channel
The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS.
Declares several data types used with 608/SD captioning.
NTV2Line21Field
The two CEA-608 interlace fields.