AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
ntv2caption608messagequeue.h
Go to the documentation of this file.
1 
7 #ifndef __NTV2_CAPTION608MESSAGEQUEUE__
8 #define __NTV2_CAPTION608MESSAGEQUEUE__
9 
10 #include "ntv2caption608message.h"
11 #include <deque>
12 
13 
21 {
22  // Instance Methods
23  public:
25  virtual ~CNTV2Caption608MessageQueue ();
26 
31  virtual CNTV2Caption608MessagePtr GetNextCaptionMessage (void);
32 
38  virtual bool EnqueueCaptionMessage (CNTV2Caption608MessagePtr inMsg);
39 
44  virtual size_t Flush (void);
45 
51  virtual size_t Flush (const NTV2Line21Channel inChannel);
52 
59  virtual std::ostream & Print (std::ostream & inOutStream, const bool inDumpMessages = true) const;
60 
61 
66  virtual size_t GetQueuedMessageCount (void) const;
67 
73  virtual size_t GetQueuedMessageCount (const NTV2Line21Channel inChannel) const;
74 
79  virtual size_t GetQueuedByteCount (void) const;
80 
86  virtual size_t GetQueuedByteCount (const NTV2Line21Channel inChannel) const;
87 
92  virtual size_t GetEnqueueByteTally (void) const;
93 
98  virtual size_t GetDequeueByteTally (void) const;
99 
103  virtual size_t GetEnqueueMessageTally (void) const;
104 
108  virtual size_t GetDequeueMessageTally (void) const;
109 
110 
115  virtual size_t GetEnqueueByteTally (const NTV2Line21Channel inChannel) const;
116 
121  virtual size_t GetDequeueByteTally (const NTV2Line21Channel inChannel) const;
122 
126  virtual size_t GetEnqueueMessageTally (const NTV2Line21Channel inChannel) const;
127 
131  virtual size_t GetDequeueMessageTally (const NTV2Line21Channel inChannel) const;
132 
133 
138  virtual inline size_t GetHighestQueueDepth (void) const {return mMaxMsgTally;}
139 
140  private:
142  virtual CNTV2Caption608MessageQueue & operator = (const CNTV2Caption608MessageQueue & inRHS);
143 
144 
145  // Instance Data
146  private:
147  typedef std::deque <CNTV2Caption608MessagePtr> MyQueueType;
148  typedef MyQueueType::const_iterator MyQueueTypeConstIter;
149 
150  MyQueueType mHiPriorityQueue;
151  MyQueueType mLoPriorityQueue;
152  mutable void * mpQueueLock;
153  size_t mEnqueueByteTally [NTV2_CC608_ChannelMax];
154  size_t mDequeueByteTally [NTV2_CC608_ChannelMax];
155  size_t mEnqueueMsgTally [NTV2_CC608_ChannelMax];
156  size_t mDequeueMsgTally [NTV2_CC608_ChannelMax];
157  size_t mMaxMsgTally;
158 
159 }; // CNTV2Caption608MessageQueue
160 
161 
162 // Output stream operators:
163 inline std::ostream & operator << (std::ostream & inOutStream, const CNTV2Caption608MessageQueue & inObj) {return inObj.Print (inOutStream);}
164 
165 
166 
167 #endif // __NTV2_CAPTION608MESSAGEQUEUE__
operator<<
std::ostream & operator<<(std::ostream &inOutStream, const CNTV2Caption608MessageQueue &inObj)
Definition: ntv2caption608messagequeue.h:163
AJARefPtr
I am a reference-counted pointer template class. I am intended to be a proxy for an underlying object...
Definition: ajarefptr.h:89
CNTV2Caption608MessageQueue::Print
virtual std::ostream & Print(std::ostream &inOutStream, const bool inDumpMessages=true) const
Prints a human-readable representation of me to the given output stream in oldest-to-newest order.
CNTV2Caption608MessageQueue
I am a thread-safe queue of caption messages. Internally, I maintain two queues: one for high-priorit...
Definition: ntv2caption608messagequeue.h:20
ntv2caption608message.h
Declares the CNTV2Caption608Message class.
NTV2_CC608_ChannelMax
@ NTV2_CC608_ChannelMax
Definition: ntv2caption608types.h:97
NTV2Line21Channel
NTV2Line21Channel
The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS.
Definition: ntv2caption608types.h:82
AJAExport
#define AJAExport
Definition: export.h:33
CNTV2CaptionLogConfig
Definition: ntv2captionlogging.h:77
CNTV2Caption608MessageQueue::GetHighestQueueDepth
virtual size_t GetHighestQueueDepth(void) const
Returns the highest queue depth – i.e., the maximum number of messages I held in either of my queues ...
Definition: ntv2caption608messagequeue.h:138