AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2card.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2devicefeatures.h"
9 #include "ntv2card.h"
10 #include "ntv2debug.h"
11 #include "ntv2utils.h"
12 #include <sstream>
13 #include "ajabase/common/common.h"
14 
15 using namespace std;
16 
17 
18 // Default Constructor
20  : mDevCap(*(reinterpret_cast<CNTV2DriverInterface*>(this)))
21 {
22  _boardOpened = false;
23 }
24 
25 CNTV2Card::CNTV2Card (const UWord inDeviceIndex, const string & inHostName)
26  : mDevCap(*(reinterpret_cast<CNTV2DriverInterface*>(this)))
27 {
28  string hostName(inHostName);
29  aja::strip(hostName);
30  _boardOpened = false;
31  bool openOK = hostName.empty() ? CNTV2DriverInterface::Open(inDeviceIndex) : CNTV2DriverInterface::Open(hostName);
32  if (openOK)
33  {
34  if (IsBufferSizeSetBySW())
35  {
36  NTV2Framesize fbSize;
38  SetFrameBufferSize (fbSize);
39  }
40  else
41  {
43  NTV2FrameBufferFormat format;
44 
45  GetFrameGeometry (fg);
47 
50  }
51  }
52 }
53 
54 // Destructor
56 {
57  if (IsOpen ())
58  Close ();
59 
60 } // destructor
61 
62 
64 {
65  ULWord status (0);
66  return ReadRegister (kRegStatus, status) ? (status & 0xF) : -1;
67 }
68 
69 
71 {
72  ostringstream oss;
74  return oss.str();
75 }
76 
77 
79 {
82 }
83 
85 {
86  ostringstream oss;
87  oss << GetModelName() << " - " << GetIndexNumber();
88  return oss.str();
89 }
90 
91 
93 {
94  ULWord numBytes (0);
95  string dateStr, timeStr;
96  ostringstream oss;
97 
98  if (inFPGA == eFPGAVideoProc && GetInstalledBitfileInfo (numBytes, dateStr, timeStr))
99  oss << dateStr << " at " << timeStr;
100  else
101  oss << "Unavailable";
102 
103  return oss.str ();
104 }
105 
106 
108 {
109  ULWord status (0);
110  return ReadRegister (48, status) ? ((status >> 8) & 0xFF) : -1;
111 }
112 
113 
115 {
116  const UWord version (static_cast<UWord>(GetPCIFPGAVersion()));
117  ostringstream oss;
118  oss << hex << version;
119  return oss.str ();
120 }
121 
122 
124 {
125  static const string sDriverBuildTypes [] = {"", "b", "a", "d"};
126  UWord versions[4] = {0, 0, 0, 0};
127  ULWord versBits(0);
128  if (!GetDriverVersionComponents (versions[0], versions[1], versions[2], versions[3]))
129  return string(); // fail
130  if (!ReadRegister (kVRegDriverVersion, versBits))
131  return string(); // fail
132 
133  const string & dabr (sDriverBuildTypes[versBits >> 30]); // Bits 31:30 == build type
134  ostringstream oss;
135  oss << DEC(versions[0]) << "." << DEC(versions[1]) << "." << DEC(versions[2]);
136  if (dabr.empty())
137  oss << "." << DEC(versions[3]);
138  else
139  oss << dabr << DEC(versions[3]);
140  return oss.str();
141 
142 } // GetDriverVersionString
143 
144 
145 bool CNTV2Card::GetDriverVersionComponents (UWord & outMajor, UWord & outMinor, UWord & outPoint, UWord & outBuild)
146 {
147  outMajor = outMinor = outPoint = outBuild = 0;
148  ULWord driverVersionULWord (0);
149  if (!ReadRegister (kVRegDriverVersion, driverVersionULWord))
150  return false;
151  if (!driverVersionULWord) // If zero --- pre-15.0 driver?
152  return false;
153 
154  // The normal 15.0+ way of decoding the 32-bit driver version value:
155  outMajor = UWord(NTV2DriverVersionDecode_Major(driverVersionULWord));
156  outMinor = UWord(NTV2DriverVersionDecode_Minor(driverVersionULWord));
157  outPoint = UWord(NTV2DriverVersionDecode_Point(driverVersionULWord));
158  outBuild = UWord(NTV2DriverVersionDecode_Build(driverVersionULWord));
159  return true;
160 }
161 
162 
164 {
165  ULWord serialNum (0);
166  return ReadRegister (kRegReserved54, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
167 }
168 
169 
171 {
172  ULWord serialNum (0);
173  return ReadRegister (kRegReserved55, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
174 }
175 
176 
177 bool CNTV2Card::IS_CHANNEL_INVALID (const NTV2Channel inChannel) const
178 {
179  if (!NTV2_IS_VALID_CHANNEL (inChannel))
180  return true;
181  return false;
182 }
183 
184 
185 bool CNTV2Card::IS_OUTPUT_SPIGOT_INVALID (const UWord inOutputSpigot) const
186 {
187  if (inOutputSpigot >= ::NTV2DeviceGetNumVideoOutputs(_boardID))
188  {
189  if (NTV2DeviceCanDoWidget(_boardID, NTV2_WgtSDIMonOut1) && inOutputSpigot == 4)
190  return false; // Io4K Monitor Output exception
191  return true; // Invalid
192  }
193  return false;
194 }
195 
196 
197 bool CNTV2Card::IS_INPUT_SPIGOT_INVALID (const UWord inInputSpigot) const
198 {
199  if (inInputSpigot >= ::NTV2DeviceGetNumVideoInputs (_boardID))
200  return true;
201  return false;
202 }
203 
204 
206 {
207  const uint64_t lo(GetSerialNumberLow()), hi(GetSerialNumberHigh());
208  const uint64_t result((hi << 32) | lo);
209  return result;
210 }
211 
212 
213 string CNTV2Card::SerialNum64ToString (const uint64_t inSerialNumber) // Class method
214 {
215  return ::SerialNum64ToString(inSerialNumber);
216 } // SerialNum64ToString
217 
218 
219 bool CNTV2Card::GetSerialNumberString (string & outSerialNumberString)
220 {
222  {
223  outSerialNumberString = ::SerialNum64ToString(GetSerialNumber());
224  if (outSerialNumberString.empty())
225  {
226  outSerialNumberString = "INVALID?";
227  return false;
228  }
229 
230  const NTV2DeviceID deviceID(GetDeviceID());
231  if (deviceID == DEVICE_ID_IO4KPLUS) // Io4K+/DNxIV?
232  outSerialNumberString = "5" + outSerialNumberString; // prepend with "5"
233  else if (deviceID == DEVICE_ID_IOIP_2022 ||
234  deviceID == DEVICE_ID_IOIP_2110 ||
235  deviceID == DEVICE_ID_IOIP_2110_RGB12) // IoIP/DNxIP?
236  outSerialNumberString = "6" + outSerialNumberString; // prepend with "6"
237  else if (deviceID == DEVICE_ID_IOX3)
238  outSerialNumberString = "7" + outSerialNumberString; // prepend with "7"
239  }
240  else
241  {
242  ULWord serialArray[] = {0,0,0,0};
243 
244  ReadRegister(kRegReserved56, serialArray[0]);
245  ReadRegister(kRegReserved57, serialArray[1]);
246  ReadRegister(kRegReserved54, serialArray[2]);
247  ReadRegister(kRegReserved55, serialArray[3]);
248 
249  outSerialNumberString.clear();
250  for (int serialIndex = 0; serialIndex < 4; serialIndex++)
251  {
252  if (serialArray[serialIndex] != 0xffffffff)
253  {
254  for (int i = 0; i < 4; i++)
255  {
256  char tempChar = ((serialArray[serialIndex] >> (i*8)) & 0xff);
257  if (tempChar > 0 && tempChar != '.')
258  outSerialNumberString.push_back(tempChar);
259  }
260  }
261  }
262  }
263  return true;
264 } // GetSerialNumberString
265 
266 
267 bool CNTV2Card::GetInstalledBitfileInfo (ULWord & outNumBytes, std::string & outDateStr, std::string & outTimeStr)
268 {
269  outDateStr.clear ();
270  outTimeStr.clear ();
271  outNumBytes = 0;
272 
273  if (!_boardOpened)
274  return false; // Bail if I'm not open
275 
276  BITFILE_INFO_STRUCT bitFileInfo;
277  ::memset (&bitFileInfo, 0, sizeof (bitFileInfo));
278  bitFileInfo.whichFPGA = eFPGAVideoProc;
279 
280  // Call the OS specific method...
282  return false;
283 
284  // Fill in our OS independent data structure...
285  outDateStr = reinterpret_cast <char *> (&bitFileInfo.dateStr [0]);
286  outTimeStr = reinterpret_cast <char *> (&bitFileInfo.timeStr [0]);
287  outNumBytes = bitFileInfo.numBytes;
288  return true;
289 }
290 
292 {
293  ostringstream oss;
294  // format like: "date time name"
295  oss << inBitFileInfo.dateStr << " " << inBitFileInfo.timeStr << " ";
297  oss << "DNxIV";
298  else
299  oss << ::NTV2BitfileTypeToString(NTV2BitfileType(inBitFileInfo.bitFileType), true);
300  return oss.str();
301 }
302 
303 bool CNTV2Card::IsFailSafeBitfileLoaded (bool & outIsSafeBoot)
304 {
305  outIsSafeBoot = false;
307  return false;
308  return CNTV2DriverInterface::ReadRegister(kRegCPLDVersion, outIsSafeBoot, BIT(4), 4);
309 }
310 
311 
312 bool CNTV2Card::CanWarmBootFPGA (bool & outCanWarmBoot)
313 {
314  outCanWarmBoot = false; // Definitely can't
316  return false;
317 
318  ULWord version(0);
319  if (!ReadRegister(kRegCPLDVersion, version, BIT(0)|BIT(1)))
320  return false; // Fail
321  if (version != 3)
322  outCanWarmBoot = true; // Definitely can
323  return true;
324 }
325 
326 
328 {
330  ULWord audioCtlReg (0); // The Audio Control Register tells us what's connected
331 
332  if (IsOpen () && ReadRegister (kRegAud1Control, audioCtlReg))
333  {
334  const bool bPhonyKBox (false); // For debugging
335 
336  switch (_boardID)
337  {
338  case DEVICE_ID_KONA3G:
340  case DEVICE_ID_IO4K:
341  case DEVICE_ID_KONA4:
342  case DEVICE_ID_KONA4UFC:
343  case DEVICE_ID_KONA5:
345  case DEVICE_ID_KONA5_8K:
348  case DEVICE_ID_KONA5_OE1:
350  // Do we have a K3G-Box?
351  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
352  result = NTV2_K3GBox;
353  else
354  result = NTV2_BreakoutCableBNC;
355  break;
357  // Do we have a KL-Box?
358  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
359  result = NTV2_KLBox;
360  else
361  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
362  break;
363  case DEVICE_ID_KONALHI:
364  // Do we have a KLHi-Box?
365  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
366  result = NTV2_KLHiBox;
367  else
368  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
369  break;
370  case DEVICE_ID_KONAX:
371  // Do we have a BOB?
373  result = NTV2_BreakoutBoard;
374  break;
375  default:
376  break;
377  }
378  }
379  return result;
380 }
381 
382 #if !defined(NTV2_DEPRECATE_16_3)
385  NTV2FrameGeometry inFrameGeometry,
386  NTV2Standard inStandard)
387  {
388  return ::NTV2DeviceCanDoFormat (GetDeviceID(), inFrameRate, inFrameGeometry, inStandard);
389  }
390 
392  {
394  }
395 
397  {
399  }
400 
402  {
403  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID()); // Revisit for 2MB granularity
404  }
405 
407  {
408  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID()); // Revisit for 2MB granularity
409  }
410 
412  {
413  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID()); // Revisit for 2MB granularity
414  }
415 
417  {
418  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID()); // Revisit for 2MB granularity
419  }
420 
422  {
423  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
424  }
425 
427  {
428  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
429  }
430 
432  {
433  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
434  }
435 
437  {
438  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
439  }
440 
442  {
444  }
445 
447  {
449  }
450 
452  {
454  }
455 
457  {
459  }
460 
462  {
464  }
465 
467  {
469  }
470 
472  {
474  }
475 
477  {
479  return false; // Must have at least one HDMI input or output
481  return false; // Can't be KonaHDMI
483  return false; // Can't have audio mixer
484  return true;
485  }
486 
488  {
490  }
491 
493  {
495  }
496 #endif // !defined(NTV2_DEPRECATE_16_3)
497 
498 
500 
501 ostream & operator << (ostream & inOutStr, const NTV2AudioChannelPairs & inSet)
502 {
503  if (inSet.empty())
504  inOutStr << "(none)";
505  else
506  for (NTV2AudioChannelPairsConstIter iter (inSet.begin ()); iter != inSet.end (); ++iter)
507  inOutStr << (iter != inSet.begin() ? ", " : "") << ::NTV2AudioChannelPairToString (*iter, true);
508  return inOutStr;
509 }
510 
511 
512 ostream & operator << (ostream & inOutStr, const NTV2AudioChannelQuads & inSet)
513 {
514  for (NTV2AudioChannelQuadsConstIter iter (inSet.begin ()); iter != inSet.end (); ++iter)
515  inOutStr << (iter != inSet.begin () ? ", " : "") << ::NTV2AudioChannelQuadToString (*iter, true);
516  return inOutStr;
517 }
518 
519 
520 ostream & operator << (ostream & inOutStr, const NTV2AudioChannelOctets & inSet)
521 {
522  for (NTV2AudioChannelOctetsConstIter iter (inSet.begin ()); iter != inSet.end (); ++iter)
523  inOutStr << (iter != inSet.begin () ? ", " : "") << ::NTV2AudioChannelOctetToString (*iter, true);
524  return inOutStr;
525 }
526 
527 
528 ostream & operator << (ostream & inOutStr, const NTV2DoubleArray & inVector)
529 {
530  for (NTV2DoubleArrayConstIter iter (inVector.begin ()); iter != inVector.end (); ++iter)
531  inOutStr << *iter << endl;
532  return inOutStr;
533 }
534 
535 
536 ostream & operator << (ostream & inOutStr, const NTV2DIDSet & inDIDs)
537 {
538  for (NTV2DIDSetConstIter it (inDIDs.begin()); it != inDIDs.end(); )
539  {
540  inOutStr << xHEX0N(uint16_t(*it),2);
541  if (++it != inDIDs.end())
542  inOutStr << ", ";
543  }
544  return inOutStr;
545 }
546 
547 
549 
550 
551 bool SDRAMAuditor::AssessDevice (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
552 {
553  mFrameTags.clear();
554  mDeviceID = DEVICE_ID_INVALID;
555  mNumFrames = 0;
556  mIntrinsicSize = 0;
557  if (!inDevice.IsOpen())
558  return false;
559 
560  mDeviceID = inDevice.GetDeviceID();
561  const ULWord totalBytes(::NTV2DeviceGetActiveMemorySize(mDeviceID));
562  mNumFrames = UWord(totalBytes / m8MB);
563  if (totalBytes % m8MB)
564  {mNumFrames++; cerr << DEC(totalBytes % m8MB) << " leftover/spare bytes -- last frame is partial frame" << endl;}
565  for (UWord frm(0); frm < mNumFrames; frm++)
566  mFrameTags.insert(FrameTag(frm, NTV2StringSet()));
567 
568  return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
569 }
570 
571 ostream & SDRAMAuditor::RawDump (ostream & oss) const
572 {
573  for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
574  {
575  const NTV2StringSet & tags(it->second);
576  oss << DEC0N(it->first,3) << ": " << aja::join(tags, ", ") << endl;
577  }
578  return oss;
579 }
580 
582 {
583  ULWordSet result; // Coalesce all regions into this one sorted set
584  for (size_t ndx(0); ndx < inRgn1.size(); ndx++)
585  if (result.find(inRgn1.at(ndx)) == result.end())
586  result.insert(inRgn1.at(ndx));
587  for (size_t ndx(0); ndx < inRgn2.size(); ndx++)
588  if (result.find(inRgn2.at(ndx)) == result.end())
589  result.insert(inRgn2.at(ndx));
590  for (size_t ndx(0); ndx < inRgn3.size(); ndx++)
591  if (result.find(inRgn3.at(ndx)) == result.end())
592  result.insert(inRgn3.at(ndx));
593  return result;
594 }
595 
596 ostream & SDRAMAuditor::DumpBlocks (ostream & oss) const
597 {
598  ULWordSequence badBlks, freeBlks, goodBlks;
599  GetRegions (freeBlks, goodBlks, badBlks);
600  ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks)); // Coalesce all regions into this one sorted set
601 
602  for (ULWordSetConstIter it(rgns.begin()); it != rgns.end(); ++it)
603  {
604  const ULWord rgnInfo(*it);
605  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
606  NTV2StringSet tags;
607  GetTagsForFrameIndex (startBlk, tags);
608  if (numBlks > 1)
609  oss << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " : ";
610  else
611  oss << "Frm " << DEC0N(startBlk,3) << " : ";
612  if (tags.empty())
613  oss << "{free}";
614  else
615  oss << aja::join(tags, ", ");
616  oss << endl;
617  }
618  return oss;
619 }
620 
621 bool SDRAMAuditor::GetRegions (ULWordSequence & outFree, ULWordSequence & outUsed, ULWordSequence & outBad) const
622 {
623  outFree.clear(); outUsed.clear(); outBad.clear();
624  FrameTagsConstIter it(mFrameTags.begin());
625  if (it == mFrameTags.end())
626  return true;
627  UWord frmStart(it->first), lastFrm(frmStart);
628  NTV2StringSet runTags(it->second);
629  while (++it != mFrameTags.end())
630  {
631  const NTV2StringSet & tags(it->second);
632  if (tags != runTags)
633  { // End of current run, start of new run
634  if (runTags.empty())
635  {
636  if (frmStart != lastFrm)
637  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
638  else
639  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
640  }
641  else if (runTags.size() > 1)
642  {
643  if (frmStart != lastFrm)
644  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
645  else
646  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
647  }
648  else
649  {
650  if (frmStart != lastFrm)
651  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
652  else
653  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
654  }
655  frmStart = lastFrm = it->first;
656  runTags = tags;
657  }
658  else
659  lastFrm = it->first; // Continue current run
660  }
661  if (runTags.empty())
662  {
663  if (frmStart != lastFrm)
664  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
665  else
666  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
667  }
668  else if (runTags.size() > 1)
669  {
670  if (frmStart != lastFrm)
671  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
672  else
673  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
674  }
675  else
676  {
677  if (frmStart != lastFrm)
678  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
679  else
680  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
681  }
682  return true;
683 }
684 
685 bool SDRAMAuditor::GetTagsForFrameIndex (const UWord inIndex, NTV2StringSet & outTags) const
686 {
687  outTags.clear();
688  FrameTagsConstIter it(mFrameTags.find(inIndex));
689  if (it == mFrameTags.end())
690  return false;
691  outTags = it->second;
692  return true;
693 }
694 
695 size_t SDRAMAuditor::GetTagCount (const UWord inIndex) const
696 {
697  FrameTagsConstIter it(mFrameTags.find(inIndex));
698  if (it == mFrameTags.end())
699  return 0;
700  return it->second.size();
701 }
702 
703 bool SDRAMAuditor::TranslateRegions (ULWordSequence & outDestRgns, const ULWordSequence & inSrcRgns, const bool inIsQuad, const bool inIsQuadQuad) const
704 {
705  outDestRgns.clear();
706  if (inIsQuad && inIsQuadQuad)
707  return false; // Can't be both
708  if (inSrcRgns.empty())
709  return true; // Empty list, not an error
710  const UWord _8MB_frames_per_dest_frame(UWord(GetIntrinsicFrameByteCount() / m8MB) * (inIsQuad?4:1) * (inIsQuadQuad?16:1)); // Should result in 1/4/16 or 2/8/32
711  if (!_8MB_frames_per_dest_frame)
712  return false; // Ordinarily won't happen, but possible with "ntv2:" (fake/software) "devices" having small SDRAM complement
713  if (_8MB_frames_per_dest_frame == 1)
714  {outDestRgns = inSrcRgns; return true;} // Same
715 
716  // For each region...
717  for (size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
718  { const ULWord val(inSrcRgns.at(ndx));
719  ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF); // <== These are in 8MB block units
720  startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
721  lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
722  outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
723  }
724  return true;
725 }
726 
727 bool SDRAMAuditor::TagAudioBuffers (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
728 {
729  ULWord addr(0);
730  bool isReading(false), isWriting(false);
731  const UWord numAudSystems(UWord(inDevice.GetNumSupported(kDeviceGetNumBufferedAudioSystems)));
732  for (NTV2AudioSystem audSys(NTV2_AUDIOSYSTEM_1); audSys < NTV2AudioSystem(numAudSystems); audSys = NTV2AudioSystem(audSys+1))
733  if (inDevice.GetAudioMemoryOffset (0, addr, audSys))
734  { ostringstream tag;
735  tag << "Aud" << DEC(audSys+1);
736  if (inDevice.IsAudioOutputRunning(audSys, isReading) && isReading)
737  tag << " Read";
738  if (inDevice.IsAudioInputRunning(audSys, isWriting) && isWriting)
739  tag << " Write";
740  TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ? string() : tag.str());
741  }
742  return true;
743 }
744 
746 {
747  const UWord numChannels (UWord(::NTV2DeviceGetNumVideoChannels(mDeviceID)) + (inDevice.HasMultiRasterWidget() ? 1 : 0));
748  NTV2ChannelSet skipChannels;
749  for (NTV2Channel chan(NTV2_CHANNEL1); chan < NTV2Channel(numChannels); chan = NTV2Channel(chan+1))
750  {
751  AUTOCIRCULATE_STATUS acStatus;
752  bool isEnabled(false), isMultiFormat(false), isQuad(false), isQuadQuad(false), isSquares(false), isTSI(false);
753  ostringstream tag;
754  uint64_t addr(0), len(0);
755  if (skipChannels.find(chan) != skipChannels.end())
756  continue; // Skip this channel/framestore
757  if (inDevice.AutoCirculateGetStatus (chan, acStatus) && !acStatus.IsStopped())
758  {
759  uint64_t tmp(0);
760  inDevice.GetDeviceFrameInfo(acStatus.GetStartFrame(), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, tmp);
761  inDevice.GetDeviceFrameInfo(acStatus.GetEndFrame(), chan, tmp, len);
762  tag << "AC" << DEC(chan+1) << (acStatus.IsInput() ? " Write" : " Read");
763  TagMemoryBlock(addr, tmp + len - addr, tag.str());
764  } // if GetStatus succeeded
765  else if (inDevice.IsChannelEnabled(chan, isEnabled) && isEnabled)
766  {
768  inDevice.GetMode(chan, mode);
769  ULWord frameNum(0);
770  if (NTV2_IS_INPUT_MODE(mode))
771  inDevice.GetInputFrame(chan, frameNum);
772  else
773  inDevice.GetOutputFrame(chan, frameNum);
774  inDevice.GetDeviceFrameInfo (UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
775  if (inDevice.IsMultiRasterWidgetChannel(chan))
776  tag << "MR" << DEC(chan+1); // MultiRaster Viewer
777  else
778  tag << "Ch" << DEC(chan+1);
779  tag << (NTV2_IS_INPUT_MODE(mode) ? " Write" : " Read");
780  TagMemoryBlock(addr, len, tag.str());
781  }
782  if (isSquares && chan == NTV2_CHANNEL1)
783  {skipChannels.insert(NTV2_CHANNEL2); skipChannels.insert(NTV2_CHANNEL3); skipChannels.insert(NTV2_CHANNEL4);}
784  else if (isSquares && chan == NTV2_CHANNEL5)
785  {skipChannels.insert(NTV2_CHANNEL6); skipChannels.insert(NTV2_CHANNEL7); skipChannels.insert(NTV2_CHANNEL8);}
786  else if (isQuad && !isQuadQuad && isTSI)
787  {
788  if (chan == NTV2_CHANNEL1)
789  skipChannels.insert(NTV2_CHANNEL2);
790  else if (chan == NTV2_CHANNEL3)
791  skipChannels.insert(NTV2_CHANNEL4);
792  else if (chan == NTV2_CHANNEL5)
793  skipChannels.insert(NTV2_CHANNEL6);
794  else if (chan == NTV2_CHANNEL7)
795  skipChannels.insert(NTV2_CHANNEL8);
796  }
797  } // for each device channel
798  if (!mIntrinsicSize)
799  {
801  inDevice.GetFrameBufferSize(NTV2_CHANNEL1, frmsz);
802  mIntrinsicSize = ::NTV2FramesizeToByteCount(frmsz);
803  }
804  return true;
805 }
806 
807 bool SDRAMAuditor::TagMemoryBlock (const ULWord inStartAddr, const ULWord inByteLength, const string & inTag)
808 {
809  if (inStartAddr % m8MB)
810  return false;
811  if (inByteLength % m8MB)
812  return false;
813  if (inTag.empty())
814  return false;
815  const UWord startFrm(UWord(inStartAddr / m8MB)), frmCnt(UWord(inByteLength / m8MB));
816  for (UWord frm(0); frm < frmCnt; frm++)
817  {
818  UWord frameNum(startFrm + frm);
819  NTV2StringSet & tags(mFrameTags[frameNum]);
820  if (tags.find(inTag) == tags.end())
821  {
822  tags.insert(inTag);
823  if (frameNum >= mNumFrames)
824  tags.insert("Invalid");
825  }
826  }
827  return true;
828 }
CNTV2Card::DeviceGetAudioFrameBuffer
virtual ULWord DeviceGetAudioFrameBuffer(void)
Definition: ntv2card.cpp:411
CNTV2Card::IsAudioOutputRunning
virtual bool IsAudioOutputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the playout side of the given NTV2AudioSystem is currently running.
Definition: ntv2audio.cpp:1176
CNTV2Card::IS_INPUT_SPIGOT_INVALID
virtual bool IS_INPUT_SPIGOT_INVALID(const UWord inInputSpigot) const
Definition: ntv2card.cpp:197
SDRAMAuditor::TagMemoryBlock
bool TagMemoryBlock(const ULWord inStartAddr, const ULWord inByteLength, const std::string &inTag)
CNTV2Card::SetFrameBufferSize
virtual bool SetFrameBufferSize(const NTV2Framesize inSize)
Sets the device's intrinsic frame buffer size.
Definition: ntv2register.cpp:1752
BITFILE_INFO_STRUCT::whichFPGA
NTV2XilinxFPGA whichFPGA
Definition: ntv2publicinterface.h:4785
CNTV2Card::DeviceCanDoAudioMixer
virtual bool DeviceCanDoAudioMixer(void)
Definition: ntv2card.cpp:471
NTV2DeviceCanDoConversionMode
bool NTV2DeviceCanDoConversionMode(const NTV2DeviceID inDeviceID, const NTV2ConversionMode inConversionMode)
Definition: ntv2devicefeatures.hpp:12367
CNTV2Card::GetSerialNumberHigh
virtual ULWord GetSerialNumberHigh(void)
Definition: ntv2card.cpp:170
NTV2_CHANNEL8
@ NTV2_CHANNEL8
Specifies channel or Frame Store 8 (or the 8th item).
Definition: ntv2enums.h:1314
DEVICE_ID_KONAHDMI
@ DEVICE_ID_KONAHDMI
See KONA HDMI.
Definition: ntv2enums.h:66
NTV2_CHANNEL2
@ NTV2_CHANNEL2
Specifies channel or Frame Store 2 (or the 2nd item).
Definition: ntv2enums.h:1308
NTV2_WgtSDIMonOut1
@ NTV2_WgtSDIMonOut1
Definition: ntv2enums.h:2904
NTV2_VideoProcBitFile
@ NTV2_VideoProcBitFile
Definition: ntv2enums.h:3271
ntv2devicefeatures.h
Declares device capability functions.
CNTV2MacDriverInterface::ReadRegister
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device....
Definition: ntv2macdriverinterface.cpp:709
SDRAMAuditor::TagAudioBuffers
bool TagAudioBuffers(CNTV2Card &inDevice, const bool inMarkStoppedAudioBuffersFree)
Definition: ntv2card.cpp:727
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1137
aja::strip
std::string & strip(std::string &str, const std::string &ws)
Definition: common.cpp:461
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific Frame Store. They're also commonly used to i...
Definition: ntv2enums.h:1305
CNTV2DriverInterface::_boardOpened
bool _boardOpened
True if I'm open and connected to the device.
Definition: ntv2driverinterface.h:675
NTV2Buffer
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
Definition: ntv2publicinterface.h:5967
CNTV2Card::IS_CHANNEL_INVALID
virtual bool IS_CHANNEL_INVALID(const NTV2Channel inChannel) const
Definition: ntv2card.cpp:177
NTV2AudioChannelOctetsConstIter
NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelOctet values.
Definition: ntv2card.h:38
aja::join
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
DEVICE_ID_KONA5
@ DEVICE_ID_KONA5
See KONA 5.
Definition: ntv2enums.h:48
CNTV2Card::DeviceCanDoHDMIQuadRasterConversion
virtual bool DeviceCanDoHDMIQuadRasterConversion(void)
Definition: ntv2card.cpp:476
CNTV2Card::IsBreakoutBoardConnected
virtual bool IsBreakoutBoardConnected(void)
Definition: ntv2register.cpp:4688
NTV2_KLBox
@ NTV2_KLBox
Definition: ntv2enums.h:3029
CNTV2Card::GetDeviceVersion
virtual Word GetDeviceVersion(void)
Answers with this device's version number.
Definition: ntv2card.cpp:63
DEVICE_ID_IOX3
@ DEVICE_ID_IOX3
See IoX3.
Definition: ntv2enums.h:41
NTV2DeviceGetActiveMemorySize
ULWord NTV2DeviceGetActiveMemorySize(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:8262
NTV2DeviceCanReportFailSafeLoaded
bool NTV2DeviceCanReportFailSafeLoaded(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:5915
DEVICE_ID_IOIP_2022
@ DEVICE_ID_IOIP_2022
See Io IP.
Definition: ntv2enums.h:38
SDRAMAuditor::GetTagsForFrameIndex
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:685
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3811
CNTV2Card::DeviceIsDNxIV
virtual bool DeviceIsDNxIV(void)
Definition: ntv2card.cpp:487
NTV2_BreakoutCableBNC
@ NTV2_BreakoutCableBNC
Identifies the AES/EBU audio breakout cable that has BNC connectors.
Definition: ntv2enums.h:3027
CNTV2Card::GetFrameBufferSize
virtual bool GetFrameBufferSize(const NTV2Channel inChannel, NTV2Framesize &outValue)
Answers with the frame size currently being used on the device.
Definition: ntv2register.cpp:2050
BITFILE_INFO_STRUCT::timeStr
char timeStr[(16)]
Definition: ntv2publicinterface.h:4779
DEVICE_ID_KONA5_8KMK
@ DEVICE_ID_KONA5_8KMK
See KONA 5.
Definition: ntv2enums.h:49
CNTV2Card::DeviceCanDo3GOut
virtual bool DeviceCanDo3GOut(const UWord index0)
Definition: ntv2card.cpp:391
CNTV2DriverInterface::_ulNumFrameBuffers
ULWord _ulNumFrameBuffers
Definition: ntv2driverinterface.h:696
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
BITFILE_INFO_STRUCT::bitFileType
ULWord bitFileType
Definition: ntv2publicinterface.h:4782
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5581
CNTV2Card::GetInputFrame
virtual bool GetInputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current input frame index number for the given FrameStore. This identifies which par...
Definition: ntv2register.cpp:2234
CNTV2Card::DeviceCanDoConversionMode
virtual bool DeviceCanDoConversionMode(const NTV2ConversionMode inCM)
Definition: ntv2card.cpp:456
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:207
CNTV2Card::GetInstalledBitfileInfo
virtual bool GetInstalledBitfileInfo(ULWord &outNumBytes, std::string &outDateStr, std::string &outTimeStr)
Returns the size and time/date stamp of the device's currently-installed firmware.
Definition: ntv2card.cpp:267
CNTV2Card::DeviceCanDoFrameBufferFormat
virtual bool DeviceCanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2card.cpp:446
CNTV2DriverInterface::_ulFrameBufferSize
ULWord _ulFrameBufferSize
Definition: ntv2driverinterface.h:697
CNTV2Card::SerialNum64ToString
static std::string SerialNum64ToString(const uint64_t inSerialNumber)
Returns a string containing the decoded, human-readable device serial number.
Definition: ntv2card.cpp:213
kDeviceCanDoAudioMixer
@ kDeviceCanDoAudioMixer
True if device has a firmware audio mixer.
Definition: ntv2devicefeatures.h:119
NTV2DeviceCanDoFrameBufferFormat
bool NTV2DeviceCanDoFrameBufferFormat(const NTV2DeviceID inDeviceID, const NTV2FrameBufferFormat inFBFormat)
Definition: ntv2devicefeatures.hpp:15330
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or Frame Store 1 (or the first item).
Definition: ntv2enums.h:1307
ntv2debug.h
CNTV2Card::DeviceCanDoFormat
virtual bool DeviceCanDoFormat(const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2card.cpp:384
NTV2_BreakoutNone
@ NTV2_BreakoutNone
No identifiable breakout hardware appears to be attached.
Definition: ntv2enums.h:3025
CNTV2Card::DeviceCanDoWidget
virtual bool DeviceCanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2card.cpp:451
CNTV2Card::GetFrameBufferFormat
virtual bool GetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat &outValue)
Returns the current frame buffer format for the given FrameStore on the AJA device.
Definition: ntv2register.cpp:1891
NTV2_K3GBox
@ NTV2_K3GBox
Definition: ntv2enums.h:3033
CNTV2DriverInterface::_boardID
NTV2DeviceID _boardID
My cached device ID.
Definition: ntv2driverinterface.h:674
kRegReserved57
@ kRegReserved57
Definition: ntv2publicinterface.h:131
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:396
NTV2FramesizeToByteCount
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
Definition: ntv2utils.cpp:5319
NTV2_CHANNEL6
@ NTV2_CHANNEL6
Specifies channel or Frame Store 6 (or the 6th item).
Definition: ntv2enums.h:1312
NTV2AudioChannelQuadToString
std::string NTV2AudioChannelQuadToString(const NTV2Audio4ChannelSelect inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6461
kDeviceGetNumBufferedAudioSystems
@ kDeviceGetNumBufferedAudioSystems
The total number of audio systems on the device that can read/write audio buffer memory....
Definition: ntv2devicefeatures.h:205
NTV2DeviceCanDoVideoFormat
bool NTV2DeviceCanDoVideoFormat(const NTV2DeviceID inDeviceID, const NTV2VideoFormat inVideoFormat)
Definition: ntv2devicefeatures.hpp:18535
CNTV2Card::GetDeviceVersionString
virtual std::string GetDeviceVersionString(void)
Answers with this device's version number as a human-readable string.
Definition: ntv2card.cpp:70
NTV2_CHANNEL4
@ NTV2_CHANNEL4
Specifies channel or Frame Store 4 (or the 4th item).
Definition: ntv2enums.h:1310
ULWordSetConstIter
ULWordSet::const_iterator ULWordSetConstIter
Definition: ntv2publicinterface.h:54
CNTV2DriverInterface::IsSupported
virtual bool IsSupported(const NTV2BoolParamID inParamID)
Definition: ntv2driverinterface.h:425
NTV2DriverVersionDecode_Point
#define NTV2DriverVersionDecode_Point(__vers__)
Definition: ntv2publicinterface.h:5346
NTV2_CHANNEL5
@ NTV2_CHANNEL5
Specifies channel or Frame Store 5 (or the 5th item).
Definition: ntv2enums.h:1311
CNTV2Card::GetModelName
virtual std::string GetModelName(void)
Answers with this device's model name.
Definition: ntv2card.cpp:78
AUTOCIRCULATE_STATUS::IsInput
bool IsInput(void) const
Definition: ntv2publicinterface.h:7291
CNTV2DriverInterface::ReadRegister
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device....
Definition: ntv2driverinterface.cpp:393
isEnabled
static bool isEnabled(CNTV2Card &device, const NTV2Channel inChannel)
Definition: ntv2supportlogger.cpp:144
CNTV2Card::GetBitfileInfoString
virtual std::string GetBitfileInfoString(const BITFILE_INFO_STRUCT &inBitFileInfo)
Generates and returns an info string with date, time and name for the given inBifFileInfo.
Definition: ntv2card.cpp:291
NTV2_KLHiBox
@ NTV2_KLHiBox
Definition: ntv2enums.h:3031
CNTV2Card::IsAudioInputRunning
virtual bool IsAudioInputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the capture side of the given NTV2AudioSystem is currently running.
Definition: ntv2audio.cpp:1267
CNTV2Card::GetDisplayName
virtual std::string GetDisplayName(void)
Answers with this device's display name.
Definition: ntv2card.cpp:84
kRegReserved54
@ kRegReserved54
Definition: ntv2publicinterface.h:128
SDRAMAuditor::DumpBlocks
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
Definition: ntv2card.cpp:596
CNTV2Card::DeviceHasMicInput
virtual bool DeviceHasMicInput(void)
Definition: ntv2card.cpp:492
BITFILE_INFO_STRUCT::dateStr
char dateStr[(16)]
Definition: ntv2publicinterface.h:4778
NTV2XilinxFPGA
NTV2XilinxFPGA
Definition: ntv2enums.h:3760
kRegReserved56
@ kRegReserved56
Definition: ntv2publicinterface.h:130
NTV2DIDSet
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
Definition: ntv2card.h:47
CNTV2Card::GetOutputFrame
virtual bool GetOutputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current output frame number for the given FrameStore (expressed as an NTV2Channel).
Definition: ntv2register.cpp:2216
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:153
ULWordSet
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:53
CNTV2Card::GetPCIFPGAVersionString
virtual std::string GetPCIFPGAVersionString(void)
Definition: ntv2card.cpp:114
DEVICE_ID_KONA5_8K
@ DEVICE_ID_KONA5_8K
See KONA 5.
Definition: ntv2enums.h:50
NTV2AudioChannelPairToString
std::string NTV2AudioChannelPairToString(const NTV2AudioChannelPair inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6450
DEVICE_ID_KONA3G
@ DEVICE_ID_KONA3G
See KONA 3G (UFC Mode).
Definition: ntv2enums.h:44
ULWord
uint32_t ULWord
Definition: ajatypes.h:246
NTV2DriverVersionDecode_Major
#define NTV2DriverVersionDecode_Major(__vers__)
Definition: ntv2publicinterface.h:5344
CNTV2Card::NULL_POINTER
static NTV2Buffer NULL_POINTER
Used for default empty NTV2Buffer parameters – do not modify.
Definition: ntv2card.h:6146
NTV2DeviceCanDoWidget
bool NTV2DeviceCanDoWidget(const NTV2DeviceID inDeviceID, const NTV2WidgetID inWidgetID)
Definition: ntv2devicefeatures.hpp:30519
NTV2DoubleArrayConstIter
NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter
Handy const iterator to iterate over an NTV2DoubleArray.
Definition: ntv2card.h:43
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7105
CNTV2Card::DeviceCanDoInputSource
virtual bool DeviceCanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2card.cpp:466
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or Frame Store 7 (or the 7th item).
Definition: ntv2enums.h:1313
CNTV2Card::DeviceGetFrameBufferSize
virtual ULWord DeviceGetFrameBufferSize(void)
Definition: ntv2card.cpp:401
DEVICE_ID_KONAX
@ DEVICE_ID_KONAX
See KONA X.
Definition: ntv2enums.h:77
NTV2AudioChannelQuadsConstIter
NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelQuad values.
Definition: ntv2card.h:34
DEVICE_ID_KONA4UFC
@ DEVICE_ID_KONA4UFC
See KONA 4 (UFC Mode).
Definition: ntv2enums.h:47
NTV2AudioChannelPairs
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
Definition: ntv2card.h:29
CNTV2Card::DeviceGetNumberFrameBuffers
virtual ULWord DeviceGetNumberFrameBuffers(void)
Definition: ntv2card.cpp:406
NTV2Mode
NTV2Mode
Used to identify the mode of a Frame Store, or the direction of an AutoCirculate stream: either Captu...
Definition: ntv2enums.h:1198
SDRAMAuditor::RawDump
std::ostream & RawDump(std::ostream &oss) const
Dumps a human-readable list of regions into the given stream.
Definition: ntv2card.cpp:571
NTV2DeviceIDToString
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4673
NTV2DeviceCanDo3GOut
bool NTV2DeviceCanDo3GOut(NTV2DeviceID boardID, UWord index0)
Definition: ntv2devicefeatures.cpp:52
ntv2card.h
Declares the CNTV2Card class.
NTV2_BITFILE_IO4KPLUS_MAIN
@ NTV2_BITFILE_IO4KPLUS_MAIN
Definition: ntv2enums.h:3316
CNTV2Card::GetDeviceFrameInfo
virtual bool GetDeviceFrameInfo(const UWord inFrameNumber, const NTV2Channel inChannel, uint64_t &outAddress, uint64_t &outLength)
Answers with the address and size of the given frame.
Definition: ntv2dma.cpp:433
CNTV2Card::IsFailSafeBitfileLoaded
virtual bool IsFailSafeBitfileLoaded(bool &outIsFailSafe)
Answers whether or not the "fail-safe" (aka "safe-boot") bitfile is currently loaded and running in t...
Definition: ntv2card.cpp:303
SDRAMAuditor::GetTagCount
size_t GetTagCount(const UWord inIndex) const
Definition: ntv2card.cpp:695
CNTV2Card::GetSerialNumberString
virtual bool GetSerialNumberString(std::string &outSerialNumberString)
Answers with a string that contains my human-readable serial number.
Definition: ntv2card.cpp:219
NTV2DeviceGetNumVideoInputs
UWord NTV2DeviceGetNumVideoInputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11923
NTV2DeviceGetAudioFrameBuffer2
ULWord NTV2DeviceGetAudioFrameBuffer2(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
Definition: ntv2devicefeatures.cpp:683
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or Frame Store 3 (or the 3rd item).
Definition: ntv2enums.h:1309
UWord
uint16_t UWord
Definition: ajatypes.h:244
CNTV2Card::AutoCirculateGetStatus
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
Definition: ntv2autocirculate.cpp:646
CNTV2Card::GetSerialNumber
virtual uint64_t GetSerialNumber(void)
Answers with my serial number.
Definition: ntv2card.cpp:205
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2Framesize
NTV2Framesize
Kona2/Xena2 specific enums.
Definition: ntv2enums.h:2057
Word
int16_t Word
Definition: ajatypes.h:243
NTV2BreakoutType
NTV2BreakoutType
Identifies the Breakout Boxes and Cables that may be attached to an AJA NTV2 device.
Definition: ntv2enums.h:3023
CNTV2Card::DeviceCanDoLTCEmbeddedN
virtual bool DeviceCanDoLTCEmbeddedN(const UWord index0)
Definition: ntv2card.cpp:396
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:262
DEVICE_ID_KONA5_8K_MV_TX
@ DEVICE_ID_KONA5_8K_MV_TX
See KONA 5.
Definition: ntv2enums.h:65
CNTV2Card::CanWarmBootFPGA
virtual bool CanWarmBootFPGA(bool &outCanWarmBoot)
Answers whether or not the FPGA can be reloaded without powering off.
Definition: ntv2card.cpp:312
AUTOCIRCULATE_STATUS::IsStopped
bool IsStopped(void) const
Definition: ntv2publicinterface.h:7221
DEVICE_ID_KONALHEPLUS
@ DEVICE_ID_KONALHEPLUS
See KONA LHe Plus.
Definition: ntv2enums.h:74
NTV2WidgetID
NTV2WidgetID
Definition: ntv2enums.h:2842
DEVICE_ID_KONA5_OE1
@ DEVICE_ID_KONA5_OE1
See KONA 5.
Definition: ntv2enums.h:53
NTV2BitfileType
NTV2BitfileType
Definition: ntv2enums.h:3288
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:91
NTV2AudioChannelOctetToString
std::string NTV2AudioChannelOctetToString(const NTV2Audio8ChannelSelect inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6472
NTV2ChannelSet
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Definition: ntv2publicinterface.h:3823
AUTOCIRCULATE_STATUS::GetEndFrame
uint16_t GetEndFrame(void) const
Definition: ntv2publicinterface.h:7196
CNTV2DriverInterface::GetNumSupported
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
Definition: ntv2driverinterface.h:434
CNTV2Card::GetMode
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
Definition: ntv2register.cpp:1631
NTV2_BreakoutCableXLR
@ NTV2_BreakoutCableXLR
Identifies the AES/EBU audio breakout cable that has XLR connectors.
Definition: ntv2enums.h:3026
kDeviceGetNumMicInputs
@ kDeviceGetNumMicInputs
The number of microphone inputs on the device.
Definition: ntv2devicefeatures.h:202
NTV2DSKMode
NTV2DSKMode
Definition: ntv2enums.h:3414
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:190
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1319
CNTV2Card::GetDriverVersionString
virtual std::string GetDriverVersionString(void)
Answers with this device's driver's version as a human-readable string.
Definition: ntv2card.cpp:123
CNTV2Card::GetBreakoutHardware
virtual NTV2BreakoutType GetBreakoutHardware(void)
Definition: ntv2card.cpp:327
BITFILE_INFO_STRUCT::numBytes
ULWord numBytes
Definition: ntv2publicinterface.h:4777
kDeviceGetNumHDMIVideoInputs
@ kDeviceGetNumHDMIVideoInputs
The number of HDMI video inputs on the device.
Definition: ntv2devicefeatures.h:187
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1221
DEVICE_ID_IOIP_2110
@ DEVICE_ID_IOIP_2110
See Io IP.
Definition: ntv2enums.h:39
kRegStatus
@ kRegStatus
Definition: ntv2publicinterface.h:95
DEVICE_ID_KONA5_3DLUT
@ DEVICE_ID_KONA5_3DLUT
See KONA 5.
Definition: ntv2enums.h:52
CNTV2Card::DeviceCanDoVideoFormat
virtual bool DeviceCanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2card.cpp:441
CNTV2Card::GetFrameGeometry
virtual bool GetFrameGeometry(NTV2FrameGeometry &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2register.cpp:972
NTV2AudioChannelOctets
std::set< NTV2AudioChannelOctet > NTV2AudioChannelOctets
A set of distinct NTV2AudioChannelOctet values.
Definition: ntv2card.h:37
kRegCPLDVersion
@ kRegCPLDVersion
Definition: ntv2publicinterface.h:137
SDRAMAuditor::GetRegions
bool GetRegions(ULWordSequence &outFree, ULWordSequence &outUsed, ULWordSequence &outBad) const
Answers with the lists of free, in-use and conflicting 8MB memory blocks. Each ULWord represents a re...
Definition: ntv2card.cpp:621
SDRAMAuditor::TranslateRegions
bool TranslateRegions(ULWordSequence &outRgns, const ULWordSequence &inRgns, const bool inIsQuad, const bool inIsQuadQuad) const
Translates an 8MB-chunked list of regions into another list of regions with frame indexes and sizes e...
Definition: ntv2card.cpp:703
kRegAud1Control
@ kRegAud1Control
Definition: ntv2publicinterface.h:98
CNTV2Card::IS_OUTPUT_SPIGOT_INVALID
virtual bool IS_OUTPUT_SPIGOT_INVALID(const UWord inOutputSpigot) const
Definition: ntv2card.cpp:185
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5579
kDeviceGetNumHDMIVideoOutputs
@ kDeviceGetNumHDMIVideoOutputs
The number of HDMI video outputs on the device.
Definition: ntv2devicefeatures.h:188
common.h
Private include file for all ajabase sources.
CNTV2Card::~CNTV2Card
virtual ~CNTV2Card()
My destructor.
Definition: ntv2card.cpp:55
NTV2DriverVersionDecode_Minor
#define NTV2DriverVersionDecode_Minor(__vers__)
Definition: ntv2publicinterface.h:5345
kK2RegMaskKBoxDetect
@ kK2RegMaskKBoxDetect
Definition: ntv2publicinterface.h:1283
DEVICE_ID_IO4KPLUS
@ DEVICE_ID_IO4KPLUS
See Io4K Plus.
Definition: ntv2enums.h:35
NTV2DeviceCanDoInputSource
bool NTV2DeviceCanDoInputSource(const NTV2DeviceID inDeviceID, const NTV2InputSource inInputSource)
Definition: ntv2devicefeatures.hpp:17462
NTV2DeviceCanDoDSKMode
bool NTV2DeviceCanDoDSKMode(const NTV2DeviceID inDeviceID, const NTV2DSKMode inDSKMode)
Definition: ntv2devicefeatures.hpp:14824
NTV2_FRAMESIZE_8MB
@ NTV2_FRAMESIZE_8MB
Definition: ntv2enums.h:2061
CNTV2Card::DeviceCanDoDSKMode
virtual bool DeviceCanDoDSKMode(const NTV2DSKMode inDSKM)
Definition: ntv2card.cpp:461
NTV2DeviceCanDoFormat
bool NTV2DeviceCanDoFormat(const NTV2DeviceID inDevID, const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2utils.cpp:4057
ULWordSequence
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:45
DEVICE_ID_KONA4
@ DEVICE_ID_KONA4
See KONA 4 (Quad Mode).
Definition: ntv2enums.h:46
AUTOCIRCULATE_STATUS::GetStartFrame
uint16_t GetStartFrame(void) const
Definition: ntv2publicinterface.h:7191
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
kDeviceHasMicrophoneInput
@ kDeviceHasMicrophoneInput
True if device has a microphone input connector.
Definition: ntv2devicefeatures.h:139
SDRAMAuditor::TagVideoFrames
bool TagVideoFrames(CNTV2Card &inDevice)
Definition: ntv2card.cpp:745
NTV2DeviceGetNumVideoChannels
ULWord NTV2DeviceGetNumVideoChannels(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11834
NTV2FrameGeometry
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:336
CNTV2Card::IsChannelEnabled
virtual bool IsChannelEnabled(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the given FrameStore is enabled.
Definition: ntv2register.cpp:2138
NTV2ConversionMode
NTV2ConversionMode
Definition: ntv2enums.h:3628
CNTV2DriverInterface::GetFrameBufferSize
virtual ULWord GetFrameBufferSize(void) const
Definition: ntv2driverinterface.h:388
CNTV2Card::CNTV2Card
CNTV2Card()
My default constructor.
Definition: ntv2card.cpp:19
SDRAMAuditor::CoalesceRegions
static ULWordSet CoalesceRegions(const ULWordSequence &inRgn1, const ULWordSequence &inRgn2, const ULWordSequence &inRgn3)
Definition: ntv2card.cpp:581
kRegReserved55
@ kRegReserved55
Definition: ntv2publicinterface.h:129
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:371
CNTV2Card::GetDriverVersionComponents
virtual bool GetDriverVersionComponents(UWord &outMajor, UWord &outMinor, UWord &outPoint, UWord &outBuild)
Answers with the individual version components of this device's driver.
Definition: ntv2card.cpp:145
CNTV2Card::IsMultiRasterWidgetChannel
virtual bool IsMultiRasterWidgetChannel(const NTV2Channel inChannel)
Definition: ntv2register.cpp:4683
NTV2_BreakoutBoard
@ NTV2_BreakoutBoard
Definition: ntv2enums.h:3034
CNTV2Card::IsBufferSizeSetBySW
virtual bool IsBufferSizeSetBySW(void)
Definition: ntv2register.cpp:1684
NTV2DeviceCanDoWarmBootFPGA
bool NTV2DeviceCanDoWarmBootFPGA(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:5735
CNTV2Card::GetFPGAVersionString
virtual std::string GetFPGAVersionString(const NTV2XilinxFPGA inFPGA=eFPGAVideoProc)
Definition: ntv2card.cpp:92
NTV2AudioChannelQuads
std::set< NTV2AudioChannelQuad > NTV2AudioChannelQuads
A set of distinct NTV2AudioChannelQuad values.
Definition: ntv2card.h:33
NTV2DoubleArray
std::vector< double > NTV2DoubleArray
An array of double-precision floating-point values.
Definition: ntv2card.h:41
NTV2_MODE_INVALID
@ NTV2_MODE_INVALID
The invalid mode.
Definition: ntv2enums.h:1204
DEVICE_ID_KONA3GQUAD
@ DEVICE_ID_KONA3GQUAD
See KONA 3G (Quad Mode).
Definition: ntv2enums.h:45
NTV2DeviceGetNumVideoOutputs
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:12012
NTV2DriverVersionDecode_Build
#define NTV2DriverVersionDecode_Build(__vers__)
Definition: ntv2publicinterface.h:5347
NTV2BitfileTypeToString
std::string NTV2BitfileTypeToString(const NTV2BitfileType inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7739
NTV2_IS_INPUT_MODE
#define NTV2_IS_INPUT_MODE(__mode__)
Definition: ntv2enums.h:1208
CNTV2Card::GetAudioMemoryOffset
virtual bool GetAudioMemoryOffset(const ULWord inOffsetBytes, ULWord &outAbsByteOffset, const NTV2AudioSystem inAudioSystem, const bool inCaptureBuffer=false)
Answers with the byte offset in device SDRAM into the specified Audio System's audio buffer.
Definition: ntv2dma.cpp:159
CNTV2Card::GetSerialNumberLow
virtual ULWord GetSerialNumberLow(void)
Definition: ntv2card.cpp:163
kVRegDriverVersion
@ kVRegDriverVersion
Packed driver version – use NTV2DriverVersionEncode, NTV2DriverVersionDecode* macros to encode/decode...
Definition: ntv2virtualregisters.h:29
BIT
#define BIT(_x_)
Definition: ajatypes.h:654
xHEX0N
#define xHEX0N(__x__, __n__)
Definition: ntv2publicinterface.h:5578
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3809
NTV2DeviceCanDoLTCEmbeddedN
bool NTV2DeviceCanDoLTCEmbeddedN(NTV2DeviceID boardID, UWord index0)
Definition: ntv2devicefeatures.cpp:118
DEVICE_ID_IOIP_2110_RGB12
@ DEVICE_ID_IOIP_2110_RGB12
See Io IP.
Definition: ntv2enums.h:40
NTV2DeviceGetFrameBufferSize
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
Definition: ntv2devicefeatures.cpp:245
DEVICE_ID_KONA5_2X4K
@ DEVICE_ID_KONA5_2X4K
See KONA 5.
Definition: ntv2enums.h:51
CNTV2Card::HasMultiRasterWidget
virtual bool HasMultiRasterWidget(void)
Definition: ntv2register.cpp:4651
CNTV2DriverInterface
I'm the base class that undergirds the platform-specific derived classes (from which CNTV2Card is ult...
Definition: ntv2driverinterface.h:64
CNTV2DriverInterface::Open
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
Definition: ntv2driverinterface.cpp:128
DEVICE_ID_IO4K
@ DEVICE_ID_IO4K
See Io4K (Quad Mode).
Definition: ntv2enums.h:34
operator<<
ostream & operator<<(ostream &inOutStr, const NTV2AudioChannelPairs &inSet)
Definition: ntv2card.cpp:501
SDRAMAuditor::AssessDevice
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=false)
Assesses the given device.
Definition: ntv2card.cpp:551
eFPGAVideoProc
@ eFPGAVideoProc
Definition: ntv2enums.h:3762
NTV2DIDSetConstIter
NTV2DIDSet::const_iterator NTV2DIDSetConstIter
Handy const iterator to iterate over an NTV2DIDSet.
Definition: ntv2card.h:49
CNTV2DriverInterface::DriverGetBitFileInformation
virtual bool DriverGetBitFileInformation(BITFILE_INFO_STRUCT &outBitFileInfo, const NTV2BitFileType inBitFileType=NTV2_VideoProcBitFile)
Answers with the currently-installed bitfile information.
Definition: ntv2driverinterface.cpp:586
DEVICE_ID_KONALHI
@ DEVICE_ID_KONALHI
See KONA LHi.
Definition: ntv2enums.h:75
BITFILE_INFO_STRUCT
Definition: ntv2publicinterface.h:4772
CNTV2Card::DeviceGetAudioFrameBuffer2
virtual ULWord DeviceGetAudioFrameBuffer2(void)
Definition: ntv2card.cpp:416
NTV2AudioChannelPairsConstIter
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
Definition: ntv2card.h:30
NTV2DeviceGetNumberFrameBuffers
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
Definition: ntv2devicefeatures.cpp:510
SerialNum64ToString
std::string SerialNum64ToString(const uint64_t &inSerNum)
Definition: ntv2utils.cpp:8114
CNTV2Card::GetPCIFPGAVersion
virtual Word GetPCIFPGAVersion(void)
Definition: ntv2card.cpp:107
CNTV2DriverInterface::Close
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call.
Definition: ntv2driverinterface.cpp:196
NTV2DeviceGetSPIFlashVersion
UWord NTV2DeviceGetSPIFlashVersion(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:12190
NTV2DeviceGetAudioFrameBuffer
ULWord NTV2DeviceGetAudioFrameBuffer(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
Definition: ntv2devicefeatures.cpp:677