AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
ntv2publicinterface.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
7 #include "ntv2publicinterface.h"
8 #include "ntv2devicefeatures.h"
9 #include "ntv2utils.h"
10 #include "ntv2endian.h"
11 #include "ajabase/system/memory.h"
12 #include "ajabase/system/debug.h"
13 #include "ajabase/common/common.h"
14 #include "ntv2registerexpert.h"
15 #include "ntv2nubtypes.h"
16 #include "ntv2version.h"
17 #include <iomanip>
18 #include <locale> // For std::locale, std::numpunct, std::use_facet
19 #include <string.h> // For memset, et al.
20 #include <algorithm> // For set_difference
21 #include <iterator> // For std::inserter
22 #include "ntv2rp188.h"
23 #if !defined(MSWindows)
24  #include <unistd.h>
25 #endif
26 using namespace std;
27 
28 //#define NTV2BUFFER_NO_MEMCMP
29 
30 
32 
33 ostream & operator << (ostream & inOutStr, const NTV2AudioChannelPairs & inSet)
34 {
35  if (inSet.empty())
36  inOutStr << "(none)";
37  else
38  for (NTV2AudioChannelPairsConstIter iter (inSet.begin ()); iter != inSet.end (); ++iter)
39  inOutStr << (iter != inSet.begin() ? ", " : "") << ::NTV2AudioChannelPairToString (*iter, true);
40  return inOutStr;
41 }
42 
43 ostream & operator << (ostream & inOutStr, const NTV2AudioChannelQuads & inSet)
44 {
45  for (NTV2AudioChannelQuadsConstIter iter (inSet.begin ()); iter != inSet.end (); ++iter)
46  inOutStr << (iter != inSet.begin () ? ", " : "") << ::NTV2AudioChannelQuadToString (*iter, true);
47  return inOutStr;
48 }
49 
50 ostream & operator << (ostream & inOutStr, const NTV2AudioChannelOctets & inSet)
51 {
52  for (NTV2AudioChannelOctetsConstIter iter (inSet.begin ()); iter != inSet.end (); ++iter)
53  inOutStr << (iter != inSet.begin () ? ", " : "") << ::NTV2AudioChannelOctetToString (*iter, true);
54  return inOutStr;
55 }
56 
57 ostream & operator << (ostream & inOutStr, const NTV2DoubleArray & inVector)
58 {
59  for (NTV2DoubleArrayConstIter iter (inVector.begin ()); iter != inVector.end (); ++iter)
60  inOutStr << *iter << endl;
61  return inOutStr;
62 }
63 
64 ostream & operator << (ostream & inOutStr, const NTV2DIDSet & inDIDs)
65 {
66  for (NTV2DIDSetConstIter it (inDIDs.begin()); it != inDIDs.end(); )
67  {
68  inOutStr << xHEX0N(uint16_t(*it),2);
69  if (++it != inDIDs.end())
70  inOutStr << ", ";
71  }
72  return inOutStr;
73 }
74 
75 ostream & operator << (ostream & inOutStream, const UWordSequence & inData)
76 {
77  inOutStream << DEC(inData.size()) << " UWords: ";
78  for (UWordSequenceConstIter iter(inData.begin()); iter != inData.end(); )
79  {
80  inOutStream << HEX0N(*iter,4);
81  if (++iter != inData.end())
82  inOutStream << " ";
83  }
84  return inOutStream;
85 }
86 
87 ostream & operator << (ostream & inOutStream, const ULWordSequence & inData)
88 {
89  inOutStream << DEC(inData.size()) << " ULWords: ";
90  for (ULWordSequenceConstIter iter(inData.begin()); iter != inData.end(); )
91  {
92  inOutStream << HEX0N(*iter,8);
93  if (++iter != inData.end())
94  inOutStream << " ";
95  }
96  return inOutStream;
97 }
98 
99 ostream & operator << (ostream & inOutStream, const ULWord64Sequence & inData)
100 {
101  inOutStream << DEC(inData.size()) << " ULWord64s: ";
102  for (ULWord64SequenceConstIter iter(inData.begin()); iter != inData.end(); )
103  {
104  inOutStream << HEX0N(*iter,16);
105  if (++iter != inData.end())
106  inOutStream << " ";
107  }
108  return inOutStream;
109 }
110 
111 
113 {
114  Clear ();
115 }
116 
117 
119 {
120  mCRCTallyA = 0;
121  mCRCTallyB = 0;
122  mUnlockTally = 0;
123  mFrameRefClockCount = 0;
124  mGlobalClockCount = 0;
125  mFrameTRSError = false;
126  mLocked = false;
127  mVPIDValidA = false;
128  mVPIDValidB = false;
129 }
130 
131 
132 ostream & NTV2SDIInputStatus::Print (ostream & inOutStream) const
133 {
134  inOutStream << "[CRCA=" << DEC(mCRCTallyA)
135  << " CRCB=" << DEC(mCRCTallyB)
136  << " unlk=" << xHEX0N(mUnlockTally,8)
137  << " frmRefClkCnt=" << xHEX0N(mFrameRefClockCount,16)
138  << " globalClkCnt=" << xHEX0N(mGlobalClockCount,16)
139  << " frmTRS=" << YesNo(mFrameTRSError)
140  << " locked=" << YesNo(mLocked)
141  << " VPIDA=" << YesNo(mVPIDValidA)
142  << " VPIDB=" << YesNo(mVPIDValidB)
143  << "]";
144  return inOutStream;
145 }
146 
147 
149 {
150  mEnabled = false;
151  mPixel420 = false;
152  mColorSpace = NTV2_INVALID_HDMI_COLORSPACE;
153  mRGBRange = NTV2_INVALID_HDMI_RANGE;
154  mProtocol = NTV2_INVALID_HDMI_PROTOCOL;
155  mVideoStandard = NTV2_STANDARD_INVALID;
156  mVideoRate = NTV2_FRAMERATE_UNKNOWN;
157  mVideoBitDepth = NTV2_INVALID_HDMIBitDepth;
158  mAudioFormat = NTV2_AUDIO_FORMAT_INVALID;
159  mAudioRate = NTV2_AUDIO_RATE_INVALID;
160  mAudioChannels = NTV2_INVALID_HDMI_AUDIO_CHANNELS;
161 }
162 
164 {
165  Clear();
167  if (mVideoRate == NTV2_FRAMERATE_UNKNOWN)
168  return true; // Not enabled -- success
169  mEnabled = true;
170  mPixel420 = ((inData & kVRegMaskHDMOutPixel420) >> kVRegShiftHDMOutPixel420) == 1;
175  mVideoBitDepth = NTV2HDMIBitDepth((inData & kVRegMaskHDMOutBitDepth) >> kVRegShiftHDMOutBitDepth);
179  return true;
180 }
181 
182 ostream & NTV2HDMIOutputStatus::Print (ostream & inOutStream) const
183 {
184  inOutStream << "Enabled: " << YesNo(mEnabled);
185  if (mEnabled)
186  inOutStream << endl
187  << "Is 4:2:0: " << YesNo(mPixel420) << endl
188  << "Color Space: " << ::NTV2HDMIColorSpaceToString(mColorSpace,true) << endl;
189  if (mColorSpace == NTV2_HDMIColorSpaceRGB)
190  inOutStream << "RGB Range: " << ::NTV2HDMIRangeToString(mRGBRange,true) << endl;
191  inOutStream << "Protocol: " << ::NTV2HDMIProtocolToString(mProtocol,true) << endl
192  << "Video Standard: " << ::NTV2StandardToString(mVideoStandard,true) << endl
193  << "Frame Rate: " << ::NTV2FrameRateToString(mVideoRate,true) << endl
194  << "Bit Depth: " << ::NTV2HDMIBitDepthToString(mVideoBitDepth,true) << endl
195  << "Audio Format: " << ::NTV2AudioFormatToString(mAudioFormat,true) << endl
196  << "Audio Rate: " << ::NTV2AudioRateToString(mAudioRate,true) << endl
197  << "Audio Channels: " << ::NTV2HDMIAudioChannelsToString(mAudioChannels,true);
198  return inOutStream;
199 }
200 
201 
203  : mode (AUTOCIRCVIDPROCMODE_MIX),
204  foregroundVideoCrosspoint (NTV2CROSSPOINT_CHANNEL1),
205  backgroundVideoCrosspoint (NTV2CROSSPOINT_CHANNEL1),
206  foregroundKeyCrosspoint (NTV2CROSSPOINT_CHANNEL1),
207  backgroundKeyCrosspoint (NTV2CROSSPOINT_CHANNEL1),
208  transitionCoefficient (0),
209  transitionSoftness (0)
210 {
211 }
212 
213 
215  : eCommand (inCommand),
216  channelSpec (inCrosspoint),
217  lVal1 (0),
218  lVal2 (0),
219  lVal3 (0),
220  lVal4 (0),
221  lVal5 (0),
222  lVal6 (0),
223  bVal1 (false),
224  bVal2 (false),
225  bVal3 (false),
226  bVal4 (false),
227  bVal5 (false),
228  bVal6 (false),
229  bVal7 (false),
230  bVal8 (false),
231  pvVal1 (AJA_NULL),
232  pvVal2 (AJA_NULL),
233  pvVal3 (AJA_NULL),
234  pvVal4 (AJA_NULL)
235 {
236 }
237 
238 
239 NTV2_HEADER::NTV2_HEADER (const ULWord inStructureType, const ULWord inStructSizeInBytes)
240  : fHeaderTag (NTV2_HEADER_TAG),
241  fType (inStructureType),
242  fHeaderVersion (NTV2_CURRENT_HEADER_VERSION),
243  fVersion (AUTOCIRCULATE_STRUCT_VERSION),
244  fSizeInBytes (inStructSizeInBytes),
245  fPointerSize (sizeof(int*)),
246  fOperation (0),
247  fResultStatus (0)
248 {
249 }
250 
251 
252 ostream & operator << (ostream & inOutStream, const NTV2_HEADER & inObj)
253 {
254  return inObj.Print (inOutStream);
255 }
256 
257 
258 ostream & NTV2_HEADER::Print (ostream & inOutStream) const
259 {
260  inOutStream << "[";
261  if (NTV2_IS_VALID_HEADER_TAG (fHeaderTag))
262  inOutStream << NTV2_4CC_AS_STRING (fHeaderTag);
263  else
264  inOutStream << "BAD-" << HEX0N(fHeaderTag,8);
265  if (NTV2_IS_VALID_STRUCT_TYPE (fType))
266  inOutStream << NTV2_4CC_AS_STRING (fType);
267  else
268  inOutStream << "|BAD-" << HEX0N(fType,8);
269  inOutStream << " v" << fHeaderVersion << " vers=" << fVersion << " sz=" << fSizeInBytes;
270  return inOutStream << "]";
271 }
272 
274 {
275  const char * pU32 (reinterpret_cast<const char *>(&in4CC));
276  ostringstream result;
277  size_t badTally(0);
278  result << "'";
279  for (size_t charPos(0); charPos < 4; charPos++)
280  {
281  #if AJATargetBigEndian
282  const char ch(pU32[charPos]);
283  #else // little-endian:
284  const char ch(pU32[3-charPos]);
285  #endif
286  if (ch < ' ' || ch > 126)
287  {result << '.'; badTally++;} // not printable
288  else
289  result << ch;
290  }
291  result << "'";
292  if (badTally)
293  result << " (" << xHEX0N(in4CC,8) << ")";
294  return result.str();
295 }
296 
297 
298 ostream & operator << (ostream & inOutStream, const NTV2_TRAILER & inObj)
299 {
300  inOutStream << "[";
302  inOutStream << NTV2_4CC_AS_STRING(inObj.fTrailerTag);
303  else
304  inOutStream << "BAD-" << HEX0N(inObj.fTrailerTag,8);
305  return inOutStream << " rawVers=" << xHEX0N(inObj.fTrailerVersion,8) << " clientSDK="
309  << "." << DEC(NTV2SDKVersionDecode_Build(inObj.fTrailerVersion)) << "]";
310 }
311 
312 
313 ostream & operator << (ostream & inOutStream, const NTV2Buffer & inObj)
314 {
315  return inObj.Print (inOutStream);
316 }
317 
318 
319 ostream & NTV2Buffer::Print (ostream & inOutStream) const
320 {
321  inOutStream << (IsAllocatedBySDK() ? "0X" : "0x") << HEX0N(GetRawHostPointer(),16) << "/" << DEC(GetByteCount());
322  return inOutStream;
323 }
324 
325 
326 string NTV2Buffer::AsString (UWord inDumpMaxBytes) const
327 {
328  ostringstream oss;
329  oss << xHEX0N(GetRawHostPointer(),16) << ":" << DEC(GetByteCount()) << " bytes";
330  if (inDumpMaxBytes && GetHostPointer())
331  {
332  oss << ":";
333  if (inDumpMaxBytes > 256)
334  inDumpMaxBytes = 256;
335  if (ULWord(inDumpMaxBytes) > GetByteCount())
336  inDumpMaxBytes = UWord(GetByteCount());
337  const UByte * pBytes (reinterpret_cast<const UByte *>(GetHostPointer()));
338  for (UWord ndx(0); ndx < inDumpMaxBytes; ndx++)
339  oss << HEX0N(uint16_t(pBytes[ndx]),2);
340  }
341  return oss.str();
342 }
343 
344 bool NTV2Buffer::toHexString (std::string & outStr, const size_t inLineBreakInterval) const
345 {
346  outStr.clear();
347  ostringstream oss;
348  if (GetHostPointer() && GetByteCount())
349  for (int ndx(0); ndx < int(GetByteCount()); )
350  {
351  oss << HEX0N(uint16_t(U8(ndx++)),2);
352  if (inLineBreakInterval && ndx < int(GetByteCount()) && ((size_t(ndx) % inLineBreakInterval) == 0))
353  oss << endl;
354  }
355  outStr = oss.str();
356  return !outStr.empty();
357 }
358 
359 static string print_address_offset (const size_t inRadix, const ULWord64 inOffset)
360 {
361  const streamsize maxAddrWidth (sizeof(ULWord64) * 2);
362  ostringstream oss;
363  if (inRadix == 8)
364  oss << OCT0N(inOffset,maxAddrWidth) << ": ";
365  else if (inRadix == 10)
366  oss << DEC0N(inOffset,maxAddrWidth) << ": ";
367  else
368  oss << xHEX0N(inOffset,maxAddrWidth) << ": ";
369  return oss.str();
370 }
371 
372 ostream & NTV2Buffer::Dump (ostream & inOStream,
373  const size_t inStartOffset,
374  const size_t inByteCount,
375  const size_t inRadix,
376  const size_t inBytesPerGroup,
377  const size_t inGroupsPerRow,
378  const size_t inAddressRadix,
379  const bool inShowAscii,
380  const size_t inAddrOffset) const
381 {
382  if (IsNULL())
383  return inOStream;
384  if (inRadix != 8 && inRadix != 10 && inRadix != 16 && inRadix != 2)
385  return inOStream;
386  if (inAddressRadix != 0 && inAddressRadix != 8 && inAddressRadix != 10 && inAddressRadix != 16)
387  return inOStream;
388  if (inBytesPerGroup == 0) // || inGroupsPerRow == 0)
389  return inOStream;
390 
391  {
392  const void * pInStartAddress (GetHostAddress(ULWord(inStartOffset)));
393  size_t bytesRemaining (inByteCount ? inByteCount : GetByteCount());
394  size_t bytesInThisGroup (0);
395  size_t groupsInThisRow (0);
396  const unsigned maxByteWidth (inRadix == 8 ? 4 : (inRadix == 10 ? 3 : (inRadix == 2 ? 8 : 2)));
397  const UByte * pBuffer (reinterpret_cast <const UByte *> (pInStartAddress));
398  const size_t asciiBufferSize (inShowAscii && inGroupsPerRow ? (inBytesPerGroup * inGroupsPerRow + 1) * sizeof (UByte) : 0); // Size in bytes, not chars
399  UByte * pAsciiBuffer (asciiBufferSize ? new UByte[asciiBufferSize / sizeof(UByte)] : AJA_NULL);
400 
401  if (!pInStartAddress)
402  return inOStream;
403 
404  if (pAsciiBuffer)
405  ::memset (pAsciiBuffer, 0, asciiBufferSize);
406 
407  if (inGroupsPerRow && inAddressRadix)
408  inOStream << print_address_offset (inAddressRadix, ULWord64(pBuffer) - ULWord64(pInStartAddress) + ULWord64(inAddrOffset));
409  while (bytesRemaining)
410  {
411  if (inRadix == 2)
412  inOStream << BIN08(*pBuffer);
413  else if (inRadix == 8)
414  inOStream << oOCT(uint16_t(*pBuffer));
415  else if (inRadix == 10)
416  inOStream << DEC0N(uint16_t(*pBuffer),maxByteWidth);
417  else if (inRadix == 16)
418  inOStream << HEX0N(uint16_t(*pBuffer),2);
419 
420  if (pAsciiBuffer)
421  pAsciiBuffer[groupsInThisRow * inBytesPerGroup + bytesInThisGroup] = isprint(*pBuffer) ? *pBuffer : '.';
422  pBuffer++;
423  bytesRemaining--;
424 
425  bytesInThisGroup++;
426  if (bytesInThisGroup >= inBytesPerGroup)
427  {
428  groupsInThisRow++;
429  if (inGroupsPerRow && groupsInThisRow >= inGroupsPerRow)
430  {
431  if (pAsciiBuffer)
432  {
433  inOStream << " " << pAsciiBuffer;
434  ::memset (pAsciiBuffer, 0, asciiBufferSize);
435  }
436  inOStream << endl;
437  if (inAddressRadix && bytesRemaining)
438  inOStream << print_address_offset (inAddressRadix, reinterpret_cast <ULWord64> (pBuffer) - reinterpret_cast <ULWord64> (pInStartAddress) + ULWord64 (inAddrOffset));
439  groupsInThisRow = 0;
440  } // if time for new row
441  else
442  inOStream << " ";
443  bytesInThisGroup = 0;
444  } // if time for new group
445  } // loop til no bytes remaining
446 
447  if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup && pAsciiBuffer)
448  {
449  groupsInThisRow++;
450  inOStream << string ((inBytesPerGroup - bytesInThisGroup) * maxByteWidth + 1, ' ');
451  }
452 
453  if (groupsInThisRow)
454  {
455  if (groupsInThisRow < inGroupsPerRow && pAsciiBuffer)
456  inOStream << string (((inGroupsPerRow - groupsInThisRow) * inBytesPerGroup * maxByteWidth + (inGroupsPerRow - groupsInThisRow)), ' ');
457  if (pAsciiBuffer)
458  inOStream << pAsciiBuffer;
459  inOStream << endl;
460  }
461  else if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup)
462  inOStream << endl;
463 
464  if (pAsciiBuffer)
465  delete [] pAsciiBuffer;
466  } // else radix is 16, 10, 8 or 2
467 
468  return inOStream;
469 } // Dump
470 
471 string & NTV2Buffer::Dump ( string & inOutputString,
472  const size_t inStartOffset,
473  const size_t inByteCount,
474  const size_t inRadix,
475  const size_t inBytesPerGroup,
476  const size_t inGroupsPerRow,
477  const size_t inAddressRadix,
478  const bool inShowAscii,
479  const size_t inAddrOffset) const
480 {
481  ostringstream oss;
482  Dump (oss, inStartOffset, inByteCount, inRadix, inBytesPerGroup, inGroupsPerRow, inAddressRadix, inShowAscii, inAddrOffset);
483  inOutputString = oss.str();
484  return inOutputString;
485 }
486 
487 NTV2Buffer & NTV2Buffer::Segment (NTV2Buffer & outPtr, const ULWord inByteOffset, const ULWord inByteCount) const
488 {
489  outPtr.Set(AJA_NULL, 0); // Make invalid
490  if (inByteOffset >= GetByteCount())
491  return outPtr; // Offset past end
492  if (inByteOffset+inByteCount > GetByteCount())
493  return outPtr; // Segment too long
494  outPtr.Set(GetHostAddress(inByteOffset), inByteCount);
495  return outPtr;
496 }
497 
498 
499 bool NTV2Buffer::GetU64s (ULWord64Sequence & outUint64s, const size_t inU64Offset, const size_t inMaxSize, const bool inByteSwap) const
500 {
501  outUint64s.clear();
502  if (IsNULL())
503  return false;
504 
505  size_t maxSize (size_t(GetByteCount()) / sizeof(uint64_t));
506  if (maxSize < inU64Offset)
507  return false; // Past end
508  maxSize -= inU64Offset; // Remove starting offset
509 
510  const uint64_t * pU64 (reinterpret_cast <const uint64_t *> (GetHostAddress(ULWord(inU64Offset * sizeof(uint64_t)))));
511  if (!pU64)
512  return false; // Past end
513 
514  if (inMaxSize && inMaxSize < maxSize)
515  maxSize = inMaxSize;
516 
517  try
518  {
519  outUint64s.reserve(maxSize);
520  for (size_t ndx(0); ndx < maxSize; ndx++)
521  {
522  const uint64_t u64 (*pU64++);
523  outUint64s.push_back(inByteSwap ? NTV2EndianSwap64(u64) : u64);
524  }
525  }
526  catch (...)
527  {
528  outUint64s.clear();
529  outUint64s.reserve(0);
530  return false;
531  }
532  return true;
533 }
534 
535 
536 bool NTV2Buffer::GetU32s (ULWordSequence & outUint32s, const size_t inU32Offset, const size_t inMaxSize, const bool inByteSwap) const
537 {
538  outUint32s.clear();
539  if (IsNULL())
540  return false;
541 
542  size_t maxNumU32s (size_t(GetByteCount()) / sizeof(uint32_t));
543  if (maxNumU32s < inU32Offset)
544  return false; // Past end
545  maxNumU32s -= inU32Offset; // Remove starting offset
546 
547  const uint32_t * pU32 (reinterpret_cast<const uint32_t*>(GetHostAddress(ULWord(inU32Offset * sizeof(uint32_t)))));
548  if (!pU32)
549  return false; // Past end
550 
551  if (inMaxSize && inMaxSize < maxNumU32s)
552  maxNumU32s = inMaxSize;
553 
554  try
555  {
556  outUint32s.reserve(maxNumU32s);
557  for (size_t ndx(0); ndx < maxNumU32s; ndx++)
558  {
559  const uint32_t u32 (*pU32++);
560  outUint32s.push_back(inByteSwap ? NTV2EndianSwap32(u32) : u32);
561  }
562  }
563  catch (...)
564  {
565  outUint32s.clear();
566  outUint32s.reserve(0);
567  return false;
568  }
569  return true;
570 }
571 
572 
573 bool NTV2Buffer::GetU16s (UWordSequence & outUint16s, const size_t inU16Offset, const size_t inMaxSize, const bool inByteSwap) const
574 {
575  outUint16s.clear();
576  if (IsNULL())
577  return false;
578 
579  size_t maxSize (size_t(GetByteCount()) / sizeof(uint16_t));
580  if (maxSize < inU16Offset)
581  return false; // Past end
582  maxSize -= inU16Offset; // Remove starting offset
583 
584  const uint16_t * pU16 (reinterpret_cast <const uint16_t *> (GetHostAddress(ULWord(inU16Offset * sizeof(uint16_t)))));
585  if (!pU16)
586  return false; // Past end
587 
588  if (inMaxSize && inMaxSize < maxSize)
589  maxSize = inMaxSize;
590 
591  try
592  {
593  outUint16s.reserve(maxSize);
594  for (size_t ndx(0); ndx < maxSize; ndx++)
595  {
596  const uint16_t u16 (*pU16++);
597  outUint16s.push_back(inByteSwap ? NTV2EndianSwap16(u16) : u16);
598  }
599  }
600  catch (...)
601  {
602  outUint16s.clear();
603  outUint16s.reserve(0);
604  return false;
605  }
606  return true;
607 }
608 
609 
610 bool NTV2Buffer::GetU8s (UByteSequence & outUint8s, const size_t inU8Offset, const size_t inMaxSize) const
611 {
612  outUint8s.clear();
613  if (IsNULL())
614  return false;
615 
616  size_t maxSize (GetByteCount());
617  if (maxSize < inU8Offset)
618  return false; // Past end
619  maxSize -= inU8Offset; // Remove starting offset
620 
621  const uint8_t * pU8 (reinterpret_cast <const uint8_t *> (GetHostAddress(ULWord(inU8Offset))));
622  if (!pU8)
623  return false; // Past end
624 
625  if (inMaxSize && inMaxSize < maxSize)
626  maxSize = inMaxSize;
627 
628  try
629  {
630  outUint8s.reserve(maxSize);
631  for (size_t ndx(0); ndx < maxSize; ndx++)
632  outUint8s.push_back(*pU8++);
633  }
634  catch (...)
635  {
636  outUint8s.clear();
637  outUint8s.reserve(0);
638  return false;
639  }
640  return true;
641 }
642 
644 {
645  const uint8_t * pU8 (reinterpret_cast<const uint8_t*> (GetHostPointer()));
646  if (!pU8)
647  return false; // Past end
648  const size_t maxSize (GetByteCount());
649  try
650  {
651  for (size_t ndx(0); ndx < maxSize; ndx++)
652  outU8s.push_back(*pU8++);
653  }
654  catch (...)
655  {
656  return false;
657  }
658  return true;
659 }
660 
661 
662 bool NTV2Buffer::GetString (std::string & outString, const size_t inU8Offset, const size_t inMaxSize) const
663 {
664  outString.clear();
665  if (IsNULL())
666  return false;
667 
668  size_t maxSize(GetByteCount());
669  if (maxSize < inU8Offset)
670  return false; // Past end
671  maxSize -= inU8Offset; // Remove starting offset
672 
673  const uint8_t * pU8 (reinterpret_cast <const uint8_t *> (GetHostAddress(ULWord(inU8Offset))));
674  if (!pU8)
675  return false; // Past end
676 
677  if (inMaxSize && inMaxSize < maxSize)
678  maxSize = inMaxSize;
679 
680  try
681  {
682  outString.reserve(maxSize);
683  for (size_t ndx(0); ndx < maxSize; ndx++)
684  {
685  const char c = *pU8++;
686  if (c)
687  outString += c;
688  else
689  break;
690  }
691  }
692  catch (...)
693  {
694  outString.clear();
695  outString.reserve(0);
696  return false;
697  }
698  return true;
699 }
700 
701 
702 bool NTV2Buffer::PutU64s (const ULWord64Sequence & inU64s, const size_t inU64Offset, const bool inByteSwap)
703 {
704  if (IsNULL())
705  return false; // No buffer or space
706  if (inU64s.empty())
707  return true; // Nothing to copy
708 
709  size_t maxU64s (GetByteCount() / sizeof(uint64_t));
710  uint64_t * pU64 (reinterpret_cast<uint64_t*>(GetHostAddress(ULWord(inU64Offset * sizeof(uint64_t)))));
711  if (!pU64)
712  return false; // Start offset is past end
713  if (maxU64s > inU64Offset)
714  maxU64s -= inU64Offset; // Don't go past end
715  if (maxU64s > inU64s.size())
716  maxU64s = inU64s.size(); // Truncate incoming vector to not go past my end
717  if (inU64s.size() > maxU64s)
718  return false; // Will write past end
719 
720  for (unsigned ndx(0); ndx < maxU64s; ndx++)
721 #if defined(_DEBUG)
722  *pU64++ = inByteSwap ? NTV2EndianSwap64(inU64s.at(ndx)) : inU64s.at(ndx);
723 #else
724  *pU64++ = inByteSwap ? NTV2EndianSwap64(inU64s[ndx]) : inU64s[ndx];
725 #endif
726  return true;
727 }
728 
729 
730 bool NTV2Buffer::PutU32s (const ULWordSequence & inU32s, const size_t inU32Offset, const bool inByteSwap)
731 {
732  if (IsNULL())
733  return false; // No buffer or space
734  if (inU32s.empty())
735  return true; // Nothing to copy
736 
737  size_t maxU32s (GetByteCount() / sizeof(uint32_t));
738  uint32_t * pU32 (reinterpret_cast<uint32_t*>(GetHostAddress(ULWord(inU32Offset * sizeof(uint32_t)))));
739  if (!pU32)
740  return false; // Start offset is past end
741  if (maxU32s > inU32Offset)
742  maxU32s -= inU32Offset; // Don't go past end
743  if (maxU32s > inU32s.size())
744  maxU32s = inU32s.size(); // Truncate incoming vector to not go past my end
745  if (inU32s.size() > maxU32s)
746  return false; // Will write past end
747 
748  for (unsigned ndx(0); ndx < maxU32s; ndx++)
749 #if defined(_DEBUG)
750  *pU32++ = inByteSwap ? NTV2EndianSwap32(inU32s.at(ndx)) : inU32s.at(ndx);
751 #else
752  *pU32++ = inByteSwap ? NTV2EndianSwap32(inU32s[ndx]) : inU32s[ndx];
753 #endif
754  return true;
755 }
756 
757 
758 bool NTV2Buffer::PutU16s (const UWordSequence & inU16s, const size_t inU16Offset, const bool inByteSwap)
759 {
760  if (IsNULL())
761  return false; // No buffer or space
762  if (inU16s.empty())
763  return true; // Nothing to copy
764 
765  size_t maxU16s (GetByteCount() / sizeof(uint16_t));
766  uint16_t * pU16 (reinterpret_cast<uint16_t*>(GetHostAddress(ULWord(inU16Offset * sizeof(uint16_t)))));
767  if (!pU16)
768  return false; // Start offset is past end
769  if (maxU16s > inU16Offset)
770  maxU16s -= inU16Offset; // Don't go past end
771  if (maxU16s > inU16s.size())
772  maxU16s = inU16s.size(); // Truncate incoming vector to not go past my end
773  if (inU16s.size() > maxU16s)
774  return false; // Will write past end
775 
776  for (unsigned ndx(0); ndx < maxU16s; ndx++)
777 #if defined(_DEBUG)
778  *pU16++ = inByteSwap ? NTV2EndianSwap16(inU16s.at(ndx)) : inU16s.at(ndx);
779 #else
780  *pU16++ = inByteSwap ? NTV2EndianSwap16(inU16s[ndx]) : inU16s[ndx];
781 #endif
782  return true;
783 }
784 
785 
786 bool NTV2Buffer::PutU8s (const UByteSequence & inU8s, const size_t inU8Offset)
787 {
788  if (IsNULL())
789  return false; // No buffer or space
790  if (inU8s.empty())
791  return true; // Nothing to copy
792 
793  size_t maxU8s (GetByteCount());
794  uint8_t * pU8 (reinterpret_cast<uint8_t*>(GetHostAddress(ULWord(inU8Offset))));
795  if (!pU8)
796  return false; // Start offset is past end
797  if (maxU8s > inU8Offset)
798  maxU8s -= inU8Offset; // Don't go past end
799  if (maxU8s > inU8s.size())
800  maxU8s = inU8s.size(); // Truncate incoming vector to not go past end
801  if (inU8s.size() > maxU8s)
802  return false; // Will write past end
803 #if 1
804  ::memcpy(pU8, &inU8s[0], maxU8s);
805 #else
806  for (unsigned ndx(0); ndx < maxU8s; ndx++)
807  #if defined(_DEBUG)
808  *pU8++ = inU8s.at(ndx);
809  #else
810  *pU8++ = inU8s[ndx];
811  #endif
812 #endif
813  return true;
814 }
815 
816 
817 ostream & operator << (ostream & inOutStream, const NTV2_RP188 & inObj)
818 {
819  if (inObj.IsValid ())
820  return inOutStream << "{Dx" << HEX0N(inObj.fDBB,8) << "|Lx" << HEX0N(inObj.fLo,8) << "|Hx" << HEX0N(inObj.fHi,8) << "}";
821  else
822  return inOutStream << "{invalid}";
823 }
824 
825 
827 {
828  inOutList.push_back (inRP188);
829  return inOutList;
830 }
831 
832 
833 ostream & operator << (ostream & inOutStream, const NTV2TimeCodeList & inObj)
834 {
835  inOutStream << inObj.size () << ":[";
836  for (NTV2TimeCodeListConstIter iter (inObj.begin ()); iter != inObj.end (); )
837  {
838  inOutStream << *iter;
839  if (++iter != inObj.end ())
840  inOutStream << ", ";
841  }
842  return inOutStream << "]";
843 }
844 
845 
846 ostream & operator << (std::ostream & inOutStream, const NTV2TimeCodes & inObj)
847 {
848  inOutStream << inObj.size () << ":[";
849  for (NTV2TimeCodesConstIter iter (inObj.begin ()); iter != inObj.end (); )
850  {
851  inOutStream << ::NTV2TCIndexToString (iter->first,true) << "=" << iter->second;
852  if (++iter != inObj.end ())
853  inOutStream << ", ";
854  }
855  return inOutStream << "]";
856 }
857 
858 
859 ostream & operator << (std::ostream & inOutStream, const NTV2TCIndexes & inObj)
860 {
861  for (NTV2TCIndexesConstIter iter (inObj.begin ()); iter != inObj.end (); )
862  {
863  inOutStream << ::NTV2TCIndexToString (*iter);
864  if (++iter != inObj.end ())
865  inOutStream << ", ";
866  }
867  return inOutStream;
868 }
869 
870 
872 {
873  for (NTV2TCIndexesConstIter iter (inSet.begin ()); iter != inSet.end (); ++iter)
874  inOutSet.insert (*iter);
875  return inOutSet;
876 }
877 
878 
879 ostream & operator << (ostream & inOutStream, const FRAME_STAMP & inObj)
880 {
881  return inOutStream << inObj.acHeader
882  << " frmTime=" << inObj.acFrameTime
883  << " reqFrm=" << inObj.acRequestedFrame
884  << " audClkTS=" << inObj.acAudioClockTimeStamp
885  << " audExpAdr=" << hex << inObj.acAudioExpectedAddress << dec
886  << " audInStrtAdr=" << hex << inObj.acAudioInStartAddress << dec
887  << " audInStopAdr=" << hex << inObj.acAudioInStopAddress << dec
888  << " audOutStrtAdr=" << hex << inObj.acAudioOutStartAddress << dec
889  << " audOutStopAdr=" << hex << inObj.acAudioOutStopAddress << dec
890  << " totBytes=" << inObj.acTotalBytesTransferred
891  << " strtSamp=" << inObj.acStartSample
892  << " curTime=" << inObj.acCurrentTime
893  << " curFrm=" << inObj.acCurrentFrame
894  << " curFrmTime=" << inObj.acCurrentFrameTime
895  << " audClkCurTime=" << inObj.acAudioClockCurrentTime
896  << " curAudExpAdr=" << hex << inObj.acCurrentAudioExpectedAddress << dec
897  << " curAudStrtAdr=" << hex << inObj.acCurrentAudioStartAddress << dec
898  << " curFldCnt=" << inObj.acCurrentFieldCount
899  << " curLnCnt=" << inObj.acCurrentLineCount
900  << " curReps=" << inObj.acCurrentReps
901  << " curUsrCookie=" << hex << inObj.acCurrentUserCookie << dec
902  << " acFrame=" << inObj.acFrame
903  << " acRP188=" << inObj.acRP188 // deprecated
904  << " " << inObj.acTrailer;
905 }
906 
907 
908 ostream & operator << (ostream & inOutStream, const NTV2SegmentedDMAInfo & inObj)
909 {
910  if (inObj.acNumSegments > 1)
911  inOutStream << "segs=" << inObj.acNumSegments << " numActBPR=" << inObj.acNumActiveBytesPerRow
912  << " segHostPitc=" << inObj.acSegmentHostPitch << " segDevPitc=" << inObj.acSegmentDevicePitch;
913  else
914  inOutStream << "n/a";
915  return inOutStream;
916 }
917 
918 
919 ostream & operator << (ostream & inOutStream, const AUTOCIRCULATE_TRANSFER & inObj)
920 {
921  #if defined (_DEBUG)
922  NTV2_ASSERT (inObj.NTV2_IS_STRUCT_VALID ());
923  #endif
924  string str (::NTV2FrameBufferFormatToString (inObj.acFrameBufferFormat, true));
925  while (str.find (' ') != string::npos)
926  str.erase (str.find (' '), 1);
927  inOutStream << inObj.acHeader << " vid=" << inObj.acVideoBuffer
928  << " aud=" << inObj.acAudioBuffer
929  << " ancF1=" << inObj.acANCBuffer
930  << " ancF2=" << inObj.acANCField2Buffer
931  << " outTC(" << inObj.acOutputTimeCodes << ")"
932  << " cookie=" << inObj.acInUserCookie
933  << " vidDMAoff=" << inObj.acInVideoDMAOffset
934  << " segDMA=" << inObj.acInSegmentedDMAInfo
935  << " colcor=" << inObj.acColorCorrection
936  << " fbf=" << str
937  << " fbo=" << (inObj.acFrameBufferOrientation == NTV2_FRAMEBUFFER_ORIENTATION_BOTTOMUP ? "flip" : "norm")
938  << " vidProc=" << inObj.acVidProcInfo
939  << " quartsz=" << inObj.acVideoQuarterSizeExpand
940  << " p2p=" << inObj.acPeerToPeerFlags
941  << " repCnt=" << inObj.acFrameRepeatCount
942  << " desFrm=" << inObj.acDesiredFrame
943  << " rp188=" << inObj.acRP188 // deprecated
944  << " xpt=" << inObj.acCrosspoint
945  << " status{" << inObj.acTransferStatus << "}"
946  << " " << inObj.acTrailer;
947  return inOutStream;
948 }
949 
950 
951 ostream & operator << (ostream & inOutStream, const AUTOCIRCULATE_TRANSFER_STATUS & inObj)
952 {
953  inOutStream << inObj.acHeader << " state=" << ::NTV2AutoCirculateStateToString (inObj.acState)
954  << " xferFrm=" << inObj.acTransferFrame
955  << " bufLvl=" << inObj.acBufferLevel
956  << " frms=" << inObj.acFramesProcessed
957  << " drops=" << inObj.acFramesDropped
958  << " " << inObj.acFrameStamp
959  << " audXfrSz=" << inObj.acAudioTransferSize
960  << " audStrtSamp=" << inObj.acAudioStartSample
961  << " ancF1Siz=" << inObj.acAncTransferSize
962  << " ancF2Siz=" << inObj.acAncField2TransferSize
963  << " " << inObj.acTrailer;
964  return inOutStream;
965 }
966 
967 
968 ostream & operator << (ostream & inOutStream, const NTV2RegisterValueMap & inObj)
969 {
970  NTV2RegValueMapConstIter iter (inObj.begin ());
971  inOutStream << "RegValues:" << inObj.size () << "[";
972  while (iter != inObj.end ())
973  {
974  const NTV2RegisterNumber registerNumber (static_cast <NTV2RegisterNumber> (iter->first));
975  const ULWord registerValue (iter->second);
976  inOutStream << ::NTV2RegisterNumberToString (registerNumber) << "=0x" << hex << registerValue << dec;
977  if (++iter != inObj.end ())
978  inOutStream << ",";
979  }
980  return inOutStream << "]";
981 }
982 
983 
984 ostream & operator << (ostream & inOutStream, const AutoCircVidProcInfo & inObj)
985 {
986  return inOutStream << "{mode=" << ::AutoCircVidProcModeToString (inObj.mode, true)
987  << ", FGvid=" << ::NTV2CrosspointToString (inObj.foregroundVideoCrosspoint)
988  << ", BGvid=" << ::NTV2CrosspointToString (inObj.backgroundVideoCrosspoint)
989  << ", FGkey=" << ::NTV2CrosspointToString (inObj.foregroundKeyCrosspoint)
990  << ", BGkey=" << ::NTV2CrosspointToString (inObj.backgroundKeyCrosspoint)
991  << ", transCoeff=" << inObj.transitionCoefficient
992  << ", transSoftn=" << inObj.transitionSoftness << "}";
993 }
994 
995 
996 ostream & operator << (ostream & inOutStream, const NTV2ColorCorrectionData & inObj)
997 {
998  return inOutStream << "{ccMode=" << ::NTV2ColorCorrectionModeToString (inObj.ccMode)
999  << ", ccSatVal=" << inObj.ccSaturationValue
1000  << ", ccTables=" << inObj.ccLookupTables << "}";
1001 }
1002 
1003 
1004 // Implementation of NTV2VideoFormatSet's ostream writer...
1005 ostream & operator << (ostream & inOStream, const NTV2VideoFormatSet & inFormats)
1006 {
1007  NTV2VideoFormatSet::const_iterator iter (inFormats.begin ());
1008 
1009  inOStream << inFormats.size ()
1010  << (inFormats.size () == 1 ? " video format: " : " video format(s): ");
1011 
1012  while (iter != inFormats.end ())
1013  {
1014  inOStream << std::string (::NTV2VideoFormatToString (*iter));
1015  inOStream << (++iter == inFormats.end () ? "" : ", ");
1016  }
1017 
1018  return inOStream;
1019 
1020 } // operator <<
1021 
1022 
1023 // Implementation of NTV2FrameBufferFormatSet's ostream writer...
1024 ostream & operator << (ostream & inOStream, const NTV2PixelFormats & inFormats)
1025 {
1026  NTV2PixelFormatsConstIter iter(inFormats.begin());
1027  inOStream << inFormats.size()
1028  << (inFormats.size() == 1 ? " pixel format: " : " pixel formats: ");
1029 
1030  while (iter != inFormats.end())
1031  {
1032  inOStream << ::NTV2FrameBufferFormatToString(*iter);
1033  inOStream << (++iter == inFormats.end() ? "" : ", ");
1034  }
1035  return inOStream;
1036 
1037 } // operator <<
1038 
1039 
1041 {
1042  for (NTV2PixelFormatsConstIter iter(inFBFs.begin()); iter != inFBFs.end(); ++iter)
1043  inOutSet.insert(*iter);
1044  return inOutSet;
1045 }
1046 
1047 
1048 // Implementation of NTV2StandardSet's ostream writer...
1049 ostream & operator << (ostream & inOStream, const NTV2StandardSet & inStandards)
1050 {
1051  NTV2StandardSetConstIter iter (inStandards.begin ());
1052 
1053  inOStream << inStandards.size ()
1054  << (inStandards.size () == 1 ? " standard: " : " standards: ");
1055 
1056  while (iter != inStandards.end ())
1057  {
1058  inOStream << ::NTV2StandardToString(*iter);
1059  inOStream << (++iter == inStandards.end () ? "" : ", ");
1060  }
1061 
1062  return inOStream;
1063 }
1064 
1065 
1067 {
1068  for (NTV2StandardSetConstIter iter(inSet.begin ()); iter != inSet.end(); ++iter)
1069  inOutSet.insert(*iter);
1070  return inOutSet;
1071 }
1072 
1073 
1074 // Implementation of NTV2GeometrySet's ostream writer...
1075 ostream & operator << (ostream & inOStream, const NTV2GeometrySet & inGeometries)
1076 {
1077  NTV2GeometrySetConstIter iter (inGeometries.begin ());
1078  inOStream << inGeometries.size ()
1079  << (inGeometries.size () == 1 ? " geometry: " : " geometries: ");
1080  while (iter != inGeometries.end ())
1081  {
1082  inOStream << ::NTV2FrameGeometryToString(*iter);
1083  inOStream << (++iter == inGeometries.end () ? "" : ", ");
1084  }
1085  return inOStream;
1086 }
1087 
1088 
1090 {
1091  for (NTV2GeometrySetConstIter iter(inSet.begin ()); iter != inSet.end(); ++iter)
1092  inOutSet.insert(*iter);
1093  return inOutSet;
1094 }
1095 
1096 
1097 // Implementation of NTV2FrameBufferFormatSet's ostream writer...
1098 ostream & operator << (ostream & inOStream, const NTV2InputSourceSet & inSet)
1099 {
1100  NTV2InputSourceSetConstIter iter(inSet.begin());
1101  inOStream << inSet.size()
1102  << (inSet.size() == 1 ? " input: " : " inputs: ");
1103  while (iter != inSet.end())
1104  {
1105  inOStream << ::NTV2InputSourceToString (*iter);
1106  inOStream << (++iter == inSet.end() ? "" : ", ");
1107  }
1108  return inOStream;
1109 } // operator <<
1110 
1111 
1113 {
1114  for (NTV2InputSourceSetConstIter iter (inSet.begin ()); iter != inSet.end (); ++iter)
1115  inOutSet.insert (*iter);
1116  return inOutSet;
1117 }
1118 
1119 
1120 ostream & operator << (ostream & inOStream, const NTV2OutputDestinations & inSet)
1121 {
1122  NTV2OutputDestinationsConstIter iter(inSet.begin());
1123  inOStream << inSet.size()
1124  << (inSet.size() == 1 ? " output: " : " outputs: ");
1125  while (iter != inSet.end())
1126  {
1127  inOStream << ::NTV2OutputDestinationToString(*iter);
1128  inOStream << (++iter == inSet.end() ? "" : ", ");
1129  }
1130  return inOStream;
1131 }
1132 
1133 
1135 {
1136  for (NTV2OutputDestinationsConstIter iter(inSet.begin()); iter != inSet.end(); ++iter)
1137  inOutSet.insert(*iter);
1138  return inOutSet;
1139 }
1140 
1142 {
1143  outFormats.clear();
1144  const NTV2DeviceIDSet devIDs (::NTV2GetSupportedDevices());
1145  for (NTV2DeviceIDSetConstIter it(devIDs.begin()); it != devIDs.end(); ++it)
1146  {
1147  NTV2PixelFormats fmts;
1149  for (NTV2PixelFormatsConstIter fit(fmts.begin()); fit != fmts.end(); ++fit)
1150  if (outFormats.find(*fit) == outFormats.end())
1151  outFormats.insert(*fit);
1152  }
1153  return true;
1154 }
1155 
1157 {
1158  NTV2PixelFormats usedFormats;
1159  ::NTV2GetSupportedPixelFormats(usedFormats);
1160  for (NTV2PixelFormat pf(NTV2_FBF_FIRST); pf < NTV2_FBF_LAST; pf = NTV2PixelFormat(pf+1))
1161  if (usedFormats.find(pf) == usedFormats.end()) // if unused
1162  outFormats.insert(pf);
1163  return true;
1164 }
1165 
1167 {
1168  outStandards.clear();
1169  const NTV2DeviceIDSet devIDs (::NTV2GetSupportedDevices());
1170  for (NTV2DeviceIDSetConstIter it(devIDs.begin()); it != devIDs.end(); ++it)
1171  {
1172  NTV2StandardSet stds;
1174  for (NTV2StandardSetConstIter sit(stds.begin()); sit != stds.end(); ++sit)
1175  if (outStandards.find(*sit) == outStandards.end())
1176  outStandards.insert(*sit);
1177  }
1178  return true;
1179 }
1180 
1182 {
1183  NTV2StandardSet usedStandards;
1184  ::NTV2GetSupportedStandards(usedStandards);
1186  if (usedStandards.find(st) == usedStandards.end()) // if unused
1187  outStandards.insert(st);
1188  return true;
1189 }
1190 
1191 
1192 // This needs to be moved into a C++ compatible "device features" module:
1194 {
1195  bool isOkay(true);
1196  outFormats.clear();
1197 
1199  {
1200  if (inDeviceID != DEVICE_ID_INVALID && !::NTV2DeviceCanDoVideoFormat(inDeviceID, vf))
1201  continue; // Valid devID specified and VF not supported on that device
1202  if (inDeviceID == DEVICE_ID_INVALID && !NTV2_IS_VALID_VIDEO_FORMAT(vf))
1203  continue; // Invalid devID specified and invalid VF
1204  try
1205  {
1206  outFormats.insert(vf);
1207  }
1208  catch (const std::bad_alloc &)
1209  {
1210  isOkay = false;
1211  outFormats.clear();
1212  break;
1213  }
1214  } // for each video format
1215 
1216  NTV2_ASSERT ((isOkay && !outFormats.empty()) || (!isOkay && outFormats.empty()));
1217  return isOkay;
1218 
1219 } // NTV2DeviceGetSupportedVideoFormats
1220 
1221 // This needs to be moved into a C++ compatible "device features" module:
1223 {
1224  bool isOkay(true);
1225  outFormats.clear();
1226 
1227  for (NTV2PixelFormat pixelFormat(NTV2_FBF_FIRST); pixelFormat < NTV2_FBF_LAST; pixelFormat = NTV2PixelFormat(pixelFormat+1))
1228  if (::NTV2DeviceCanDoFrameBufferFormat (inDeviceID, pixelFormat))
1229  try
1230  {
1231  outFormats.insert(pixelFormat);
1232  }
1233  catch (const std::bad_alloc &)
1234  {
1235  isOkay = false;
1236  outFormats.clear();
1237  break;
1238  }
1239 
1240  NTV2_ASSERT ((isOkay && !outFormats.empty() ) || (!isOkay && outFormats.empty() ));
1241  return isOkay;
1242 
1243 } // NTV2DeviceGetSupportedPixelFormats
1244 
1245 // This needs to be moved into a C++ compatible "device features" module:
1246 bool NTV2DeviceGetSupportedStandards (const NTV2DeviceID inDeviceID, NTV2StandardSet & outStandards)
1247 {
1248  NTV2VideoFormatSet videoFormats;
1249  outStandards.clear();
1250  if (!::NTV2DeviceGetSupportedVideoFormats(inDeviceID, videoFormats))
1251  return false;
1252  for (NTV2VideoFormatSetConstIter it(videoFormats.begin()); it != videoFormats.end(); ++it)
1253  {
1255  if (NTV2_IS_VALID_STANDARD(std) && outStandards.find(std) == outStandards.end())
1256  outStandards.insert(std);
1257  }
1258  return true;
1259 }
1260 
1261 // This needs to be moved into a C++ compatible "device features" module:
1262 bool NTV2DeviceGetSupportedGeometries (const NTV2DeviceID inDeviceID, NTV2GeometrySet & outGeometries)
1263 {
1264  NTV2VideoFormatSet videoFormats;
1265  outGeometries.clear();
1266  if (!::NTV2DeviceGetSupportedVideoFormats(inDeviceID, videoFormats))
1267  return false;
1268  for (NTV2VideoFormatSetConstIter it(videoFormats.begin()); it != videoFormats.end(); ++it)
1269  {
1272  outGeometries += ::GetRelatedGeometries(fg);
1273  }
1274  return true;
1275 }
1276 
1277 bool NTV2DeviceGetSupportedInputSources (const NTV2DeviceID inDeviceID, NTV2InputSourceSet & outInputSources, const NTV2IOKinds inKinds)
1278 {
1279  outInputSources.clear();
1280  if (!NTV2_IS_VALID_IOKINDS(inKinds))
1281  return false;
1283  { const bool ok (inDeviceID == DEVICE_ID_INVALID ? true : ::NTV2DeviceCanDoInputSource(inDeviceID, src));
1284  if (ok)
1285  if ( (NTV2_INPUT_SOURCE_IS_SDI(src) && (inKinds & NTV2_IOKINDS_SDI))
1286  || (NTV2_INPUT_SOURCE_IS_HDMI(src) && (inKinds & NTV2_IOKINDS_HDMI))
1287  || (NTV2_INPUT_SOURCE_IS_ANALOG(src) && (inKinds & NTV2_IOKINDS_ANALOG)) )
1288  outInputSources.insert(src);
1289  }
1290  return true;
1291 }
1292 
1293 bool NTV2DeviceGetSupportedOutputDests (const NTV2DeviceID inDeviceID, NTV2OutputDestinations & outOutputDests, const NTV2IOKinds inKinds)
1294 {
1298  outOutputDests.clear();
1299  if (!NTV2_IS_VALID_IOKINDS(inKinds))
1300  return false;
1301  for (size_t ndx(0); ndx < 10; ndx++)
1302  { const NTV2OutputDest dst(sDsts[ndx]);
1303  const bool ok (inDeviceID == DEVICE_ID_INVALID ? true : ::NTV2DeviceCanDoOutputDestination(inDeviceID, dst));
1304  if (ok)
1305  if ( (NTV2_OUTPUT_DEST_IS_SDI(dst) && (inKinds & NTV2_IOKINDS_SDI))
1306  || (NTV2_OUTPUT_DEST_IS_HDMI(dst) && (inKinds & NTV2_IOKINDS_HDMI))
1307  || (NTV2_OUTPUT_DEST_IS_ANALOG(dst) && (inKinds & NTV2_IOKINDS_ANALOG)) )
1308  outOutputDests.insert(dst);
1309  }
1310  return true;
1311 }
1312 
1313 ostream & operator << (ostream & oss, const NTV2FrameRateSet & inSet)
1314 {
1315  NTV2FrameRateSetConstIter it(inSet.begin());
1316  oss << inSet.size()
1317  << (inSet.size() == 1 ? " rate: " : " rates: ");
1318  while (it != inSet.end())
1319  {
1320  oss << ::NTV2FrameRateToString(*it);
1321  oss << (++it == inSet.end() ? "" : ", ");
1322  }
1323  return oss;
1324 }
1325 
1327 {
1328  for (NTV2FrameRateSetConstIter it(inSet.begin()); it != inSet.end(); ++it)
1329  if (inOutSet.find(*it) == inOutSet.end())
1330  inOutSet.insert(*it);
1331  return inOutSet;
1332 }
1333 
1335 {
1336  outRates.clear();
1337  NTV2VideoFormatSet vfs;
1338  if (!::NTV2DeviceGetSupportedVideoFormats (inDeviceID, vfs))
1339  return false;
1340  for (NTV2VideoFormatSetConstIter it(vfs.begin()); it != vfs.end(); ++it)
1341  { const NTV2FrameRate fr (::GetNTV2FrameRateFromVideoFormat(*it));
1343  outRates.insert(fr);
1344  }
1345  return true;
1346 }
1347 
1348 
1349 ostream & operator << (ostream & inOutStrm, const NTV2SegmentedXferInfo & inRun)
1350 {
1351  return inRun.Print(inOutStrm);
1352 }
1353 
1354 
1355 // Implementation of NTV2AutoCirculateStateToString...
1357 {
1358  static const char * sStateStrings [] = { "Disabled", "Initializing", "Starting", "Paused", "Stopping", "Running", "StartingAtTime", AJA_NULL};
1360  return string (sStateStrings [inState]);
1361  else
1362  return "<invalid>";
1363 }
1364 
1365 
1366 
1369  fTrailerTag (NTV2_TRAILER_TAG)
1370 {
1371 }
1372 
1373 
1374 static const string sSegXferUnits[] = {"", " U8", " U16", "", " U32", "", "", "", " U64", ""};
1375 
1376 ostream & NTV2SegmentedXferInfo::Print (ostream & inStrm, const bool inDumpSegments) const
1377 {
1378  if (!isValid())
1379  return inStrm << "(invalid)";
1380  if (inDumpSegments)
1381  {
1382  // TBD
1383  }
1384  else
1385  {
1386  inStrm << DEC(getSegmentCount()) << " x " << DEC(getSegmentLength())
1387  << sSegXferUnits[getElementLength()] << " segs";
1388  if (getSourceOffset())
1389  inStrm << " srcOff=" << xHEX0N(getSourceOffset(),8);
1390  if (getSegmentCount() > 1)
1391  inStrm << " srcSpan=" << xHEX0N(getSourcePitch(),8) << (isSourceBottomUp()?" VF":"");
1392  if (getDestOffset())
1393  inStrm << " dstOff=" << xHEX0N(getDestOffset(),8);
1394  if (getSegmentCount() > 1)
1395  inStrm << " dstSpan=" << xHEX0N(getDestPitch(),8) << (isDestBottomUp()?" VF":"");
1396  inStrm << " totElm=" << DEC(getTotalElements()) << " totByt=" << xHEX0N(getTotalBytes(),8);
1397  }
1398  return inStrm;
1399 }
1400 
1401 string NTV2SegmentedXferInfo::getSourceCode (const bool inInclDecl) const
1402 {
1403  static string var("segInfo");
1404  ostringstream oss;
1405  string units("\t// bytes");
1406  if (!isValid())
1407  return "";
1408  if (inInclDecl)
1409  oss << "NTV2SegmentedXferInfo " << var << ";" << endl;
1410  if (getElementLength() > 1)
1411  {
1412  units = "\t// " + sSegXferUnits[getElementLength()] + "s";
1413  oss << var << ".setElementLength(" << getElementLength() << ");" << endl;
1414  }
1415  oss << var << ".setSegmentCount(" << DEC(getSegmentCount()) << ");" << endl;
1416  oss << var << ".setSegmentLength(" << DEC(getSegmentLength()) << ");" << units << endl;
1417  if (getSourceOffset())
1418  oss << var << ".setSourceOffset(" << DEC(getSourceOffset()) << ");" << units << endl;
1419  oss << var << ".setSourcePitch(" << DEC(getSourcePitch()) << ");" << units << endl;
1420  if (isSourceBottomUp())
1421  oss << var << ".setSourceDirection(false);" << endl;
1422  if (getDestOffset())
1423  oss << var << ".setDestOffset(" << DEC(getDestOffset()) << ");" << units << endl;
1424  if (getDestPitch())
1425  oss << var << ".setDestPitch(" << DEC(getDestPitch()) << ");" << units << endl;
1426  if (isDestBottomUp())
1427  oss << var << ".setDestDirection(false);" << endl;
1428  return oss.str();
1429 }
1430 
1431 bool NTV2SegmentedXferInfo::containsElementAtOffset (const ULWord inElementOffset) const
1432 {
1433  if (!isValid())
1434  return false;
1435  if (getSegmentCount() == 1)
1436  {
1437  if (inElementOffset >= getSourceOffset())
1438  if (inElementOffset < getSourceOffset()+getSegmentLength())
1439  return true;
1440  return false;
1441  }
1442  ULWord offset(getSourceOffset());
1443  for (ULWord seg(0); seg < getSegmentCount(); seg++)
1444  {
1445  if (inElementOffset < offset)
1446  return false; // past element of interest already
1447  if (inElementOffset < offset+getSegmentLength())
1448  return true; // must be within this segment
1449  offset += getSourcePitch(); // skip to next segment
1450  }
1451  return false;
1452 }
1453 
1455 {
1456  if (getElementLength() != inRHS.getElementLength())
1457  // FUTURE TBD: Need to transform RHS to match ElementLength so as to make apples-to-apples comparison
1458  return true; // For now, fail
1459  if (getSegmentCount() != inRHS.getSegmentCount())
1460  return true;
1461  if (getSegmentLength() != inRHS.getSegmentLength())
1462  return true;
1463  if (getSourceOffset() != inRHS.getSourceOffset())
1464  return true;
1465  if (getSourcePitch() != inRHS.getSourcePitch())
1466  return true;
1467  if (getDestOffset() != inRHS.getDestOffset())
1468  return true;
1469  if (getDestPitch() != inRHS.getDestPitch())
1470  return true;
1471  return false;
1472 }
1473 
1475 {
1476  mFlags = 0;
1477  mNumSegments = 0;
1478  mElementsPerSegment = 0;
1479  mInitialSrcOffset = 0;
1480  mInitialDstOffset = 0;
1481  mSrcElementsPerRow = 0;
1482  mDstElementsPerRow = 0;
1483  setElementLength(1); // elements == bytes
1484  return *this;
1485 }
1486 
1488 {
1489  std::swap(mSrcElementsPerRow, mDstElementsPerRow);
1490  std::swap(mInitialSrcOffset, mInitialDstOffset);
1491  return *this;
1492 }
1493 
1494 
1495 NTV2Buffer::NTV2Buffer (const void * pInUserPointer, const size_t inByteCount)
1496  : fUserSpacePtr (inByteCount ? NTV2Buffer_TO_ULWORD64(pInUserPointer) : 0),
1497  fByteCount (ULWord(pInUserPointer ? inByteCount : 0)),
1498  fFlags (0),
1499  #if defined (AJAMac)
1500  fKernelSpacePtr (0),
1501  fIOMemoryDesc (0),
1502  fIOMemoryMap (0)
1503  #else
1504  fKernelHandle (0)
1505  #endif
1506 {
1507 }
1508 
1509 
1510 NTV2Buffer::NTV2Buffer (const size_t inByteCount)
1511  : fUserSpacePtr (0),
1512  fByteCount (0),
1513  fFlags (0),
1514  #if defined (AJAMac)
1515  fKernelSpacePtr (0),
1516  fIOMemoryDesc (0),
1517  fIOMemoryMap (0)
1518  #else
1519  fKernelHandle (0)
1520  #endif
1521 {
1522  if (inByteCount)
1523  if (Allocate(inByteCount))
1524  Fill(UByte(0));
1525 }
1526 
1527 
1529  : fUserSpacePtr (0),
1530  fByteCount (0),
1531  fFlags (0),
1532  #if defined (AJAMac)
1533  fKernelSpacePtr (0),
1534  fIOMemoryDesc (0),
1535  fIOMemoryMap (0)
1536  #else
1537  fKernelHandle (0)
1538  #endif
1539 {
1540  if (Allocate(inObj.GetByteCount()))
1541  SetFrom(inObj);
1542 }
1543 
1544 bool NTV2Buffer::Truncate (const size_t inNewByteCount)
1545 {
1546  if (inNewByteCount == GetByteCount())
1547  return true; // Same size -- done!
1548  if (inNewByteCount > GetByteCount())
1549  return false; // Cannot enlarge -- i.e. can't be greater than my current size
1550  if (!inNewByteCount && IsAllocatedBySDK())
1551  return Deallocate(); // A newByteCount of zero calls Deallocate
1552  fByteCount = ULWord(inNewByteCount);
1553  return true;
1554 }
1555 
1557 {
1558  if (&inRHS != this)
1559  {
1560  if (inRHS.IsNULL())
1561  Set (AJA_NULL, 0);
1562  else if (GetByteCount() == inRHS.GetByteCount())
1563  SetFrom(inRHS);
1564  else if (Allocate(inRHS.GetByteCount()))
1565  SetFrom(inRHS);
1566  //else; // Error
1567  }
1568  return *this;
1569 }
1570 
1571 
1573 {
1574  Set (AJA_NULL, 0); // Call 'Set' to delete the array (if I allocated it)
1575 }
1576 
1577 
1579 {
1580  uint64_t * pU64s(reinterpret_cast<uint64_t*>(GetHostPointer()));
1581  const size_t loopCount(GetByteCount() / sizeof(uint64_t));
1582  if (IsNULL())
1583  return false;
1584  for (size_t ndx(0); ndx < loopCount; ndx++)
1585  pU64s[ndx] = NTV2EndianSwap64(pU64s[ndx]);
1586  return true;
1587 }
1588 
1589 
1591 {
1592  uint32_t * pU32s(reinterpret_cast<uint32_t*>(GetHostPointer()));
1593  const size_t loopCount(GetByteCount() / sizeof(uint32_t));
1594  if (IsNULL())
1595  return false;
1596  for (size_t ndx(0); ndx < loopCount; ndx++)
1597  pU32s[ndx] = NTV2EndianSwap32(pU32s[ndx]);
1598  return true;
1599 }
1600 
1601 
1603 {
1604  uint16_t * pU16s(reinterpret_cast<uint16_t*>(GetHostPointer()));
1605  const size_t loopCount(GetByteCount() / sizeof(uint16_t));
1606  if (IsNULL())
1607  return false;
1608  for (size_t ndx(0); ndx < loopCount; ndx++)
1609  pU16s[ndx] = NTV2EndianSwap16(pU16s[ndx]);
1610  return true;
1611 }
1612 
1613 
1614 bool NTV2Buffer::Set (const void * pInUserPointer, const size_t inByteCount)
1615 {
1616  Deallocate();
1617  fUserSpacePtr = inByteCount ? NTV2Buffer_TO_ULWORD64(pInUserPointer) : 0;
1618  fByteCount = ULWord(pInUserPointer ? inByteCount : 0);
1619  // Return true only if both UserPointer and ByteCount are non-zero, or both are zero.
1620  return (pInUserPointer && inByteCount) || (!pInUserPointer && !inByteCount);
1621 }
1622 
1623 
1624 bool NTV2Buffer::SetAndFill (const void * pInUserPointer, const size_t inByteCount, const UByte inValue)
1625 {
1626  return Set(pInUserPointer, inByteCount) && Fill(inValue);
1627 }
1628 
1629 
1630 bool NTV2Buffer::Allocate (const size_t inByteCount, const bool inPageAligned)
1631 {
1632  if (GetByteCount() && fFlags & NTV2Buffer_ALLOCATED) // If already was Allocated
1633  if (inByteCount == GetByteCount()) // If same byte count
1634  {
1635  Fill(0); // Zero it...
1636  return true; // ...and return true
1637  }
1638 
1639  bool result(Set(AJA_NULL, 0)); // Jettison existing buffer (if any)
1640  if (inByteCount)
1641  { // Allocate the byte array, and call Set...
1642  UByte * pBuffer(AJA_NULL);
1643  result = false;
1644  if (inPageAligned)
1645  pBuffer = reinterpret_cast<UByte*>(AJAMemory::AllocateAligned(inByteCount, DefaultPageSize()));
1646  else
1647  try
1648  {pBuffer = new UByte[inByteCount];}
1649  catch (const std::bad_alloc &)
1650  {pBuffer = AJA_NULL;}
1651  if (pBuffer && Set(pBuffer, inByteCount))
1652  { // SDK owns this memory -- set NTV2Buffer_ALLOCATED bit -- I'm responsible for deleting
1653  result = true;
1654  fFlags |= NTV2Buffer_ALLOCATED;
1655  if (inPageAligned)
1656  fFlags |= NTV2Buffer_PAGE_ALIGNED; // Set "page aligned" flag
1657  Fill(0); // Zero it
1658  }
1659  } // if requested size is non-zero
1660  return result;
1661 }
1662 
1663 
1665 {
1666  if (IsAllocatedBySDK())
1667  {
1668  if (!IsNULL())
1669  {
1670  if (IsPageAligned())
1671  {
1673  fFlags &= ~NTV2Buffer_PAGE_ALIGNED;
1674  }
1675  else
1676  delete [] reinterpret_cast<UByte*>(GetHostPointer());
1677  }
1678  fUserSpacePtr = 0;
1679  fByteCount = 0;
1680  fFlags &= ~NTV2Buffer_ALLOCATED;
1681  }
1682  return true;
1683 }
1684 
1685 
1686 void * NTV2Buffer::GetHostAddress (const ULWord inByteOffset, const bool inFromEnd) const
1687 {
1688  if (IsNULL())
1689  return AJA_NULL;
1690  if (inByteOffset >= GetByteCount())
1691  return AJA_NULL;
1692  UByte * pBytes (reinterpret_cast<UByte*>(GetHostPointer()));
1693  if (inFromEnd)
1694  pBytes += GetByteCount() - inByteOffset;
1695  else
1696  pBytes += inByteOffset;
1697  return pBytes;
1698 }
1699 
1700 
1701 bool NTV2Buffer::SetFrom (const NTV2Buffer & inBuffer)
1702 {
1703  if (inBuffer.IsNULL())
1704  return false; // NULL or empty
1705  if (IsNULL())
1706  return false; // I am NULL or empty
1707  if (inBuffer.GetByteCount() == GetByteCount() && inBuffer.GetHostPointer() == GetHostPointer())
1708  return true; // Same buffer
1709 
1710  size_t bytesToCopy(inBuffer.GetByteCount());
1711  if (bytesToCopy > GetByteCount())
1712  bytesToCopy = GetByteCount();
1713  ::memcpy (GetHostPointer(), inBuffer.GetHostPointer(), bytesToCopy);
1714  return true;
1715 }
1716 
1717 
1718 bool NTV2Buffer::CopyFrom (const void * pInSrcBuffer, const ULWord inByteCount)
1719 {
1720  if (!inByteCount)
1721  return Set (AJA_NULL, 0); // Zero bytes
1722  if (!pInSrcBuffer)
1723  return false; // NULL src ptr
1724  if (!Allocate (inByteCount))
1725  return false; // Resize failed
1726  ::memcpy (GetHostPointer(), pInSrcBuffer, inByteCount);
1727  return true;
1728 }
1729 
1730 
1731 bool NTV2Buffer::CopyFrom (const NTV2Buffer & inBuffer,
1732  const ULWord inSrcByteOffset, const ULWord inDstByteOffset, const ULWord inByteCount)
1733 {
1734  if (inBuffer.IsNULL() || IsNULL())
1735  return false; // NULL or empty
1736  if (inSrcByteOffset + inByteCount > inBuffer.GetByteCount())
1737  return false; // Past end of src
1738  if (inDstByteOffset + inByteCount > GetByteCount())
1739  return false; // Past end of me
1740 
1741  const UByte * pSrc (inBuffer);
1742  pSrc += inSrcByteOffset;
1743 
1744  UByte * pDst (*this);
1745  pDst += inDstByteOffset;
1746 
1747  ::memcpy (pDst, pSrc, inByteCount);
1748  return true;
1749 }
1750 
1751 
1752 bool NTV2Buffer::CopyFrom (const NTV2Buffer & inSrcBuffer, const NTV2SegmentedXferInfo & inXferInfo)
1753 {
1754  if (!inXferInfo.isValid() || inSrcBuffer.IsNULL() || IsNULL())
1755  return false;
1756 
1757  // Copy every segment...
1758  ULWord srcOffset (inXferInfo.getSourceOffset() * inXferInfo.getElementLength());
1759  ULWord dstOffset (inXferInfo.getDestOffset() * inXferInfo.getElementLength());
1760  const ULWord srcPitch (inXferInfo.getSourcePitch() * inXferInfo.getElementLength());
1761  const ULWord dstPitch (inXferInfo.getDestPitch() * inXferInfo.getElementLength());
1762  const ULWord bytesPerSeg (inXferInfo.getSegmentLength() * inXferInfo.getElementLength());
1763  for (ULWord segNdx(0); segNdx < inXferInfo.getSegmentCount(); segNdx++)
1764  {
1765  const void * pSrc (inSrcBuffer.GetHostAddress(srcOffset));
1766  void * pDst (GetHostAddress(dstOffset));
1767  if (!pSrc) return false;
1768  if (!pDst) return false;
1769  if (srcOffset + bytesPerSeg > inSrcBuffer.GetByteCount())
1770  return false; // memcpy will read past end of srcBuffer
1771  if (dstOffset + bytesPerSeg > GetByteCount())
1772  return false; // memcpy will write past end of me
1773  ::memcpy (pDst, pSrc, bytesPerSeg);
1774  srcOffset += srcPitch; // Bump src offset
1775  dstOffset += dstPitch; // Bump dst offset
1776  } // for each segment
1777  return true;
1778 }
1779 
1780 bool NTV2Buffer::SetFromHexString (const string & inStr)
1781 {
1782  string str(inStr);
1783 
1784  // Remove all whitespace...
1785  const string newline("\n"), tab("\t");
1786  aja::replace(str, newline, string());
1787  aja::replace(str, tab, string());
1788  aja::upper(str);
1789 
1790  // Fail if any non-hex found...
1791  for (size_t ndx(0); ndx < str.size(); ndx++)
1792  if (!aja::is_hex_digit(str.at(ndx)))
1793  return false;
1794 
1795  if (str.size() & 1)
1796  return false; // Remaining length must be even
1797  if (!Allocate(str.size() / 2))
1798  return false; // Resize failed
1799 
1800  // Decode and copy in the data...
1801  for (size_t srcNdx(0), dstNdx(0); srcNdx < str.size(); srcNdx += 2)
1802  U8(int(dstNdx++)) = uint8_t(aja::stoul (str.substr(srcNdx,2), AJA_NULL, 16));
1803 
1804  return true;
1805 }
1806 
1808 {
1809  if (inBuffer.IsNULL ())
1810  return false; // NULL or empty
1811  if (IsNULL ())
1812  return false; // I am NULL or empty
1813  if (inBuffer.GetByteCount () != GetByteCount ())
1814  return false; // Different sizes
1815  if (fFlags != inBuffer.fFlags)
1816  return false; // Flags mismatch
1817  if (inBuffer.GetHostPointer () == GetHostPointer ())
1818  return true; // Same buffer
1819 
1820  ULWord64 tmp = fUserSpacePtr;
1821  fUserSpacePtr = inBuffer.fUserSpacePtr;
1822  inBuffer.fUserSpacePtr = tmp;
1823  return true;
1824 }
1825 
1826 set<ULWord> & NTV2Buffer::FindAll (set<ULWord> & outOffsets, const NTV2Buffer & inValue) const
1827 {
1828  outOffsets.clear();
1829  if (IsNULL())
1830  return outOffsets; // NULL buffer, return "no matches"
1831  if (inValue.IsNULL())
1832  return outOffsets; // NULL buffer, return "no matches"
1833  const ULWord srchByteCount(inValue.GetByteCount());
1834  if (GetByteCount() < srchByteCount)
1835  return outOffsets; // I'm smaller than the search data, return "no matches"
1836 
1837  const ULWord maxOffset(GetByteCount() - srchByteCount); // Don't search past here
1838  const uint8_t * pSrchData (inValue); // Pointer to search data
1839  const uint8_t * pMyData (*this); // Pointer to where search starts in me
1840  ULWord offset(0); // Search starts at this byte offset
1841  do
1842  {
1843  if (!::memcmp(pMyData, pSrchData, srchByteCount))
1844  outOffsets.insert(offset); // Record byte offset of match
1845  pMyData++; // Bump search pointer
1846  offset++; // Bump search byte offset
1847  } while (offset < maxOffset);
1848  return outOffsets;
1849 }
1850 
1851 bool NTV2Buffer::IsContentEqual (const NTV2Buffer & inBuffer, const ULWord inByteOffset, const ULWord inByteCount) const
1852 {
1853  if (IsNULL() || inBuffer.IsNULL())
1854  return false; // Buffer(s) are NULL/empty
1855  if (inBuffer.GetByteCount() != GetByteCount())
1856  return false; // Buffers are different sizes
1857 
1858  ULWord totalBytes(GetByteCount());
1859  if (inByteOffset >= totalBytes)
1860  return false; // Bad offset
1861 
1862  totalBytes -= inByteOffset;
1863 
1864  ULWord byteCount(inByteCount);
1865  if (byteCount > totalBytes)
1866  byteCount = totalBytes;
1867 
1868  if (inBuffer.GetHostPointer() == GetHostPointer())
1869  return true; // Same buffer
1870 
1871  const UByte * pByte1 (*this);
1872  const UByte * pByte2 (inBuffer);
1873  pByte1 += inByteOffset;
1874  pByte2 += inByteOffset;
1875  #if !defined(NTV2BUFFER_NO_MEMCMP)
1876  return ::memcmp (pByte1, pByte2, byteCount) == 0;
1877  #else // NTV2BUFFER_NO_MEMCMP
1878  ULWord offset(inByteOffset);
1879  while (byteCount)
1880  {
1881  if (*pByte1 != *pByte2)
1882  {
1883  cerr << "## ERROR: IsContentEqual: miscompare at offset " << xHEX0N(offset,8)
1884  << " (" << DEC(offset) << "): " << xHEX0N(UWord(*pByte1),2) << " != "
1885  << xHEX0N(UWord(*pByte2),2) << ", " << xHEX0N(byteCount,8) << " ("
1886  << DEC(byteCount) << ") bytes left to compare" << endl;
1887  return false;
1888  }
1889  pByte1++; pByte2++;
1890  byteCount--;
1891  offset++;
1892  }
1893  return true;
1894  #endif // NTV2BUFFER_NO_MEMCMP
1895 }
1896 
1897 bool NTV2Buffer::NextDifference (const NTV2Buffer & inBuffer, ULWord & byteOffset) const
1898 {
1899  if (byteOffset == 0xFFFFFFFF)
1900  return false; // bad offset
1901  if (IsNULL() || inBuffer.IsNULL())
1902  return false; // NULL or empty buffers
1903  if (inBuffer.GetByteCount() != GetByteCount())
1904  return false; // Different byte counts
1905  if (inBuffer.GetHostPointer() == GetHostPointer())
1906  {byteOffset = 0xFFFFFFFF; return true;} // Same buffer
1907 
1908  ULWord totalBytesToCompare(GetByteCount());
1909  if (byteOffset >= totalBytesToCompare)
1910  return false; // Bad offset
1911  totalBytesToCompare -= byteOffset;
1912 
1913  const UByte * pByte1 (*this);
1914  const UByte * pByte2 (inBuffer);
1915  while (totalBytesToCompare)
1916  {
1917  if (pByte1[byteOffset] != pByte2[byteOffset])
1918  return true;
1919  totalBytesToCompare--;
1920  byteOffset++;
1921  }
1922  byteOffset = 0xFFFFFFFF;
1923  return true;
1924 }
1925 
1926 bool NTV2Buffer::GetRingChangedByteRange (const NTV2Buffer & inBuffer, ULWord & outByteOffsetFirst, ULWord & outByteOffsetLast) const
1927 {
1928  outByteOffsetFirst = outByteOffsetLast = GetByteCount ();
1929  if (IsNULL () || inBuffer.IsNULL ())
1930  return false; // NULL or empty
1931  if (inBuffer.GetByteCount () != GetByteCount ())
1932  return false; // Different byte counts
1933  if (inBuffer.GetHostPointer () == GetHostPointer ())
1934  return true; // Same buffer
1935  if (GetByteCount() < 3)
1936  return false; // Too small
1937 
1938  const UByte * pByte1 (reinterpret_cast <const UByte *> (GetHostPointer()));
1939  const UByte * pByte2 (reinterpret_cast <const UByte *> (inBuffer.GetHostPointer()));
1940 
1941  outByteOffsetFirst = 0;
1942  while (outByteOffsetFirst < GetByteCount())
1943  {
1944  if (*pByte1 != *pByte2)
1945  break;
1946  pByte1++;
1947  pByte2++;
1948  outByteOffsetFirst++;
1949  }
1950  if (outByteOffsetFirst == 0)
1951  {
1952  // Wrap case -- look for first match...
1953  while (outByteOffsetFirst < GetByteCount())
1954  {
1955  if (*pByte1 == *pByte2)
1956  break;
1957  pByte1++;
1958  pByte2++;
1959  outByteOffsetFirst++;
1960  }
1961  if (outByteOffsetFirst < GetByteCount())
1962  outByteOffsetFirst--;
1963  }
1964  if (outByteOffsetFirst == GetByteCount())
1965  return true; // Identical --- outByteOffsetFirst == outByteOffsetLast == GetByteCount()
1966 
1967  // Now scan from the end...
1968  pByte1 = reinterpret_cast <const UByte *> (GetHostPointer());
1969  pByte2 = reinterpret_cast <const UByte *> (inBuffer.GetHostPointer());
1970  pByte1 += GetByteCount () - 1; // Point to last byte
1971  pByte2 += GetByteCount () - 1;
1972  while (--outByteOffsetLast)
1973  {
1974  if (*pByte1 != *pByte2)
1975  break;
1976  pByte1--;
1977  pByte2--;
1978  }
1979  if (outByteOffsetLast == (GetByteCount() - 1))
1980  {
1981  // Wrap case -- look for first match...
1982  while (outByteOffsetLast)
1983  {
1984  if (*pByte1 == *pByte2)
1985  break;
1986  pByte1--;
1987  pByte2--;
1988  outByteOffsetLast--;
1989  }
1990  if (outByteOffsetLast < GetByteCount())
1991  outByteOffsetLast++;
1992  if (outByteOffsetLast <= outByteOffsetFirst)
1993  cerr << "## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast << " <= first " << outByteOffsetFirst << " in wrap condition" << endl;
1994  const ULWord tmp (outByteOffsetLast);
1995  outByteOffsetLast = outByteOffsetFirst;
1996  outByteOffsetFirst = tmp;
1997  if (outByteOffsetLast >= outByteOffsetFirst)
1998  cerr << "## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast << " >= first " << outByteOffsetFirst << " in wrap condition" << endl;
1999  }
2000  return true;
2001 
2002 } // GetRingChangedByteRange
2003 
2004 
2005 static size_t gDefaultPageSize (AJA_PAGE_SIZE);
2006 
2008 {
2009  return gDefaultPageSize;
2010 }
2011 
2012 bool NTV2Buffer::SetDefaultPageSize (const size_t inNewSize)
2013 {
2014  const bool result (inNewSize && (!(inNewSize & (inNewSize - 1))));
2015  if (result)
2016  gDefaultPageSize = inNewSize;
2017  return result;
2018 }
2019 
2021 {
2022 #if defined(MSWindows) || defined(AJABareMetal)
2023  return AJA_PAGE_SIZE;
2024 #else
2025  return size_t(::getpagesize());
2026 #endif
2027 }
2028 
2029 
2031  : acHeader (NTV2_TYPE_ACFRAMESTAMP, sizeof(FRAME_STAMP)),
2032  acFrameTime (0),
2033  acRequestedFrame (0),
2034  acAudioClockTimeStamp (0),
2035  acAudioExpectedAddress (0),
2036  acAudioInStartAddress (0),
2037  acAudioInStopAddress (0),
2038  acAudioOutStopAddress (0),
2039  acAudioOutStartAddress (0),
2040  acTotalBytesTransferred (0),
2041  acStartSample (0),
2042  acTimeCodes (NTV2_MAX_NUM_TIMECODE_INDEXES * sizeof (NTV2_RP188)),
2043  acCurrentTime (0),
2044  acCurrentFrame (0),
2045  acCurrentFrameTime (0),
2046  acAudioClockCurrentTime (0),
2047  acCurrentAudioExpectedAddress (0),
2048  acCurrentAudioStartAddress (0),
2049  acCurrentFieldCount (0),
2050  acCurrentLineCount (0),
2051  acCurrentReps (0),
2052  acCurrentUserCookie (0),
2053  acFrame (0),
2054  acRP188 ()
2055 {
2057 }
2058 
2059 
2061  : acHeader (inObj.acHeader),
2062  acFrameTime (inObj.acFrameTime),
2063  acRequestedFrame (inObj.acRequestedFrame),
2064  acAudioClockTimeStamp (inObj.acAudioClockTimeStamp),
2065  acAudioExpectedAddress (inObj.acAudioExpectedAddress),
2066  acAudioInStartAddress (inObj.acAudioInStartAddress),
2067  acAudioInStopAddress (inObj.acAudioInStopAddress),
2068  acAudioOutStopAddress (inObj.acAudioOutStopAddress),
2069  acAudioOutStartAddress (inObj.acAudioOutStartAddress),
2070  acTotalBytesTransferred (inObj.acTotalBytesTransferred),
2071  acStartSample (inObj.acStartSample),
2072  acCurrentTime (inObj.acCurrentTime),
2073  acCurrentFrame (inObj.acCurrentFrame),
2074  acCurrentFrameTime (inObj.acCurrentFrameTime),
2075  acAudioClockCurrentTime (inObj.acAudioClockCurrentTime),
2076  acCurrentAudioExpectedAddress (inObj.acCurrentAudioExpectedAddress),
2077  acCurrentAudioStartAddress (inObj.acCurrentAudioStartAddress),
2078  acCurrentFieldCount (inObj.acCurrentFieldCount),
2079  acCurrentLineCount (inObj.acCurrentLineCount),
2080  acCurrentReps (inObj.acCurrentReps),
2081  acCurrentUserCookie (inObj.acCurrentUserCookie),
2082  acFrame (inObj.acFrame),
2083  acRP188 (inObj.acRP188),
2084  acTrailer (inObj.acTrailer)
2085 {
2087 }
2088 
2089 
2091 {
2092 }
2093 
2094 
2096 {
2098  ULWord numRP188s (acTimeCodes.GetByteCount () / sizeof (NTV2_RP188));
2099  const NTV2_RP188 * pArray (reinterpret_cast <const NTV2_RP188 *> (acTimeCodes.GetHostPointer ()));
2100  outValues.clear ();
2101  if (!pArray)
2102  return false; // No 'acTimeCodes' array!
2103 
2104  if (numRP188s > NTV2_MAX_NUM_TIMECODE_INDEXES)
2105  numRP188s = NTV2_MAX_NUM_TIMECODE_INDEXES; // clamp to this max number
2106 
2107  for (ULWord ndx (0); ndx < numRP188s; ndx++)
2108  outValues << pArray [ndx];
2109 
2110  return true;
2111 }
2112 
2113 
2114 bool FRAME_STAMP::GetInputTimeCode (NTV2_RP188 & outTimeCode, const NTV2TCIndex inTCIndex) const
2115 {
2117  ULWord numRP188s (acTimeCodes.GetByteCount () / sizeof (NTV2_RP188));
2118  const NTV2_RP188 * pArray (reinterpret_cast <const NTV2_RP188 *> (acTimeCodes.GetHostPointer ()));
2119  outTimeCode.Set (); // invalidate
2120  if (!pArray)
2121  return false; // No 'acTimeCodes' array!
2122  if (numRP188s > NTV2_MAX_NUM_TIMECODE_INDEXES)
2123  numRP188s = NTV2_MAX_NUM_TIMECODE_INDEXES; // clamp to this max number
2124  if (!NTV2_IS_VALID_TIMECODE_INDEX (inTCIndex))
2125  return false;
2126 
2127  outTimeCode = pArray [inTCIndex];
2128  return true;
2129 }
2130 
2131 
2132 bool FRAME_STAMP::GetInputTimeCodes (NTV2TimeCodes & outTimeCodes, const NTV2Channel inSDIInput, const bool inValidOnly) const
2133 {
2135  outTimeCodes.clear();
2136 
2137  if (!NTV2_IS_VALID_CHANNEL(inSDIInput))
2138  return false; // Bad SDI input
2139 
2140  NTV2TimeCodeList allTCs;
2141  if (!GetInputTimeCodes(allTCs))
2142  return false; // GetInputTimeCodes failed
2143 
2144  const NTV2TCIndexes tcIndexes (GetTCIndexesForSDIInput(inSDIInput));
2145  for (NTV2TCIndexesConstIter iter(tcIndexes.begin()); iter != tcIndexes.end(); ++iter)
2146  {
2147  const NTV2TCIndex tcIndex(*iter);
2149  const NTV2_RP188 tc(allTCs.at(tcIndex));
2150  if (!inValidOnly)
2151  outTimeCodes[tcIndex] = tc;
2152  else if (tc.IsValid())
2153  outTimeCodes[tcIndex] = tc;
2154  }
2155  return true;
2156 }
2157 
2158 
2159 bool FRAME_STAMP::GetSDIInputStatus(NTV2SDIInputStatus & outStatus, const UWord inSDIInputIndex0) const
2160 {
2162  (void)outStatus;
2163  (void)inSDIInputIndex0;
2164  return true;
2165 }
2166 
2167 bool FRAME_STAMP::SetInputTimecode (const NTV2TCIndex inTCNdx, const NTV2_RP188 & inTimecode)
2168 {
2169  ULWord numRP188s (acTimeCodes.GetByteCount() / sizeof(NTV2_RP188));
2170  NTV2_RP188 * pArray (reinterpret_cast<NTV2_RP188*>(acTimeCodes.GetHostPointer()));
2171  if (!pArray || !numRP188s)
2172  return false; // No 'acTimeCodes' array!
2173 
2174  if (numRP188s > NTV2_MAX_NUM_TIMECODE_INDEXES)
2175  numRP188s = NTV2_MAX_NUM_TIMECODE_INDEXES; // clamp to this max number
2176  if (ULWord(inTCNdx) >= numRP188s)
2177  return false; // Past end
2178 
2179  pArray[inTCNdx] = inTimecode; // Write the new value
2180  return true; // Success!
2181 }
2182 
2183 
2185 {
2186  if (this != &inRHS)
2187  {
2188  acTimeCodes = inRHS.acTimeCodes;
2189  acHeader = inRHS.acHeader;
2190  acFrameTime = inRHS.acFrameTime;
2199  acStartSample = inRHS.acStartSample;
2200  acCurrentTime = inRHS.acCurrentTime;
2208  acCurrentReps = inRHS.acCurrentReps;
2210  acFrame = inRHS.acFrame;
2211  acRP188 = inRHS.acRP188;
2212  acTrailer = inRHS.acTrailer;
2213  }
2214  return *this;
2215 }
2216 
2217 
2218 bool FRAME_STAMP::SetFrom (const FRAME_STAMP_STRUCT & inOldStruct)
2219 {
2221  //acCrosspoint = inOldStruct.channelSpec;
2222  acFrameTime = inOldStruct.frameTime;
2223  acRequestedFrame = inOldStruct.frame;
2230  acTotalBytesTransferred = inOldStruct.bytesRead;
2231  acStartSample = inOldStruct.startSample;
2232  acCurrentTime = inOldStruct.currentTime;
2233  acCurrentFrame = inOldStruct.currentFrame;
2234  acCurrentFrameTime = inOldStruct.currentFrameTime;
2238  acCurrentFieldCount = inOldStruct.currentFieldCount;
2239  acCurrentLineCount = inOldStruct.currentLineCount;
2240  acCurrentReps = inOldStruct.currentReps;
2241  acCurrentUserCookie = inOldStruct.currenthUser;
2242  acRP188 = NTV2_RP188 (inOldStruct.currentRP188);
2243  if (!acTimeCodes.IsNULL() && acTimeCodes.GetByteCount () >= sizeof (NTV2_RP188))
2244  {
2245  NTV2_RP188 * pTimecodes (reinterpret_cast <NTV2_RP188 *> (acTimeCodes.GetHostPointer ()));
2246  NTV2_ASSERT (pTimecodes);
2248  pTimecodes [NTV2_TCINDEX_DEFAULT] = acRP188;
2249  }
2250  return true;
2251 }
2252 
2253 
2254 bool FRAME_STAMP::CopyTo (FRAME_STAMP_STRUCT & outOldStruct) const
2255 {
2257  outOldStruct.frameTime = acFrameTime;
2258  outOldStruct.frame = acRequestedFrame;
2265  outOldStruct.bytesRead = acTotalBytesTransferred;
2266  outOldStruct.startSample = acStartSample;
2267  outOldStruct.currentTime = acCurrentTime;
2268  outOldStruct.currentFrame = acCurrentFrame;
2269  outOldStruct.currentFrameTime = acCurrentFrameTime;
2273  outOldStruct.currentFieldCount = acCurrentFieldCount;
2274  outOldStruct.currentLineCount = acCurrentLineCount;
2275  outOldStruct.currentReps = acCurrentReps;
2276  outOldStruct.currenthUser = ULWord(acCurrentUserCookie);
2277  outOldStruct.currentRP188 = acRP188;
2278  // Ticket 3367 -- Mark Gilbert of Gallery UK reports that after updating from AJA Retail Software 10.5 to 14.0,
2279  // their QuickTime app stopped receiving timecode during capture. Turns out the QuickTime components use the new
2280  // AutoCirculate APIs, but internally still use the old FRAME_STAMP_STRUCT for frame info, including timecode...
2281  // ...and only use the "currentRP188" field for the "retail" timecode.
2282  // Sadly, this FRAME_STAMP-to-FRAME_STAMP_STRUCT function historically only set "currentRP188" from the deprecated
2283  // (and completely unused) "acRP188" field, when it really should've been using the acTimeCodes[NTV2_TCINDEX_DEFAULT]
2284  // value all along...
2285  if (!acTimeCodes.IsNULL()) // If there's an acTimeCodes buffer...
2286  if (acTimeCodes.GetByteCount() >= sizeof(NTV2_RP188)) // ...and it has at least one timecode value...
2287  {
2288  const NTV2_RP188 * pDefaultTC (reinterpret_cast<const NTV2_RP188*>(acTimeCodes.GetHostPointer()));
2289  if (pDefaultTC)
2290  outOldStruct.currentRP188 = pDefaultTC[NTV2_TCINDEX_DEFAULT]; // Stuff the "default" (retail) timecode into "currentRP188".
2291  }
2292  return true;
2293 }
2294 
2295 
2296 string FRAME_STAMP::operator [] (const unsigned inIndexNum) const
2297 {
2298  ostringstream oss;
2299  NTV2_RP188 rp188;
2300  if (GetInputTimeCode (rp188, NTV2TimecodeIndex (inIndexNum)))
2301  {
2302  if (rp188.IsValid())
2303  {
2304  CRP188 foo (rp188);
2305  oss << foo;
2306  }
2307  else
2308  oss << "---";
2309  }
2310  else if (NTV2_IS_VALID_TIMECODE_INDEX (inIndexNum))
2311  oss << "---";
2312  return oss.str();
2313 }
2314 
2315 
2317  : mHeader(NTV2_TYPE_SDISTATS, sizeof(NTV2SDIInStatistics)),
2318  mInStatistics(NTV2_MAX_NUM_CHANNELS * sizeof(NTV2SDIInputStatus))
2319 {
2320  Clear();
2322 }
2323 
2325 {
2327  if (mInStatistics.IsNULL())
2328  return;
2329  NTV2SDIInputStatus * pArray(reinterpret_cast <NTV2SDIInputStatus *> (mInStatistics.GetHostPointer()));
2330  for (int i = 0; i < NTV2_MAX_NUM_CHANNELS; i++)
2331  pArray[i].Clear();
2332 }
2333 
2334 bool NTV2SDIInStatistics::GetSDIInputStatus(NTV2SDIInputStatus & outStatus, const UWord inSDIInputIndex0)
2335 {
2337  const ULWord numElements(mInStatistics.GetByteCount() / sizeof(NTV2SDIInputStatus));
2338  const NTV2SDIInputStatus * pArray(reinterpret_cast <const NTV2SDIInputStatus *> (mInStatistics.GetHostPointer()));
2339  outStatus.Clear();
2340  if (!pArray)
2341  return false;
2342  if (numElements != 8)
2343  return false;
2344  if (inSDIInputIndex0 >= numElements)
2345  return false;
2346  outStatus = pArray[inSDIInputIndex0];
2347  return true;
2348 }
2349 
2351 {
2353  static NTV2SDIInputStatus dummy;
2354  const ULWord numElements(mInStatistics.GetByteCount() / sizeof(NTV2SDIInputStatus));
2355  NTV2SDIInputStatus * pArray(reinterpret_cast<NTV2SDIInputStatus*>(mInStatistics.GetHostPointer()));
2356  if (!pArray)
2357  return dummy;
2358  if (numElements != 8)
2359  return dummy;
2360  if (inSDIInputIndex0 >= numElements)
2361  return dummy;
2362  return pArray[inSDIInputIndex0];
2363 }
2364 
2365 std::ostream & NTV2SDIInStatistics::Print(std::ostream & inOutStream) const
2366 {
2368  inOutStream << mHeader << ", " << mInStatistics << ", " << mTrailer; return inOutStream;
2369 }
2370 
2371 
2374  acState (NTV2_AUTOCIRCULATE_DISABLED),
2375  acTransferFrame (0),
2376  acBufferLevel (0),
2377  acFramesProcessed (0),
2378  acFramesDropped (0),
2379  acFrameStamp (),
2380  acAudioTransferSize (0),
2381  acAudioStartSample (0),
2382  acAncTransferSize (0),
2383  acAncField2TransferSize (0)
2384  //acTrailer ()
2385 {
2387 }
2388 
2389 
2391  : acHeader (NTV2_TYPE_ACSTATUS, sizeof (AUTOCIRCULATE_STATUS)),
2392  acCrosspoint (inCrosspoint),
2393  acState (NTV2_AUTOCIRCULATE_DISABLED),
2394  acStartFrame (0),
2395  acEndFrame (0),
2396  acActiveFrame (0),
2397  acRDTSCStartTime (0),
2398  acAudioClockStartTime (0),
2399  acRDTSCCurrentTime (0),
2400  acAudioClockCurrentTime (0),
2401  acFramesProcessed (0),
2402  acFramesDropped (0),
2403  acBufferLevel (0),
2404  acOptionFlags (0),
2405  acAudioSystem (NTV2_AUDIOSYSTEM_INVALID)
2406 {
2408 }
2409 
2410 
2412 {
2414  outOldStruct.channelSpec = acCrosspoint;
2415  outOldStruct.state = acState;
2416  outOldStruct.startFrame = acStartFrame;
2417  outOldStruct.endFrame = acEndFrame;
2418  outOldStruct.activeFrame = acActiveFrame;
2419  outOldStruct.rdtscStartTime = acRDTSCStartTime;
2421  outOldStruct.rdtscCurrentTime = acRDTSCCurrentTime;
2423  outOldStruct.framesProcessed = acFramesProcessed;
2424  outOldStruct.framesDropped = acFramesDropped;
2425  outOldStruct.bufferLevel = acBufferLevel;
2427  outOldStruct.bWithRP188 = acOptionFlags & AUTOCIRCULATE_WITH_RP188 ? 1 : 0;
2428  outOldStruct.bFbfChange = acOptionFlags & AUTOCIRCULATE_WITH_FBFCHANGE ? 1 : 0;
2429  outOldStruct.bFboChange = acOptionFlags & AUTOCIRCULATE_WITH_FBOCHANGE ? 1 : 0;
2431  outOldStruct.bWithVidProc = acOptionFlags & AUTOCIRCULATE_WITH_VIDPROC ? 1 : 0;
2432  outOldStruct.bWithCustomAncData = acOptionFlags & AUTOCIRCULATE_WITH_ANC ? 1 : 0;
2433  return true;
2434 }
2435 
2436 
2438 {
2440  acCrosspoint = inOldStruct.channelSpec;
2441  acState = inOldStruct.state;
2442  acStartFrame = inOldStruct.startFrame;
2443  acEndFrame = inOldStruct.endFrame;
2444  acActiveFrame = inOldStruct.activeFrame;
2445  acRDTSCStartTime = inOldStruct.rdtscStartTime;
2447  acRDTSCCurrentTime = inOldStruct.rdtscCurrentTime;
2449  acFramesProcessed = inOldStruct.framesProcessed;
2450  acFramesDropped = inOldStruct.framesDropped;
2451  acBufferLevel = inOldStruct.bufferLevel;
2452  acAudioSystem = NTV2_AUDIOSYSTEM_INVALID; // NTV2_AUDIOSYSTEM_1;
2453  acOptionFlags = (inOldStruct.bWithRP188 ? AUTOCIRCULATE_WITH_RP188 : 0) |
2454  (inOldStruct.bFbfChange ? AUTOCIRCULATE_WITH_FBFCHANGE : 0) |
2455  (inOldStruct.bFboChange ? AUTOCIRCULATE_WITH_FBOCHANGE : 0) |
2457  (inOldStruct.bWithVidProc ? AUTOCIRCULATE_WITH_VIDPROC : 0) |
2458  (inOldStruct.bWithCustomAncData ? AUTOCIRCULATE_WITH_ANC : 0);
2459  return true;
2460 }
2461 
2462 
2464 {
2468  acStartFrame = 0;
2469  acEndFrame = 0;
2470  acActiveFrame = 0;
2471  acRDTSCStartTime = 0;
2473  acRDTSCCurrentTime = 0;
2475  acFramesProcessed = 0;
2476  acFramesDropped = 0;
2477  acBufferLevel = 0;
2478  acOptionFlags = 0;
2480 }
2481 
2482 
2484 {
2486 }
2487 
2488 
2489 struct ThousandsSeparator : std::numpunct <char>
2490 {
2491  virtual inline char do_thousands_sep() const {return ',';}
2492  virtual inline std::string do_grouping() const {return "\03";}
2493 };
2494 
2495 
2496 template <class T> string CommaStr (const T & inNum)
2497 {
2498  ostringstream oss;
2499  const locale loc (oss.getloc(), new ThousandsSeparator);
2500  oss.imbue (loc);
2501  oss << inNum;
2502  return oss.str();
2503 } // CommaStr
2504 
2505 
2506 string AUTOCIRCULATE_STATUS::operator [] (const unsigned inIndexNum) const
2507 {
2508  ostringstream oss;
2509  if (inIndexNum == 0)
2511  else if (!IsStopped())
2512  switch (inIndexNum)
2513  {
2514  case 1: oss << DEC(GetStartFrame()); break;
2515  case 2: oss << DEC(GetEndFrame()); break;
2516  case 3: oss << DEC(GetFrameCount()); break;
2517  case 4: oss << DEC(GetActiveFrame()); break;
2518  case 5: oss << xHEX0N(acRDTSCStartTime,16); break;
2519  case 6: oss << xHEX0N(acAudioClockStartTime,16); break;
2520  case 7: oss << DEC(acRDTSCCurrentTime); break;
2521  case 8: oss << DEC(acAudioClockCurrentTime); break;
2522  case 9: oss << CommaStr(GetProcessedFrameCount()); break;
2523  case 10: oss << CommaStr(GetDroppedFrameCount()); break;
2524  case 11: oss << DEC(GetBufferLevel()); break;
2525  case 12: oss << ::NTV2AudioSystemToString(acAudioSystem, true); break;
2526  case 13: oss << (WithRP188() ? "Yes" : "No"); break;
2527  case 14: oss << (WithLTC() ? "Yes" : "No"); break;
2528  case 15: oss << (WithFBFChange() ? "Yes" : "No"); break;
2529  case 16: oss << (WithFBOChange() ? "Yes" : "No"); break;
2530  case 17: oss << (WithColorCorrect() ? "Yes" : "No"); break;
2531  case 18: oss << (WithVidProc() ? "Yes" : "No"); break;
2532  case 19: oss << (WithCustomAnc() ? "Yes" : "No"); break;
2533  case 20: oss << (WithHDMIAuxData() ? "Yes" : "No"); break;
2534  case 21: oss << (IsFieldMode() ? "Yes" : "No"); break;
2535  default: break;
2536  }
2537  else if (inIndexNum < 22)
2538  oss << "---";
2539  return oss.str();
2540 }
2541 
2542 
2543 ostream & operator << (ostream & oss, const AUTOCIRCULATE_STATUS & inObj)
2544 {
2545  if (!inObj.IsStopped())
2546  oss << ::NTV2ChannelToString(inObj.GetChannel(), true) << ": "
2547  << (inObj.IsInput() ? "Input " : (inObj.IsOutput() ? "Output" : "*BAD* "))
2548  << setw(12) << ::NTV2AutoCirculateStateToString(inObj.acState) << " "
2549  << setw( 5) << inObj.GetStartFrame()
2550  << setw( 6) << inObj.GetEndFrame()
2551  << setw( 6) << inObj.GetActiveFrame()
2552  << setw( 8) << inObj.GetProcessedFrameCount()
2553  << setw( 8) << inObj.GetDroppedFrameCount()
2554  << setw( 7) << inObj.GetBufferLevel()
2555  << setw(10) << ::NTV2AudioSystemToString(inObj.acAudioSystem, true)
2556  << setw(10) << (inObj.WithRP188() ? "+RP188" : "-RP188")
2557  << setw(10) << (inObj.WithLTC() ? "+LTC" : "-LTC")
2558  << setw(10) << (inObj.WithFBFChange() ? "+FBFchg" : "-FBFchg")
2559  << setw(10) << (inObj.WithFBOChange() ? "+FBOchg" : "-FBOchg")
2560  << setw(10) << (inObj.WithColorCorrect() ? "+ColCor" : "-ColCor")
2561  << setw(10) << (inObj.WithVidProc() ? "+VidProc" : "-VidProc")
2562  << setw(10) << (inObj.WithCustomAnc() ? "+AncData" : "-AncData")
2563  << setw(10) << (inObj.WithHDMIAuxData() ? "+HDMIAux" : "-HDMIAux")
2564  << setw(10) << (inObj.IsFieldMode() ? "+FldMode" : "-FldMode");
2565  return oss;
2566 }
2567 
2568 
2570 {
2571  Reset ();
2572 }
2573 
2574 
2575 NTV2SegmentedDMAInfo::NTV2SegmentedDMAInfo (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow)
2576 {
2577  Set (inNumSegments, inNumActiveBytesPerRow, inHostBytesPerRow, inDeviceBytesPerRow);
2578 }
2579 
2580 
2581 void NTV2SegmentedDMAInfo::Set (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow)
2582 {
2583  acNumSegments = inNumSegments;
2584  if (acNumSegments > 1)
2585  {
2586  acNumActiveBytesPerRow = inNumActiveBytesPerRow;
2587  acSegmentHostPitch = inHostBytesPerRow;
2588  acSegmentDevicePitch = inDeviceBytesPerRow;
2589  }
2590  else
2591  Reset ();
2592 }
2593 
2594 
2596 {
2598 }
2599 
2600 
2602  : ccMode (NTV2_CCMODE_INVALID),
2603  ccSaturationValue (0)
2604 {
2605 }
2606 
2607 
2609 {
2610  Clear ();
2611 }
2612 
2613 
2615 {
2617  ccSaturationValue = 0;
2619 }
2620 
2621 
2622 bool NTV2ColorCorrectionData::Set (const NTV2ColorCorrectionMode inMode, const ULWord inSaturation, const void * pInTableData)
2623 {
2624  Clear();
2626  return false;
2627 
2628  if (pInTableData)
2630  return false;
2631  ccMode = inMode;
2632  ccSaturationValue = (inMode == NTV2_CCMODE_3WAY) ? inSaturation : 0;
2633  return true;
2634 }
2635 
2636 
2638  : acHeader (NTV2_TYPE_ACXFER, sizeof(AUTOCIRCULATE_TRANSFER)),
2639  acOutputTimeCodes (NTV2_MAX_NUM_TIMECODE_INDEXES * sizeof (NTV2_RP188)),
2640  acTransferStatus (),
2641  acInUserCookie (0),
2642  acInVideoDMAOffset (0),
2643  acInSegmentedDMAInfo (),
2644  acColorCorrection (),
2645  acFrameBufferFormat (NTV2_FBF_10BIT_YCBCR),
2646  acFrameBufferOrientation (NTV2_FRAMEBUFFER_ORIENTATION_TOPDOWN),
2647  acVidProcInfo (),
2648  acVideoQuarterSizeExpand (NTV2_QuarterSizeExpandOff),
2649  acPeerToPeerFlags (0),
2650  acFrameRepeatCount (1),
2651  acDesiredFrame (-1),
2652  acRP188 (),
2653  acCrosspoint (NTV2CROSSPOINT_INVALID)
2654 {
2658 }
2659 
2660 
2661 AUTOCIRCULATE_TRANSFER::AUTOCIRCULATE_TRANSFER (ULWord * pInVideoBuffer, const ULWord inVideoByteCount, ULWord * pInAudioBuffer,
2662  const ULWord inAudioByteCount, ULWord * pInANCBuffer, const ULWord inANCByteCount,
2663  ULWord * pInANCF2Buffer, const ULWord inANCF2ByteCount)
2664  : acHeader (NTV2_TYPE_ACXFER, sizeof(AUTOCIRCULATE_TRANSFER)),
2665  acVideoBuffer (pInVideoBuffer, inVideoByteCount),
2666  acAudioBuffer (pInAudioBuffer, inAudioByteCount),
2667  acANCBuffer (pInANCBuffer, inANCByteCount),
2668  acANCField2Buffer (pInANCF2Buffer, inANCF2ByteCount),
2669  acOutputTimeCodes (NTV2_MAX_NUM_TIMECODE_INDEXES * sizeof (NTV2_RP188)),
2670  acTransferStatus (),
2671  acInUserCookie (0),
2672  acInVideoDMAOffset (0),
2673  acInSegmentedDMAInfo (),
2674  acColorCorrection (),
2675  acFrameBufferFormat (NTV2_FBF_10BIT_YCBCR),
2676  acFrameBufferOrientation (NTV2_FRAMEBUFFER_ORIENTATION_TOPDOWN),
2677  acVidProcInfo (),
2678  acVideoQuarterSizeExpand (NTV2_QuarterSizeExpandOff),
2679  acPeerToPeerFlags (0),
2680  acFrameRepeatCount (1),
2681  acDesiredFrame (-1),
2682  acRP188 (),
2683  acCrosspoint (NTV2CROSSPOINT_INVALID)
2684 {
2688 }
2689 
2690 
2692 {
2693 }
2694 
2695 
2696 bool AUTOCIRCULATE_TRANSFER::SetBuffers (ULWord * pInVideoBuffer, const ULWord inVideoByteCount,
2697  ULWord * pInAudioBuffer, const ULWord inAudioByteCount,
2698  ULWord * pInANCBuffer, const ULWord inANCByteCount,
2699  ULWord * pInANCF2Buffer, const ULWord inANCF2ByteCount)
2700 {
2702  return SetVideoBuffer (pInVideoBuffer, inVideoByteCount)
2703  && SetAudioBuffer (pInAudioBuffer, inAudioByteCount)
2704  && SetAncBuffers (pInANCBuffer, inANCByteCount, pInANCF2Buffer, inANCF2ByteCount);
2705 }
2706 
2707 
2708 bool AUTOCIRCULATE_TRANSFER::SetVideoBuffer (ULWord * pInVideoBuffer, const ULWord inVideoByteCount)
2709 {
2711  acVideoBuffer.Set (pInVideoBuffer, inVideoByteCount);
2712  return true;
2713 }
2714 
2715 
2716 bool AUTOCIRCULATE_TRANSFER::SetAudioBuffer (ULWord * pInAudioBuffer, const ULWord inAudioByteCount)
2717 {
2719  acAudioBuffer.Set (pInAudioBuffer, inAudioByteCount);
2720  return true;
2721 }
2722 
2723 
2724 bool AUTOCIRCULATE_TRANSFER::SetAncBuffers (ULWord * pInANCBuffer, const ULWord inANCByteCount, ULWord * pInANCF2Buffer, const ULWord inANCF2ByteCount)
2725 {
2727  acANCBuffer.Set (pInANCBuffer, inANCByteCount);
2728  acANCField2Buffer.Set (pInANCF2Buffer, inANCF2ByteCount);
2729  return true;
2730 }
2731 
2733 
2734 
2736 {
2738  ULWord maxNumValues (acOutputTimeCodes.GetByteCount() / sizeof(NTV2_RP188));
2739  NTV2_RP188 * pArray (reinterpret_cast<NTV2_RP188*>(acOutputTimeCodes.GetHostPointer()));
2740  if (!pArray)
2741  return false;
2742  if (maxNumValues > NTV2_MAX_NUM_TIMECODE_INDEXES)
2743  maxNumValues = NTV2_MAX_NUM_TIMECODE_INDEXES;
2744 
2745  for (UWord ndx (0); ndx < UWord(maxNumValues); ndx++)
2746  {
2747  const NTV2TCIndex tcIndex (static_cast<NTV2TCIndex>(ndx));
2748  NTV2TimeCodesConstIter iter (inValues.find(tcIndex));
2749  pArray[ndx] = (iter != inValues.end()) ? iter->second : INVALID_TIMECODE_VALUE;
2750  } // for each possible NTV2TCSource value
2751  return true;
2752 }
2753 
2754 
2755 bool AUTOCIRCULATE_TRANSFER::SetOutputTimeCode (const NTV2_RP188 & inTimeCode, const NTV2TCIndex inTCIndex)
2756 {
2758  ULWord maxNumValues (acOutputTimeCodes.GetByteCount() / sizeof(NTV2_RP188));
2759  NTV2_RP188 * pArray (reinterpret_cast<NTV2_RP188*>(acOutputTimeCodes.GetHostPointer()));
2760  if (!pArray)
2761  return false;
2762  if (maxNumValues > NTV2_MAX_NUM_TIMECODE_INDEXES)
2763  maxNumValues = NTV2_MAX_NUM_TIMECODE_INDEXES;
2764  if (!NTV2_IS_VALID_TIMECODE_INDEX(inTCIndex))
2765  return false;
2766 
2767  pArray[inTCIndex] = inTimeCode;
2768  return true;
2769 }
2770 
2771 bool AUTOCIRCULATE_TRANSFER::SetAllOutputTimeCodes (const NTV2_RP188 & inTimeCode, const bool inIncludeF2)
2772 {
2774  ULWord maxNumValues (acOutputTimeCodes.GetByteCount() / sizeof(NTV2_RP188));
2775  NTV2_RP188 * pArray (reinterpret_cast<NTV2_RP188*>(acOutputTimeCodes.GetHostPointer()));
2776  if (!pArray)
2777  return false;
2778  if (maxNumValues > NTV2_MAX_NUM_TIMECODE_INDEXES)
2779  maxNumValues = NTV2_MAX_NUM_TIMECODE_INDEXES;
2780 
2781  for (ULWord tcIndex(0); tcIndex < maxNumValues; tcIndex++)
2782  if (NTV2_IS_ATC_VITC2_TIMECODE_INDEX(tcIndex))
2783  pArray[tcIndex] = inIncludeF2 ? inTimeCode : INVALID_TIMECODE_VALUE;
2784  else
2785  pArray[tcIndex] = inTimeCode;
2786  return true;
2787 }
2788 
2789 
2791 {
2793  if (!NTV2_IS_VALID_FRAME_BUFFER_FORMAT (inNewFormat))
2794  return false;
2795  acFrameBufferFormat = inNewFormat;
2796  return true;
2797 }
2798 
2799 
2801 {
2803  SetBuffers (AJA_NULL, 0, AJA_NULL, 0, AJA_NULL, 0, AJA_NULL, 0);
2804 }
2805 
2806 
2807 bool AUTOCIRCULATE_TRANSFER::EnableSegmentedDMAs (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow,
2808  const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow)
2809 {
2811  // Cannot allow segmented DMAs if video buffer was self-allocated by the SDK, since the video buffer size holds the segment size (in bytes)...
2813  return false; // Disallow
2814  acInSegmentedDMAInfo.Set (inNumSegments, inNumActiveBytesPerRow, inHostBytesPerRow, inDeviceBytesPerRow);
2815  return true;
2816 }
2817 
2818 
2820 {
2823  return true;
2824 }
2825 
2826 
2828 {
2831 }
2832 
2833 
2835 {
2837  return acTransferStatus.acFrameStamp.GetInputTimeCodes (outValues);
2838 }
2839 
2840 
2841 bool AUTOCIRCULATE_TRANSFER::GetInputTimeCode (NTV2_RP188 & outTimeCode, const NTV2TCIndex inTCIndex) const
2842 {
2844  return acTransferStatus.acFrameStamp.GetInputTimeCode (outTimeCode, inTCIndex);
2845 }
2846 
2847 
2848 bool AUTOCIRCULATE_TRANSFER::GetInputTimeCodes (NTV2TimeCodes & outTimeCodes, const NTV2Channel inSDIInput, const bool inValidOnly) const
2849 {
2851  return acTransferStatus.acFrameStamp.GetInputTimeCodes (outTimeCodes, inSDIInput, inValidOnly);
2852 }
2853 
2854 
2856  : mHeader (NTV2_TYPE_AJADEBUGLOGGING, sizeof (NTV2DebugLogging)),
2857  mSharedMemory (inEnable ? AJADebug::GetPrivateDataLoc() : AJA_NULL, inEnable ? AJADebug::GetPrivateDataLen() : 0)
2858 {
2859 }
2860 
2861 
2862 ostream & NTV2DebugLogging::Print (ostream & inOutStream) const
2863 {
2865  inOutStream << mHeader << " shMem=" << mSharedMemory << " " << mTrailer;
2866  return inOutStream;
2867 }
2868 
2869 
2870 
2872  : mHeader (NTV2_TYPE_AJABUFFERLOCK, sizeof(NTV2BufferLock))
2873 {
2875  SetFlags(0);
2876  SetMaxLockSize(0);
2877 }
2878 
2879 NTV2BufferLock::NTV2BufferLock (const NTV2Buffer & inBuffer, const ULWord inFlags)
2880  : mHeader (NTV2_TYPE_AJABUFFERLOCK, sizeof(NTV2BufferLock))
2881 {
2883  SetBuffer(inBuffer);
2884  SetFlags(inFlags);
2885  SetMaxLockSize(0);
2886 }
2887 
2888 NTV2BufferLock::NTV2BufferLock(const ULWord * pInBuffer, const ULWord inByteCount, const ULWord inFlags)
2889  : mHeader (NTV2_TYPE_AJABUFFERLOCK, sizeof(NTV2BufferLock))
2890 {
2892  SetBuffer (NTV2Buffer(pInBuffer, inByteCount));
2893  SetFlags (inFlags);
2894  SetMaxLockSize(0);
2895 }
2896 
2897 NTV2BufferLock::NTV2BufferLock(const ULWord64 inMaxLockSize, const ULWord inFlags)
2898  : mHeader (NTV2_TYPE_AJABUFFERLOCK, sizeof(NTV2BufferLock))
2899 {
2901  SetBuffer (NTV2Buffer());
2902  SetFlags (inFlags);
2903  SetMaxLockSize(inMaxLockSize);
2904 }
2905 
2906 bool NTV2BufferLock::SetBuffer (const NTV2Buffer & inBuffer)
2907 { // Just use address & length (don't deep copy)...
2909  return mBuffer.Set (inBuffer.GetHostPointer(), inBuffer.GetByteCount());
2910 }
2911 
2912 ostream & NTV2BufferLock::Print (ostream & inOutStream) const
2913 {
2915  inOutStream << mHeader << mBuffer << " flags=" << xHEX0N(mFlags,8) << " " << mTrailer;
2916  return inOutStream;
2917 }
2918 
2919 
2921  : mHeader (NTV2_TYPE_AJABITSTREAM, sizeof(NTV2Bitstream))
2922 {
2924 }
2925 
2926 NTV2Bitstream::NTV2Bitstream (const NTV2Buffer & inBuffer, const ULWord inFlags)
2927  : mHeader (NTV2_TYPE_AJABITSTREAM, sizeof(NTV2Bitstream))
2928 {
2930  SetBuffer(inBuffer);
2931  SetFlags(inFlags);
2932 }
2933 
2934 NTV2Bitstream::NTV2Bitstream(const ULWord * pInBuffer, const ULWord inByteCount, const ULWord inFlags)
2935  : mHeader (NTV2_TYPE_AJABITSTREAM, sizeof(NTV2Bitstream))
2936 {
2938  SetBuffer (NTV2Buffer(pInBuffer, inByteCount));
2939  SetFlags (inFlags);
2940 }
2941 
2942 bool NTV2Bitstream::SetBuffer (const NTV2Buffer & inBuffer)
2943 { // Just use address & length (don't deep copy)...
2945  return mBuffer.Set (inBuffer.GetHostPointer(), inBuffer.GetByteCount());
2946 }
2947 
2948 ostream & NTV2Bitstream::Print (ostream & inOutStream) const
2949 {
2951  inOutStream << mHeader << mBuffer << " flags=" << xHEX0N(mFlags,8) << " " << mTrailer;
2952  return inOutStream;
2953 }
2954 
2956  : mHeader (NTV2_TYPE_AJASTREAMCHANNEL, sizeof(NTV2StreamChannel))
2957 {
2959 }
2960 
2961 ostream & NTV2StreamChannel::Print (ostream & inOutStream) const
2962 {
2964  inOutStream << mHeader << mChannel << " flags=" << xHEX0N(mFlags,8) << xHEX0N(mStatus, 8) << " " << mTrailer;
2965  return inOutStream;
2966 }
2967 
2969  : mHeader (NTV2_TYPE_AJASTREAMBUFFER, sizeof(NTV2StreamBuffer))
2970 {
2972 }
2973 
2974 ostream & NTV2StreamBuffer::Print (ostream & inOutStream) const
2975 {
2977  inOutStream << mHeader << mChannel << " flags=" << xHEX0N(mFlags,8) << xHEX0N(mStatus, 8) << " " << mTrailer;
2978  return inOutStream;
2979 }
2980 
2982  : mHeader (NTV2_TYPE_GETREGS, sizeof(NTV2GetRegisters)),
2983  mInNumRegisters (ULWord (inRegisterNumbers.size ())),
2984  mOutNumRegisters (0)
2985 {
2987  ResetUsing (inRegisterNumbers);
2988 }
2989 
2990 
2992  : mHeader (NTV2_TYPE_GETREGS, sizeof(NTV2GetRegisters)),
2993  mInNumRegisters (ULWord (inRegReads.size ())),
2994  mOutNumRegisters (0)
2995 {
2997  ResetUsing (inRegReads);
2998 }
2999 
3000 
3001 bool NTV2GetRegisters::ResetUsing (const NTV2RegNumSet & inRegisterNumbers)
3002 {
3004  mInNumRegisters = ULWord(inRegisterNumbers.size());
3005  mOutNumRegisters = 0;
3006  bool result ( mInRegisters.Allocate(mInNumRegisters * sizeof(ULWord))
3007  && mOutGoodRegisters.Allocate(mInNumRegisters * sizeof(ULWord))
3008  && mOutValues.Allocate(mInNumRegisters * sizeof(ULWord)));
3009  if (!result)
3010  return false;
3011  mInRegisters.Fill(ULWord(0)); mOutGoodRegisters.Fill(ULWord(0)); mOutValues.Fill(ULWord(0));
3012 
3013  ULWord * pRegArray(mInRegisters);
3014  if (!pRegArray)
3015  return false;
3016 
3017  ULWord ndx(0);
3018  for (NTV2RegNumSetConstIter iter(inRegisterNumbers.begin()); iter != inRegisterNumbers.end(); ++iter)
3019  pRegArray[ndx++] = *iter;
3020  return (ndx * sizeof(ULWord)) == mInRegisters.GetByteCount();
3021 }
3022 
3024 {
3025  outRegNums.clear();
3026  if (!mInNumRegisters)
3027  return true; // None requested
3028  if (!mInRegisters)
3029  return false; // Empty/NULL reg num buffer
3030  if (mInRegisters.GetByteCount()/4 < mInNumRegisters)
3031  return false; // Sanity check failed: Reg num buffer too small
3032 
3033  const ULWord * pRegNums(mInRegisters);
3034  for (ULWord ndx(0); ndx < mInNumRegisters; ndx++)
3035  if (outRegNums.find(pRegNums[ndx]) == outRegNums.end())
3036  outRegNums.insert(pRegNums[ndx]);
3037  return true;
3038 }
3039 
3040 
3042 {
3044  outGoodRegNums.clear();
3045  if (!mOutGoodRegisters)
3046  return false; // Empty/NULL 'mOutGoodRegisters' array!
3047  if (!mOutNumRegisters)
3048  return false; // The driver says zero successfully read!
3049  if (mOutNumRegisters > mInNumRegisters)
3050  return false; // Sanity check failed: mOutNumRegisters must be less than or equal to mInNumRegisters!
3051 
3052  const ULWord * pRegArray (mOutGoodRegisters);
3053  for (ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3054  outGoodRegNums.insert(pRegArray[ndx]);
3055  return true;
3056 }
3057 
3059 {
3061  outBadRegNums.clear();
3062  NTV2RegNumSet reqRegNums, goodRegNums;
3063  if (!GetRequestedRegisterNumbers(reqRegNums))
3064  return false;
3065  if (!GetGoodRegisters(goodRegNums))
3066  return false;
3067  if (reqRegNums == goodRegNums)
3068  return true; // Requested reg nums identical to those that were read successfully
3069 
3070  // Subtract goodRegNums from reqRegNums...
3071  std::set_difference (reqRegNums.begin(), reqRegNums.end(),
3072  goodRegNums.begin(), goodRegNums.end(),
3073  std::inserter(outBadRegNums, outBadRegNums.begin()));
3074  return true;
3075 }
3076 
3077 bool NTV2GetRegisters::PatchRegister (const ULWord inRegNum, const ULWord inValue)
3078 {
3079  if (!mOutGoodRegisters)
3080  return false; // Empty/null 'mOutGoodRegisters' array!
3081  if (!mOutNumRegisters)
3082  return false; // Driver says zero successfully read!
3083  if (mOutNumRegisters > mInNumRegisters)
3084  return false; // Sanity check failed: mOutNumRegisters must be less than or equal to mInNumRegisters!
3085  if (!mOutValues)
3086  return false; // Empty/null 'mOutValues' array!
3087  if (mOutGoodRegisters.GetByteCount() != mOutValues.GetByteCount())
3088  return false; // Sanity check failed: These sizes should match
3089  const ULWord * pRegArray (mOutGoodRegisters);
3090  ULWord * pValArray (mOutValues);
3091  for (ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3092  if (pRegArray[ndx] == inRegNum)
3093  {
3094  pValArray[ndx] = inValue;
3095  return true;
3096  }
3097  return false; // Not found
3098 }
3099 
3100 
3102 {
3104  outValues.clear ();
3105  if (!mOutGoodRegisters)
3106  return false; // Empty/null 'mOutGoodRegisters' array!
3107  if (!mOutNumRegisters)
3108  return false; // Driver says zero successfully read!
3109  if (mOutNumRegisters > mInNumRegisters)
3110  return false; // Sanity check failed: mOutNumRegisters must be less than or equal to mInNumRegisters!
3111  if (!mOutValues)
3112  return false; // Empty/null 'mOutValues' array!
3113  if (mOutGoodRegisters.GetByteCount() != mOutValues.GetByteCount())
3114  return false; // Sanity check failed: These sizes should match
3115 
3116  const ULWord * pRegArray (mOutGoodRegisters);
3117  const ULWord * pValArray (mOutValues);
3118  for (ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3119  outValues [pRegArray[ndx]] = pValArray[ndx];
3120  return true;
3121 }
3122 
3123 
3125 {
3126  NTV2RegisterValueMap regValMap;
3127  if (!GetRegisterValues(regValMap))
3128  return false;
3129 
3130  if (outValues.empty())
3131  {
3132  for (NTV2RegValueMapConstIter it(regValMap.begin()); it != regValMap.end(); ++it)
3133  outValues.push_back(NTV2RegInfo(/*regNum*/it->first, /*regVal*/it->second));
3134  return true;
3135  }
3136  else
3137  {
3138  uint32_t missingTally(0);
3139  for (NTV2RegisterReadsIter it (outValues.begin()); it != outValues.end(); ++it)
3140  {
3141  NTV2RegValueMapConstIter mapIter(regValMap.find(it->registerNumber));
3142  if (mapIter == regValMap.end())
3143  missingTally++; // Missing register
3144  it->registerValue = mapIter->second;
3145  }
3146  return !missingTally;
3147  }
3148 }
3149 
3150 
3151 ostream & NTV2GetRegisters::Print (ostream & inOutStream) const
3152 {
3153  inOutStream << mHeader << ", numRegs=" << mInNumRegisters << ", inRegs=" << mInRegisters << ", outNumGoodRegs=" << mOutNumRegisters
3154  << ", outGoodRegs=" << mOutGoodRegisters << ", outValues=" << mOutValues << ", " << mTrailer;
3155  return inOutStream;
3156 }
3157 
3158 
3160  : mHeader (NTV2_TYPE_SETREGS, sizeof(NTV2SetRegisters)),
3161  mInNumRegisters (ULWord(inRegWrites.size())),
3162  mOutNumFailures (0)
3163 {
3164  ResetUsing(inRegWrites);
3165 }
3166 
3167 
3169 {
3171  mInNumRegisters = ULWord(inRegWrites.size());
3172  mOutNumFailures = 0;
3173  const bool result (mInRegInfos.Allocate (mInNumRegisters * sizeof(NTV2RegInfo))
3175  if (!result)
3176  return false;
3177 
3178  ULWord ndx (0);
3179  NTV2RegInfo * pRegInfoArray (mInRegInfos);
3180  UWord * pBadRegIndexes (mOutBadRegIndexes);
3181 
3182  for (NTV2RegisterWritesConstIter it(inRegWrites.begin()); it != inRegWrites.end(); ++it)
3183  {
3184  if (pBadRegIndexes)
3185  pBadRegIndexes[ndx] = 0;
3186  if (pRegInfoArray)
3187  pRegInfoArray[ndx++] = *it;
3188  }
3189  NTV2_ASSERT((ndx * sizeof(NTV2RegInfo)) == mInRegInfos.GetByteCount());
3190  NTV2_ASSERT((ndx * sizeof(UWord)) == mOutBadRegIndexes.GetByteCount());
3191  return result;
3192 }
3193 
3194 
3196 {
3198  outFailedRegWrites.clear();
3199  return true;
3200 }
3201 
3203 {
3204  outRegWrites.clear();
3205  if (!mInNumRegisters)
3206  return false;
3207  if (!mInRegInfos)
3208  return false;
3209 
3210  outRegWrites.reserve(size_t(mInNumRegisters));
3211  const NTV2RegInfo * pRegInfos(mInRegInfos);
3212  for (ULWord ndx(0); ndx < mInNumRegisters; ndx++)
3213  outRegWrites.push_back(pRegInfos[ndx]);
3214  return true;
3215 }
3216 
3217 ostream & NTV2SetRegisters::Print (ostream & oss) const
3218 {
3220  oss << mHeader << ": numRegs=" << mInNumRegisters << " inRegInfos=" << mInRegInfos << " numFailures=" << DEC(mOutNumFailures)
3221  << " outBadRegIndexes=" << mOutBadRegIndexes << ": " << mTrailer;
3222  const UWord * pBadRegIndexes (mOutBadRegIndexes);
3223  const UWord maxNumBadRegIndexes (UWord(mOutBadRegIndexes.GetByteCount() / sizeof(UWord)));
3224  const NTV2RegInfo * pRegInfoArray (mInRegInfos);
3225  const UWord maxNumRegInfos (UWord(mInRegInfos.GetByteCount() / sizeof(NTV2RegInfo)));
3226  if (pBadRegIndexes && maxNumBadRegIndexes && pRegInfoArray && maxNumRegInfos && mOutNumFailures)
3227  {
3228  oss << endl;
3229  for (UWord num(0); num < maxNumBadRegIndexes; num++)
3230  {
3231  const UWord badRegIndex (pBadRegIndexes[num]);
3232  if (badRegIndex < maxNumRegInfos)
3233  {
3234  const NTV2RegInfo & badRegInfo (pRegInfoArray[badRegIndex]);
3235  oss << "Failure " << num << ": " << badRegInfo << endl;
3236  }
3237  }
3238  }
3239  return oss;
3240 }
3241 
3242 
3243 bool NTV2RegInfo::operator < (const NTV2RegInfo & inRHS) const
3244 {
3245  typedef std::pair <ULWord, ULWord> ULWordPair;
3246  typedef std::pair <ULWordPair, ULWordPair> ULWordPairs;
3247  const ULWordPairs rhs (ULWordPair (inRHS.registerNumber, inRHS.registerValue), ULWordPair (inRHS.registerMask, inRHS.registerShift));
3248  const ULWordPairs mine(ULWordPair (registerNumber, registerValue), ULWordPair (registerMask, registerShift));
3249  return mine < rhs;
3250 }
3251 
3252 ostream & NTV2RegInfo::Print (ostream & oss, const bool inAsCode) const
3253 {
3254  if (inAsCode)
3255  return PrintCode(oss);
3257  oss << "[" << regName << "|" << DEC(registerNumber) << ": val=" << xHEX0N(registerValue,8);
3258  if (registerMask != 0xFFFFFFFF)
3259  oss << " msk=" << xHEX0N(registerMask,8);
3260  if (registerShift)
3261  oss << " shf=" << DEC(registerShift);
3262  return oss << "]";
3263 }
3264 
3265 ostream & NTV2RegInfo::PrintCode (ostream & oss, const int inRadix, const NTV2DeviceID inDeviceID) const
3266 {
3268  const bool readOnly (CNTV2RegisterExpert::IsReadOnly(registerNumber));
3269  const bool badName (regName.find(' ') != string::npos);
3270  if (readOnly)
3271  oss << "//\t";
3272  oss << "theDevice.WriteRegister (";
3273  if (badName)
3274  oss << DEC(registerNumber);
3275  else
3276  oss << regName;
3277  switch (inRadix)
3278  {
3279  case 2: oss << ", " << BIN032(registerValue); break;
3280  case 8: oss << ", " << OCT(registerValue); break;
3281  case 10: oss << ", " << DEC(registerValue); break;
3282  default: oss << ", " << xHEX0N(registerValue,8); break;
3283  }
3284  if (registerMask != 0xFFFFFFFF)
3285  switch (inRadix)
3286  {
3287  case 2: oss << ", " << BIN032(registerMask); break;
3288  case 8: oss << ", " << OCT(registerMask); break;
3289  case 10: oss << ", " << DEC(registerMask); break;
3290  default: oss << ", " << xHEX0N(registerMask,8); break;
3291  }
3292  if (registerShift)
3293  oss << ", " << DEC(registerShift);
3294  oss << "); // ";
3295  if (badName)
3296  oss << regName;
3297  else
3298  oss << "Reg " << DEC(registerNumber);
3299  // Decode the reg value...
3301  if (!info.empty()) // and add to end of comment
3302  oss << " // " << aja::replace(info, "\n", ", ");
3303  return oss;
3304 }
3305 
3306 
3307 ostream & NTV2PrintULWordVector (const NTV2ULWordVector & inObj, ostream & inOutStream)
3308 {
3309  for (NTV2ULWordVector::const_iterator it(inObj.begin()); it != inObj.end(); ++it)
3310  inOutStream << " " << HEX0N(*it,8);
3311  return inOutStream;
3312 }
3313 
3314 
3315 ostream & NTV2PrintChannelList (const NTV2ChannelList & inObj, const bool inCompact, ostream & inOutStream)
3316 {
3317  inOutStream << (inCompact ? "Ch[" : "[");
3318  for (NTV2ChannelListConstIter it(inObj.begin()); it != inObj.end(); )
3319  {
3320  if (inCompact)
3321  inOutStream << DEC(*it+1);
3322  else
3323  inOutStream << ::NTV2ChannelToString(*it);
3324  if (++it != inObj.end())
3325  inOutStream << (inCompact ? "|" : ",");
3326  }
3327  return inOutStream << "]";
3328 }
3329 
3330 string NTV2ChannelListToStr (const NTV2ChannelList & inObj, const bool inCompact)
3331 { ostringstream oss;
3332  ::NTV2PrintChannelList (inObj, inCompact, oss);
3333  return oss.str();
3334 }
3335 
3336 ostream & NTV2PrintChannelSet (const NTV2ChannelSet & inObj, const bool inCompact, ostream & inOutStream)
3337 {
3338  inOutStream << (inCompact ? "Ch{" : "{");
3339  for (NTV2ChannelSetConstIter it(inObj.begin()); it != inObj.end(); )
3340  {
3341  if (inCompact)
3342  inOutStream << DEC(*it+1);
3343  else
3344  inOutStream << ::NTV2ChannelToString(*it);
3345  if (++it != inObj.end())
3346  inOutStream << (inCompact ? "|" : ",");
3347  }
3348  return inOutStream << "}";
3349 }
3350 
3351 string NTV2ChannelSetToStr (const NTV2ChannelSet & inObj, const bool inCompact)
3352 { ostringstream oss;
3353  ::NTV2PrintChannelSet (inObj, inCompact, oss);
3354  return oss.str();
3355 }
3356 
3357 NTV2ChannelSet NTV2MakeChannelSet (const NTV2Channel inFirstChannel, const UWord inNumChannels)
3358 {
3359  NTV2ChannelSet result;
3360  for (NTV2Channel ch(inFirstChannel); ch < NTV2Channel(inFirstChannel+inNumChannels); ch = NTV2Channel(ch+1))
3361  if (NTV2_IS_VALID_CHANNEL(ch))
3362  result.insert(ch);
3363  return result;
3364 }
3365 
3367 {
3368  NTV2ChannelSet result;
3369  for (NTV2ChannelListConstIter it(inChannels.begin()); it != inChannels.end(); ++it)
3370  result.insert(*it);
3371  return result;
3372 }
3373 
3374 NTV2ChannelList NTV2MakeChannelList (const NTV2Channel inFirstChannel, const UWord inNumChannels)
3375 {
3376  NTV2ChannelList result;
3377  for (NTV2Channel ch(inFirstChannel); ch < NTV2Channel(inFirstChannel+inNumChannels); ch = NTV2Channel(ch+1))
3378  if (NTV2_IS_VALID_CHANNEL(ch))
3379  result.push_back(ch);
3380  return result;
3381 }
3382 
3384 {
3385  NTV2ChannelList result;
3386  for (NTV2ChannelSetConstIter it(inChannels.begin()); it != inChannels.end(); ++it)
3387  result.push_back(*it);
3388  return result;
3389 }
3390 
3391 ostream & NTV2PrintAudioSystemSet (const NTV2AudioSystemSet & inObj, const bool inCompact, std::ostream & inOutStream)
3392 {
3393  inOutStream << (inCompact ? "AudSys{" : "{");
3394  for (NTV2AudioSystemSetConstIter it(inObj.begin()); it != inObj.end(); )
3395  {
3396  if (inCompact)
3397  inOutStream << DEC(*it+1);
3398  else
3399  inOutStream << ::NTV2AudioSystemToString(*it);
3400  if (++it != inObj.end())
3401  inOutStream << (inCompact ? "|" : ",");
3402  }
3403  return inOutStream << "}";
3404 }
3405 
3406 string NTV2AudioSystemSetToStr (const NTV2AudioSystemSet & inObj, const bool inCompact)
3407 { ostringstream oss;
3408  ::NTV2PrintAudioSystemSet (inObj, inCompact, oss);
3409  return oss.str();
3410 }
3411 
3412 NTV2AudioSystemSet NTV2MakeAudioSystemSet (const NTV2AudioSystem inFirstAudioSystem, const UWord inCount)
3413 {
3414  NTV2AudioSystemSet result;
3415  for (NTV2AudioSystem audSys(inFirstAudioSystem); audSys < NTV2AudioSystem(inFirstAudioSystem+inCount); audSys = NTV2AudioSystem(audSys+1))
3416  if (NTV2_IS_VALID_AUDIO_SYSTEM(audSys))
3417  result.insert(audSys);
3418  return result;
3419 }
3420 
3422 {
3423  NTV2RegNumSet result;
3424  for (NTV2RegisterReadsConstIter it(inRegInfos.begin()); it != inRegInfos.end(); ++it)
3425  if (result.find(it->registerNumber) == result.end())
3426  result.insert(it->registerNumber);
3427  return result;
3428 }
3429 
3431 {
3432  for (NTV2RegisterReadsConstIter iter(inRegInfos.begin()); iter != inRegInfos.end(); ++iter) // Ugh -- linear search
3433  if (iter->registerNumber == inRegNum)
3434  return iter;
3435  return inRegInfos.end();
3436 }
3437 
3438 
3439 ostream & operator << (std::ostream & inOutStream, const NTV2RegInfo & inObj)
3440 {
3441  return inObj.Print(inOutStream);
3442 }
3443 
3444 
3445 ostream & operator << (ostream & inOutStream, const NTV2RegisterWrites & inObj)
3446 {
3447  inOutStream << inObj.size () << " regs:" << endl;
3448  for (NTV2RegisterWritesConstIter iter (inObj.begin ()); iter != inObj.end (); ++iter)
3449  inOutStream << *iter << endl;
3450  return inOutStream;
3451 }
3452 
3453 
3454 NTV2BankSelGetSetRegs::NTV2BankSelGetSetRegs (const NTV2RegInfo & inBankSelect, const NTV2RegInfo & inOutRegInfo, const bool inDoWrite)
3455  : mHeader (NTV2_TYPE_BANKGETSET, sizeof (NTV2BankSelGetSetRegs)),
3456  mIsWriting (inDoWrite), // Default to reading
3457  mInBankInfos (sizeof(NTV2RegInfo)), // Room for one bank select
3458  mInRegInfos (sizeof(NTV2RegInfo)) // Room for one register read or write
3459 {
3460  NTV2RegInfo * pRegInfo (mInBankInfos);
3461  if (pRegInfo)
3462  *pRegInfo = inBankSelect; // Store bank select regInfo
3463  pRegInfo = mInRegInfos;
3464  if (pRegInfo)
3465  *pRegInfo = inOutRegInfo; // Store regInfo
3467 }
3468 
3469 
3471 {
3473  NTV2RegInfo result;
3474  if (mInRegInfos)
3475  {
3476  const NTV2RegInfo * pRegInfos (mInRegInfos);
3477  const ULWord maxNum (mInRegInfos.GetByteCount() / ULWord(sizeof(NTV2RegInfo)));
3478  if (ULWord(inIndex0) < maxNum)
3479  result = pRegInfos[inIndex0];
3480  }
3481  return result;
3482 }
3483 
3484 
3485 ostream & NTV2BankSelGetSetRegs::Print (ostream & oss) const
3486 {
3488  const NTV2RegInfo * pBankRegInfo (mInBankInfos);
3489  const NTV2RegInfo * pRegInfo (mInRegInfos);
3490  oss << mHeader << (mIsWriting ? " WRIT" : " READ") << " bankReg=";
3491  if (mInBankInfos) oss << *pBankRegInfo; else oss << "-";
3492  oss << " regInfos=";
3493  if (mInRegInfos) oss << *pRegInfo; else oss << "-";
3494  return oss;
3495 }
3496 
3497 
3498 NTV2VirtualData::NTV2VirtualData (const ULWord inTag, const void* inVirtualData, const size_t inVirtualDataSize, const bool inDoWrite)
3499  : mHeader (NTV2_TYPE_VIRTUAL_DATA_RW, sizeof (NTV2VirtualData)),
3500  mTag (inTag), // setup tag
3501  mIsWriting (inDoWrite), // setup write/read
3502  mVirtualData (inVirtualData, inVirtualDataSize) // setup virtual data
3503 {
3505 }
3506 
3507 
3508 ostream & NTV2VirtualData::Print (ostream & inOutStream) const
3509 {
3511  inOutStream << mHeader << ", mTag=" << mTag << ", mIsWriting=" << mIsWriting;
3512  return inOutStream;
3513 }
3514 
3515 using namespace ntv2nub;
3516 
3517  /*********************************************************************************************************************
3518  RPC ENCODE/DECODE FUNCTIONS
3519  *********************************************************************************************************************/
3520  #define AsU8Ref(_x_) reinterpret_cast<uint8_t&>(_x_)
3521  #define AsU16Ref(_x_) reinterpret_cast<uint16_t&>(_x_)
3522  #define AsU32Ref(_x_) reinterpret_cast<uint32_t&>(_x_)
3523  #define AsU64Ref(_x_) reinterpret_cast<uint64_t&>(_x_)
3524 
3526  {
3527  PUSHU32(fHeaderTag, outBlob); // ULWord fHeaderTag
3528  PUSHU32(fType, outBlob); // ULWord fType
3529  PUSHU32(fHeaderVersion, outBlob); // ULWord fHeaderVersion
3530  PUSHU32(fVersion, outBlob); // ULWord fVersion
3531  PUSHU32(fSizeInBytes, outBlob); // ULWord fSizeInBytes
3532  PUSHU32(fPointerSize, outBlob); // ULWord fPointerSize
3533  PUSHU32(fOperation, outBlob); // ULWord fOperation
3534  PUSHU32(fResultStatus, outBlob); // ULWord fResultStatus
3535  return true;
3536  }
3537 
3538  bool NTV2_HEADER::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3539  {
3540  POPU32(fHeaderTag, inBlob, inOutIndex); // ULWord fHeaderTag
3541  POPU32(fType, inBlob, inOutIndex); // ULWord fType
3542  POPU32(fHeaderVersion, inBlob, inOutIndex); // ULWord fHeaderVersion
3543  POPU32(fVersion, inBlob, inOutIndex); // ULWord fVersion
3544  POPU32(fSizeInBytes, inBlob, inOutIndex); // ULWord fSizeInBytes
3545  POPU32(fPointerSize, inBlob, inOutIndex); // ULWord fPointerSize
3546  POPU32(fOperation, inBlob, inOutIndex); // ULWord fOperation
3547  POPU32(fResultStatus, inBlob, inOutIndex); // ULWord fResultStatus
3548  return true;
3549  }
3550 
3552  {
3553  PUSHU32(fTrailerVersion, outBlob); // ULWord fTrailerVersion
3554  PUSHU32(fTrailerTag, outBlob); // ULWord fTrailerTag
3555  return true;
3556  }
3557 
3558  bool NTV2_TRAILER::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3559  {
3560  POPU32(fTrailerVersion, inBlob, inOutIndex); // ULWord fTrailerVersion
3561  POPU32(fTrailerTag, inBlob, inOutIndex); // ULWord fTrailerTag
3562  return true;
3563  }
3564 
3565 
3567  {
3568  PUSHU32(fByteCount, outBlob); // ULWord fByteCount
3569  PUSHU32(fFlags, outBlob); // ULWord fFlags
3570  if (!IsNULL())
3571  AppendU8s(outBlob); // NOTE: My buffer content should already have been made BigEndian, if necessary
3572  return true;
3573  }
3574 
3575  bool NTV2Buffer::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3576  {
3577  ULWord byteCount(0), flags(0);
3578  POPU32(byteCount, inBlob, inOutIndex); // ULWord fByteCount
3579  POPU32(flags, inBlob, inOutIndex); // ULWord fFlags
3580  if (!Allocate(byteCount, flags & NTV2Buffer_PAGE_ALIGNED))
3581  return false;
3582  if ((inOutIndex + byteCount) > inBlob.size())
3583  return false; // past end of inBlob
3584  for (ULWord cnt(0); cnt < byteCount; cnt++)
3585  U8(int(cnt)) = inBlob.at(inOutIndex++); // Caller is responsible for byte-swapping if needed
3586  return true;
3587  }
3588 
3590  {
3591  const size_t totBytes (mHeader.GetSizeInBytes() // Header + natural size of all structs/fields inbetween + Trailer
3592  + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount()); // NTV2Buffer fields
3593  if (outBlob.capacity() < totBytes)
3594  outBlob.reserve(totBytes);
3595  if (!NTV2HostIsBigEndian)
3596  { // All of my NTV2Buffers store arrays of ULWords that must be BigEndian BEFORE encoding into outBlob...
3597  mInRegisters.ByteSwap32();
3598  mOutGoodRegisters.ByteSwap32();
3599  mOutValues.ByteSwap32();
3600  }
3601  bool ok = mHeader.RPCEncode(outBlob); // NTV2_HEADER mHeader
3602  PUSHU32(mInNumRegisters, outBlob); // ULWord mInNumRegisters
3603  ok &= mInRegisters.RPCEncode(outBlob); // NTV2Buffer mInRegisters
3604  PUSHU32(mOutNumRegisters, outBlob); // ULWord mOutNumRegisters
3605  ok &= mOutGoodRegisters.RPCEncode(outBlob) // NTV2Buffer mOutGoodRegisters
3606  && mOutValues.RPCEncode(outBlob) // NTV2Buffer mOutValues
3607  && mTrailer.RPCEncode(outBlob); // NTV2_TRAILER mTrailer
3608  if (!NTV2HostIsBigEndian && !ok)
3609  { // FAILED: Un-byteswap NTV2Buffer data...
3610  mInRegisters.ByteSwap32();
3611  mOutGoodRegisters.ByteSwap32();
3612  mOutValues.ByteSwap32();
3613  }
3614  return ok;
3615  }
3616 
3617  bool NTV2GetRegisters::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3618  {
3619  bool ok = mHeader.RPCDecode(inBlob, inOutIndex); // NTV2_HEADER mHeader
3620  if (!ok) return false;
3621  POPU32(mInNumRegisters, inBlob, inOutIndex); // ULWord mInNumRegisters
3622  ok &= mInRegisters.RPCDecode(inBlob, inOutIndex); // NTV2Buffer mInRegisters
3623  POPU32(mOutNumRegisters, inBlob, inOutIndex); // ULWord mOutNumRegisters
3624  ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex); // NTV2Buffer mOutGoodRegisters
3625  ok &= mOutValues.RPCDecode(inBlob, inOutIndex); // NTV2Buffer mOutValues
3626  ok &= mTrailer.RPCDecode(inBlob, inOutIndex); // NTV2_TRAILER mTrailer
3627  if (!NTV2HostIsBigEndian)
3628  { // Re-byteswap NTV2Buffer data after decoding...
3629  mInRegisters.ByteSwap32();
3630  mOutGoodRegisters.ByteSwap32();
3631  mOutValues.ByteSwap32();
3632  }
3633  return ok;
3634  }
3635 
3637  {
3638  const size_t totBytes (mHeader.GetSizeInBytes() // Header + natural size of all structs/fields inbetween + Trailer
3639  + mInRegInfos.GetByteCount() + mOutBadRegIndexes.GetByteCount()); // NTV2Buffer fields
3640  if (outBlob.capacity() < totBytes)
3641  outBlob.reserve(totBytes);
3642  if (!NTV2HostIsBigEndian)
3643  { // All of my NTV2Buffers store arrays of ULWords that must be BigEndian BEFORE encoding into outBlob...
3644  mInRegInfos.ByteSwap32();
3645  mOutBadRegIndexes.ByteSwap32();
3646  }
3647  bool ok = mHeader.RPCEncode(outBlob); // NTV2_HEADER mHeader
3648  PUSHU32(mInNumRegisters, outBlob); // ULWord mInNumRegisters
3649  ok &= mInRegInfos.RPCEncode(outBlob); // NTV2Buffer mInRegInfos
3650  PUSHU32(mOutNumFailures, outBlob); // ULWord mOutNumFailures
3651  ok &= mOutBadRegIndexes.RPCEncode(outBlob) // NTV2Buffer mOutBadRegIndexes
3652  && mTrailer.RPCEncode(outBlob); // NTV2_TRAILER mTrailer
3653  if (!NTV2HostIsBigEndian && !ok)
3654  { // FAILED: Un-byteswap NTV2Buffer data...
3655  mInRegInfos.ByteSwap32();
3656  mOutBadRegIndexes.ByteSwap16();
3657  }
3658  return ok;
3659  }
3660 
3661  bool NTV2SetRegisters::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3662  {
3663  bool ok = mHeader.RPCDecode(inBlob, inOutIndex); // NTV2_HEADER mHeader
3664  POPU32(mInNumRegisters, inBlob, inOutIndex); // ULWord mInNumRegisters
3665  ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex); // NTV2Buffer mInRegInfos
3666  POPU32(mOutNumFailures, inBlob, inOutIndex); // ULWord mOutNumFailures
3667  ok &= mOutBadRegIndexes.RPCDecode(inBlob, inOutIndex); // NTV2Buffer mOutBadRegIndexes
3668  ok &= mTrailer.RPCDecode(inBlob, inOutIndex); // NTV2_TRAILER mTrailer
3669  if (!NTV2HostIsBigEndian)
3670  { // Re-byteswap NTV2Buffer data after decoding...
3671  mInRegInfos.ByteSwap32();
3672  mOutBadRegIndexes.ByteSwap16();
3673  }
3674  return ok;
3675  }
3676 
3678  {
3679  const size_t totBytes (mHeader.GetSizeInBytes() // Header + natural size of all structs/fields inbetween + Trailer
3680  + mInBankInfos.GetByteCount() + mInRegInfos.GetByteCount()); // NTV2Buffer fields
3681  if (outBlob.capacity() < totBytes)
3682  outBlob.reserve(totBytes);
3683  if (!NTV2HostIsBigEndian)
3684  { // All of my NTV2Buffers store arrays of ULWords that must be BigEndian BEFORE encoding into outBlob...
3685  mInBankInfos.ByteSwap32();
3686  mInRegInfos.ByteSwap32();
3687  }
3688  bool ok = mHeader.RPCEncode(outBlob); // NTV2_HEADER mHeader
3689  PUSHU32(mIsWriting, outBlob); // ULWord mIsWriting
3690  ok &= mInBankInfos.RPCEncode(outBlob); // NTV2Buffer mInBankInfos
3691  ok &= mInRegInfos.RPCEncode(outBlob) // NTV2Buffer mInRegInfos
3692  && mTrailer.RPCEncode(outBlob); // NTV2_TRAILER mTrailer
3693  if (!NTV2HostIsBigEndian && !ok)
3694  { // FAILED: Un-byteswap NTV2Buffer data...
3695  mInBankInfos.ByteSwap32();
3696  mInRegInfos.ByteSwap32();
3697  }
3698  return ok;
3699  }
3700 
3701  bool NTV2BankSelGetSetRegs::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3702  {
3703  bool ok = mHeader.RPCDecode(inBlob, inOutIndex); // NTV2_HEADER mHeader
3704  POPU32(mIsWriting, inBlob, inOutIndex); // ULWord mIsWriting
3705  ok &= mInBankInfos.RPCDecode(inBlob, inOutIndex); // NTV2Buffer mInBankInfos
3706  ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex); // NTV2Buffer mInRegInfos
3707  ok &= mTrailer.RPCDecode(inBlob, inOutIndex); // NTV2_TRAILER mTrailer
3708  if (!NTV2HostIsBigEndian)
3709  { // Re-byteswap NTV2Buffer data after decoding...
3710  mInBankInfos.ByteSwap32();
3711  mInRegInfos.ByteSwap32();
3712  }
3713  return ok;
3714  }
3715 
3717  {
3718  const size_t totBytes (acHeader.GetSizeInBytes()); // Header + natural size of all structs/fields inbetween + Trailer
3719  if (outBlob.capacity() < totBytes)
3720  outBlob.reserve(totBytes);
3721  bool ok = acHeader.RPCEncode(outBlob); // NTV2_HEADER acHeader
3722  PUSHU16(UWord(acCrosspoint), outBlob); // NTV2Crosspoint acCrosspoint
3723  PUSHU16(UWord(acState), outBlob); // NTV2AutoCirculateState acState
3724  PUSHU32(ULWord(acStartFrame), outBlob); // LWord acStartFrame
3725  PUSHU32(ULWord(acEndFrame), outBlob); // LWord acEndFrame
3726  PUSHU32(ULWord(acActiveFrame), outBlob); // LWord acActiveFrame
3727  PUSHU64(acRDTSCStartTime, outBlob); // ULWord64 acRDTSCStartTime
3728  PUSHU64(acAudioClockStartTime, outBlob); // ULWord64 acAudioClockStartTime
3729  PUSHU64(acRDTSCCurrentTime, outBlob); // ULWord64 acRDTSCCurrentTime
3730  PUSHU64(acAudioClockCurrentTime, outBlob); // ULWord64 acAudioClockCurrentTime
3731  PUSHU32(acFramesProcessed, outBlob); // ULWord acFramesProcessed
3732  PUSHU32(acFramesDropped, outBlob); // ULWord acFramesDeopped
3733  PUSHU32(acBufferLevel, outBlob); // ULWord acBufferLevel
3734  PUSHU32(acOptionFlags, outBlob); // ULWord acOptionFlags
3735  PUSHU16(UWord(acAudioSystem), outBlob); // NTV2AudioSystem acAudioSystem
3736  ok &= acTrailer.RPCEncode(outBlob); // NTV2_TRAILER acTrailer
3737  return ok;
3738  }
3739 
3740  bool AUTOCIRCULATE_STATUS::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3741  { uint16_t v16(0); uint32_t v32(0);
3742  bool ok = acHeader.RPCDecode(inBlob, inOutIndex); // NTV2_HEADER acHeader
3743  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint acCrosspoint
3744  acCrosspoint = NTV2Crosspoint(v16);
3745  POPU16(v16, inBlob, inOutIndex); // NTV2AutoCirculateState acState
3746  acState = NTV2AutoCirculateState(v16);
3747  POPU32(v32, inBlob, inOutIndex); // LWord acStartFrame
3748  acStartFrame = LWord(v32);
3749  POPU32(v32, inBlob, inOutIndex); // LWord acEndFrame
3750  acEndFrame = LWord(v32);
3751  POPU32(v32, inBlob, inOutIndex); // LWord acActiveFrame
3752  acActiveFrame = LWord(v32);
3753  POPU64(acRDTSCStartTime, inBlob, inOutIndex); // ULWord64 acRDTSCStartTime
3754  POPU64(acAudioClockStartTime, inBlob, inOutIndex); // ULWord64 acAudioClockStartTime
3755  POPU64(acRDTSCCurrentTime, inBlob, inOutIndex); // ULWord64 acRDTSCCurrentTime
3756  POPU64(acAudioClockCurrentTime, inBlob, inOutIndex); // ULWord64 acAudioClockCurrentTime
3757  POPU32(acFramesProcessed, inBlob, inOutIndex); // ULWord acFramesProcessed
3758  POPU32(acFramesDropped, inBlob, inOutIndex); // ULWord acFramesDropped
3759  POPU32(acBufferLevel, inBlob, inOutIndex); // ULWord acBufferLevel
3760  POPU32(acOptionFlags, inBlob, inOutIndex); // ULWord acOptionFlags
3761  POPU16(v16, inBlob, inOutIndex); // NTV2AudioSystem acAudioSystem
3762  acAudioSystem = NTV2AudioSystem(v16);
3763  ok &= acTrailer.RPCDecode(inBlob, inOutIndex); // NTV2_TRAILER acTrailer
3764  return ok;
3765  }
3766 
3768  {
3769  const size_t totBytes (acHeader.GetSizeInBytes()); // Header + natural size of all structs/fields inbetween + Trailer
3770  if (outBlob.capacity() < totBytes)
3771  outBlob.reserve(totBytes);
3772  bool ok = acHeader.RPCEncode(outBlob); // NTV2_HEADER acHeader
3773  PUSHU64(ULWord64(acFrameTime), outBlob); // LWord64 acFrameTime
3774  PUSHU32(acRequestedFrame, outBlob); // ULWord acRequestedFrame
3775  PUSHU64(acAudioClockTimeStamp, outBlob); // ULWord64 acAudioClockTimeStamp
3776  PUSHU32(acAudioExpectedAddress, outBlob); // ULWord acAudioExpectedAddress
3777  PUSHU32(acAudioInStartAddress, outBlob); // ULWord acAudioInStartAddress
3778  PUSHU32(acAudioInStopAddress, outBlob); // ULWord acAudioInStopAddress
3779  PUSHU32(acAudioOutStopAddress, outBlob); // ULWord acAudioOutStopAddress
3780  PUSHU32(acAudioOutStartAddress, outBlob); // ULWord acAudioOutStartAddress
3781  PUSHU32(acTotalBytesTransferred, outBlob); // ULWord acTotalBytesTransferred
3782  PUSHU32(acStartSample, outBlob); // ULWord acStartSample
3783 
3784  ok &= acTimeCodes.RPCEncode(outBlob); // NTV2Buffer acTimeCodes
3785  PUSHU64(ULWord64(acCurrentTime), outBlob); // LWord64 acCurrentTime
3786  PUSHU32(acCurrentFrame, outBlob); // ULWord acCurrentFrame
3787  PUSHU64(ULWord64(acCurrentFrameTime), outBlob); // LWord64 acCurrentFrameTime
3788  PUSHU64(acAudioClockCurrentTime, outBlob); // ULWord64 acAudioClockCurrentTime
3789  PUSHU32(acCurrentAudioExpectedAddress, outBlob); // ULWord acCurrentAudioExpectedAddress
3790  PUSHU32(acCurrentAudioStartAddress, outBlob); // ULWord acCurrentAudioStartAddress
3791  PUSHU32(acCurrentFieldCount, outBlob); // ULWord acCurrentFieldCount
3792  PUSHU32(acCurrentLineCount, outBlob); // ULWord acCurrentLineCount
3793  PUSHU32(acCurrentReps, outBlob); // ULWord acCurrentReps
3794  PUSHU64(acCurrentUserCookie, outBlob); // ULWord64 acCurrentUserCookie
3795  PUSHU32(acFrame, outBlob); // ULWord acFrame
3796  PUSHU32(acRP188.fDBB, outBlob); // ULWord acRP188.fDBB
3797  PUSHU32(acRP188.fLo, outBlob); // ULWord acRP188.fLo
3798  PUSHU32(acRP188.fHi, outBlob); // ULWord acRP188.fHi
3799  ok &= acTrailer.RPCEncode(outBlob); // NTV2_TRAILER acTrailer
3800  return ok;
3801  }
3802 
3803  bool FRAME_STAMP::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3804  { uint64_t v64(0);
3805  bool ok = acHeader.RPCDecode(inBlob, inOutIndex); // NTV2_HEADER acHeader
3806  POPU64(v64, inBlob, inOutIndex); // LWord64 acFrameTime
3807  acFrameTime = LWord64(v64);
3808  POPU32(acRequestedFrame, inBlob, inOutIndex); // ULWord acRequestedFrame
3809  POPU64(acAudioClockTimeStamp, inBlob, inOutIndex); // ULWord64 acAudioClockTimeStamp
3810  POPU32(acAudioExpectedAddress, inBlob, inOutIndex); // ULWord acAudioExpectedAddress
3811  POPU32(acAudioInStartAddress, inBlob, inOutIndex); // ULWord acAudioInStartAddress
3812  POPU32(acAudioInStopAddress, inBlob, inOutIndex); // ULWord acAudioInStopAddress
3813  POPU32(acAudioOutStopAddress, inBlob, inOutIndex); // ULWord acAudioOutStopAddress
3814  POPU32(acAudioOutStartAddress, inBlob, inOutIndex); // ULWord acAudioOutStartAddress
3815  POPU32(acTotalBytesTransferred, inBlob, inOutIndex); // ULWord acTotalBytesTransferred
3816  POPU32(acStartSample, inBlob, inOutIndex); // ULWord acStartSample
3817 
3818  ok &= acTimeCodes.RPCDecode(inBlob, inOutIndex); // NTV2Buffer acTimeCodes
3819  POPU64(v64, inBlob, inOutIndex); // LWord64 acCurrentTime
3820  acCurrentTime = LWord64(v64);
3821  POPU32(acCurrentFrame, inBlob, inOutIndex); // ULWord acCurrentFrame
3822  POPU64(v64, inBlob, inOutIndex); // LWord64 acCurrentFrameTime
3823  acCurrentFrameTime = LWord64(v64);
3824  POPU64(acAudioClockCurrentTime, inBlob, inOutIndex); // ULWord64 acAudioClockCurrentTime
3825  POPU32(acCurrentAudioExpectedAddress, inBlob, inOutIndex); // ULWord acCurrentAudioExpectedAddress
3826  POPU32(acCurrentAudioStartAddress, inBlob, inOutIndex); // ULWord acCurrentAudioStartAddress
3827  POPU32(acCurrentFieldCount, inBlob, inOutIndex); // ULWord acCurrentFieldCount
3828  POPU32(acCurrentLineCount, inBlob, inOutIndex); // ULWord acCurrentLineCount
3829  POPU32(acCurrentReps, inBlob, inOutIndex); // ULWord acCurrentReps
3830  POPU64(acCurrentUserCookie, inBlob, inOutIndex); // ULWord64 acCurrentUserCookie
3831  POPU32(acFrame, inBlob, inOutIndex); // ULWord acFrame
3832  POPU32(acRP188.fDBB, inBlob, inOutIndex); // ULWord acRP188.fDBB
3833  POPU32(acRP188.fLo, inBlob, inOutIndex); // ULWord acRP188.fLo
3834  POPU32(acRP188.fHi, inBlob, inOutIndex); // ULWord acRP188.fHi
3835  ok &= acTrailer.RPCDecode(inBlob, inOutIndex); // NTV2_TRAILER acTrailer
3836  return ok;
3837  }
3838 
3840  {
3841  const size_t totBytes (acHeader.GetSizeInBytes()); // Header + natural size of all structs/fields inbetween + Trailer
3842  if (outBlob.capacity() < totBytes)
3843  outBlob.reserve(totBytes);
3844  bool ok = acHeader.RPCEncode(outBlob); // NTV2_HEADER acHeader
3845  PUSHU16(acState, outBlob); // UWord acState
3846  PUSHU32(ULWord(acTransferFrame), outBlob); // LWord acTransferFrame
3847  PUSHU32(acBufferLevel, outBlob); // ULWord acBufferLevel
3848  PUSHU32(acFramesProcessed, outBlob); // ULWord acFramesProcessed
3849  PUSHU32(acFramesDropped, outBlob); // ULWord acFramesDropped
3850  ok &= acFrameStamp.RPCEncode(outBlob); // FRAME_STAMP acFrameStamp
3851  PUSHU32(acAudioTransferSize, outBlob); // ULWord acAudioTransferSize
3852  PUSHU32(acAudioStartSample, outBlob); // ULWord acAudioStartSample
3853  PUSHU32(acAncTransferSize, outBlob); // ULWord acAncTransferSize
3854  PUSHU32(acAncField2TransferSize, outBlob); // ULWord acAncField2TransferSize
3855  ok &= acTrailer.RPCEncode(outBlob); // NTV2_TRAILER acTrailer
3856  return ok;
3857  }
3858 
3859  bool AUTOCIRCULATE_TRANSFER_STATUS::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3860  { uint16_t v16(0); uint32_t v32(0);
3861  bool ok = acHeader.RPCDecode(inBlob, inOutIndex); // NTV2_HEADER acHeader
3862  POPU16(v16, inBlob, inOutIndex); // NTV2AutoCirculateState acState
3863  acState = NTV2AutoCirculateState(v16);
3864  POPU32(v32, inBlob, inOutIndex); // LWord acTransferFrame
3865  acTransferFrame = LWord(v32);
3866  POPU32(acBufferLevel, inBlob, inOutIndex); // ULWord acBufferLevel
3867  POPU32(acFramesProcessed, inBlob, inOutIndex); // ULWord acFramesProcessed
3868  POPU32(acFramesDropped, inBlob, inOutIndex); // ULWord acFramesDropped
3869  ok &= acFrameStamp.RPCDecode(inBlob, inOutIndex); // FRAME_STAMP acFrameStamp
3870  POPU32(acAudioTransferSize, inBlob, inOutIndex); // ULWord acAudioTransferSize
3871  POPU32(acAudioStartSample, inBlob, inOutIndex); // ULWord acAudioStartSample
3872  POPU32(acAncTransferSize, inBlob, inOutIndex); // ULWord acAncTransferSize
3873  POPU32(acAncField2TransferSize, inBlob, inOutIndex); // ULWord acAncField2TransferSize
3874  ok &= acTrailer.RPCDecode(inBlob, inOutIndex); // NTV2_TRAILER acTrailer
3875  return ok;
3876  }
3877 
3879  {
3880  PUSHU32(acNumSegments, outBlob); // ULWord acNumSegments
3881  PUSHU32(acNumActiveBytesPerRow, outBlob); // ULWord acNumActiveBytesPerRow
3882  PUSHU32(acSegmentHostPitch, outBlob); // ULWord acSegmentHostPitch
3883  PUSHU32(acSegmentDevicePitch, outBlob); // ULWord acSegmentDevicePitch
3884  return true;
3885  }
3886 
3887  bool NTV2SegmentedDMAInfo::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3888  {
3889  POPU32(acNumSegments, inBlob, inOutIndex); // ULWord acNumSegments
3890  POPU32(acNumActiveBytesPerRow, inBlob, inOutIndex); // ULWord acNumActiveBytesPerRow
3891  POPU32(acSegmentHostPitch, inBlob, inOutIndex); // ULWord acSegmentHostPitch
3892  POPU32(acSegmentDevicePitch, inBlob, inOutIndex); // ULWord acSegmentDevicePitch
3893  return true;
3894  }
3895 
3897  {
3898  PUSHU16(ccMode, outBlob); // NTV2ColorCorrectionMode ccMode
3899  PUSHU32(ccSaturationValue, outBlob); // ULWord ccSaturationValue
3900  return ccLookupTables.RPCEncode(outBlob); // NTV2Buffer ccLookupTables
3901  }
3902 
3903  bool NTV2ColorCorrectionData::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3904  { uint16_t u16(0);
3905  POPU16(u16, inBlob, inOutIndex); // NTV2ColorCorrectionMode ccMode
3906  ccMode = NTV2ColorCorrectionMode(u16);
3907  POPU32(ccSaturationValue, inBlob, inOutIndex); // ULWord ccSaturationValue
3908  return ccLookupTables.RPCDecode(inBlob, inOutIndex); // NTV2Buffer ccLookupTables
3909  }
3910 
3912  {
3913  PUSHU16(mode, outBlob); // AutoCircVidProcMode mode
3914  PUSHU16(foregroundVideoCrosspoint, outBlob); // NTV2Crosspoint foregroundVideoCrosspoint
3915  PUSHU16(backgroundVideoCrosspoint, outBlob); // NTV2Crosspoint backgroundVideoCrosspoint
3916  PUSHU16(foregroundKeyCrosspoint, outBlob); // NTV2Crosspoint foregroundKeyCrosspoint
3917  PUSHU16(backgroundKeyCrosspoint, outBlob); // NTV2Crosspoint backgroundKeyCrosspoint
3918  PUSHU32(ULWord(transitionCoefficient), outBlob); // Fixed_ transitionCoefficient
3919  PUSHU32(ULWord(transitionSoftness), outBlob); // Fixed_ transitionSoftness
3920  return true;
3921  }
3922 
3923  bool AutoCircVidProcInfo::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3924  { uint16_t v16(0); uint32_t v32(0);
3925  POPU16(v16, inBlob, inOutIndex); // AutoCircVidProcMode mode
3926  mode = AutoCircVidProcMode(v16);
3927  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint foregroundVideoCrosspoint
3928  foregroundVideoCrosspoint = NTV2Crosspoint(v16);
3929  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint backgroundVideoCrosspoint
3930  backgroundVideoCrosspoint = NTV2Crosspoint(v16);
3931  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint foregroundKeyCrosspoint
3932  foregroundKeyCrosspoint = NTV2Crosspoint(v16);
3933  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint backgroundKeyCrosspoint
3934  backgroundKeyCrosspoint = NTV2Crosspoint(v16);
3935  POPU32(v32, inBlob, inOutIndex); // Fixed_ transitionCoefficient
3936  transitionCoefficient = Fixed_(v32);
3937  POPU32(v32, inBlob, inOutIndex); // Fixed_ transitionSoftness
3938  transitionSoftness = Fixed_(v32);
3939  return true;
3940  }
3941 
3943  {
3944  PUSHU32(fDBB, outBlob); // ULWord fDBB
3945  PUSHU32(fLo, outBlob); // ULWord fLo
3946  PUSHU32(fHi, outBlob); // ULWord fHi
3947  return true;
3948  }
3949 
3950  bool NTV2_RP188::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3951  {
3952  POPU32(fDBB, inBlob, inOutIndex); // ULWord fDBB
3953  POPU32(fLo, inBlob, inOutIndex); // ULWord fLo
3954  POPU32(fHi, inBlob, inOutIndex); // ULWord fHi
3955  return true;
3956  }
3957 
3959  {
3961  const size_t totBytes (acHeader.GetSizeInBytes() + acVideoBuffer.GetByteCount() + acAudioBuffer.GetByteCount()
3962  + acANCBuffer.GetByteCount() + acANCField2Buffer.GetByteCount() + acOutputTimeCodes.GetByteCount()
3963  + acHDMIAuxData.GetByteCount() + 64); // Header + natural size of all structs/fields inbetween + Trailer
3964  if (outBlob.capacity() < totBytes)
3965  outBlob.reserve(totBytes);
3966  bool ok = acHeader.RPCEncode(outBlob); // NTV2_HEADER acHeader
3967  ok &= acVideoBuffer.RPCEncode(outBlob); // NTV2Buffer acVideoBuffer
3968  ok &= acAudioBuffer.RPCEncode(outBlob); // NTV2Buffer acAudioBuffer
3969  ok &= acANCBuffer.RPCEncode(outBlob); // NTV2Buffer acANCBuffer
3970  ok &= acANCField2Buffer.RPCEncode(outBlob); // NTV2Buffer acANCField2Buffer
3971  ok &= acOutputTimeCodes.RPCEncode(outBlob); // NTV2Buffer acOutputTimeCodes
3972  ok &= acTransferStatus.RPCEncode(outBlob); // AUTOCIRCULATE_TRANSFER_STATUS acTransferStatus
3973  PUSHU64(acInUserCookie, outBlob); // ULWord64 acInUserCookie
3974  PUSHU32(acInVideoDMAOffset, outBlob); // ULWord acInVideoDMAOffset
3975  ok &= acInSegmentedDMAInfo.RPCEncode(outBlob); // NTV2SegmentedDMAInfo acInSegmentedDMAInfo
3976  ok &= acColorCorrection.RPCEncode(outBlob); // NTV2ColorCorrectionData acColorCorrection
3977  PUSHU16(acFrameBufferFormat, outBlob); // NTV2PixelFormat acFrameBufferFormat
3978  PUSHU16(acFrameBufferOrientation, outBlob); // NTV2FBOrientation acFrameBufferOrientation
3979  ok &= acVidProcInfo.RPCEncode(outBlob); // AutoCircVidProcInfo acVidProcInfo
3980  PUSHU16(acVideoQuarterSizeExpand, outBlob); // NTV2QtrSizeExpandMode acVideoQuarterSizeExpand
3981  ok &= acHDMIAuxData.RPCEncode(outBlob); // NTV2Buffer acHDMIAuxData
3982  PUSHU32(acPeerToPeerFlags, outBlob); // ULWord acPeerToPeerFlags
3983  PUSHU32(acFrameRepeatCount, outBlob); // ULWord acFrameRepeatCount
3984  PUSHU32(ULWord(acDesiredFrame), outBlob); // LWord acDesiredFrame
3985  ok &= acRP188.RPCEncode(outBlob); // NTV2_RP188 acRP188
3986  PUSHU16(acCrosspoint, outBlob); // NTV2Crosspoint acCrosspoint
3987  ok &= acTrailer.RPCEncode(outBlob); // NTV2_TRAILER acTrailer
3989  return ok;
3990  }
3991 
3992  bool AUTOCIRCULATE_TRANSFER::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
3993  { uint16_t v16(0); uint32_t v32(0);
3995  bool ok = acHeader.RPCDecode(inBlob, inOutIndex); // NTV2_HEADER acHeader
3996  ok &= acVideoBuffer.RPCDecode(inBlob, inOutIndex); // NTV2Buffer acVideoBuffer
3997  ok &= acAudioBuffer.RPCDecode(inBlob, inOutIndex); // NTV2Buffer acAudioBuffer
3998  ok &= acANCBuffer.RPCDecode(inBlob, inOutIndex); // NTV2Buffer acANCBuffer
3999  ok &= acANCField2Buffer.RPCDecode(inBlob, inOutIndex); // NTV2Buffer acANCField2Buffer
4000  ok &= acOutputTimeCodes.RPCDecode(inBlob, inOutIndex); // NTV2Buffer acOutputTimeCodes
4001  ok &= acTransferStatus.RPCDecode(inBlob, inOutIndex); // AUTOCIRCULATE_TRANSFER_STATUS acTransferStatus
4002  POPU64(acInUserCookie, inBlob, inOutIndex); // ULWord64 acInUserCookie
4003  POPU32(acInVideoDMAOffset, inBlob, inOutIndex); // ULWord acInVideoDMAOffset
4004  ok &= acInSegmentedDMAInfo.RPCDecode(inBlob, inOutIndex);// NTV2Buffer acInSegmentedDMAInfo
4005  ok &= acColorCorrection.RPCDecode(inBlob, inOutIndex); // NTV2Buffer acColorCorrection
4006  POPU16(v16, inBlob, inOutIndex); // NTV2PixelFormat acFrameBufferFormat
4007  acFrameBufferFormat = NTV2FrameBufferFormat(v16);
4008  POPU16(v16, inBlob, inOutIndex); // NTV2FBOrientation acFrameBufferOrientation
4009  acFrameBufferOrientation = NTV2FBOrientation(v16);
4010  ok &= acVidProcInfo.RPCDecode(inBlob, inOutIndex); // AutoCircVidProcInfo acVidProcInfo
4011  POPU16(v16, inBlob, inOutIndex); // NTV2QtrSizeExpandMode acVideoQuarterSizeExpand
4012  acVideoQuarterSizeExpand = NTV2QtrSizeExpandMode(v16);
4013  ok &= acHDMIAuxData.RPCDecode(inBlob, inOutIndex); // NTV2Buffer acHDMIAuxData
4014  POPU32(acPeerToPeerFlags, inBlob, inOutIndex); // ULWord acPeerToPeerFlags
4015  POPU32(acFrameRepeatCount, inBlob, inOutIndex); // ULWord acFrameRepeatCount
4016  POPU32(v32, inBlob, inOutIndex); // LWord acDesiredFrame
4017  acDesiredFrame = LWord(v32);
4018  ok &= acRP188.RPCDecode(inBlob, inOutIndex); // NTV2_RP188 acRP188
4019  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint acCrosspoint
4020  acCrosspoint = NTV2Crosspoint(v16);
4021  ok &= acTrailer.RPCDecode(inBlob, inOutIndex); // NTV2_TRAILER acTrailer
4023  return ok;
4024  }
4025 
4027  {
4028  NTV2Buffer buff;
4029  PUSHU16(UWord(channelSpec), outBlob); // NTV2Crosspoint channelSpec
4030 // PUSHU64(ULWord64(videoBuffer), outBlob) // ULWord * videoBuffer
4031  PUSHU32(videoBufferSize, outBlob); // ULWord videoBufferSize
4032  if (videoBuffer && videoBufferSize)
4033  { buff.Set(videoBuffer, videoBufferSize);
4034  buff.AppendU8s(outBlob);
4035  }
4036  PUSHU32(videoDmaOffset, outBlob); // ULWord videoDmaOffset
4037 // PUSHU64(ULWord64(audioBuffer), outBlob) // ULWord * audioBuffer
4038  PUSHU32(audioBufferSize, outBlob); // ULWord audioBufferSize
4039  if (audioBuffer && audioBufferSize)
4040  { buff.Set(audioBuffer, audioBufferSize);
4041  buff.AppendU8s(outBlob);
4042  }
4043  PUSHU32(audioStartSample, outBlob); // ULWord audioStartSample
4044  PUSHU32(audioNumChannels, outBlob); // ULWord audioNumChannels
4045  PUSHU32(frameRepeatCount, outBlob); // ULWord frameRepeatCount
4046  rp188.RPCEncode(outBlob); // RP188_STRUCT rp188
4047  PUSHU32(ULWord(desiredFrame), outBlob); // LWord desiredFrame
4048  PUSHU32(hUser, outBlob); // ULWord hUser
4049  PUSHU32(transferFlags, outBlob); // ULWord transferFlags
4050  PUSHU8(bDisableExtraAudioInfo, outBlob); // BOOL_ bDisableExtraAudioInfo
4051  PUSHU16(UWord(frameBufferFormat), outBlob); // NTV2PixelFormat frameBufferFormat
4052  PUSHU16(UWord(frameBufferOrientation), outBlob); // NTV2FBOrientation frameBufferOrientation
4053  // Skip color correction for now // NTV2ColorCorrectionInfo colorCorrectionInfo
4054  vidProcInfo.RPCEncode(outBlob); // AutoCircVidProcInfo vidProcInfo
4055  PUSHU32(customAncInfo.Group1, outBlob); // CUSTOM_ANC_STRUCT customAncInfo
4056  PUSHU32(customAncInfo.Group2, outBlob);
4057  PUSHU32(customAncInfo.Group3, outBlob);
4058  PUSHU32(customAncInfo.Group4, outBlob);
4059  PUSHU32(videoNumSegments, outBlob); // ULWord videoNumSegments
4060  PUSHU32(videoSegmentHostPitch, outBlob); // ULWord videoSegmentHostPitch
4061  PUSHU32(videoSegmentCardPitch, outBlob); // ULWord videoSegmentCardPitch
4062  PUSHU16(UWord(videoQuarterSizeExpand), outBlob); // NTV2QtrSizeExpandMode videoQuarterSizeExpand
4063  return true;
4064  }
4065 
4066  bool AUTOCIRCULATE_TRANSFER_STRUCT::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
4067  { UWord v16(0); ULWord v32(0);
4068  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint channelSpec
4069  channelSpec = NTV2Crosspoint(v16);
4070 // POPU64(u64, inBlob, inOutIndex); // ULWord * videoBuffer
4071 // videoBuffer = reinterpret_cast<ULWord*>(u64);
4072  POPU32(videoBufferSize, inBlob, inOutIndex); // ULWord videoBufferSize
4073  if (videoBufferSize && !videoBuffer)
4074  {
4075  videoBuffer = reinterpret_cast<ULWord*>(AJAMemory::AllocateAligned(videoBufferSize, NTV2Buffer::DefaultPageSize()));
4076  if (!videoBuffer)
4077  return false;
4078  if ((inOutIndex + videoBufferSize) >= inBlob.size())
4079  return false; // past end of inBlob
4080  UByte* pBuffer = reinterpret_cast<UByte*>(videoBuffer);
4081  for (ULWord cnt(0); cnt < videoBufferSize; cnt++)
4082  pBuffer[cnt] = inBlob.at(inOutIndex++); // Caller is responsible for byte-swapping if needed
4083  }
4084  POPU32(videoDmaOffset, inBlob, inOutIndex); // ULWord videoDmaOffset
4085 // POPU64(u64, inBlob, inOutIndex); // ULWord * audioBuffer
4086 // audioBuffer = reinterpret_cast<ULWord*>(u64);
4087  POPU32(audioBufferSize, inBlob, inOutIndex); // ULWord audioBufferSize
4088  if (audioBufferSize && !audioBuffer)
4089  {
4090  audioBuffer = reinterpret_cast<ULWord*>(AJAMemory::AllocateAligned(audioBufferSize, NTV2Buffer::DefaultPageSize()));
4091  if (!audioBuffer)
4092  return false;
4093  if ((inOutIndex + audioBufferSize) >= inBlob.size())
4094  return false; // past end of inBlob
4095  UByte* pBuffer = reinterpret_cast<UByte*>(audioBuffer);
4096  for (ULWord cnt(0); cnt < audioBufferSize; cnt++)
4097  pBuffer[cnt] = inBlob.at(inOutIndex++); // Caller is responsible for byte-swapping if needed
4098  }
4099  POPU32(audioStartSample, inBlob, inOutIndex); // ULWord audioStartSample
4100  POPU32(audioNumChannels, inBlob, inOutIndex); // ULWord audioNumChannels
4101  POPU32(frameRepeatCount, inBlob, inOutIndex); // ULWord frameRepeatCount
4102  rp188.RPCDecode(inBlob, inOutIndex); // RP188_STRUCT rp188
4103  POPU32(v32, inBlob, inOutIndex); // LWord desiredFrame
4104  desiredFrame = LWord(v32);
4105  POPU32(hUser, inBlob, inOutIndex); // ULWord hUser
4106  POPU32(transferFlags, inBlob, inOutIndex); // ULWord transferFlags
4107  POPU8(AsU8Ref(bDisableExtraAudioInfo), inBlob, inOutIndex); // BOOL_ bDisableExtraAudioInfo
4108  POPU16(v16, inBlob, inOutIndex); // NTV2PixelFormat frameBufferFormat
4109  frameBufferFormat = NTV2PixelFormat(v16);
4110  POPU16(v16, inBlob, inOutIndex); // NTV2FBOrientation frameBufferOrientation
4111  frameBufferOrientation = NTV2FBOrientation(v16);
4112  // Skip color correction for now // NTV2ColorCorrectionInfo colorCorrectionInfo
4113  vidProcInfo.RPCDecode(inBlob, inOutIndex); // AutoCircVidProcInfo vidProcInfo
4114  POPU32(customAncInfo.Group1, inBlob, inOutIndex); // CUSTOM_ANC_STRUCT customAncInfo
4115  POPU32(customAncInfo.Group2, inBlob, inOutIndex);
4116  POPU32(customAncInfo.Group3, inBlob, inOutIndex);
4117  POPU32(customAncInfo.Group4, inBlob, inOutIndex);
4118  POPU32(videoNumSegments, inBlob, inOutIndex); // ULWord videoNumSegments
4119  POPU32(videoSegmentHostPitch, inBlob, inOutIndex); // ULWord videoSegmentHostPitch
4120  POPU32(videoSegmentCardPitch, inBlob, inOutIndex); // ULWord videoSegmentCardPitch
4121  POPU16(v16, inBlob, inOutIndex); // NTV2QtrSizeExpandMode videoQuarterSizeExpand
4122  videoQuarterSizeExpand = NTV2QtrSizeExpandMode(v16);
4123  return true;
4124  }
4125 
4127  {
4128  const size_t totBytes (mHeader.GetSizeInBytes()); // Header + natural size of all structs/fields inbetween + Trailer
4129  if (outBlob.capacity() < totBytes)
4130  outBlob.reserve(totBytes);
4131  bool ok = mHeader.RPCEncode(outBlob); // NTV2_HEADER mHeader
4132  ok &= mBuffer.RPCEncode(outBlob); // NTV2Buffer mBuffer
4133  PUSHU32(mFlags, outBlob); // ULWord mFlags
4134  PUSHU32(mStatus, outBlob); // ULWord mStatus
4135  for (size_t ndx(0); ndx < 16; ndx++)
4136  PUSHU32(mRegisters[ndx], outBlob); // ULWord mRegisters[16]
4137  for (size_t ndx(0); ndx < 32; ndx++)
4138  PUSHU32(mReserved[ndx], outBlob); // ULWord mReserved[32]
4139  ok &= mTrailer.RPCEncode(outBlob); // NTV2_TRAILER mTrailer
4140  return ok;
4141  }
4142 
4143  bool NTV2Bitstream::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
4144  {
4145  bool ok = mHeader.RPCDecode(inBlob, inOutIndex); // NTV2_HEADER acHeader
4146  ok &= mBuffer.RPCDecode(inBlob, inOutIndex); // NTV2Buffer mBuffer
4147  POPU32(mFlags, inBlob, inOutIndex); // ULWord mFlags
4148  POPU32(mStatus, inBlob, inOutIndex); // ULWord mStatus
4149  for (size_t ndx(0); ndx < 16; ndx++)
4150  POPU32(mRegisters[ndx], inBlob, inOutIndex); // ULWord mRegisters[16]
4151  for (size_t ndx(0); ndx < 16; ndx++)
4152  POPU32(mReserved[ndx], inBlob, inOutIndex); // ULWord mReserved[16]
4153  ok &= mTrailer.RPCDecode(inBlob, inOutIndex); // NTV2_TRAILER mTrailer
4154  return ok;
4155  }
4156 
4158  {
4159  PUSHU16(UWord(channelSpec), outBlob); // NTV2Crosspoint channelSpec
4160  PUSHU16(UWord(state), outBlob); // NTV2AutoCirculateState state
4161  PUSHU32(ULWord(startFrame), outBlob); // LWord startFrame
4162  PUSHU32(ULWord(endFrame), outBlob); // LWord endFrame
4163  PUSHU32(ULWord(activeFrame), outBlob); // LWord activeFrame
4164  PUSHU64(rdtscStartTime, outBlob); // ULWord64 rdtscStartTime
4165  PUSHU64(audioClockStartTime, outBlob); // ULWord64 audioClockStartTime
4166  PUSHU64(rdtscCurrentTime, outBlob); // ULWord64 rdtscCurrentTime
4167  PUSHU64(audioClockCurrentTime, outBlob); // ULWord64 audioClockCurrentTime
4168  PUSHU32(framesProcessed, outBlob); // ULWord framesProcessed
4169  PUSHU32(framesDropped, outBlob); // ULWord framesDropped
4170  PUSHU32(bufferLevel, outBlob); // ULWord bufferLevel
4171  PUSHU8(bWithAudio, outBlob); // BOOL_ bWithAudio
4172  PUSHU8(bWithRP188, outBlob); // BOOL_ bWithRP188
4173  PUSHU8(bFbfChange, outBlob); // BOOL_ bFbfChange
4174  PUSHU8(bFboChange, outBlob); // BOOL_ bFboChange
4175  PUSHU8(bWithColorCorrection, outBlob); // BOOL_ bWithColorCorrection
4176  PUSHU8(bWithVidProc, outBlob); // BOOL_ bWithVidProc
4177  PUSHU8(bWithCustomAncData, outBlob); // BOOL_ bWithCustomAncData
4178  return true;
4179  }
4180 
4181  bool AUTOCIRCULATE_STATUS_STRUCT::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
4182  { uint16_t v16(0); uint32_t v32(0);
4183  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint channelSpec
4184  channelSpec = NTV2Crosspoint(v16);
4185  POPU16(v16, inBlob, inOutIndex); // NTV2AutoCirculateState state
4186  state = NTV2AutoCirculateState(v16);
4187  POPU32(v32, inBlob, inOutIndex); // LWord startFrame
4188  startFrame = LWord(v32);
4189  POPU32(v32, inBlob, inOutIndex); // LWord endFrame
4190  endFrame = LWord(v32);
4191  POPU32(v32, inBlob, inOutIndex); // LWord activeFrame
4192  activeFrame = LWord(v32);
4193  POPU64(rdtscStartTime, inBlob, inOutIndex); // ULWord64 rdtscStartTime
4194  POPU64(audioClockStartTime, inBlob, inOutIndex); // ULWord64 audioClockStartTime
4195  POPU64(rdtscCurrentTime, inBlob, inOutIndex); // ULWord64 rdtscCurrentTime
4196  POPU64(audioClockCurrentTime, inBlob, inOutIndex); // ULWord64 audioClockCurrentTime
4197  POPU32(framesProcessed, inBlob, inOutIndex); // ULWord framesProcessed
4198  POPU32(framesDropped, inBlob, inOutIndex); // ULWord framesDropped
4199  POPU32(bufferLevel, inBlob, inOutIndex); // ULWord bufferLevel
4200  POPU8(AsU8Ref(bWithAudio), inBlob, inOutIndex); // BOOL_ bWithAudio
4201  POPU8(AsU8Ref(bWithRP188), inBlob, inOutIndex); // BOOL_ bWithRP188
4202  POPU8(AsU8Ref(bFbfChange), inBlob, inOutIndex); // BOOL_ bFbfChange
4203  POPU8(AsU8Ref(bFboChange), inBlob, inOutIndex); // BOOL_ bFboChange
4204  POPU8(AsU8Ref(bWithColorCorrection), inBlob, inOutIndex);// BOOL_ bWithColorCorrection
4205  POPU8(AsU8Ref(bWithVidProc), inBlob, inOutIndex); // BOOL_ bWithVidProc
4206  POPU8(AsU8Ref(bWithCustomAncData), inBlob, inOutIndex); // BOOL_ bWithCustomAncData
4207  return true;
4208  }
4209 
4211  {
4212  PUSHU32(DBB, outBlob); // ULWord DBB
4213  PUSHU32(Low, outBlob); // ULWord Low
4214  PUSHU32(High, outBlob); // ULWord High
4215  return true;
4216  }
4217 
4218  bool RP188_STRUCT::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
4219  {
4220  POPU32(DBB, inBlob, inOutIndex); // ULWord DBB
4221  POPU32(Low, inBlob, inOutIndex); // ULWord Low
4222  POPU32(High, inBlob, inOutIndex); // ULWord High
4223  return true;
4224  }
4225 
4226 
4228  {
4229  PUSHU32(taskVersion, outBlob); // ULWord taskVersion
4230  PUSHU32(taskSize, outBlob); // ULWord taskSize
4231  PUSHU32(numTasks, outBlob); // ULWord numTasks
4232  PUSHU32(maxTasks, outBlob); // ULWord maxTasks
4233  PUSHU64(ULWord64(taskArray), outBlob); // ULWord taskArray
4234  if (taskArray && numTasks)
4235  for (ULWord num(0); num < numTasks; num++)
4236  {
4237  const AutoCircGenericTask & task (taskArray[num]);
4238  PUSHU32(task.taskType, outBlob); // AutoCircTaskType taskType
4239  const ULWord * pULWords = reinterpret_cast<const ULWord*>(&task.u);
4240  ULWord numWords(0);
4241  if (NTV2_IS_REGISTER_TASK(task.taskType))
4242  numWords = sizeof(AutoCircRegisterTask)/sizeof(ULWord);
4243  else if (NTV2_IS_TIMECODE_TASK(task.taskType))
4244  numWords = sizeof(AutoCircTimeCodeTask)/sizeof(ULWord);
4245  for (ULWord word(0); word < numWords; word++)
4246  PUSHU32(pULWords[word], outBlob);
4247  }
4248  return true;
4249  }
4250 
4251  bool AUTOCIRCULATE_TASK_STRUCT::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
4252  { ULWord u32(0); ULWord64 u64(0);
4253  POPU32(taskVersion, inBlob, inOutIndex); // ULWord taskVersion
4254  POPU32(taskSize, inBlob, inOutIndex); // ULWord taskSize
4255  POPU32(numTasks, inBlob, inOutIndex); // ULWord numTasks
4256  POPU32(maxTasks, inBlob, inOutIndex); // ULWord maxTasks
4257  POPU64(u64, inBlob, inOutIndex); // ULWord taskArray
4258  taskArray = reinterpret_cast<AutoCircGenericTask*>(u64);
4259  if (taskArray && numTasks)
4260  for (ULWord num(0); num < numTasks; num++)
4261  {
4262  AutoCircGenericTask & task (taskArray[num]);
4263  POPU32(u32, inBlob, inOutIndex); // AutoCircTaskType taskType
4264  task.taskType = AutoCircTaskType(u32);
4265  ULWord * pULWords = reinterpret_cast<ULWord*>(&task.u);
4266  ULWord numWords(0);
4267  if (NTV2_IS_REGISTER_TASK(task.taskType))
4268  numWords = sizeof(AutoCircRegisterTask)/sizeof(ULWord);
4269  else if (NTV2_IS_TIMECODE_TASK(task.taskType))
4270  numWords = sizeof(AutoCircTimeCodeTask)/sizeof(ULWord);
4271  for (ULWord word(0); word < numWords; word++)
4272  POPU32(pULWords[word], inBlob, inOutIndex);
4273  }
4274  return true;
4275  }
4276 
4278  {
4279  PUSHU16(UWord(channelSpec), outBlob); // NTV2Crosspoint channelSpec
4280  PUSHU64(ULWord64(frameTime), outBlob); // LWord64 frameTime
4281  PUSHU32(frame, outBlob); // ULWord frame
4282  PUSHU64(audioClockTimeStamp, outBlob); // ULWord64 audioClockTimeStamp
4283  PUSHU32(audioExpectedAddress, outBlob); // ULWord audioExpectedAddress
4284  PUSHU32(audioInStartAddress, outBlob); // ULWord audioInStartAddress
4285  PUSHU32(audioInStopAddress, outBlob); // ULWord audioInStopAddress
4286  PUSHU32(audioOutStopAddress, outBlob); // ULWord audioOutStopAddress
4287  PUSHU32(audioOutStartAddress, outBlob); // ULWord audioOutStartAddress
4288  PUSHU32(bytesRead, outBlob); // ULWord bytesRead
4289  PUSHU32(startSample, outBlob); // ULWord startSample
4290  PUSHU64(ULWord64(currentTime), outBlob); // LWord64 currentTime
4291  PUSHU32(currentFrame, outBlob); // ULWord currentFrame
4292  currentRP188.RPCEncode(outBlob); // RP188_STRUCT currentRP188
4293  PUSHU64(ULWord64(currentFrameTime), outBlob); // LWord64 currentFrameTime
4294  PUSHU64(audioClockCurrentTime, outBlob); // ULWord64 audioClockCurrentTime
4295  PUSHU32(currentAudioExpectedAddress, outBlob); // ULWord currentAudioExpectedAddress
4296  PUSHU32(currentAudioStartAddress, outBlob); // ULWord currentAudioStartAddress
4297  PUSHU32(currentFieldCount, outBlob); // ULWord currentFieldCount
4298  PUSHU32(currentLineCount, outBlob); // ULWord currentLineCount
4299  PUSHU32(currentReps, outBlob); // ULWord currentReps
4300  PUSHU32(currenthUser, outBlob); // ULWord currenthUser
4301  return true;
4302  }
4303 
4304  bool FRAME_STAMP_STRUCT::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
4305  { uint16_t v16(0); uint64_t v64(0);
4306  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint channelSpec
4307  channelSpec = NTV2Crosspoint(v16);
4308  POPU64(v64, inBlob, inOutIndex); // LWord64 frameTime
4309  frameTime = LWord64(v64);
4310  POPU32(frame, inBlob, inOutIndex); // ULWord frame
4311  POPU64(audioClockTimeStamp, inBlob, inOutIndex); // ULWord64 audioClockTimeStamp
4312  POPU32(audioExpectedAddress, inBlob, inOutIndex); // ULWord audioExpectedAddress
4313  POPU32(audioInStartAddress, inBlob, inOutIndex); // ULWord audioInStartAddress
4314  POPU32(audioInStopAddress, inBlob, inOutIndex); // ULWord audioInStopAddress
4315  POPU32(audioOutStopAddress, inBlob, inOutIndex); // ULWord audioOutStopAddress
4316  POPU32(audioOutStartAddress, inBlob, inOutIndex); // ULWord audioOutStartAddress
4317  POPU32(bytesRead, inBlob, inOutIndex); // ULWord bytesRead
4318  POPU32(startSample, inBlob, inOutIndex); // ULWord startSample
4319  POPU64(v64, inBlob, inOutIndex); // LWord64 currentTime
4320  currentTime = LWord64(v64);
4321  POPU32(currentFrame, inBlob, inOutIndex); // ULWord currentFrame
4322  currentRP188.RPCDecode(inBlob, inOutIndex); // RP188_STRUCT currentRP188
4323  POPU64(v64, inBlob, inOutIndex); // LWord64 currentFrameTime
4324  currentFrameTime = LWord64(v64);
4325  POPU64(audioClockCurrentTime, inBlob, inOutIndex); // ULWord64 audioClockCurrentTime
4326  POPU32(currentAudioExpectedAddress, inBlob, inOutIndex);// ULWord currentAudioExpectedAddress
4327  POPU32(currentAudioStartAddress, inBlob, inOutIndex); // ULWord currentAudioStartAddress
4328  POPU32(currentFieldCount, inBlob, inOutIndex); // ULWord currentFieldCount
4329  POPU32(currentLineCount, inBlob, inOutIndex); // ULWord currentLineCount
4330  POPU32(currentReps, inBlob, inOutIndex); // ULWord currentReps
4331  POPU32(currenthUser, inBlob, inOutIndex); // ULWord currenthUser
4332  return true;
4333  }
4334 
4336  {
4337  PUSHU16(UWord(eCommand), outBlob); // AUTO_CIRC_COMMAND eCommand
4338  PUSHU16(UWord(channelSpec), outBlob); // NTV2Crosspoint channelSpec
4339  PUSHU32(ULWord(lVal1), outBlob); // LWord lVal1
4340  PUSHU32(ULWord(lVal2), outBlob); // LWord lVal2
4341  PUSHU32(ULWord(lVal3), outBlob); // LWord lVal3
4342  PUSHU32(ULWord(lVal4), outBlob); // LWord lVal4
4343  PUSHU32(ULWord(lVal5), outBlob); // LWord lVal5
4344  PUSHU32(ULWord(lVal6), outBlob); // LWord lVal6
4345  PUSHU8(bVal1, outBlob); // BOOL_ bVal1
4346  PUSHU8(bVal2, outBlob); // BOOL_ bVal2
4347  PUSHU8(bVal3, outBlob); // BOOL_ bVal3
4348  PUSHU8(bVal4, outBlob); // BOOL_ bVal4
4349  PUSHU8(bVal5, outBlob); // BOOL_ bVal5
4350  PUSHU8(bVal6, outBlob); // BOOL_ bVal6
4351  PUSHU8(bVal7, outBlob); // BOOL_ bVal7
4352  PUSHU8(bVal8, outBlob); // BOOL_ bVal8
4353  PUSHU64(ULWord64(pvVal1), outBlob); // void* pvVal1
4354  PUSHU64(ULWord64(pvVal2), outBlob); // void* pvVal2
4355  PUSHU64(ULWord64(pvVal3), outBlob); // void* pvVal3
4356  PUSHU64(ULWord64(pvVal4), outBlob); // void* pvVal4
4357  if (eCommand == eGetAutoCirc && pvVal1)
4358  reinterpret_cast<AUTOCIRCULATE_STATUS_STRUCT*>(pvVal1)->RPCEncode(outBlob);
4359  if ((eCommand == eGetFrameStamp || eCommand == eGetFrameStampEx2) && pvVal1)
4360  reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->RPCEncode(outBlob);
4361  if (eCommand == eGetFrameStampEx2 && pvVal2)
4362  reinterpret_cast<AUTOCIRCULATE_TASK_STRUCT*>(pvVal2)->RPCEncode(outBlob);
4363  if (eCommand == eTransferAutoCirculate && pvVal1)
4364  reinterpret_cast<AUTOCIRCULATE_TRANSFER_STRUCT*>(pvVal1)->RPCEncode(outBlob);
4365  return true;
4366  }
4367 
4368  bool AUTOCIRCULATE_DATA::RPCDecode (const UByteSequence & inBlob, size_t & inOutIndex)
4369  {
4370 #if defined(AJA_LINUX)
4371  #pragma GCC diagnostic push
4372  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
4373 #endif
4374  uint16_t v16(0); uint32_t v32(0);
4375  POPU16(v16, inBlob, inOutIndex); // AUTO_CIRC_COMMAND eCommand
4376  eCommand = AUTO_CIRC_COMMAND(v16);
4377  POPU16(v16, inBlob, inOutIndex); // NTV2Crosspoint channelSpec
4378  channelSpec = NTV2Crosspoint(v16);
4379  POPU32(v32, inBlob, inOutIndex); lVal1 = LWord(v32); // LWord lVal1
4380  POPU32(v32, inBlob, inOutIndex); lVal2 = LWord(v32); // LWord lVal2
4381  POPU32(v32, inBlob, inOutIndex); lVal3 = LWord(v32); // LWord lVal3
4382  POPU32(v32, inBlob, inOutIndex); lVal4 = LWord(v32); // LWord lVal4
4383  POPU32(v32, inBlob, inOutIndex); lVal5 = LWord(v32); // LWord lVal5
4384  POPU32(v32, inBlob, inOutIndex); lVal6 = LWord(v32); // LWord lVal6
4385  POPU8(AsU8Ref(bVal1), inBlob, inOutIndex); // BOOL_ bVal1
4386  POPU8(AsU8Ref(bVal2), inBlob, inOutIndex); // BOOL_ bVal2
4387  POPU8(AsU8Ref(bVal3), inBlob, inOutIndex); // BOOL_ bVal3
4388  POPU8(AsU8Ref(bVal4), inBlob, inOutIndex); // BOOL_ bVal4
4389  POPU8(AsU8Ref(bVal5), inBlob, inOutIndex); // BOOL_ bVal5
4390  POPU8(AsU8Ref(bVal6), inBlob, inOutIndex); // BOOL_ bVal6
4391  POPU8(AsU8Ref(bVal7), inBlob, inOutIndex); // BOOL_ bVal7
4392  POPU8(AsU8Ref(bVal8), inBlob, inOutIndex); // BOOL_ bVal8
4393  POPU64(AsU64Ref(pvVal1), inBlob, inOutIndex); // void* pvVal1
4394  POPU64(AsU64Ref(pvVal2), inBlob, inOutIndex); // void* pvVal2
4395  POPU64(AsU64Ref(pvVal3), inBlob, inOutIndex); // void* pvVal3
4396  POPU64(AsU64Ref(pvVal4), inBlob, inOutIndex); // void* pvVal4
4397 #if defined(AJA_LINUX)
4398  #pragma GCC diagnostic pop
4399 #endif
4400  if (eCommand == eGetAutoCirc && pvVal1)
4401  reinterpret_cast<AUTOCIRCULATE_STATUS_STRUCT*>(pvVal1)->RPCDecode(inBlob, inOutIndex);
4402  if ((eCommand == eGetFrameStamp || eCommand == eGetFrameStampEx2) && pvVal1)
4403  reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->RPCDecode(inBlob, inOutIndex);
4404  if (eCommand == eGetFrameStampEx2 && pvVal2)
4405  reinterpret_cast<AUTOCIRCULATE_TASK_STRUCT*>(pvVal2)->RPCDecode(inBlob, inOutIndex);
4406  if (eCommand == eTransferAutoCirculate && pvVal1)
4407  reinterpret_cast<AUTOCIRCULATE_TRANSFER_STRUCT*>(pvVal1)->RPCDecode(inBlob, inOutIndex);
4408  return true;
4409  }
NTV2InputSourceSet
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
Definition: ntv2publicinterface.h:8783
ntv2nub::POPU32
void POPU32(uint32_t &outVal, const std::vector< uint8_t > &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
Definition: ntv2nubtypes.h:69
NTV2BankSelGetSetRegs::mHeader
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:7588
NTV2SegmentedDMAInfo::acSegmentHostPitch
ULWord acSegmentHostPitch
Offset, in bytes, between the start of one host segment and the start of the next host segment (i....
Definition: ntv2publicinterface.h:7050
NTV2GetRegisters::GetGoodRegisters
bool GetGoodRegisters(NTV2RegNumSet &outGoodRegNums) const
Returns an NTV2RegNumSet built from my mOutGoodRegisters field.
Definition: ntv2publicinterface.cpp:3041
AUTOCIRCULATE_TRANSFER::acFrameBufferFormat
NTV2FrameBufferFormat acFrameBufferFormat
Specifies the frame buffer format to change to. Ignored if AUTOCIRCULATE_WITH_FBFCHANGE option is not...
Definition: ntv2publicinterface.h:8040
NTV2GetRegisters::NTV2GetRegisters
NTV2GetRegisters(const NTV2RegNumSet &inRegisterNumbers=NTV2RegNumSet())
Constructs an NTV2GetRegisters struct from the given set of register numbers.
Definition: ntv2publicinterface.cpp:2981
AUTOCIRCULATE_STATUS_STRUCT::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:4181
NTV2SegmentedDMAInfo::acNumActiveBytesPerRow
ULWord acNumActiveBytesPerRow
Number of active bytes in a row of video.
Definition: ntv2publicinterface.h:7049
FRAME_STAMP_STRUCT::currentAudioStartAddress
ULWord currentAudioStartAddress
As found by isr.
Definition: ntv2publicinterface.h:4508
aja::stoul
unsigned long stoul(const std::string &str, std::size_t *idx, int base)
Definition: common.cpp:143
print_address_offset
static string print_address_offset(const size_t inRadix, const ULWord64 inOffset)
Definition: ntv2publicinterface.cpp:359
ULWordSequenceConstIter
ULWordSequence::const_iterator ULWordSequenceConstIter
A handy const iterator for iterating over a ULWordSequence.
Definition: ntv2publicinterface.h:47
FRAME_STAMP::acRP188
NTV2_RP188 acRP188
Deprecated – call FRAME_STAMP::GetInputTimeCode instead.
Definition: ntv2publicinterface.h:7771
NTV2SegmentedDMAInfo::NTV2SegmentedDMAInfo
NTV2SegmentedDMAInfo()
Constructs a disabled NTV2SegmentedDMAInfo struct.
Definition: ntv2publicinterface.cpp:2569
NTV2SDIInputStatus::Clear
void Clear(void)
Constructs a default NTV2SDIInputStatus.
Definition: ntv2publicinterface.cpp:118
AutoCircRegisterTask
Definition: ntv2publicinterface.h:4696
NTV2ChannelSetToStr
string NTV2ChannelSetToStr(const NTV2ChannelSet &inObj, const bool inCompact)
Definition: ntv2publicinterface.cpp:3351
NTV2Buffer::GetU8s
bool GetU8s(UByteSequence &outU8s, const size_t inU8Offset=0, const size_t inMaxSize=128) const
Answers with my contents as a vector of unsigned 8-bit values.
Definition: ntv2publicinterface.cpp:610
NTV2RegisterWritesConstIter
NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter
Definition: ntv2publicinterface.h:4012
NTV2SegmentedXferInfo::reset
NTV2SegmentedXferInfo & reset(void)
Resets me to an invalid (all zero) state.
Definition: ntv2publicinterface.cpp:1474
NTV2DoubleArray
std::vector< double > NTV2DoubleArray
An array of double-precision floating-point values.
Definition: ntv2publicinterface.h:70
LWord
int32_t LWord
Definition: ajatypes.h:252
NTV2Buffer::SetDefaultPageSize
static bool SetDefaultPageSize(const size_t inNewSize)
Changes the default page size for use in future page-aligned allocations.
Definition: ntv2publicinterface.cpp:2012
GetRegisterNumbers
NTV2RegNumSet GetRegisterNumbers(const NTV2RegReads &inRegInfos)
Definition: ntv2publicinterface.cpp:3421
FRAME_STAMP::acTrailer
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:7774
AUTOCIRCULATE_STATUS::acFramesProcessed
ULWord acFramesProcessed
Total number of frames successfully processed since CNTV2Card::AutoCirculateStart called.
Definition: ntv2publicinterface.h:7171
AJADebug::StatTimerStop
static AJAStatus StatTimerStop(const uint32_t inKey)
Definition: debug.cpp:1155
CNTV2RegisterExpert::IsReadOnly
static bool IsReadOnly(const uint32_t inRegNum)
Definition: ntv2registerexpert.h:116
NTV2SegmentedDMAInfo::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3887
NTV2SDIInStatistics::Clear
void Clear(void)
Resets the struct to its initialized state.
Definition: ntv2publicinterface.cpp:2324
NTV2Bitstream::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:4126
NTV2RegNumSetConstIter
ULWordSetConstIter NTV2RegNumSetConstIter
A const iterator that iterates over a set of distinct NTV2RegisterNumbers.
Definition: ntv2publicinterface.h:7383
NTV2RegisterValueMap
std::map< ULWord, ULWord > NTV2RegisterValueMap
A mapping of distinct NTV2RegisterNumbers to their corresponding ULWord values.
Definition: ntv2publicinterface.h:7400
NTV2_NUM_STANDARDS
@ NTV2_NUM_STANDARDS
Definition: ntv2enums.h:171
AUTOCIRCULATE_STATUS::WithFBOChange
bool WithFBOChange(void) const
Definition: ntv2publicinterface.h:7321
NTV2GetRegisters::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3617
FRAME_STAMP::acCurrentTime
LWord64 acCurrentTime
Current processor time, derived from the finest-grained counter available on the host OS....
Definition: ntv2publicinterface.h:7758
kVRegShiftHDMOutVideoFrameRate
@ kVRegShiftHDMOutVideoFrameRate
Definition: ntv2virtualregisters.h:662
AUTOCIRCULATE_TRANSFER::acFrameRepeatCount
ULWord acFrameRepeatCount
Intended for playout. The number of times to repeat the frame being transferred.
Definition: ntv2publicinterface.h:8052
NTV2_TRAILER::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3551
NTV2SegmentedDMAInfo
This struct is used to augment the default full-frame AutoCirculate DMA transfer to accommodate multi...
Definition: ntv2publicinterface.h:7046
AUTOCIRCULATE_STATUS_STRUCT::bFboChange
BOOL_ bFboChange
Definition: ntv2publicinterface.h:4330
NTV2FrameGeometryToString
std::string NTV2FrameGeometryToString(const NTV2FrameGeometry inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7154
NTV2ChannelListToStr
string NTV2ChannelListToStr(const NTV2ChannelList &inObj, const bool inCompact)
Definition: ntv2publicinterface.cpp:3330
NTV2_IS_VALID_NTV2FrameGeometry
#define NTV2_IS_VALID_NTV2FrameGeometry(__s__)
Definition: ntv2enums.h:364
FRAME_STAMP::acCurrentFrame
ULWord acCurrentFrame
Last vertical blank frame for this autocirculate channel (when CNTV2Card::AutoCirculateGetFrameStamp ...
Definition: ntv2publicinterface.h:7760
AUTOCIRCULATE_TRANSFER_STRUCT::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:4026
NTV2StreamChannel
Definition: ntv2publicinterface.h:8669
NTV2HDMIBitDepth
NTV2HDMIBitDepth
Indicates or specifies the HDMI video bit depth.
Definition: ntv2enums.h:3611
NTV2_COLORCORRECTOR_TABLESIZE
#define NTV2_COLORCORRECTOR_TABLESIZE
Definition: ntv2publicinterface.h:4135
FRAME_STAMP::GetInputTimeCode
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Answers with a specific timecode captured in my acTimeCodes member.
Definition: ntv2publicinterface.cpp:2114
NTV2Buffer::GetU32s
bool GetU32s(ULWordSequence &outU32s, const size_t inU32Offset=0, const size_t inMaxSize=32, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 32-bit values.
Definition: ntv2publicinterface.cpp:536
AUTOCIRCULATE_STATUS::acCrosspoint
NTV2Crosspoint acCrosspoint
The crosspoint (channel number with direction)
Definition: ntv2publicinterface.h:7162
AUTOCIRCULATE_STATUS_STRUCT::activeFrame
LWord activeFrame
Definition: ntv2publicinterface.h:4319
kVRegShiftHDMOutAudioFormat
@ kVRegShiftHDMOutAudioFormat
Definition: ntv2virtualregisters.h:668
NTV2BufferLock::mBuffer
NTV2Buffer mBuffer
Virtual address of a buffer to prelock, and its length.
Definition: ntv2publicinterface.h:8444
RP188_STRUCT::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:4218
NTV2PixelFormats
NTV2FrameBufferFormatSet NTV2PixelFormats
Definition: ntv2publicinterface.h:8774
NTV2OutputDestinations
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
Definition: ntv2publicinterface.h:8786
FRAME_STAMP_STRUCT::currentTime
LWord64 currentTime
Current processor time ... on Windows, this is derived from KeQueryPerformanceCounter.
Definition: ntv2publicinterface.h:4490
ntv2devicefeatures.h
Declares device capability functions.
AUTOCIRCULATE_STATUS::WithVidProc
bool WithVidProc(void) const
Definition: ntv2publicinterface.h:7331
kVRegShiftHDMOutAudioRate
@ kVRegShiftHDMOutAudioRate
Definition: ntv2virtualregisters.h:669
NTV2ColorCorrectionData::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3903
NTV2Bitstream::SetFlags
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::LoadBitstream.
Definition: ntv2publicinterface.h:8602
NTV2RegInfo::Print
std::ostream & Print(std::ostream &outputStream, const bool inAsCode=false) const
Renders me to the given output stream in a human-readable format.
Definition: ntv2publicinterface.cpp:3252
NTV2RegInfo::registerValue
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
Definition: ntv2publicinterface.h:3934
AJA_NTV2_SDK_VERSION_POINT
#define AJA_NTV2_SDK_VERSION_POINT
The SDK "point" release version, an unsigned decimal integer.
Definition: ntv2version.h:15
FRAME_STAMP::acCurrentUserCookie
ULWord64 acCurrentUserCookie
The frame's AUTOCIRCULATE_TRANSFER::acInUserCookie value that was set when CNTV2Card::AutoCirculateTr...
Definition: ntv2publicinterface.h:7768
AutoCircVidProcMode
AutoCircVidProcMode
Definition: ntv2publicinterface.h:4193
NTV2TCIndexes
std::set< NTV2TCIndex > NTV2TCIndexes
Definition: ntv2publicinterface.h:6849
NTV2SegmentedXferInfo::swapSourceAndDestination
NTV2SegmentedXferInfo & swapSourceAndDestination(void)
Swaps my source and destination offsets and pitches.
Definition: ntv2publicinterface.cpp:1487
AUTOCIRCULATE_TRANSFER::SetAudioBuffer
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2716
NTV2TimeCodeListConstIter
NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter
A handy const interator for iterating over an NTV2TimeCodeList.
Definition: ntv2publicinterface.h:6844
NTV2AudioChannelPairs
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
Definition: ntv2publicinterface.h:58
NTV2GetSupportedDevices
NTV2DeviceIDSet NTV2GetSupportedDevices(const NTV2DeviceKinds inKinds=NTV2_DEVICEKIND_ALL)
Returns an NTV2DeviceIDSet of devices supported by the SDK.
Definition: ntv2utils.cpp:7548
NTV2DeviceGetSupportedOutputDests
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2OutputDest values supported on the given device.
Definition: ntv2publicinterface.cpp:1293
GetNTV2FrameGeometryFromVideoFormat
NTV2FrameGeometry GetNTV2FrameGeometryFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:2545
aja::is_hex_digit
bool is_hex_digit(const char inChr)
Definition: common.cpp:511
NTV2_TYPE_ACSTATUS
#define NTV2_TYPE_ACSTATUS
Identifies AUTOCIRCULATE_STATUS struct.
Definition: ntv2publicinterface.h:5465
NTV2AudioFormat
NTV2AudioFormat
Definition: ntv2enums.h:1896
NTV2_TYPE_BANKGETSET
#define NTV2_TYPE_BANKGETSET
Identifies NTV2BankSelGetSetRegs struct.
Definition: ntv2publicinterface.h:5464
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1305
NTV2HDMIColorSpace
NTV2HDMIColorSpace
Indicates or specifies HDMI Color Space.
Definition: ntv2enums.h:3525
NTV2AudioFormatToString
std::string NTV2AudioFormatToString(const NTV2AudioFormat inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6706
FRAME_STAMP_STRUCT::bytesRead
ULWord bytesRead
Total audio and video bytes transfered.
Definition: ntv2publicinterface.h:4470
NTV2Buffer
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
Definition: ntv2publicinterface.h:5993
AUTOCIRCULATE_STATUS::acStartFrame
LWord acStartFrame
First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
Definition: ntv2publicinterface.h:7164
NTV2Buffer::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3575
NTV2SetRegisters::NTV2SetRegisters
NTV2SetRegisters(const NTV2RegWrites &inRegWrites=NTV2RegWrites())
Constructs an NTV2SetRegisters struct from the given NTV2RegisterWrites collection.
Definition: ntv2publicinterface.cpp:3159
NTV2PixelFormatsConstIter
NTV2FrameBufferFormatSetConstIter NTV2PixelFormatsConstIter
Definition: ntv2publicinterface.h:8775
NTV2_TYPE_ACXFER
#define NTV2_TYPE_ACXFER
Identifies AUTOCIRCULATE_TRANSFER struct.
Definition: ntv2publicinterface.h:5466
NTV2PrintChannelSet
ostream & NTV2PrintChannelSet(const NTV2ChannelSet &inObj, const bool inCompact, ostream &inOutStream)
Definition: ntv2publicinterface.cpp:3336
NTV2CROSSPOINT_CHANNEL1
@ NTV2CROSSPOINT_CHANNEL1
Definition: ntv2enums.h:1647
NTV2VirtualData::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
Definition: ntv2publicinterface.cpp:3508
AJADebug::StatTimerStart
static AJAStatus StatTimerStart(const uint32_t inKey)
Definition: debug.cpp:1135
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6066
NTV2_STANDARD_INVALID
@ NTV2_STANDARD_INVALID
Definition: ntv2enums.h:173
AUTOCIRCULATE_STATUS::acOptionFlags
ULWord acOptionFlags
AutoCirculate options used when CNTV2Card::AutoCirculateInitForInput or CNTV2Card::AutoCirculateInitF...
Definition: ntv2publicinterface.h:7174
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:506
NTV2VideoFormatSet
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
Definition: ntv2publicinterface.h:8769
NTV2_STANDARD_1080
@ NTV2_STANDARD_1080
Identifies SMPTE HD 1080i or 1080psf.
Definition: ntv2enums.h:155
kVRegMaskHDMOutColorRGB
@ kVRegMaskHDMOutColorRGB
Definition: ntv2virtualregisters.h:645
GetNTV2FrameRateFromVideoFormat
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:3530
NTV2TimecodeIndex
enum NTV2TCIndex NTV2TimecodeIndex
NTV2Buffer::AppendU8s
bool AppendU8s(UByteSequence &outU8s) const
Appends my contents to an existing UByteSequence.
Definition: ntv2publicinterface.cpp:643
AUTOCIRCULATE_TRANSFER_STATUS::acTransferFrame
LWord acTransferFrame
Frame buffer number the frame was transferred to/from. (-1 if failed)
Definition: ntv2publicinterface.h:7883
NTV2SetRegisters::mHeader
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:7525
NTV2ColorCorrectionData::ccSaturationValue
ULWord ccSaturationValue
My saturation value, used only in 3-way color correction mode.
Definition: ntv2publicinterface.h:7106
NTV2StandardSet
std::set< NTV2Standard > NTV2StandardSet
A set of distinct NTV2Standard values.
Definition: ntv2publicinterface.h:8780
AUTOCIRCULATE_STATUS::operator[]
std::string operator[](const unsigned inIndexNum) const
Definition: ntv2publicinterface.cpp:2506
AUTOCIRCULATE_TRANSFER::DisableSegmentedDMAs
bool DisableSegmentedDMAs(void)
Disables segmented DMAs, performing a Reset on my acInSegmentedDMAInfo.
Definition: ntv2publicinterface.cpp:2819
NTV2_HEADER::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3538
NTV2ColorCorrectionData::Set
bool Set(const NTV2ColorCorrectionMode inMode, const ULWord inSaturation, const void *pInTableData)
Sets this struct from the given mode, saturation and table data, replacing any existing mode,...
Definition: ntv2publicinterface.cpp:2622
UByteSequence
std::vector< uint8_t > UByteSequence
An ordered sequence of UByte (uint8_t) values.
Definition: ntv2publicinterface.h:38
NTV2DeviceCanDoOutputDestination
bool NTV2DeviceCanDoOutputDestination(const NTV2DeviceID id, const NTV2OutputDest od)
Definition: ntv2devicefeatures.cpp:135
AUTOCIRCULATE_STATUS_STRUCT::bWithColorCorrection
BOOL_ bWithColorCorrection
Definition: ntv2publicinterface.h:4331
AUTOCIRCULATE_TRANSFER_STATUS::acAncField2TransferSize
ULWord acAncField2TransferSize
Total ancillary data bytes for field 2 transferred (capture only).
Definition: ntv2publicinterface.h:7891
NTV2SetRegisters::mOutBadRegIndexes
NTV2Buffer mOutBadRegIndexes
Array of UWords containing index numbers of the register writes that failed. The SDK owns this memory...
Definition: ntv2publicinterface.h:7529
NTV2StandardSetConstIter
NTV2StandardSet::const_iterator NTV2StandardSetConstIter
A handy const iterator for iterating over an NTV2StandardSet.
Definition: ntv2publicinterface.h:8781
NTV2GeometrySetConstIter
NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter
A handy const iterator for iterating over an NTV2GeometrySet.
Definition: ntv2publicinterface.h:8778
AUTOCIRCULATE_TRANSFER::EnableSegmentedDMAs
bool EnableSegmentedDMAs(const ULWord inNumSegments, const ULWord inNumActiveBytesPerLine, const ULWord inHostBytesPerLine, const ULWord inDeviceBytesPerLine)
Enables segmented DMAs given a segment count, a host pitch, and device pitch value.
Definition: ntv2publicinterface.cpp:2807
NTV2Buffer::Deallocate
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
Definition: ntv2publicinterface.cpp:1664
NTV2SetRegisters::GetFailedRegisterWrites
bool GetFailedRegisterWrites(NTV2RegWrites &outFailedRegWrites) const
Returns an NTV2RegisterWrites built from my mOutBadRegInfos field.
Definition: ntv2publicinterface.cpp:3195
NTV2_OUTPUTDESTINATION_SDI2
@ NTV2_OUTPUTDESTINATION_SDI2
Definition: ntv2enums.h:1281
NTV2StreamBuffer::NTV2StreamBuffer
NTV2StreamBuffer()
Constructs a default NTV2StreamBuffer struct.
Definition: ntv2publicinterface.cpp:2968
NTV2BufferLock::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
Definition: ntv2publicinterface.cpp:2912
NTV2_IS_VALID_TRAILER_TAG
#define NTV2_IS_VALID_TRAILER_TAG(_x_)
Definition: ntv2publicinterface.h:5461
NTV2_OUTPUTDESTINATION_SDI3
@ NTV2_OUTPUTDESTINATION_SDI3
Definition: ntv2enums.h:1282
AUTOCIRCULATE_STATUS::GetProcessedFrameCount
ULWord GetProcessedFrameCount(void) const
Definition: ntv2publicinterface.h:7216
NTV2_HEADER_TAG
#define NTV2_HEADER_TAG
Identifies the struct header.
Definition: ntv2publicinterface.h:5457
NTV2_IS_VALID_TIMECODE_INDEX
#define NTV2_IS_VALID_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3903
FRAME_STAMP_STRUCT::currentFrame
ULWord currentFrame
Last vertical blank frame for this channel's auto-circulate. (at the time of the IOCTL_NTV2_GET_FRAME...
Definition: ntv2publicinterface.h:4491
ntv2endian.h
Defines a number of handy byte-swapping macros.
NTV2HDMIAudioChannels
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
Definition: ntv2enums.h:3586
NTV2OutputDestinationsConstIter
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
Definition: ntv2publicinterface.h:8787
NTV2_HEADER::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3525
NTV2RegInfo::PrintCode
std::ostream & PrintCode(std::ostream &outputStream, const int inRadix=16, const NTV2DeviceID inDeviceID=DEVICE_ID_INVALID) const
Renders me to the given output stream as source code using a "WriteRegister" function call.
Definition: ntv2publicinterface.cpp:3265
AUTOCIRCULATE_TRANSFER::acAudioBuffer
NTV2Buffer acAudioBuffer
The host audio buffer. This field is owned by the client application, and thus is responsible for all...
Definition: ntv2publicinterface.h:7984
NTV2_TYPE_VIRTUAL_DATA_RW
#define NTV2_TYPE_VIRTUAL_DATA_RW
Identifies NTV2VirtualData struct.
Definition: ntv2publicinterface.h:5463
NTV2GetRegisters::GetBadRegisters
bool GetBadRegisters(NTV2RegNumSet &outBadRegNums) const
Returns the set of register numbers that were not read successfully.
Definition: ntv2publicinterface.cpp:3058
NTV2BufferLock::SetBuffer
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock.
Definition: ntv2publicinterface.cpp:2906
NTV2DebugLogging::NTV2DebugLogging
NTV2DebugLogging(const bool inEnable=false)
Constructs an NTV2DebugLogging struct.
Definition: ntv2publicinterface.cpp:2855
NTV2_RP188::Set
void Set(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Sets my fields from the given DBB, low and high ULWord components.
Definition: ntv2publicinterface.h:6823
NTV2SetRegisters::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3661
FRAME_STAMP_STRUCT::audioExpectedAddress
ULWord audioExpectedAddress
The address that was used to transfer.
Definition: ntv2publicinterface.h:4455
NTV2Buffer::SetFrom
bool SetFrom(const NTV2Buffer &inBuffer)
Replaces my contents from the given memory buffer without resizing me.
Definition: ntv2publicinterface.cpp:1701
AUTOCIRCULATE_STATUS::GetBufferLevel
ULWord GetBufferLevel(void) const
Definition: ntv2publicinterface.h:7221
AUTOCIRCULATE_TRANSFER::GetInputTimeCode
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Intended for capture, answers with a specific timecode captured in my acTransferStatus member's acFra...
Definition: ntv2publicinterface.cpp:2841
kVRegShiftHDMOutBitDepth
@ kVRegShiftHDMOutBitDepth
Definition: ntv2virtualregisters.h:663
NTV2PrintChannelList
ostream & NTV2PrintChannelList(const NTV2ChannelList &inObj, const bool inCompact, ostream &inOutStream)
Definition: ntv2publicinterface.cpp:3315
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
NTV2BankSelGetSetRegs::NTV2BankSelGetSetRegs
NTV2BankSelGetSetRegs(const NTV2RegInfo &inBankSelect, const NTV2RegInfo &inRegInfo, const bool inDoWrite=false)
Constructs an NTV2BankSelGetSetRegs struct for atomically reading or writing the given bank-selected ...
Definition: ntv2publicinterface.cpp:3454
FRAME_STAMP_STRUCT::audioOutStartAddress
ULWord audioOutStartAddress
For play - end position (exclusive) in buffer of audio.
Definition: ntv2publicinterface.h:4467
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5607
ThousandsSeparator::do_grouping
virtual std::string do_grouping() const
Definition: ntv2publicinterface.cpp:2492
NTV2RegisterNumberToString
std::string NTV2RegisterNumberToString(const NTV2RegisterNumber inValue)
Definition: ntv2utils.cpp:7702
AJADebug
Definition: debug.h:243
NTV2GetRegisters::GetRequestedRegisterNumbers
bool GetRequestedRegisterNumbers(NTV2RegNumSet &outRegNums) const
Answers with the set of register numbers that were requested.
Definition: ntv2publicinterface.cpp:3023
NTV2_IOKINDS_HDMI
@ NTV2_IOKINDS_HDMI
Specifies HDMI input/output kinds.
Definition: ntv2enums.h:1252
AUTOCIRCULATE_TRANSFER::SetFrameBufferFormat
bool SetFrameBufferFormat(const NTV2FrameBufferFormat inNewFormat)
Sets my acFrameBufferFormat value to the given new value (if valid and circulating with AUTOCIRCULATE...
Definition: ntv2publicinterface.cpp:2790
kVRegMaskHDMOutVideoStandard
@ kVRegMaskHDMOutVideoStandard
Definition: ntv2virtualregisters.h:642
FRAME_STAMP::acAudioOutStopAddress
ULWord acAudioOutStopAddress
For play - first position in buffer of audio – AudioOutAddress at the time this Frame was stamped.
Definition: ntv2publicinterface.h:7738
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:207
AUTOCIRCULATE_STATUS::WithHDMIAuxData
bool WithHDMIAuxData(void) const
Definition: ntv2publicinterface.h:7341
AutoCircGenericTask::taskType
AutoCircTaskType taskType
Definition: ntv2publicinterface.h:4728
NTV2_IS_ATC_VITC2_TIMECODE_INDEX
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3910
NTV2Buffer::Allocate
bool Allocate(const size_t inByteCount, const bool inPageAligned=false)
Allocates (or re-allocates) my user-space storage using the given byte count. I assume full responsib...
Definition: ntv2publicinterface.cpp:1630
NTV2ColorCorrectionModeToString
std::string NTV2ColorCorrectionModeToString(const NTV2ColorCorrectionMode inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7722
NTV2DeviceGetSupportedPixelFormats
bool NTV2DeviceGetSupportedPixelFormats(const NTV2DeviceID inDeviceID, NTV2PixelFormats &outFormats)
Returns a set of distinct NTV2FrameBufferFormat values supported on the given device.
Definition: ntv2publicinterface.cpp:1222
NTV2Buffer::NTV2Buffer
NTV2Buffer(const void *pInUserPointer, const size_t inByteCount)
Constructs me from a client-supplied address and size.
Definition: ntv2publicinterface.cpp:1495
NTV2DeviceIDSetConstIter
NTV2DeviceIDSet::const_iterator NTV2DeviceIDSetConstIter
A convenient const iterator for NTV2DeviceIDSet.
Definition: ntv2utils.h:1033
NTV2Buffer::PutU32s
bool PutU32s(const ULWordSequence &inU32s, const size_t inU32Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 32-bit values into me.
Definition: ntv2publicinterface.cpp:730
NTV2BufferLock
This is used to prelock a video/audio/anc buffer used as the source or target of DMA transfers....
Definition: ntv2publicinterface.h:8442
NTV2Buffer::toHexString
bool toHexString(std::string &outStr, const size_t inLineBreakInterval=0) const
Converts my contents into a hex-encoded string.
Definition: ntv2publicinterface.cpp:344
AUTOCIRCULATE_TRANSFER_STRUCT::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:4066
NTV2IOKinds
enum NTV2InputSourceKinds NTV2IOKinds
AUTOCIRCULATE_TRANSFER::SetAncBuffers
bool SetAncBuffers(ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my ancillary data buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2724
NTV2_INVALID_HDMI_AUDIO_CHANNELS
@ NTV2_INVALID_HDMI_AUDIO_CHANNELS
Definition: ntv2enums.h:3591
NTV2AudioChannelQuadsConstIter
NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelQuad values.
Definition: ntv2publicinterface.h:63
NTV2Buffer::Dump
std::ostream & Dump(std::ostream &inOutputStream=std::cout, const size_t inStartByteOffset=0, const size_t inByteCount=0, const size_t inRadix=16, const size_t inBytesPerGroup=4, const size_t inGroupsPerLine=8, const size_t inAddressRadix=0, const bool inShowAscii=false, const size_t inAddrOffset=0) const
Dumps me in hex/octal/decimal, with/without Ascii, to the given output stream.
NTV2ChannelSetConstIter
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
Definition: ntv2publicinterface.h:3855
NTV2PixelFormat
NTV2FrameBufferFormat NTV2PixelFormat
An alias for NTV2FrameBufferFormat.
Definition: ntv2enums.h:248
NTV2TimeCodesConstIter
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
Definition: ntv2publicinterface.h:6847
kVRegShiftHDMOutColorRGB
@ kVRegShiftHDMOutColorRGB
Definition: ntv2virtualregisters.h:664
NTV2_IOKINDS_ANALOG
@ NTV2_IOKINDS_ANALOG
Specifies analog input/output kinds.
Definition: ntv2enums.h:1253
NTV2DeviceCanDoFrameBufferFormat
bool NTV2DeviceCanDoFrameBufferFormat(const NTV2DeviceID inDeviceID, const NTV2FrameBufferFormat inFBFormat)
Definition: ntv2devicefeatures.hpp:15330
NTV2SDIInStatistics::NTV2SDIInStatistics
NTV2SDIInStatistics()
Constructs an NTV2GetSDIStatistics struct and initializes it to its default state.
Definition: ntv2publicinterface.cpp:2316
NTV2SDIInputStatus::NTV2SDIInputStatus
NTV2SDIInputStatus()
Constructs a default NTV2SDIInputStatus.
Definition: ntv2publicinterface.cpp:112
AUTOCIRCULATE_TRANSFER::SetOutputTimeCode
bool SetOutputTimeCode(const NTV2_RP188 &inTimecode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1)
Intended for playout, sets one element of my acOutputTimeCodes member.
Definition: ntv2publicinterface.cpp:2755
NTV2GetRegisters::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
Definition: ntv2publicinterface.cpp:3151
NTV2HDMIOutputStatus::Clear
void Clear(void)
Resets me to an invalid state.
Definition: ntv2publicinterface.cpp:148
BIN032
#define BIN032(__x__)
Definition: ntv2publicinterface.h:5620
NTV2DebugLogging::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
Definition: ntv2publicinterface.cpp:2862
kVRegShiftHDMOutProtocol
@ kVRegShiftHDMOutProtocol
Definition: ntv2virtualregisters.h:667
NTV2SetRegisters::mTrailer
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:7530
NTV2_TYPE_GETREGS
#define NTV2_TYPE_GETREGS
Identifies NTV2GetRegisters struct.
Definition: ntv2publicinterface.h:5470
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
NTV2AutoCirculateStateToString
string NTV2AutoCirculateStateToString(const NTV2AutoCirculateState inState)
Definition: ntv2publicinterface.cpp:1356
NTV2HDMIRange
NTV2HDMIRange
Indicates or specifies the HDMI RGB range.
Definition: ntv2enums.h:3554
FRAME_STAMP::acAudioExpectedAddress
ULWord acAudioExpectedAddress
The address that was used to transfer.
Definition: ntv2publicinterface.h:7735
AUTOCIRCULATE_STATUS_STRUCT::audioClockStartTime
ULWord64 audioClockStartTime
Definition: ntv2publicinterface.h:4321
FRAME_STAMP_STRUCT::currentReps
ULWord currentReps
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP)
Definition: ntv2publicinterface.h:4513
AUTOCIRCULATE_STATUS::acRDTSCCurrentTime
ULWord64 acRDTSCCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using the host OS system clock.
Definition: ntv2publicinterface.h:7169
NTV2RegWrites
std::vector< NTV2RegInfo > NTV2RegWrites
An ordered sequence of zero or more NTV2RegInfo structs intended for WriteRegister.
Definition: ntv2publicinterface.h:4011
NTV2_TRAILER
All new NTV2 structs end with this common trailer.
Definition: ntv2publicinterface.h:7006
FRAME_STAMP::acTotalBytesTransferred
ULWord acTotalBytesTransferred
Total audio and video bytes transferred.
Definition: ntv2publicinterface.h:7740
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:396
AJA_DebugStat_ACXferRPCDecode
@ AJA_DebugStat_ACXferRPCDecode
Definition: debugshare.h:249
kVRegMaskHDMOutVideoFrameRate
@ kVRegMaskHDMOutVideoFrameRate
Definition: ntv2virtualregisters.h:643
AutoCircGenericTask
Definition: ntv2publicinterface.h:4726
NTV2ColorCorrectionMode
NTV2ColorCorrectionMode
Definition: ntv2enums.h:2024
NTV2SDKVersionDecode_Minor
#define NTV2SDKVersionDecode_Minor
Definition: ntv2publicinterface.h:5386
FRAME_STAMP::acCurrentFrameTime
LWord64 acCurrentFrameTime
Vertical blank start of current frame.
Definition: ntv2publicinterface.h:7761
FRAME_STAMP
This is returned by the CNTV2Card::AutoCirculateGetFrameStamp function, and is also embedded in the A...
Definition: ntv2publicinterface.h:7729
NTV2VirtualData::mTag
ULWord mTag
Tag for virtual data. This value is used to recal saved data by tag.
Definition: ntv2publicinterface.h:7639
NTV2SDIInputStatus
For devices that support it (see NTV2DeviceCanDoSDIErrorChecks ), this struct reports SDI input error...
Definition: ntv2publicinterface.h:6866
NTV2AudioChannelQuadToString
std::string NTV2AudioChannelQuadToString(const NTV2Audio4ChannelSelect inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6461
NTV2DeviceGetSupportedInputSources
bool NTV2DeviceGetSupportedInputSources(const NTV2DeviceID inDeviceID, NTV2InputSourceSet &outInputSources, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2InputSource values supported on the given device.
Definition: ntv2publicinterface.cpp:1277
NTV2Buffer::IsPageAligned
bool IsPageAligned(void) const
Definition: ntv2publicinterface.h:6083
AUTOCIRCULATE_STATUS_STRUCT::framesProcessed
ULWord framesProcessed
Definition: ntv2publicinterface.h:4324
NTV2DeviceCanDoVideoFormat
bool NTV2DeviceCanDoVideoFormat(const NTV2DeviceID inDeviceID, const NTV2VideoFormat inVideoFormat)
Definition: ntv2devicefeatures.hpp:18535
FRAME_STAMP::operator=
FRAME_STAMP & operator=(const FRAME_STAMP &inRHS)
Definition: ntv2publicinterface.cpp:2184
NTV2SegmentedDMAInfo::acSegmentDevicePitch
ULWord acSegmentDevicePitch
Offset, in bytes, between the start of one device segment and the start of the next device segment (i...
Definition: ntv2publicinterface.h:7052
NTV2OutputDest
enum NTV2OutputDestination NTV2OutputDest
NTV2BankSelGetSetRegs::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3701
FRAME_STAMP::acCurrentAudioStartAddress
ULWord acCurrentAudioStartAddress
As set by play.
Definition: ntv2publicinterface.h:7764
operator+=
NTV2TCIndexes & operator+=(NTV2TCIndexes &inOutSet, const NTV2TCIndexes &inSet)
Appends the given NTV2TCIndexes contents into the given set.
Definition: ntv2publicinterface.cpp:871
NTV2AudioChannelQuads
std::set< NTV2AudioChannelQuad > NTV2AudioChannelQuads
A set of distinct NTV2AudioChannelQuad values.
Definition: ntv2publicinterface.h:62
NTV2RegNumSet
NTV2RegisterNumberSet NTV2RegNumSet
A set of distinct NTV2RegisterNumbers.
Definition: ntv2publicinterface.h:7382
NTV2BufferLock::SetFlags
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock.
Definition: ntv2publicinterface.h:8508
NTV2GetUnsupportedStandards
bool NTV2GetUnsupportedStandards(NTV2StandardSet &outStandards)
Returns a set of NTV2Standard values not suported by any NTV2 device.
Definition: ntv2publicinterface.cpp:1181
NTV2_TYPE_AJABUFFERLOCK
#define NTV2_TYPE_AJABUFFERLOCK
Identifies NTV2BufferLock struct.
Definition: ntv2publicinterface.h:5474
AUTOCIRCULATE_TRANSFER::acTrailer
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:8057
NTV2BankSelGetSetRegs
This is used to atomically perform bank-selected register reads or writes.
Definition: ntv2publicinterface.h:7587
AUTOCIRCULATE_STATUS::acState
NTV2AutoCirculateState acState
Current AutoCirculate state.
Definition: ntv2publicinterface.h:7163
FRAME_STAMP_STRUCT::currentLineCount
ULWord currentLineCount
Definition: ntv2publicinterface.h:4512
NTV2SegmentedXferInfo
Describes a segmented data transfer (copy or move) from a source memory location to a destination loc...
Definition: ntv2publicinterface.h:5732
AUTOCIRCULATE_TRANSFER::acInSegmentedDMAInfo
NTV2SegmentedDMAInfo acInSegmentedDMAInfo
Optional segmented DMA info, for use with specialized data transfers.
Definition: ntv2publicinterface.h:8038
FRAME_STAMP_STRUCT::startSample
ULWord startSample
Definition: ntv2publicinterface.h:4480
NTV2StreamChannel::NTV2StreamChannel
NTV2StreamChannel()
Constructs a default NTV2StreamChannel struct.
Definition: ntv2publicinterface.cpp:2955
NTV2_QuarterSizeExpandOff
@ NTV2_QuarterSizeExpandOff
Definition: ntv2enums.h:2432
NTV2Buffer::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
Definition: ntv2publicinterface.cpp:319
AUTOCIRCULATE_STATUS::IsInput
bool IsInput(void) const
Definition: ntv2publicinterface.h:7346
NTV2BufferLock::mHeader
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:8443
FRAME_STAMP::acAudioInStartAddress
ULWord acAudioInStartAddress
For record - first position in buffer of audio (includes base offset) – AudioInAddress at the time th...
Definition: ntv2publicinterface.h:7736
NTV2_INPUTSOURCE_ANALOG1
@ NTV2_INPUTSOURCE_ANALOG1
Identifies the first analog video input.
Definition: ntv2enums.h:1223
AUTOCIRCULATE_WITH_ANC
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
Definition: ntv2publicinterface.h:5527
NTV2_TYPE_ACXFERSTATUS
#define NTV2_TYPE_ACXFERSTATUS
Identifies AUTOCIRCULATE_TRANSFER_STATUS struct.
Definition: ntv2publicinterface.h:5467
NTV2HDMIAudioChannelsToString
std::string NTV2HDMIAudioChannelsToString(const NTV2HDMIAudioChannels inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6661
ntv2nub::PUSHU64
void PUSHU64(const uint64_t inVal, std::vector< uint8_t > &inArr, const bool dontSwap=false)
Definition: ntv2nubtypes.h:46
AJAMemory::FreeAligned
static void FreeAligned(void *pMemory)
Definition: memory.cpp:145
AUTO_CIRC_COMMAND
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
AUTOCIRCULATE_WITH_FBFCHANGE
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
Definition: ntv2publicinterface.h:5523
NTV2Buffer::GetRingChangedByteRange
bool GetRingChangedByteRange(const NTV2Buffer &inBuffer, ULWord &outByteOffsetFirst, ULWord &outByteOffsetLast) const
Assuming my contents and the contents of the given buffer comprise ring buffers that periodically get...
Definition: ntv2publicinterface.cpp:1926
FRAME_STAMP::acTimeCodes
NTV2Buffer acTimeCodes
Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCInde...
Definition: ntv2publicinterface.h:7757
eTransferAutoCirculate
@ eTransferAutoCirculate
Definition: ntv2publicinterface.h:4252
NTV2_RP188::fLo
ULWord fLo
| BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
Definition: ntv2publicinterface.h:6762
NTV2Buffer::DefaultPageSize
static size_t DefaultPageSize(void)
Definition: ntv2publicinterface.cpp:2007
NTV2Bitstream::mHeader
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:8547
NTV2_IS_VALID_IOKINDS
#define NTV2_IS_VALID_IOKINDS(_k_)
Definition: ntv2enums.h:1264
NTV2ColorCorrectionData::ccMode
NTV2ColorCorrectionMode ccMode
My mode (off, RGB, YCbCr, or 3-way)
Definition: ntv2publicinterface.h:7105
NTV2_OUTPUTDESTINATION_SDI1
@ NTV2_OUTPUTDESTINATION_SDI1
Definition: ntv2enums.h:1280
NTV2InputSourceToString
std::string NTV2InputSourceToString(const NTV2InputSource inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7215
NTV2CROSSPOINT_INVALID
@ NTV2CROSSPOINT_INVALID
Definition: ntv2enums.h:1666
AutoCircVidProcModeToString
std::string AutoCircVidProcModeToString(const AutoCircVidProcMode inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7708
AUTOCIRCULATE_STATUS::acAudioClockCurrentTime
ULWord64 acAudioClockCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using "64-bit clean" value of the device's 4...
Definition: ntv2publicinterface.h:7170
NTV2RegInfo::registerNumber
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
Definition: ntv2publicinterface.h:3933
NTV2TCIndexToString
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6413
NTV2_RP188::fHi
ULWord fHi
| BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
Definition: ntv2publicinterface.h:6763
AutoCircVidProcInfo
Definition: ntv2publicinterface.h:4206
NTV2GetRegisters
This is used by the CNTV2Card::ReadRegisters function.
Definition: ntv2publicinterface.h:7411
AutoCircVidProcInfo::foregroundKeyCrosspoint
NTV2Crosspoint foregroundKeyCrosspoint
Definition: ntv2publicinterface.h:4211
eGetFrameStamp
@ eGetFrameStamp
Definition: ntv2publicinterface.h:4249
NTV2Bitstream::mTrailer
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:8553
FRAME_STAMP_STRUCT
Definition: ntv2publicinterface.h:4436
ntv2nub::POPU64
void POPU64(uint64_t &outVal, const std::vector< uint8_t > &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
Definition: ntv2nubtypes.h:78
AUTOCIRCULATE_TRANSFER::acFrameBufferOrientation
NTV2FBOrientation acFrameBufferOrientation
Specifies the frame buffer orientation to change to. Ignored if AUTOCIRCULATE_WITH_FBOCHANGE option i...
Definition: ntv2publicinterface.h:8041
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:153
NTV2_MAX_NUM_CHANNELS
@ NTV2_MAX_NUM_CHANNELS
Definition: ntv2enums.h:1315
NTV2EndianSwap16
#define NTV2EndianSwap16(__val__)
Definition: ntv2endian.h:15
NTV2_TRAILER::fTrailerVersion
ULWord fTrailerVersion
Trailer version, set when created. Before SDK 15.1: always zero; 15.1 or later: set to calling SDK ve...
Definition: ntv2publicinterface.h:7007
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::value_t::string
@ string
string value
NTV2RegInfo::registerMask
ULWord registerMask
My register mask value to use in a ReadRegister or WriteRegister call.
Definition: ntv2publicinterface.h:3935
AUTOCIRCULATE_STATUS_STRUCT::bWithVidProc
BOOL_ bWithVidProc
Definition: ntv2publicinterface.h:4332
aja::replace
std::string & replace(std::string &str, const std::string &from, const std::string &to)
Definition: common.cpp:110
NTV2AudioChannelPairToString
std::string NTV2AudioChannelPairToString(const NTV2AudioChannelPair inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6450
NTV2Buffer::IsNULL
bool IsNULL(void) const
Definition: ntv2publicinterface.h:6088
NTV2Buffer::GetRawHostPointer
ULWord64 GetRawHostPointer(void) const
Definition: ntv2publicinterface.h:6061
NTV2VirtualData::mIsWriting
ULWord mIsWriting
If non-zero, virtual data will be written; otherwise, virtual data will be read.
Definition: ntv2publicinterface.h:7640
NTV2SegmentedXferInfo::Print
std::ostream & Print(std::ostream &inStrm, const bool inDumpSegments=false) const
Writes a human-readable description of me into a given output stream.
Definition: ntv2publicinterface.cpp:1376
ULWord
uint32_t ULWord
Definition: ajatypes.h:253
ntv2nub
Definition: ntv2nubtypes.h:21
NTV2StreamChannel::mStatus
ULWord mStatus
Action status.
Definition: ntv2publicinterface.h:8673
NTV2_CURRENT_HEADER_VERSION
#define NTV2_CURRENT_HEADER_VERSION
Current version of NTV2_HEADER struct, originally 0.
Definition: ntv2publicinterface.h:5452
AUTOCIRCULATE_STATUS::CopyFrom
bool CopyFrom(const AUTOCIRCULATE_STATUS_STRUCT &inOldStruct)
Copies the given AUTOCIRCULATE_STATUS_STRUCT into me.
Definition: ntv2publicinterface.cpp:2437
FRAME_STAMP::acAudioClockTimeStamp
ULWord64 acAudioClockTimeStamp
Number of 10MHz ticks at moment of play or record, based on 48kHz clock (from register 28).
Definition: ntv2publicinterface.h:7734
NTV2SetRegisters::mInNumRegisters
ULWord mInNumRegisters
The number of NTV2RegInfo's to be set.
Definition: ntv2publicinterface.h:7526
NTV2SDIInputStatus::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
Definition: ntv2publicinterface.cpp:132
NTV2AudioSystemSetToStr
string NTV2AudioSystemSetToStr(const NTV2AudioSystemSet &inObj, const bool inCompact)
Definition: ntv2publicinterface.cpp:3406
NTV2SegmentedDMAInfo::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3878
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7160
NTV2_OUTPUT_DEST_IS_HDMI
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
Definition: ntv2enums.h:1292
AUTOCIRCULATE_STATUS::WithRP188
bool WithRP188(void) const
Definition: ntv2publicinterface.h:7306
AUTOCIRCULATE_TRANSFER::acHeader
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:7970
AutoCircVidProcInfo::mode
AutoCircVidProcMode mode
Definition: ntv2publicinterface.h:4208
FRAME_STAMP::~FRAME_STAMP
~FRAME_STAMP()
My destructor.
Definition: ntv2publicinterface.cpp:2090
NTV2_CCMODE_3WAY
@ NTV2_CCMODE_3WAY
Definition: ntv2enums.h:2029
CNTV2RegisterExpert::GetDisplayName
static std::string GetDisplayName(const uint32_t inRegNum)
Definition: ntv2registerexpert.cpp:4612
NTV2DeviceGetSupportedStandards
bool NTV2DeviceGetSupportedStandards(const NTV2DeviceID inDeviceID, NTV2StandardSet &outStandards)
Returns a set of distinct NTV2Standard values supported on the given device.
Definition: ntv2publicinterface.cpp:1246
AUTOCIRCULATE_TRANSFER::acVideoQuarterSizeExpand
NTV2QuarterSizeExpandMode acVideoQuarterSizeExpand
Turns on the "quarter-size expand" (2x H + 2x V) hardware. Defaults to off (1:1).
Definition: ntv2publicinterface.h:8043
ThousandsSeparator
Definition: ntv2publicinterface.cpp:2489
NTV2EndianSwap32
#define NTV2EndianSwap32(__val__)
Definition: ntv2endian.h:19
AUTOCIRCULATE_TRANSFER_STATUS::acHeader
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:7881
NTV2PrintULWordVector
ostream & NTV2PrintULWordVector(const NTV2ULWordVector &inObj, ostream &inOutStream)
Definition: ntv2publicinterface.cpp:3307
NTV2GetUnsupportedPixelFormats
bool NTV2GetUnsupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of NTV2PixelFormat values not suported by any NTV2 device.
Definition: ntv2publicinterface.cpp:1156
BIN08
#define BIN08(__x__)
Definition: ntv2publicinterface.h:5628
NTV2FrameRateSetConstIter
NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter
A handy const iterator for iterating over an NTV2FrameRateSet.
Definition: ntv2publicinterface.h:8790
AUTOCIRCULATE_TRANSFER::SetOutputTimeCodes
bool SetOutputTimeCodes(const NTV2TimeCodes &inValues)
Intended for playout, replaces the contents of my acOutputTimeCodes member.
Definition: ntv2publicinterface.cpp:2735
NTV2ColorCorrectionData::~NTV2ColorCorrectionData
~NTV2ColorCorrectionData()
My destructor, which frees my private color correction table buffer.
Definition: ntv2publicinterface.cpp:2608
FRAME_STAMP::GetInputTimeCodes
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Returns all RP188 timecodes associated with the frame in NTV2TCIndex order.
Definition: ntv2publicinterface.cpp:2095
NTV2Buffer::IsAllocatedBySDK
bool IsAllocatedBySDK(void) const
Definition: ntv2publicinterface.h:6072
UWordSequenceConstIter
UWordSequence::const_iterator UWordSequenceConstIter
A handy const iterator for iterating over a UWordSequence.
Definition: ntv2publicinterface.h:43
UWordSequence
std::vector< uint16_t > UWordSequence
An ordered sequence of UWord (uint16_t) values.
Definition: ntv2publicinterface.h:42
AUTOCIRCULATE_STATUS::acActiveFrame
LWord acActiveFrame
Current frame actually being captured/played when CNTV2Card::AutoCirculateGetStatus called....
Definition: ntv2publicinterface.h:7166
NTV2GeometrySet
std::set< NTV2FrameGeometry > NTV2GeometrySet
A set of distinct NTV2FrameGeometry values.
Definition: ntv2publicinterface.h:8777
FRAME_STAMP::acStartSample
ULWord acStartSample
The actual start sample when this frame was started in VBI, which may be used to check sync against a...
Definition: ntv2publicinterface.h:7741
AUTOCIRCULATE_TRANSFER_STRUCT
Definition: ntv2publicinterface.h:4573
AUTOCIRCULATE_TASK_STRUCT::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:4251
NTV2_CCMODE_INVALID
@ NTV2_CCMODE_INVALID
Definition: ntv2enums.h:2031
NTV2HDMIProtocol
NTV2HDMIProtocol
Indicates or specifies the HDMI protocol.
Definition: ntv2enums.h:3540
NTV2_IS_VALID_STANDARD
#define NTV2_IS_VALID_STANDARD(__s__)
Definition: ntv2enums.h:176
NTV2AudioSystemSet
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
Definition: ntv2publicinterface.h:3900
oOCT
#define oOCT(__x__)
Definition: ntv2publicinterface.h:5610
NTV2_MAX_NUM_VIDEO_FORMATS
@ NTV2_MAX_NUM_VIDEO_FORMATS
Definition: ntv2enums.h:685
FRAME_STAMP::acAudioInStopAddress
ULWord acAudioInStopAddress
For record - end position (exclusive) in buffer of audio (includes base offset) – AudioInAddress at t...
Definition: ntv2publicinterface.h:7737
AutoCircVidProcInfo::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3911
kVRegShiftHDMOutRangeFull
@ kVRegShiftHDMOutRangeFull
Definition: ntv2virtualregisters.h:665
FRAME_STAMP::GetSDIInputStatus
bool GetSDIInputStatus(NTV2SDIInputStatus &outStatus, const UWord inSDIInputIndex0=0) const
Answers with the NTV2SDIInputStatus for the given SDI input spigot.
Definition: ntv2publicinterface.cpp:2159
NTV2StreamChannel::Print
std::ostream & Print(std::ostream &inOutStream) const
Definition: ntv2publicinterface.cpp:2961
NTV2_RP188::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3942
NTV2SetRegisters::ResetUsing
bool ResetUsing(const NTV2RegWrites &inRegWrites)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
Definition: ntv2publicinterface.cpp:3168
AUTOCIRCULATE_STATUS_STRUCT::bFbfChange
BOOL_ bFbfChange
Definition: ntv2publicinterface.h:4329
NTV2TCIndex
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
Definition: ntv2enums.h:3870
AUTOCIRCULATE_TRANSFER_STATUS::acBufferLevel
ULWord acBufferLevel
The number of frames ready to record/play after the transfer.
Definition: ntv2publicinterface.h:7884
eGetAutoCirc
@ eGetAutoCirc
Definition: ntv2publicinterface.h:4248
ntv2nub::POPU8
void POPU8(uint8_t &outVal, const std::vector< uint8_t > &inArr, std::size_t &inOutNdx)
Definition: ntv2nubtypes.h:56
AUTOCIRCULATE_STATUS::GetActiveFrame
LWord GetActiveFrame(void) const
Definition: ntv2publicinterface.h:7241
NTV2Buffer::ByteSwap32
bool ByteSwap32(void)
Byte-swaps my contents 32-bits at a time.
Definition: ntv2publicinterface.cpp:1590
NTV2RegisterReadsConstIter
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
Definition: ntv2publicinterface.h:4015
AUTOCIRCULATE_STATUS::AUTOCIRCULATE_STATUS
AUTOCIRCULATE_STATUS(const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_CHANNEL1)
Constructs a default AUTOCIRCULATE_STATUS struct for the given NTV2Crosspoint.
Definition: ntv2publicinterface.cpp:2390
NTV2_OUTPUTDESTINATION_SDI6
@ NTV2_OUTPUTDESTINATION_SDI6
Definition: ntv2enums.h:1285
NTV2StandardToString
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6914
AUTOCIRCULATE_TRANSFER::acDesiredFrame
LWord acDesiredFrame
Used to specify a different frame in the circulate ring to transfer to/from.
Definition: ntv2publicinterface.h:8053
NTV2Bitstream::SetBuffer
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::LoadBitstream.
Definition: ntv2publicinterface.cpp:2942
FRAME_STAMP::SetFrom
bool SetFrom(const FRAME_STAMP_STRUCT &inOldStruct)
Sets my fields from the given FRAME_STAMP_STRUCT.
Definition: ntv2publicinterface.cpp:2218
AutoCircVidProcInfo::AutoCircVidProcInfo
AutoCircVidProcInfo()
Definition: ntv2publicinterface.cpp:202
NTV2_HDMIColorSpaceYCbCr
@ NTV2_HDMIColorSpaceYCbCr
YCbCr color space.
Definition: ntv2enums.h:3529
NTV2_TYPE_SDISTATS
#define NTV2_TYPE_SDISTATS
Identifies NTV2SDIStatus struct.
Definition: ntv2publicinterface.h:5472
AUTOCIRCULATE_STATUS_STRUCT::channelSpec
NTV2Crosspoint channelSpec
Definition: ntv2publicinterface.h:4315
NTV2BufferLock::mTrailer
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:8449
NTV2Bitstream::mFlags
ULWord mFlags
Action flags (lock, unlock, etc)
Definition: ntv2publicinterface.h:8549
NTV2Buffer::PutU16s
bool PutU16s(const UWordSequence &inU16s, const size_t inU16Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 16-bit values into me.
Definition: ntv2publicinterface.cpp:758
FRAME_STAMP::acHeader
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:7730
AUTOCIRCULATE_TRANSFER::acCrosspoint
NTV2Crosspoint acCrosspoint
Will be deprecated – used internally by the SDK. Will be removed when the driver changes to use NTV2C...
Definition: ntv2publicinterface.h:8055
kVRegMaskHDMOutAudioRate
@ kVRegMaskHDMOutAudioRate
Definition: ntv2virtualregisters.h:650
AUTOCIRCULATE_DATA::AUTOCIRCULATE_DATA
AUTOCIRCULATE_DATA(const AUTO_CIRC_COMMAND inCommand=AUTO_CIRC_COMMAND_INVALID, const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_INVALID)
Definition: ntv2publicinterface.cpp:214
NTV2Buffer::IsContentEqual
bool IsContentEqual(const NTV2Buffer &inBuffer, const ULWord inByteOffset=0, const ULWord inByteCount=0xFFFFFFFF) const
Definition: ntv2publicinterface.cpp:1851
NTV2_HEADER
All new NTV2 structs start with this common header.
Definition: ntv2publicinterface.h:6954
NTV2_OUTPUT_DEST_IS_ANALOG
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
Definition: ntv2enums.h:1293
NTV2Buffer::CopyFrom
bool CopyFrom(const void *pInSrcBuffer, const ULWord inByteCount)
Replaces my contents from the given memory buffer, resizing me to the new byte count.
Definition: ntv2publicinterface.cpp:1718
NTV2_IS_VALID_STRUCT_TYPE
#define NTV2_IS_VALID_STRUCT_TYPE(_x_)
Definition: ntv2publicinterface.h:5489
aja::upper
std::string & upper(std::string &str)
Definition: common.cpp:442
UWord
uint16_t UWord
Definition: ajatypes.h:251
NTV2RegisterReads
NTV2RegWrites NTV2RegisterReads
Definition: ntv2publicinterface.h:4014
sSegXferUnits
static const string sSegXferUnits[]
Definition: ntv2publicinterface.cpp:1374
NTV2_RP188::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3950
NTV2_TRAILER::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3558
AUTOCIRCULATE_STATUS_STRUCT::state
NTV2AutoCirculateState state
Definition: ntv2publicinterface.h:4316
AUTOCIRCULATE_TRANSFER
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
Definition: ntv2publicinterface.h:7969
NTV2_OUTPUTDESTINATION_SDI8
@ NTV2_OUTPUTDESTINATION_SDI8
Definition: ntv2enums.h:1287
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2ColorCorrectionData
Color correction data used with AUTOCIRCULATE_WITH_COLORCORRECT option.
Definition: ntv2publicinterface.h:7104
FRAME_STAMP::acFrame
ULWord acFrame
Record/capture – current frame number.
Definition: ntv2publicinterface.h:7770
NTV2_TYPE_AJADEBUGLOGGING
#define NTV2_TYPE_AJADEBUGLOGGING
Identifies NTV2DebugLogging struct.
Definition: ntv2publicinterface.h:5473
YesNo
#define YesNo(__x__)
Definition: ntv2registerexpert.h:25
NTV2VideoFormatToString
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
Definition: ntv2utils.cpp:6750
NTV2VideoFormatSetConstIter
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
Definition: ntv2publicinterface.h:8770
AUTOCIRCULATE_TRANSFER_STATUS::acTrailer
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:7892
AUTOCIRCULATE_DATA::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:4368
NTV2_INPUT_SOURCE_IS_HDMI
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
Definition: ntv2enums.h:1240
NTV2DeviceGetSupportedGeometries
bool NTV2DeviceGetSupportedGeometries(const NTV2DeviceID inDeviceID, NTV2GeometrySet &outGeometries)
Returns a set of distinct NTV2FrameGeometry values supported on the given device.
Definition: ntv2publicinterface.cpp:1262
NTV2_MAX_NUM_TIMECODE_INDEXES
@ NTV2_MAX_NUM_TIMECODE_INDEXES
Definition: ntv2enums.h:3899
AUTOCIRCULATE_TRANSFER::SetVideoBuffer
bool SetVideoBuffer(ULWord *pInVideoBuffer, const ULWord inVideoByteCount)
Sets my video buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2708
NTV2BankSelGetSetRegs::GetRegInfo
NTV2RegInfo GetRegInfo(const UWord inIndex0=0) const
Definition: ntv2publicinterface.cpp:3470
NTV2HDMIRangeToString
std::string NTV2HDMIRangeToString(const NTV2HDMIRange inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6683
FRAME_STAMP::acCurrentLineCount
ULWord acCurrentLineCount
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP)
Definition: ntv2publicinterface.h:7766
NTV2VirtualData::NTV2VirtualData
NTV2VirtualData(const ULWord inTag, const void *inVirtualData, const size_t inVirtualDataSize, const bool inDoWrite=false)
Constructs an NTV2VirtualData struct for reading or writing virtual data.
Definition: ntv2publicinterface.cpp:3498
FRAME_STAMP_STRUCT::audioClockCurrentTime
ULWord64 audioClockCurrentTime
48kHz clock in reg 28 extended to 64 bits
Definition: ntv2publicinterface.h:4500
AsU64Ref
#define AsU64Ref(_x_)
Definition: ntv2publicinterface.cpp:3523
NTV2SDKVersionEncode
#define NTV2SDKVersionEncode
Definition: ntv2publicinterface.h:5384
NTV2Bitstream::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:4143
AUTOCIRCULATE_STATUS::IsStopped
bool IsStopped(void) const
Definition: ntv2publicinterface.h:7276
NTV2Buffer::GetString
bool GetString(std::string &outString, const size_t inU8Offset=0, const size_t inMaxSize=128) const
Answers with my contents as a character string.
Definition: ntv2publicinterface.cpp:662
ThousandsSeparator::do_thousands_sep
virtual char do_thousands_sep() const
Definition: ntv2publicinterface.cpp:2491
AUTOCIRCULATE_TRANSFER::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3992
NTV2Buffer::Segment
NTV2Buffer & Segment(NTV2Buffer &outPtr, const ULWord inByteOffset, const ULWord inByteCount) const
Resets an NTV2Buffer instance to reference a contiguous segment (portion) of my memory buffer.
Definition: ntv2publicinterface.cpp:487
AUTOCIRCULATE_STATUS_STRUCT::startFrame
LWord startFrame
Definition: ntv2publicinterface.h:4317
AUTOCIRCULATE_STATUS::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3716
NTV2ULWordVector
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
Definition: ntv2publicinterface.h:3825
FRAME_STAMP::operator[]
std::string operator[](const unsigned inIndexNum) const
Definition: ntv2publicinterface.cpp:2296
AUTOCIRCULATE_TRANSFER::acColorCorrection
NTV2ColorCorrectionData acColorCorrection
Color correction data. This field is ignored if AUTOCIRCULATE_WITH_COLORCORRECT option is not set.
Definition: ntv2publicinterface.h:8039
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:91
NTV2Buffer::GetU64s
bool GetU64s(ULWord64Sequence &outU64s, const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
Definition: ntv2publicinterface.cpp:499
NTV2_NUM_INPUTSOURCES
@ NTV2_NUM_INPUTSOURCES
Definition: ntv2enums.h:1237
NTV2AudioChannelOctetToString
std::string NTV2AudioChannelOctetToString(const NTV2Audio8ChannelSelect inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6472
FRAME_STAMP_STRUCT::frameTime
LWord64 frameTime
Definition: ntv2publicinterface.h:4446
NTV2HDMIProtocolToString
std::string NTV2HDMIProtocolToString(const NTV2HDMIProtocol inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6672
NTV2Buffer::U8
uint8_t U8(const int inIndex) const
Definition: ntv2publicinterface.h:6506
NTV2AudioChannelOctetsConstIter
NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelOctet values.
Definition: ntv2publicinterface.h:67
NTV2_TYPE_ACFRAMESTAMP
#define NTV2_TYPE_ACFRAMESTAMP
Identifies FRAME_STAMP struct.
Definition: ntv2publicinterface.h:5469
AUTOCIRCULATE_STATUS::GetChannel
NTV2Channel GetChannel(void) const
Definition: ntv2publicinterface.cpp:2483
NTV2_RP188::fDBB
ULWord fDBB
Definition: ntv2publicinterface.h:6761
NTV2BankSelGetSetRegs::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
Definition: ntv2publicinterface.cpp:3485
NTV2ChannelSet
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Definition: ntv2publicinterface.h:3854
ntv2version.h
Defines for the NTV2 SDK version number, used by ajantv2/includes/ntv2enums.h. See the ajantv2/includ...
AUTOCIRCULATE_STATUS_STRUCT::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:4157
AUTOCIRCULATE_TRANSFER_STATUS::acFrameStamp
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
Definition: ntv2publicinterface.h:7887
AUTOCIRCULATE_TRANSFER_STATUS
This object is embedded in the AUTOCIRCULATE_TRANSFER struct that's returned from the CNTV2Card::Auto...
Definition: ntv2publicinterface.h:7880
AUTOCIRCULATE_TRANSFER::acANCField2Buffer
NTV2Buffer acANCField2Buffer
The host "Field 2" ancillary data buffer. This field is owned by the client application,...
Definition: ntv2publicinterface.h:8006
NTV2_FBF_FIRST
@ NTV2_FBF_FIRST
Definition: ntv2enums.h:209
CRP188
Definition: ntv2rp188.h:55
AUTOCIRCULATE_STATUS::GetEndFrame
uint16_t GetEndFrame(void) const
Definition: ntv2publicinterface.h:7251
NTV2Buffer::~NTV2Buffer
~NTV2Buffer()
My destructor. If I'm responsible for the memory, I free it here.
Definition: ntv2publicinterface.cpp:1572
NTV2SetRegisters::mInRegInfos
NTV2Buffer mInRegInfos
Read-only array of NTV2RegInfo structs to be set. The SDK owns this memory.
Definition: ntv2publicinterface.h:7527
AJA_NTV2_SDK_VERSION_MAJOR
#define AJA_NTV2_SDK_VERSION_MAJOR
The SDK major version number, an unsigned decimal integer.
Definition: ntv2version.h:13
NTV2_FRAMEBUFFER_ORIENTATION_TOPDOWN
@ NTV2_FRAMEBUFFER_ORIENTATION_TOPDOWN
Definition: ntv2enums.h:1992
AUTOCIRCULATE_TRANSFER::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3958
AUTOCIRCULATE_STATUS::acBufferLevel
ULWord acBufferLevel
Number of buffered frames in driver ready to capture or play.
Definition: ntv2publicinterface.h:7173
CommaStr
string CommaStr(const T &inNum)
Definition: ntv2publicinterface.cpp:2496
NTV2Buffer::PutU64s
bool PutU64s(const ULWord64Sequence &inU64s, const size_t inU64Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 64-bit values into me.
Definition: ntv2publicinterface.cpp:702
NTV2Buffer::ByteSwap16
bool ByteSwap16(void)
Byte-swaps my contents 16-bits at a time.
Definition: ntv2publicinterface.cpp:1602
NTV2_INVALID_HDMI_PROTOCOL
@ NTV2_INVALID_HDMI_PROTOCOL
Definition: ntv2enums.h:3545
AutoCircGenericTask::u
union AutoCircGenericTask::@33 u
FRAME_STAMP::acCurrentFieldCount
ULWord acCurrentFieldCount
As found by ISR at Call Field0 or Field1 currently being OUTPUT (when CNTV2Card::AutoCirculateGetFram...
Definition: ntv2publicinterface.h:7765
NTV2RegInfo
struct NTV2RegInfo NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
NTV2_INVALID_HDMI_RANGE
@ NTV2_INVALID_HDMI_RANGE
Definition: ntv2enums.h:3559
AUTOCIRCULATE_STATUS_STRUCT::endFrame
LWord endFrame
Definition: ntv2publicinterface.h:4318
AUTOCIRCULATE_STRUCT_VERSION
#define AUTOCIRCULATE_STRUCT_VERSION
Version number of AutoCirculate structures, originally 0.
Definition: ntv2publicinterface.h:5455
NTV2_OUTPUT_DEST_IS_SDI
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
Definition: ntv2enums.h:1294
NTV2AutoCirculateState
NTV2AutoCirculateState
Describes the state of an AutoCirculate channel. See AUTOCIRCULATE_STATUS.
Definition: ntv2publicinterface.h:4270
gDefaultPageSize
static size_t gDefaultPageSize(AJA_PAGE_SIZE)
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:197
AUTOCIRCULATE_TRANSFER::acTransferStatus
AUTOCIRCULATE_TRANSFER_STATUS acTransferStatus
Contains status information that's valid after CNTV2Card::AutoCirculateTransfer returns,...
Definition: ntv2publicinterface.h:8021
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1319
GetRelatedGeometries
NTV2GeometrySet GetRelatedGeometries(const NTV2FrameGeometry inFrameGeometry)
Definition: ntv2utils.cpp:3901
NTV2BankSelGetSetRegs::mInRegInfos
NTV2Buffer mInRegInfos
NTV2RegInfo array of registers be read/written. The SDK owns this memory.
Definition: ntv2publicinterface.h:7591
AUTOCIRCULATE_TRANSFER_STATUS::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3839
NTV2CrosspointToString
std::string NTV2CrosspointToString(const NTV2Crosspoint inChannel)
Definition: ntv2utils.cpp:5837
AutoCircVidProcInfo::backgroundVideoCrosspoint
NTV2Crosspoint backgroundVideoCrosspoint
Definition: ntv2publicinterface.h:4210
AUTOCIRCULATE_STATUS_STRUCT::rdtscStartTime
ULWord64 rdtscStartTime
Definition: ntv2publicinterface.h:4320
NTV2Buffer::GetHostAddress
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
Definition: ntv2publicinterface.cpp:1686
NTV2Buffer::operator=
NTV2Buffer & operator=(const NTV2Buffer &inRHS)
Assigns me from another NTV2Buffer instance.
Definition: ntv2publicinterface.cpp:1556
NTV2ChannelList
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
Definition: ntv2publicinterface.h:3835
NTV2SegmentedDMAInfo::Set
void Set(const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow)
Sets the NTV2SegmentedDMAInfo struct members.
Definition: ntv2publicinterface.cpp:2581
NTV2Buffer::GetHostPointer
void * GetHostPointer(void) const
Definition: ntv2publicinterface.h:6049
NTV2_INVALID_HDMIBitDepth
@ NTV2_INVALID_HDMIBitDepth
Definition: ntv2enums.h:3617
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1221
NTV2_IS_VALID_HEADER_TAG
#define NTV2_IS_VALID_HEADER_TAG(_x_)
Definition: ntv2publicinterface.h:5460
kVRegMaskHDMOutBitDepth
@ kVRegMaskHDMOutBitDepth
Definition: ntv2virtualregisters.h:644
NTV2SegmentedXferInfo::operator!=
bool operator!=(const NTV2SegmentedXferInfo &inRHS) const
Definition: ntv2publicinterface.cpp:1454
AUTOCIRCULATE_TRANSFER::SegmentedDMAsEnabled
bool SegmentedDMAsEnabled(void) const
Definition: ntv2publicinterface.cpp:2827
NTV2BufferLock::SetMaxLockSize
void SetMaxLockSize(const ULWord64 inNumBytes)
Sets the maximum lock size for use in a subsequent call to CNTV2Card::DMABufferLock.
Definition: ntv2publicinterface.h:8514
NTV2SegmentedXferInfo::setElementLength
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
Definition: ntv2publicinterface.h:5925
kVRegShiftHDMOutVideoStandard
@ kVRegShiftHDMOutVideoStandard
Definition: ntv2virtualregisters.h:661
NTV2Buffer::AsString
std::string AsString(UWord inDumpMaxBytes=0) const
Definition: ntv2publicinterface.cpp:326
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:498
NTV2StreamChannel::mTrailer
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:8684
AUTOCIRCULATE_STATUS::acEndFrame
LWord acEndFrame
Last frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
Definition: ntv2publicinterface.h:7165
NTV2BankSelGetSetRegs::mIsWriting
ULWord mIsWriting
If non-zero, register(s) will be written; otherwise, register(s) will be read.
Definition: ntv2publicinterface.h:7589
AUTOCIRCULATE_TRANSFER_STATUS::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3859
FRAME_STAMP::acAudioClockCurrentTime
ULWord64 acAudioClockCurrentTime
Current time expressed as a count of 10MHz ticks, based on 48kHz clock (from register 28).
Definition: ntv2publicinterface.h:7762
AUTOCIRCULATE_WITH_VIDPROC
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
Definition: ntv2publicinterface.h:5526
AUTOCIRCULATE_STATUS_STRUCT::bWithCustomAncData
BOOL_ bWithCustomAncData
Definition: ntv2publicinterface.h:4333
ntv2nub::PUSHU32
void PUSHU32(const uint32_t inVal, std::vector< uint8_t > &inArr, const bool dontSwap=false)
Definition: ntv2nubtypes.h:38
kVRegMaskHDMOutAudioFormat
@ kVRegMaskHDMOutAudioFormat
Definition: ntv2virtualregisters.h:649
AUTOCIRCULATE_WITH_FBOCHANGE
#define AUTOCIRCULATE_WITH_FBOCHANGE
Use this to AutoCirculate with the possibility of frame buffer orientation changes.
Definition: ntv2publicinterface.h:5524
NTV2SetRegisters::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3636
FRAME_STAMP_STRUCT::currentAudioExpectedAddress
ULWord currentAudioExpectedAddress
As set by play.
Definition: ntv2publicinterface.h:4505
AUTOCIRCULATE_TRANSFER::~AUTOCIRCULATE_TRANSFER
~AUTOCIRCULATE_TRANSFER()
My default destructor, which frees all allocatable fields that I own.
Definition: ntv2publicinterface.cpp:2691
NTV2DIDSetConstIter
NTV2DIDSet::const_iterator NTV2DIDSetConstIter
Handy const iterator to iterate over an NTV2DIDSet.
Definition: ntv2publicinterface.h:78
AutoCircVidProcInfo::foregroundVideoCrosspoint
NTV2Crosspoint foregroundVideoCrosspoint
Definition: ntv2publicinterface.h:4209
NTV2QtrSizeExpandMode
enum NTV2QuarterSizeExpandMode NTV2QtrSizeExpandMode
NTV2_HEADER::FourCCToString
static std::string FourCCToString(const ULWord in4CC)
Definition: ntv2publicinterface.cpp:273
NTV2AudioRate
NTV2AudioRate
Definition: ntv2enums.h:1873
AUTOCIRCULATE_STATUS::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3740
AutoCircVidProcInfo::transitionCoefficient
Fixed_ transitionCoefficient
Definition: ntv2publicinterface.h:4213
NTV2_FBF_10BIT_YCBCR
@ NTV2_FBF_10BIT_YCBCR
See 10-Bit YCbCr Format.
Definition: ntv2enums.h:210
AJA_NTV2_SDK_BUILD_NUMBER
#define AJA_NTV2_SDK_BUILD_NUMBER
The SDK build number, an unsigned decimal integer.
Definition: ntv2version.h:16
FRAME_STAMP::acAudioOutStartAddress
ULWord acAudioOutStartAddress
For play - end position (exclusive) in buffer of audio – AudioOutAddress at the Frame AFTER it was st...
Definition: ntv2publicinterface.h:7739
FRAME_STAMP_STRUCT::currentRP188
RP188_STRUCT currentRP188
Last vertical blank timecode (RP-188)
Definition: ntv2publicinterface.h:4494
AUTOCIRCULATE_TRANSFER::Clear
void Clear(void)
Resets the struct to its initialized state, with timecode capture disabled, freeing all buffers that ...
Definition: ntv2publicinterface.cpp:2800
FRAME_STAMP::FRAME_STAMP
FRAME_STAMP()
Constructs a default FRAME_STAMP structure.
Definition: ntv2publicinterface.cpp:2030
AUTOCIRCULATE_STATUS::WithLTC
bool WithLTC(void) const
Definition: ntv2publicinterface.h:7311
NTV2StreamChannel::mChannel
NTV2Channel mChannel
Stream channel.
Definition: ntv2publicinterface.h:8671
NTV2SDIInStatistics::GetSDIInputStatus
bool GetSDIInputStatus(NTV2SDIInputStatus &outStatus, const UWord inSDIInputIndex0=0)
Answers with the NTV2SDIInputStatus for the given SDI input spigot.
Definition: ntv2publicinterface.cpp:2334
AUTOCIRCULATE_STATUS_STRUCT
Definition: ntv2publicinterface.h:4313
NTV2RegisterNumber
NTV2RegisterNumber
Definition: ntv2publicinterface.h:100
LWord64
int64_t LWord64
Definition: ajatypes.h:255
NTV2StreamBuffer::mChannel
NTV2Channel mChannel
Stream channel.
Definition: ntv2publicinterface.h:8731
NTV2SegmentedDMAInfo::Reset
void Reset(void)
Resets the NTV2SegmentedDMAInfo struct members to their default values (normal, non-segmented AutoCir...
Definition: ntv2publicinterface.cpp:2595
ULWord64SequenceConstIter
ULWord64Sequence::const_iterator ULWord64SequenceConstIter
A handy const iterator for iterating over a ULWord64Sequence.
Definition: ntv2publicinterface.h:51
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5605
NTV2SDIInStatistics
This is used by the CNTV2Card::ReadSDIStatistics function.
Definition: ntv2publicinterface.h:7678
AUTOCIRCULATE_STATUS::acRDTSCStartTime
ULWord64 acRDTSCStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using host OS system ...
Definition: ntv2publicinterface.h:7167
AUTOCIRCULATE_STATUS_STRUCT::framesDropped
ULWord framesDropped
Definition: ntv2publicinterface.h:4325
NTV2_OUTPUTDESTINATION_HDMI
@ NTV2_OUTPUTDESTINATION_HDMI
Definition: ntv2enums.h:1279
false
#define false
Definition: ntv2devicefeatures.h:25
NTV2HDMIColorSpaceToString
std::string NTV2HDMIColorSpaceToString(const NTV2HDMIColorSpace inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6694
OCT
#define OCT(__x__)
Definition: ntv2publicinterface.h:5608
common.h
Private include file for all ajabase sources.
AUTOCIRCULATE_TRANSFER::acInUserCookie
ULWord64 acInUserCookie
Intended for playout, an optional app-specific cookie value that tags this frame, such that if this s...
Definition: ntv2publicinterface.h:8028
NTV2Buffer_ALLOCATED
#define NTV2Buffer_ALLOCATED
Allocated using Allocate function?
Definition: ntv2publicinterface.h:5506
UByte
uint8_t UByte
Definition: ajatypes.h:248
NTV2AudioSystemSetConstIter
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
Definition: ntv2publicinterface.h:3901
AUTOCIRCULATE_WITH_RP188
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
Definition: ntv2publicinterface.h:5521
NTV2RegisterWrites
std::vector< NTV2RegInfo > NTV2RegisterWrites
Definition: ntv2publicinterface.h:4011
NTV2Bitstream
This is used for bitstream maintainance. (New in SDK 16.0)
Definition: ntv2publicinterface.h:8546
FRAME_STAMP::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3803
FRAME_STAMP::SetInputTimecode
bool SetInputTimecode(const NTV2TCIndex inTCNdx, const NTV2_RP188 &inTimecode)
Sets one of my input timecodes.
Definition: ntv2publicinterface.cpp:2167
kVRegMaskHDMOutAudioChannels
@ kVRegMaskHDMOutAudioChannels
Definition: ntv2virtualregisters.h:651
NTV2TCIndexesConstIter
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Definition: ntv2publicinterface.h:6850
NTV2Buffer_TO_ULWORD64
#define NTV2Buffer_TO_ULWORD64(__p__)
Definition: ntv2publicinterface.h:5512
NTV2StreamBuffer::mTrailer
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:8746
AUTOCIRCULATE_TRANSFER_STATUS::acAncTransferSize
ULWord acAncTransferSize
Total ancillary data bytes for field 1 transferred (capture only).
Definition: ntv2publicinterface.h:7890
NTV2StreamChannel::mHeader
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:8670
HEX0N
#define HEX0N(__x__, __n__)
Definition: debug.cpp:1175
AUTOCIRCULATE_TRANSFER_STATUS::acState
NTV2AutoCirculateState acState
Current AutoCirculate state after the transfer.
Definition: ntv2publicinterface.h:7882
NTV2Buffer::SetFromHexString
bool SetFromHexString(const std::string &inStr)
Replaces my contents from the given hex-encoded string, resizing me if necessary.
Definition: ntv2publicinterface.cpp:1780
NTV2_RP188::IsValid
bool IsValid(void) const
Answers true if I'm valid, or false if I'm not valid.
Definition: ntv2publicinterface.h:6802
FRAME_STAMP_STRUCT::currenthUser
ULWord currenthUser
Contains validCount (Play - reps remaining, Record - drops on frame)
Definition: ntv2publicinterface.h:4514
RP188_STRUCT::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:4210
NTV2_TRAILER::NTV2_TRAILER
NTV2_TRAILER()
Constructs a default NTV2_TRAILER having the proper version and tag.
Definition: ntv2publicinterface.cpp:1367
NTV2FrameBufferFormatToString
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6940
NTV2SetRegisters::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
Definition: ntv2publicinterface.cpp:3217
NTV2_HEADER::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
Definition: ntv2publicinterface.cpp:258
AUTOCIRCULATE_STATUS::Clear
void Clear(void)
Clears my data.
Definition: ntv2publicinterface.cpp:2463
AutoCircTimeCodeTask
Definition: ntv2publicinterface.h:4704
NTV2SetRegisters::GetRequestedRegisterWrites
bool GetRequestedRegisterWrites(NTV2RegWrites &outRegWrites) const
Definition: ntv2publicinterface.cpp:3202
NTV2_TYPE_AJASTREAMBUFFER
#define NTV2_TYPE_AJASTREAMBUFFER
Identifies NTV2StreamBuffer struct.
Definition: ntv2publicinterface.h:5477
NTV2SDKVersionDecode_Major
#define NTV2SDKVersionDecode_Major
Definition: ntv2publicinterface.h:5385
NTV2DebugLogging::mSharedMemory
NTV2Buffer mSharedMemory
Virtual address of AJADebug shared memory in calling process' context,.
Definition: ntv2publicinterface.h:8408
FRAME_STAMP_STRUCT::audioInStartAddress
ULWord audioInStartAddress
For record - first position in buffer of audio (includes base offset)
Definition: ntv2publicinterface.h:4458
NTV2DeviceCanDoInputSource
bool NTV2DeviceCanDoInputSource(const NTV2DeviceID inDeviceID, const NTV2InputSource inInputSource)
Definition: ntv2devicefeatures.hpp:17462
NTV2TimeCodes
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
Definition: ntv2publicinterface.h:6846
NTV2_IS_VALID_COLOR_CORRECTION_MODE
#define NTV2_IS_VALID_COLOR_CORRECTION_MODE(__x__)
Definition: ntv2enums.h:2034
NTV2SegmentedDMAInfo::acNumSegments
ULWord acNumSegments
Number of segments of size ::AUTOCIRCULATE_TRANSFER::acVideoBuffer.fByteCount to transfer....
Definition: ntv2publicinterface.h:7047
NTV2InputSourceSetConstIter
NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter
A handy const iterator for iterating over an NTV2InputSourceSet.
Definition: ntv2publicinterface.h:8784
ULWord64
uint64_t ULWord64
Definition: ajatypes.h:256
std
Definition: json.hpp:5362
AUTOCIRCULATE_TRANSFER::acVidProcInfo
AutoCircVidProcInfo acVidProcInfo
Specifies the mixer/keyer transition to make. Ignored if AUTOCIRCULATE_WITH_VIDPROC option is not set...
Definition: ntv2publicinterface.h:8042
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:6760
AUTOCIRCULATE_TRANSFER::acVideoBuffer
NTV2Buffer acVideoBuffer
The host video buffer. This field is owned by the client application, and thus is responsible for all...
Definition: ntv2publicinterface.h:7977
NTV2DeviceGetSupportedVideoFormats
bool NTV2DeviceGetSupportedVideoFormats(const NTV2DeviceID inDeviceID, NTV2VideoFormatSet &outFormats)
Returns a set of distinct NTV2VideoFormat values supported on the given device.
Definition: ntv2publicinterface.cpp:1193
NTV2StreamBuffer::Print
std::ostream & Print(std::ostream &inOutStream) const
Definition: ntv2publicinterface.cpp:2974
AUTOCIRCULATE_STATUS_STRUCT::bWithRP188
BOOL_ bWithRP188
Definition: ntv2publicinterface.h:4328
NTV2MakeChannelList
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels)
Definition: ntv2publicinterface.cpp:3374
NTV2GetRegisters::GetRegisterValues
bool GetRegisterValues(NTV2RegisterValueMap &outValues) const
Returns an NTV2RegisterValueMap built from my mOutGoodRegisters and mOutValues fields.
Definition: ntv2publicinterface.cpp:3101
FRAME_STAMP_STRUCT::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:4304
AutoCircVidProcInfo::RPCDecode
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Definition: ntv2publicinterface.cpp:3923
NTV2DeviceGetSupportedFrameRates
bool NTV2DeviceGetSupportedFrameRates(const NTV2DeviceID inDeviceID, NTV2FrameRateSet &outRates)
Returns a set of distinct NTV2FrameRate values supported on the given device.
Definition: ntv2publicinterface.cpp:1334
NTV2_FRAMERATE_UNKNOWN
@ NTV2_FRAMERATE_UNKNOWN
Represents an unknown or invalid frame rate.
Definition: ntv2enums.h:398
ULWordSequence
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:46
AUTOCIRCULATE_TRANSFER::acInVideoDMAOffset
ULWord acInVideoDMAOffset
Optional byte offset into the device frame buffer. Defaults to zero. If non-zero, should be a multipl...
Definition: ntv2publicinterface.h:8036
NTV2ColorCorrectionData::Clear
void Clear(void)
Frees my private color correction table buffer and resets my mode to "invalid".
Definition: ntv2publicinterface.cpp:2614
AUTOCIRCULATE_STATUS::GetDroppedFrameCount
ULWord GetDroppedFrameCount(void) const
Definition: ntv2publicinterface.h:7211
AUTOCIRCULATE_TRANSFER::SetAllOutputTimeCodes
bool SetAllOutputTimeCodes(const NTV2_RP188 &inTimecode, const bool inIncludeF2=true)
Intended for playout, replaces all elements of my acOutputTimeCodes member with the given timecode va...
Definition: ntv2publicinterface.cpp:2771
AUTOCIRCULATE_STATUS_STRUCT::bWithAudio
BOOL_ bWithAudio
Definition: ntv2publicinterface.h:4327
AUTOCIRCULATE_STATUS::GetStartFrame
uint16_t GetStartFrame(void) const
Definition: ntv2publicinterface.h:7246
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
NTV2_TCINDEX_DEFAULT
@ NTV2_TCINDEX_DEFAULT
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel)
Definition: ntv2enums.h:3872
AUTOCIRCULATE_STATUS::acAudioSystem
NTV2AudioSystem acAudioSystem
The audio system being used for this channel (NTV2_AUDIOSYSTEM_INVALID if none)
Definition: ntv2publicinterface.h:7175
NTV2RegInfo::operator<
bool operator<(const NTV2RegInfo &inRHS) const
Definition: ntv2publicinterface.cpp:3243
AUTOCIRCULATE_STATUS::acAudioClockStartTime
ULWord64 acAudioClockStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using "64-bit clean" ...
Definition: ntv2publicinterface.h:7168
eGetFrameStampEx2
@ eGetFrameStampEx2
Definition: ntv2publicinterface.h:4257
NTV2TimeCodeList
std::vector< NTV2_RP188 > NTV2TimeCodeList
An ordered sequence of zero or more NTV2_RP188 structures. An NTV2TCIndex enum value can be used as a...
Definition: ntv2publicinterface.h:6841
NTV2FrameGeometry
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:336
FRAME_STAMP_STRUCT::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
User cookie at last vblank.
Definition: ntv2publicinterface.cpp:4277
ntv2rp188.h
Declares the CRP188 class. See SMPTE RP188 standard for details.
FRAME_STAMP::CopyTo
bool CopyTo(FRAME_STAMP_STRUCT &outOldStruct) const
Copies my fields into the given FRAME_STAMP_STRUCT.
Definition: ntv2publicinterface.cpp:2254
std::swap
void swap(nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j1, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp) is_nothrow_move_constructible< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value &&//NOLINT(misc-redundant-expression, cppcoreguidelines-noexcept-swap, performance-noexcept-swap) is_nothrow_move_assignable< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value)
exchanges the values of two JSON objects
Definition: json.hpp:24538
FindFirstMatchingRegisterNumber
NTV2RegisterReadsConstIter FindFirstMatchingRegisterNumber(const uint32_t inRegNum, const NTV2RegisterReads &inRegInfos)
Returns a const iterator to the first entry in the NTV2RegInfo collection with a matching register nu...
Definition: ntv2publicinterface.cpp:3430
NTV2_IS_REGISTER_TASK
#define NTV2_IS_REGISTER_TASK(_x_)
Definition: ntv2publicinterface.h:4689
NTV2DeviceIDSet
std::set< NTV2DeviceID > NTV2DeviceIDSet
A set of NTV2DeviceIDs.
Definition: ntv2utils.h:1031
AUTOCIRCULATE_TRANSFER_STATUS::acFramesDropped
ULWord acFramesDropped
Total number of frames dropped since AutoCirculateStart.
Definition: ntv2publicinterface.h:7886
NTV2Bitstream::mBuffer
NTV2Buffer mBuffer
Virtual address of a bitstream buffer and its length.
Definition: ntv2publicinterface.h:8548
AUTOCIRCULATE_STATUS::WithFBFChange
bool WithFBFChange(void) const
Definition: ntv2publicinterface.h:7316
NTV2_OUTPUTDESTINATION_SDI7
@ NTV2_OUTPUTDESTINATION_SDI7
Definition: ntv2enums.h:1286
NTV2Buffer::PutU8s
bool PutU8s(const UByteSequence &inU8s, const size_t inU8Offset=0)
Copies a vector of unsigned 8-bit values into me.
Definition: ntv2publicinterface.cpp:786
AUTOCIRCULATE_STATUS_STRUCT::rdtscCurrentTime
ULWord64 rdtscCurrentTime
Definition: ntv2publicinterface.h:4322
kVRegMaskHDMOutProtocol
@ kVRegMaskHDMOutProtocol
Definition: ntv2virtualregisters.h:648
INVALID_TIMECODE_VALUE
static const NTV2_RP188 INVALID_TIMECODE_VALUE
Definition: ntv2publicinterface.cpp:2732
NTV2SetRegisters
This is used by the CNTV2Card::WriteRegisters function.
Definition: ntv2publicinterface.h:7524
NTV2MakeChannelSet
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels)
Definition: ntv2publicinterface.cpp:3357
AsU8Ref
#define AsU8Ref(_x_)
Definition: ntv2publicinterface.cpp:3520
NTV2SetRegisters::mOutNumFailures
ULWord mOutNumFailures
The number of registers unsuccessfully written.
Definition: ntv2publicinterface.h:7528
NTV2_IS_VALID_NTV2FrameRate
#define NTV2_IS_VALID_NTV2FrameRate(__r__)
Definition: ntv2enums.h:428
NTV2CrosspointToNTV2Channel
NTV2Channel NTV2CrosspointToNTV2Channel(const NTV2Crosspoint inCrosspointChannel)
Definition: ntv2utils.cpp:4766
FRAME_STAMP::acCurrentAudioExpectedAddress
ULWord acCurrentAudioExpectedAddress
Definition: ntv2publicinterface.h:7763
AUTOCIRCULATE_TRANSFER_STATUS::AUTOCIRCULATE_TRANSFER_STATUS
AUTOCIRCULATE_TRANSFER_STATUS()
Constructs a default AUTOCIRCULATE_TRANSFER_STATUS structure.
Definition: ntv2publicinterface.cpp:2372
kVRegMaskHDMOutPixel420
@ kVRegMaskHDMOutPixel420
Definition: ntv2virtualregisters.h:647
ULWord64Sequence
std::vector< uint64_t > ULWord64Sequence
An ordered sequence of ULWord64 (uint64_t) values.
Definition: ntv2publicinterface.h:50
NTV2SDKVersionDecode_Point
#define NTV2SDKVersionDecode_Point
Definition: ntv2publicinterface.h:5387
AUTOCIRCULATE_STATUS_STRUCT::audioClockCurrentTime
ULWord64 audioClockCurrentTime
Definition: ntv2publicinterface.h:4323
NTV2_OUTPUTDESTINATION_SDI4
@ NTV2_OUTPUTDESTINATION_SDI4
Definition: ntv2enums.h:1283
NTV2Buffer_PAGE_ALIGNED
#define NTV2Buffer_PAGE_ALIGNED
Allocated page-aligned?
Definition: ntv2publicinterface.h:5507
FRAME_STAMP::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3767
NTV2_ASSERT_STRUCT_VALID
#define NTV2_ASSERT_STRUCT_VALID
Definition: ntv2publicinterface.h:5589
FRAME_STAMP_STRUCT::audioClockTimeStamp
ULWord64 audioClockTimeStamp
48kHz clock (in reg 28, extended to 64 bits) at time of play or record.
Definition: ntv2publicinterface.h:4452
NTV2Buffer::Truncate
bool Truncate(const size_t inByteCount)
Truncates me to the given length. No reallocation takes place.
Definition: ntv2publicinterface.cpp:1544
ntv2nubtypes.h
Declares data types and structures used in NTV2 "nub" packets.
NTV2Buffer::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3566
NTV2ColorCorrectionData::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3896
NTV2HDMIOutputStatus::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
Definition: ntv2publicinterface.cpp:182
AUTOCIRCULATE_STATUS::WithCustomAnc
bool WithCustomAnc(void) const
Definition: ntv2publicinterface.h:7301
AUTOCIRCULATE_TRANSFER::acOutputTimeCodes
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device....
Definition: ntv2publicinterface.h:8014
ntv2nub::POPU16
void POPU16(uint16_t &outVal, const std::vector< uint8_t > &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
Definition: ntv2nubtypes.h:61
FRAME_STAMP_STRUCT::audioOutStopAddress
ULWord audioOutStopAddress
For play - first position in buffer of audio.
Definition: ntv2publicinterface.h:4464
OCT0N
#define OCT0N(__x__, __n__)
Definition: ntv2publicinterface.h:5609
AJA_NTV2_SDK_VERSION_MINOR
#define AJA_NTV2_SDK_VERSION_MINOR
The SDK minor version number, an unsigned decimal integer.
Definition: ntv2version.h:14
AutoCircVidProcInfo::backgroundKeyCrosspoint
NTV2Crosspoint backgroundKeyCrosspoint
Definition: ntv2publicinterface.h:4212
NTV2AudioChannelPairsConstIter
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
Definition: ntv2publicinterface.h:59
NTV2HDMIOutputStatus::SetFromRegValue
bool SetFromRegValue(const ULWord inData)
Sets my fields from the given status register value.
Definition: ntv2publicinterface.cpp:163
NTV2StreamBuffer::mHeader
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:8730
NTV2GetSupportedStandards
bool NTV2GetSupportedStandards(NTV2StandardSet &outStandards)
Returns a set of all NTV2Standard values supported (used) by any/all supported NTV2 devices.
Definition: ntv2publicinterface.cpp:1166
NTV2_FRAMEBUFFER_ORIENTATION_BOTTOMUP
@ NTV2_FRAMEBUFFER_ORIENTATION_BOTTOMUP
Definition: ntv2enums.h:1994
NTV2SDKVersionDecode_Build
#define NTV2SDKVersionDecode_Build
Definition: ntv2publicinterface.h:5388
NTV2_INVALID_HDMI_COLORSPACE
@ NTV2_INVALID_HDMI_COLORSPACE
Definition: ntv2enums.h:3531
AutoCircVidProcInfo::transitionSoftness
Fixed_ transitionSoftness
Definition: ntv2publicinterface.h:4214
NTV2VirtualData
This is used to perform virtual data reads or writes.
Definition: ntv2publicinterface.h:7637
AUTOCIRCULATE_STATUS::WithColorCorrect
bool WithColorCorrect(void) const
Definition: ntv2publicinterface.h:7326
FRAME_STAMP_STRUCT::currentFrameTime
LWord64 currentFrameTime
Vertical blank start of current frame.
Definition: ntv2publicinterface.h:4497
NTV2ChannelToString
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5759
NTV2_INPUT_SOURCE_IS_SDI
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
Definition: ntv2enums.h:1242
NTV2Buffer::NextDifference
bool NextDifference(const NTV2Buffer &inBuffer, ULWord &byteOffset) const
Answers with the byte offset to the first or next difference.
Definition: ntv2publicinterface.cpp:1897
NTV2_IOKINDS_SDI
@ NTV2_IOKINDS_SDI
Specifies SDI input/output kinds.
Definition: ntv2enums.h:1251
GetNTV2StandardFromVideoFormat
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:2277
NTV2BufferLock::mFlags
ULWord mFlags
Action flags (lock, unlock, etc)
Definition: ntv2publicinterface.h:8446
NTV2Buffer::ByteSwap64
bool ByteSwap64(void)
Byte-swaps my contents 64-bits at a time.
Definition: ntv2publicinterface.cpp:1578
NTV2StreamChannel::mFlags
ULWord mFlags
Action flags.
Definition: ntv2publicinterface.h:8672
AUTOCIRCULATE_TASK_STRUCT
Definition: ntv2publicinterface.h:4755
NTV2BankSelGetSetRegs::mInBankInfos
NTV2Buffer mInBankInfos
Bank select NTV2RegInfo. The SDK owns this memory.
Definition: ntv2publicinterface.h:7590
NTV2Buffer::Fill
bool Fill(const T &inValue)
Fills me with the given scalar value.
Definition: ntv2publicinterface.h:6218
NTV2VirtualData::mHeader
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:7638
NTV2RegInfo::registerShift
ULWord registerShift
My register shift value to use in a ReadRegister or WriteRegister call.
Definition: ntv2publicinterface.h:3936
NTV2_HDMIColorSpaceRGB
@ NTV2_HDMIColorSpaceRGB
RGB color space.
Definition: ntv2enums.h:3528
NTV2RegReads
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
Definition: ntv2publicinterface.h:4014
NTV2AudioRateToString
std::string NTV2AudioRateToString(const NTV2AudioRate inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5788
kVRegShiftHDMOutPixel420
@ kVRegShiftHDMOutPixel420
Definition: ntv2virtualregisters.h:666
NTV2BufferLock::NTV2BufferLock
NTV2BufferLock()
Constructs a default NTV2BufferLock struct.
Definition: ntv2publicinterface.cpp:2871
NTV2DebugLogging::mTrailer
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
Definition: ntv2publicinterface.h:8413
AUTOCIRCULATE_STATUS::GetFrameCount
ULWord GetFrameCount(void) const
Definition: ntv2publicinterface.h:7206
AUTOCIRCULATE_TRANSFER_STATUS::acAudioTransferSize
ULWord acAudioTransferSize
Number of bytes captured into the audio buffer.
Definition: ntv2publicinterface.h:7888
ntv2publicinterface.h
Declares enums and structs used by all platform drivers and the SDK.
NTV2_TYPE_SETREGS
#define NTV2_TYPE_SETREGS
Identifies NTV2SetRegisters struct.
Definition: ntv2publicinterface.h:5471
AUTOCIRCULATE_WITH_COLORCORRECT
#define AUTOCIRCULATE_WITH_COLORCORRECT
Use this to AutoCirculate with color correction.
Definition: ntv2publicinterface.h:5525
AUTOCIRCULATE_STATUS::IsFieldMode
bool IsFieldMode(void) const
Definition: ntv2publicinterface.h:7336
FRAME_STAMP::acFrameTime
LWord64 acFrameTime
On exit, contains host OS clock at time of capture/play. On entry, contains NTV2Channel of interest,...
Definition: ntv2publicinterface.h:7731
AUTOCIRCULATE_TRANSFER::GetInputTimeCodes
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Intended for capture, answers with the timecodes captured in my acTransferStatus member's acFrameStam...
Definition: ntv2publicinterface.cpp:2834
NTV2_AUDIO_FORMAT_INVALID
@ NTV2_AUDIO_FORMAT_INVALID
Definition: ntv2enums.h:1901
NTV2Buffer::HostPageSize
static size_t HostPageSize(void)
Definition: ntv2publicinterface.cpp:2020
NTV2RegValueMapConstIter
NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter
A const iterator that iterates over NTV2RegisterValueMap entries.
Definition: ntv2publicinterface.h:7401
NTV2DebugLogging
This is used to enable or disable AJADebug logging in the driver.
Definition: ntv2publicinterface.h:8406
NTV2_TYPE_AJABITSTREAM
#define NTV2_TYPE_AJABITSTREAM
Identifies NTV2Bitstream struct.
Definition: ntv2publicinterface.h:5475
NTV2EndianSwap64
#define NTV2EndianSwap64(__val__)
Definition: ntv2endian.h:25
AUTOCIRCULATE_STATUS::acFramesDropped
ULWord acFramesDropped
Total number of frames dropped since CNTV2Card::AutoCirculateStart called.
Definition: ntv2publicinterface.h:7172
NTV2ChannelListConstIter
NTV2ChannelList::const_iterator NTV2ChannelListConstIter
A handy const iterator into an NTV2ChannelList.
Definition: ntv2publicinterface.h:3836
NTV2ColorCorrectionData::NTV2ColorCorrectionData
NTV2ColorCorrectionData()
Constructs a default NTV2ColorCorrectionData struct.
Definition: ntv2publicinterface.cpp:2601
FRAME_STAMP_STRUCT::frame
ULWord frame
The frame requested or -1 if not available.
Definition: ntv2publicinterface.h:4449
NTV2DIDSet
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
Definition: ntv2publicinterface.h:76
NTV2_TRAILER_TAG
#define NTV2_TRAILER_TAG
Identifies the struct trailer.
Definition: ntv2publicinterface.h:5458
NTV2HostIsBigEndian
#define NTV2HostIsBigEndian
Definition: ntv2endian.h:58
NTV2_IS_VALID_FRAME_BUFFER_FORMAT
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
Definition: ntv2enums.h:251
AUTOCIRCULATE_DATA::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:4335
FRAME_STAMP::acRequestedFrame
ULWord acRequestedFrame
The frame requested (0xFFFFFFFF == "not available"), including for new API (FRAME_STAMP message).
Definition: ntv2publicinterface.h:7733
NTV2Buffer::FindAll
ULWordSet & FindAll(ULWordSet &outOffsets, const NTV2Buffer &inValue) const
Definition: ntv2publicinterface.cpp:1826
operator<<
ostream & operator<<(ostream &inOutStr, const NTV2AudioChannelPairs &inSet)
Definition: ntv2publicinterface.cpp:33
kVRegMaskHDMOutRangeFull
@ kVRegMaskHDMOutRangeFull
Definition: ntv2virtualregisters.h:646
NTV2DoubleArrayConstIter
NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter
Handy const iterator to iterate over an NTV2DoubleArray.
Definition: ntv2publicinterface.h:72
xHEX0N
#define xHEX0N(__x__, __n__)
Definition: ntv2publicinterface.h:5604
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3814
NTV2DebugLogging::mHeader
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Definition: ntv2publicinterface.h:8407
NTV2Buffer::GetU16s
bool GetU16s(UWordSequence &outU16s, const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
Definition: ntv2publicinterface.cpp:573
NTV2Bitstream::NTV2Bitstream
NTV2Bitstream()
Constructs a default NTV2Bitstream struct.
Definition: ntv2publicinterface.cpp:2920
NTV2_AUDIO_RATE_INVALID
@ NTV2_AUDIO_RATE_INVALID
Definition: ntv2enums.h:1879
AUTOCIRCVIDPROCMODE_MIX
@ AUTOCIRCVIDPROCMODE_MIX
Definition: ntv2publicinterface.h:4195
NTV2_IS_VALID_AUDIO_SYSTEM
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
Definition: ntv2enums.h:3833
NTV2StreamBuffer
Definition: ntv2publicinterface.h:8729
NTV2StreamBuffer::mStatus
ULWord mStatus
Action status.
Definition: ntv2publicinterface.h:8733
NTV2Bitstream::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
Definition: ntv2publicinterface.cpp:2948
NTV2SDIInStatistics::operator[]
NTV2SDIInputStatus & operator[](const size_t inSDIInputIndex0)
Definition: ntv2publicinterface.cpp:2350
NTV2AudioChannelOctets
std::set< NTV2AudioChannelOctet > NTV2AudioChannelOctets
A set of distinct NTV2AudioChannelOctet values.
Definition: ntv2publicinterface.h:66
NTV2_INPUT_SOURCE_IS_ANALOG
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
Definition: ntv2enums.h:1241
NTV2RegisterReadsIter
NTV2RegWritesIter NTV2RegisterReadsIter
Definition: ntv2publicinterface.h:4016
ntv2nub::PUSHU16
void PUSHU16(const uint16_t inVal, std::vector< uint8_t > &inArr, const bool dontSwap=false)
Definition: ntv2nubtypes.h:31
NTV2Buffer::SetAndFill
bool SetAndFill(const void *pInUserPointer, const size_t inByteCount, const UByte inValue)
Sets (or resets) me from a client-supplied address and size.
Definition: ntv2publicinterface.cpp:1624
AJAMemory::AllocateAligned
static void * AllocateAligned(size_t size, size_t alignment)
Definition: memory.cpp:115
NTV2FrameRateToString
std::string NTV2FrameRateToString(const NTV2FrameRate inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7184
ntv2registerexpert.h
Declares the CNTV2RegisterExpert class.
NTV2BankSelGetSetRegs::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3677
AUTOCIRCULATE_TRANSFER::acANCBuffer
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
Definition: ntv2publicinterface.h:7995
NTV2_OUTPUTDESTINATION_ANALOG
@ NTV2_OUTPUTDESTINATION_ANALOG
Definition: ntv2enums.h:1278
NTV2FrameRateSet
std::set< NTV2FrameRate > NTV2FrameRateSet
A set of distinct NTV2FrameRate values. New in SDK 17.0.
Definition: ntv2publicinterface.h:8789
NTV2Crosspoint
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
Definition: ntv2enums.h:1645
AUTOCIRCULATE_TRANSFER_STATUS::acFramesProcessed
ULWord acFramesProcessed
Total number of frames successfully processed since AutoCirculateStart.
Definition: ntv2publicinterface.h:7885
NTV2GetRegisters::PatchRegister
bool PatchRegister(const ULWord inRegNum, const ULWord inValue)
Patches the given register value.
Definition: ntv2publicinterface.cpp:3077
NTV2GetRegisters::ResetUsing
bool ResetUsing(const NTV2RegNumSet &inRegisterNumbers)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
Definition: ntv2publicinterface.cpp:3001
AUTOCIRCULATE_TRANSFER_STATUS::acAudioStartSample
ULWord acAudioStartSample
Starting audio sample (valid for capture only).
Definition: ntv2publicinterface.h:7889
AUTOCIRCULATE_TRANSFER::acPeerToPeerFlags
ULWord acPeerToPeerFlags
Definition: ntv2publicinterface.h:8051
memory.h
Declares the AJAMemory class.
NTV2PrintAudioSystemSet
ostream & NTV2PrintAudioSystemSet(const NTV2AudioSystemSet &inObj, const bool inCompact, std::ostream &inOutStream)
Streams a human-readable dump of the given NTV2AudioSystemSet into the specified output stream.
Definition: ntv2publicinterface.cpp:3391
kVRegShiftHDMOutAudioChannels
@ kVRegShiftHDMOutAudioChannels
Definition: ntv2virtualregisters.h:670
FRAME_STAMP_STRUCT::currentFieldCount
ULWord currentFieldCount
At Call Field0 or Field1 currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP)
Definition: ntv2publicinterface.h:4511
NTV2_TYPE_AJASTREAMCHANNEL
#define NTV2_TYPE_AJASTREAMCHANNEL
Identifies NTV2StreamChannel struct.
Definition: ntv2publicinterface.h:5476
NTV2_IS_TIMECODE_TASK
#define NTV2_IS_TIMECODE_TASK(_x_)
Definition: ntv2publicinterface.h:4693
NTV2SegmentedXferInfo::getSourceCode
std::string getSourceCode(const bool inInclDecl=true) const
Definition: ntv2publicinterface.cpp:1401
NTV2_AUTOCIRCULATE_STARTING_AT_TIME
@ NTV2_AUTOCIRCULATE_STARTING_AT_TIME
The AutoCirculate channel is starting, waiting for the start time specified in the call to CNTV2Card:...
Definition: ntv2publicinterface.h:4278
AUTOCIRCULATE_TRANSFER::SetBuffers
bool SetBuffers(ULWord *pInVideoBuffer, const ULWord inVideoByteCount, ULWord *pInAudioBuffer, const ULWord inAudioByteCount, ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2696
CNTV2RegisterExpert::GetDisplayValue
static std::string GetDisplayValue(const uint32_t inRegNum, const uint32_t inRegValue, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Definition: ntv2registerexpert.cpp:4629
NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
Definition: ntv2publicinterface.h:3931
NTV2FBOrientation
enum NTV2VideoFrameBufferOrientation NTV2FBOrientation
NTV2SDIInStatistics::Print
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
Definition: ntv2publicinterface.cpp:2365
NTV2GetSupportedPixelFormats
bool NTV2GetSupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of all NTV2PixelFormat values supported (used) by any/all supported NTV2 devices.
Definition: ntv2publicinterface.cpp:1141
NTV2_IS_VALID_VIDEO_FORMAT
#define NTV2_IS_VALID_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:688
NTV2_OUTPUTDESTINATION_SDI5
@ NTV2_OUTPUTDESTINATION_SDI5
Definition: ntv2enums.h:1284
debug.h
Declares the AJADebug class.
FRAME_STAMP::acCurrentReps
ULWord acCurrentReps
Contains validCount (Playout: on repeated frames, number of reps remaining; Record: drops on frame)
Definition: ntv2publicinterface.h:7767
AUTOCIRCULATE_TASK_STRUCT::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:4227
NTV2ColorCorrectionData::ccLookupTables
NTV2Buffer ccLookupTables
RGB lookup tables pre-formatted for AJA hardware as a contiguous block of NTV2_COLORCORRECTOR_TABLESI...
Definition: ntv2publicinterface.h:7113
ntv2nub::PUSHU8
void PUSHU8(const uint8_t inVal, std::vector< uint8_t > &inArr)
Definition: ntv2nubtypes.h:26
NTV2SegmentedXferInfo::containsElementAtOffset
bool containsElementAtOffset(const ULWord inElementOffset) const
Definition: ntv2publicinterface.cpp:1431
AUTOCIRCULATE_STATUS_STRUCT::bufferLevel
ULWord bufferLevel
Definition: ntv2publicinterface.h:4326
AUTOCIRCULATE_TRANSFER::AUTOCIRCULATE_TRANSFER
AUTOCIRCULATE_TRANSFER()
Constructs a default AUTOCIRCULATE_TRANSFER struct.
Definition: ntv2publicinterface.cpp:2637
AUTOCIRCULATE_TRANSFER::acRP188
NTV2_RP188 acRP188
Will be deprecated – use AUTOCIRCULATE_TRANSFER::SetOutputTimeCode instead.
Definition: ntv2publicinterface.h:8054
NTV2Buffer::SwapWith
bool SwapWith(NTV2Buffer &inBuffer)
Swaps my underlying buffer with another's.
Definition: ntv2publicinterface.cpp:1807
NTV2Buffer::Set
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
Definition: ntv2publicinterface.cpp:1614
NTV2_AUTOCIRCULATE_DISABLED
@ NTV2_AUTOCIRCULATE_DISABLED
The AutoCirculate channel is stopped.
Definition: ntv2publicinterface.h:4272
FRAME_STAMP_STRUCT::audioInStopAddress
ULWord audioInStopAddress
For record - end position (exclusive) in buffer of audio (includes base offset)
Definition: ntv2publicinterface.h:4461
Fixed_
int Fixed_
Definition: ajatypes.h:319
NTV2StreamBuffer::mFlags
ULWord mFlags
Action flags.
Definition: ntv2publicinterface.h:8732
AUTOCIRCULATE_STATUS::CopyTo
bool CopyTo(AUTOCIRCULATE_STATUS_STRUCT &outOldStruct)
Copies my data into the given AUTOCIRCULATE_STATUS_STRUCT.
Definition: ntv2publicinterface.cpp:2411
AUTOCIRCULATE_STATUS::IsOutput
bool IsOutput(void) const
Definition: ntv2publicinterface.h:7351
AJA_DebugStat_ACXferRPCEncode
@ AJA_DebugStat_ACXferRPCEncode
Definition: debugshare.h:248
NTV2MakeAudioSystemSet
NTV2AudioSystemSet NTV2MakeAudioSystemSet(const NTV2AudioSystem inFirstAudioSystem, const UWord inCount)
Definition: ntv2publicinterface.cpp:3412
NTV2GetRegisters::RPCEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Definition: ntv2publicinterface.cpp:3589
NTV2AudioSystemToString
std::string NTV2AudioSystemToString(const NTV2AudioSystem inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:5777
AutoCircTaskType
AutoCircTaskType
These are the available AutoCirculate task types.
Definition: ntv2publicinterface.h:4674
GetTCIndexesForSDIInput
#define GetTCIndexesForSDIInput
Definition: ntv2utils.h:587
NTV2_TRAILER::fTrailerTag
ULWord fTrailerTag
A special FourCC to identify the tail end of an NTV2 structure.
Definition: ntv2publicinterface.h:7008
NTV2_FBF_LAST
@ NTV2_FBF_LAST
Definition: ntv2enums.h:243
NTV2OutputDestinationToString
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7238
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3826
NTV2HDMIBitDepthToString
std::string NTV2HDMIBitDepthToString(const NTV2HDMIBitDepth inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6649
NTV2_HEADER::NTV2_HEADER
NTV2_HEADER(const ULWord inStructureType, const ULWord inSizeInBytes)
Constructs a default NTV2_HEADER having the proper tag, version, and the given type and size.
Definition: ntv2publicinterface.cpp:239