AJA NTV2 SDK  18.1.0.2439
NTV2 SDK 18.1.0.2439
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  const bool hasLPPC(IsSupported(kDeviceHasLPProductCode));
233  if (hasLPPC || (GetNumericParam(kDeviceGetSPIFlashVersion, spiFlashVers) && spiFlashVers >= 6))
234  {
235  // Newer devices use 4 regs: kRegReserved54 thru kRegReserved57
236  ULWord serialArray[] = {0,0,0,0};
237  ReadRegister(hasLPPC ? kRegReserved54 : kRegReserved56, serialArray[0]);
238  ReadRegister(hasLPPC ? kRegReserved55 : kRegReserved57, serialArray[1]);
239  ReadRegister(hasLPPC ? kRegReserved56 : kRegReserved54, serialArray[2]);
240  ReadRegister(hasLPPC ? kRegReserved57 : kRegReserved55, serialArray[3]);
241  outSerialNumberString.clear();
242  for (int serialIndex = 0; serialIndex < 4; serialIndex++)
243  if (serialArray[serialIndex] != 0xffffffff)
244  for (int i = 0; i < 4; i++)
245  {
246  const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
247  if (tempChar > 0 && tempChar != '.')
248  outSerialNumberString.push_back(tempChar);
249  }
250  }
251  else
252  { // Older devices use 2 regs: kRegReserved54 & kRegReserved55
253  outSerialNumberString = ::SerialNum64ToString(GetSerialNumber());
254  if (outSerialNumberString.empty())
255  {outSerialNumberString = "INVALID?"; return false;}
256 
257  // Prepend 5/6/7 for Io4K+/IoIP/IoX3, respectively...
258  const NTV2DeviceID deviceID (GetDeviceID());
259  if (deviceID == DEVICE_ID_IO4KPLUS)
260  outSerialNumberString = "5" + outSerialNumberString; // Io4K+/DNXIV: prepend "5"
261  else if (deviceID == DEVICE_ID_IOIP_2022 ||
262  deviceID == DEVICE_ID_IOIP_2110 ||
263  deviceID == DEVICE_ID_IOIP_2110_RGB12)
264  outSerialNumberString = "6" + outSerialNumberString; // IoIP: prepend "6"
265  else if (deviceID == DEVICE_ID_IOX3)
266  outSerialNumberString = "7" + outSerialNumberString; // IoX3: prepend "7"
267  }
268  return true;
269 } // GetSerialNumberString
270 
271 
272 bool CNTV2Card::IS_CHANNEL_INVALID (const NTV2Channel inChannel) const
273 {
274  if (!NTV2_IS_VALID_CHANNEL (inChannel))
275  return true;
276  return false;
277 }
278 
279 
280 bool CNTV2Card::IS_OUTPUT_SPIGOT_INVALID (const UWord inOutputSpigot)
281 {
282  if (inOutputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoOutputs)))
283  {
285  if (itms.find(ULWord(NTV2_WgtSDIMonOut1)) != itms.end() && inOutputSpigot == 4)
286  return false; // Io4K Monitor Output exception
287  return true; // Invalid
288  }
289  return false;
290 }
291 
292 
293 bool CNTV2Card::IS_INPUT_SPIGOT_INVALID (const UWord inInputSpigot)
294 {
295  if (inInputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoInputs)))
296  return true;
297  return false;
298 }
299 
300 bool CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID (const UWord inInputHDMIPort)
301 {
302  if (inInputHDMIPort >= UWord(GetNumSupported(kDeviceGetNumHDMIVideoInputs)))
303  return true;
304  return false;
305 }
306 
308 {
310  {
311  ULWord totalFrames = GetNumSupported(kDeviceGetActiveMemorySize) / 0x800000;
314  totalFrames -= 6; // Lop off 48MB for HDMI MultiViewer
315  return totalFrames;
316  }
317  return ::NTV2DeviceGetNumberFrameBuffers(_boardID); // Handle non-stacked-audio devices
318 }
319 
320 bool CNTV2Card::GetInstalledBitfileInfo (ULWord & outNumBytes, std::string & outDateStr, std::string & outTimeStr)
321 {
322  outDateStr.clear ();
323  outTimeStr.clear ();
324  outNumBytes = 0;
325 
326  if (!_boardOpened)
327  return false; // Bail if I'm not open
328 
329  BITFILE_INFO_STRUCT bitFileInfo;
330  ::memset (&bitFileInfo, 0, sizeof (bitFileInfo));
331  bitFileInfo.whichFPGA = eFPGAVideoProc;
332 
333  // Call the OS specific method...
335  return false;
336 
337  // Fill in our OS independent data structure...
338  outDateStr = reinterpret_cast <char *> (&bitFileInfo.dateStr [0]);
339  outTimeStr = reinterpret_cast <char *> (&bitFileInfo.timeStr [0]);
340  outNumBytes = bitFileInfo.numBytes;
341  return true;
342 }
343 
345 {
346  ostringstream oss;
347  // format like: "date time name"
348  oss << inBitFileInfo.dateStr << " " << inBitFileInfo.timeStr << " ";
350  oss << "DNxIV";
351  else
352  oss << ::NTV2BitfileTypeToString(NTV2BitfileType(inBitFileInfo.bitFileType), true);
353  return oss.str();
354 }
355 
356 bool CNTV2Card::IsFailSafeBitfileLoaded (bool & outIsSafeBoot)
357 {
358  outIsSafeBoot = false;
360  return false;
361  return CNTV2DriverInterface::ReadRegister(kRegCPLDVersion, outIsSafeBoot, BIT(4), 4);
362 }
363 
364 
365 bool CNTV2Card::CanWarmBootFPGA (bool & outCanWarmBoot)
366 {
367  outCanWarmBoot = false; // Definitely can't
369  return false;
370 
371  ULWord version(0);
372  if (!ReadRegister(kRegCPLDVersion, version, BIT(0)|BIT(1)))
373  return false; // Fail
374  if (version != 3)
375  outCanWarmBoot = true; // Definitely can
376  return true;
377 }
378 
379 
381 {
383  ULWord audioCtlReg (0); // The Audio Control Register tells us what's connected
384 
385  if (IsOpen () && ReadRegister (kRegAud1Control, audioCtlReg))
386  {
387  const bool bPhonyKBox (false); // For debugging
388 
389  switch (_boardID)
390  {
391  case DEVICE_ID_KONA3G:
393  case DEVICE_ID_IO4K:
394  case DEVICE_ID_KONA4:
395  case DEVICE_ID_KONA4UFC:
396  case DEVICE_ID_KONA5:
398  case DEVICE_ID_KONA5_8K:
401  case DEVICE_ID_KONA5_OE1:
403  // Do we have a K3G-Box?
404  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
405  result = NTV2_K3GBox;
406  else
407  result = NTV2_BreakoutCableBNC;
408  break;
410  // Do we have a KL-Box?
411  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
412  result = NTV2_KLBox;
413  else
414  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
415  break;
416  case DEVICE_ID_KONALHI:
417  // Do we have a KLHi-Box?
418  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
419  result = NTV2_KLHiBox;
420  else
421  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
422  break;
423  case DEVICE_ID_KONAX:
424  case DEVICE_ID_KONAX_4CH:
425  // Do we have a BOB?
427  result = NTV2_BreakoutBoard;
428  break;
429  default:
430  break;
431  }
432  }
433  return result;
434 }
435 
437 {
439  return false;
440  uint32_t portIP(0);
441  int ipOctet(0);
442  ostringstream tempString;
443  ReadRegister(kRegLPRJ45IP, portIP);
444  if (portIP == 0)
445  return false;
446 
447  outURLString.clear();
448  tempString << "http://";
449  ipOctet = (portIP & 0xFF000000) >> 24;
450  tempString << ipOctet << ".";
451  ipOctet = (portIP & 0x00FF0000) >> 16;
452  tempString << ipOctet << ".";
453  ipOctet = (portIP & 0x0000FF00) >> 8;
454  tempString << ipOctet << ".";
455  ipOctet = (portIP & 0x000000FF);
456  tempString << ipOctet;
457 
458  outURLString = tempString.str();
459  return true;
460 }
461 
463 {
465  return false;
466  uint32_t portIP(0);
467  int ipOctet(0);
468  ostringstream tempString;
469  ReadRegister(kRegLPTunnelIP, portIP);
470  if (portIP == 0)
471  return false;
472 
473  outURLString.clear();
474  tempString << "http://";
475  ipOctet = (portIP & 0xFF000000) >> 24;
476  tempString << ipOctet << ".";
477  ipOctet = (portIP & 0x00FF0000) >> 16;
478  tempString << ipOctet << ".";
479  ipOctet = (portIP & 0x0000FF00) >> 8;
480  tempString << ipOctet << ".";
481  ipOctet = (portIP & 0x000000FF);
482  tempString << ipOctet;
483 
484  outURLString = tempString.str();
485  return true;
486 }
487 
488 int CNTV2Card::GetSFPConfigurationURLStrings(std::vector<std::string> & OutSFPURLStrings)
489 {
491  if (!IsSupported(kDeviceHasLPProductCode) || numSFPs == 0)
492  return 0;
493 
494  for (ULWord ndx(0); ndx < numSFPs; ndx++)
495  {
496  uint32_t portIP(0);
497  int ipOctet(0);
498  ostringstream tempString;
499  ReadRegister(kRegLPSFP1IP + ndx, portIP);
500  if (portIP == 0)
501  return false;
502 
503  tempString << "http://";
504  ipOctet = (portIP & 0xFF000000) >> 24;
505  tempString << ipOctet << ".";
506  ipOctet = (portIP & 0x00FF0000) >> 16;
507  tempString << ipOctet << ".";
508  ipOctet = (portIP & 0x0000FF00) >> 8;
509  tempString << ipOctet << ".";
510  ipOctet = (portIP & 0x000000FF);
511  tempString << ipOctet;
512 
513  OutSFPURLStrings.push_back(tempString.str());
514  }
515  return int(OutSFPURLStrings.size());
516 }
517 
518 #if !defined(NTV2_DEPRECATE_16_3)
521  NTV2FrameGeometry inFrameGeometry,
522  NTV2Standard inStandard)
523  {
524  return ::NTV2DeviceCanDoFormat (GetDeviceID(), inFrameRate, inFrameGeometry, inStandard);
525  }
526 
528  {
529  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID()); // Revisit for 2MB granularity
530  }
531 
533  {
534  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID()); // Revisit for 2MB granularity
535  }
536 
538  {
539  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID()); // Revisit for 2MB granularity
540  }
541 
543  {
544  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
545  }
546 
548  {
549  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
550  }
551 
553  {
554  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
555  }
556 
558  {
559  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
560  }
561 
564  return itms.find(ULWord(inVideoFormat)) != itms.end();
565  }
566 
569  return itms.find(ULWord(inFBFormat)) != itms.end();
570  }
571 
573  {
575  return wgtIDs.find(inWidgetID) != wgtIDs.end();
576  }
577 
580  return itms.find(ULWord(inConversionMode)) != itms.end();
581  }
582 
585  return itms.find(ULWord(inDSKMode)) != itms.end();
586  }
587 
590  return itms.find(ULWord(inInputSource)) != itms.end();
591  }
592 #endif // !defined(NTV2_DEPRECATE_16_3)
593 
594 
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 
607 #define _TO_STR(_x_) #_x_
608 
609 AJALock DeviceCapabilities::sInitLock;
610 NTV2StringList DeviceCapabilities::sBoolParamIDStrs, DeviceCapabilities::sNumParamIDStrs, DeviceCapabilities::sEnumsIDStrs; // STATIC
611 
613 {
614  AJAAutoLock tmp(&sInitLock);
615  if (sBoolParamIDStrs.empty())
616  {
617  sBoolParamIDStrs.reserve(size_t(kNTV2BoolParam_COUNT));
618  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanChangeEmbeddedAudioClock));
619  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanChangeFrameBufferSize));
620  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDisableUFC));
621  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo2KVideo));
622  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo3GLevelConversion));
623  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoRGBLevelAConversion));
624  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo425Mux));
625  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo4KVideo));
626  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAESAudioIn));
627  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAnalogAudio));
628  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAnalogVideoIn));
629  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAnalogVideoOut));
630  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio2Channels));
631  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio6Channels));
632  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio8Channels));
633  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio96K));
634  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudioDelay));
635  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoBreakoutBox));
636  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoCapture));
637  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoColorCorrection));
638  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoCustomAnc));
639  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoDSKOpacity));
640  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoDualLink));
641  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoDVCProHD));
642  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoEnhancedCSC));
643  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoFrameStore1Display));
644  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoFreezeOutput));
645  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIOutStereo));
646  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDV));
647  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDVideo));
648  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoIsoConvert));
649  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoLTC));
650  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoLTCInOnRefPort));
651  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoMSI));
652  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoMultiFormat));
653  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoPCMControl));
654  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoPCMDetection));
655  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoPIO));
656  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoPlayback));
657  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoProgrammableCSC));
658  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoProgrammableRS422));
659  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoProRes));
660  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoQREZ));
661  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoQuarterExpand));
662  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoRateConvert));
663  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoRGBPlusAlphaOut));
664  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoRP188));
665  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoSDVideo));
666  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoSDIErrorChecks));
667  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoStackedAudio));
668  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoStereoIn));
669  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoStereoOut));
670  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoThunderbolt));
671  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoVideoProcessing));
672  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanMeasureTemperature));
673  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanReportFrameSize));
674  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasBiDirectionalSDI));
675  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasColorSpaceConverterOnChannel2));
676  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasNWL));
677  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasPCIeGen2));
678  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasRetailSupport));
679  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSDIRelays));
680  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIFlash));
681  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIFlashSerial));
682  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIv2));
683  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIv3));
684  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIv4));
685  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIs64Bit));
686  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIsDirectAddressable));
687  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIsExternalToHost));
688  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIsLocalPhysical));
689  sBoolParamIDStrs.push_back(_TO_STR(kDeviceIsSupported));
690  sBoolParamIDStrs.push_back(_TO_STR(kDeviceNeedsRoutingSetup));
691  sBoolParamIDStrs.push_back(_TO_STR(kDeviceSoftwareCanChangeFrameBufferSize));
692  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanThermostat));
693  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasHEVCM31));
694  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasHEVCM30));
695  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoVITC2));
696  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIHDROut));
697  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoJ2K));
698  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo12gRouting));
699  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo12GSDI));
700  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo2110));
701  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo8KVideo));
702  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudio192K));
703  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudioMixer));
704  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIAuxCapture));
705  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIAuxPlayback));
706  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoFramePulseSelect));
707  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIMultiView));
708  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasMultiRasterWidget));
709  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHFRRGB));
710  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoIP));
711  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoMultiLinkAudio));
712  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoWarmBootFPGA));
713  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanReportFailSafeLoaded));
714  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanReportRunningFirmwareDate));
715  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasAudioMonitorRCAJacks));
716  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasBiDirectionalAnalogAudio));
717  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasGenlockv2));
718  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasGenlockv3));
719  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasHeadphoneJack));
720  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasLEDAudioMeters));
721  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasRotaryEncoder));
722  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasSPIv5));
723  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasXilinxDMA));
724  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasMicrophoneInput));
725  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoBreakoutBoard));
726  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasBreakoutBoard));
727  sBoolParamIDStrs.push_back(_TO_STR(kDeviceAudioCanWaitForVBI));
728  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasNTV4FrameStores));
729  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasXptConnectROM));
730  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudioInput));
731  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAudioOutput));
732  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoAESAudioOut));
733  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasIDSwitch));
734  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoHDMIQuadRasterConversion));
735  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoCustomHancInsertion));
736  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoStreamingDMA));
737  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasPWMFanControl));
738  sBoolParamIDStrs.push_back(_TO_STR(kDeviceROMHasBankSelect));
739  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoVersalSysMon));
740  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoGPIO));
741  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasBracketLED));
742  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDo25GIP));
743  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanReportMixerDelay));
744  sBoolParamIDStrs.push_back(_TO_STR(kDeviceHasLPProductCode));
745  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoP2PTransmit));
746  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoP2PReceive));
747  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoFastBitfileSwitching));
748  sBoolParamIDStrs.push_back(_TO_STR(kDeviceCanDoClockMonitor));
749  NTV2_ASSERT(sBoolParamIDStrs.size() == size_t(kNTV2BoolParam_COUNT));
750  for (size_t ndx(0); ndx < sBoolParamIDStrs.size(); ndx++)
751  sBoolParamIDStrs.at(ndx).erase(0, 7); // Lop off leading "kDevice"
752  } // if never initialized
753  return size_t(p) < sBoolParamIDStrs.size() ? sBoolParamIDStrs.at(size_t(p)) : "";
754 } // BoolParamIDToString
755 
757 {
758  AJAAutoLock tmp(&sInitLock);
759  if (sNumParamIDStrs.empty())
760  {
761  sNumParamIDStrs.reserve(size_t(kNTV2NumericParam_COUNT));
762  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetActiveMemorySize));
763  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetDACVersion));
764  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetDownConverterDelay));
765  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetHDMIVersion));
766  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetLUTVersion));
767  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetMaxAudioChannels));
768  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetMaxRegisterNumber));
769  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetMaxTransferCount));
770  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumDMAEngines));
771  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumVideoChannels));
772  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetPingLED));
773  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetUFCVersion));
774  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNum4kQuarterSizeConverters));
775  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAESAudioInputChannels));
776  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAESAudioOutputChannels));
777  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAnalogAudioInputChannels));
778  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAnalogAudioOutputChannels));
779  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAnalogVideoInputs));
780  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAnalogVideoOutputs));
781  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumAudioSystems));
782  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumCrossConverters));
783  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumCSCs));
784  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumDownConverters));
785  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumEmbeddedAudioInputChannels));
786  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumEmbeddedAudioOutputChannels));
787  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumFrameStores));
788  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumFrameSyncs));
789  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumHDMIAudioInputChannels));
790  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumHDMIAudioOutputChannels));
791  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumHDMIVideoInputs));
792  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumHDMIVideoOutputs));
793  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumInputConverters));
794  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumLUTs));
795  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumMixers));
796  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumOutputConverters));
797  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumReferenceVideoInputs));
798  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumSerialPorts));
799  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumUpConverters));
800  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumVideoInputs));
801  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumVideoOutputs));
802  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNum2022ChannelsSFP1));
803  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNum2022ChannelsSFP2));
804  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumLTCInputs));
805  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumLTCOutputs));
806  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumMicInputs));
807  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumLUTBanks));
808  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetTotalNumAudioSystems));
809  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumBufferedAudioSystems));
810  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNumTSIMuxers));
811  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetSPIFlashVersion));
812  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetGenlockVersion));
813  sNumParamIDStrs.push_back(_TO_STR(kDeviceGetNum25GSFPs));
814  NTV2_ASSERT(sNumParamIDStrs.size() == size_t(kNTV2NumericParam_COUNT));
815  for (size_t ndx(0); ndx < sNumParamIDStrs.size(); ndx++)
816  sNumParamIDStrs.at(ndx).erase(0, 7); // Lop off leading "kDevice"
817  } // if never initialized
819  return ndx < sNumParamIDStrs.size() ? sNumParamIDStrs.at(ndx) : "";
820 } // NumParamIDToString
821 
823 {
824  AJAAutoLock tmp(&sInitLock);
825  if (sEnumsIDStrs.empty())
826  {
827  sEnumsIDStrs.reserve(kNTV2EnumsID_COUNT);
828  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_DeviceID));
829  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_Standard));
830  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_PixelFormat));
831  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_FrameGeometry));
832  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_FrameRate));
833  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_ScanGeometry));
834  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_VideoFormat));
835  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_Mode));
836  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_InputSource));
837  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_OutputDest));
838  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_Channel));
839  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_RefSource));
840  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_AudioRate));
841  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_AudioSource));
842  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_WidgetID));
843  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_ConversionMode));
844  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_DSKMode));
845  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_InputTCIndex));
846  sEnumsIDStrs.push_back(_TO_STR(kNTV2EnumsID_OutputTCIndex));
847  NTV2_ASSERT(sEnumsIDStrs.size() == size_t(kNTV2EnumsID_COUNT));
848  for (size_t ndx(0); ndx < sEnumsIDStrs.size(); ndx++)
849  sEnumsIDStrs.at(ndx).erase(0, 13); // Lop off leading "kNTV2EnumsID_"
850  } // if never initialized
851  return size_t(p) < sEnumsIDStrs.size() ? sEnumsIDStrs.at(size_t(p)) : "";
852 }
853 
854 #define InitStrToIDMap(_eid_,_t_,_max_,_fn_) m.clear(); \
855  for (n = 0; n < _max_; n++) \
856  { \
857  if (!aja::lower(st = _fn_(_t_(n), false)).empty()) \
858  m[st] = n; \
859  if (!aja::lower(st = _fn_(_t_(n), true)).empty()) \
860  m[st] = n; \
861  } \
862  sStrToIDMaps.at(_eid_) = m;
863 
864 DeviceCapabilities::GenericStrToIDMap DeviceCapabilities::sStrBoolParamIDMap, DeviceCapabilities::sStrNumParamIDMap, DeviceCapabilities::sStrEnumsIDMap; // STATIC
865 DeviceCapabilities::GenericStrToIDMaps DeviceCapabilities::sStrToIDMaps; // STATIC
866 
867 void DeviceCapabilities::Init (void) // STATIC
868 { // One stop shop for initialization
869  AJAAutoLock tmp(&sInitLock);
870  GenericStrToIDMapCI it;
871  if (sStrBoolParamIDMap.empty())
872  {
873  BoolParamIDToString(kDeviceCanChangeEmbeddedAudioClock); // Ensure sBoolParamIDStrs initialized
874  for (size_t ndx(0); ndx < sBoolParamIDStrs.size(); ndx++)
875  {
876  string st(sBoolParamIDStrs.at(ndx));
877  aja::lower(st);
879  it = sStrBoolParamIDMap.find(st);
880  if (it == sStrBoolParamIDMap.end())
881  sStrBoolParamIDMap[st] = id;
882  st = "device" + st;
883  it = sStrBoolParamIDMap.find(st);
884  if (it == sStrBoolParamIDMap.end())
885  sStrBoolParamIDMap[st] = id;
886  st = "k" + st;
887  it = sStrBoolParamIDMap.find(st);
888  if (it == sStrBoolParamIDMap.end())
889  sStrBoolParamIDMap[st] = id;
890  }
891  sStrBoolParamIDMap["kdevicecandocustomaux"] = kDeviceCanDoHDMIAuxCapture;
892  sStrBoolParamIDMap["devicecandocustomaux"] = kDeviceCanDoHDMIAuxCapture;
893  sStrBoolParamIDMap["candocustomaux"] = kDeviceCanDoHDMIAuxCapture;
894  sStrBoolParamIDMap["kdevicecandoidswitch"] = kDeviceHasIDSwitch;
895  sStrBoolParamIDMap["devicecandoidswitch"] = kDeviceHasIDSwitch;
896  sStrBoolParamIDMap["candoidswitch"] = kDeviceHasIDSwitch;
897  }
898  if (sStrNumParamIDMap.empty())
899  {
900  NumParamIDToString(kDeviceGetActiveMemorySize); // Ensure sNumParamIDStrs initialized
901  for (size_t ndx(0); ndx < sNumParamIDStrs.size(); ndx++)
902  {
903  string st(sNumParamIDStrs.at(ndx));
904  aja::lower(st);
906  it = sStrNumParamIDMap.find(st);
907  if (it == sStrNumParamIDMap.end())
908  sStrNumParamIDMap[st] = id;
909  st = "device" + st;
910  it = sStrNumParamIDMap.find(st);
911  if (it == sStrNumParamIDMap.end())
912  sStrNumParamIDMap[st] = id;
913  st = "k" + st;
914  it = sStrNumParamIDMap.find(st);
915  if (it == sStrNumParamIDMap.end())
916  sStrNumParamIDMap[st] = id;
917  }
918  }
919  if (sStrEnumsIDMap.empty())
920  {
921  EnumsIDToString(kNTV2EnumsID_Standard); // Ensure sEnumsIDStrs initialized
922  for (size_t ndx(0); ndx < sEnumsIDStrs.size(); ndx++)
923  {
924  string st(sEnumsIDStrs.at(ndx));
925  aja::lower(st);
926  const NTV2EnumsID id (NTV2EnumsID(kNTV2EnumsID_FIRST + ndx));
927  it = sStrEnumsIDMap.find(st);
928  if (it == sStrEnumsIDMap.end())
929  sStrEnumsIDMap[st] = id;
930  st = "enumsid_" + st;
931  it = sStrEnumsIDMap.find(st);
932  if (it == sStrEnumsIDMap.end())
933  sStrEnumsIDMap[st] = id;
934  st = "ntv2" + st;
935  it = sStrEnumsIDMap.find(st);
936  if (it == sStrEnumsIDMap.end())
937  sStrEnumsIDMap[st] = id;
938  st = "k" + st;
939  it = sStrEnumsIDMap.find(st);
940  if (it == sStrEnumsIDMap.end())
941  sStrEnumsIDMap[st] = id;
942  }
943  }
944  if (sStrToIDMaps.empty())
945  {
946  string st;
947  ULWord n(0);
948  while (sStrToIDMaps.size() < kNTV2EnumsID_LAST)
949  sStrToIDMaps.push_back(GenericStrToIDMap());
950  GenericStrToIDMap m;
951 // InitStrToIDMap(kNTV2EnumsID_Device, NTV2DeviceID, ---n/a---, NTV2DeviceIDToString);
953  m["standards"] = kNTV2EnumsID_Standard;
955  m["pixelformats"] = kNTV2EnumsID_PixelFormat;
962  m["outputdestination"] = kNTV2EnumsID_OutputDest;
963  m["outputdestinations"] = kNTV2EnumsID_OutputDest;
969  m["widgetids"] = kNTV2EnumsID_WidgetID;
970 // InitStrToIDMap(kNTV2EnumsID_ConversionMode, NTV2ConversionMode, NTV2_NUM_CONVERSIONMODES, NTV2ConversionModeToString);
971 // InitStrToIDMap(kNTV2EnumsID_DSKMode, NTV2DSKMode, NTV2_DSKModeMax, NTV2DSKModeToString);
974  } // if uninitialized
975 } // Init
976 
978 {
979  AJAAutoLock tmp(&sInitLock);
980  if (sStrBoolParamIDMap.empty())
981  Init();
983  GenericStrToIDMapCI it (sStrBoolParamIDMap.find(s));
984  return it != sStrBoolParamIDMap.end() ? NTV2BoolParamID(it->second) : kDeviceCanDo_INVALID;
985 }
986 
988 {
989  AJAAutoLock tmp(&sInitLock);
990  if (sStrNumParamIDMap.empty())
991  Init();
993  GenericStrToIDMapCI it (sStrNumParamIDMap.find(s));
994  return it != sStrNumParamIDMap.end() ? NTV2NumericParamID(it->second) : kDeviceGetNum_INVALID;
995 }
996 
998 {
999  AJAAutoLock tmp(&sInitLock);
1000  if (sStrEnumsIDMap.empty())
1001  Init();
1002  aja::lower(aja::strip(s));
1003  GenericStrToIDMapCI it (sStrEnumsIDMap.find(s));
1004  return it != sStrEnumsIDMap.end() ? NTV2EnumsID(it->second) : kNTV2EnumsID_INVALID;
1005 }
1006 
1007 bool DeviceCapabilities::StringToSupportedEnumsIDValue (ULWord & outVal, const NTV2EnumsID id, string s) // STATIC
1008 {
1009  AJAAutoLock tmp(&sInitLock);
1010  if (sStrToIDMaps.empty())
1011  Init();
1012  if (id >= sStrToIDMaps.size())
1013  return false; // No such map or bad EnumsID
1014  GenericStrToIDMap & m (sStrToIDMaps.at(id));
1015  if (m.empty())
1016  return false; // NTV2EnumsID unsupported (e.g. Device, ConversionMode, DSKMode, etc.)
1017  GenericStrToIDMapCI iter(m.find(aja::strip(aja::lower(s))));
1018  if (iter == m.end())
1019  return false;
1020  outVal = iter->second;
1021  return true;
1022 } // StringToSupportedEnumsIDValue
1023 
1024 
1026 
1027 
1028 bool SDRAMAuditor::AssessDevice (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
1029 {
1030  mFrameTags.clear();
1031  mDeviceID = DEVICE_ID_INVALID;
1032  mNumFrames = 0;
1033  mIntrinsicSize = 0;
1034  if (!inDevice.IsOpen())
1035  return false;
1036 
1037  mDeviceID = inDevice.GetDeviceID();
1038  const ULWord totalBytes(::NTV2DeviceGetActiveMemorySize(mDeviceID));
1039  mNumFrames = UWord(totalBytes / m8MB);
1040  if (totalBytes % m8MB)
1041  {mNumFrames++; cerr << DEC(totalBytes % m8MB) << " leftover/spare bytes -- last frame is partial frame" << endl;}
1042  for (UWord frm(0); frm < mNumFrames; frm++)
1043  mFrameTags.insert(FrameTag(frm, NTV2StringSet()));
1044 
1045  return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
1046 }
1047 
1048 ostream & SDRAMAuditor::RawDump (ostream & oss) const
1049 {
1050  for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
1051  {
1052  const NTV2StringSet & tags(it->second);
1053  oss << DEC0N(it->first,3) << ": " << aja::join(tags, ", ") << endl;
1054  }
1055  return oss;
1056 }
1057 
1059 {
1060  ULWordSet result; // Coalesce all regions into this one sorted set
1061  for (size_t ndx(0); ndx < inRgn1.size(); ndx++)
1062  if (result.find(inRgn1.at(ndx)) == result.end())
1063  result.insert(inRgn1.at(ndx));
1064  for (size_t ndx(0); ndx < inRgn2.size(); ndx++)
1065  if (result.find(inRgn2.at(ndx)) == result.end())
1066  result.insert(inRgn2.at(ndx));
1067  for (size_t ndx(0); ndx < inRgn3.size(); ndx++)
1068  if (result.find(inRgn3.at(ndx)) == result.end())
1069  result.insert(inRgn3.at(ndx));
1070  return result;
1071 }
1072 
1073 ostream & SDRAMAuditor::DumpBlocks (ostream & oss) const
1074 {
1075  ULWordSequence badBlks, freeBlks, goodBlks;
1076  GetRegions (freeBlks, goodBlks, badBlks);
1077  ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks)); // Coalesce all regions into this one sorted set
1078 
1079  for (ULWordSetConstIter it(rgns.begin()); it != rgns.end(); ++it)
1080  {
1081  const ULWord rgnInfo(*it);
1082  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
1083  NTV2StringSet tags;
1084  GetTagsForFrameIndex (startBlk, tags);
1085  if (numBlks > 1)
1086  oss << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " : ";
1087  else
1088  oss << "Frm " << DEC0N(startBlk,3) << " : ";
1089  if (tags.empty())
1090  oss << "{free}";
1091  else
1092  oss << aja::join(tags, ", ");
1093  oss << endl;
1094  }
1095  return oss;
1096 }
1097 
1098 bool SDRAMAuditor::GetRegions (ULWordSequence & outFree, ULWordSequence & outUsed, ULWordSequence & outBad) const
1099 {
1100  outFree.clear(); outUsed.clear(); outBad.clear();
1101  FrameTagsConstIter it(mFrameTags.begin());
1102  if (it == mFrameTags.end())
1103  return true;
1104  UWord frmStart(it->first), lastFrm(frmStart);
1105  NTV2StringSet runTags(it->second);
1106  while (++it != mFrameTags.end())
1107  {
1108  const NTV2StringSet & tags(it->second);
1109  if (tags != runTags)
1110  { // End of current run, start of new run
1111  if (runTags.empty())
1112  {
1113  if (frmStart != lastFrm)
1114  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1115  else
1116  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
1117  }
1118  else if (runTags.size() > 1)
1119  {
1120  if (frmStart != lastFrm)
1121  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1122  else
1123  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
1124  }
1125  else
1126  {
1127  if (frmStart != lastFrm)
1128  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1129  else
1130  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
1131  }
1132  frmStart = lastFrm = it->first;
1133  runTags = tags;
1134  }
1135  else
1136  lastFrm = it->first; // Continue current run
1137  }
1138  if (runTags.empty())
1139  {
1140  if (frmStart != lastFrm)
1141  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1142  else
1143  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
1144  }
1145  else if (runTags.size() > 1)
1146  {
1147  if (frmStart != lastFrm)
1148  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1149  else
1150  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
1151  }
1152  else
1153  {
1154  if (frmStart != lastFrm)
1155  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
1156  else
1157  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
1158  }
1159  return true;
1160 }
1161 
1162 bool SDRAMAuditor::GetTagsForFrameIndex (const UWord inIndex, NTV2StringSet & outTags) const
1163 {
1164  outTags.clear();
1165  FrameTagsConstIter it(mFrameTags.find(inIndex));
1166  if (it == mFrameTags.end())
1167  return false;
1168  outTags = it->second;
1169  return true;
1170 }
1171 
1172 size_t SDRAMAuditor::GetTagCount (const UWord inIndex) const
1173 {
1174  FrameTagsConstIter it(mFrameTags.find(inIndex));
1175  if (it == mFrameTags.end())
1176  return 0;
1177  return it->second.size();
1178 }
1179 
1180 bool SDRAMAuditor::TranslateRegions (ULWordSequence & outDestRgns, const ULWordSequence & inSrcRgns, const bool inIsQuad, const bool inIsQuadQuad) const
1181 {
1182  outDestRgns.clear();
1183  if (inIsQuad && inIsQuadQuad)
1184  return false; // Can't be both
1185  if (inSrcRgns.empty())
1186  return true; // Empty list, not an error
1187  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
1188  if (!_8MB_frames_per_dest_frame)
1189  return false; // Ordinarily won't happen, but possible with "ntv2:" (fake/software) "devices" having small SDRAM complement
1190  if (_8MB_frames_per_dest_frame == 1)
1191  {outDestRgns = inSrcRgns; return true;} // Same
1192 
1193  // For each region...
1194  for (size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
1195  { const ULWord val(inSrcRgns.at(ndx));
1196  ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF); // <== These are in 8MB block units
1197  startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
1198  lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
1199  outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
1200  }
1201  return true;
1202 }
1203 
1204 bool SDRAMAuditor::TagAudioBuffers (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
1205 {
1206  ULWord addr(0);
1207  bool isReading(false), isWriting(false);
1208  const UWord numAudSystems(UWord(inDevice.GetNumSupported(kDeviceGetNumBufferedAudioSystems)));
1209  for (NTV2AudioSystem audSys(NTV2_AUDIOSYSTEM_1); audSys < NTV2AudioSystem(numAudSystems); audSys = NTV2AudioSystem(audSys+1))
1210  if (inDevice.GetAudioMemoryOffset (0, addr, audSys))
1211  { ostringstream tag;
1212  tag << "Aud" << DEC(audSys+1);
1213  if (inDevice.IsAudioOutputRunning(audSys, isReading) && isReading)
1214  tag << " Read";
1215  if (inDevice.IsAudioInputRunning(audSys, isWriting) && isWriting)
1216  tag << " Write";
1217  TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ? string() : tag.str());
1218  }
1219  return true;
1220 }
1221 
1223 {
1224  const UWord numChannels (UWord(inDevice.GetNumSupported(kDeviceGetNumVideoChannels)) + (inDevice.HasMultiRasterWidget() ? 1 : 0));
1225  NTV2ChannelSet skipChannels;
1226  for (NTV2Channel chan(NTV2_CHANNEL1); chan < NTV2Channel(numChannels); chan = NTV2Channel(chan+1))
1227  {
1228  AUTOCIRCULATE_STATUS acStatus;
1229  bool isEnabled(false), isMultiFormat(false), isQuad(false), isQuadQuad(false), isSquares(false), isTSI(false);
1230  ostringstream tag;
1231  uint64_t addr(0), len(0);
1232  if (skipChannels.find(chan) != skipChannels.end())
1233  continue; // Skip this channel/framestore
1234  if (inDevice.AutoCirculateGetStatus (chan, acStatus) && !acStatus.IsStopped())
1235  {
1236  uint64_t tmp(0);
1237  inDevice.GetDeviceFrameInfo(acStatus.GetStartFrame(), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, tmp);
1238  inDevice.GetDeviceFrameInfo(acStatus.GetEndFrame(), chan, tmp, len);
1239  tag << "AC" << DEC(chan+1) << (acStatus.IsInput() ? " Write" : " Read");
1240  TagMemoryBlock(addr, tmp + len - addr, tag.str());
1241  } // if GetStatus succeeded
1242  else if (inDevice.IsChannelEnabled(chan, isEnabled) && isEnabled)
1243  {
1245  inDevice.GetMode(chan, mode);
1246  ULWord frameNum(0);
1247  if (NTV2_IS_INPUT_MODE(mode))
1248  inDevice.GetInputFrame(chan, frameNum);
1249  else
1250  inDevice.GetOutputFrame(chan, frameNum);
1251  inDevice.GetDeviceFrameInfo (UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
1252  if (inDevice.IsMultiRasterWidgetChannel(chan))
1253  tag << "MR" << DEC(chan+1); // MultiRaster Viewer
1254  else
1255  tag << "Ch" << DEC(chan+1);
1256  tag << (NTV2_IS_INPUT_MODE(mode) ? " Write" : " Read");
1257  TagMemoryBlock(addr, len, tag.str());
1258  }
1259  if (isSquares && chan == NTV2_CHANNEL1)
1260  {skipChannels.insert(NTV2_CHANNEL2); skipChannels.insert(NTV2_CHANNEL3); skipChannels.insert(NTV2_CHANNEL4);}
1261  else if (isSquares && chan == NTV2_CHANNEL5)
1262  {skipChannels.insert(NTV2_CHANNEL6); skipChannels.insert(NTV2_CHANNEL7); skipChannels.insert(NTV2_CHANNEL8);}
1263  else if (isQuad && !isQuadQuad && isTSI)
1264  {
1265  if (chan == NTV2_CHANNEL1)
1266  skipChannels.insert(NTV2_CHANNEL2);
1267  else if (chan == NTV2_CHANNEL3)
1268  skipChannels.insert(NTV2_CHANNEL4);
1269  else if (chan == NTV2_CHANNEL5)
1270  skipChannels.insert(NTV2_CHANNEL6);
1271  else if (chan == NTV2_CHANNEL7)
1272  skipChannels.insert(NTV2_CHANNEL8);
1273  }
1274  } // for each device channel
1275  if (!mIntrinsicSize)
1276  {
1278  inDevice.GetFrameBufferSize(NTV2_CHANNEL1, frmsz);
1279  mIntrinsicSize = ::NTV2FramesizeToByteCount(frmsz);
1280  }
1281  return true;
1282 }
1283 
1284 bool SDRAMAuditor::TagMemoryBlock (const ULWord inStartAddr, const ULWord inByteLength, const string & inTag)
1285 {
1286  if (inStartAddr % m8MB)
1287  return false;
1288  if (inByteLength % m8MB)
1289  return false;
1290  if (inTag.empty())
1291  return false;
1292  const UWord startFrm(UWord(inStartAddr / m8MB)), frmCnt(UWord(inByteLength / m8MB));
1293  for (UWord frm(0); frm < frmCnt; frm++)
1294  {
1295  UWord frameNum(startFrm + frm);
1296  NTV2StringSet & tags(mFrameTags[frameNum]);
1297  if (tags.find(inTag) == tags.end())
1298  {
1299  tags.insert(inTag);
1300  if (frameNum >= mNumFrames)
1301  tags.insert("Invalid");
1302  }
1303  }
1304  return true;
1305 }
virtual bool DeviceCanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2card.cpp:562
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:1172
virtual bool SetFrameBufferSize(const NTV2Framesize inSize)
Sets the device&#39;s intrinsic frame buffer size.
static NTV2BoolParamID StringToBoolParamID(std::string s)
Definition: ntv2card.cpp:977
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:462
True if device supports 3D video output over dual-stream SDI.
virtual bool IS_OUTPUT_SPIGOT_INVALID(const UWord inOutputSpigot)
Definition: ntv2card.cpp:280
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:537
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:572
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:567
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:209
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=(0))
Assesses the given device.
Definition: ntv2card.cpp:1028
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:578
True if HDMI in/out supports square-division (quad) raster conversion. (New in SDK 17...
See KONA 5.
Definition: ntv2enums.h:56
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:1180
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:293
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:520
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 has SFP connectors.
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:854
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:1048
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:320
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:987
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:1058
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:356
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:223
static std::string NumParamIDToString(const NTV2NumericParamID p)
Definition: ntv2card.cpp:756
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:344
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
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 has 25Gbps SFPs. (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:607
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:583
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:300
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:436
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:1098
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:588
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:488
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:1222
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:822
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:1204
The version number of the DAC on the device.
virtual uint64_t GetSerialNumber(void)
Answers with my serial number.
Definition: ntv2card.cpp:215
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:527
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:380
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:1162
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:272
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
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:307
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:365
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:7893
std::string NTV2BitfileTypeToString(const NTV2BitfileType inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7599
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
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:532
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:1073
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:997
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:202
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:184
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)
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:1007
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:612
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...