AJA NTV2 SDK  17.5.0.1492
NTV2 SDK 17.5.0.1492
ntv2card.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
9 #include "ntv2devicefeatures.h"
10 #include "ntv2card.h"
11 #include "ntv2debug.h"
12 #include "ntv2utils.h"
13 #include <sstream>
14 #include "ajabase/common/common.h"
15 //#include "ajabase/system/info.h" // for AJASystemInfo
16 
17 using namespace std;
18 
19 
20 // Default Constructor
22  : mDevCap(driverInterface())
23 {
24  _boardOpened = false;
25 }
26 
27 CNTV2Card::CNTV2Card (const UWord inDeviceIndex, const string & inHostName)
28  : mDevCap(driverInterface())
29 {
30  string hostName(inHostName);
31  aja::strip(hostName);
32  _boardOpened = false;
33  bool openOK = hostName.empty() ? CNTV2DriverInterface::Open(inDeviceIndex) : CNTV2DriverInterface::Open(hostName);
34  if (openOK)
35  {
36  if (IsBufferSizeSetBySW())
37  {
38  NTV2Framesize fbSize;
40  SetFrameBufferSize (fbSize);
41  }
42  else
43  {
45  NTV2FrameBufferFormat format;
46 
47  GetFrameGeometry (fg);
49 
52  }
53  }
54 }
55 
56 // Destructor
58 {
59  if (IsOpen ())
60  Close ();
61 
62 } // destructor
63 
64 
66 {
67  ULWord status (0);
68  return ReadRegister (kRegStatus, status) ? (status & 0xF) : -1;
69 }
70 
71 
73 {
74  ostringstream oss;
76  return oss.str();
77 }
78 
79 
81 {
84 }
85 
87 {
88  ostringstream oss;
89  if (IsRemote())
90  {
92  if (params.hasKey("displayname"))
93  {
94  oss << params.valueForKey("displayname");
95  }
96  else if (params.hasKey(kNTV2PluginRegInfoKey_LongName))
97  {
98  oss << params.valueForKey(kNTV2PluginRegInfoKey_LongName);
99  }
100  else if (params.hasKey(kNTV2PluginRegInfoKey_ShortName))
101  {
102  oss << params.valueForKey(kNTV2PluginRegInfoKey_ShortName);
103  }
104  }
105  else
106  {
107  oss << GetModelName() << " - " << GetIndexNumber();
108  }
109  return oss.str();
110 }
111 
112 
114 {
115  ULWord numBytes (0);
116  string dateStr, timeStr;
117  ostringstream oss;
118 
119  if (inFPGA == eFPGAVideoProc && GetInstalledBitfileInfo (numBytes, dateStr, timeStr))
120  oss << dateStr << " at " << timeStr;
121  else
122  oss << "Unavailable";
123 
124  return oss.str ();
125 }
126 
127 
129 {
130  ULWord status (0);
131  return ReadRegister (48, status) ? ((status >> 8) & 0xFF) : -1;
132 }
133 
134 
136 {
137  const UWord version (static_cast<UWord>(GetPCIFPGAVersion()));
138  ostringstream oss;
139  oss << hex << version;
140  return oss.str ();
141 }
142 
143 string CNTV2Card::GetDescription (void) const
144 {
145  if (!IsOpen())
146  return string();
147  if (IsRemote())
149 
150  CNTV2Card * pCard = (CNTV2Card*)(this); // Ugly: *sigh* If only most CNTV2Card member functions were 'const'
151  ostringstream oss;
152  string hostName("localhost"), snStr;
153 // AJASystemInfo sysInfo (AJA_SystemInfoMemoryUnit_Megabytes, AJA_SystemInfoSection_System);
154 // sysInfo.GetValue(AJA_SystemInfoTag_System_Name, hostName);
155  oss << pCard->GetModelName();
156  if (!pCard->GetSerialNumberString(snStr))
157  snStr.clear();
158  if (!snStr.empty())
159  oss << " '" << snStr << "'";
160  if (!hostName.empty())
161  oss << " on '" << hostName << "'";
162  oss << " at index " << DEC(GetIndexNumber());
163  return oss.str();
164 }
165 
167 {
168  static const string sDriverBuildTypes [] = {"", "b", "a", "d"};
169  UWord versions[4] = {0, 0, 0, 0};
170  ULWord versBits(0);
171  if (!GetDriverVersionComponents (versions[0], versions[1], versions[2], versions[3]))
172  return string(); // fail
173  if (!ReadRegister (kVRegDriverVersion, versBits))
174  return string(); // fail
175 
176  const string & dabr (sDriverBuildTypes[versBits >> 30]); // Bits 31:30 == build type
177  ostringstream oss;
178  oss << DEC(versions[0]) << "." << DEC(versions[1]) << "." << DEC(versions[2]);
179  if (dabr.empty())
180  oss << "." << DEC(versions[3]);
181  else
182  oss << dabr << DEC(versions[3]);
183  return oss.str();
184 
185 } // GetDriverVersionString
186 
187 
188 bool CNTV2Card::GetDriverVersionComponents (UWord & outMajor, UWord & outMinor, UWord & outPoint, UWord & outBuild)
189 {
190  outMajor = outMinor = outPoint = outBuild = 0;
191  ULWord driverVersionULWord (0);
192  if (!ReadRegister (kVRegDriverVersion, driverVersionULWord))
193  return false;
194  if (!driverVersionULWord) // If zero --- pre-15.0 driver?
195  return false;
196 
197  // The normal 15.0+ way of decoding the 32-bit driver version value:
198  outMajor = UWord(NTV2DriverVersionDecode_Major(driverVersionULWord));
199  outMinor = UWord(NTV2DriverVersionDecode_Minor(driverVersionULWord));
200  outPoint = UWord(NTV2DriverVersionDecode_Point(driverVersionULWord));
201  outBuild = UWord(NTV2DriverVersionDecode_Build(driverVersionULWord));
202  return true;
203 }
204 
205 
207 {
208  ULWord serialNum (0);
209  return ReadRegister (kRegReserved54, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
210 }
211 
212 
214 {
215  ULWord serialNum (0);
216  return ReadRegister (kRegReserved55, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
217 }
218 
220 {
221  const uint64_t lo(GetSerialNumberLow()), hi(GetSerialNumberHigh());
222  const uint64_t result((hi << 32) | lo);
223  return result;
224 }
225 
226 
227 string CNTV2Card::SerialNum64ToString (const uint64_t inSerialNumber) // Class method
228 {
229  return ::SerialNum64ToString(inSerialNumber);
230 } // SerialNum64ToString
231 
232 
233 bool CNTV2Card::GetSerialNumberString (string & outSerialNumberString)
234 {
235  ULWord spiFlashVers(0);
236  if (!GetNumericParam(kDeviceGetSPIFlashVersion, spiFlashVers))
237  return false;
238  const NTV2DeviceID deviceID(GetDeviceID());
239  bool hasLPPC = NTV2DeviceHasLPProductCode(deviceID);
240  if (hasLPPC || spiFlashVers >= 6)
241  {
242  // Newer devices use 4 regs: kRegReserved54 thru kRegReserved57
243  ULWord serialArray[] = {0,0,0,0};
244  ReadRegister(hasLPPC ? kRegReserved54 : kRegReserved56, serialArray[0]);
245  ReadRegister(hasLPPC ? kRegReserved55 : kRegReserved57, serialArray[1]);
246  ReadRegister(hasLPPC ? kRegReserved56 : kRegReserved54, serialArray[2]);
247  ReadRegister(hasLPPC ? kRegReserved57 : kRegReserved55, serialArray[3]);
248  outSerialNumberString.clear();
249  for (int serialIndex = 0; serialIndex < 4; serialIndex++)
250  if (serialArray[serialIndex] != 0xffffffff)
251  for (int i = 0; i < 4; i++)
252  {
253  const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
254  if (tempChar > 0 && tempChar != '.')
255  outSerialNumberString.push_back(tempChar);
256  }
257  }
258  else
259  { // Older devices use 2 regs: kRegReserved54 & kRegReserved55
260  outSerialNumberString = ::SerialNum64ToString(GetSerialNumber());
261  if (outSerialNumberString.empty())
262  {outSerialNumberString = "INVALID?"; return false;}
263 
264  // Prepend 5/6/7 for Io4K+/IoIP/IoX3, respectively...
265  if (deviceID == DEVICE_ID_IO4KPLUS)
266  outSerialNumberString = "5" + outSerialNumberString; // Io4K+/DNXIV: prepend "5"
267  else if (deviceID == DEVICE_ID_IOIP_2022 ||
268  deviceID == DEVICE_ID_IOIP_2110 ||
269  deviceID == DEVICE_ID_IOIP_2110_RGB12)
270  outSerialNumberString = "6" + outSerialNumberString; // IoIP: prepend "6"
271  else if (deviceID == DEVICE_ID_IOX3)
272  outSerialNumberString = "7" + outSerialNumberString; // IoX3: prepend "7"
273  }
274  return true;
275 } // GetSerialNumberString
276 
277 
278 bool CNTV2Card::IS_CHANNEL_INVALID (const NTV2Channel inChannel) const
279 {
280  if (!NTV2_IS_VALID_CHANNEL (inChannel))
281  return true;
282  return false;
283 }
284 
285 
286 bool CNTV2Card::IS_OUTPUT_SPIGOT_INVALID (const UWord inOutputSpigot)
287 {
288  if (inOutputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoOutputs)))
289  {
291  if (itms.find(ULWord(NTV2_WgtSDIMonOut1)) != itms.end() && inOutputSpigot == 4)
292  return false; // Io4K Monitor Output exception
293  return true; // Invalid
294  }
295  return false;
296 }
297 
298 
299 bool CNTV2Card::IS_INPUT_SPIGOT_INVALID (const UWord inInputSpigot)
300 {
301  if (inInputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoInputs)))
302  return true;
303  return false;
304 }
305 
306 bool CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID (const UWord inInputHDMIPort)
307 {
308  if (inInputHDMIPort >= UWord(GetNumSupported(kDeviceGetNumHDMIVideoInputs)))
309  return true;
310  return false;
311 }
312 
314 {
316  {
317  ULWord totalFrames = GetNumSupported(kDeviceGetActiveMemorySize) / 0x800000;
320  totalFrames -= 6; // Lop off 48MB for HDMI MultiViewer
321  return totalFrames;
322  }
323  return ::NTV2DeviceGetNumberFrameBuffers(_boardID); // Handle non-stacked-audio devices
324 }
325 
326 bool CNTV2Card::GetInstalledBitfileInfo (ULWord & outNumBytes, std::string & outDateStr, std::string & outTimeStr)
327 {
328  outDateStr.clear ();
329  outTimeStr.clear ();
330  outNumBytes = 0;
331 
332  if (!_boardOpened)
333  return false; // Bail if I'm not open
334 
335  BITFILE_INFO_STRUCT bitFileInfo;
336  ::memset (&bitFileInfo, 0, sizeof (bitFileInfo));
337  bitFileInfo.whichFPGA = eFPGAVideoProc;
338 
339  // Call the OS specific method...
341  return false;
342 
343  // Fill in our OS independent data structure...
344  outDateStr = reinterpret_cast <char *> (&bitFileInfo.dateStr [0]);
345  outTimeStr = reinterpret_cast <char *> (&bitFileInfo.timeStr [0]);
346  outNumBytes = bitFileInfo.numBytes;
347  return true;
348 }
349 
351 {
352  ostringstream oss;
353  // format like: "date time name"
354  oss << inBitFileInfo.dateStr << " " << inBitFileInfo.timeStr << " ";
356  oss << "DNxIV";
357  else
358  oss << ::NTV2BitfileTypeToString(NTV2BitfileType(inBitFileInfo.bitFileType), true);
359  return oss.str();
360 }
361 
362 bool CNTV2Card::IsFailSafeBitfileLoaded (bool & outIsSafeBoot)
363 {
364  outIsSafeBoot = false;
366  return false;
367  return CNTV2DriverInterface::ReadRegister(kRegCPLDVersion, outIsSafeBoot, BIT(4), 4);
368 }
369 
370 
371 bool CNTV2Card::CanWarmBootFPGA (bool & outCanWarmBoot)
372 {
373  outCanWarmBoot = false; // Definitely can't
375  return false;
376 
377  ULWord version(0);
378  if (!ReadRegister(kRegCPLDVersion, version, BIT(0)|BIT(1)))
379  return false; // Fail
380  if (version != 3)
381  outCanWarmBoot = true; // Definitely can
382  return true;
383 }
384 
385 
387 {
389  ULWord audioCtlReg (0); // The Audio Control Register tells us what's connected
390 
391  if (IsOpen () && ReadRegister (kRegAud1Control, audioCtlReg))
392  {
393  const bool bPhonyKBox (false); // For debugging
394 
395  switch (_boardID)
396  {
397  case DEVICE_ID_KONA3G:
399  case DEVICE_ID_IO4K:
400  case DEVICE_ID_KONA4:
401  case DEVICE_ID_KONA4UFC:
402  case DEVICE_ID_KONA5:
404  case DEVICE_ID_KONA5_8K:
407  case DEVICE_ID_KONA5_OE1:
409  // Do we have a K3G-Box?
410  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
411  result = NTV2_K3GBox;
412  else
413  result = NTV2_BreakoutCableBNC;
414  break;
416  // Do we have a KL-Box?
417  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
418  result = NTV2_KLBox;
419  else
420  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
421  break;
422  case DEVICE_ID_KONALHI:
423  // Do we have a KLHi-Box?
424  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
425  result = NTV2_KLHiBox;
426  else
427  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
428  break;
429  case DEVICE_ID_KONAX:
430  // Do we have a BOB?
432  result = NTV2_BreakoutBoard;
433  break;
434  default:
435  break;
436  }
437  }
438  return result;
439 }
440 
441 #if !defined(NTV2_DEPRECATE_16_3)
444  NTV2FrameGeometry inFrameGeometry,
445  NTV2Standard inStandard)
446  {
447  return ::NTV2DeviceCanDoFormat (GetDeviceID(), inFrameRate, inFrameGeometry, inStandard);
448  }
449 
451  {
452  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID()); // Revisit for 2MB granularity
453  }
454 
456  {
457  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID()); // Revisit for 2MB granularity
458  }
459 
461  {
462  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID()); // Revisit for 2MB granularity
463  }
464 
466  {
467  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
468  }
469 
471  {
472  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
473  }
474 
476  {
477  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
478  }
479 
481  {
482  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
483  }
484 
487  return itms.find(ULWord(inVideoFormat)) != itms.end();
488  }
489 
492  return itms.find(ULWord(inFBFormat)) != itms.end();
493  }
494 
496  {
498  return wgtIDs.find(inWidgetID) != wgtIDs.end();
499  }
500 
503  return itms.find(ULWord(inConversionMode)) != itms.end();
504  }
505 
508  return itms.find(ULWord(inDSKMode)) != itms.end();
509  }
510 
513  return itms.find(ULWord(inInputSource)) != itms.end();
514  }
515 #endif // !defined(NTV2_DEPRECATE_16_3)
516 
517 
519 
520 
521 bool DeviceCapabilities::CanDoWidget (const NTV2WidgetType inWgtType, const UWord index0)
522 {
524 }
525 
526 
528 
529 
530 bool SDRAMAuditor::AssessDevice (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
531 {
532  mFrameTags.clear();
533  mDeviceID = DEVICE_ID_INVALID;
534  mNumFrames = 0;
535  mIntrinsicSize = 0;
536  if (!inDevice.IsOpen())
537  return false;
538 
539  mDeviceID = inDevice.GetDeviceID();
540  const ULWord totalBytes(::NTV2DeviceGetActiveMemorySize(mDeviceID));
541  mNumFrames = UWord(totalBytes / m8MB);
542  if (totalBytes % m8MB)
543  {mNumFrames++; cerr << DEC(totalBytes % m8MB) << " leftover/spare bytes -- last frame is partial frame" << endl;}
544  for (UWord frm(0); frm < mNumFrames; frm++)
545  mFrameTags.insert(FrameTag(frm, NTV2StringSet()));
546 
547  return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
548 }
549 
550 ostream & SDRAMAuditor::RawDump (ostream & oss) const
551 {
552  for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
553  {
554  const NTV2StringSet & tags(it->second);
555  oss << DEC0N(it->first,3) << ": " << aja::join(tags, ", ") << endl;
556  }
557  return oss;
558 }
559 
561 {
562  ULWordSet result; // Coalesce all regions into this one sorted set
563  for (size_t ndx(0); ndx < inRgn1.size(); ndx++)
564  if (result.find(inRgn1.at(ndx)) == result.end())
565  result.insert(inRgn1.at(ndx));
566  for (size_t ndx(0); ndx < inRgn2.size(); ndx++)
567  if (result.find(inRgn2.at(ndx)) == result.end())
568  result.insert(inRgn2.at(ndx));
569  for (size_t ndx(0); ndx < inRgn3.size(); ndx++)
570  if (result.find(inRgn3.at(ndx)) == result.end())
571  result.insert(inRgn3.at(ndx));
572  return result;
573 }
574 
575 ostream & SDRAMAuditor::DumpBlocks (ostream & oss) const
576 {
577  ULWordSequence badBlks, freeBlks, goodBlks;
578  GetRegions (freeBlks, goodBlks, badBlks);
579  ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks)); // Coalesce all regions into this one sorted set
580 
581  for (ULWordSetConstIter it(rgns.begin()); it != rgns.end(); ++it)
582  {
583  const ULWord rgnInfo(*it);
584  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
585  NTV2StringSet tags;
586  GetTagsForFrameIndex (startBlk, tags);
587  if (numBlks > 1)
588  oss << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " : ";
589  else
590  oss << "Frm " << DEC0N(startBlk,3) << " : ";
591  if (tags.empty())
592  oss << "{free}";
593  else
594  oss << aja::join(tags, ", ");
595  oss << endl;
596  }
597  return oss;
598 }
599 
600 bool SDRAMAuditor::GetRegions (ULWordSequence & outFree, ULWordSequence & outUsed, ULWordSequence & outBad) const
601 {
602  outFree.clear(); outUsed.clear(); outBad.clear();
603  FrameTagsConstIter it(mFrameTags.begin());
604  if (it == mFrameTags.end())
605  return true;
606  UWord frmStart(it->first), lastFrm(frmStart);
607  NTV2StringSet runTags(it->second);
608  while (++it != mFrameTags.end())
609  {
610  const NTV2StringSet & tags(it->second);
611  if (tags != runTags)
612  { // End of current run, start of new run
613  if (runTags.empty())
614  {
615  if (frmStart != lastFrm)
616  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
617  else
618  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
619  }
620  else if (runTags.size() > 1)
621  {
622  if (frmStart != lastFrm)
623  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
624  else
625  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
626  }
627  else
628  {
629  if (frmStart != lastFrm)
630  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
631  else
632  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
633  }
634  frmStart = lastFrm = it->first;
635  runTags = tags;
636  }
637  else
638  lastFrm = it->first; // Continue current run
639  }
640  if (runTags.empty())
641  {
642  if (frmStart != lastFrm)
643  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
644  else
645  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
646  }
647  else if (runTags.size() > 1)
648  {
649  if (frmStart != lastFrm)
650  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
651  else
652  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
653  }
654  else
655  {
656  if (frmStart != lastFrm)
657  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
658  else
659  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
660  }
661  return true;
662 }
663 
664 bool SDRAMAuditor::GetTagsForFrameIndex (const UWord inIndex, NTV2StringSet & outTags) const
665 {
666  outTags.clear();
667  FrameTagsConstIter it(mFrameTags.find(inIndex));
668  if (it == mFrameTags.end())
669  return false;
670  outTags = it->second;
671  return true;
672 }
673 
674 size_t SDRAMAuditor::GetTagCount (const UWord inIndex) const
675 {
676  FrameTagsConstIter it(mFrameTags.find(inIndex));
677  if (it == mFrameTags.end())
678  return 0;
679  return it->second.size();
680 }
681 
682 bool SDRAMAuditor::TranslateRegions (ULWordSequence & outDestRgns, const ULWordSequence & inSrcRgns, const bool inIsQuad, const bool inIsQuadQuad) const
683 {
684  outDestRgns.clear();
685  if (inIsQuad && inIsQuadQuad)
686  return false; // Can't be both
687  if (inSrcRgns.empty())
688  return true; // Empty list, not an error
689  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
690  if (!_8MB_frames_per_dest_frame)
691  return false; // Ordinarily won't happen, but possible with "ntv2:" (fake/software) "devices" having small SDRAM complement
692  if (_8MB_frames_per_dest_frame == 1)
693  {outDestRgns = inSrcRgns; return true;} // Same
694 
695  // For each region...
696  for (size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
697  { const ULWord val(inSrcRgns.at(ndx));
698  ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF); // <== These are in 8MB block units
699  startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
700  lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
701  outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
702  }
703  return true;
704 }
705 
706 bool SDRAMAuditor::TagAudioBuffers (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
707 {
708  ULWord addr(0);
709  bool isReading(false), isWriting(false);
710  const UWord numAudSystems(UWord(inDevice.GetNumSupported(kDeviceGetNumBufferedAudioSystems)));
711  for (NTV2AudioSystem audSys(NTV2_AUDIOSYSTEM_1); audSys < NTV2AudioSystem(numAudSystems); audSys = NTV2AudioSystem(audSys+1))
712  if (inDevice.GetAudioMemoryOffset (0, addr, audSys))
713  { ostringstream tag;
714  tag << "Aud" << DEC(audSys+1);
715  if (inDevice.IsAudioOutputRunning(audSys, isReading) && isReading)
716  tag << " Read";
717  if (inDevice.IsAudioInputRunning(audSys, isWriting) && isWriting)
718  tag << " Write";
719  TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ? string() : tag.str());
720  }
721  return true;
722 }
723 
725 {
726  const UWord numChannels (UWord(inDevice.GetNumSupported(kDeviceGetNumVideoChannels)) + (inDevice.HasMultiRasterWidget() ? 1 : 0));
727  NTV2ChannelSet skipChannels;
728  for (NTV2Channel chan(NTV2_CHANNEL1); chan < NTV2Channel(numChannels); chan = NTV2Channel(chan+1))
729  {
730  AUTOCIRCULATE_STATUS acStatus;
731  bool isEnabled(false), isMultiFormat(false), isQuad(false), isQuadQuad(false), isSquares(false), isTSI(false);
732  ostringstream tag;
733  uint64_t addr(0), len(0);
734  if (skipChannels.find(chan) != skipChannels.end())
735  continue; // Skip this channel/framestore
736  if (inDevice.AutoCirculateGetStatus (chan, acStatus) && !acStatus.IsStopped())
737  {
738  uint64_t tmp(0);
739  inDevice.GetDeviceFrameInfo(acStatus.GetStartFrame(), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, tmp);
740  inDevice.GetDeviceFrameInfo(acStatus.GetEndFrame(), chan, tmp, len);
741  tag << "AC" << DEC(chan+1) << (acStatus.IsInput() ? " Write" : " Read");
742  TagMemoryBlock(addr, tmp + len - addr, tag.str());
743  } // if GetStatus succeeded
744  else if (inDevice.IsChannelEnabled(chan, isEnabled) && isEnabled)
745  {
747  inDevice.GetMode(chan, mode);
748  ULWord frameNum(0);
749  if (NTV2_IS_INPUT_MODE(mode))
750  inDevice.GetInputFrame(chan, frameNum);
751  else
752  inDevice.GetOutputFrame(chan, frameNum);
753  inDevice.GetDeviceFrameInfo (UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
754  if (inDevice.IsMultiRasterWidgetChannel(chan))
755  tag << "MR" << DEC(chan+1); // MultiRaster Viewer
756  else
757  tag << "Ch" << DEC(chan+1);
758  tag << (NTV2_IS_INPUT_MODE(mode) ? " Write" : " Read");
759  TagMemoryBlock(addr, len, tag.str());
760  }
761  if (isSquares && chan == NTV2_CHANNEL1)
762  {skipChannels.insert(NTV2_CHANNEL2); skipChannels.insert(NTV2_CHANNEL3); skipChannels.insert(NTV2_CHANNEL4);}
763  else if (isSquares && chan == NTV2_CHANNEL5)
764  {skipChannels.insert(NTV2_CHANNEL6); skipChannels.insert(NTV2_CHANNEL7); skipChannels.insert(NTV2_CHANNEL8);}
765  else if (isQuad && !isQuadQuad && isTSI)
766  {
767  if (chan == NTV2_CHANNEL1)
768  skipChannels.insert(NTV2_CHANNEL2);
769  else if (chan == NTV2_CHANNEL3)
770  skipChannels.insert(NTV2_CHANNEL4);
771  else if (chan == NTV2_CHANNEL5)
772  skipChannels.insert(NTV2_CHANNEL6);
773  else if (chan == NTV2_CHANNEL7)
774  skipChannels.insert(NTV2_CHANNEL8);
775  }
776  } // for each device channel
777  if (!mIntrinsicSize)
778  {
780  inDevice.GetFrameBufferSize(NTV2_CHANNEL1, frmsz);
781  mIntrinsicSize = ::NTV2FramesizeToByteCount(frmsz);
782  }
783  return true;
784 }
785 
786 bool SDRAMAuditor::TagMemoryBlock (const ULWord inStartAddr, const ULWord inByteLength, const string & inTag)
787 {
788  if (inStartAddr % m8MB)
789  return false;
790  if (inByteLength % m8MB)
791  return false;
792  if (inTag.empty())
793  return false;
794  const UWord startFrm(UWord(inStartAddr / m8MB)), frmCnt(UWord(inByteLength / m8MB));
795  for (UWord frm(0); frm < frmCnt; frm++)
796  {
797  UWord frameNum(startFrm + frm);
798  NTV2StringSet & tags(mFrameTags[frameNum]);
799  if (tags.find(inTag) == tags.end())
800  {
801  tags.insert(inTag);
802  if (frameNum >= mNumFrames)
803  tags.insert("Invalid");
804  }
805  }
806  return true;
807 }
CNTV2Card::DeviceGetAudioFrameBuffer
virtual ULWord DeviceGetAudioFrameBuffer(void)
Definition: ntv2card.cpp:455
kDeviceGetNumVideoInputs
@ kDeviceGetNumVideoInputs
The number of SDI video inputs on the device.
Definition: ntv2devicefeatures.h:210
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:1066
kNTV2PluginRegInfoKey_ShortName
#define kNTV2PluginRegInfoKey_ShortName
Plugin short name.
Definition: ntv2nubaccess.h:63
SDRAMAuditor::TagMemoryBlock
bool TagMemoryBlock(const ULWord inStartAddr, const ULWord inByteLength, const std::string &inTag)
kDeviceCanDoStackedAudio
@ kDeviceCanDoStackedAudio
True if device uses a "stacked" arrangement of its audio buffers.
Definition: ntv2devicefeatures.h:85
CNTV2Card::SetFrameBufferSize
virtual bool SetFrameBufferSize(const NTV2Framesize inSize)
Sets the device's intrinsic frame buffer size.
Definition: ntv2register.cpp:1738
BITFILE_INFO_STRUCT::whichFPGA
NTV2XilinxFPGA whichFPGA
Definition: ntv2publicinterface.h:4875
CNTV2Card::GetSerialNumberHigh
virtual ULWord GetSerialNumberHigh(void)
Definition: ntv2card.cpp:213
NTV2_CHANNEL8
@ NTV2_CHANNEL8
Specifies channel or FrameStore 8 (or the 8th item).
Definition: ntv2enums.h:1352
NTV2_CHANNEL2
@ NTV2_CHANNEL2
Specifies channel or FrameStore 2 (or the 2nd item).
Definition: ntv2enums.h:1346
NTV2_WgtSDIMonOut1
@ NTV2_WgtSDIMonOut1
Definition: ntv2enums.h:2957
kDeviceGetSPIFlashVersion
@ kDeviceGetSPIFlashVersion
The SPI-flash version on the device. (New in SDK 17.1)
Definition: ntv2devicefeatures.h:221
kNTV2EnumsID_VideoFormat
@ kNTV2EnumsID_VideoFormat
Identifies the NTV2VideoFormat enumerated type.
Definition: ntv2devicefeatures.h:242
NTV2_VideoProcBitFile
@ NTV2_VideoProcBitFile
Definition: ntv2enums.h:3324
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:389
SDRAMAuditor::TagAudioBuffers
bool TagAudioBuffers(CNTV2Card &inDevice, const bool inMarkStoppedAudioBuffersFree)
Definition: ntv2card.cpp:706
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1146
NTV2DeviceGetNumberFrameBuffers
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:496
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 widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1343
CNTV2DriverInterface::_boardOpened
bool _boardOpened
True if I'm open and connected to the device.
Definition: ntv2driverinterface.h:682
NTV2Buffer
Describes a user-space buffer on the host computer. I have an address and a length,...
Definition: ntv2publicinterface.h:6094
CNTV2Card::IS_CHANNEL_INVALID
virtual bool IS_CHANNEL_INVALID(const NTV2Channel inChannel) const
Definition: ntv2card.cpp:278
aja::join
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
NTV2WidgetType
NTV2WidgetType
Definition: ntv2enums.h:3021
DEVICE_ID_KONA5
@ DEVICE_ID_KONA5
See KONA 5.
Definition: ntv2enums.h:48
CNTV2Card::IsBreakoutBoardConnected
virtual bool IsBreakoutBoardConnected(void)
Definition: ntv2register.cpp:4718
NTV2_KLBox
@ NTV2_KLBox
Definition: ntv2enums.h:3082
NTV2DeviceGetFrameBufferSize
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:325
CNTV2Card::GetDeviceVersion
virtual Word GetDeviceVersion(void)
Answers with this device's version number.
Definition: ntv2card.cpp:65
DEVICE_ID_IOX3
@ DEVICE_ID_IOX3
See Io X3.
Definition: ntv2enums.h:41
NTV2DeviceGetActiveMemorySize
ULWord NTV2DeviceGetActiveMemorySize(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:8812
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:664
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3867
NTV2_BreakoutCableBNC
@ NTV2_BreakoutCableBNC
Identifies the AES/EBU audio breakout cable that has BNC connectors.
Definition: ntv2enums.h:3080
CNTV2Card::GetFrameBufferSize
virtual bool GetFrameBufferSize(const NTV2Channel inChannel, NTV2Framesize &outValue)
Answers with the frame size currently being used on the device.
Definition: ntv2register.cpp:2034
BITFILE_INFO_STRUCT::timeStr
char timeStr[(16)]
Definition: ntv2publicinterface.h:4869
DEVICE_ID_KONA5_8KMK
@ DEVICE_ID_KONA5_8KMK
See KONA 5.
Definition: ntv2enums.h:49
CNTV2DriverInterface::_ulNumFrameBuffers
ULWord _ulNumFrameBuffers
Definition: ntv2driverinterface.h:703
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:4872
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5649
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:2218
kDeviceGetNumVideoOutputs
@ kDeviceGetNumVideoOutputs
The number of SDI video outputs on the device.
Definition: ntv2devicefeatures.h:211
CNTV2Card::DeviceCanDoConversionMode
virtual bool DeviceCanDoConversionMode(const NTV2ConversionMode inCM)
Definition: ntv2card.cpp:501
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:210
CNTV2Card::GetInstalledBitfileInfo
virtual bool GetInstalledBitfileInfo(ULWord &outNumBytes, std::string &outDateStr, std::string &outTimeStr)
Returns the bitfile size and time/date stamp from the header of the bitfile that's currently installe...
Definition: ntv2card.cpp:326
kDeviceCanDo12gRouting
@ kDeviceCanDo12gRouting
True if device supports 12G routing crosspoints.
Definition: ntv2devicefeatures.h:116
CNTV2Card::DeviceCanDoFrameBufferFormat
virtual bool DeviceCanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2card.cpp:490
CNTV2DriverInterface::_ulFrameBufferSize
ULWord _ulFrameBufferSize
Definition: ntv2driverinterface.h:704
CNTV2Card::SerialNum64ToString
static std::string SerialNum64ToString(const uint64_t inSerialNumber)
Returns a string containing the decoded, human-readable device serial number.
Definition: ntv2card.cpp:227
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or FrameStore 1 (or the first item).
Definition: ntv2enums.h:1345
ntv2debug.h
CNTV2Card::DeviceCanDoFormat
virtual bool DeviceCanDoFormat(const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2card.cpp:443
NTV2_BreakoutNone
@ NTV2_BreakoutNone
No identifiable breakout hardware appears to be attached.
Definition: ntv2enums.h:3078
CNTV2Card::DeviceCanDoWidget
virtual bool DeviceCanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2card.cpp:495
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:1875
kDeviceCanDoWarmBootFPGA
@ kDeviceCanDoWarmBootFPGA
True if device can warm-boot to load updated firmware.
Definition: ntv2devicefeatures.h:130
NTV2_K3GBox
@ NTV2_K3GBox
Definition: ntv2enums.h:3086
CNTV2DriverInterface::_boardID
NTV2DeviceID _boardID
My cached device ID.
Definition: ntv2driverinterface.h:681
kRegReserved57
@ kRegReserved57
Definition: ntv2publicinterface.h:160
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:403
NTV2FramesizeToByteCount
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
Definition: ntv2utils.cpp:5352
NTV2_CHANNEL6
@ NTV2_CHANNEL6
Specifies channel or FrameStore 6 (or the 6th item).
Definition: ntv2enums.h:1350
kDeviceGetNumBufferedAudioSystems
@ kDeviceGetNumBufferedAudioSystems
The total number of audio systems on the device that can read/write audio buffer memory....
Definition: ntv2devicefeatures.h:219
CNTV2Card::GetDeviceVersionString
virtual std::string GetDeviceVersionString(void)
Answers with this device's version number as a human-readable string.
Definition: ntv2card.cpp:72
NTV2_CHANNEL4
@ NTV2_CHANNEL4
Specifies channel or FrameStore 4 (or the 4th item).
Definition: ntv2enums.h:1348
ULWordSetConstIter
ULWordSet::const_iterator ULWordSetConstIter
Definition: ntv2publicinterface.h:55
CNTV2DriverInterface::IsSupported
virtual bool IsSupported(const NTV2BoolParamID inParamID)
Definition: ntv2driverinterface.h:424
NTV2DriverVersionDecode_Point
#define NTV2DriverVersionDecode_Point(__vers__)
Definition: ntv2publicinterface.h:5436
NTV2_CHANNEL5
@ NTV2_CHANNEL5
Specifies channel or FrameStore 5 (or the 5th item).
Definition: ntv2enums.h:1349
CNTV2Card::GetModelName
virtual std::string GetModelName(void)
Answers with this device's model name.
Definition: ntv2card.cpp:80
AUTOCIRCULATE_STATUS::IsInput
bool IsInput(void) const
Definition: ntv2publicinterface.h:7494
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:433
isEnabled
static bool isEnabled(CNTV2Card &device, const NTV2Channel inChannel)
Definition: ntv2supportlogger.cpp:143
CNTV2Card::IS_INPUT_SPIGOT_INVALID
virtual bool IS_INPUT_SPIGOT_INVALID(const UWord inInputSpigot)
Definition: ntv2card.cpp:299
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:350
NTV2_KLHiBox
@ NTV2_KLHiBox
Definition: ntv2enums.h:3084
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:1157
CNTV2Card::GetDisplayName
virtual std::string GetDisplayName(void)
Answers with this device's display name.
Definition: ntv2card.cpp:86
kRegReserved54
@ kRegReserved54
Definition: ntv2publicinterface.h:157
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:575
BITFILE_INFO_STRUCT::dateStr
char dateStr[(16)]
Definition: ntv2publicinterface.h:4868
NTV2XilinxFPGA
NTV2XilinxFPGA
Definition: ntv2enums.h:3816
kDeviceGetNumAudioSystems
@ kDeviceGetNumAudioSystems
The number of independent Audio Systems on the device.
Definition: ntv2devicefeatures.h:191
kRegReserved56
@ kRegReserved56
Definition: ntv2publicinterface.h:159
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:2200
CNTV2Card::IS_OUTPUT_SPIGOT_INVALID
virtual bool IS_OUTPUT_SPIGOT_INVALID(const UWord inOutputSpigot)
Definition: ntv2card.cpp:286
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:156
ULWordSet
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:54
CNTV2Card::GetPCIFPGAVersionString
virtual std::string GetPCIFPGAVersionString(void)
Definition: ntv2card.cpp:135
DEVICE_ID_KONA5_8K
@ DEVICE_ID_KONA5_8K
See KONA 5.
Definition: ntv2enums.h:50
DEVICE_ID_KONA3G
@ DEVICE_ID_KONA3G
See KONA 3G (UFC Mode).
Definition: ntv2enums.h:44
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
NTV2DriverVersionDecode_Major
#define NTV2DriverVersionDecode_Major(__vers__)
Definition: ntv2publicinterface.h:5434
CNTV2Card::NULL_POINTER
static NTV2Buffer NULL_POINTER
Used for default empty NTV2Buffer parameters – do not modify.
Definition: ntv2card.h:6285
kDeviceGetNumVideoChannels
@ kDeviceGetNumVideoChannels
The number of video channels supported on the device.
Definition: ntv2devicefeatures.h:181
CNTV2Card::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2card.cpp:143
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7274
CNTV2Card::DeviceCanDoInputSource
virtual bool DeviceCanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2card.cpp:511
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or FrameStore 7 (or the 7th item).
Definition: ntv2enums.h:1351
CNTV2Card::DeviceGetFrameBufferSize
virtual ULWord DeviceGetFrameBufferSize(void)
Definition: ntv2card.cpp:450
DEVICE_ID_KONAX
@ DEVICE_ID_KONAX
See KONA X™.
Definition: ntv2enums.h:78
CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID
virtual bool IS_HDMI_INPUT_SPIGOT_INVALID(const UWord inInputHDMIPort)
Definition: ntv2card.cpp:306
kNTV2EnumsID_ConversionMode
@ kNTV2EnumsID_ConversionMode
Identifies the NTV2ConversionMode enumerated type.
Definition: ntv2devicefeatures.h:251
DEVICE_ID_KONA4UFC
@ DEVICE_ID_KONA4UFC
See KONA 4 (UFC Mode).
Definition: ntv2enums.h:47
CNTV2Card::DeviceGetNumberFrameBuffers
virtual ULWord DeviceGetNumberFrameBuffers(void)
Definition: ntv2card.cpp:313
NTV2Mode
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
Definition: ntv2enums.h:1230
SDRAMAuditor::RawDump
std::ostream & RawDump(std::ostream &oss) const
Dumps a human-readable list of regions into the given stream.
Definition: ntv2card.cpp:550
NTV2DeviceIDToString
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4678
ntv2card.h
Declares the CNTV2Card class.
NTV2_BITFILE_IO4KPLUS_MAIN
@ NTV2_BITFILE_IO4KPLUS_MAIN
Definition: ntv2enums.h:3369
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:375
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:362
CNTV2Card::HasMultiRasterWidget
virtual bool HasMultiRasterWidget(void)
Definition: ntv2card.h:6566
SDRAMAuditor::GetTagCount
size_t GetTagCount(const UWord inIndex) const
Definition: ntv2card.cpp:674
CNTV2Card::GetSerialNumberString
virtual bool GetSerialNumberString(std::string &outSerialNumberString)
Answers with a string that contains my human-readable serial number.
Definition: ntv2card.cpp:233
NTV2DeviceGetAudioFrameBuffer2
ULWord NTV2DeviceGetAudioFrameBuffer2(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
Definition: ntv2devicefeatures.cpp:659
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or FrameStore 3 (or the 3rd item).
Definition: ntv2enums.h:1347
UWord
uint16_t UWord
Definition: ajatypes.h:253
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:219
kNTV2EnumsID_InputSource
@ kNTV2EnumsID_InputSource
Identifies the NTV2InputSource enumerated type.
Definition: ntv2devicefeatures.h:244
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2Framesize
NTV2Framesize
Kona2/Xena2 specific enums.
Definition: ntv2enums.h:2102
Word
int16_t Word
Definition: ajatypes.h:252
NTV2BreakoutType
NTV2BreakoutType
Identifies the Breakout Boxes and Cables that may be attached to an AJA NTV2 device.
Definition: ntv2enums.h:3076
CNTV2DriverInterface::GetNumericParam
virtual bool GetNumericParam(const ULWord inParamID, ULWord &outValue)
Definition: ntv2driverinterface.cpp:1752
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
DEVICE_ID_KONA5_8K_MV_TX
@ DEVICE_ID_KONA5_8K_MV_TX
See KONA 5.
Definition: ntv2enums.h:51
CNTV2Card::CanWarmBootFPGA
virtual bool CanWarmBootFPGA(bool &outCanWarmBoot)
Answers whether or not the FPGA can be reloaded without powering off.
Definition: ntv2card.cpp:371
AUTOCIRCULATE_STATUS::IsStopped
bool IsStopped(void) const
Definition: ntv2publicinterface.h:7424
DEVICE_ID_KONALHEPLUS
@ DEVICE_ID_KONALHEPLUS
See KONA LHe Plus.
Definition: ntv2enums.h:75
NTV2WidgetID
NTV2WidgetID
Definition: ntv2enums.h:2895
DEVICE_ID_KONA5_OE1
@ DEVICE_ID_KONA5_OE1
See KONA 5.
Definition: ntv2enums.h:54
NTV2BitfileType
NTV2BitfileType
Definition: ntv2enums.h:3341
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:93
NTV2ChannelSet
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Definition: ntv2publicinterface.h:3869
AUTOCIRCULATE_STATUS::GetEndFrame
uint16_t GetEndFrame(void) const
Definition: ntv2publicinterface.h:7399
kNTV2EnumsID_WidgetID
@ kNTV2EnumsID_WidgetID
Identifies the NTV2AudioWidgetID enumerated type.
Definition: ntv2devicefeatures.h:250
CNTV2SignalRouter::WidgetIDFromTypeAndChannel
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
Definition: ntv2signalrouter.cpp:551
CNTV2DriverInterface::GetNumSupported
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
Definition: ntv2driverinterface.h:435
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:1625
NTV2_BreakoutCableXLR
@ NTV2_BreakoutCableXLR
Identifies the AES/EBU audio breakout cable that has XLR connectors.
Definition: ntv2enums.h:3079
NTV2DSKMode
NTV2DSKMode
Definition: ntv2enums.h:3469
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:199
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1357
CNTV2Card::GetDriverVersionString
virtual std::string GetDriverVersionString(void)
Answers with this device's driver's version as a human-readable string.
Definition: ntv2card.cpp:166
CNTV2Card::GetBreakoutHardware
virtual NTV2BreakoutType GetBreakoutHardware(void)
Definition: ntv2card.cpp:386
BITFILE_INFO_STRUCT::numBytes
ULWord numBytes
Definition: ntv2publicinterface.h:4867
SDRAMAuditor::AssessDevice
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=(0))
Assesses the given device.
Definition: ntv2card.cpp:530
kDeviceGetNumHDMIVideoInputs
@ kDeviceGetNumHDMIVideoInputs
The number of HDMI video inputs on the device.
Definition: ntv2devicefeatures.h:201
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1253
DEVICE_ID_IOIP_2110
@ DEVICE_ID_IOIP_2110
See Io IP.
Definition: ntv2enums.h:39
kRegStatus
@ kRegStatus
Definition: ntv2publicinterface.h:124
DEVICE_ID_KONA5_3DLUT
@ DEVICE_ID_KONA5_3DLUT
See KONA 5.
Definition: ntv2enums.h:53
CNTV2Card::DeviceCanDoVideoFormat
virtual bool DeviceCanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2card.cpp:485
CNTV2Card::GetFrameGeometry
virtual bool GetFrameGeometry(NTV2FrameGeometry &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2register.cpp:970
kRegCPLDVersion
@ kRegCPLDVersion
Definition: ntv2publicinterface.h:166
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:600
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:682
kRegAud1Control
@ kRegAud1Control
Definition: ntv2publicinterface.h:127
kNTV2EnumsID_DSKMode
@ kNTV2EnumsID_DSKMode
Identifies the NTV2DSKMode enumerated type.
Definition: ntv2devicefeatures.h:252
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5647
common.h
Private include file for all ajabase sources.
CNTV2Card::~CNTV2Card
virtual ~CNTV2Card()
My destructor.
Definition: ntv2card.cpp:57
NTV2DriverVersionDecode_Minor
#define NTV2DriverVersionDecode_Minor(__vers__)
Definition: ntv2publicinterface.h:5435
kK2RegMaskKBoxDetect
@ kK2RegMaskKBoxDetect
Definition: ntv2publicinterface.h:1320
DEVICE_ID_IO4KPLUS
@ DEVICE_ID_IO4KPLUS
See Io 4K Plus.
Definition: ntv2enums.h:35
NTV2_FRAMESIZE_8MB
@ NTV2_FRAMESIZE_8MB
Definition: ntv2enums.h:2106
CNTV2Card::DeviceCanDoDSKMode
virtual bool DeviceCanDoDSKMode(const NTV2DSKMode inDSKM)
Definition: ntv2card.cpp:506
std
Definition: json.hpp:5362
NTV2DeviceCanDoFormat
bool NTV2DeviceCanDoFormat(const NTV2DeviceID inDevID, const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2utils.cpp:4062
ULWordSequence
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:46
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:7394
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
kDeviceHasMicrophoneInput
@ kDeviceHasMicrophoneInput
True if device has a microphone input connector.
Definition: ntv2devicefeatures.h:142
SDRAMAuditor::TagVideoFrames
bool TagVideoFrames(CNTV2Card &inDevice)
Definition: ntv2card.cpp:724
CNTV2DriverInterface::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2driverinterface.cpp:1164
NTV2FrameGeometry
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:339
CNTV2Card::IsChannelEnabled
virtual bool IsChannelEnabled(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the given FrameStore is enabled.
Definition: ntv2register.cpp:2122
NTV2ConversionMode
NTV2ConversionMode
Definition: ntv2enums.h:3684
DeviceCapabilities::CanDoWidget
bool CanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2devicecapabilities.h:263
CNTV2DriverInterface::GetFrameBufferSize
virtual ULWord GetFrameBufferSize(void) const
Definition: ntv2driverinterface.h:386
CNTV2Card::CNTV2Card
CNTV2Card()
My default constructor.
Definition: ntv2card.cpp:21
SDRAMAuditor::CoalesceRegions
static ULWordSet CoalesceRegions(const ULWordSequence &inRgn1, const ULWordSequence &inRgn2, const ULWordSequence &inRgn3)
Definition: ntv2card.cpp:560
kRegReserved55
@ kRegReserved55
Definition: ntv2publicinterface.h:158
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:411
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:188
CNTV2Card::IsMultiRasterWidgetChannel
virtual bool IsMultiRasterWidgetChannel(const NTV2Channel inChannel)
Definition: ntv2register.cpp:4713
CNTV2DriverInterface::ConnectParams
virtual NTV2Dictionary ConnectParams(void) const
Definition: ntv2driverinterface.cpp:1187
NTV2_BreakoutBoard
@ NTV2_BreakoutBoard
Definition: ntv2enums.h:3087
CNTV2Card::IsBufferSizeSetBySW
virtual bool IsBufferSizeSetBySW(void)
Definition: ntv2register.cpp:1678
CNTV2Card::GetFPGAVersionString
virtual std::string GetFPGAVersionString(const NTV2XilinxFPGA inFPGA=eFPGAVideoProc)
Definition: ntv2card.cpp:113
kDeviceGetActiveMemorySize
@ kDeviceGetActiveMemorySize
The size, in bytes, of the device's active RAM available for video and audio.
Definition: ntv2devicefeatures.h:172
NTV2_MODE_INVALID
@ NTV2_MODE_INVALID
The invalid mode.
Definition: ntv2enums.h:1236
DEVICE_ID_KONA3GQUAD
@ DEVICE_ID_KONA3GQUAD
See KONA 3G (Quad Mode).
Definition: ntv2enums.h:45
kDeviceCanReportFailSafeLoaded
@ kDeviceCanReportFailSafeLoaded
True if device can report if its "fail-safe" firmware is loaded/running.
Definition: ntv2devicefeatures.h:131
NTV2DriverVersionDecode_Build
#define NTV2DriverVersionDecode_Build(__vers__)
Definition: ntv2publicinterface.h:5437
NTV2BitfileTypeToString
std::string NTV2BitfileTypeToString(const NTV2BitfileType inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7790
NTV2_IS_INPUT_MODE
#define NTV2_IS_INPUT_MODE(__mode__)
Definition: ntv2enums.h:1240
CNTV2Card::GetSerialNumberLow
virtual ULWord GetSerialNumberLow(void)
Definition: ntv2card.cpp:206
kVRegDriverVersion
@ kVRegDriverVersion
Packed driver version – use NTV2DriverVersionEncode, NTV2DriverVersionDecode* macros to encode/decode...
Definition: ntv2virtualregisters.h:29
BIT
#define BIT(_x_)
Definition: ajatypes.h:563
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3865
DEVICE_ID_IOIP_2110_RGB12
@ DEVICE_ID_IOIP_2110_RGB12
See Io IP.
Definition: ntv2enums.h:40
DEVICE_ID_KONA5_2X4K
@ DEVICE_ID_KONA5_2X4K
See KONA 5.
Definition: ntv2enums.h:52
CNTV2DriverInterface
I'm the base class that undergirds the platform-specific derived classes (from which CNTV2Card is ult...
Definition: ntv2driverinterface.h:60
CNTV2Card::GetAudioMemoryOffset
virtual bool GetAudioMemoryOffset(const ULWord inOffsetBytes, ULWord &outAbsByteOffset, const NTV2AudioSystem inAudioSystem, const bool inCaptureBuffer=(0))
Answers with the byte offset in device SDRAM into the specified Audio System's audio buffer.
Definition: ntv2audio.cpp:1728
CNTV2DriverInterface::Open
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
Definition: ntv2driverinterface.cpp:131
DEVICE_ID_IO4K
@ DEVICE_ID_IO4K
See Io 4K (Quad Mode).
Definition: ntv2enums.h:34
eFPGAVideoProc
@ eFPGAVideoProc
Definition: ntv2enums.h:3818
CNTV2DriverInterface::DriverGetBitFileInformation
virtual bool DriverGetBitFileInformation(BITFILE_INFO_STRUCT &outBitFileInfo, const NTV2BitFileType inBitFileType=NTV2_VideoProcBitFile)
Answers with the currently-installed bitfile information.
Definition: ntv2driverinterface.cpp:627
DEVICE_ID_KONALHI
@ DEVICE_ID_KONALHI
See KONA LHi.
Definition: ntv2enums.h:76
BITFILE_INFO_STRUCT
Definition: ntv2publicinterface.h:4862
CNTV2Card::DeviceGetAudioFrameBuffer2
virtual ULWord DeviceGetAudioFrameBuffer2(void)
Definition: ntv2card.cpp:460
SerialNum64ToString
std::string SerialNum64ToString(const uint64_t &inSerNum)
Definition: ntv2utils.cpp:8166
CNTV2Card::GetPCIFPGAVersion
virtual Word GetPCIFPGAVersion(void)
Definition: ntv2card.cpp:128
CNTV2DriverInterface::Close
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call.
Definition: ntv2driverinterface.cpp:227
CNTV2DriverInterface::GetSupportedItems
virtual ULWordSet GetSupportedItems(const NTV2EnumsID inEnumsID)
Definition: ntv2driverinterface.cpp:1435
kNTV2EnumsID_PixelFormat
@ kNTV2EnumsID_PixelFormat
Identifies the NTV2PixelFormat enumerated type.
Definition: ntv2devicefeatures.h:238
NTV2DeviceHasLPProductCode
bool NTV2DeviceHasLPProductCode(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:7253
kNTV2PluginRegInfoKey_LongName
#define kNTV2PluginRegInfoKey_LongName
Plugin long name.
Definition: ntv2nubaccess.h:64
NTV2DeviceGetAudioFrameBuffer
ULWord NTV2DeviceGetAudioFrameBuffer(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
Definition: ntv2devicefeatures.cpp:653