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