AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
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 !defined(NTV2_DEPRECATE_17_2)
37  if (IsBufferSizeSetBySW())
38  {
39  NTV2Framesize fbSize;
41  SetFrameBufferSize (fbSize);
42  }
43  else
44  {
46  NTV2FrameBufferFormat format;
47 
48  GetFrameGeometry (fg);
50 
53  }
54 #endif
55  }
56 }
57 
58 // Destructor
60 {
61  if (IsOpen ())
62  Close ();
63 
64 } // destructor
65 
66 
68 {
69  ULWord status (0);
70  return ReadRegister (kRegStatus, status) ? (status & 0xF) : -1;
71 }
72 
73 
75 {
76  ostringstream oss;
78  return oss.str();
79 }
80 
81 
83 {
86 }
87 
89 {
90  ostringstream oss;
91  if (IsRemote())
92  {
93  const NTV2Dictionary params (ConnectParams());
94  string fName (params.valueForKey(kQParamVDevName)),
95  devNdx (params.valueForKey(kQParamVDevIndex)),
96  model (GetModelName());
97  if (model == "Software" || model == "AJA Device" || model == "(Not Found)" || model == "Unknown" || model == "???")
98  model = fName.empty() ? params.valueForKey(kNTV2PluginRegInfoKey_ShortName) : fName;
99  if (devNdx.empty())
100  {ostringstream tmp; tmp << GetIndexNumber(); devNdx = tmp.str();}
101  oss << model << " - " << devNdx;
102  }
103  else
104  oss << GetModelName() << " - " << GetIndexNumber();
105  return oss.str();
106 }
107 
108 
110 {
111  ULWord numBytes (0);
112  string dateStr, timeStr;
113  ostringstream oss;
114 
115  if (inFPGA == eFPGAVideoProc && GetInstalledBitfileInfo (numBytes, dateStr, timeStr))
116  oss << dateStr << " at " << timeStr;
117  else
118  oss << "Unavailable";
119 
120  return oss.str ();
121 }
122 
123 
125 {
126  ULWord status (0);
127  return ReadRegister (48, status) ? ((status >> 8) & 0xFF) : -1;
128 }
129 
130 
132 {
133  const UWord version (static_cast<UWord>(GetPCIFPGAVersion()));
134  ostringstream oss;
135  oss << hex << version;
136  return oss.str ();
137 }
138 
139 string CNTV2Card::GetDescription (void) const
140 {
141  if (!IsOpen())
142  return string();
143  if (IsRemote())
145 
146  CNTV2Card * pCard = (CNTV2Card*)(this); // Ugly: *sigh* If only most CNTV2Card member functions were 'const'
147  ostringstream oss;
148  string hostName("localhost"), snStr;
150  sysInfo.GetValue(AJA_SystemInfoTag_System_Name, hostName);
151  oss << pCard->GetModelName();
152  if (!pCard->GetSerialNumberString(snStr))
153  snStr.clear();
154  if (!snStr.empty())
155  oss << " '" << snStr << "'";
156  if (!hostName.empty())
157  oss << " on '" << hostName << "'";
158  oss << " at index " << DEC(GetIndexNumber());
159  return oss.str();
160 }
161 
163 {
164  static const string sDriverBuildTypes [] = {"", "b", "a", "d"};
165  UWord versions[4] = {0, 0, 0, 0};
166  ULWord versBits(0);
167  if (!GetDriverVersionComponents (versions[0], versions[1], versions[2], versions[3]))
168  return string(); // fail
169  if (!ReadRegister (kVRegDriverVersion, versBits))
170  return string(); // fail
171 
172  const string & dabr (sDriverBuildTypes[versBits >> 30]); // Bits 31:30 == build type
173  ostringstream oss;
174  oss << DEC(versions[0]) << "." << DEC(versions[1]) << "." << DEC(versions[2]);
175  if (dabr.empty())
176  oss << "." << DEC(versions[3]);
177  else
178  oss << dabr << DEC(versions[3]);
179  return oss.str();
180 
181 } // GetDriverVersionString
182 
183 
184 bool CNTV2Card::GetDriverVersionComponents (UWord & outMajor, UWord & outMinor, UWord & outPoint, UWord & outBuild)
185 {
186  outMajor = outMinor = outPoint = outBuild = 0;
187  ULWord driverVersionULWord (0);
188  if (!ReadRegister (kVRegDriverVersion, driverVersionULWord))
189  return false;
190  if (!driverVersionULWord) // If zero --- pre-15.0 driver?
191  return false;
192 
193  // The normal 15.0+ way of decoding the 32-bit driver version value:
194  outMajor = UWord(NTV2DriverVersionDecode_Major(driverVersionULWord));
195  outMinor = UWord(NTV2DriverVersionDecode_Minor(driverVersionULWord));
196  outPoint = UWord(NTV2DriverVersionDecode_Point(driverVersionULWord));
197  outBuild = UWord(NTV2DriverVersionDecode_Build(driverVersionULWord));
198  return true;
199 }
200 
201 
203 {
204  ULWord serialNum (0);
205  return ReadRegister (kRegReserved54, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
206 }
207 
208 
210 {
211  ULWord serialNum (0);
212  return ReadRegister (kRegReserved55, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
213 }
214 
216 {
217  const uint64_t lo(GetSerialNumberLow()), hi(GetSerialNumberHigh());
218  const uint64_t result((hi << 32) | lo);
219  return result;
220 }
221 
222 
223 string CNTV2Card::SerialNum64ToString (const uint64_t inSerialNumber) // Class method
224 {
225  return ::SerialNum64ToString(inSerialNumber);
226 } // SerialNum64ToString
227 
228 
229 bool CNTV2Card::GetSerialNumberString (string & outSerialNumberString)
230 {
231  ULWord spiFlashVers(0);
232  if (!GetNumericParam(kDeviceGetSPIFlashVersion, spiFlashVers))
233  return false;
234  const NTV2DeviceID deviceID(GetDeviceID());
235  bool hasLPPC = NTV2DeviceHasLPProductCode(deviceID);
236  if (hasLPPC || spiFlashVers >= 6)
237  {
238  // Newer devices use 4 regs: kRegReserved54 thru kRegReserved57
239  ULWord serialArray[] = {0,0,0,0};
240  ReadRegister(hasLPPC ? kRegReserved54 : kRegReserved56, serialArray[0]);
241  ReadRegister(hasLPPC ? kRegReserved55 : kRegReserved57, serialArray[1]);
242  ReadRegister(hasLPPC ? kRegReserved56 : kRegReserved54, serialArray[2]);
243  ReadRegister(hasLPPC ? kRegReserved57 : kRegReserved55, serialArray[3]);
244  outSerialNumberString.clear();
245  for (int serialIndex = 0; serialIndex < 4; serialIndex++)
246  if (serialArray[serialIndex] != 0xffffffff)
247  for (int i = 0; i < 4; i++)
248  {
249  const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
250  if (tempChar > 0 && tempChar != '.')
251  outSerialNumberString.push_back(tempChar);
252  }
253  }
254  else
255  { // Older devices use 2 regs: kRegReserved54 & kRegReserved55
256  outSerialNumberString = ::SerialNum64ToString(GetSerialNumber());
257  if (outSerialNumberString.empty())
258  {outSerialNumberString = "INVALID?"; return false;}
259 
260  // Prepend 5/6/7 for Io4K+/IoIP/IoX3, respectively...
261  if (deviceID == DEVICE_ID_IO4KPLUS)
262  outSerialNumberString = "5" + outSerialNumberString; // Io4K+/DNXIV: prepend "5"
263  else if (deviceID == DEVICE_ID_IOIP_2022 ||
264  deviceID == DEVICE_ID_IOIP_2110 ||
265  deviceID == DEVICE_ID_IOIP_2110_RGB12)
266  outSerialNumberString = "6" + outSerialNumberString; // IoIP: prepend "6"
267  else if (deviceID == DEVICE_ID_IOX3)
268  outSerialNumberString = "7" + outSerialNumberString; // IoX3: prepend "7"
269  }
270  return true;
271 } // GetSerialNumberString
272 
273 
274 bool CNTV2Card::IS_CHANNEL_INVALID (const NTV2Channel inChannel) const
275 {
276  if (!NTV2_IS_VALID_CHANNEL (inChannel))
277  return true;
278  return false;
279 }
280 
281 
282 bool CNTV2Card::IS_OUTPUT_SPIGOT_INVALID (const UWord inOutputSpigot)
283 {
284  if (inOutputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoOutputs)))
285  {
287  if (itms.find(ULWord(NTV2_WgtSDIMonOut1)) != itms.end() && inOutputSpigot == 4)
288  return false; // Io4K Monitor Output exception
289  return true; // Invalid
290  }
291  return false;
292 }
293 
294 
295 bool CNTV2Card::IS_INPUT_SPIGOT_INVALID (const UWord inInputSpigot)
296 {
297  if (inInputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoInputs)))
298  return true;
299  return false;
300 }
301 
302 bool CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID (const UWord inInputHDMIPort)
303 {
304  if (inInputHDMIPort >= UWord(GetNumSupported(kDeviceGetNumHDMIVideoInputs)))
305  return true;
306  return false;
307 }
308 
310 {
312  {
313  ULWord totalFrames = GetNumSupported(kDeviceGetActiveMemorySize) / 0x800000;
316  totalFrames -= 6; // Lop off 48MB for HDMI MultiViewer
317  return totalFrames;
318  }
319  return ::NTV2DeviceGetNumberFrameBuffers(_boardID); // Handle non-stacked-audio devices
320 }
321 
322 bool CNTV2Card::GetInstalledBitfileInfo (ULWord & outNumBytes, std::string & outDateStr, std::string & outTimeStr)
323 {
324  outDateStr.clear ();
325  outTimeStr.clear ();
326  outNumBytes = 0;
327 
328  if (!_boardOpened)
329  return false; // Bail if I'm not open
330 
331  BITFILE_INFO_STRUCT bitFileInfo;
332  ::memset (&bitFileInfo, 0, sizeof (bitFileInfo));
333  bitFileInfo.whichFPGA = eFPGAVideoProc;
334 
335  // Call the OS specific method...
337  return false;
338 
339  // Fill in our OS independent data structure...
340  outDateStr = reinterpret_cast <char *> (&bitFileInfo.dateStr [0]);
341  outTimeStr = reinterpret_cast <char *> (&bitFileInfo.timeStr [0]);
342  outNumBytes = bitFileInfo.numBytes;
343  return true;
344 }
345 
347 {
348  ostringstream oss;
349  // format like: "date time name"
350  oss << inBitFileInfo.dateStr << " " << inBitFileInfo.timeStr << " ";
352  oss << "DNxIV";
353  else
354  oss << ::NTV2BitfileTypeToString(NTV2BitfileType(inBitFileInfo.bitFileType), true);
355  return oss.str();
356 }
357 
358 bool CNTV2Card::IsFailSafeBitfileLoaded (bool & outIsSafeBoot)
359 {
360  outIsSafeBoot = false;
362  return false;
363  return CNTV2DriverInterface::ReadRegister(kRegCPLDVersion, outIsSafeBoot, BIT(4), 4);
364 }
365 
366 
367 bool CNTV2Card::CanWarmBootFPGA (bool & outCanWarmBoot)
368 {
369  outCanWarmBoot = false; // Definitely can't
371  return false;
372 
373  ULWord version(0);
374  if (!ReadRegister(kRegCPLDVersion, version, BIT(0)|BIT(1)))
375  return false; // Fail
376  if (version != 3)
377  outCanWarmBoot = true; // Definitely can
378  return true;
379 }
380 
381 
383 {
385  ULWord audioCtlReg (0); // The Audio Control Register tells us what's connected
386 
387  if (IsOpen () && ReadRegister (kRegAud1Control, audioCtlReg))
388  {
389  const bool bPhonyKBox (false); // For debugging
390 
391  switch (_boardID)
392  {
393  case DEVICE_ID_KONA3G:
395  case DEVICE_ID_IO4K:
396  case DEVICE_ID_KONA4:
397  case DEVICE_ID_KONA4UFC:
398  case DEVICE_ID_KONA5:
400  case DEVICE_ID_KONA5_8K:
403  case DEVICE_ID_KONA5_OE1:
405  // Do we have a K3G-Box?
406  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
407  result = NTV2_K3GBox;
408  else
409  result = NTV2_BreakoutCableBNC;
410  break;
412  // Do we have a KL-Box?
413  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
414  result = NTV2_KLBox;
415  else
416  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
417  break;
418  case DEVICE_ID_KONALHI:
419  // Do we have a KLHi-Box?
420  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
421  result = NTV2_KLHiBox;
422  else
423  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
424  break;
425  case DEVICE_ID_KONAX:
426  case DEVICE_ID_KONAX_4CH:
427  // Do we have a BOB?
429  result = NTV2_BreakoutBoard;
430  break;
431  default:
432  break;
433  }
434  }
435  return result;
436 }
437 
439 {
441  return false;
442  uint32_t portIP(0);
443  int ipOctet(0);
444  ostringstream tempString;
445  ReadRegister(kRegLPRJ45IP, portIP);
446  if (portIP == 0)
447  return false;
448 
449  outURLString.clear();
450  tempString << "http://";
451  ipOctet = (portIP & 0xFF000000) >> 24;
452  tempString << ipOctet << ".";
453  ipOctet = (portIP & 0x00FF0000) >> 16;
454  tempString << ipOctet << ".";
455  ipOctet = (portIP & 0x0000FF00) >> 8;
456  tempString << ipOctet << ".";
457  ipOctet = (portIP & 0x000000FF);
458  tempString << ipOctet;
459 
460  outURLString = tempString.str();
461  return true;
462 }
463 
465 {
467  return false;
468  uint32_t portIP(0);
469  int ipOctet(0);
470  ostringstream tempString;
471  ReadRegister(kRegLPTunnelIP, portIP);
472  if (portIP == 0)
473  return false;
474 
475  outURLString.clear();
476  tempString << "http://";
477  ipOctet = (portIP & 0xFF000000) >> 24;
478  tempString << ipOctet << ".";
479  ipOctet = (portIP & 0x00FF0000) >> 16;
480  tempString << ipOctet << ".";
481  ipOctet = (portIP & 0x0000FF00) >> 8;
482  tempString << ipOctet << ".";
483  ipOctet = (portIP & 0x000000FF);
484  tempString << ipOctet;
485 
486  outURLString = tempString.str();
487  return true;
488 }
489 
490 int CNTV2Card::GetSFPConfigurationURLStrings(std::vector<std::string> & OutSFPURLStrings)
491 {
493  return 0;
494 
496 
497  for (int i = 0; i < numSFPs; i++)
498  {
499  uint32_t portIP(0);
500  int ipOctet(0);
501  ostringstream tempString;
502  ReadRegister(kRegLPSFP1IP+i, portIP);
503  if (portIP == 0)
504  return false;
505 
506  tempString << "http://";
507  ipOctet = (portIP & 0xFF000000) >> 24;
508  tempString << ipOctet << ".";
509  ipOctet = (portIP & 0x00FF0000) >> 16;
510  tempString << ipOctet << ".";
511  ipOctet = (portIP & 0x0000FF00) >> 8;
512  tempString << ipOctet << ".";
513  ipOctet = (portIP & 0x000000FF);
514  tempString << ipOctet;
515 
516  OutSFPURLStrings.push_back(tempString.str());
517  }
518  return int(OutSFPURLStrings.size());
519 }
520 
521 #if !defined(NTV2_DEPRECATE_16_3)
524  NTV2FrameGeometry inFrameGeometry,
525  NTV2Standard inStandard)
526  {
527  return ::NTV2DeviceCanDoFormat (GetDeviceID(), inFrameRate, inFrameGeometry, inStandard);
528  }
529 
531  {
532  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID()); // Revisit for 2MB granularity
533  }
534 
536  {
537  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID()); // Revisit for 2MB granularity
538  }
539 
541  {
542  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID()); // Revisit for 2MB granularity
543  }
544 
546  {
547  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
548  }
549 
551  {
552  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
553  }
554 
556  {
557  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
558  }
559 
561  {
562  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
563  }
564 
567  return itms.find(ULWord(inVideoFormat)) != itms.end();
568  }
569 
572  return itms.find(ULWord(inFBFormat)) != itms.end();
573  }
574 
576  {
578  return wgtIDs.find(inWidgetID) != wgtIDs.end();
579  }
580 
583  return itms.find(ULWord(inConversionMode)) != itms.end();
584  }
585 
588  return itms.find(ULWord(inDSKMode)) != itms.end();
589  }
590 
593  return itms.find(ULWord(inInputSource)) != itms.end();
594  }
595 #endif // !defined(NTV2_DEPRECATE_16_3)
596 
597 
599 
600 
601 bool DeviceCapabilities::CanDoWidget (const NTV2WidgetType inWgtType, const UWord index0)
602 {
603  return CanDoWidget(CNTV2SignalRouter::WidgetIDFromTypeAndChannel(inWgtType, NTV2Channel(index0)));
604 }
605 
606 
608 
609 
610 bool SDRAMAuditor::AssessDevice (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
611 {
612  mFrameTags.clear();
613  mDeviceID = DEVICE_ID_INVALID;
614  mNumFrames = 0;
615  mIntrinsicSize = 0;
616  if (!inDevice.IsOpen())
617  return false;
618 
619  mDeviceID = inDevice.GetDeviceID();
620  const ULWord totalBytes(::NTV2DeviceGetActiveMemorySize(mDeviceID));
621  mNumFrames = UWord(totalBytes / m8MB);
622  if (totalBytes % m8MB)
623  {mNumFrames++; cerr << DEC(totalBytes % m8MB) << " leftover/spare bytes -- last frame is partial frame" << endl;}
624  for (UWord frm(0); frm < mNumFrames; frm++)
625  mFrameTags.insert(FrameTag(frm, NTV2StringSet()));
626 
627  return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
628 }
629 
630 ostream & SDRAMAuditor::RawDump (ostream & oss) const
631 {
632  for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
633  {
634  const NTV2StringSet & tags(it->second);
635  oss << DEC0N(it->first,3) << ": " << aja::join(tags, ", ") << endl;
636  }
637  return oss;
638 }
639 
641 {
642  ULWordSet result; // Coalesce all regions into this one sorted set
643  for (size_t ndx(0); ndx < inRgn1.size(); ndx++)
644  if (result.find(inRgn1.at(ndx)) == result.end())
645  result.insert(inRgn1.at(ndx));
646  for (size_t ndx(0); ndx < inRgn2.size(); ndx++)
647  if (result.find(inRgn2.at(ndx)) == result.end())
648  result.insert(inRgn2.at(ndx));
649  for (size_t ndx(0); ndx < inRgn3.size(); ndx++)
650  if (result.find(inRgn3.at(ndx)) == result.end())
651  result.insert(inRgn3.at(ndx));
652  return result;
653 }
654 
655 ostream & SDRAMAuditor::DumpBlocks (ostream & oss) const
656 {
657  ULWordSequence badBlks, freeBlks, goodBlks;
658  GetRegions (freeBlks, goodBlks, badBlks);
659  ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks)); // Coalesce all regions into this one sorted set
660 
661  for (ULWordSetConstIter it(rgns.begin()); it != rgns.end(); ++it)
662  {
663  const ULWord rgnInfo(*it);
664  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
665  NTV2StringSet tags;
666  GetTagsForFrameIndex (startBlk, tags);
667  if (numBlks > 1)
668  oss << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " : ";
669  else
670  oss << "Frm " << DEC0N(startBlk,3) << " : ";
671  if (tags.empty())
672  oss << "{free}";
673  else
674  oss << aja::join(tags, ", ");
675  oss << endl;
676  }
677  return oss;
678 }
679 
680 bool SDRAMAuditor::GetRegions (ULWordSequence & outFree, ULWordSequence & outUsed, ULWordSequence & outBad) const
681 {
682  outFree.clear(); outUsed.clear(); outBad.clear();
683  FrameTagsConstIter it(mFrameTags.begin());
684  if (it == mFrameTags.end())
685  return true;
686  UWord frmStart(it->first), lastFrm(frmStart);
687  NTV2StringSet runTags(it->second);
688  while (++it != mFrameTags.end())
689  {
690  const NTV2StringSet & tags(it->second);
691  if (tags != runTags)
692  { // End of current run, start of new run
693  if (runTags.empty())
694  {
695  if (frmStart != lastFrm)
696  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
697  else
698  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
699  }
700  else if (runTags.size() > 1)
701  {
702  if (frmStart != lastFrm)
703  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
704  else
705  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
706  }
707  else
708  {
709  if (frmStart != lastFrm)
710  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
711  else
712  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
713  }
714  frmStart = lastFrm = it->first;
715  runTags = tags;
716  }
717  else
718  lastFrm = it->first; // Continue current run
719  }
720  if (runTags.empty())
721  {
722  if (frmStart != lastFrm)
723  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
724  else
725  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
726  }
727  else if (runTags.size() > 1)
728  {
729  if (frmStart != lastFrm)
730  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
731  else
732  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
733  }
734  else
735  {
736  if (frmStart != lastFrm)
737  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
738  else
739  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
740  }
741  return true;
742 }
743 
744 bool SDRAMAuditor::GetTagsForFrameIndex (const UWord inIndex, NTV2StringSet & outTags) const
745 {
746  outTags.clear();
747  FrameTagsConstIter it(mFrameTags.find(inIndex));
748  if (it == mFrameTags.end())
749  return false;
750  outTags = it->second;
751  return true;
752 }
753 
754 size_t SDRAMAuditor::GetTagCount (const UWord inIndex) const
755 {
756  FrameTagsConstIter it(mFrameTags.find(inIndex));
757  if (it == mFrameTags.end())
758  return 0;
759  return it->second.size();
760 }
761 
762 bool SDRAMAuditor::TranslateRegions (ULWordSequence & outDestRgns, const ULWordSequence & inSrcRgns, const bool inIsQuad, const bool inIsQuadQuad) const
763 {
764  outDestRgns.clear();
765  if (inIsQuad && inIsQuadQuad)
766  return false; // Can't be both
767  if (inSrcRgns.empty())
768  return true; // Empty list, not an error
769  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
770  if (!_8MB_frames_per_dest_frame)
771  return false; // Ordinarily won't happen, but possible with "ntv2:" (fake/software) "devices" having small SDRAM complement
772  if (_8MB_frames_per_dest_frame == 1)
773  {outDestRgns = inSrcRgns; return true;} // Same
774 
775  // For each region...
776  for (size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
777  { const ULWord val(inSrcRgns.at(ndx));
778  ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF); // <== These are in 8MB block units
779  startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
780  lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
781  outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
782  }
783  return true;
784 }
785 
786 bool SDRAMAuditor::TagAudioBuffers (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
787 {
788  ULWord addr(0);
789  bool isReading(false), isWriting(false);
790  const UWord numAudSystems(UWord(inDevice.GetNumSupported(kDeviceGetNumBufferedAudioSystems)));
791  for (NTV2AudioSystem audSys(NTV2_AUDIOSYSTEM_1); audSys < NTV2AudioSystem(numAudSystems); audSys = NTV2AudioSystem(audSys+1))
792  if (inDevice.GetAudioMemoryOffset (0, addr, audSys))
793  { ostringstream tag;
794  tag << "Aud" << DEC(audSys+1);
795  if (inDevice.IsAudioOutputRunning(audSys, isReading) && isReading)
796  tag << " Read";
797  if (inDevice.IsAudioInputRunning(audSys, isWriting) && isWriting)
798  tag << " Write";
799  TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ? string() : tag.str());
800  }
801  return true;
802 }
803 
805 {
806  const UWord numChannels (UWord(inDevice.GetNumSupported(kDeviceGetNumVideoChannels)) + (inDevice.HasMultiRasterWidget() ? 1 : 0));
807  NTV2ChannelSet skipChannels;
808  for (NTV2Channel chan(NTV2_CHANNEL1); chan < NTV2Channel(numChannels); chan = NTV2Channel(chan+1))
809  {
810  AUTOCIRCULATE_STATUS acStatus;
811  bool isEnabled(false), isMultiFormat(false), isQuad(false), isQuadQuad(false), isSquares(false), isTSI(false);
812  ostringstream tag;
813  uint64_t addr(0), len(0);
814  if (skipChannels.find(chan) != skipChannels.end())
815  continue; // Skip this channel/framestore
816  if (inDevice.AutoCirculateGetStatus (chan, acStatus) && !acStatus.IsStopped())
817  {
818  uint64_t tmp(0);
819  inDevice.GetDeviceFrameInfo(acStatus.GetStartFrame(), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, tmp);
820  inDevice.GetDeviceFrameInfo(acStatus.GetEndFrame(), chan, tmp, len);
821  tag << "AC" << DEC(chan+1) << (acStatus.IsInput() ? " Write" : " Read");
822  TagMemoryBlock(addr, tmp + len - addr, tag.str());
823  } // if GetStatus succeeded
824  else if (inDevice.IsChannelEnabled(chan, isEnabled) && isEnabled)
825  {
827  inDevice.GetMode(chan, mode);
828  ULWord frameNum(0);
829  if (NTV2_IS_INPUT_MODE(mode))
830  inDevice.GetInputFrame(chan, frameNum);
831  else
832  inDevice.GetOutputFrame(chan, frameNum);
833  inDevice.GetDeviceFrameInfo (UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
834  if (inDevice.IsMultiRasterWidgetChannel(chan))
835  tag << "MR" << DEC(chan+1); // MultiRaster Viewer
836  else
837  tag << "Ch" << DEC(chan+1);
838  tag << (NTV2_IS_INPUT_MODE(mode) ? " Write" : " Read");
839  TagMemoryBlock(addr, len, tag.str());
840  }
841  if (isSquares && chan == NTV2_CHANNEL1)
842  {skipChannels.insert(NTV2_CHANNEL2); skipChannels.insert(NTV2_CHANNEL3); skipChannels.insert(NTV2_CHANNEL4);}
843  else if (isSquares && chan == NTV2_CHANNEL5)
844  {skipChannels.insert(NTV2_CHANNEL6); skipChannels.insert(NTV2_CHANNEL7); skipChannels.insert(NTV2_CHANNEL8);}
845  else if (isQuad && !isQuadQuad && isTSI)
846  {
847  if (chan == NTV2_CHANNEL1)
848  skipChannels.insert(NTV2_CHANNEL2);
849  else if (chan == NTV2_CHANNEL3)
850  skipChannels.insert(NTV2_CHANNEL4);
851  else if (chan == NTV2_CHANNEL5)
852  skipChannels.insert(NTV2_CHANNEL6);
853  else if (chan == NTV2_CHANNEL7)
854  skipChannels.insert(NTV2_CHANNEL8);
855  }
856  } // for each device channel
857  if (!mIntrinsicSize)
858  {
860  inDevice.GetFrameBufferSize(NTV2_CHANNEL1, frmsz);
861  mIntrinsicSize = ::NTV2FramesizeToByteCount(frmsz);
862  }
863  return true;
864 }
865 
866 bool SDRAMAuditor::TagMemoryBlock (const ULWord inStartAddr, const ULWord inByteLength, const string & inTag)
867 {
868  if (inStartAddr % m8MB)
869  return false;
870  if (inByteLength % m8MB)
871  return false;
872  if (inTag.empty())
873  return false;
874  const UWord startFrm(UWord(inStartAddr / m8MB)), frmCnt(UWord(inByteLength / m8MB));
875  for (UWord frm(0); frm < frmCnt; frm++)
876  {
877  UWord frameNum(startFrm + frm);
878  NTV2StringSet & tags(mFrameTags[frameNum]);
879  if (tags.find(inTag) == tags.end())
880  {
881  tags.insert(inTag);
882  if (frameNum >= mNumFrames)
883  tags.insert("Invalid");
884  }
885  }
886  return true;
887 }
UWord NTV2DeviceGetNum25GSFPs(const NTV2DeviceID inDeviceID)
virtual bool DeviceCanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2card.cpp:565
virtual bool GetNumericParam(const ULWord inParamID, ULWord &outValue)
size_t GetTagCount(const UWord inIndex) const
Definition: ntv2card.cpp:754
virtual bool SetFrameBufferSize(const NTV2Framesize inSize)
Sets the device&#39;s intrinsic frame buffer size.
virtual Word GetPCIFPGAVersion(void)
Definition: ntv2card.cpp:124
#define NTV2_IS_INPUT_MODE(__mode__)
Definition: ntv2enums.h:1249
virtual bool IsSupported(const NTV2BoolParamID inParamID)
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Definition: ntv2enums.h:3895
#define kQParamVDevIndex
Device index number for .vdev virtual device.
Definition: ntv2nubaccess.h:45
virtual bool GetLPTunnelConfigurationURLString(std::string &outURLString)
Definition: ntv2card.cpp:464
virtual bool IS_OUTPUT_SPIGOT_INVALID(const UWord inOutputSpigot)
Definition: ntv2card.cpp:282
virtual ULWord DeviceGetAudioFrameBuffer2(void)
Definition: ntv2card.cpp:540
static NTV2Buffer NULL_POINTER
Used for default empty NTV2Buffer parameters – do not modify.
Definition: ntv2card.h:6554
virtual bool DeviceCanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2card.cpp:575
#define DEC0N(__x__, __n__)
See Io IP.
Definition: ntv2enums.h:41
The number of video channels supported on the device.
virtual bool DeviceCanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2card.cpp:570
See KONA 5.
Definition: ntv2enums.h:55
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
Definition: ntv2enums.h:219
#define BIT(_x_)
Definition: ajatypes.h:578
virtual ULWord GetSerialNumberHigh(void)
Definition: ntv2card.cpp:209
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=(0))
Assesses the given device.
Definition: ntv2card.cpp:610
See KONA LHe Plus.
Definition: ntv2enums.h:77
std::string valueForKey(const std::string &inKey) const
virtual bool DeviceCanDoConversionMode(const NTV2ConversionMode inCM)
Definition: ntv2card.cpp:581
See KONA 5.
Definition: ntv2enums.h:56
ULWord NTV2DeviceGetActiveMemorySize(const NTV2DeviceID inDeviceID)
True if device can warm-boot to load updated firmware.
virtual UWord GetIndexNumber(void) const
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
The number of independent Audio Systems on the device.
bool NTV2DeviceHasLPProductCode(const NTV2DeviceID inDeviceID)
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:762
Identifies the NTV2DSKMode enumerated type.
virtual bool IsMultiRasterWidgetChannel(const NTV2Channel inChannel)
True if device can report if its "fail-safe" firmware is loaded/running.
Identifies the AES/EBU audio breakout cable that has XLR connectors.
Definition: ntv2enums.h:3106
#define kQParamVDevName
Device name, if not specified in .vdev file, then base name of .vdev file.
Definition: ntv2nubaccess.h:43
#define kNTV2PluginRegInfoKey_ShortName
Plugin short name.
Definition: ntv2nubaccess.h:75
virtual bool GetOutputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current output frame number for the given FrameStore (expressed as an NTV2Channel)...
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call...
static bool isEnabled(CNTV2Card &device, const NTV2Channel inChannel)
virtual bool IS_INPUT_SPIGOT_INVALID(const UWord inInputSpigot)
Definition: ntv2card.cpp:295
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
virtual bool DeviceCanDoFormat(const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2card.cpp:523
virtual Word GetDeviceVersion(void)
Answers with this device&#39;s version number.
Definition: ntv2card.cpp:67
Identifies the NTV2VideoFormat enumerated type.
See KONA 4 (Quad Mode).
Definition: ntv2enums.h:48
Identifies the NTV2InputSource enumerated type.
virtual bool GetFrameBufferSize(const NTV2Channel inChannel, NTV2Framesize &outValue)
Answers with the frame size currently being used on the device.
Definition: json.hpp:5362
ULWord NTV2DeviceGetAudioFrameBuffer2(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
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:1214
virtual ULWord GetFrameBufferSize(void) const
std::ostream & RawDump(std::ostream &oss) const
Dumps a human-readable list of regions into the given stream.
Definition: ntv2card.cpp:630
uint32_t ULWord
Definition: ajatypes.h:223
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They&#39;re also commonly use...
Definition: ntv2enums.h:1357
virtual NTV2Dictionary ConnectParams(void) const
See Io 4K Plus.
Definition: ntv2enums.h:37
#define NTV2DriverVersionDecode_Major(__vers__)
NTV2WidgetType
Definition: ntv2enums.h:3047
#define NTV2DriverVersionDecode_Point(__vers__)
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&#39;s currently installe...
Definition: ntv2card.cpp:322
The number of SDI video outputs on the device.
See KONA 3G (Quad Mode).
Definition: ntv2enums.h:47
ULWordSet::const_iterator ULWordSetConstIter
virtual bool IsRemote(void) const
NTV2XilinxFPGA
Definition: ntv2enums.h:3846
virtual bool HasMultiRasterWidget(void)
Definition: ntv2card.h:6802
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:412
I&#39;m the base class that undergirds the platform-specific derived classes (from which CNTV2Card is ult...
virtual std::string GetPCIFPGAVersionString(void)
Definition: ntv2card.cpp:131
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:1123
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:165
virtual std::string GetDescription(void) const
Definition: ntv2card.cpp:139
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
static ULWordSet CoalesceRegions(const ULWordSequence &inRgn1, const ULWordSequence &inRgn2, const ULWordSequence &inRgn3)
Definition: ntv2card.cpp:640
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:358
NTV2DeviceID _boardID
My cached device ID.
int16_t Word
Definition: ajatypes.h:220
static std::string SerialNum64ToString(const uint64_t inSerialNumber)
Returns a string containing the decoded, human-readable device serial number.
Definition: ntv2card.cpp:223
See Io 4K (Quad Mode).
Definition: ntv2enums.h:36
virtual bool IsOpen(void) const
The invalid mode.
Definition: ntv2enums.h:1245
See KONA LHi.
Definition: ntv2enums.h:78
bool _boardOpened
True if I&#39;m open and connected to the device.
NTV2BreakoutType
Identifies the Breakout Boxes and Cables that may be attached to an AJA NTV2 device.
Definition: ntv2enums.h:3103
#define AJA_NULL
Definition: ajatypes.h:167
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:346
True if device has attached breakout board. (New in SDK 17.0)
virtual bool GetSerialNumberString(std::string &outSerialNumberString)
Answers with a string that contains my human-readable serial number.
Definition: ntv2card.cpp:229
virtual std::string GetDisplayName(void)
Answers with this device&#39;s display name.
Definition: ntv2card.cpp:88
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...
See KONA 5.
Definition: ntv2enums.h:54
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
Definition: ntv2utils.cpp:5287
bool IsStopped(void) const
True if device uses a "stacked" arrangement of its audio buffers.
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
virtual std::string GetDriverVersionString(void)
Answers with this device&#39;s driver&#39;s version as a human-readable string.
Definition: ntv2card.cpp:162
virtual bool DeviceCanDoDSKMode(const NTV2DSKMode inDSKM)
Definition: ntv2card.cpp:586
virtual bool GetInputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current input frame index number for the given FrameStore. This identifies which par...
virtual std::string GetDeviceVersionString(void)
Answers with this device&#39;s version number as a human-readable string.
Definition: ntv2card.cpp:74
virtual bool IS_HDMI_INPUT_SPIGOT_INVALID(const UWord inInputHDMIPort)
Definition: ntv2card.cpp:302
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
virtual bool GetLPExternalConfigurationURLString(std::string &outURLString)
Definition: ntv2card.cpp:438
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:680
Specifies channel or FrameStore 8 (or the 8th item).
Definition: ntv2enums.h:1366
Specifies channel or FrameStore 2 (or the 2nd item).
Definition: ntv2enums.h:1360
virtual NTV2DeviceID GetDeviceID(void)
NTV2BitfileType
Definition: ntv2enums.h:3368
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
virtual std::string GetDescription(void) const
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...
NTV2Framesize
Kona2/Xena2 specific enums.
Definition: ntv2enums.h:2116
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1371
virtual bool DeviceCanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2card.cpp:591
See KONA 5.
Definition: ntv2enums.h:50
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
virtual bool DriverGetBitFileInformation(BITFILE_INFO_STRUCT &outBitFileInfo, const NTV2BitFileType inBitFileType=NTV2_VideoProcBitFile)
defined(NTV2_DEPRECATE_17_2)
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
Definition: ntv2enums.h:1239
uint16_t GetEndFrame(void) const
virtual std::string GetModelName(void)
Answers with this device&#39;s model name.
Definition: ntv2card.cpp:82
virtual int GetSFPConfigurationURLStrings(std::vector< std::string > &sfpURLStrings)
Definition: ntv2card.cpp:490
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1262
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4608
bool TagVideoFrames(CNTV2Card &inDevice)
Definition: ntv2card.cpp:804
std::string & strip(std::string &str, const std::string &ws)
Definition: common.cpp:461
virtual bool GetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat &outValue)
Returns the current frame buffer format for the given FrameStore on the AJA device.
#define DEC(__x__)
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:348
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
This identifies the first Audio System.
Definition: ntv2enums.h:3897
The total number of audio systems on the device that can read/write audio buffer memory. Includes host audio system, if present. (New in SDK 17.0)
virtual bool GetFrameGeometry(NTV2FrameGeometry &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Declares numerous NTV2 utility functions.
True if device supports 12G routing crosspoints.
bool TagAudioBuffers(CNTV2Card &inDevice, const bool inMarkStoppedAudioBuffersFree)
Definition: ntv2card.cpp:786
virtual uint64_t GetSerialNumber(void)
Answers with my serial number.
Definition: ntv2card.cpp:215
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
Declares the AJASystemInfo class.
virtual ULWord DeviceGetFrameBufferSize(void)
Definition: ntv2card.cpp:530
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
See Io X3.
Definition: ntv2enums.h:43
NTV2WidgetID
Definition: ntv2enums.h:2909
uint16_t UWord
Definition: ajatypes.h:221
#define NTV2DriverVersionDecode_Build(__vers__)
Specifies channel or FrameStore 1 (or the first item).
Definition: ntv2enums.h:1359
ULWord NTV2DeviceGetAudioFrameBuffer(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
See Io IP.
Definition: ntv2enums.h:40
virtual NTV2BreakoutType GetBreakoutHardware(void)
Definition: ntv2card.cpp:382
A simple (not thread-safe) set of key/value pairs. (New in SDK 16.3)
bool CanDoWidget(const NTV2WidgetID inWgtID)
virtual ULWordSet GetSupportedItems(const NTV2EnumsID inEnumsID)
Identifies the AES/EBU audio breakout cable that has BNC connectors.
Definition: ntv2enums.h:3107
NTV2DSKMode
Definition: ntv2enums.h:3499
virtual bool IsChannelEnabled(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the given FrameStore is enabled.
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:744
See KONA 5.
Definition: ntv2enums.h:51
#define NTV2DriverVersionDecode_Minor(__vers__)
The SPI-flash version on the device. (New in SDK 17.1)
virtual bool IS_CHANNEL_INVALID(const NTV2Channel inChannel) const
Definition: ntv2card.cpp:274
Declares the CNTV2Card class.
bool NTV2DeviceCanDoFormat(const NTV2DeviceID inDevID, const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2utils.cpp:4158
Specifies channel or FrameStore 4 (or the 4th item).
Definition: ntv2enums.h:1362
Specifies channel or FrameStore 5 (or the 5th item).
Definition: ntv2enums.h:1363
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Private include file for all ajabase sources.
virtual ULWord DeviceGetNumberFrameBuffers(void)
Definition: ntv2card.cpp:309
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
virtual bool CanWarmBootFPGA(bool &outCanWarmBoot)
Answers whether or not the FPGA can be reloaded without powering off.
Definition: ntv2card.cpp:367
bool TagMemoryBlock(const ULWord inStartAddr, const ULWord inByteLength, const std::string &inTag)
True if device has a microphone input connector.
std::string SerialNum64ToString(const uint64_t &inSerNum)
Definition: ntv2utils.cpp:8243
std::string NTV2BitfileTypeToString(const NTV2BitfileType inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7927
virtual AJAStatus GetValue(const AJASystemInfoTag inTag, std::string &outValue) const
Answers with the host system info value string for the given AJASystemInfoTag.
Definition: info.cpp:153
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
NTV2ConversionMode
Definition: ntv2enums.h:3714
No identifiable breakout hardware appears to be attached.
Definition: ntv2enums.h:3105
See KONA X™.
Definition: ntv2enums.h:82
virtual ULWord DeviceGetAudioFrameBuffer(void)
Definition: ntv2card.cpp:535
Identifies the NTV2PixelFormat enumerated type.
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
Definition: ntv2card.cpp:655
Specifies channel or FrameStore 6 (or the 6th item).
Definition: ntv2enums.h:1364
Identifies the NTV2ConversionMode enumerated type.
See KONA 3G (UFC Mode).
Definition: ntv2enums.h:46
virtual bool IsBufferSizeSetBySW(void)
defined(NTV2_DEPRECATE_17_2)
virtual std::string GetFPGAVersionString(const NTV2XilinxFPGA inFPGA=eFPGAVideoProc)
Definition: ntv2card.cpp:109
CNTV2Card()
My default constructor.
Definition: ntv2card.cpp:21
Specifies channel or FrameStore 7 (or the 7th item).
Definition: ntv2enums.h:1365
See KONA X™.
Definition: ntv2enums.h:80
See KONA 4 (UFC Mode).
Definition: ntv2enums.h:49
virtual ULWord GetSerialNumberLow(void)
Definition: ntv2card.cpp:202
Identifies the NTV2AudioWidgetID enumerated type.
virtual bool GetDriverVersionComponents(UWord &outMajor, UWord &outMinor, UWord &outPoint, UWord &outBuild)
Answers with the individual version components of this device&#39;s driver.
Definition: ntv2card.cpp:184
The number of SDI video inputs on the device.
uint16_t GetStartFrame(void) const
Declares device capability functions.
Packed driver version – use NTV2DriverVersionEncode, NTV2DriverVersionDecode* macros to encode/decod...
virtual ~CNTV2Card()
My destructor.
Definition: ntv2card.cpp:59
The size, in bytes, of the device&#39;s active RAM available for video and audio.
Specifies channel or FrameStore 3 (or the 3rd item).
Definition: ntv2enums.h:1361
See KONA 5.
Definition: ntv2enums.h:52
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1158
The number of HDMI video inputs on the device.
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&#39;s audio buffer...
Definition: ntv2audio.cpp:1783