AJA NTV2 SDK  18.1.0.2505
NTV2 SDK 18.1.0.2505
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  string hostName(::NTV2GetHostName()), snStr;
147  CNTV2Card * pCard = (CNTV2Card*)(this); // Ugly: *sigh* If only most CNTV2Card member functions were 'const'
148  ostringstream oss;
149  oss << pCard->GetModelName();
150  if (!pCard->GetSerialNumberString(snStr))
151  snStr.clear();
152  if (!snStr.empty())
153  oss << " '" << snStr << "'";
154  if (!hostName.empty())
155  oss << " on '" << hostName << "'";
156  oss << " at index " << DEC(GetIndexNumber());
157  return oss.str();
158 }
159 
161 {
162  static const string sDriverBuildTypes [] = {"", "b", "a", "d"};
163  UWord versions[4] = {0, 0, 0, 0};
164  ULWord versBits(0);
165  if (!GetDriverVersionComponents (versions[0], versions[1], versions[2], versions[3]))
166  return string(); // fail
167  if (!ReadRegister (kVRegDriverVersion, versBits))
168  return string(); // fail
169 
170  const string & dabr (sDriverBuildTypes[versBits >> 30]); // Bits 31:30 == build type
171  ostringstream oss;
172  oss << DEC(versions[0]) << "." << DEC(versions[1]) << "." << DEC(versions[2]);
173  if (dabr.empty())
174  oss << "." << DEC(versions[3]);
175  else
176  oss << dabr << DEC(versions[3]);
177  return oss.str();
178 
179 } // GetDriverVersionString
180 
181 
182 bool CNTV2Card::GetDriverVersionComponents (UWord & outMajor, UWord & outMinor, UWord & outPoint, UWord & outBuild)
183 {
184  outMajor = outMinor = outPoint = outBuild = 0;
185  ULWord driverVersionULWord (0);
186  if (!ReadRegister (kVRegDriverVersion, driverVersionULWord))
187  return false;
188  if (!driverVersionULWord) // If zero --- pre-15.0 driver?
189  return false;
190 
191  // The normal 15.0+ way of decoding the 32-bit driver version value:
192  outMajor = UWord(NTV2DriverVersionDecode_Major(driverVersionULWord));
193  outMinor = UWord(NTV2DriverVersionDecode_Minor(driverVersionULWord));
194  outPoint = UWord(NTV2DriverVersionDecode_Point(driverVersionULWord));
195  outBuild = UWord(NTV2DriverVersionDecode_Build(driverVersionULWord));
196  return true;
197 }
198 
199 
201 {
202  ULWord serialNum (0);
203  return ReadRegister (kRegReserved54, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
204 }
205 
206 
208 {
209  ULWord serialNum (0);
210  return ReadRegister (kRegReserved55, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
211 }
212 
214 {
215  const uint64_t lo(GetSerialNumberLow()), hi(GetSerialNumberHigh());
216  const uint64_t result((hi << 32) | lo);
217  return result;
218 }
219 
220 
221 string CNTV2Card::SerialNum64ToString (const uint64_t inSerialNumber) // Class method
222 {
223  return ::SerialNum64ToString(inSerialNumber);
224 } // SerialNum64ToString
225 
226 
227 bool CNTV2Card::GetSerialNumberString (string & outSerialNumberString)
228 {
229  ULWord spiFlashVers(0);
230  const bool hasLPPC(IsSupported(kDeviceHasLPProductCode));
231  if (hasLPPC || (GetNumericParam(kDeviceGetSPIFlashVersion, spiFlashVers) && spiFlashVers >= 6))
232  {
233  // Newer devices use 4 regs: kRegReserved54 thru kRegReserved57
234  ULWord serialArray[] = {0,0,0,0};
235  ReadRegister(hasLPPC ? kRegReserved54 : kRegReserved56, serialArray[0]);
236  ReadRegister(hasLPPC ? kRegReserved55 : kRegReserved57, serialArray[1]);
237  ReadRegister(hasLPPC ? kRegReserved56 : kRegReserved54, serialArray[2]);
238  ReadRegister(hasLPPC ? kRegReserved57 : kRegReserved55, serialArray[3]);
239  outSerialNumberString.clear();
240  for (int serialIndex = 0; serialIndex < 4; serialIndex++)
241  if (serialArray[serialIndex] != 0xffffffff)
242  for (int i = 0; i < 4; i++)
243  {
244  const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
245  if (tempChar > 0 && tempChar != '.')
246  outSerialNumberString.push_back(tempChar);
247  }
248  }
249  else
250  { // Older devices use 2 regs: kRegReserved54 & kRegReserved55
251  outSerialNumberString = ::SerialNum64ToString(GetSerialNumber());
252  if (outSerialNumberString.empty())
253  {outSerialNumberString = "INVALID?"; return false;}
254 
255  // Prepend 5/6/7 for Io4K+/IoIP/IoX3, respectively...
256  const NTV2DeviceID deviceID (GetDeviceID());
257  if (deviceID == DEVICE_ID_IO4KPLUS)
258  outSerialNumberString = "5" + outSerialNumberString; // Io4K+/DNXIV: prepend "5"
259  else if (deviceID == DEVICE_ID_IOIP_2022 ||
260  deviceID == DEVICE_ID_IOIP_2110 ||
261  deviceID == DEVICE_ID_IOIP_2110_RGB12)
262  outSerialNumberString = "6" + outSerialNumberString; // IoIP: prepend "6"
263  else if (deviceID == DEVICE_ID_IOX3)
264  outSerialNumberString = "7" + outSerialNumberString; // IoX3: prepend "7"
265  }
266  return true;
267 } // GetSerialNumberString
268 
269 
270 bool CNTV2Card::IS_CHANNEL_INVALID (const NTV2Channel inChannel) const
271 {
272  if (!NTV2_IS_VALID_CHANNEL (inChannel))
273  return true;
274  return false;
275 }
276 
277 
278 bool CNTV2Card::IS_OUTPUT_SPIGOT_INVALID (const UWord inOutputSpigot)
279 {
280  if (inOutputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoOutputs)))
281  {
283  if (itms.find(ULWord(NTV2_WgtSDIMonOut1)) != itms.end() && inOutputSpigot == 4)
284  return false; // Io4K Monitor Output exception
285  return true; // Invalid
286  }
287  return false;
288 }
289 
290 
291 bool CNTV2Card::IS_INPUT_SPIGOT_INVALID (const UWord inInputSpigot)
292 {
293  if (inInputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoInputs)))
294  return true;
295  return false;
296 }
297 
298 bool CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID (const UWord inInputHDMIPort)
299 {
300  if (inInputHDMIPort >= UWord(GetNumSupported(kDeviceGetNumHDMIVideoInputs)))
301  return true;
302  return false;
303 }
304 
306 {
308  {
309  ULWord totalFrames = GetNumSupported(kDeviceGetActiveMemorySize) / 0x800000;
312  totalFrames -= 6; // Lop off 48MB for HDMI MultiViewer
313  return totalFrames;
314  }
315  return ::NTV2DeviceGetNumberFrameBuffers(_boardID); // Handle non-stacked-audio devices
316 }
317 
318 bool CNTV2Card::GetInstalledBitfileInfo (ULWord & outNumBytes, std::string & outDateStr, std::string & outTimeStr)
319 {
320  outDateStr.clear ();
321  outTimeStr.clear ();
322  outNumBytes = 0;
323 
324  if (!_boardOpened)
325  return false; // Bail if I'm not open
326 
327  BITFILE_INFO_STRUCT bitFileInfo;
328  ::memset (&bitFileInfo, 0, sizeof (bitFileInfo));
329  bitFileInfo.whichFPGA = eFPGAVideoProc;
330 
331  // Call the OS specific method...
333  return false;
334 
335  // Fill in our OS independent data structure...
336  outDateStr = reinterpret_cast <char *> (&bitFileInfo.dateStr [0]);
337  outTimeStr = reinterpret_cast <char *> (&bitFileInfo.timeStr [0]);
338  outNumBytes = bitFileInfo.numBytes;
339  return true;
340 }
341 
343 {
344  ostringstream oss;
345  // format like: "date time name"
346  oss << inBitFileInfo.dateStr << " " << inBitFileInfo.timeStr << " ";
348  oss << "DNxIV";
349  else
350  oss << ::NTV2BitfileTypeToString(NTV2BitfileType(inBitFileInfo.bitFileType), true);
351  return oss.str();
352 }
353 
354 bool CNTV2Card::IsFailSafeBitfileLoaded (bool & outIsSafeBoot)
355 {
356  outIsSafeBoot = false;
358  return false;
359  return CNTV2DriverInterface::ReadRegister(kRegCPLDVersion, outIsSafeBoot, BIT(4), 4);
360 }
361 
362 
363 bool CNTV2Card::CanWarmBootFPGA (bool & outCanWarmBoot)
364 {
365  outCanWarmBoot = false; // Definitely can't
367  return false;
368 
369  ULWord version(0);
370  if (!ReadRegister(kRegCPLDVersion, version, BIT(0)|BIT(1)))
371  return false; // Fail
372  if (version != 3)
373  outCanWarmBoot = true; // Definitely can
374  return true;
375 }
376 
377 
379 {
381  ULWord audioCtlReg (0); // The Audio Control Register tells us what's connected
382 
383  if (IsOpen () && ReadRegister (kRegAud1Control, audioCtlReg))
384  {
385  const bool bPhonyKBox (false); // For debugging
386 
387  switch (_boardID)
388  {
389  case DEVICE_ID_KONA3G:
391  case DEVICE_ID_IO4K:
392  case DEVICE_ID_KONA4:
393  case DEVICE_ID_KONA4UFC:
394  case DEVICE_ID_KONA5:
396  case DEVICE_ID_KONA5_8K:
399  case DEVICE_ID_KONA5_OE1:
401  // Do we have a K3G-Box?
402  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
403  result = NTV2_K3GBox;
404  else
405  result = NTV2_BreakoutCableBNC;
406  break;
408  // Do we have a KL-Box?
409  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
410  result = NTV2_KLBox;
411  else
412  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
413  break;
414  case DEVICE_ID_KONALHI:
415  // Do we have a KLHi-Box?
416  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
417  result = NTV2_KLHiBox;
418  else
419  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
420  break;
421  case DEVICE_ID_KONAX:
422  case DEVICE_ID_KONAX_4CH:
423  // Do we have a BOB?
425  result = NTV2_BreakoutBoard;
426  break;
427  default:
428  break;
429  }
430  }
431  return result;
432 }
433 
435 {
437  return false;
438  uint32_t portIP(0);
439  int ipOctet(0);
440  ostringstream tempString;
441  ReadRegister(kRegLPRJ45IP, portIP);
442  if (portIP == 0)
443  return false;
444 
445  outURLString.clear();
446  tempString << "http://";
447  ipOctet = (portIP & 0xFF000000) >> 24;
448  tempString << ipOctet << ".";
449  ipOctet = (portIP & 0x00FF0000) >> 16;
450  tempString << ipOctet << ".";
451  ipOctet = (portIP & 0x0000FF00) >> 8;
452  tempString << ipOctet << ".";
453  ipOctet = (portIP & 0x000000FF);
454  tempString << ipOctet;
455 
456  outURLString = tempString.str();
457  return true;
458 }
459 
461 {
463  return false;
464  uint32_t portIP(0);
465  int ipOctet(0);
466  ostringstream tempString;
467  ReadRegister(kRegLPTunnelIP, portIP);
468  if (portIP == 0)
469  return false;
470 
471  outURLString.clear();
472  tempString << "http://";
473  ipOctet = (portIP & 0xFF000000) >> 24;
474  tempString << ipOctet << ".";
475  ipOctet = (portIP & 0x00FF0000) >> 16;
476  tempString << ipOctet << ".";
477  ipOctet = (portIP & 0x0000FF00) >> 8;
478  tempString << ipOctet << ".";
479  ipOctet = (portIP & 0x000000FF);
480  tempString << ipOctet;
481 
482  outURLString = tempString.str();
483  return true;
484 }
485 
486 int CNTV2Card::GetSFPConfigurationURLStrings(std::vector<std::string> & OutSFPURLStrings)
487 {
489  if (!IsSupported(kDeviceHasLPProductCode) || numSFPs == 0)
490  return 0;
491 
492  for (ULWord ndx(0); ndx < numSFPs; ndx++)
493  {
494  uint32_t portIP(0);
495  int ipOctet(0);
496  ostringstream tempString;
497  ReadRegister(kRegLPSFP1IP + ndx, portIP);
498  if (portIP == 0)
499  return false;
500 
501  tempString << "http://";
502  ipOctet = (portIP & 0xFF000000) >> 24;
503  tempString << ipOctet << ".";
504  ipOctet = (portIP & 0x00FF0000) >> 16;
505  tempString << ipOctet << ".";
506  ipOctet = (portIP & 0x0000FF00) >> 8;
507  tempString << ipOctet << ".";
508  ipOctet = (portIP & 0x000000FF);
509  tempString << ipOctet;
510 
511  OutSFPURLStrings.push_back(tempString.str());
512  }
513  return int(OutSFPURLStrings.size());
514 }
515 
516 #if !defined(NTV2_DEPRECATE_16_3)
519  NTV2FrameGeometry inFrameGeometry,
520  NTV2Standard inStandard)
521  {
522  return ::NTV2DeviceCanDoFormat (GetDeviceID(), inFrameRate, inFrameGeometry, inStandard);
523  }
524 
526  {
527  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID()); // Revisit for 2MB granularity
528  }
529 
531  {
532  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID()); // Revisit for 2MB granularity
533  }
534 
536  {
537  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID()); // Revisit for 2MB granularity
538  }
539 
541  {
542  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
543  }
544 
546  {
547  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
548  }
549 
551  {
552  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
553  }
554 
556  {
557  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
558  }
559 
562  return itms.find(ULWord(inVideoFormat)) != itms.end();
563  }
564 
567  return itms.find(ULWord(inFBFormat)) != itms.end();
568  }
569 
571  {
573  return wgtIDs.find(inWidgetID) != wgtIDs.end();
574  }
575 
578  return itms.find(ULWord(inConversionMode)) != itms.end();
579  }
580 
583  return itms.find(ULWord(inDSKMode)) != itms.end();
584  }
585 
588  return itms.find(ULWord(inInputSource)) != itms.end();
589  }
590 #endif // !defined(NTV2_DEPRECATE_16_3)
591 
592 
594 
595 
597 
598 
599 bool DeviceCapabilities::CanDoWidget (const NTV2WidgetType inWgtType, const UWord index0)
600 {
601  return CanDoWidget(CNTV2SignalRouter::WidgetIDFromTypeAndChannel(inWgtType, NTV2Channel(index0)));
602 }
603 
604 
605 #define _TO_STR(_x_) #_x_
606 
607 AJALock DeviceCapabilities::sInitLock;
608 NTV2StringList DeviceCapabilities::sBoolParamIDStrs, DeviceCapabilities::sNumParamIDStrs, DeviceCapabilities::sEnumsIDStrs; // STATIC
609 
611 {
612  AJAAutoLock tmp(&sInitLock);
613  if (sBoolParamIDStrs.empty())
614  {
615  sBoolParamIDStrs.reserve(size_t(kNTV2BoolParam_COUNT));
616  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanChangeEmbeddedAudioClock));
617  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanChangeFrameBufferSize));
618  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDisableUFC));
619  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo2KVideo));
620  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo3GLevelConversion));
621  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoRGBLevelAConversion));
622  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo425Mux));
623  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo4KVideo));
624  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAESAudioIn));
625  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAnalogAudio));
626  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAnalogVideoIn));
627  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAnalogVideoOut));
628  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio2Channels));
629  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio6Channels));
630  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio8Channels));
631  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio96K));
632  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudioDelay));
633  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoBreakoutBox));
634  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoCapture));
635  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoColorCorrection));
636  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoCustomAnc));
637  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoDSKOpacity));
638  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoDualLink));
639  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoDVCProHD));
640  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoEnhancedCSC));
641  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoFrameStore1Display));
642  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoFreezeOutput));
643  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIOutStereo));
644  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDV));
645  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDVideo));
646  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoIsoConvert));
647  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoLTC));
648  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoLTCInOnRefPort));
649  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoMSI));
650  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoMultiFormat));
651  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoPCMControl));
652  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoPCMDetection));
653  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoPIO));
654  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoPlayback));
655  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoProgrammableCSC));
656  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoProgrammableRS422));
657  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoProRes));
658  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoQREZ));
659  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoQuarterExpand));
660  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoRateConvert));
661  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoRGBPlusAlphaOut));
662  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoRP188));
663  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoSDVideo));
664  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoSDIErrorChecks));
665  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoStackedAudio));
666  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoStereoIn));
667  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoStereoOut));
668  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoThunderbolt));
669  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoVideoProcessing));
670  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanMeasureTemperature));
671  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanReportFrameSize));
672  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasBiDirectionalSDI));
673  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasColorSpaceConverterOnChannel2));
674  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasNWL));
675  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasPCIeGen2));
676  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasRetailSupport));
677  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSDIRelays));
678  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIFlash));
679  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIFlashSerial));
680  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIv2));
681  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIv3));
682  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIv4));
683  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIs64Bit));
684  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIsDirectAddressable));
685  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIsExternalToHost));
686  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIsLocalPhysical));
687  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIsSupported));
688  sBoolParamIDStrs.push_back(_TO_STR(kDeviceNeedsRoutingSetup));
689  sBoolParamIDStrs.push_back(_TO_STR(kDeviceSoftwareCanChangeFrameBufferSize));
690  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanThermostat));
691  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasHEVCM31));
692  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasHEVCM30));
693  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoVITC2));
694  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIHDROut));
695  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoJ2K));
696  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo12gRouting));
697  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo12GSDI));
698  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo2110));
699  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo8KVideo));
700  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio192K));
701  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudioMixer));
702  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIAuxCapture));
703  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIAuxPlayback));
704  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoFramePulseSelect));
705  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIMultiView));
706  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasMultiRasterWidget));
707  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHFRRGB));
708  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoIP));
709  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoMultiLinkAudio));
710  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoWarmBootFPGA));
711  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanReportFailSafeLoaded));
712  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanReportRunningFirmwareDate));
713  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasAudioMonitorRCAJacks));
714  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasBiDirectionalAnalogAudio));
715  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasGenlockv2));
716  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasGenlockv3));
717  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasHeadphoneJack));
718  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasLEDAudioMeters));
719  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasRotaryEncoder));
720  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIv5));
721  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasXilinxDMA));
722  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasMicrophoneInput));
723  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoBreakoutBoard));
724  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasBreakoutBoard));
725  sBoolParamIDStrs.push_back(_TO_STR(kDeviceAudioCanWaitForVBI));
726  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasNTV4FrameStores));
727  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasXptConnectROM));
728  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudioInput));
729  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudioOutput));
730  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAESAudioOut));
731  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasIDSwitch));
732  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIQuadRasterConversion));
733  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoCustomHancInsertion));
734  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoStreamingDMA));
735  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasPWMFanControl));
736  sBoolParamIDStrs.push_back(_TO_STR(kDeviceROMHasBankSelect));
737  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoVersalSysMon));
738  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoGPIO));
739  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasBracketLED));
740  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo25GIP));
741  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanReportMixerDelay));
742  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasLPProductCode));
743  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoP2PTransmit));
744  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoP2PReceive));
745  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoFastBitfileSwitching));
746  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoClockMonitor));
747  NTV2_ASSERT(sBoolParamIDStrs.size() == size_t(kNTV2BoolParam_COUNT));
748  for (size_t ndx(0); ndx < sBoolParamIDStrs.size(); ndx++)
749  sBoolParamIDStrs.at(ndx).erase(0, 7); // Lop off leading "kDevice"
750  } // if never initialized
751  return size_t(p) < sBoolParamIDStrs.size() ? sBoolParamIDStrs.at(size_t(p)) : "";
752 } // BoolParamIDToString
753 
755 {
756  AJAAutoLock tmp(&sInitLock);
757  if (sNumParamIDStrs.empty())
758  {
759  sNumParamIDStrs.reserve(size_t(kNTV2NumericParam_COUNT));
760  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetActiveMemorySize));
761  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetDACVersion));
762  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetDownConverterDelay));
763  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetHDMIVersion));
764  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetLUTVersion));
765  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetMaxAudioChannels));
766  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetMaxRegisterNumber));
767  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetMaxTransferCount));
768  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumDMAEngines));
769  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumVideoChannels));
770  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetPingLED));
771  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetUFCVersion));
772  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNum4kQuarterSizeConverters));
773  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAESAudioInputChannels));
774  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAESAudioOutputChannels));
775  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAnalogAudioInputChannels));
776  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAnalogAudioOutputChannels));
777  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAnalogVideoInputs));
778  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAnalogVideoOutputs));
779  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAudioSystems));
780  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumCrossConverters));
781  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumCSCs));
782  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumDownConverters));
783  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumEmbeddedAudioInputChannels));
784  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumEmbeddedAudioOutputChannels));
785  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumFrameStores));
786  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumFrameSyncs));
787  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumHDMIAudioInputChannels));
788  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumHDMIAudioOutputChannels));
789  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumHDMIVideoInputs));
790  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumHDMIVideoOutputs));
791  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumInputConverters));
792  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumLUTs));
793  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumMixers));
794  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumOutputConverters));
795  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumReferenceVideoInputs));
796  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumSerialPorts));
797  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumUpConverters));
798  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumVideoInputs));
799  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumVideoOutputs));
800  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNum2022ChannelsSFP1));
801  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNum2022ChannelsSFP2));
802  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumLTCInputs));
803  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumLTCOutputs));
804  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumMicInputs));
805  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumLUTBanks));
806  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetTotalNumAudioSystems));
807  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumBufferedAudioSystems));
808  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumTSIMuxers));
809  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetSPIFlashVersion));
810  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetGenlockVersion));
811  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNum25GSFPs));
812  NTV2_ASSERT(sNumParamIDStrs.size() == size_t(kNTV2NumericParam_COUNT));
813  for (size_t ndx(0); ndx < sNumParamIDStrs.size(); ndx++)
814  sNumParamIDStrs.at(ndx).erase(0, 7); // Lop off leading "kDevice"
815  } // if never initialized
817  return ndx < sNumParamIDStrs.size() ? sNumParamIDStrs.at(ndx) : "";
818 } // NumParamIDToString
819 
821 {
822  AJAAutoLock tmp(&sInitLock);
823  if (sEnumsIDStrs.empty())
824  {
825  sEnumsIDStrs.reserve(kNTV2EnumsID_COUNT);
826  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_DeviceID));
827  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_Standard));
828  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_PixelFormat));
829  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_FrameGeometry));
830  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_FrameRate));
831  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_ScanGeometry));
832  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_VideoFormat));
833  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_Mode));
834  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_InputSource));
835  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_OutputDest));
836  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_Channel));
837  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_RefSource));
838  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_AudioRate));
839  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_AudioSource));
840  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_WidgetID));
841  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_ConversionMode));
842  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_DSKMode));
843  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_InputTCIndex));
844  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_OutputTCIndex));
845  NTV2_ASSERT(sEnumsIDStrs.size() == size_t(kNTV2EnumsID_COUNT));
846  for (size_t ndx(0); ndx < sEnumsIDStrs.size(); ndx++)
847  sEnumsIDStrs.at(ndx).erase(0, 13); // Lop off leading "kNTV2EnumsID_"
848  } // if never initialized
849  return size_t(p) < sEnumsIDStrs.size() ? sEnumsIDStrs.at(size_t(p)) : "";
850 }
851 
852 #define InitStrToIDMap(_eid_,_t_,_max_,_fn_) m.clear(); \
853  for (n = 0; n < _max_; n++) \
854  { \
855  if (!aja::lower(st = _fn_(_t_(n), false)).empty()) \
856  m[st] = n; \
857  if (!aja::lower(st = _fn_(_t_(n), true)).empty()) \
858  m[st] = n; \
859  } \
860  sStrToIDMaps.at(_eid_) = m;
861 
862 DeviceCapabilities::GenericStrToIDMap DeviceCapabilities::sStrBoolParamIDMap, DeviceCapabilities::sStrNumParamIDMap, DeviceCapabilities::sStrEnumsIDMap; // STATIC
863 DeviceCapabilities::GenericStrToIDMaps DeviceCapabilities::sStrToIDMaps; // STATIC
864 
865 static string vidfmtstr (const NTV2VideoFormat vf, const bool b) // for NTV2VideoFormat enum strings
866 {
867  const char * pStr(::NTV2VideoFormatString(vf));
868  return b && pStr ? string(pStr) : "";
869 }
870 
871 void DeviceCapabilities::Init (void) // STATIC
872 { // One stop shop for initialization
873  AJAAutoLock tmp(&sInitLock);
874  GenericStrToIDMapCI it;
875  if (sStrBoolParamIDMap.empty())
876  {
877  BoolParamIDToString(kDeviceCanChangeEmbeddedAudioClock); // Ensure sBoolParamIDStrs initialized
878  for (size_t ndx(0); ndx < sBoolParamIDStrs.size(); ndx++)
879  {
880  string st(sBoolParamIDStrs.at(ndx));
881  aja::lower(st);
883  it = sStrBoolParamIDMap.find(st);
884  if (it == sStrBoolParamIDMap.end())
885  sStrBoolParamIDMap[st] = id;
886  st = "device" + st;
887  it = sStrBoolParamIDMap.find(st);
888  if (it == sStrBoolParamIDMap.end())
889  sStrBoolParamIDMap[st] = id;
890  st = "k" + st;
891  it = sStrBoolParamIDMap.find(st);
892  if (it == sStrBoolParamIDMap.end())
893  sStrBoolParamIDMap[st] = id;
894  }
895  sStrBoolParamIDMap["kdevicecandocustomaux"] = kDeviceCanDoHDMIAuxCapture;
896  sStrBoolParamIDMap["devicecandocustomaux"] = kDeviceCanDoHDMIAuxCapture;
897  sStrBoolParamIDMap["candocustomaux"] = kDeviceCanDoHDMIAuxCapture;
898  sStrBoolParamIDMap["kdevicecandoidswitch"] = kDeviceHasIDSwitch;
899  sStrBoolParamIDMap["devicecandoidswitch"] = kDeviceHasIDSwitch;
900  sStrBoolParamIDMap["candoidswitch"] = kDeviceHasIDSwitch;
901  }
902  if (sStrNumParamIDMap.empty())
903  {
904  NumParamIDToString(kDeviceGetActiveMemorySize); // Ensure sNumParamIDStrs initialized
905  for (size_t ndx(0); ndx < sNumParamIDStrs.size(); ndx++)
906  {
907  string st(sNumParamIDStrs.at(ndx));
908  aja::lower(st);
910  it = sStrNumParamIDMap.find(st);
911  if (it == sStrNumParamIDMap.end())
912  sStrNumParamIDMap[st] = id;
913  st = "device" + st;
914  it = sStrNumParamIDMap.find(st);
915  if (it == sStrNumParamIDMap.end())
916  sStrNumParamIDMap[st] = id;
917  st = "k" + st;
918  it = sStrNumParamIDMap.find(st);
919  if (it == sStrNumParamIDMap.end())
920  sStrNumParamIDMap[st] = id;
921  }
922  }
923  if (sStrEnumsIDMap.empty())
924  {
925  EnumsIDToString(kNTV2EnumsID_Standard); // Ensure sEnumsIDStrs initialized
926  for (size_t ndx(0); ndx < sEnumsIDStrs.size(); ndx++)
927  {
928  string st(sEnumsIDStrs.at(ndx));
929  aja::lower(st);
930  const NTV2EnumsID id (NTV2EnumsID(kNTV2EnumsID_FIRST + ndx));
931  it = sStrEnumsIDMap.find(st);
932  if (it == sStrEnumsIDMap.end())
933  sStrEnumsIDMap[st] = id;
934  st = "enumsid_" + st;
935  it = sStrEnumsIDMap.find(st);
936  if (it == sStrEnumsIDMap.end())
937  sStrEnumsIDMap[st] = id;
938  st = "ntv2" + st;
939  it = sStrEnumsIDMap.find(st);
940  if (it == sStrEnumsIDMap.end())
941  sStrEnumsIDMap[st] = id;
942  st = "k" + st;
943  it = sStrEnumsIDMap.find(st);
944  if (it == sStrEnumsIDMap.end())
945  sStrEnumsIDMap[st] = id;
946  }
947  }
948  if (sStrToIDMaps.empty())
949  {
950  string st;
951  ULWord n(0);
952  while (sStrToIDMaps.size() < kNTV2EnumsID_LAST)
953  sStrToIDMaps.push_back(GenericStrToIDMap());
954  GenericStrToIDMap m;
955 // InitStrToIDMap(kNTV2EnumsID_Device, NTV2DeviceID, ---n/a---, NTV2DeviceIDToString);
957  m["standards"] = kNTV2EnumsID_Standard;
959  m["pixelformats"] = kNTV2EnumsID_PixelFormat;
967  m["outputdestination"] = kNTV2EnumsID_OutputDest;
968  m["outputdestinations"] = kNTV2EnumsID_OutputDest;
974  m["widgetids"] = kNTV2EnumsID_WidgetID;
975 // InitStrToIDMap(kNTV2EnumsID_ConversionMode, NTV2ConversionMode, NTV2_NUM_CONVERSIONMODES, NTV2ConversionModeToString);
976 // InitStrToIDMap(kNTV2EnumsID_DSKMode, NTV2DSKMode, NTV2_DSKModeMax, NTV2DSKModeToString);
979  } // if uninitialized
980 } // Init
981 
983 {
984  AJAAutoLock tmp(&sInitLock);
985  if (sStrBoolParamIDMap.empty())
986  Init();
988  GenericStrToIDMapCI it (sStrBoolParamIDMap.find(s));
989  return it != sStrBoolParamIDMap.end() ? NTV2BoolParamID(it->second) : kDeviceCanDo_INVALID;
990 }
991 
993 {
994  AJAAutoLock tmp(&sInitLock);
995  if (sStrNumParamIDMap.empty())
996  Init();
998  GenericStrToIDMapCI it (sStrNumParamIDMap.find(s));
999  return it != sStrNumParamIDMap.end() ? NTV2NumericParamID(it->second) : kDeviceGetNum_INVALID;
1000 }
1001 
1003 {
1004  AJAAutoLock tmp(&sInitLock);
1005  if (sStrEnumsIDMap.empty())
1006  Init();
1007  aja::lower(aja::strip(s));
1008  GenericStrToIDMapCI it (sStrEnumsIDMap.find(s));
1009  return it != sStrEnumsIDMap.end() ? NTV2EnumsID(it->second) : kNTV2EnumsID_INVALID;
1010 }
1011 
1012 bool DeviceCapabilities::StringToSupportedEnumsIDValue (ULWord & outVal, const NTV2EnumsID id, string s) // STATIC
1013 {
1014  AJAAutoLock tmp(&sInitLock);
1015  if (sStrToIDMaps.empty())
1016  Init();
1017  if (id >= sStrToIDMaps.size())
1018  return false; // No such map or bad EnumsID
1019  GenericStrToIDMap & m (sStrToIDMaps.at(id));
1020  if (m.empty())
1021  return false; // NTV2EnumsID unsupported (e.g. Device, ConversionMode, DSKMode, etc.)
1022  GenericStrToIDMapCI iter(m.find(aja::strip(aja::lower(s))));
1023  if (iter == m.end())
1024  return false;
1025  outVal = iter->second;
1026  return true;
1027 } // StringToSupportedEnumsIDValue
1028 
1029 
1031 
1032 
1033 bool SDRAMAuditor::AssessDevice (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
1034 {
1035  mFrameTags.clear();
1036  mDeviceID = DEVICE_ID_INVALID;
1037  mNumFrames = 0;
1038  mIntrinsicSize = 0;
1039  if (!inDevice.IsOpen())
1040  return false;
1041 
1042  mDeviceID = inDevice.GetDeviceID();
1043  const ULWord totalBytes(::NTV2DeviceGetActiveMemorySize(mDeviceID));
1044  mNumFrames = UWord(totalBytes / m8MB);
1045  if (totalBytes % m8MB)
1046  {mNumFrames++; cerr << DEC(totalBytes % m8MB) << " leftover/spare bytes -- last frame is partial frame" << endl;}
1047  for (UWord frm(0); frm < mNumFrames; frm++)
1048  mFrameTags.insert(FrameTag(frm, NTV2StringSet()));
1049 
1050  return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
1051 }
1052 
1053 ostream & SDRAMAuditor::RawDump (ostream & oss) const
1054 {
1055  for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
1056  {
1057  const NTV2StringSet & tags(it->second);
1058  oss << DEC0N(it->first,3) << ": " << aja::join(tags, ", ") << endl;
1059  }
1060  return oss;
1061 }
1062 
1064 {
1065  ULWordSet result; // Coalesce all regions into this one sorted set
1066  for (size_t ndx(0); ndx < inRgn1.size(); ndx++)
1067  if (result.find(inRgn1.at(ndx)) == result.end())
1068  result.insert(inRgn1.at(ndx));
1069  for (size_t ndx(0); ndx < inRgn2.size(); ndx++)
1070  if (result.find(inRgn2.at(ndx)) == result.end())
1071  result.insert(inRgn2.at(ndx));
1072  for (size_t ndx(0); ndx < inRgn3.size(); ndx++)
1073  if (result.find(inRgn3.at(ndx)) == result.end())
1074  result.insert(inRgn3.at(ndx));
1075  return result;
1076 }
1077 
1078 ostream & SDRAMAuditor::DumpBlocks (ostream & oss) const
1079 {
1080  ULWordSequence badBlks, freeBlks, goodBlks;
1081  GetRegions (freeBlks, goodBlks, badBlks);
1082  ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks)); // Coalesce all regions into this one sorted set
1083 
1084  for (ULWordSetConstIter it(rgns.begin()); it != rgns.end(); ++it)
1085  {
1086  const ULWord rgnInfo(*it);
1087  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
1088  NTV2StringSet tags;
1089  GetTagsForFrameIndex (startBlk, tags);
1090  if (numBlks > 1)
1091  oss << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " : ";
1092  else
1093  oss << "Frm " << DEC0N(startBlk,3) << " : ";
1094  if (tags.empty())
1095  oss << "{free}";
1096  else
1097  oss << aja::join(tags, ", ");
1098  oss << endl;
1099  }
1100  return oss;
1101 }
1102 
1103 bool SDRAMAuditor::GetRegions (ULWordSequence & outFree, ULWordSequence & outUsed, ULWordSequence & outBad) const
1104 {
1105  outFree.clear(); outUsed.clear(); outBad.clear();
1106  FrameTagsConstIter it(mFrameTags.begin());
1107  if (it == mFrameTags.end())
1108  return true;
1109  UWord frmStart(it->first), lastFrm(frmStart);
1110  NTV2StringSet runTags(it->second);
1111  while (++it != mFrameTags.end())
1112  {
1113  const NTV2StringSet & tags(it->second);
1114  if (tags != runTags)
1115  { // End of current run, start of new run
1116  if (runTags.empty())
1117  {
1118  if (frmStart != lastFrm)
1119  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1120  else
1121  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
1122  }
1123  else if (runTags.size() > 1)
1124  {
1125  if (frmStart != lastFrm)
1126  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1127  else
1128  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
1129  }
1130  else
1131  {
1132  if (frmStart != lastFrm)
1133  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1134  else
1135  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
1136  }
1137  frmStart = lastFrm = it->first;
1138  runTags = tags;
1139  }
1140  else
1141  lastFrm = it->first; // Continue current run
1142  }
1143  if (runTags.empty())
1144  {
1145  if (frmStart != lastFrm)
1146  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1147  else
1148  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
1149  }
1150  else if (runTags.size() > 1)
1151  {
1152  if (frmStart != lastFrm)
1153  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1154  else
1155  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
1156  }
1157  else
1158  {
1159  if (frmStart != lastFrm)
1160  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1161  else
1162  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
1163  }
1164  return true;
1165 }
1166 
1167 bool SDRAMAuditor::GetTagsForFrameIndex (const UWord inIndex, NTV2StringSet & outTags) const
1168 {
1169  outTags.clear();
1170  FrameTagsConstIter it(mFrameTags.find(inIndex));
1171  if (it == mFrameTags.end())
1172  return false;
1173  outTags = it->second;
1174  return true;
1175 }
1176 
1177 size_t SDRAMAuditor::GetTagCount (const UWord inIndex) const
1178 {
1179  FrameTagsConstIter it(mFrameTags.find(inIndex));
1180  if (it == mFrameTags.end())
1181  return 0;
1182  return it->second.size();
1183 }
1184 
1185 bool SDRAMAuditor::TranslateRegions (ULWordSequence & outDestRgns, const ULWordSequence & inSrcRgns, const bool inIsQuad, const bool inIsQuadQuad) const
1186 {
1187  outDestRgns.clear();
1188  if (inIsQuad && inIsQuadQuad)
1189  return false; // Can't be both
1190  if (inSrcRgns.empty())
1191  return true; // Empty list, not an error
1192  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
1193  if (!_8MB_frames_per_dest_frame)
1194  return false; // Ordinarily won't happen, but possible with "ntv2:" (fake/software) "devices" having small SDRAM complement
1195  if (_8MB_frames_per_dest_frame == 1)
1196  {outDestRgns = inSrcRgns; return true;} // Same
1197 
1198  // For each region...
1199  for (size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
1200  { const ULWord val(inSrcRgns.at(ndx));
1201  ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF); // <== These are in 8MB block units
1202  startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
1203  lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
1204  outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
1205  }
1206  return true;
1207 }
1208 
1209 bool SDRAMAuditor::TagAudioBuffers (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
1210 {
1211  ULWord addr(0);
1212  bool isReading(false), isWriting(false);
1213  const UWord numAudSystems(UWord(inDevice.GetNumSupported(kDeviceGetNumBufferedAudioSystems)));
1214  for (NTV2AudioSystem audSys(NTV2_AUDIOSYSTEM_1); audSys < NTV2AudioSystem(numAudSystems); audSys = NTV2AudioSystem(audSys+1))
1215  if (inDevice.GetAudioMemoryOffset (0, addr, audSys))
1216  { ostringstream tag;
1217  tag << "Aud" << DEC(audSys+1);
1218  if (inDevice.IsAudioOutputRunning(audSys, isReading) && isReading)
1219  tag << " Read";
1220  if (inDevice.IsAudioInputRunning(audSys, isWriting) && isWriting)
1221  tag << " Write";
1222  TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ? string() : tag.str());
1223  }
1224  return true;
1225 }
1226 
1228 {
1229  const UWord numChannels (UWord(inDevice.GetNumSupported(kDeviceGetNumVideoChannels)) + (inDevice.HasMultiRasterWidget() ? 1 : 0));
1230  NTV2ChannelSet skipChannels;
1231  for (NTV2Channel chan(NTV2_CHANNEL1); chan < NTV2Channel(numChannels); chan = NTV2Channel(chan+1))
1232  {
1233  AUTOCIRCULATE_STATUS acStatus;
1234  bool isEnabled(false), isMultiFormat(false), isQuad(false), isQuadQuad(false), isSquares(false), isTSI(false);
1235  ostringstream tag;
1236  uint64_t addr(0), len(0);
1237  if (skipChannels.find(chan) != skipChannels.end())
1238  continue; // Skip this channel/framestore
1239  if (inDevice.AutoCirculateGetStatus (chan, acStatus) && !acStatus.IsStopped())
1240  {
1241  uint64_t tmp(0);
1242  inDevice.GetDeviceFrameInfo(acStatus.GetStartFrame(), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, tmp);
1243  inDevice.GetDeviceFrameInfo(acStatus.GetEndFrame(), chan, tmp, len);
1244  tag << "AC" << DEC(chan+1) << (acStatus.IsInput() ? " Write" : " Read");
1245  TagMemoryBlock(addr, tmp + len - addr, tag.str());
1246  } // if GetStatus succeeded
1247  else if (inDevice.IsChannelEnabled(chan, isEnabled) && isEnabled)
1248  {
1250  inDevice.GetMode(chan, mode);
1251  ULWord frameNum(0);
1252  if (NTV2_IS_INPUT_MODE(mode))
1253  inDevice.GetInputFrame(chan, frameNum);
1254  else
1255  inDevice.GetOutputFrame(chan, frameNum);
1256  inDevice.GetDeviceFrameInfo (UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
1257  if (inDevice.IsMultiRasterWidgetChannel(chan))
1258  tag << "MR" << DEC(chan+1); // MultiRaster Viewer
1259  else
1260  tag << "Ch" << DEC(chan+1);
1261  tag << (NTV2_IS_INPUT_MODE(mode) ? " Write" : " Read");
1262  TagMemoryBlock(addr, len, tag.str());
1263  }
1264  if (isSquares && chan == NTV2_CHANNEL1)
1265  {skipChannels.insert(NTV2_CHANNEL2); skipChannels.insert(NTV2_CHANNEL3); skipChannels.insert(NTV2_CHANNEL4);}
1266  else if (isSquares && chan == NTV2_CHANNEL5)
1267  {skipChannels.insert(NTV2_CHANNEL6); skipChannels.insert(NTV2_CHANNEL7); skipChannels.insert(NTV2_CHANNEL8);}
1268  else if (isQuad && !isQuadQuad && isTSI)
1269  {
1270  if (chan == NTV2_CHANNEL1)
1271  skipChannels.insert(NTV2_CHANNEL2);
1272  else if (chan == NTV2_CHANNEL3)
1273  skipChannels.insert(NTV2_CHANNEL4);
1274  else if (chan == NTV2_CHANNEL5)
1275  skipChannels.insert(NTV2_CHANNEL6);
1276  else if (chan == NTV2_CHANNEL7)
1277  skipChannels.insert(NTV2_CHANNEL8);
1278  }
1279  } // for each device channel
1280  if (!mIntrinsicSize)
1281  {
1283  inDevice.GetFrameBufferSize(NTV2_CHANNEL1, frmsz);
1284  mIntrinsicSize = ::NTV2FramesizeToByteCount(frmsz);
1285  }
1286  return true;
1287 }
1288 
1289 bool SDRAMAuditor::TagMemoryBlock (const ULWord inStartAddr, const ULWord inByteLength, const string & inTag)
1290 {
1291  if (inStartAddr % m8MB)
1292  return false;
1293  if (inByteLength % m8MB)
1294  return false;
1295  if (inTag.empty())
1296  return false;
1297  const UWord startFrm(UWord(inStartAddr / m8MB)), frmCnt(UWord(inByteLength / m8MB));
1298  for (UWord frm(0); frm < frmCnt; frm++)
1299  {
1300  UWord frameNum(startFrm + frm);
1301  NTV2StringSet & tags(mFrameTags[frameNum]);
1302  if (tags.find(inTag) == tags.end())
1303  {
1304  tags.insert(inTag);
1305  if (frameNum >= mNumFrames)
1306  tags.insert("Invalid");
1307  }
1308  }
1309  return true;
1310 }
virtual bool DeviceCanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2card.cpp:560
virtual bool GetNumericParam(const ULWord inParamID, ULWord &outValue)
Answers with the numeric value of the given parameter of interest.
size_t GetTagCount(const UWord inIndex) const
Definition: ntv2card.cpp:1177
virtual bool SetFrameBufferSize(const NTV2Framesize inSize)
Sets the device&#39;s intrinsic frame buffer size.
static NTV2BoolParamID StringToBoolParamID(std::string s)
Definition: ntv2card.cpp:982
The number of cross-converters on the device.
enum _NTV2NumericParamID NTV2NumericParamID
Used with CNTV2DriverInterface::GetNumericParam to determine device capabilities. ...
std::string NTV2FrameGeometryToString(const NTV2FrameGeometry inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6982
virtual Word GetPCIFPGAVersion(void)
Definition: ntv2card.cpp:124
#define NTV2_IS_INPUT_MODE(__mode__)
Definition: ntv2enums.h:1253
The number of input converter widgets on the device.
virtual bool IsSupported(const NTV2BoolParamID inParamID)
Identifies the NTV2ScanGeometry enumerated type.
The number of TSI muxers on the device. (New in SDK 17.0)
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Definition: ntv2enums.h:3901
True if device can handle 2Kx1556 (film) video.
#define kQParamVDevIndex
Device index number for .vdev virtual device.
Definition: ntv2nubaccess.h:46
virtual bool GetLPTunnelConfigurationURLString(std::string &outURLString)
Definition: ntv2card.cpp:460
True if device supports 3D video output over dual-stream SDI.
virtual bool IS_OUTPUT_SPIGOT_INVALID(const UWord inOutputSpigot)
Definition: ntv2card.cpp:278
The version number of the device&#39;s genlock hardware/firmware. (New in SDK 17.6)
The number of SDI-embedded input audio channels supported by the device.
True if device DMA hardware supports MSI (Message Signaled Interrupts).
True if device has version 3 genlock hardware and/or firmware. (Deprecate – use kDeviceGetGenlockVer...
True if device has SPI flash hardware.
std::string NTV2ModeToString(const NTV2Mode inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6497
True if audio system(s) support 2 or more audio channels.
The number of analog video outputs on the device.
virtual ULWord DeviceGetAudioFrameBuffer2(void)
Definition: ntv2card.cpp:535
std::string NTV2WidgetIDToString(const NTV2WidgetID inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6166
static NTV2Buffer NULL_POINTER
Used for default empty NTV2Buffer parameters – do not modify.
Definition: ntv2card.h:6645
True if device can do ISO conversion.
True if device has enhanced CSCs.
virtual bool DeviceCanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2card.cpp:570
The number of external reference video inputs on the device.
True if the device supports SMPTE 425 mux control.
#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:565
See KONA 5.
Definition: ntv2enums.h:55
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
The number of mixer/keyer widgets on the device.
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
Definition: ntv2enums.h:223
True if device can squeeze/stretch between 1920x1080/1280x1080 and 1280x720/960x720.
#define BIT(_x_)
Definition: ajatypes.h:496
True if device can do 3G level B to 3G level A conversion.
True if device supports an AJA breakout box.
Identifies the NTV2DeviceID enumerated type.
The number of analog LTC outputs on the device.
The number of AES/EBU audio output channels on the device.
virtual ULWord GetSerialNumberHigh(void)
Definition: ntv2card.cpp:207
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=(0))
Assesses the given device.
Definition: ntv2card.cpp:1033
See KONA LHe Plus.
Definition: ntv2enums.h:78
std::string valueForKey(const std::string &inKey) const
virtual bool DeviceCanDoConversionMode(const NTV2ConversionMode inCM)
Definition: ntv2card.cpp:576
True if HDMI in/out supports square-division (quad) raster conversion. (New in SDK 17...
See KONA 5.
Definition: ntv2enums.h:56
std::string NTV2GetHostName(void)
Definition: ntv2utils.cpp:7395
ULWord NTV2DeviceGetActiveMemorySize(const NTV2DeviceID inDeviceID)
enum _NTV2EnumsID NTV2EnumsID
Identifies NTV2 enumerated types, used in CNTV2DriverInterface::GetSupportedItems.
True if device can warm-boot to load updated firmware.
virtual UWord GetIndexNumber(void) const
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7066
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
True if device can display/output video from FrameStore 1.
The number of independent Audio Systems on the device.
Identifies the NTV2AudioRate enumerated type.
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:1185
True if device has version 2 genlock hardware and/or firmware. (Deprecate – use kDeviceGetGenlockVer...
Identifies the NTV2OutputDest enumerated type.
enum _NTV2BoolParamID NTV2BoolParamID
Used with CNTV2DriverInterface::GetBoolParam to determine device capabilities.
Identifies the NTV2DSKMode enumerated type.
virtual bool IsMultiRasterWidgetChannel(const NTV2Channel inChannel)
True if device can report if its "fail-safe" firmware is loaded/running.
True if device connects to the host with a cable.
Identifies the AES/EBU audio breakout cable that has XLR connectors.
Definition: ntv2enums.h:3111
#define kQParamVDevName
Base name of .vdev file.
Definition: ntv2nubaccess.h:44
#define kNTV2PluginRegInfoKey_ShortName
Plugin short name.
Definition: ntv2nubaccess.h:78
virtual bool GetOutputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current output frame number for the given FrameStore (expressed as an NTV2Channel)...
True if device can detect which audio channel pairs are not carrying PCM (Pulse Code Modulation) audi...
True if device reports genlock frequencies. (New in SDK 18.1)
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)
True if device supports fast bitfile switching. (New in SDK 18.1)
True if device has an HEVC M31 encoder.
virtual bool IS_INPUT_SPIGOT_INVALID(const UWord inInputSpigot)
Definition: ntv2card.cpp:291
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
True if device has LED audio meters.
virtual bool DeviceCanDoFormat(const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2card.cpp:518
virtual Word GetDeviceVersion(void)
Answers with this device&#39;s version number.
Definition: ntv2card.cpp:67
The version number of the LUT(s) on the device.
Identifies the NTV2VideoFormat enumerated type.
See KONA 4 (Quad Mode).
Definition: ntv2enums.h:48
The ordinally last geometry (New in SDK 16.0)
Definition: ntv2enums.h:379
True if device supports 10Gbps IP (mutually exclusive with kDeviceCanDo25GIP).
Definition: lock.h:28
Identifies the NTV2Channel enumerated type.
True if device widget routing can be queried or changed.
True if device can do video processing.
Identifies the NTV2InputSource enumerated type.
#define InitStrToIDMap(_eid_, _t_, _max_, _fn_)
Definition: ntv2card.cpp:852
virtual bool GetFrameBufferSize(const NTV2Channel inChannel, NTV2Framesize &outValue)
Answers with the frame size currently being used on the device.
True if the device can do RGB over 3G Level A.
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:1231
virtual ULWord GetFrameBufferSize(void) const
The maximum number of 32-bit words that the DMA engine can move at a time on the device.
std::ostream & RawDump(std::ostream &oss) const
Dumps a human-readable list of regions into the given stream.
Definition: ntv2card.cpp:1053
True if device can handle QRez.
uint32_t ULWord
Definition: ajatypes.h:236
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
The number of DMA engines on the device.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They&#39;re also commonly use...
Definition: ntv2enums.h:1361
virtual NTV2Dictionary ConnectParams(void) const
True if Audio System(s) support an adjustable delay.
True if device supports an AJA breakout board. (New in SDK 17.0)
True if device can directly transmit data to another PCIe device via peer-to-peer DMA...
See Io 4K Plus.
Definition: ntv2enums.h:37
#define NTV2DriverVersionDecode_Major(__vers__)
NTV2WidgetType
Definition: ntv2enums.h:3052
True if device supports grouped audio system control.
#define NTV2DriverVersionDecode_Point(__vers__)
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:489
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:318
The number of SDI video outputs on the device.
See KONA 3G (Quad Mode).
Definition: ntv2enums.h:47
True if device supports streaming DMA. (New in SDK 17.1)
ULWordSet::const_iterator ULWordSetConstIter
True if device has any audio output capability (SDI, HDMI or analog) (New in SDK 17.1)
The total number of audio systems on the device, including host audio and mixer audio systems...
virtual bool IsRemote(void) const
True if device is 64-bit addressable.
True if device can read LTC (Linear TimeCode) from its reference input.
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
Definition: ntv2enums.h:3957
NTV2XilinxFPGA
Definition: ntv2enums.h:3852
virtual bool HasMultiRasterWidget(void)
Definition: ntv2card.h:6893
True if device can mark specific audio channel pairs as not carrying PCM (Pulse Code Modulation) audi...
True if device SDI connectors are bi-directional.
std::string NTV2InputSourceToString(const NTV2InputSource inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7043
Identifies the NTV2AudioSource enumerated type.
static NTV2NumericParamID StringToNumParamID(std::string s)
Definition: ntv2card.cpp:992
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:416
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
True if device has CSCs capable of splitting the key (alpha) and YCbCr (fill) from RGB frame buffers ...
The version number of the UFC on the device.
True if device has at least one programmable color space converter widget.
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6914
unsigned int n
Definition: pstream.cpp:148
True if device supports 3D video input over dual-stream SDI.
True if device supports Programmed I/O.
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:1132
True if device SPIFlash ROM is bank-selected. (New in SDK 17.1)
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:169
The highest register number for the device.
Identifies the NTV2RefSource enumerated type.
Use kDeviceGetSPIVersion instead.
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:1063
The highest bit number of the LED bits in the Global Control Register on the device.
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:354
NTV2DeviceID _boardID
My cached device ID.
The number of FrameStores on the device.
int16_t Word
Definition: ajatypes.h:233
static std::string SerialNum64ToString(const uint64_t inSerialNumber)
Returns a string containing the decoded, human-readable device serial number.
Definition: ntv2card.cpp:221
static std::string NumParamIDToString(const NTV2NumericParamID p)
Definition: ntv2card.cpp:754
See Io 4K (Quad Mode).
Definition: ntv2enums.h:36
True if device can handle quarter-sized frames (pixel-halving and line-halving during input...
virtual bool IsOpen(void) const
The invalid mode.
Definition: ntv2enums.h:1249
True if device has bypass relays on its SDI connectors.
See KONA LHi.
Definition: ntv2enums.h:79
bool _boardOpened
True if I&#39;m open and connected to the device.
std::set< std::string > NTV2StringSet
NTV2BreakoutType
Identifies the Breakout Boxes and Cables that may be attached to an AJA NTV2 device.
Definition: ntv2enums.h:3108
True if device can squeeze/stretch between 1920x1080 and 1440x1080.
True if device supports JPEG 2000 codec.
#define AJA_NULL
Definition: ajatypes.h:180
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:342
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:227
True if device has LED(s) on the card bracket. (New in SDK 18.0)
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...
True if device has any SDI, HDMI or analog video outputs.
The number of up-converters on the device.
True if device has any audio input capability (SDI, HDMI or analog) (New in SDK 17.1)
True if device has a headphone jack.
True if device supports 25Gbps IP. (New in SDK 18.0)
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:5291
True if device has at least one RS-422 serial port, and it (they) can be programmed (for baud rate...
bool IsStopped(void) const
True if device has a pair of unbalanced RCA audio monitor output connectors.
Identifies the NTV2Standard enumerated type.
True if device uses a "stacked" arrangement of its audio buffers.
#define _TO_STR(_x_)
Definition: ntv2card.cpp:605
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:160
virtual bool DeviceCanDoDSKMode(const NTV2DSKMode inDSKM)
Definition: ntv2card.cpp:581
virtual bool GetInputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current input frame index number for the given FrameStore. This identifies which par...
True if device has 12G SDI connectors.
virtual std::string GetDeviceVersionString(void)
Answers with this device&#39;s version number as a human-readable string.
Definition: ntv2card.cpp:74
True if device is supported by AJA "retail" software (AJA ControlPanel & ControlRoom).
The maximum number of audio channels that a single Audio System can support on the device...
virtual bool IS_HDMI_INPUT_SPIGOT_INVALID(const UWord inInputHDMIPort)
Definition: ntv2card.cpp:298
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
Definition: ntv2utils.cpp:6750
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:434
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:1103
True if device can rasterize 4 HD signals into a single HDMI output.
Specifies channel or FrameStore 8 (or the 8th item).
Definition: ntv2enums.h:1370
True if device supports 2nd-generation PCIe.
True if audio system(s) support 6 or more audio channels.
True if device is local-host-attached, and not remote, software or virtual (new in SDK 17...
Specifies channel or FrameStore 2 (or the 2nd item).
Definition: ntv2enums.h:1364
virtual NTV2DeviceID GetDeviceID(void)
Identifies the NTV2FrameGeometry enumerated type.
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6398
NTV2BitfileType
Definition: ntv2enums.h:3373
True if device has GPIO interface. (New in SDK 18.0)
True if frame buffer sizes are not fixed.
The number of quarter-size 4K/UHD down-converters on the device.
Identifies the NTV2TCIndex enumerated type for output.
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
True if device is direct addressable.
True if device has any SDI, HDMI or analog video inputs.
True if device has serial SPI flash hardware.
True if device has a local processor handling the product code. (New in SDK 18.1) ...
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
True if device can report its frame size.
The number of LUT banks on the device. (New in SDK 17.0)
True if device has any AES audio output channels (New in SDK 17.1)
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:2121
The number of HDMI video outputs on the device.
Use kDeviceGetSPIVersion instead.
The number of SDI-embedded output audio channels supported by the device.
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1375
virtual bool DeviceCanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2card.cpp:586
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.).
The number of frame sync widgets on the device.
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:1243
Use kDeviceGetSPIVersion instead.
uint16_t GetEndFrame(void) const
True if device can handle SD (Standard Definition) video.
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:486
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1266
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4608
True if device mixer/keyer supports adjustable opacity.
True if device has a crosspoint connection ROM (New in SDK 17.0)
True if device supports 10-bit RGB input/output over 2-wire SDI.
bool TagVideoFrames(CNTV2Card &inDevice)
Definition: ntv2card.cpp:1227
std::string & strip(std::string &str, const std::string &ws)
Definition: common.cpp:461
True if device frame buffer size can be changed.
True if device can directly receive data from another PCIe device via peer-to-peer DMA...
The number of analog audio output channels on the device.
static std::string EnumsIDToString(const NTV2EnumsID p)
Definition: ntv2card.cpp:820
True if Audio System(s) support a 192kHz sample rate.
Use kDeviceGetSPIVersion instead.
True if device has one or more analog video outputs.
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:352
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
The number of analog LTC inputs on the device.
This identifies the first Audio System.
Definition: ntv2enums.h:3903
The number of analog video inputs on the device.
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)
True if device supports 1080p RGB at more than 50Hz frame rates.
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:1209
The version number of the DAC on the device.
virtual uint64_t GetSerialNumber(void)
Answers with my serial number.
Definition: ntv2card.cpp:213
True if device can rasterize 4 HD signals into a single HDMI output.
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
Declares the AJASystemInfo class.
virtual ULWord DeviceGetFrameBufferSize(void)
Definition: ntv2card.cpp:525
True if device supports SMPTE ST2110.
True if device can perform SDI error checking.
The number of output converter widgets on the device.
True if device has any analog inputs or outputs.
True if the device can handle 4K/UHD video.
The number of RS-422 serial ports on the device.
True if device has SDI ANC inserter/extractor firmware.
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
See Io X3.
Definition: ntv2enums.h:43
NTV2WidgetID
Definition: ntv2enums.h:2914
std::string NTV2AudioRateToString(const NTV2AudioRate inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5760
uint16_t UWord
Definition: ajatypes.h:234
#define NTV2DriverVersionDecode_Build(__vers__)
True if device supports HDMI HDR output.
True if device can measure its FPGA die temperature.
True if there&#39;s at least one UFC, and it can be disabled.
Specifies channel or FrameStore 1 (or the first item).
Definition: ntv2enums.h:1363
ULWord NTV2DeviceGetAudioFrameBuffer(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
True if device can report Mixer delay. (New in SDK 18.1)
True if device can report its running (and not necessarily installed) firmware date.
True if device supports Versal Adaptive SoC System Monitor.
Calculate based on if NTV2_WgtCSC2 is present.
See Io IP.
Definition: ntv2enums.h:40
True if device is supported by this SDK.
std::string NTV2ReferenceSourceToString(const NTV2ReferenceSource inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7086
virtual NTV2BreakoutType GetBreakoutHardware(void)
Definition: ntv2card.cpp:378
A simple (not thread-safe) set of key/value pairs. (New in SDK 16.3)
The number of microphone inputs on the device.
The number of HDMI audio input channels on the device.
True if device supports frame pulse source independent of reference source.
std::string NTV2AudioSourceToString(const NTV2AudioSource inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6735
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:3112
NTV2DSKMode
Definition: ntv2enums.h:3505
The number of 2022 channels configured on SFP 2 on the device.
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6940
True if device has any LUTs.
virtual bool IsChannelEnabled(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the given FrameStore is enabled.
True if device has HDMI AUX data extractor(s).
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:1167
True if device can read LTC (Linear TimeCode) from one of its inputs.
See KONA 5.
Definition: ntv2enums.h:51
#define NTV2DriverVersionDecode_Minor(__vers__)
The SPI-flash version on the device. (New in SDK 17.1)
True if device supports 3D/stereo HDMI video output.
NTV2AudioSource
This enum value determines/states where an audio system will obtain its audio samples.
Definition: ntv2enums.h:2010
virtual bool IS_CHANNEL_INVALID(const NTV2Channel inChannel) const
Definition: ntv2card.cpp:270
Declares the CNTV2Card class.
The down-converter delay on the device.
True if device has a PWM-controlled cooling fan. (New in SDK 17.1)
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:1366
enum NTV2OutputDestination NTV2OutputDest
static string vidfmtstr(const NTV2VideoFormat vf, const bool b)
Definition: ntv2card.cpp:865
True if device has NorthWest Logic DMA hardware.
Specifies channel or FrameStore 5 (or the 5th item).
Definition: ntv2enums.h:1367
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Private include file for all ajabase sources.
The version number of the HDMI chipset on the device.
virtual ULWord DeviceGetNumberFrameBuffers(void)
Definition: ntv2card.cpp:305
True if device audio systems can wait for VBI before starting. (New in SDK 17.0)
NTV2AudioRate
Definition: ntv2enums.h:1933
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
The number of LUT widgets on the device.
The number of analog audio input channels on the device.
True if audio system(s) support 8 or more audio channels.
virtual bool CanWarmBootFPGA(bool &outCanWarmBoot)
Answers whether or not the FPGA can be reloaded without powering off.
Definition: ntv2card.cpp:363
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:7915
std::string NTV2BitfileTypeToString(const NTV2BitfileType inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7621
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
True if device can insert or extract RP-188/VITC2.
NTV2ConversionMode
Definition: ntv2enums.h:3720
No identifiable breakout hardware appears to be attached.
Definition: ntv2enums.h:3110
True if device has an HEVC M30 encoder/decoder.
See KONA X™.
Definition: ntv2enums.h:83
True if device has a firmware audio mixer.
virtual ULWord DeviceGetAudioFrameBuffer(void)
Definition: ntv2card.cpp:530
Identifies the NTV2PixelFormat enumerated type.
Identifies the NTV2TCIndex enumerated type for input.
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
Definition: ntv2card.cpp:1078
Identifies the NTV2Mode enumerated type.
The number of 25Gbps SFPs on the device. (New in SDK 18.1)
std::vector< std::string > NTV2StringList
Specifies channel or FrameStore 6 (or the 6th item).
Definition: ntv2enums.h:1368
Identifies the NTV2ConversionMode enumerated type.
See KONA 3G (UFC Mode).
Definition: ntv2enums.h:46
True if device connects to the host using a Thunderbolt cable.
virtual bool IsBufferSizeSetBySW(void)
defined(NTV2_DEPRECATE_17_2)
True if device has a bi-directional analog audio connector.
virtual std::string GetFPGAVersionString(const NTV2XilinxFPGA inFPGA=eFPGAVideoProc)
Definition: ntv2card.cpp:109
CNTV2Card()
My default constructor.
Definition: ntv2card.cpp:21
static NTV2EnumsID StringToEnumsParamID(std::string s)
Definition: ntv2card.cpp:1002
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5731
Specifies channel or FrameStore 7 (or the 7th item).
Definition: ntv2enums.h:1369
See KONA X™.
Definition: ntv2enums.h:81
std::string & lower(std::string &str)
Definition: common.cpp:436
The number of 2022 channels configured on SFP 1 on the device.
See KONA 4 (UFC Mode).
Definition: ntv2enums.h:49
True if device has a rotary encoder volume control.
The number of colorspace converter widgets on the device.
virtual ULWord GetSerialNumberLow(void)
Definition: ntv2card.cpp:200
Identifies the NTV2AudioWidgetID enumerated type.
True if device supports custom HANC packet insertion. (New in SDK 17.1)
True if device can insert and/or extract RP-188/VITC.
True if device supports 8K video formats.
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:182
Identifies the NTV2FrameRate enumerated type.
Last ordinal value (new in SDK 16.0)
Definition: ntv2enums.h:440
True if device has NTV4 FrameStores. (New in SDK 17.0)
const char * NTV2VideoFormatString(NTV2VideoFormat fmt)
Definition: ntv2debug.cpp:333
The number of HDMI audio output channels on the device.
The number of SDI video inputs on the device.
True if device fan can be thermostatically controlled.
True if device can can accommodate Apple ProRes-compressed video in its frame buffers.
enum NTV2ReferenceSource NTV2RefSource
uint16_t GetStartFrame(void) const
static bool StringToSupportedEnumsIDValue(ULWord &outVal, const NTV2EnumsID id, std::string s)
Definition: ntv2card.cpp:1012
True if device can handle HD (High Definition) video.
Declares device capability functions.
True if device has HDMI AUX data inserter(s).
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.
The number of AES/EBU audio input channels on the device.
Specifies channel or FrameStore 3 (or the 3rd item).
Definition: ntv2enums.h:1365
std::string NTV2FrameRateToString(const NTV2FrameRate inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7012
See KONA 5.
Definition: ntv2enums.h:52
True if device has Xilinx DMA hardware.
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
The number of down-converters on the device.
True if Audio System(s) support a 96kHz sample rate.
True if device has any AES audio inputs or outputs.
True if device has one or more analog video inputs.
True if device can do frame rate conversion.
True if device has a mechanical identification switch. (New in SDK 17.1)
The number of HDMI video inputs on the device.
static std::string BoolParamIDToString(const NTV2BoolParamID p)
Definition: ntv2card.cpp:610
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:1800
True if device can simultaneously handle different video formats on more than one SDI input or output...