AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2caption608dataqueue.h
Go to the documentation of this file.
1 
6 #ifndef __NTV2_CEA608_DATAQUEUE_
7 #define __NTV2_CEA608_DATAQUEUE_
8 
9 #include "ntv2caption608types.h"
10 #include "ntv2captionlogging.h"
11 #ifdef MSWindows
12  #include "windows.h"
13  #include "stdio.h"
14 #endif
15 #include <deque>
16 
17 
22 typedef struct QueueData608
23 {
24  bool fGotData;
27 
28 } QueueData608;
29 
30 
35 {
36  // INSTANCE METHODS
37  public:
39  virtual ~CNTV2Caption608DataQueue ();
40 
41  virtual void Flush (void);
42  virtual void SetField (const NTV2Line21Field inField) {mFieldOfInterest = IsValidLine21Field (inField) ? inField : NTV2_CC608_Field_Invalid;}
43 
44  virtual bool Push608Data (const UByte char1, const UByte char2, const bool bGotData);
45  virtual bool Pop608Data (UByte & outChar1, UByte & outChar2, bool & outGotData);
46  virtual bool IsEmpty (void) const;
47 
48  virtual size_t GetCurrentDepth (void) const;
49  virtual size_t GetMaximumDepth (void) const;
50  virtual size_t GetEnqueueTally (void) const;
51  virtual size_t GetDequeueTally (void) const;
52 
53 
54  // Instance Data
55  private:
56  std::deque <QueueData608> mDataQueue;
57  mutable void * mpQueueLock;
58  NTV2Line21Field mFieldOfInterest;
59 
60  // Stats
61  size_t mEnqueueTally;
62  size_t mDequeueTally;
63  size_t mHighestQueueDepth;
64 
65 }; // CNTV2Caption608DataQueue
66 
67 #endif // __NTV2_CEA608_DATAQUEUE_
QueueData608::fChar1
UByte fChar1
True if my data bytes are valid; otherwise false.
Definition: ntv2caption608dataqueue.h:25
ntv2caption608types.h
Declares several data types used with 608/SD captioning.
QueueData608
struct QueueData608 QueueData608
Each queue entry has two caption data bytes and a flag that indicates if those bytes contain valid da...
CNTV2Caption608DataQueue::SetField
virtual void SetField(const NTV2Line21Field inField)
Definition: ntv2caption608dataqueue.h:42
QueueData608::fChar2
UByte fChar2
Caption data byte 1.
Definition: ntv2caption608dataqueue.h:26
NTV2_CC608_Field_Invalid
@ NTV2_CC608_Field_Invalid
Definition: ntv2caption608types.h:58
IsValidLine21Field
#define IsValidLine21Field(_field_)
Definition: ntv2caption608types.h:66
UByte
uint8_t UByte
Definition: ajatypes.h:241
QueueData608
Each queue entry has two caption data bytes and a flag that indicates if those bytes contain valid da...
Definition: ntv2caption608dataqueue.h:22
QueueData608::fGotData
bool fGotData
Definition: ntv2caption608dataqueue.h:24
AJAExport
#define AJAExport
Definition: export.h:33
CNTV2Caption608DataQueue
I am a simple, thread-safe queue of CEA-608 caption byte pairs.
Definition: ntv2caption608dataqueue.h:34
CNTV2CaptionLogConfig
Definition: ntv2captionlogging.h:77
NTV2Line21Field
NTV2Line21Field
The two CEA-608 interlace fields.
Definition: ntv2caption608types.h:56
ntv2captionlogging.h
Declares the NTV2CaptionLogMask, and the CNTV2CaptionLogConfig class.