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