AJA NTV2 SDK  18.0.0.2717
NTV2 SDK 18.0.0.2717
ntv2devicescanner.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2devicescanner.h"
9 #include "ntv2devicefeatures.h"
10 #include "ntv2utils.h"
11 #include "ajabase/common/common.h"
12 #include "ajabase/system/debug.h"
13 #include "ajabase/system/lock.h"
14 #include <sstream>
15 #include "ajabase/system/info.h"
16 #include "ajabase/common/json.hpp"
17 #include <fstream>
18 #include "ajabase/system/file_io.h"
19 
20 using namespace std;
22 
23 
24 #define PLFAIL(__x__) AJA_sERROR (AJA_DebugUnit_Plugins, AJAFUNC << ": " << __x__)
25 #define PLWARN(__x__) AJA_sWARNING(AJA_DebugUnit_Plugins, AJAFUNC << ": " << __x__)
26 #define PLNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_Plugins, AJAFUNC << ": " << __x__)
27 #define PLINFO(__x__) AJA_sINFO (AJA_DebugUnit_Plugins, AJAFUNC << ": " << __x__)
28 #define PLDBUG(__x__) AJA_sDEBUG (AJA_DebugUnit_Plugins, AJAFUNC << ": " << __x__)
29 
30 
31 #if defined(NTV2_DEPRECATE_17_1)
32  // Abbreviated device info struct
33  typedef struct NTV2DeviceInfo
34  {
35  NTV2DeviceID deviceID;
36  string serialNumber;
37  string deviceIdentifier;
39 
40  typedef vector <NTV2DeviceInfo> NTV2DeviceInfoList;
41  typedef NTV2DeviceInfoList::const_iterator NTV2DeviceInfoListConstIter;
42 #else
43  bool CNTV2DeviceScanner::IsHexDigit (const char inChr)
44  { static const string sHexDigits("0123456789ABCDEFabcdef");
45  return sHexDigits.find(inChr) != string::npos;
46  }
47 
48  bool CNTV2DeviceScanner::IsDecimalDigit (const char inChr)
49  { static const string sDecDigits("0123456789");
50  return sDecDigits.find(inChr) != string::npos;
51  }
52 
53  bool CNTV2DeviceScanner::IsAlphaNumeric (const char inChr)
54  { static const string sLegalChars("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
55  return sLegalChars.find(inChr) != string::npos;
56  }
57 
58  bool CNTV2DeviceScanner::IsLegalDecimalNumber (const string & inStr, const size_t inMaxLength)
59  {
60  return aja::is_legal_decimal_number(inStr, inMaxLength);
61  }
62 
63  uint64_t CNTV2DeviceScanner::IsLegalHexSerialNumber (const string & inStr) // 0x3236333331375458
64  {
65  return aja::is_legal_hex_serial_number(inStr);
66  }
67 
68  bool CNTV2DeviceScanner::IsAlphaNumeric (const string & inStr)
69  {
70  for (size_t ndx(0); ndx < inStr.size(); ndx++)
71  if (!aja::is_alpha_numeric(inStr.at(ndx)))
72  return false;
73  return true;
74  }
75 #endif // !defined(NTV2_DEPRECATE_17_1)
76 
77 bool CNTV2DeviceScanner::IsLegalSerialNumber (const string & inStr)
78 {
79  if (inStr.length() != 8 && inStr.length() != 9)
80  return false;
81  return aja::is_alpha_numeric(inStr);
82 }
83 
86 
88 {
89  AJAAutoLock tmpLock(&sDevInfoListLock);
90  return sDevInfoList.size();
91 }
92 
93 #if defined(NTV2_DEPRECATE_17_1)
94  void ScanHardware (void)
95  {
96  AJAAutoLock tmpLock(&sDevInfoListLock);
97  sDevInfoList.clear();
98  UWord ndx(0);
99  do
100  {
101  CNTV2Card tmpDev(ndx);
102  if (!tmpDev.IsOpen())
103  break;
104  NTV2DeviceInfo info;
105  info.deviceID = tmpDev.GetDeviceID();
106  tmpDev.GetSerialNumberString(info.serialNumber);
107  info.deviceIdentifier = tmpDev.GetDisplayName();
108  sDevInfoList.push_back(info);
109  ndx++;
110  } while (ndx < 16);
111  }
112 #else // !defined(NTV2_DEPRECATE_17_1)
114 {
115  if (inScanNow)
116  ScanHardware();
117 }
118 
119  #if !defined(NTV2_DEPRECATE_16_3)
120  CNTV2DeviceScanner::CNTV2DeviceScanner (bool inScanNow, UWord inDeviceMask)
121  {
122  (void)inDeviceMask;
123  if (inScanNow)
124  ScanHardware();
125  }
126  #endif // !defined(NTV2_DEPRECATE_16_3)
127 
129 {
130  AJAAutoLock tmpLock(&sDevInfoListLock);
131  return sDevInfoList;
132 }
133 
134 
136 {
137  AJAAutoLock tmpLock(&sDevInfoListLock);
138  sDevInfoList.clear();
139 
140  for (UWord boardNum(0); ; boardNum++)
141  {
142  CNTV2Card tmpDev(boardNum);
143  if (!tmpDev.IsOpen())
144  break;
145  const NTV2DeviceID deviceID (tmpDev.GetDeviceID());
146 
147  if (deviceID != DEVICE_ID_NOTFOUND)
148  {
149  ostringstream oss;
150  NTV2DeviceInfo info;
151  info.deviceIndex = boardNum;
152  info.deviceID = deviceID;
153  tmpDev.GetSerialNumberString(info.serialNumber);
154 
155  oss << ::NTV2DeviceIDToString (deviceID, tmpDev.IsSupported(kDeviceHasMicrophoneInput)) << " - " << boardNum;
156 
157  info.deviceIdentifier = oss.str();
158  SetDeviceAttributes(info, tmpDev);
159  SetAudioAttributes(info, tmpDev);
160  sDevInfoList.push_back(info);
161  }
162  tmpDev.Close();
163  } // boardNum loop
164 
165  GetVDevList(sDevInfoList); // For VKONA support
166  GetCP2DevList(sDevInfoList); // For CP2 support
167 } // ScanHardware
168 
169 bool CNTV2DeviceScanner::DeviceIDPresent (const NTV2DeviceID inDeviceID, const bool inRescan)
170 {
171  AJAAutoLock tmpLock(&sDevInfoListLock);
172  if (inRescan)
173  ScanHardware();
174 
175  for (NTV2DeviceInfoListConstIter iter(sDevInfoList.begin()); iter != sDevInfoList.end(); ++iter)
176  if (iter->deviceID == inDeviceID)
177  return true; // Found!
178  return false; // Not found
179 
180 } // DeviceIDPresent
181 
182 
183 bool CNTV2DeviceScanner::GetDeviceInfo (const ULWord inDeviceIndexNumber, NTV2DeviceInfo & outDeviceInfo, const bool inRescan)
184 {
185  AJAAutoLock tmpLock(&sDevInfoListLock);
186  if (inRescan)
187  ScanHardware();
188 
189  for (NTV2DeviceInfoListConstIter iter(sDevInfoList.begin()); iter != sDevInfoList.end(); ++iter)
190  if (iter->deviceIndex == inDeviceIndexNumber)
191  {
192  outDeviceInfo = *iter;
193  return true; // Found!
194  }
195  return false; // No devices with this index number
196 
197 } // GetDeviceInfo
198 #endif // !defined(NTV2_DEPRECATE_17_1)
199 
200 bool CNTV2DeviceScanner::GetDeviceAtIndex (const ULWord inDeviceIndexNumber, CNTV2Card & outDevice)
201 {
202  outDevice.Close();
203  AJAAutoLock tmpLock(&sDevInfoListLock);
204  ScanHardware();
205  for (NTV2DeviceInfoListConstIter iter(sDevInfoList.begin()); iter != sDevInfoList.end(); ++iter)
206  if (iter->deviceIndex == inDeviceIndexNumber)
207  {
208  if (iter->isVirtualDevice)
209  return outDevice.Open(iter->vdevUrl);
210  else
211  return outDevice.Open(UWord(inDeviceIndexNumber));
212  }
213  return false; // No devices with this index number
214 
215 } // GetDeviceAtIndex
216 
217 
219 {
220  outDevice.Close();
221  AJAAutoLock tmpLock(&sDevInfoListLock);
222  ScanHardware();
223  for (size_t ndx(0); ndx < sDevInfoList.size(); ndx++)
224  if (sDevInfoList.at(ndx).deviceID == inDeviceID)
225  {
226  if (sDevInfoList.at(ndx).isVirtualDevice)
227  return outDevice.Open(sDevInfoList.at(ndx).vdevUrl);
228  else
229  return outDevice.Open(UWord(ndx));
230  }
231  return false; // Not found
232 
233 } // GetFirstDeviceWithID
234 
235 
236 bool CNTV2DeviceScanner::GetFirstDeviceWithName (const string & inNameSubString, CNTV2Card & outDevice)
237 {
238  outDevice.Close();
239  AJAAutoLock tmpLock(&sDevInfoListLock);
240  ScanHardware();
241  string nameSubString(inNameSubString); aja::lower(nameSubString);
242  for (size_t ndx(0); ndx < sDevInfoList.size(); ndx++)
243  {
244  string deviceName(sDevInfoList.at(ndx).deviceIdentifier); aja::lower(deviceName);
245  if (deviceName.find(nameSubString) != string::npos)
246  {
247  if (sDevInfoList.at(ndx).isVirtualDevice)
248  return outDevice.Open(sDevInfoList.at(ndx).vdevUrl);
249  else
250  return outDevice.Open(UWord(ndx));
251  }
252  }
253  if (nameSubString == "io4kplus")
254  { // Io4K+ == DNXIV...
255  nameSubString = "avid dnxiv";
256  for (size_t ndx(0); ndx < sDevInfoList.size(); ndx++)
257  {
258  string deviceName(sDevInfoList.at(ndx).deviceIdentifier); aja::lower(deviceName);
259  if (deviceName.find(nameSubString) != string::npos)
260  {
261  if (sDevInfoList.at(ndx).isVirtualDevice)
262  return outDevice.Open(sDevInfoList.at(ndx).vdevUrl);
263  else
264  return outDevice.Open(UWord(ndx));
265  }
266  }
267  }
268  return false; // Not found
269 
270 } // GetFirstDeviceWithName
271 
272 bool CNTV2DeviceScanner::GetVirtualDeviceWithName (const string & inNameString, CNTV2Card & outDevice, const bool inRescan)
273 {
274  outDevice.Close();
275  AJAAutoLock tmpLock(&sDevInfoListLock);
276  if (inRescan)
277  ScanHardware();
278  string nameString(inNameString); aja::lower(nameString);
279  for (size_t ndx(0); ndx < sDevInfoList.size(); ndx++)
280  {
281  if (!sDevInfoList.at(ndx).isVirtualDevice)
282  continue;
283  string deviceName(sDevInfoList.at(ndx).vdevName); aja::lower(deviceName);
284  if (deviceName == nameString)
285  {
286  return outDevice.Open(sDevInfoList.at(ndx).vdevUrl);
287  }
288  }
289  return false; // Not found
290 }
291 
292 bool CNTV2DeviceScanner::GetFirstDeviceWithSerial (const string & inSerialStr, CNTV2Card & outDevice)
293 {
294  outDevice.Close();
295  AJAAutoLock tmpLock(&sDevInfoListLock);
296  ScanHardware();
297  string searchSerialStr(inSerialStr); aja::lower(searchSerialStr);
298  for (size_t ndx(0); ndx < sDevInfoList.size(); ndx++)
299  {
300  string ser(sDevInfoList.at(ndx).serialNumber); aja::lower(ser);
301  if (ser.find(searchSerialStr) != string::npos)
302  {
303  if (sDevInfoList.at(ndx).isVirtualDevice)
304  return outDevice.Open(sDevInfoList.at(ndx).vdevUrl);
305  else
306  return outDevice.Open(UWord(ndx));
307  }
308  }
309  return false;
310 }
311 
312 
313 #if !defined(NTV2_DEPRECATE_17_5)
314 bool CNTV2DeviceScanner::GetDeviceWithSerial (const uint64_t inSerialNumber, CNTV2Card & outDevice)
315 {
316  const string serNumStr(::SerialNum64ToString(inSerialNumber));
317  return GetDeviceWithSerial(serNumStr, outDevice);
318 }
319 #endif // !defined(NTV2_DEPRECATE_17_5)
320 
321 bool CNTV2DeviceScanner::GetDeviceWithSerial (const string & inSerialNumber, CNTV2Card & outDevice)
322 {
323  outDevice.Close();
324  AJAAutoLock tmpLock(&sDevInfoListLock);
325  ScanHardware();
326  for (size_t ndx(0); ndx < sDevInfoList.size(); ndx++)
327  if (sDevInfoList.at(ndx).serialNumber == inSerialNumber)
328  {
329  if (sDevInfoList.at(ndx).isVirtualDevice)
330  return outDevice.Open(sDevInfoList.at(ndx).vdevUrl);
331  else
332  return outDevice.Open(UWord(ndx));
333  }
334  return false;
335 }
336 
337 
338 bool CNTV2DeviceScanner::GetFirstDeviceFromArgument (const string & inArgument, CNTV2Card & outDevice)
339 {
340  outDevice.Close();
341  if (inArgument.empty())
342  return false;
343 
344  // Special case: 'LIST' or '?' --- print an enumeration of available devices to stdout, then bail
345  AJAAutoLock tmpLock(&sDevInfoListLock);
346  ScanHardware();
347  string upperArg(inArgument); aja::upper(upperArg);
348  if (upperArg == "LIST" || upperArg == "?")
349  {
350  if (sDevInfoList.empty())
351  cout << "No devices detected" << endl;
352  else
353  cout << DEC(sDevInfoList.size()) << " available " << (sDevInfoList.size() == 1 ? "device:" : "devices:") << endl;
354  for (size_t ndx(0); ndx < sDevInfoList.size(); ndx++)
355  {
356  if (sDevInfoList.at(ndx).isVirtualDevice)
357  {
358  cout << DECN(ndx, 2) << " | " << setw(8) << "virtual";
359  if (!sDevInfoList.at(ndx).vdevName.empty())
360  cout << " | " << setw(10) << sDevInfoList.at(ndx).vdevName;
361  cout << " | " << sDevInfoList.at(ndx).vdevUrl << endl;
362  }
363  else
364  {
365  cout << DECN(ndx, 2) << " | " << setw(8) << "local";
366  const string serNum(sDevInfoList.at(ndx).serialNumber);
367  if (!serNum.empty())
368  cout << " | " << setw(10) << serNum;
369  cout << " | " << setw(16) << ::NTV2DeviceIDToString(sDevInfoList.at(ndx).deviceID);
370  cout << endl;
371  }
372  }
373  return false;
374  }
375 
376  for (NTV2DeviceInfoListConstIter iter (sDevInfoList.begin()); iter != sDevInfoList.end(); ++iter)
377  {
378  if (iter->isVirtualDevice)
379  { bool ok (false);
380  if (to_string(iter->deviceIndex) == inArgument
381  || iter->deviceIdentifier == inArgument
382  || iter->vdevName == inArgument
383  || (aja::is_legal_decimal_number(inArgument, inArgument.length())
384  && aja::is_legal_hex_serial_number(inArgument)
385  && iter->deviceID == NTV2DeviceID(stoi(inArgument))))
386  {
387  ok = outDevice.Open(iter->vdevUrl);
388  if (ok)
389  outDevice.setDeviceIndexNumber(UWord(iter->deviceIndex)); // Patch _boardNumber
390  return ok;
391  }
392  else if (IsLegalSerialNumber(inArgument))
393  return outDevice.Open(inArgument);
394  else if (inArgument.find("://") != string::npos)
395  return outDevice.Open(inArgument);
396  }
397  else
398  {
399  if (to_string(iter->deviceIndex) == inArgument)
400  return outDevice.Open(inArgument);
401  else if (iter->deviceIdentifier == inArgument)
402  return outDevice.Open(inArgument);
403  else if (aja::is_legal_decimal_number(inArgument, inArgument.length()) && aja::is_legal_hex_serial_number(inArgument) && iter->deviceID == NTV2DeviceID(stoi(inArgument)))
404  return outDevice.Open(inArgument);
405  else if (IsLegalSerialNumber(inArgument))
406  return outDevice.Open(inArgument);
407  else if (inArgument.find("://") != string::npos)
408  return outDevice.Open(inArgument);
409  }
410  }
411  return outDevice.Open(inArgument);
412 } // GetFirstDeviceFromArgument
413 
414 
416 { // Name that will find given device via CNTV2DeviceScanner::GetFirstDeviceFromArgument
417  if (!inDevice.IsOpen())
418  return string();
419  // Nub address 1st...
420  if (!inDevice.GetHostName().empty() && inDevice.IsRemote())
421  return inDevice.GetHostName(); // Nub host/device
422 
423  // Serial number 2nd...
424  string str;
425  if (inDevice.GetSerialNumberString(str))
426  return str;
427 
428  // Model name 3rd...
429  str = ::NTV2DeviceIDToString(inDevice.GetDeviceID(), false);
430  if (!str.empty() && str != "???")
431  return str;
432 
433  // Index number last...
434  ostringstream oss; oss << DEC(inDevice.GetIndexNumber());
435  return oss.str();
436 }
437 
438 
439 #if !defined(NTV2_DEPRECATE_17_1)
440 ostream & operator << (ostream & inOutStr, const NTV2DeviceInfoList & inList)
441 {
442  for (NTV2DeviceInfoListConstIter iter(inList.begin()); iter != inList.end(); ++iter)
443  inOutStr << " " << *iter;
444  return inOutStr;
445 
446 } // NTV2DeviceInfoList ostream operator <<
447 
448 
450 {
451  const NTV2DeviceInfo & first (*this);
452  size_t diffs (0);
453 
454  // 'memcmp' would be simpler, but because NTV2DeviceInfo has no constructor, the unfilled bytes in
455  // its "boardIdentifier" field are indeterminate, making it worthless for accurate comparisons.
456  // "boardSerialNumber" and boardNumber are the only required comparisons, but I also check boardType,
457  // boardID, and pciSlot for good measure...
458  if (first.deviceID != second.deviceID) diffs++;
459  if (first.deviceIndex != second.deviceIndex) diffs++;
460  if (first.serialNumber != second.serialNumber) diffs++;
461  if (first.pciSlot != second.pciSlot) diffs++;
462 
463  // Needs to be fixed now that deviceIdentifier is a std::string
464  //#if defined (AJA_DEBUG)
465  // if (::strncmp (first.deviceIdentifier.c_str (), second.deviceIdentifier.c_str (), first.deviceIdentifier.length ()))) diffs++;
466  // if (diffs)
467  // {cout << "## DEBUG: " << diffs << " diff(s):" << endl << "#### first ####" << endl << first << "#### second ####" << endl << second << endl;}
468  //#endif // AJA_DEBUG
469 
470  return diffs ? false : true;
471 
472 } // equality operator
473 
475 {
476  deviceID = DEVICE_ID_INVALID;
477  deviceIndex = 0;
478  pciSlot = 0;
479  deviceSerialNumber = 0;
480  serialNumber = "";
481  numVidInputs = 0;
482  numVidOutputs = 0;
483  numAnlgVidInputs = 0;
484  numAnlgVidOutputs = 0;
485  numHDMIVidInputs = 0;
486  numHDMIVidOutputs = 0;
487  numInputConverters = 0;
488  numOutputConverters = 0;
489  numUpConverters = 0;
490  numDownConverters = 0;
491  downConverterDelay = 0;
492  isoConvertSupport = false;
493  rateConvertSupport = false;
494  dvcproHDSupport = false;
495  qrezSupport = false;
496  hdvSupport = false;
497  quarterExpandSupport = false;
498  vidProcSupport = false;
499  dualLinkSupport = false;
500  colorCorrectionSupport = false;
501  programmableCSCSupport = false;
502  rgbAlphaOutputSupport = false;
503  breakoutBoxSupport = false;
504  procAmpSupport = false;
505  has2KSupport = false;
506  has4KSupport = false;
507  has8KSupport = false;
508  has3GLevelConversion = false;
509  proResSupport = false;
510  sdi3GSupport = false;
511  sdi12GSupport = false;
512  ipSupport = false;
513  biDirectionalSDI = false;
514  ltcInSupport = false;
515  ltcOutSupport = false;
516  ltcInOnRefPort = false;
517  stereoOutSupport = false;
518  stereoInSupport = false;
519  multiFormat = false;
520  numAudioStreams = 0;
521  numAnalogAudioInputChannels = 0;
522  numAESAudioInputChannels = 0;
523  numEmbeddedAudioInputChannels = 0;
524  numHDMIAudioInputChannels = 0;
525  numAnalogAudioOutputChannels = 0;
526  numAESAudioOutputChannels = 0;
527  numEmbeddedAudioOutputChannels = 0;
528  numHDMIAudioOutputChannels = 0;
529  numDMAEngines = 0;
530  numSerialPorts = 0;
531  pingLED = 0;
532  deviceIdentifier.clear();
533  audioSampleRateList.clear();
534  audioNumChannelsList.clear();
535  audioBitsPerSampleList.clear();
536  audioInSourceList.clear();
537  audioOutSourceList.clear();
538 }
539 
541 {
542  if (&info != this)
543  *this = info;
544 }
545 
546 
548  const NTV2DeviceInfoList & inNewList,
549  NTV2DeviceInfoList & outBoardsAdded,
550  NTV2DeviceInfoList & outBoardsRemoved)
551 {
552  NTV2DeviceInfoListConstIter oldIter (inOldList.begin ());
553  NTV2DeviceInfoListConstIter newIter (inNewList.begin ());
554 
555  outBoardsAdded.clear ();
556  outBoardsRemoved.clear ();
557 
558  while (true)
559  {
560  if (oldIter == inOldList.end () && newIter == inNewList.end ())
561  break; // Done -- exit
562 
563  if (oldIter != inOldList.end () && newIter != inNewList.end ())
564  {
565  const NTV2DeviceInfo & oldInfo (*oldIter), newInfo (*newIter);
566 
567  if (oldInfo != newInfo)
568  {
569  // Out with the old...
570  outBoardsRemoved.push_back (oldInfo);
571 
572  // In with the new...
573  if (newInfo.deviceID && newInfo.deviceID != NTV2DeviceID(0xFFFFFFFF))
574  outBoardsAdded.push_back (newInfo);
575  } // if mismatch
576 
577  ++oldIter;
578  ++newIter;
579  continue; // Move along
580 
581  } // if both valid
582 
583  if (oldIter != inOldList.end () && newIter == inNewList.end ())
584  {
585  outBoardsRemoved.push_back (*oldIter);
586  ++oldIter;
587  continue; // Move along
588  } // old is valid, new is not valid
589 
590  if (oldIter == inOldList.end () && newIter != inNewList.end ())
591  {
592  if (newIter->deviceID && newIter->deviceID != NTV2DeviceID(0xFFFFFFFF))
593  outBoardsAdded.push_back (*newIter);
594  ++newIter;
595  continue; // Move along
596  } // old is not valid, new is valid
597 
598  NTV2_ASSERT(false && "should never get here");
599 
600  } // loop til break
601 
602  // Return 'true' if there were any changes...
603  return !outBoardsAdded.empty () || !outBoardsRemoved.empty ();
604 
605 } // CompareDeviceInfoLists
606 
607 
608 ostream & operator << (ostream & inOutStr, const NTV2AudioSampleRateList & inList)
609 {
610  for (NTV2AudioSampleRateListConstIter iter (inList.begin ()); iter != inList.end (); ++iter)
611  inOutStr << " " << *iter;
612 
613  return inOutStr;
614 }
615 
616 
617 ostream & operator << (ostream & inOutStr, const NTV2AudioChannelsPerFrameList & inList)
618 {
619  for (NTV2AudioChannelsPerFrameListConstIter iter (inList.begin ()); iter != inList.end (); ++iter)
620  inOutStr << " " << *iter;
621 
622  return inOutStr;
623 }
624 
625 
626 ostream & operator << (ostream & inOutStr, const NTV2AudioSourceList & inList)
627 {
628  for (NTV2AudioSourceListConstIter iter(inList.begin()); iter != inList.end(); ++iter)
629  switch (*iter) // AudioSourceEnum
630  {
631  case kSourceSDI: return inOutStr << " SDI";
632  case kSourceAES: return inOutStr << " AES";
633  case kSourceADAT: return inOutStr << " ADAT";
634  case kSourceAnalog: return inOutStr << " Analog";
635  case kSourceNone: return inOutStr << " None";
636  case kSourceAll: return inOutStr << " All";
637  }
638  return inOutStr << " ???";
639 }
640 
641 
642 ostream & operator << (ostream & inOutStr, const NTV2AudioBitsPerSampleList & inList)
643 {
644  for (NTV2AudioBitsPerSampleListConstIter iter (inList.begin ()); iter != inList.end (); ++iter)
645  inOutStr << " " << *iter;
646 
647  return inOutStr;
648 }
649 
650 
651 ostream & operator << (ostream & inOutStr, const NTV2DeviceInfo & inInfo)
652 {
653  inOutStr << "Device Info for '" << inInfo.deviceIdentifier << "'" << endl
654  << " Device Index Number: " << inInfo.deviceIndex << endl
655  << " Device ID: 0x" << hex << inInfo.deviceID << dec << endl
656  << " Serial Number: " << inInfo.serialNumber << endl
657  << " PCI Slot: 0x" << hex << inInfo.pciSlot << dec << endl
658  << " Video Inputs: " << inInfo.numVidInputs << endl
659  << " Video Outputs: " << inInfo.numVidOutputs << endl
660  #if defined (_DEBUG)
661  << " Analog Video Inputs: " << inInfo.numAnlgVidInputs << endl
662  << " Analog Video Outputs: " << inInfo.numAnlgVidOutputs << endl
663  << " HDMI Video Inputs: " << inInfo.numHDMIVidInputs << endl
664  << " HDMI Video Outputs: " << inInfo.numHDMIVidOutputs << endl
665  << " Input Converters: " << inInfo.numInputConverters << endl
666  << " Output Converters: " << inInfo.numOutputConverters << endl
667  << " Up Converters: " << inInfo.numUpConverters << endl
668  << " Down Converters: " << inInfo.numDownConverters << endl
669  << " Down Converter Delay: " << inInfo.downConverterDelay << endl
670  << " DVCProHD: " << (inInfo.dvcproHDSupport ? "Y" : "N") << endl
671  << " Qrez: " << (inInfo.qrezSupport ? "Y" : "N") << endl
672  << " HDV: " << (inInfo.hdvSupport ? "Y" : "N") << endl
673  << " Quarter Expand: " << (inInfo.quarterExpandSupport ? "Y" : "N") << endl
674  << " ISO Convert: " << (inInfo.isoConvertSupport ? "Y" : "N") << endl
675  << " Rate Convert: " << (inInfo.rateConvertSupport ? "Y" : "N") << endl
676  << " VidProc: " << (inInfo.vidProcSupport ? "Y" : "N") << endl
677  << " Dual-Link: " << (inInfo.dualLinkSupport ? "Y" : "N") << endl
678  << " Color-Correction: " << (inInfo.colorCorrectionSupport ? "Y" : "N") << endl
679  << " Programmable CSC: " << (inInfo.programmableCSCSupport ? "Y" : "N") << endl
680  << " RGB Alpha Output: " << (inInfo.rgbAlphaOutputSupport ? "Y" : "N") << endl
681  << " Breakout Box: " << (inInfo.breakoutBoxSupport ? "Y" : "N") << endl
682  << " ProcAmp: " << (inInfo.procAmpSupport ? "Y" : "N") << endl
683  << " 2K: " << (inInfo.has2KSupport ? "Y" : "N") << endl
684  << " 4K: " << (inInfo.has4KSupport ? "Y" : "N") << endl
685  << " 8K: " << (inInfo.has8KSupport ? "Y" : "N") << endl
686  << " 3G Level Conversion: " << (inInfo.has3GLevelConversion ? "Y" : "N") << endl
687  << " ProRes: " << (inInfo.proResSupport ? "Y" : "N") << endl
688  << " SDI 3G: " << (inInfo.sdi3GSupport ? "Y" : "N") << endl
689  << " SDI 12G: " << (inInfo.sdi12GSupport ? "Y" : "N") << endl
690  << " IP: " << (inInfo.ipSupport ? "Y" : "N") << endl
691  << " SDI Bi-Directional: " << (inInfo.biDirectionalSDI ? "Y" : "N") << endl
692  << " LTC In: " << (inInfo.ltcInSupport ? "Y" : "N") << endl
693  << " LTC Out: " << (inInfo.ltcOutSupport ? "Y" : "N") << endl
694  << " LTC In on Ref Port: " << (inInfo.ltcInOnRefPort ? "Y" : "N") << endl
695  << " Stereo Out: " << (inInfo.stereoOutSupport ? "Y" : "N") << endl
696  << " Stereo In: " << (inInfo.stereoInSupport ? "Y" : "N") << endl
697  << " Audio Sample Rates: " << inInfo.audioSampleRateList << endl
698  << " AudioNumChannelsList: " << inInfo.audioNumChannelsList << endl
699  << " AudioBitsPerSampleList: " << inInfo.audioBitsPerSampleList << endl
700  << " AudioInSourceList: " << inInfo.audioInSourceList << endl
701  << " AudioOutSourceList: " << inInfo.audioOutSourceList << endl
702  << " Audio Streams: " << inInfo.numAudioStreams << endl
703  << " Analog Audio Input Channels: " << inInfo.numAnalogAudioInputChannels << endl
704  << " Analog Audio Output Channels: " << inInfo.numAnalogAudioOutputChannels << endl
705  << " AES Audio Input Channels: " << inInfo.numAESAudioInputChannels << endl
706  << " AES Audio Output Channels: " << inInfo.numAESAudioOutputChannels << endl
707  << " Embedded Audio Input Channels: " << inInfo.numEmbeddedAudioInputChannels << endl
708  << " Embedded Audio Output Channels: " << inInfo.numEmbeddedAudioOutputChannels << endl
709  << " HDMI Audio Input Channels: " << inInfo.numHDMIAudioInputChannels << endl
710  << " HDMI Audio Output Channels: " << inInfo.numHDMIAudioOutputChannels << endl
711  << " DMA Engines: " << inInfo.numDMAEngines << endl
712  << " Serial Ports: " << inInfo.numSerialPorts << endl
713  #endif // AJA_DEBUG
714  << "";
715 
716  return inOutStr;
717 
718 } // NTV2DeviceInfo ostream operator <<
719 
720 
721 ostream & operator << (ostream & inOutStr, const NTV2AudioPhysicalFormat & inFormat)
722 {
723  inOutStr << "AudioPhysicalFormat:" << endl
724  << " boardNumber: " << inFormat.boardNumber << endl
725  << " sampleRate: " << inFormat.sampleRate << endl
726  << " numChannels: " << inFormat.numChannels << endl
727  << " bitsPerSample: " << inFormat.bitsPerSample << endl
728  #if defined (DEBUG) || defined (AJA_DEBUG)
729  << " sourceIn: 0x" << hex << inFormat.sourceIn << dec << endl
730  << " sourceOut: 0x" << hex << inFormat.sourceOut << dec << endl
731  #endif // DEBUG or AJA_DEBUG
732  ;
733 
734  return inOutStr;
735 
736 } // AudioPhysicalFormat ostream operator <<
737 
738 
739 std::ostream & operator << (std::ostream & inOutStr, const NTV2AudioPhysicalFormatList & inList)
740 {
741  for (NTV2AudioPhysicalFormatListConstIter iter (inList.begin ()); iter != inList.end (); ++iter)
742  inOutStr << *iter;
743 
744  return inOutStr;
745 
746 } // AudioPhysicalFormatList ostream operator <<
747 
748 
749 // Private methods
750 
751 void CNTV2DeviceScanner::SetDeviceAttributes (NTV2DeviceInfo & inDeviceInfo, CNTV2Card & inDevice)
752 {
753  inDevice.GetSerialNumberString(inDeviceInfo.serialNumber);
754  const ULWordSet wgtIDs (inDevice.GetSupportedItems(kNTV2EnumsID_WidgetID));
755  inDeviceInfo.numVidInputs = inDevice.GetNumSupported(kDeviceGetNumVideoInputs);
766  inDeviceInfo.dvcproHDSupport = inDevice.IsSupported(kDeviceCanDoDVCProHD);
767  inDeviceInfo.qrezSupport = inDevice.IsSupported(kDeviceCanDoQREZ);
768  inDeviceInfo.hdvSupport = inDevice.IsSupported(kDeviceCanDoHDV);
773  inDeviceInfo.breakoutBoxSupport = inDevice.IsSupported(kDeviceCanDoBreakoutBox);
774  inDeviceInfo.vidProcSupport = inDevice.IsSupported(kDeviceCanDoVideoProcessing);
775  inDeviceInfo.dualLinkSupport = inDevice.IsSupported(kDeviceCanDoDualLink);
777  inDeviceInfo.pingLED = inDevice.GetNumSupported(kDeviceGetPingLED);
778  inDeviceInfo.has2KSupport = inDevice.IsSupported(kDeviceCanDo2KVideo);
779  inDeviceInfo.has4KSupport = inDevice.IsSupported(kDeviceCanDo4KVideo);
780  inDeviceInfo.has8KSupport = inDevice.IsSupported(kDeviceCanDo8KVideo);
782  inDeviceInfo.isoConvertSupport = inDevice.IsSupported(kDeviceCanDoIsoConvert);
783  inDeviceInfo.rateConvertSupport = inDevice.IsSupported(kDeviceCanDoRateConvert);
784  inDeviceInfo.proResSupport = inDevice.IsSupported(kDeviceCanDoProRes);
785  inDeviceInfo.sdi3GSupport = wgtIDs.find(NTV2_Wgt3GSDIOut1) != wgtIDs.end();
786  inDeviceInfo.sdi12GSupport = inDevice.IsSupported(kDeviceCanDo12GSDI);
787  inDeviceInfo.ipSupport = inDevice.IsSupported(kDeviceCanDoIP);
789  inDeviceInfo.ltcInSupport = inDevice.GetNumSupported(kDeviceGetNumLTCInputs) > 0;
790  inDeviceInfo.ltcOutSupport = inDevice.GetNumSupported(kDeviceGetNumLTCOutputs) > 0;
791  inDeviceInfo.ltcInOnRefPort = inDevice.IsSupported(kDeviceCanDoLTCInOnRefPort);
792  inDeviceInfo.stereoOutSupport = inDevice.IsSupported(kDeviceCanDoStereoOut);
793  inDeviceInfo.stereoInSupport = inDevice.IsSupported(kDeviceCanDoStereoIn);
794  inDeviceInfo.multiFormat = inDevice.IsSupported(kDeviceCanDoMultiFormat);
796  inDeviceInfo.procAmpSupport = false;
797 }
798 
799 void CNTV2DeviceScanner::SetAudioAttributes (NTV2DeviceInfo & info, CNTV2Card & inBoard)
800 {
801  // Start with empty lists...
802  info.audioSampleRateList.clear();
803  info.audioNumChannelsList.clear();
804  info.audioBitsPerSampleList.clear();
805  info.audioInSourceList.clear();
806  info.audioOutSourceList.clear();
807 
808 
810  {
811  ULWord audioControl;
812  inBoard.ReadRegister(kRegAud1Control, audioControl);
813 
814  //audioSampleRateList
815  info.audioSampleRateList.push_back(k48KHzSampleRate);
816  if (inBoard.IsSupported(kDeviceCanDoAudio96K))
817  info.audioSampleRateList.push_back(k96KHzSampleRate);
818 
819  //audioBitsPerSampleList
821 
822  //audioInSourceList
823  info.audioInSourceList.push_back(kSourceSDI);
824  if (audioControl & BIT(21))
825  info.audioInSourceList.push_back(kSourceAES);
827  info.audioInSourceList.push_back(kSourceAnalog);
828 
829  //audioOutSourceList
830  info.audioOutSourceList.push_back(kSourceAll);
831 
832  //audioNumChannelsList
839 
841  }
842 
851 
852 } // SetAudioAttributes
853 
854 bool CNTV2DeviceScanner::GetVDevList (NTV2DeviceInfoList & outVDevList)
855 {
856 #if defined(NTV2_PREVENT_PLUGIN_LOAD)
857  return false; // Plugin loading disabled, therefore no virtual devices
858 #else // else NTV2_PREVENT_PLUGIN_LOAD
859  string vdevPath (::NTV2GetVDevFolderPath());
860  if (vdevPath.empty())
861  return false;
862  ULWord vdIndex (ULWord(outVDevList.size()));
863  NTV2StringList vdevFiles;
864  AJAFileIO::ReadDirectory(vdevPath, "*.vdev", vdevFiles);
865  for (const auto & vdevFile : vdevFiles)
866  {
867  json vdevJson;
868  {
869  std::ifstream vf(vdevFile);
870  if (!vf.is_open())
871  {PLFAIL("Unable to open '" << vdevFile << "'"); return false;}
872  try
873  {
874  vdevJson = json::parse(vf);
875  }
876  catch (const json::parse_error& e)
877  {
878  PLFAIL("Invalid JSON at byte " << e.byte << " in '" << vdevFile << "': " << e.what() << ", exceptionID " << e.id);
879  return false;
880  }
881  }
882 
883  NTV2DeviceInfo newVDev;
884  newVDev.isVirtualDevice = true;
885  newVDev.deviceIndex = vdIndex++;
886  newVDev.deviceID = DEVICE_ID_SOFTWARE;
887  newVDev.deviceIdentifier = "";
888  newVDev.vdevName = "";
889 
890  // EXPECTED JSON KEYS:
891  // "urlspec" [required] Specifies urlspec used to load the plugin. NOTE: It must have at least one query param in the URL.
892  // "name" [optional] Specifies a human-readable name for the device.
893  // If not specified, the .vdev file's base name is used instead.
894  auto pluginVal (vdevJson["plugin"]), nameVal (vdevJson["name"]), hostVal (vdevJson["host"]), urlspecVal (vdevJson["urlspec"]);
895  if (urlspecVal.is_null())
896  {PLFAIL("File '" << vdevFile << "': missing required 'urlspec' parameter"); continue;}
897  newVDev.vdevUrl = urlspecVal.get<std::string>(); // done, we have the vdevUrl
898  if (!pluginVal.is_null())
899  PLWARN("File '" << vdevFile << "': 'plugin' parameter ignored");
900  if (!hostVal.is_null())
901  PLWARN("File '" << vdevFile << "': 'host' parameter ignored");
902  if (!nameVal.is_null())
903  newVDev.vdevName = nameVal.get<std::string>(); // Name specified in JSON file
904  { // URLencode & append these URL params: &vdevfname= &vdevfpath= &vdevname= &vdevbasename=
905  newVDev.vdevUrl += "&" kQParamVDevFolderPath "=" + ::PercentEncode(vdevPath);
906  string fName (vdevFile);
907  fName.erase(fName.find(vdevPath), vdevPath.length()+1); // Remove everything up to file name
908  newVDev.vdevUrl += "&" kQParamVDevFileName "=" + ::PercentEncode(fName); // Remember file name
909  fName.erase(fName.length()-5, 5); // Lop off file name extension
910  if (newVDev.vdevName.empty())
911  newVDev.vdevName = fName; // Use file base name if no name specified in JSON file
912  newVDev.vdevUrl += "&" kQParamVDevName "=" + ::PercentEncode(newVDev.vdevName); // Remember name
913  ostringstream oss; oss << DEC(newVDev.deviceIndex);
914  newVDev.vdevUrl += "&" kQParamVDevIndex "=" + oss.str(); // Remember index number
915  }
916  if (!newVDev.vdevName.empty())
917  { ostringstream oss; oss << newVDev.vdevName << " - " << newVDev.deviceIndex;
918  newVDev.deviceIdentifier = oss.str();
919  }
920 
921  outVDevList.push_back(newVDev);
922  } // for each vdev file found
923  return true;
924 #endif // else NTV2_PREVENT_PLUGIN_LOAD
925 } // GetVDevList
926 
927 bool CNTV2DeviceScanner::GetCP2DevList (NTV2DeviceInfoList & outVDevList)
928 {
929 #if defined(NTV2_PREVENT_PLUGIN_LOAD)
930  return false; // Plugin loading disabled, therefore no virtual devices
931 #else // else NTV2_PREVENT_PLUGIN_LOAD
932  string vdevPath;
934  if (pathInfo.GetValue(AJA_SystemInfoTag_Path_PersistenceStoreUser, vdevPath) != AJA_STATUS_SUCCESS)
935  return false;
936  }
937  vdevPath += "virtualdevices";
938  ULWord vdIndex = ULWord(outVDevList.size());
939  NTV2StringList vdevFiles;
940  AJAFileIO::ReadDirectory(vdevPath, "*.vdev", vdevFiles);
941  for (const auto & vdevFile : vdevFiles)
942  {
943  json vdevJson;
944  {
945  std::ifstream vf(vdevFile);
946  if (!vf.is_open())
947  {PLFAIL("Unable to open '" << vdevFile << "'"); return false;}
948  try
949  {
950  vdevJson = json::parse(vf);
951  }
952  catch (const json::parse_error& e)
953  {
954  PLFAIL("Invalid JSON at byte " << e.byte << " in '" << vdevFile << "': " << e.what() << ", exceptionID " << e.id);
955  return false;
956  }
957  }
958 
959  NTV2DeviceInfo newVDev;
960  newVDev.isVirtualDevice = true;
961  newVDev.deviceIndex = vdIndex++;
962  newVDev.deviceID = DEVICE_ID_SOFTWARE;
963  newVDev.deviceIdentifier = "";
964  newVDev.vdevName = "";
965 
966  // EXPECTED JSON KEYS:
967  // "plugin" [required] Specifies name of plugin to be loaded.
968  // "name" [optional] Specifies a human-readable name for the device.
969  // "host" [optional] Specifies host to use in the plugin URL. Defaults to "localhost".
970  string hostName;
971  auto pluginVal (vdevJson["plugin"]), nameVal (vdevJson["name"]), hostVal (vdevJson["host"]), urlspecVal (vdevJson["urlspec"]);
972  if (pluginVal.is_null())
973  {PLFAIL("File: '" << vdevFile << "' missing required 'plugin' parameter"); continue;}
974  if (!urlspecVal.is_null())
975  PLWARN("File: '" << vdevFile << "' 'urlspec' parameter ignored");
976 
977  newVDev.vdevUrl = pluginVal.get<std::string>();
978  if (!nameVal.is_null())
979  {
980  ostringstream oss;
981  oss << nameVal.get<std::string>() << " - " << newVDev.deviceIndex;
982  newVDev.deviceIdentifier = oss.str();
983  newVDev.vdevName = nameVal.get<std::string>();
984  }
985 
986  if (!hostVal.is_null())
987  hostName = hostVal.get<std::string>();
988  if (hostName.empty())
989  hostName = "localhost";
990  newVDev.vdevUrl += "://" + hostName + "/?";
991 
992  NTV2StringList params;
993  for (auto it (vdevJson.begin()); it != vdevJson.end(); ++it)
994  if (it.key() != "plugin" && it.key() != "name" && it.key() != "host")
995  {
996  auto paramValStr = to_string(it.value());
997  aja::strip(paramValStr, "\"");
998  params.push_back(it.key() + "=" + ::PercentEncode(paramValStr));
999  }
1000 
1001  if (!newVDev.deviceIdentifier.empty())
1002  params.push_back("displayname=" + ::PercentEncode(newVDev.deviceIdentifier));
1003  const string queryStr(aja::join(params, "&"));
1004  if (!queryStr.empty())
1005  newVDev.vdevUrl += "?" + queryStr;
1006  outVDevList.push_back(newVDev);
1007  } // for each .vdev file found
1008  return true;
1009 #endif // else NTV2_PREVENT_PLUGIN_LOAD
1010 } // GetCP2DeviceList
1011 
1012 #endif // !defined(NTV2_DEPRECATE_17_1)
AJA_SystemInfoSection_Path
@ AJA_SystemInfoSection_Path
Definition: info.h:63
CNTV2DeviceScanner::IsLegalHexSerialNumber
static uint64_t IsLegalHexSerialNumber(const std::string &inStr)
Definition: ntv2devicescanner.cpp:63
kQParamVDevIndex
#define kQParamVDevIndex
Device index number for .vdev virtual device.
Definition: ntv2nubaccess.h:45
kDeviceGetNumVideoInputs
@ kDeviceGetNumVideoInputs
The number of SDI video inputs on the device.
Definition: ntv2devicefeatures.h:212
kDeviceHasBiDirectionalSDI
@ kDeviceHasBiDirectionalSDI
True if device SDI connectors are bi-directional.
Definition: ntv2devicefeatures.h:93
NTV2AudioPhysicalFormat::sourceIn
AudioSourceEnum sourceIn
Definition: ntv2devicescanner.h:180
kDeviceCanDoAudio6Channels
@ kDeviceCanDoAudio6Channels
True if audio system(s) support 6 or more audio channels.
Definition: ntv2devicefeatures.h:50
kNumAudioChannels6
@ kNumAudioChannels6
Definition: ntv2audiodefines.h:41
info.h
Declares the AJASystemInfo class.
NTV2DeviceInfo::audioOutSourceList
NTV2AudioSourceList audioOutSourceList
My supported audio output destinations (AES, etc.)
Definition: ntv2devicescanner.h:89
NTV2DeviceInfo::quarterExpandSupport
bool quarterExpandSupport
Definition: ntv2devicescanner.h:62
CNTV2DeviceScanner::DeviceIDPresent
static bool DeviceIDPresent(const NTV2DeviceID inDeviceID, const bool inRescan=(0))
Definition: ntv2devicescanner.cpp:169
NTV2DeviceInfo::numAnalogAudioInputChannels
UWord numAnalogAudioInputChannels
Total number of analog audio input channels.
Definition: ntv2devicescanner.h:91
NTV2DeviceInfo::biDirectionalSDI
bool biDirectionalSDI
Supports Bi-directional SDI.
Definition: ntv2devicescanner.h:78
NTV2DeviceInfo::audioBitsPerSampleList
NTV2AudioBitsPerSampleList audioBitsPerSampleList
My supported audio bits-per-sample.
Definition: ntv2devicescanner.h:87
kDeviceCanDoIP
@ kDeviceCanDoIP
True if device has SFP connectors.
Definition: ntv2devicefeatures.h:129
AJA_SystemInfoMemoryUnit_Megabytes
@ AJA_SystemInfoMemoryUnit_Megabytes
Definition: info.h:23
kSourceAnalog
@ kSourceAnalog
Definition: ntv2audiodefines.h:69
kDeviceCanDoVideoProcessing
@ kDeviceCanDoVideoProcessing
True if device can do video processing.
Definition: ntv2devicefeatures.h:90
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::exception::what
const char * what() const noexcept override
returns the explanatory string
Definition: json.hpp:4375
NTV2DeviceInfo::numDownConverters
UWord numDownConverters
Total number of down-converters.
Definition: ntv2devicescanner.h:55
NTV2DeviceInfo::numAnlgVidOutputs
UWord numAnlgVidOutputs
Total number of analog video outputs.
Definition: ntv2devicescanner.h:49
NTV2AudioPhysicalFormat::bitsPerSample
AudioBitsPerSampleEnum bitsPerSample
Definition: ntv2devicescanner.h:179
ntv2devicefeatures.h
Declares device capability functions.
CNTV2MacDriverInterface::ReadRegister
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device....
Definition: ntv2macdriverinterface.cpp:405
NTV2DeviceInfo::has3GLevelConversion
bool has3GLevelConversion
Supports 3G Level Conversion?
Definition: ntv2devicescanner.h:73
NTV2DeviceInfo::rateConvertSupport
bool rateConvertSupport
Definition: ntv2devicescanner.h:58
NTV2DeviceInfo::numHDMIVidInputs
UWord numHDMIVidInputs
Total number of HDMI inputs.
Definition: ntv2devicescanner.h:50
aja::strip
std::string & strip(std::string &str, const std::string &ws)
Definition: common.cpp:461
kDeviceGetNumDownConverters
@ kDeviceGetNumDownConverters
The number of down-converters on the device.
Definition: ntv2devicefeatures.h:196
kDeviceCanDoHDV
@ kDeviceCanDoHDV
True if device can squeeze/stretch between 1920x1080 and 1440x1080.
Definition: ntv2devicefeatures.h:65
PLWARN
#define PLWARN(__x__)
Definition: ntv2devicescanner.cpp:25
NTV2DeviceInfo::sdi12GSupport
bool sdi12GSupport
Supports 12G?
Definition: ntv2devicescanner.h:76
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:381
aja::join
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
kDeviceGetNumAnalogAudioInputChannels
@ kDeviceGetNumAnalogAudioInputChannels
The number of analog audio input channels on the device.
Definition: ntv2devicefeatures.h:189
kQParamVDevFolderPath
#define kQParamVDevFolderPath
Path to folder containing .vdev files.
Definition: ntv2nubaccess.h:42
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:529
NTV2DeviceInfo::ltcInSupport
bool ltcInSupport
Accepts LTC input?
Definition: ntv2devicescanner.h:79
kDeviceGetNumEmbeddedAudioOutputChannels
@ kDeviceGetNumEmbeddedAudioOutputChannels
The number of SDI-embedded output audio channels supported by the device.
Definition: ntv2devicefeatures.h:198
GetDeviceInfoList
NTV2DeviceInfoList GetDeviceInfoList(void)
Definition: ntv2devicescanner.cpp:128
NTV2DeviceInfo::vdevUrl
std::string vdevUrl
Definition: ntv2devicescanner.h:103
kSourceSDI
@ kSourceSDI
Definition: ntv2audiodefines.h:66
NTV2AudioSourceListConstIter
NTV2AudioSourceList::const_iterator NTV2AudioSourceListConstIter
Definition: ntv2devicescanner.h:28
NTV2DeviceInfo::numHDMIVidOutputs
UWord numHDMIVidOutputs
Total number of HDMI outputs.
Definition: ntv2devicescanner.h:51
sDevInfoListLock
static AJALock sDevInfoListLock
Definition: ntv2devicescanner.cpp:85
CNTV2DeviceScanner::GetFirstDeviceFromArgument
static bool GetFirstDeviceFromArgument(const std::string &inArgument, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the AJA device that matches a command li...
Definition: ntv2devicescanner.cpp:338
CNTV2DeviceScanner::GetFirstDeviceWithID
static bool GetFirstDeviceWithID(const NTV2DeviceID inDeviceID, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the first AJA device found on the host t...
Definition: ntv2devicescanner.cpp:218
NTV2DeviceInfo::vdevName
std::string vdevName
Definition: ntv2devicescanner.h:104
k48KHzSampleRate
@ k48KHzSampleRate
Definition: ntv2audiodefines.h:59
NTV2AudioPhysicalFormat::sourceOut
AudioSourceEnum sourceOut
Definition: ntv2devicescanner.h:181
NTV2DeviceInfoList
std::vector< NTV2DeviceInfo > NTV2DeviceInfoList
I am an ordered list of NTV2DeviceInfo structs.
Definition: ntv2devicescanner.h:161
kDeviceCanDo4KVideo
@ kDeviceCanDo4KVideo
True if the device can handle 4K/UHD video.
Definition: ntv2devicefeatures.h:44
NTV2DeviceInfo::numSerialPorts
UWord numSerialPorts
Total number of serial ports.
Definition: ntv2devicescanner.h:100
kDeviceCanDoAudio96K
@ kDeviceCanDoAudio96K
True if Audio System(s) support a 96kHz sample rate.
Definition: ntv2devicefeatures.h:52
kDeviceCanDo3GLevelConversion
@ kDeviceCanDo3GLevelConversion
True if device can do 3G level B to 3G level A conversion.
Definition: ntv2devicefeatures.h:41
kNumAudioChannels2
@ kNumAudioChannels2
Definition: ntv2audiodefines.h:39
kDeviceCanDoQuarterExpand
@ kDeviceCanDoQuarterExpand
True if device can handle quarter-sized frames (pixel-halving and line-halving during input,...
Definition: ntv2devicefeatures.h:80
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
NTV2GetVDevFolderPath
std::string NTV2GetVDevFolderPath(const bool inAddTrailingPathDelim=false)
Definition: ntv2utils.cpp:7703
kDeviceGetNumVideoOutputs
@ kDeviceGetNumVideoOutputs
The number of SDI video outputs on the device.
Definition: ntv2devicefeatures.h:213
CNTV2DeviceScanner::CNTV2DeviceScanner
CNTV2DeviceScanner(const bool inScanNow=(!(0)))
Definition: ntv2devicescanner.cpp:113
NTV2_Wgt3GSDIOut1
@ NTV2_Wgt3GSDIOut1
Definition: ntv2enums.h:2927
aja::is_legal_hex_serial_number
uint64_t is_legal_hex_serial_number(const std::string &inStr)
Definition: common.cpp:536
CNTV2DeviceScanner::GetDeviceWithSerial
static bool GetDeviceWithSerial(const std::string &inSerialNumber, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the first AJA device whose serial number...
aja::stoi
int stoi(const std::string &str, std::size_t *idx, int base)
Definition: common.cpp:122
kDeviceGetNumAESAudioOutputChannels
@ kDeviceGetNumAESAudioOutputChannels
The number of AES/EBU audio output channels on the device.
Definition: ntv2devicefeatures.h:188
kDeviceCanDoColorCorrection
@ kDeviceCanDoColorCorrection
True if device has any LUTs.
Definition: ntv2devicefeatures.h:56
kDeviceCanDoDualLink
@ kDeviceCanDoDualLink
True if device supports 10-bit RGB input/output over 2-wire SDI.
Definition: ntv2devicefeatures.h:59
k96KHzSampleRate
@ k96KHzSampleRate
Definition: ntv2audiodefines.h:60
CNTV2DeviceScanner::GetNumDevices
static size_t GetNumDevices(void)
Definition: ntv2devicescanner.cpp:87
CNTV2DeviceScanner::GetFirstDeviceWithSerial
static bool GetFirstDeviceWithSerial(const std::string &inSerialStr, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the first AJA device whose serial number...
Definition: ntv2devicescanner.cpp:292
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::basic_json
a class to store JSON values
Definition: json.hpp:3411
PercentEncode
std::string PercentEncode(const std::string &inStr)
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::void
j template void())
Definition: json.hpp:4893
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::basic_json::begin
iterator begin() noexcept
returns an iterator to the first element
Definition: json.hpp:22071
kDeviceGetNumAnalogAudioOutputChannels
@ kDeviceGetNumAnalogAudioOutputChannels
The number of analog audio output channels on the device.
Definition: ntv2devicefeatures.h:190
k32bitsPerSample
@ k32bitsPerSample
Definition: ntv2audiodefines.h:52
kDeviceGetNumDMAEngines
@ kDeviceGetNumDMAEngines
The number of DMA engines on the device.
Definition: ntv2devicefeatures.h:182
NTV2DeviceInfo::numHDMIAudioOutputChannels
UWord numHDMIAudioOutputChannels
Total number of HDMI audio output channels.
Definition: ntv2devicescanner.h:98
NTV2DeviceInfo::vidProcSupport
bool vidProcSupport
Definition: ntv2devicescanner.h:63
NTV2DeviceInfo::numAnlgVidInputs
UWord numAnlgVidInputs
Total number of analog video inputs.
Definition: ntv2devicescanner.h:48
kQParamVDevName
#define kQParamVDevName
Device name, if not specified in .vdev file, then base name of .vdev file.
Definition: ntv2nubaccess.h:43
NTV2AudioChannelsPerFrameListConstIter
NTV2AudioChannelsPerFrameList::const_iterator NTV2AudioChannelsPerFrameListConstIter
Definition: ntv2devicescanner.h:24
CNTV2DriverInterface::IsSupported
virtual bool IsSupported(const NTV2BoolParamID inParamID)
Definition: ntv2driverinterface.h:417
kDeviceCanDoDVCProHD
@ kDeviceCanDoDVCProHD
True if device can squeeze/stretch between 1920x1080/1280x1080 and 1280x720/960x720.
Definition: ntv2devicefeatures.h:60
NTV2AudioPhysicalFormat::boardNumber
ULWord boardNumber
Definition: ntv2devicescanner.h:176
NTV2AudioBitsPerSampleList
std::vector< AudioBitsPerSampleEnum > NTV2AudioBitsPerSampleList
Definition: ntv2devicescanner.h:31
NTV2AudioSampleRateList
std::vector< AudioSampleRateEnum > NTV2AudioSampleRateList
Definition: ntv2devicescanner.h:19
CNTV2DeviceScanner::CompareDeviceInfoLists
static bool CompareDeviceInfoLists(const NTV2DeviceInfoList &inOldList, const NTV2DeviceInfoList &inNewList, NTV2DeviceInfoList &outDevicesAdded, NTV2DeviceInfoList &outDevicesRemoved)
Definition: ntv2devicescanner.cpp:547
kSourceADAT
@ kSourceADAT
Definition: ntv2audiodefines.h:68
kDeviceCanDoAnalogAudio
@ kDeviceCanDoAnalogAudio
True if device has any analog inputs or outputs.
Definition: ntv2devicefeatures.h:46
NTV2AudioPhysicalFormat::sampleRate
AudioSampleRateEnum sampleRate
Definition: ntv2devicescanner.h:177
NTV2DeviceInfo::numVidOutputs
UWord numVidOutputs
Total number of video outputs – analog, digital, whatever.
Definition: ntv2devicescanner.h:47
aja::lower
std::string & lower(std::string &str)
Definition: common.cpp:436
kDeviceGetNumAudioSystems
@ kDeviceGetNumAudioSystems
The number of independent Audio Systems on the device.
Definition: ntv2devicefeatures.h:193
NTV2DeviceInfo::deviceIdentifier
std::string deviceIdentifier
Device name as seen in Control Panel, Watcher, Cables, etc.
Definition: ntv2devicescanner.h:45
NTV2DeviceInfo::audioInSourceList
NTV2AudioSourceList audioInSourceList
My supported audio input sources (AES, ADAT, etc.)
Definition: ntv2devicescanner.h:88
ULWordSet
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:54
lock.h
Declares the AJALock class.
NTV2DeviceInfo::has4KSupport
bool has4KSupport
Supports 4K formats?
Definition: ntv2devicescanner.h:71
ULWord
uint32_t ULWord
Definition: ajatypes.h:276
kDeviceCanDoProRes
@ kDeviceCanDoProRes
True if device can can accommodate Apple ProRes-compressed video in its frame buffers.
Definition: ntv2devicefeatures.h:78
kDeviceGetNumAnalogVideoInputs
@ kDeviceGetNumAnalogVideoInputs
The number of analog video inputs on the device.
Definition: ntv2devicefeatures.h:191
ntv2devicescanner.h
Declares the CNTV2DeviceScanner class.
NTV2DeviceInfo::numOutputConverters
UWord numOutputConverters
Total number of output converters.
Definition: ntv2devicescanner.h:53
kDeviceCanDoLTCInOnRefPort
@ kDeviceCanDoLTCInOnRefPort
True if device can read LTC (Linear TimeCode) from its reference input.
Definition: ntv2devicefeatures.h:69
NTV2DeviceIDToString
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4608
CNTV2DeviceScanner::ScanHardware
static void ScanHardware(void)
Definition: ntv2devicescanner.cpp:135
CNTV2DeviceScanner::GetDeviceInfo
static bool GetDeviceInfo(const ULWord inDeviceIndexNumber, NTV2DeviceInfo &outDeviceInfo, const bool inRescan=(0))
Definition: ntv2devicescanner.cpp:183
CNTV2Card::GetSerialNumberString
virtual bool GetSerialNumberString(std::string &outSerialNumberString)
Answers with a string that contains my human-readable serial number.
Definition: ntv2card.cpp:227
kDeviceGetNumInputConverters
@ kDeviceGetNumInputConverters
The number of input converter widgets on the device.
Definition: ntv2devicefeatures.h:205
aja::upper
std::string & upper(std::string &str)
Definition: common.cpp:442
UWord
uint16_t UWord
Definition: ajatypes.h:274
NTV2AudioPhysicalFormat
Definition: ntv2devicescanner.h:175
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2DeviceInfo::numDMAEngines
UWord numDMAEngines
Total number of DMA engines.
Definition: ntv2devicescanner.h:99
CNTV2DeviceScanner::GetFirstDeviceWithName
static bool GetFirstDeviceWithName(const std::string &inNameSubString, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the first AJA device whose device identi...
Definition: ntv2devicescanner.cpp:236
kQParamVDevFileName
#define kQParamVDevFileName
.vdev file name (with extension)
Definition: ntv2nubaccess.h:44
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
NTV2DeviceInfo::rgbAlphaOutputSupport
bool rgbAlphaOutputSupport
Supports RGB alpha channel?
Definition: ntv2devicescanner.h:67
AJA_SystemInfoTag_Path_PersistenceStoreUser
@ AJA_SystemInfoTag_Path_PersistenceStoreUser
Definition: info.h:46
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:96
sDevInfoList
static NTV2DeviceInfoList sDevInfoList
Definition: ntv2devicescanner.cpp:84
kDeviceCanDoBreakoutBox
@ kDeviceCanDoBreakoutBox
True if device supports an AJA breakout box.
Definition: ntv2devicefeatures.h:54
kNTV2EnumsID_WidgetID
@ kNTV2EnumsID_WidgetID
Identifies the NTV2AudioWidgetID enumerated type.
Definition: ntv2devicefeatures.h:254
NTV2DeviceInfo::numAESAudioOutputChannels
UWord numAESAudioOutputChannels
Total number of AES audio output channels.
Definition: ntv2devicescanner.h:96
CNTV2DeviceScanner::GetDeviceRefName
static std::string GetDeviceRefName(CNTV2Card &inDevice)
Definition: ntv2devicescanner.cpp:415
kDeviceGetPingLED
@ kDeviceGetPingLED
The highest bit number of the LED bits in the Global Control Register on the device.
Definition: ntv2devicefeatures.h:184
kDeviceCanDoStereoIn
@ kDeviceCanDoStereoIn
True if device supports 3D video input over dual-stream SDI.
Definition: ntv2devicefeatures.h:87
NTV2StringList
std::vector< std::string > NTV2StringList
Definition: ntv2utils.h:1155
CNTV2DriverInterface::GetNumSupported
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
Definition: ntv2driverinterface.h:428
AJALock
Definition: lock.h:28
NTV2DeviceInfo::has2KSupport
bool has2KSupport
Supports 2K formats?
Definition: ntv2devicescanner.h:70
NTV2DeviceInfo::procAmpSupport
bool procAmpSupport
Definition: ntv2devicescanner.h:69
kDeviceGetDownConverterDelay
@ kDeviceGetDownConverterDelay
The down-converter delay on the device.
Definition: ntv2devicefeatures.h:176
NTV2DeviceInfo::proResSupport
bool proResSupport
Supports ProRes?
Definition: ntv2devicescanner.h:74
NTV2DeviceInfo::stereoOutSupport
bool stereoOutSupport
Supports stereo output?
Definition: ntv2devicescanner.h:82
kDeviceGetNumAESAudioInputChannels
@ kDeviceGetNumAESAudioInputChannels
The number of AES/EBU audio input channels on the device.
Definition: ntv2devicefeatures.h:187
NTV2DeviceInfo::qrezSupport
bool qrezSupport
Definition: ntv2devicescanner.h:60
NTV2DeviceInfo::numUpConverters
UWord numUpConverters
Total number of up-converters.
Definition: ntv2devicescanner.h:54
kDeviceGetNumHDMIVideoInputs
@ kDeviceGetNumHDMIVideoInputs
The number of HDMI video inputs on the device.
Definition: ntv2devicefeatures.h:203
AJAAutoLock
Definition: lock.h:89
NTV2DeviceInfo::isVirtualDevice
bool isVirtualDevice
Definition: ntv2devicescanner.h:102
NTV2DeviceInfo::numEmbeddedAudioInputChannels
UWord numEmbeddedAudioInputChannels
Total number of embedded (SDI) audio input channels.
Definition: ntv2devicescanner.h:93
CNTV2DeviceScanner::IsHexDigit
static bool IsHexDigit(const char inChr)
Definition: ntv2devicescanner.cpp:43
NTV2AudioPhysicalFormat::numChannels
AudioChannelsPerFrameEnum numChannels
Definition: ntv2devicescanner.h:178
json.hpp
NTV2DeviceInfo::programmableCSCSupport
bool programmableCSCSupport
Programmable color space converter?
Definition: ntv2devicescanner.h:66
kDeviceCanDoRGBPlusAlphaOut
@ kDeviceCanDoRGBPlusAlphaOut
True if device has CSCs capable of splitting the key (alpha) and YCbCr (fill) from RGB frame buffers ...
Definition: ntv2devicefeatures.h:82
NTV2DeviceInfoListConstIter
NTV2DeviceInfoList::const_iterator NTV2DeviceInfoListConstIter
Definition: ntv2devicescanner.h:162
NTV2DeviceInfo::multiFormat
bool multiFormat
Supports multiple video formats?
Definition: ntv2devicescanner.h:84
file_io.h
Declares the AJAFileIO class.
kRegAud1Control
@ kRegAud1Control
Definition: ntv2publicinterface.h:145
NTV2DeviceInfo::isoConvertSupport
bool isoConvertSupport
Definition: ntv2devicescanner.h:57
NTV2DeviceInfo::deviceIndex
ULWord deviceIndex
Device index number – this will be phased out someday.
Definition: ntv2devicescanner.h:41
NTV2DeviceInfo::numAnalogAudioOutputChannels
UWord numAnalogAudioOutputChannels
Total number of analog audio output channels.
Definition: ntv2devicescanner.h:95
NTV2DeviceInfo::numHDMIAudioInputChannels
UWord numHDMIAudioInputChannels
Total number of HDMI audio input channels.
Definition: ntv2devicescanner.h:94
NTV2DeviceInfo::numVidInputs
UWord numVidInputs
Total number of video inputs – analog, digital, whatever.
Definition: ntv2devicescanner.h:46
CNTV2DriverInterface::setDeviceIndexNumber
void setDeviceIndexNumber(const UWord num)
Definition: ntv2driverinterface.cpp:1059
NTV2DeviceInfo::has8KSupport
bool has8KSupport
Supports 8K formats?
Definition: ntv2devicescanner.h:72
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5769
NTV2AudioSourceList
std::vector< AudioSourceEnum > NTV2AudioSourceList
Definition: ntv2devicescanner.h:27
kDeviceGetNumHDMIVideoOutputs
@ kDeviceGetNumHDMIVideoOutputs
The number of HDMI video outputs on the device.
Definition: ntv2devicefeatures.h:204
false
#define false
Definition: ntv2devicefeatures.h:25
common.h
Private include file for all ajabase sources.
CNTV2DeviceScanner::GetDeviceAtIndex
static bool GetDeviceAtIndex(const ULWord inDeviceIndexNumber, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the AJA device having the given zero-bas...
Definition: ntv2devicescanner.cpp:200
PLFAIL
#define PLFAIL(__x__)
Definition: ntv2devicescanner.cpp:24
kDeviceGetNumHDMIAudioOutputChannels
@ kDeviceGetNumHDMIAudioOutputChannels
The number of HDMI audio output channels on the device.
Definition: ntv2devicefeatures.h:202
kDeviceGetNumHDMIAudioInputChannels
@ kDeviceGetNumHDMIAudioInputChannels
The number of HDMI audio input channels on the device.
Definition: ntv2devicefeatures.h:201
NTV2DeviceInfo
Definition: ntv2devicescanner.h:38
aja::is_alpha_numeric
bool is_alpha_numeric(const char inChr)
Definition: common.cpp:521
std
Definition: json.hpp:5362
operator<<
ostream & operator<<(ostream &inOutStr, const NTV2DeviceInfoList &inList)
Definition: ntv2devicescanner.cpp:440
aja::is_legal_decimal_number
bool is_legal_decimal_number(const std::string &inStr, const size_t inMaxLength)
Definition: common.cpp:526
NTV2AudioPhysicalFormatListConstIter
NTV2AudioPhysicalFormatList::const_iterator NTV2AudioPhysicalFormatListConstIter
Definition: ntv2devicescanner.h:198
NTV2DeviceInfo::audioSampleRateList
NTV2AudioSampleRateList audioSampleRateList
My supported audio sample rates.
Definition: ntv2devicescanner.h:85
kDeviceCanDo8KVideo
@ kDeviceCanDo8KVideo
True if device supports 8K video formats.
Definition: ntv2devicefeatures.h:120
kDeviceHasMicrophoneInput
@ kDeviceHasMicrophoneInput
True if device has a microphone input connector.
Definition: ntv2devicefeatures.h:143
kSourceAES
@ kSourceAES
Definition: ntv2audiodefines.h:67
NTV2DeviceInfo::pingLED
ULWord pingLED
Definition: ntv2devicescanner.h:101
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:420
NTV2DeviceInfo::operator==
bool operator==(const NTV2DeviceInfo &rhs) const
Definition: ntv2devicescanner.cpp:449
NTV2DeviceInfo::pciSlot
ULWord pciSlot
PCI slot (if applicable and/or known)
Definition: ntv2devicescanner.h:42
kDeviceCanDoAudio2Channels
@ kDeviceCanDoAudio2Channels
True if audio system(s) support 2 or more audio channels.
Definition: ntv2devicefeatures.h:49
kDeviceCanDo12GSDI
@ kDeviceCanDo12GSDI
True if device has 12G SDI connectors.
Definition: ntv2devicefeatures.h:118
NTV2AudioSampleRateListConstIter
NTV2AudioSampleRateList::const_iterator NTV2AudioSampleRateListConstIter
Definition: ntv2devicescanner.h:20
NTV2DeviceInfo::ltcOutSupport
bool ltcOutSupport
Supports LTC output?
Definition: ntv2devicescanner.h:80
kSourceAll
@ kSourceAll
Definition: ntv2audiodefines.h:71
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::basic_json::parse
static basic_json parse(InputType &&i, const parser_callback_t cb=nullptr, const bool allow_exceptions=true, const bool ignore_comments=false)
deserialize from a compatible input
Definition: json.hpp:23318
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::basic_json::end
iterator end() noexcept
returns an iterator to one past the last element
Definition: json.hpp:22096
NTV2DeviceInfo::numInputConverters
UWord numInputConverters
Total number of input converters.
Definition: ntv2devicescanner.h:52
kDeviceCanDoRateConvert
@ kDeviceCanDoRateConvert
True if device can do frame rate conversion.
Definition: ntv2devicefeatures.h:81
NTV2DeviceInfo::dvcproHDSupport
bool dvcproHDSupport
Definition: ntv2devicescanner.h:59
NTV2DeviceInfo::ipSupport
bool ipSupport
Supports IP IO?
Definition: ntv2devicescanner.h:77
CNTV2DeviceScanner::GetVirtualDeviceWithName
static bool GetVirtualDeviceWithName(const std::string &inNameString, CNTV2Card &outDevice, const bool inRescan=(!(0)))
Rescans the host, and returns an open CNTV2Card instance for the first virtual device with a matching...
Definition: ntv2devicescanner.cpp:272
NTV2DeviceInfo::colorCorrectionSupport
bool colorCorrectionSupport
Supports color correction?
Definition: ntv2devicescanner.h:65
NTV2DeviceInfo::sdi3GSupport
bool sdi3GSupport
Supports 3G?
Definition: ntv2devicescanner.h:75
kDeviceCanDoProgrammableCSC
@ kDeviceCanDoProgrammableCSC
True if device has at least one programmable color space converter widget.
Definition: ntv2devicefeatures.h:76
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::exception::id
const int id
the id of the exception
Definition: json.hpp:4381
kDeviceCanDoAudio8Channels
@ kDeviceCanDoAudio8Channels
True if audio system(s) support 8 or more audio channels.
Definition: ntv2devicefeatures.h:51
aja::to_string
std::string to_string(bool val)
Definition: common.cpp:180
NTV2DeviceInfo::breakoutBoxSupport
bool breakoutBoxSupport
Can support a breakout box?
Definition: ntv2devicescanner.h:68
NTV2DeviceInfo::NTV2DeviceInfo
NTV2DeviceInfo()
Definition: ntv2devicescanner.cpp:474
kDeviceCanDo2KVideo
@ kDeviceCanDo2KVideo
True if device can handle 2Kx1556 (film) video.
Definition: ntv2devicefeatures.h:40
AJAFileIO::ReadDirectory
static AJAStatus ReadDirectory(const std::string &directory, const std::string &filePattern, std::vector< std::string > &fileContainer)
Definition: file_io.cpp:805
BIT
#define BIT(_x_)
Definition: ajatypes.h:585
NTV2DeviceInfo
struct NTV2DeviceInfo NTV2DeviceInfo
kDeviceGetNumUpConverters
@ kDeviceGetNumUpConverters
The number of up-converters on the device.
Definition: ntv2devicefeatures.h:211
kSourceNone
@ kSourceNone
Definition: ntv2audiodefines.h:70
NTV2AudioPhysicalFormatList
std::vector< NTV2AudioPhysicalFormat > NTV2AudioPhysicalFormatList
I am an ordered list of NTV2AudioPhysicalFormat structs.
Definition: ntv2devicescanner.h:197
NTV2DeviceInfo::ltcInOnRefPort
bool ltcInOnRefPort
Supports LTC on reference input?
Definition: ntv2devicescanner.h:81
NTV2DeviceInfo::audioNumChannelsList
NTV2AudioChannelsPerFrameList audioNumChannelsList
My supported number of audio channels per frame.
Definition: ntv2devicescanner.h:86
NTV2AudioChannelsPerFrameList
std::vector< AudioChannelsPerFrameEnum > NTV2AudioChannelsPerFrameList
Definition: ntv2devicescanner.h:23
kDeviceGetNumAnalogVideoOutputs
@ kDeviceGetNumAnalogVideoOutputs
The number of analog video outputs on the device.
Definition: ntv2devicefeatures.h:192
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::parse_error::byte
const std::size_t byte
byte index of the parse error
Definition: json.hpp:4507
DEVICE_ID_SOFTWARE
@ DEVICE_ID_SOFTWARE
Software device that doesn't emulate one of the above devices.
Definition: ntv2enums.h:80
kDeviceGetNumOutputConverters
@ kDeviceGetNumOutputConverters
The number of output converter widgets on the device.
Definition: ntv2devicefeatures.h:208
CNTV2DriverInterface::Open
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
Definition: ntv2driverinterface.cpp:131
kDeviceGetNumEmbeddedAudioInputChannels
@ kDeviceGetNumEmbeddedAudioInputChannels
The number of SDI-embedded input audio channels supported by the device.
Definition: ntv2devicefeatures.h:197
kDeviceGetNumSerialPorts
@ kDeviceGetNumSerialPorts
The number of RS-422 serial ports on the device.
Definition: ntv2devicefeatures.h:210
DEVICE_ID_NOTFOUND
@ DEVICE_ID_NOTFOUND
Invalid or "not found".
Definition: ntv2enums.h:95
NTV2DeviceInfo::downConverterDelay
UWord downConverterDelay
Definition: ntv2devicescanner.h:56
NTV2DeviceInfo::stereoInSupport
bool stereoInSupport
Supports stereo input?
Definition: ntv2devicescanner.h:83
kDeviceCanDoQREZ
@ kDeviceCanDoQREZ
True if device can handle QRez.
Definition: ntv2devicefeatures.h:79
CNTV2DeviceScanner::IsDecimalDigit
static bool IsDecimalDigit(const char inChr)
Definition: ntv2devicescanner.cpp:48
NTV2DeviceInfo::numAESAudioInputChannels
UWord numAESAudioInputChannels
Total number of AES audio input channels.
Definition: ntv2devicescanner.h:92
NTV2DeviceInfo::serialNumber
std::string serialNumber
Unique device serial number (new in SDK 17.5)
Definition: ntv2devicescanner.h:44
kDeviceCanDoIsoConvert
@ kDeviceCanDoIsoConvert
True if device can do ISO conversion.
Definition: ntv2devicefeatures.h:67
kDeviceCanDoMultiFormat
@ kDeviceCanDoMultiFormat
True if device can simultaneously handle different video formats on more than one SDI input or output...
Definition: ntv2devicefeatures.h:71
NTV2DeviceInfo::deviceID
NTV2DeviceID deviceID
Device ID/species (e.g., DEVICE_ID_KONA3G, DEVICE_ID_IOXT, etc.)
Definition: ntv2devicescanner.h:40
SerialNum64ToString
std::string SerialNum64ToString(const uint64_t &inSerNum)
Definition: ntv2utils.cpp:8223
CNTV2DriverInterface::Close
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call.
Definition: ntv2driverinterface.cpp:236
CNTV2DeviceScanner::IsAlphaNumeric
static bool IsAlphaNumeric(const char inStr)
Definition: ntv2devicescanner.cpp:53
debug.h
Declares the AJADebug class.
CNTV2DeviceScanner::IsLegalSerialNumber
static bool IsLegalSerialNumber(const std::string &inStr)
Definition: ntv2devicescanner.cpp:77
kDeviceGetNumLTCOutputs
@ kDeviceGetNumLTCOutputs
The number of analog LTC outputs on the device.
Definition: ntv2devicefeatures.h:217
CNTV2DriverInterface::GetSupportedItems
virtual ULWordSet GetSupportedItems(const NTV2EnumsID inEnumsID)
Definition: ntv2driverinterface.cpp:1467
NTV2AudioBitsPerSampleListConstIter
NTV2AudioBitsPerSampleList::const_iterator NTV2AudioBitsPerSampleListConstIter
Definition: ntv2devicescanner.h:32
kNumAudioChannels8
@ kNumAudioChannels8
Definition: ntv2audiodefines.h:42
CNTV2DeviceScanner::IsLegalDecimalNumber
static bool IsLegalDecimalNumber(const std::string &inStr, const size_t maxLen=2)
Definition: ntv2devicescanner.cpp:58
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::parse_error
exception indicating a parse error
Definition: json.hpp:4469
NTV2DeviceInfo::numAudioStreams
UWord numAudioStreams
Maximum number of independent audio streams.
Definition: ntv2devicescanner.h:90
kDeviceCanDoStereoOut
@ kDeviceCanDoStereoOut
True if device supports 3D video output over dual-stream SDI.
Definition: ntv2devicefeatures.h:88
NTV2DeviceInfo::dualLinkSupport
bool dualLinkSupport
Supports dual-link?
Definition: ntv2devicescanner.h:64
kDeviceGetNumLTCInputs
@ kDeviceGetNumLTCInputs
The number of analog LTC inputs on the device.
Definition: ntv2devicefeatures.h:216
NTV2DeviceInfo::hdvSupport
bool hdvSupport
Definition: ntv2devicescanner.h:61
DECN
#define DECN(__x__, __n__)
Definition: ntv2publicinterface.h:5770
NTV2DeviceInfo::numEmbeddedAudioOutputChannels
UWord numEmbeddedAudioOutputChannels
Total number of embedded (SDI) audio output channels.
Definition: ntv2devicescanner.h:97
AJASystemInfo
Definition: info.h:80