AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
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 <sstream>
13 
14 using namespace std;
15 
16 
17 static string ToLower (const string & inStr)
18 {
19  string result(inStr);
20  return aja::lower(result);
21 }
22 
23 static string ToUpper (const string & inStr)
24 {
25  string result(inStr);
26  return aja::upper(result);
27 }
28 
29 bool CNTV2DeviceScanner::IsHexDigit (const char inChr)
30 { static const string sHexDigits("0123456789ABCDEFabcdef");
31  return sHexDigits.find(inChr) != string::npos;
32 }
33 
34 bool CNTV2DeviceScanner::IsDecimalDigit (const char inChr)
35 { static const string sDecDigits("0123456789");
36  return sDecDigits.find(inChr) != string::npos;
37 }
38 
39 bool CNTV2DeviceScanner::IsAlphaNumeric (const char inChr)
40 { static const string sLegalChars("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
41  return sLegalChars.find(inChr) != string::npos;
42 }
43 
44 bool CNTV2DeviceScanner::IsLegalDecimalNumber (const string & inStr, const size_t inMaxLength)
45 {
46  if (inStr.length() > inMaxLength)
47  return false; // Too long
48  for (size_t ndx(0); ndx < inStr.size(); ndx++)
49  if (!IsDecimalDigit(inStr.at(ndx)))
50  return false;
51  return true;
52 }
53 
54 uint64_t CNTV2DeviceScanner::IsLegalHexSerialNumber (const string & inStr) // 0x3236333331375458
55 {
56  if (inStr.length() < 3)
57  return 0ULL; // Too small
58  string hexStr(::ToLower(inStr));
59  if (hexStr[0] == '0' && hexStr[1] == 'x')
60  hexStr.erase(0, 2); // Remove '0x' if present
61  if (hexStr.length() > 16)
62  return 0ULL; // Too big
63  for (size_t ndx(0); ndx < hexStr.size(); ndx++)
64  if (!IsHexDigit(hexStr.at(ndx)))
65  return 0ULL; // Invalid hex digit
66  while (hexStr.length() != 16)
67  hexStr = '0' + hexStr; // prepend another '0'
68  istringstream iss(hexStr);
69  uint64_t u64(0);
70  iss >> hex >> u64;
71  return u64;
72 }
73 
74 bool CNTV2DeviceScanner::IsAlphaNumeric (const string & inStr)
75 {
76  for (size_t ndx(0); ndx < inStr.size(); ndx++)
77  if (!IsAlphaNumeric(inStr.at(ndx)))
78  return false;
79  return true;
80 }
81 
82 bool CNTV2DeviceScanner::IsLegalSerialNumber (const string & inStr)
83 {
84  if (inStr.length() != 8 && inStr.length() != 9)
85  return false;
86  return IsAlphaNumeric(inStr);
87 }
88 
89 
91 {
92  if (inScanNow)
93  ScanHardware();
94 }
95 CNTV2DeviceScanner::CNTV2DeviceScanner (bool inScanNow, UWord inDeviceMask)
96 {
97  (void)inDeviceMask;
98  if (inScanNow)
99  ScanHardware();
100 }
101 
102 
104 {
105  // Avoid self-assignment...
106  if (this != &boardScan)
107  DeepCopy(boardScan);
108 
109  return *this; // operator= must return self reference
110 
111 } // operator=
112 
113 
115 {
116  DeepCopy(boardScan);
117 }
118 
119 
120 void CNTV2DeviceScanner::DeepCopy (const CNTV2DeviceScanner & boardScan)
121 {
122  // Begin with a clear list
123  _deviceInfoList.clear();
124 
125  // Copy over _deviceInfoList
126  for (NTV2DeviceInfoListConstIter bilIter (boardScan._deviceInfoList.begin ()); bilIter != boardScan._deviceInfoList.end (); ++bilIter)
127  {
128  NTV2DeviceInfo boardInfo;
129 
130  // Move over all the easy stuff...
131  boardInfo.deviceIndex = bilIter->deviceIndex;
132  boardInfo.deviceID = bilIter->deviceID;
133  boardInfo.pciSlot = bilIter->pciSlot;
134  boardInfo.deviceIdentifier = bilIter->deviceIdentifier;
135  boardInfo.deviceSerialNumber = bilIter->deviceSerialNumber;
136 
137  // Now copy over each list within the list...
138  boardInfo.audioSampleRateList.clear();
139  for (NTV2AudioSampleRateList::const_iterator asrIter (bilIter->audioSampleRateList.begin()); asrIter != bilIter->audioSampleRateList.end(); ++asrIter)
140  boardInfo.audioSampleRateList.push_back(*asrIter);
141 
142  boardInfo.audioNumChannelsList.clear();
143  for (NTV2AudioChannelsPerFrameList::const_iterator ncIter (bilIter->audioNumChannelsList.begin()); ncIter != bilIter->audioNumChannelsList.end(); ++ncIter)
144  boardInfo.audioNumChannelsList.push_back(*ncIter);
145 
146  boardInfo.audioBitsPerSampleList.clear();
147  for (NTV2AudioBitsPerSampleList::const_iterator bpsIter (bilIter->audioBitsPerSampleList.begin()); bpsIter != bilIter->audioBitsPerSampleList.end(); ++bpsIter)
148  boardInfo.audioBitsPerSampleList.push_back(*bpsIter);
149 
150  boardInfo.audioInSourceList.clear();
151  for (NTV2AudioSourceList::const_iterator aslIter (bilIter->audioInSourceList.begin()); aslIter != bilIter->audioInSourceList.end(); ++aslIter)
152  boardInfo.audioInSourceList.push_back(*aslIter);
153 
154  boardInfo.audioOutSourceList.clear();
155  for (NTV2AudioSourceList::const_iterator aoslIter (bilIter->audioOutSourceList.begin()); aoslIter != bilIter->audioOutSourceList.end(); ++aoslIter)
156  boardInfo.audioOutSourceList.push_back(*aoslIter);
157 
158  // Add this boardInfo struct to the _deviceInfoList...
159  _deviceInfoList.push_back(boardInfo);
160  }
161 } // DeepCopy
162 
163 
165 { (void) inDeviceMask;
166  ScanHardware();
167 }
169 {
170  GetDeviceInfoList().clear();
171 
172  for (UWord boardNum(0); ; boardNum++)
173  {
174  CNTV2Card tmpDevice(boardNum);
175  if (tmpDevice.IsOpen())
176  {
177  const NTV2DeviceID deviceID (tmpDevice.GetDeviceID());
178 
179  if (deviceID != DEVICE_ID_NOTFOUND)
180  {
181  ostringstream oss;
182  NTV2DeviceInfo info;
183  info.deviceIndex = boardNum;
184  info.deviceID = deviceID;
185  info.pciSlot = 0;
186  info.deviceSerialNumber = tmpDevice.GetSerialNumber();
187 
188  oss << ::NTV2DeviceIDToString (deviceID, tmpDevice.features().IsDNxIV()) << " - " << boardNum;
189  if (info.pciSlot)
190  oss << ", Slot " << info.pciSlot;
191 
192  info.deviceIdentifier = oss.str();
193 
194  SetVideoAttributes(info);
195  SetAudioAttributes(info, tmpDevice);
196  GetDeviceInfoList().push_back(info);
197  }
198  tmpDevice.Close();
199  } // if Open succeeded
200  else
201  break;
202  } // boardNum loop
203 
204 } // ScanHardware
205 
206 
207 bool CNTV2DeviceScanner::DeviceIDPresent (const NTV2DeviceID inDeviceID, const bool inRescan)
208 {
209  if (inRescan)
210  ScanHardware();
211 
212  const NTV2DeviceInfoList & deviceInfoList(GetDeviceInfoList());
213  for (NTV2DeviceInfoListConstIter iter(deviceInfoList.begin()); iter != deviceInfoList.end(); ++iter)
214  if (iter->deviceID == inDeviceID)
215  return true; // Found!
216  return false; // Not found
217 
218 } // DeviceIDPresent
219 
220 
221 bool CNTV2DeviceScanner::GetDeviceInfo (const ULWord inDeviceIndexNumber, NTV2DeviceInfo & outDeviceInfo, const bool inRescan)
222 {
223  if (inRescan)
224  ScanHardware();
225 
226  const NTV2DeviceInfoList & deviceList(GetDeviceInfoList());
227 
228  if (inDeviceIndexNumber < deviceList.size())
229  {
230  outDeviceInfo = deviceList[inDeviceIndexNumber];
231  return outDeviceInfo.deviceIndex == inDeviceIndexNumber;
232  }
233  return false; // No devices with this index number
234 
235 } // GetDeviceInfo
236 
237 bool CNTV2DeviceScanner::GetDeviceAtIndex (const ULWord inDeviceIndexNumber, CNTV2Card & outDevice)
238 {
239  outDevice.Close();
240  CNTV2DeviceScanner scanner;
241  return size_t(inDeviceIndexNumber) < scanner.GetDeviceInfoList().size() ? AsNTV2DriverInterfaceRef(outDevice).Open(UWord(inDeviceIndexNumber)) : false;
242 
243 } // GetDeviceAtIndex
244 
245 
247 {
248  outDevice.Close();
249  CNTV2DeviceScanner scanner;
250  const NTV2DeviceInfoList & deviceInfoList(scanner.GetDeviceInfoList());
251  for (NTV2DeviceInfoListConstIter iter(deviceInfoList.begin()); iter != deviceInfoList.end(); ++iter)
252  if (iter->deviceID == inDeviceID)
253  return AsNTV2DriverInterfaceRef(outDevice).Open(UWord(iter->deviceIndex)); // Found!
254  return false; // Not found
255 
256 } // GetFirstDeviceWithID
257 
258 
259 bool CNTV2DeviceScanner::GetFirstDeviceWithName (const string & inNameSubString, CNTV2Card & outDevice)
260 {
261  outDevice.Close();
262  if (!IsAlphaNumeric(inNameSubString))
263  {
264  if (inNameSubString.find(":") != string::npos)
265  return outDevice.Open(inNameSubString);
266  return false;
267  }
268 
269  CNTV2DeviceScanner scanner;
270  string nameSubString(::ToLower(inNameSubString));
271  const NTV2DeviceInfoList & deviceInfoList(scanner.GetDeviceInfoList ());
272 
273  for (NTV2DeviceInfoListConstIter iter(deviceInfoList.begin()); iter != deviceInfoList.end(); ++iter)
274  {
275  const string deviceName(::ToLower(iter->deviceIdentifier));
276  if (deviceName.find(nameSubString) != string::npos)
277  return AsNTV2DriverInterfaceRef(outDevice).Open(UWord(iter->deviceIndex)); // Found!
278  }
279  if (nameSubString == "io4kplus")
280  { // Io4K+ == DNXIV...
281  nameSubString = "avid dnxiv";
282  for (NTV2DeviceInfoListConstIter iter(deviceInfoList.begin()); iter != deviceInfoList.end(); ++iter)
283  {
284  const string deviceName(::ToLower(iter->deviceIdentifier));
285  if (deviceName.find(nameSubString) != string::npos)
286  return AsNTV2DriverInterfaceRef(outDevice).Open(UWord(iter->deviceIndex)); // Found!
287  }
288  }
289  return false; // Not found
290 
291 } // GetFirstDeviceWithName
292 
293 
294 bool CNTV2DeviceScanner::GetFirstDeviceWithSerial (const string & inSerialStr, CNTV2Card & outDevice)
295 {
296  CNTV2DeviceScanner scanner;
297  outDevice.Close();
298  const string searchSerialStr(::ToLower(inSerialStr));
299  const NTV2DeviceInfoList & deviceInfos(scanner.GetDeviceInfoList());
300  for (NTV2DeviceInfoListConstIter iter(deviceInfos.begin()); iter != deviceInfos.end(); ++iter)
301  {
302  CNTV2Card dev(UWord(iter->deviceIndex));
303  string serNumStr;
304  if (dev.GetSerialNumberString(serNumStr))
305  {
306  aja::lower(serNumStr);
307  if (serNumStr.find(searchSerialStr) != string::npos)
308  return AsNTV2DriverInterfaceRef(outDevice).Open(UWord(iter->deviceIndex));
309  }
310  }
311  return false;
312 }
313 
314 
315 bool CNTV2DeviceScanner::GetDeviceWithSerial (const uint64_t inSerialNumber, CNTV2Card & outDevice)
316 {
317  outDevice.Close();
318  CNTV2DeviceScanner scanner;
319  const NTV2DeviceInfoList & deviceInfos(scanner.GetDeviceInfoList());
320  for (NTV2DeviceInfoListConstIter iter(deviceInfos.begin()); iter != deviceInfos.end(); ++iter)
321  if (iter->deviceSerialNumber == inSerialNumber)
322  return AsNTV2DriverInterfaceRef(outDevice).Open(UWord(iter->deviceIndex));
323  return false;
324 }
325 
326 
327 bool CNTV2DeviceScanner::GetFirstDeviceFromArgument (const string & inArgument, CNTV2Card & outDevice)
328 {
329  outDevice.Close();
330  if (inArgument.empty())
331  return false;
332 
333  // Special case: 'LIST' or '?'
334  CNTV2DeviceScanner scanner;
335  const NTV2DeviceInfoList & infoList (scanner.GetDeviceInfoList());
336  string upperArg(::ToUpper(inArgument));
337  if (upperArg == "LIST" || upperArg == "?")
338  {
339  if (infoList.empty())
340  cout << "No devices detected" << endl;
341  else
342  cout << DEC(infoList.size()) << " available " << (infoList.size() == 1 ? "device:" : "devices:") << endl;
343  for (NTV2DeviceInfoListConstIter iter(infoList.begin()); iter != infoList.end(); ++iter)
344  {
345  const string serNum(CNTV2Card::SerialNum64ToString(iter->deviceSerialNumber));
346  cout << DECN(iter->deviceIndex,2) << " | " << setw(8) << ::NTV2DeviceIDToString(iter->deviceID);
347  if (!serNum.empty())
348  cout << " | " << setw(9) << serNum << " | " << HEX0N(iter->deviceSerialNumber,8);
349  cout << endl;
350  }
351  return false;
352  }
353 
354  return reinterpret_cast<CNTV2DriverInterface&>(outDevice).Open(inArgument);
355 
356 } // GetFirstDeviceFromArgument
357 
358 
359 ostream & operator << (ostream & inOutStr, const NTV2DeviceInfoList & inList)
360 {
361  for (NTV2DeviceInfoListConstIter iter(inList.begin()); iter != inList.end(); ++iter)
362  inOutStr << " " << *iter;
363  return inOutStr;
364 
365 } // NTV2DeviceInfoList ostream operator <<
366 
367 
369 {
370  const NTV2DeviceInfo & first (*this);
371  size_t diffs (0);
372 
373  // 'memcmp' would be simpler, but because NTV2DeviceInfo has no constructor, the unfilled bytes in
374  // its "boardIdentifier" field are indeterminate, making it worthless for accurate comparisons.
375  // "boardSerialNumber" and boardNumber are the only required comparisons, but I also check boardType,
376  // boardID, and pciSlot for good measure...
377  if (first.deviceID != second.deviceID) diffs++;
378  if (first.deviceIndex != second.deviceIndex) diffs++;
379  if (first.deviceSerialNumber != second.deviceSerialNumber) diffs++;
380  if (first.pciSlot != second.pciSlot) diffs++;
381 
382  // Needs to be fixed now that deviceIdentifier is a std::string
383  //#if defined (AJA_DEBUG)
384  // if (::strncmp (first.deviceIdentifier.c_str (), second.deviceIdentifier.c_str (), first.deviceIdentifier.length ()))) diffs++;
385  // if (diffs)
386  // {cout << "## DEBUG: " << diffs << " diff(s):" << endl << "#### first ####" << endl << first << "#### second ####" << endl << second << endl;}
387  //#endif // AJA_DEBUG
388 
389  return diffs ? false : true;
390 
391 } // equality operator
392 
393 
395  const NTV2DeviceInfoList & inNewList,
396  NTV2DeviceInfoList & outBoardsAdded,
397  NTV2DeviceInfoList & outBoardsRemoved)
398 {
399  NTV2DeviceInfoListConstIter oldIter (inOldList.begin ());
400  NTV2DeviceInfoListConstIter newIter (inNewList.begin ());
401 
402  outBoardsAdded.clear ();
403  outBoardsRemoved.clear ();
404 
405  while (true)
406  {
407  if (oldIter == inOldList.end () && newIter == inNewList.end ())
408  break; // Done -- exit
409 
410  if (oldIter != inOldList.end () && newIter != inNewList.end ())
411  {
412  const NTV2DeviceInfo & oldInfo (*oldIter), newInfo (*newIter);
413 
414  if (oldInfo != newInfo)
415  {
416  // Out with the old...
417  outBoardsRemoved.push_back (oldInfo);
418 
419  // In with the new...
420  if (newInfo.deviceID && newInfo.deviceID != NTV2DeviceID(0xFFFFFFFF))
421  outBoardsAdded.push_back (newInfo);
422  } // if mismatch
423 
424  ++oldIter;
425  ++newIter;
426  continue; // Move along
427 
428  } // if both valid
429 
430  if (oldIter != inOldList.end () && newIter == inNewList.end ())
431  {
432  outBoardsRemoved.push_back (*oldIter);
433  ++oldIter;
434  continue; // Move along
435  } // old is valid, new is not valid
436 
437  if (oldIter == inOldList.end () && newIter != inNewList.end ())
438  {
439  if (newIter->deviceID && newIter->deviceID != NTV2DeviceID(0xFFFFFFFF))
440  outBoardsAdded.push_back (*newIter);
441  ++newIter;
442  continue; // Move along
443  } // old is not valid, new is valid
444 
445  NTV2_ASSERT(false && "should never get here");
446 
447  } // loop til break
448 
449  // Return 'true' if there were any changes...
450  return !outBoardsAdded.empty () || !outBoardsRemoved.empty ();
451 
452 } // CompareDeviceInfoLists
453 
454 
456 { // Name that will find given device via CNTV2DeviceScanner::GetFirstDeviceFromArgument
457  if (!inDevice.IsOpen())
458  return string();
459  // Nub address 1st...
460  if (!inDevice.GetHostName().empty() && inDevice.IsRemote())
461  return inDevice.GetHostName(); // Nub host/device
462 
463  // Serial number 2nd...
464  string str;
465  if (inDevice.GetSerialNumberString(str))
466  return str;
467 
468  // Model name 3rd...
469  str = ::NTV2DeviceIDToString(inDevice.GetDeviceID(), false);
470  if (!str.empty() && str != "???")
471  return str;
472 
473  // Index number last...
474  ostringstream oss; oss << DEC(inDevice.GetIndexNumber());
475  return oss.str();
476 }
477 
478 
479 ostream & operator << (ostream & inOutStr, const NTV2AudioSampleRateList & inList)
480 {
481  for (NTV2AudioSampleRateListConstIter iter (inList.begin ()); iter != inList.end (); ++iter)
482  inOutStr << " " << *iter;
483 
484  return inOutStr;
485 }
486 
487 
488 ostream & operator << (ostream & inOutStr, const NTV2AudioChannelsPerFrameList & inList)
489 {
490  for (NTV2AudioChannelsPerFrameListConstIter iter (inList.begin ()); iter != inList.end (); ++iter)
491  inOutStr << " " << *iter;
492 
493  return inOutStr;
494 }
495 
496 
497 ostream & operator << (ostream & inOutStr, const NTV2AudioSourceList & inList)
498 {
499  for (NTV2AudioSourceListConstIter iter(inList.begin()); iter != inList.end(); ++iter)
500  switch (*iter) // AudioSourceEnum
501  {
502  case kSourceSDI: return inOutStr << " SDI";
503  case kSourceAES: return inOutStr << " AES";
504  case kSourceADAT: return inOutStr << " ADAT";
505  case kSourceAnalog: return inOutStr << " Analog";
506  case kSourceNone: return inOutStr << " None";
507  case kSourceAll: return inOutStr << " All";
508  }
509  return inOutStr << " ???";
510 }
511 
512 
513 ostream & operator << (ostream & inOutStr, const NTV2AudioBitsPerSampleList & inList)
514 {
515  for (NTV2AudioBitsPerSampleListConstIter iter (inList.begin ()); iter != inList.end (); ++iter)
516  inOutStr << " " << *iter;
517 
518  return inOutStr;
519 }
520 
521 
522 ostream & operator << (ostream & inOutStr, const NTV2DeviceInfo & inInfo)
523 {
524  inOutStr << "Device Info for '" << inInfo.deviceIdentifier << "'" << endl
525  << " Device Index Number: " << inInfo.deviceIndex << endl
526  << " Device ID: 0x" << hex << inInfo.deviceID << dec << endl
527  << " Serial Number: 0x" << hex << inInfo.deviceSerialNumber << dec << endl
528  << " PCI Slot: 0x" << hex << inInfo.pciSlot << dec << endl
529  << " Video Inputs: " << inInfo.numVidInputs << endl
530  << " Video Outputs: " << inInfo.numVidOutputs << endl
531  #if defined (_DEBUG)
532  << " Analog Video Inputs: " << inInfo.numAnlgVidInputs << endl
533  << " Analog Video Outputs: " << inInfo.numAnlgVidOutputs << endl
534  << " HDMI Video Inputs: " << inInfo.numHDMIVidInputs << endl
535  << " HDMI Video Outputs: " << inInfo.numHDMIVidOutputs << endl
536  << " Input Converters: " << inInfo.numInputConverters << endl
537  << " Output Converters: " << inInfo.numOutputConverters << endl
538  << " Up Converters: " << inInfo.numUpConverters << endl
539  << " Down Converters: " << inInfo.numDownConverters << endl
540  << " Down Converter Delay: " << inInfo.downConverterDelay << endl
541  << " DVCProHD: " << (inInfo.dvcproHDSupport ? "Y" : "N") << endl
542  << " Qrez: " << (inInfo.qrezSupport ? "Y" : "N") << endl
543  << " HDV: " << (inInfo.hdvSupport ? "Y" : "N") << endl
544  << " Quarter Expand: " << (inInfo.quarterExpandSupport ? "Y" : "N") << endl
545  << " ISO Convert: " << (inInfo.isoConvertSupport ? "Y" : "N") << endl
546  << " Rate Convert: " << (inInfo.rateConvertSupport ? "Y" : "N") << endl
547  << " VidProc: " << (inInfo.vidProcSupport ? "Y" : "N") << endl
548  << " Dual-Link: " << (inInfo.dualLinkSupport ? "Y" : "N") << endl
549  << " Color-Correction: " << (inInfo.colorCorrectionSupport ? "Y" : "N") << endl
550  << " Programmable CSC: " << (inInfo.programmableCSCSupport ? "Y" : "N") << endl
551  << " RGB Alpha Output: " << (inInfo.rgbAlphaOutputSupport ? "Y" : "N") << endl
552  << " Breakout Box: " << (inInfo.breakoutBoxSupport ? "Y" : "N") << endl
553  << " ProcAmp: " << (inInfo.procAmpSupport ? "Y" : "N") << endl
554  << " 2K: " << (inInfo.has2KSupport ? "Y" : "N") << endl
555  << " 4K: " << (inInfo.has4KSupport ? "Y" : "N") << endl
556  << " 8K: " << (inInfo.has8KSupport ? "Y" : "N") << endl
557  << " 3G Level Conversion: " << (inInfo.has3GLevelConversion ? "Y" : "N") << endl
558  << " ProRes: " << (inInfo.proResSupport ? "Y" : "N") << endl
559  << " SDI 3G: " << (inInfo.sdi3GSupport ? "Y" : "N") << endl
560  << " SDI 12G: " << (inInfo.sdi12GSupport ? "Y" : "N") << endl
561  << " IP: " << (inInfo.ipSupport ? "Y" : "N") << endl
562  << " SDI Bi-Directional: " << (inInfo.biDirectionalSDI ? "Y" : "N") << endl
563  << " LTC In: " << (inInfo.ltcInSupport ? "Y" : "N") << endl
564  << " LTC Out: " << (inInfo.ltcOutSupport ? "Y" : "N") << endl
565  << " LTC In on Ref Port: " << (inInfo.ltcInOnRefPort ? "Y" : "N") << endl
566  << " Stereo Out: " << (inInfo.stereoOutSupport ? "Y" : "N") << endl
567  << " Stereo In: " << (inInfo.stereoInSupport ? "Y" : "N") << endl
568  << " Audio Sample Rates: " << inInfo.audioSampleRateList << endl
569  << " AudioNumChannelsList: " << inInfo.audioNumChannelsList << endl
570  << " AudioBitsPerSampleList: " << inInfo.audioBitsPerSampleList << endl
571  << " AudioInSourceList: " << inInfo.audioInSourceList << endl
572  << " AudioOutSourceList: " << inInfo.audioOutSourceList << endl
573  << " Audio Streams: " << inInfo.numAudioStreams << endl
574  << " Analog Audio Input Channels: " << inInfo.numAnalogAudioInputChannels << endl
575  << " Analog Audio Output Channels: " << inInfo.numAnalogAudioOutputChannels << endl
576  << " AES Audio Input Channels: " << inInfo.numAESAudioInputChannels << endl
577  << " AES Audio Output Channels: " << inInfo.numAESAudioOutputChannels << endl
578  << " Embedded Audio Input Channels: " << inInfo.numEmbeddedAudioInputChannels << endl
579  << " Embedded Audio Output Channels: " << inInfo.numEmbeddedAudioOutputChannels << endl
580  << " HDMI Audio Input Channels: " << inInfo.numHDMIAudioInputChannels << endl
581  << " HDMI Audio Output Channels: " << inInfo.numHDMIAudioOutputChannels << endl
582  << " DMA Engines: " << inInfo.numDMAEngines << endl
583  << " Serial Ports: " << inInfo.numSerialPorts << endl
584  #endif // AJA_DEBUG
585  << "";
586 
587  return inOutStr;
588 
589 } // NTV2DeviceInfo ostream operator <<
590 
591 
592 ostream & operator << (ostream & inOutStr, const NTV2AudioPhysicalFormat & inFormat)
593 {
594  inOutStr << "AudioPhysicalFormat:" << endl
595  << " boardNumber: " << inFormat.boardNumber << endl
596  << " sampleRate: " << inFormat.sampleRate << endl
597  << " numChannels: " << inFormat.numChannels << endl
598  << " bitsPerSample: " << inFormat.bitsPerSample << endl
599  #if defined (DEBUG) || defined (AJA_DEBUG)
600  << " sourceIn: 0x" << hex << inFormat.sourceIn << dec << endl
601  << " sourceOut: 0x" << hex << inFormat.sourceOut << dec << endl
602  #endif // DEBUG or AJA_DEBUG
603  ;
604 
605  return inOutStr;
606 
607 } // AudioPhysicalFormat ostream operator <<
608 
609 
610 std::ostream & operator << (std::ostream & inOutStr, const NTV2AudioPhysicalFormatList & inList)
611 {
612  for (NTV2AudioPhysicalFormatListConstIter iter (inList.begin ()); iter != inList.end (); ++iter)
613  inOutStr << *iter;
614 
615  return inOutStr;
616 
617 } // AudioPhysicalFormatList ostream operator <<
618 
619 
620 // Private methods
621 
622 void CNTV2DeviceScanner::SetVideoAttributes (NTV2DeviceInfo & info)
623 {
637  info.hdvSupport = NTV2DeviceCanDoHDV (info.deviceID);
646  info.pingLED = NTV2DeviceGetPingLED (info.deviceID);
654  info.sdi3GSupport = NTV2DeviceCanDo3GOut (info.deviceID, 0);
656  info.ipSupport = NTV2DeviceCanDoIP (info.deviceID);
665  info.procAmpSupport = false;
666 
667 } // SetVideoAttributes
668 
669 void CNTV2DeviceScanner::SetAudioAttributes(NTV2DeviceInfo & info, CNTV2Card & inBoard) const
670 {
671  // Start with empty lists...
672  info.audioSampleRateList.clear();
673  info.audioNumChannelsList.clear();
674  info.audioBitsPerSampleList.clear();
675  info.audioInSourceList.clear();
676  info.audioOutSourceList.clear();
677 
678 
679  if (inBoard.features().GetNumAudioSystems())
680  {
681  ULWord audioControl;
682  inBoard.ReadRegister(kRegAud1Control, audioControl);
683 
684  //audioSampleRateList
685  info.audioSampleRateList.push_back(k48KHzSampleRate);
686  if (inBoard.features().CanDoAudio96K())
687  info.audioSampleRateList.push_back(k96KHzSampleRate);
688 
689  //audioBitsPerSampleList
691 
692  //audioInSourceList
693  info.audioInSourceList.push_back(kSourceSDI);
694  if (audioControl & BIT(21))
695  info.audioInSourceList.push_back(kSourceAES);
696  if (inBoard.features().CanDoAnalogAudio())
697  info.audioInSourceList.push_back(kSourceAnalog);
698 
699  //audioOutSourceList
700  info.audioOutSourceList.push_back(kSourceAll);
701 
702  //audioNumChannelsList
703  if (inBoard.features().CanDoAudio2Channels())
705  if (inBoard.features().CanDoAudio6Channels())
707  if (inBoard.features().CanDoAudio8Channels())
709 
710  info.numAudioStreams = inBoard.features().GetNumAudioSystems();
711  }
712 
721 
722 } // SetAudioAttributes
723 
724 
725 // Sort functor based on PCI slot number...
726 static bool gCompareSlot (const NTV2DeviceInfo & b1, const NTV2DeviceInfo & b2)
727 {
728  return b1.deviceIndex < b2.deviceIndex;
729 }
730 
731 
732 // Sort boards in boardInfoList
734 {
735  std::sort (_deviceInfoList.begin (), _deviceInfoList.end (), gCompareSlot);
736 }
CNTV2DeviceScanner::IsLegalHexSerialNumber
static uint64_t IsLegalHexSerialNumber(const std::string &inStr)
Definition: ntv2devicescanner.cpp:54
NTV2DeviceGetNumLTCInputs
UWord NTV2DeviceGetNumLTCInputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11033
NTV2DeviceCanDo12GSDI
bool NTV2DeviceCanDo12GSDI(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:377
DeviceCapabilities::CanDoAudio2Channels
bool CanDoAudio2Channels(void)
Definition: ntv2card.h:85
NTV2AudioPhysicalFormat::sourceIn
AudioSourceEnum sourceIn
Definition: ntv2devicescanner.h:173
DeviceCapabilities::GetNumAESAudioOutputChannels
UWord GetNumAESAudioOutputChannels(void)
Definition: ntv2card.h:183
NTV2DeviceGetNumDownConverters
UWord NTV2DeviceGetNumDownConverters(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10220
kNumAudioChannels6
@ kNumAudioChannels6
Definition: ntv2audiodefines.h:41
NTV2DeviceInfo::audioOutSourceList
NTV2AudioSourceList audioOutSourceList
My supported audio output destinations (AES, etc.)
Definition: ntv2devicescanner.h:87
NTV2DeviceGetNumHDMIVideoInputs
UWord NTV2DeviceGetNumHDMIVideoInputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10766
NTV2DeviceInfo::quarterExpandSupport
bool quarterExpandSupport
Definition: ntv2devicescanner.h:60
NTV2DeviceInfo::numAnalogAudioInputChannels
UWord numAnalogAudioInputChannels
Total number of analog audio input channels.
Definition: ntv2devicescanner.h:89
NTV2DeviceInfo::biDirectionalSDI
bool biDirectionalSDI
Supports Bi-directional SDI.
Definition: ntv2devicescanner.h:76
DeviceCapabilities::GetNumAnalogAudioOutputChannels
UWord GetNumAnalogAudioOutputChannels(void)
Definition: ntv2card.h:185
NTV2DeviceInfo::audioBitsPerSampleList
NTV2AudioBitsPerSampleList audioBitsPerSampleList
My supported audio bits-per-sample.
Definition: ntv2devicescanner.h:85
DeviceCapabilities::CanDoAudio8Channels
bool CanDoAudio8Channels(void)
Definition: ntv2card.h:87
kSourceAnalog
@ kSourceAnalog
Definition: ntv2audiodefines.h:69
NTV2DeviceInfo::numDownConverters
UWord numDownConverters
Total number of down-converters.
Definition: ntv2devicescanner.h:53
NTV2DeviceInfo::numAnlgVidOutputs
UWord numAnlgVidOutputs
Total number of analog video outputs.
Definition: ntv2devicescanner.h:47
NTV2AudioPhysicalFormat::bitsPerSample
AudioBitsPerSampleEnum bitsPerSample
Definition: ntv2devicescanner.h:172
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:709
NTV2DeviceInfo::has3GLevelConversion
bool has3GLevelConversion
Supports 3G Level Conversion?
Definition: ntv2devicescanner.h:71
NTV2DeviceInfo::rateConvertSupport
bool rateConvertSupport
Definition: ntv2devicescanner.h:56
CNTV2DeviceScanner
This class is used to enumerate AJA devices that are attached and known to the local host computer.
Definition: ntv2devicescanner.h:208
DeviceCapabilities::GetNumAudioSystems
UWord GetNumAudioSystems(void)
Definition: ntv2card.h:188
NTV2DeviceInfo::numHDMIVidInputs
UWord numHDMIVidInputs
Total number of HDMI inputs.
Definition: ntv2devicescanner.h:48
NTV2DeviceInfo::sdi12GSupport
bool sdi12GSupport
Supports 12G?
Definition: ntv2devicescanner.h:74
NTV2DeviceInfo::deviceSerialNumber
uint64_t deviceSerialNumber
Unique device serial number.
Definition: ntv2devicescanner.h:42
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:601
NTV2DeviceInfo::ltcInSupport
bool ltcInSupport
Accepts LTC input?
Definition: ntv2devicescanner.h:77
kSourceSDI
@ kSourceSDI
Definition: ntv2audiodefines.h:66
NTV2AudioSourceListConstIter
NTV2AudioSourceList::const_iterator NTV2AudioSourceListConstIter
Definition: ntv2devicescanner.h:26
NTV2DeviceInfo::numHDMIVidOutputs
UWord numHDMIVidOutputs
Total number of HDMI outputs.
Definition: ntv2devicescanner.h:49
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:327
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:246
k48KHzSampleRate
@ k48KHzSampleRate
Definition: ntv2audiodefines.h:59
NTV2AudioPhysicalFormat::sourceOut
AudioSourceEnum sourceOut
Definition: ntv2devicescanner.h:174
NTV2DeviceInfoList
std::vector< NTV2DeviceInfo > NTV2DeviceInfoList
I am an ordered list of NTV2DeviceInfo structs.
Definition: ntv2devicescanner.h:154
NTV2DeviceGetNumAnalogVideoInputs
UWord NTV2DeviceGetNumAnalogVideoInputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:9686
NTV2DeviceInfo::numSerialPorts
UWord numSerialPorts
Total number of serial ports.
Definition: ntv2devicescanner.h:98
NTV2DeviceGetNumInputConverters
UWord NTV2DeviceGetNumInputConverters(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10944
NTV2DeviceCanDoMultiFormat
bool NTV2DeviceCanDoMultiFormat(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4065
CNTV2DeviceScanner::GetDeviceInfo
virtual bool GetDeviceInfo(const ULWord inDeviceIndexNumber, NTV2DeviceInfo &outDeviceInfo, const bool inRescan=false)
Returns detailed information about the AJA device having the given zero-based index number.
Definition: ntv2devicescanner.cpp:221
NTV2DeviceCanDoDualLink
bool NTV2DeviceCanDoDualLink(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:2357
NTV2DeviceCanDoProgrammableCSC
bool NTV2DeviceCanDoProgrammableCSC(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.cpp:1138
kNumAudioChannels2
@ kNumAudioChannels2
Definition: ntv2audiodefines.h:39
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
DeviceCapabilities::GetNumAnalogAudioInputChannels
UWord GetNumAnalogAudioInputChannels(void)
Definition: ntv2card.h:184
NTV2DeviceCanDoHDV
bool NTV2DeviceCanDoHDV(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:3166
CNTV2Card::SerialNum64ToString
static std::string SerialNum64ToString(const uint64_t inSerialNumber)
Returns a string containing the decoded, human-readable device serial number.
Definition: ntv2card.cpp:213
DeviceCapabilities::GetNumEmbeddedAudioInputChannels
UWord GetNumEmbeddedAudioInputChannels(void)
Definition: ntv2card.h:193
k96KHzSampleRate
@ k96KHzSampleRate
Definition: ntv2audiodefines.h:60
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:294
CNTV2DeviceScanner::GetDeviceInfoList
virtual NTV2DeviceInfoList & GetDeviceInfoList(void)
Returns an NTV2DeviceInfoList that can be "walked" using standard C++ vector iteration techniques.
Definition: ntv2devicescanner.h:369
k32bitsPerSample
@ k32bitsPerSample
Definition: ntv2audiodefines.h:52
NTV2DeviceInfo::numHDMIAudioOutputChannels
UWord numHDMIAudioOutputChannels
Total number of HDMI audio output channels.
Definition: ntv2devicescanner.h:96
CNTV2DeviceScanner::SortDeviceInfoList
virtual void SortDeviceInfoList(void)
Sorts my device list by ascending PCI slot number.
Definition: ntv2devicescanner.cpp:733
NTV2DeviceCanDoStereoOut
bool NTV2DeviceCanDoStereoOut(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:5376
NTV2DeviceInfo::vidProcSupport
bool vidProcSupport
Definition: ntv2devicescanner.h:61
NTV2DeviceGetNumSerialPorts
UWord NTV2DeviceGetNumSerialPorts(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11656
NTV2DeviceInfo::numAnlgVidInputs
UWord numAnlgVidInputs
Total number of analog video inputs.
Definition: ntv2devicescanner.h:46
NTV2AudioChannelsPerFrameListConstIter
NTV2AudioChannelsPerFrameList::const_iterator NTV2AudioChannelsPerFrameListConstIter
Definition: ntv2devicescanner.h:22
NTV2DeviceCanDoProRes
bool NTV2DeviceCanDoProRes(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4618
NTV2DeviceCanDoStereoIn
bool NTV2DeviceCanDoStereoIn(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:5286
NTV2AudioPhysicalFormat::boardNumber
ULWord boardNumber
Definition: ntv2devicescanner.h:169
CNTV2Card::features
virtual class DeviceCapabilities & features(void)
Definition: ntv2card.h:377
NTV2DeviceGetPingLED
ULWord NTV2DeviceGetPingLED(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:12101
NTV2AudioBitsPerSampleList
std::vector< AudioBitsPerSampleEnum > NTV2AudioBitsPerSampleList
Definition: ntv2devicescanner.h:29
NTV2AudioSampleRateList
std::vector< AudioSampleRateEnum > NTV2AudioSampleRateList
Definition: ntv2devicescanner.h:17
CNTV2DeviceScanner::CompareDeviceInfoLists
static bool CompareDeviceInfoLists(const NTV2DeviceInfoList &inOldList, const NTV2DeviceInfoList &inNewList, NTV2DeviceInfoList &outDevicesAdded, NTV2DeviceInfoList &outDevicesRemoved)
Compares two NTV2DeviceInfoLists and returns a list of additions and a list of removals.
Definition: ntv2devicescanner.cpp:394
kSourceADAT
@ kSourceADAT
Definition: ntv2audiodefines.h:68
NTV2AudioPhysicalFormat::sampleRate
AudioSampleRateEnum sampleRate
Definition: ntv2devicescanner.h:170
NTV2DeviceInfo::numVidOutputs
UWord numVidOutputs
Total number of video outputs – analog, digital, whatever.
Definition: ntv2devicescanner.h:45
aja::lower
std::string & lower(std::string &str)
Definition: common.cpp:436
NTV2DeviceInfo::deviceIdentifier
std::string deviceIdentifier
Device name as seen in Control Panel, Watcher, Cables, etc.
Definition: ntv2devicescanner.h:43
NTV2DeviceInfo::audioInSourceList
NTV2AudioSourceList audioInSourceList
My supported audio input sources (AES, ADAT, etc.)
Definition: ntv2devicescanner.h:86
NTV2DeviceCanDoIsoConvert
bool NTV2DeviceCanDoIsoConvert(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:3615
NTV2DeviceInfo::has4KSupport
bool has4KSupport
Supports 4K formats?
Definition: ntv2devicescanner.h:69
DeviceCapabilities::IsDNxIV
bool IsDNxIV(void)
Definition: ntv2card.h:166
ULWord
uint32_t ULWord
Definition: ajatypes.h:246
NTV2DeviceCanDoRateConvert
bool NTV2DeviceCanDoRateConvert(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4733
ntv2devicescanner.h
Declares the CNTV2DeviceScanner class.
AsNTV2DriverInterfaceRef
#define AsNTV2DriverInterfaceRef(_x_)
Definition: ntv2driverinterface.h:48
NTV2DeviceInfo::numOutputConverters
UWord numOutputConverters
Total number of output converters.
Definition: ntv2devicescanner.h:51
NTV2DeviceHasBiDirectionalSDI
bool NTV2DeviceHasBiDirectionalSDI(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:6454
DeviceCapabilities::GetNumEmbeddedAudioOutputChannels
UWord GetNumEmbeddedAudioOutputChannels(void)
Definition: ntv2card.h:194
NTV2DeviceIDToString
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4673
NTV2DeviceCanDo3GOut
bool NTV2DeviceCanDo3GOut(NTV2DeviceID boardID, UWord index0)
Definition: ntv2devicefeatures.cpp:52
NTV2DeviceGetDownConverterDelay
UWord NTV2DeviceGetDownConverterDelay(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:8440
CNTV2DeviceScanner::ScanHardware
virtual void ScanHardware(void)
Re-scans the local host for connected AJA devices.
Definition: ntv2devicescanner.cpp:168
CNTV2DeviceScanner::CNTV2DeviceScanner
CNTV2DeviceScanner(const bool inScanNow=true)
Constructs me.
Definition: ntv2devicescanner.cpp:90
CNTV2Card::GetSerialNumberString
virtual bool GetSerialNumberString(std::string &outSerialNumberString)
Answers with a string that contains my human-readable serial number.
Definition: ntv2card.cpp:219
NTV2DeviceGetNumVideoInputs
UWord NTV2DeviceGetNumVideoInputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11923
NTV2DeviceGetNumHDMIVideoOutputs
UWord NTV2DeviceGetNumHDMIVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10855
CNTV2DeviceScanner::IsLegalDecimalNumber
static bool IsLegalDecimalNumber(const std::string &inStr, const size_t inMaxLength=2)
Definition: ntv2devicescanner.cpp:44
CNTV2DeviceScanner::DeviceIDPresent
virtual bool DeviceIDPresent(const NTV2DeviceID inDeviceID, const bool inRescan=false)
Returns true if one or more AJA devices having the specified device identifier are attached and known...
Definition: ntv2devicescanner.cpp:207
DeviceCapabilities::CanDoAudio6Channels
bool CanDoAudio6Channels(void)
Definition: ntv2card.h:86
aja::upper
std::string & upper(std::string &str)
Definition: common.cpp:442
UWord
uint16_t UWord
Definition: ajatypes.h:244
NTV2DeviceCanDo4KVideo
bool NTV2DeviceCanDo4KVideo(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:827
CNTV2Card::GetSerialNumber
virtual uint64_t GetSerialNumber(void)
Answers with my serial number.
Definition: ntv2card.cpp:205
NTV2AudioPhysicalFormat
Definition: ntv2devicescanner.h:168
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2DeviceInfo::numDMAEngines
UWord numDMAEngines
Total number of DMA engines.
Definition: ntv2devicescanner.h:97
NTV2DeviceCanDo3GLevelConversion
bool NTV2DeviceCanDo3GLevelConversion(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:647
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:259
CNTV2DeviceScanner::GetDeviceWithSerial
static bool GetDeviceWithSerial(const uint64_t inSerialNumber, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the first AJA device whose serial number...
Definition: ntv2devicescanner.cpp:315
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:262
NTV2DeviceGetNumAnalogVideoOutputs
UWord NTV2DeviceGetNumAnalogVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:9775
NTV2DeviceCanDoQuarterExpand
bool NTV2DeviceCanDoQuarterExpand(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4643
NTV2DeviceGetNumLTCOutputs
UWord NTV2DeviceGetNumLTCOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11122
NTV2DeviceInfo::rgbAlphaOutputSupport
bool rgbAlphaOutputSupport
Supports RGB alpha channel?
Definition: ntv2devicescanner.h:65
NTV2DeviceCanDoColorCorrection
bool NTV2DeviceCanDoColorCorrection(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.cpp:1131
NTV2DeviceCanDo2KVideo
bool NTV2DeviceCanDo2KVideo(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:557
NTV2DeviceInfo::numAESAudioOutputChannels
UWord numAESAudioOutputChannels
Total number of AES audio output channels.
Definition: ntv2devicescanner.h:94
CNTV2DeviceScanner::GetDeviceRefName
static std::string GetDeviceRefName(CNTV2Card &inDevice)
Definition: ntv2devicescanner.cpp:455
DeviceCapabilities::CanDoAnalogAudio
bool CanDoAnalogAudio(void)
Definition: ntv2card.h:81
ToUpper
static string ToUpper(const string &inStr)
Definition: ntv2devicescanner.cpp:23
NTV2DeviceInfo::has2KSupport
bool has2KSupport
Supports 2K formats?
Definition: ntv2devicescanner.h:68
NTV2DeviceInfo::procAmpSupport
bool procAmpSupport
Definition: ntv2devicescanner.h:67
NTV2DeviceInfo::proResSupport
bool proResSupport
Supports ProRes?
Definition: ntv2devicescanner.h:72
NTV2DeviceInfo::stereoOutSupport
bool stereoOutSupport
Supports stereo output?
Definition: ntv2devicescanner.h:80
NTV2DeviceInfo::qrezSupport
bool qrezSupport
Definition: ntv2devicescanner.h:58
NTV2DeviceInfo::numUpConverters
UWord numUpConverters
Total number of up-converters.
Definition: ntv2devicescanner.h:52
gCompareSlot
static bool gCompareSlot(const NTV2DeviceInfo &b1, const NTV2DeviceInfo &b2)
Definition: ntv2devicescanner.cpp:726
NTV2DeviceCanDoDVCProHD
bool NTV2DeviceCanDoDVCProHD(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:2447
NTV2DeviceInfo::numEmbeddedAudioInputChannels
UWord numEmbeddedAudioInputChannels
Total number of embedded (SDI) audio input channels.
Definition: ntv2devicescanner.h:91
NTV2DeviceCanDoVideoProcessing
bool NTV2DeviceCanDoVideoProcessing(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:5555
CNTV2DeviceScanner::IsHexDigit
static bool IsHexDigit(const char inChr)
Definition: ntv2devicescanner.cpp:29
NTV2AudioPhysicalFormat::numChannels
AudioChannelsPerFrameEnum numChannels
Definition: ntv2devicescanner.h:171
NTV2DeviceInfo::programmableCSCSupport
bool programmableCSCSupport
Programmable color space converter?
Definition: ntv2devicescanner.h:64
NTV2DeviceInfoListConstIter
NTV2DeviceInfoList::const_iterator NTV2DeviceInfoListConstIter
Definition: ntv2devicescanner.h:155
NTV2DeviceInfo::multiFormat
bool multiFormat
Supports multiple video formats?
Definition: ntv2devicescanner.h:82
kRegAud1Control
@ kRegAud1Control
Definition: ntv2publicinterface.h:98
NTV2DeviceInfo::isoConvertSupport
bool isoConvertSupport
Definition: ntv2devicescanner.h:55
NTV2DeviceInfo::deviceIndex
ULWord deviceIndex
Device index number – this will be phased out someday.
Definition: ntv2devicescanner.h:40
NTV2DeviceInfo::numAnalogAudioOutputChannels
UWord numAnalogAudioOutputChannels
Total number of analog audio output channels.
Definition: ntv2devicescanner.h:93
NTV2DeviceInfo::numHDMIAudioInputChannels
UWord numHDMIAudioInputChannels
Total number of HDMI audio input channels.
Definition: ntv2devicescanner.h:92
DeviceCapabilities::CanDoAudio96K
bool CanDoAudio96K(void)
Definition: ntv2card.h:88
NTV2DeviceInfo::numVidInputs
UWord numVidInputs
Total number of video inputs – analog, digital, whatever.
Definition: ntv2devicescanner.h:44
NTV2DeviceInfo::has8KSupport
bool has8KSupport
Supports 8K formats?
Definition: ntv2devicescanner.h:70
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5579
NTV2AudioSourceList
std::vector< AudioSourceEnum > NTV2AudioSourceList
Definition: ntv2devicescanner.h:25
false
#define false
Definition: ntv2devicefeatures.h:25
NTV2DeviceCanDoIP
bool NTV2DeviceCanDoIP(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:3526
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:237
NTV2DeviceGetNumDMAEngines
ULWord NTV2DeviceGetNumDMAEngines(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10131
HEX0N
#define HEX0N(__x__, __n__)
Definition: debug.cpp:1174
NTV2DeviceInfo
Definition: ntv2devicescanner.h:37
operator<<
ostream & operator<<(ostream &inOutStr, const NTV2DeviceInfoList &inList)
Definition: ntv2devicescanner.cpp:359
NTV2AudioPhysicalFormatListConstIter
NTV2AudioPhysicalFormatList::const_iterator NTV2AudioPhysicalFormatListConstIter
Definition: ntv2devicescanner.h:191
ToLower
static string ToLower(const string &inStr)
Definition: ntv2devicescanner.cpp:17
NTV2DeviceInfo::audioSampleRateList
NTV2AudioSampleRateList audioSampleRateList
My supported audio sample rates.
Definition: ntv2devicescanner.h:83
NTV2DeviceCanDoLTCInOnRefPort
bool NTV2DeviceCanDoLTCInOnRefPort(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:3885
kSourceAES
@ kSourceAES
Definition: ntv2audiodefines.h:67
NTV2DeviceInfo::pingLED
ULWord pingLED
Definition: ntv2devicescanner.h:99
NTV2DeviceGetNumOutputConverters
UWord NTV2DeviceGetNumOutputConverters(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11478
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:371
NTV2DeviceInfo::operator==
bool operator==(const NTV2DeviceInfo &rhs) const
Definition: ntv2devicescanner.cpp:368
NTV2DeviceInfo::pciSlot
ULWord pciSlot
PCI slot (if applicable and/or known)
Definition: ntv2devicescanner.h:41
NTV2DeviceCanDoRGBPlusAlphaOut
bool NTV2DeviceCanDoRGBPlusAlphaOut(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4836
NTV2AudioSampleRateListConstIter
NTV2AudioSampleRateList::const_iterator NTV2AudioSampleRateListConstIter
Definition: ntv2devicescanner.h:18
NTV2DeviceInfo::ltcOutSupport
bool ltcOutSupport
Supports LTC output?
Definition: ntv2devicescanner.h:78
kSourceAll
@ kSourceAll
Definition: ntv2audiodefines.h:71
CNTV2DeviceScanner::operator=
virtual CNTV2DeviceScanner & operator=(const CNTV2DeviceScanner &inDeviceScanner)
Assigns an existing CNTV2DeviceScanner instance to me.
Definition: ntv2devicescanner.cpp:103
NTV2DeviceGetNumUpConverters
UWord NTV2DeviceGetNumUpConverters(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11745
NTV2DeviceGetNumVideoOutputs
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:12012
NTV2DeviceInfo::numInputConverters
UWord numInputConverters
Total number of input converters.
Definition: ntv2devicescanner.h:50
NTV2DeviceInfo::dvcproHDSupport
bool dvcproHDSupport
Definition: ntv2devicescanner.h:57
NTV2DeviceInfo::ipSupport
bool ipSupport
Supports IP IO?
Definition: ntv2devicescanner.h:75
NTV2DeviceCanDo8KVideo
bool NTV2DeviceCanDo8KVideo(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:917
NTV2DeviceInfo::colorCorrectionSupport
bool colorCorrectionSupport
Supports color correction?
Definition: ntv2devicescanner.h:63
NTV2DeviceInfo::sdi3GSupport
bool sdi3GSupport
Supports 3G?
Definition: ntv2devicescanner.h:73
NTV2DeviceInfo::breakoutBoxSupport
bool breakoutBoxSupport
Can support a breakout box?
Definition: ntv2devicescanner.h:66
BIT
#define BIT(_x_)
Definition: ajatypes.h:654
kSourceNone
@ kSourceNone
Definition: ntv2audiodefines.h:70
NTV2AudioPhysicalFormatList
std::vector< NTV2AudioPhysicalFormat > NTV2AudioPhysicalFormatList
I am an ordered list of NTV2AudioPhysicalFormat structs.
Definition: ntv2devicescanner.h:190
CNTV2DriverInterface
I'm the base class that undergirds the platform-specific derived classes (from which CNTV2Card is ult...
Definition: ntv2driverinterface.h:64
NTV2DeviceInfo::ltcInOnRefPort
bool ltcInOnRefPort
Supports LTC on reference input?
Definition: ntv2devicescanner.h:79
NTV2DeviceInfo::audioNumChannelsList
NTV2AudioChannelsPerFrameList audioNumChannelsList
My supported number of audio channels per frame.
Definition: ntv2devicescanner.h:84
NTV2AudioChannelsPerFrameList
std::vector< AudioChannelsPerFrameEnum > NTV2AudioChannelsPerFrameList
Definition: ntv2devicescanner.h:21
CNTV2DriverInterface::Open
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
Definition: ntv2driverinterface.cpp:128
DEVICE_ID_NOTFOUND
@ DEVICE_ID_NOTFOUND
Invalid or "not found".
Definition: ntv2enums.h:90
NTV2DeviceInfo::downConverterDelay
UWord downConverterDelay
Definition: ntv2devicescanner.h:54
NTV2DeviceInfo::stereoInSupport
bool stereoInSupport
Supports stereo input?
Definition: ntv2devicescanner.h:81
CNTV2DeviceScanner::IsDecimalDigit
static bool IsDecimalDigit(const char inChr)
Definition: ntv2devicescanner.cpp:34
NTV2DeviceInfo::numAESAudioInputChannels
UWord numAESAudioInputChannels
Total number of AES audio input channels.
Definition: ntv2devicescanner.h:90
DeviceCapabilities::GetNumAESAudioInputChannels
UWord GetNumAESAudioInputChannels(void)
Definition: ntv2card.h:182
NTV2DeviceInfo::deviceID
NTV2DeviceID deviceID
Device ID/species (e.g., DEVICE_ID_KONA3G, DEVICE_ID_IOXT, etc.)
Definition: ntv2devicescanner.h:39
CNTV2DriverInterface::Close
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call.
Definition: ntv2driverinterface.cpp:196
CNTV2DeviceScanner::IsAlphaNumeric
static bool IsAlphaNumeric(const char inStr)
Definition: ntv2devicescanner.cpp:39
CNTV2DeviceScanner::IsLegalSerialNumber
static bool IsLegalSerialNumber(const std::string &inStr)
Definition: ntv2devicescanner.cpp:82
NTV2AudioBitsPerSampleListConstIter
NTV2AudioBitsPerSampleList::const_iterator NTV2AudioBitsPerSampleListConstIter
Definition: ntv2devicescanner.h:30
DeviceCapabilities::GetNumHDMIAudioInputChannels
UWord GetNumHDMIAudioInputChannels(void)
Definition: ntv2card.h:197
kNumAudioChannels8
@ kNumAudioChannels8
Definition: ntv2audiodefines.h:42
NTV2DeviceInfo::numAudioStreams
UWord numAudioStreams
Maximum number of independent audio streams.
Definition: ntv2devicescanner.h:88
NTV2DeviceInfo::dualLinkSupport
bool dualLinkSupport
Supports dual-link?
Definition: ntv2devicescanner.h:62
NTV2DeviceCanDoQREZ
bool NTV2DeviceCanDoQREZ(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4630
NTV2DeviceInfo::hdvSupport
bool hdvSupport
Definition: ntv2devicescanner.h:59
DECN
#define DECN(__x__, __n__)
Definition: ntv2publicinterface.h:5580
NTV2DeviceInfo::numEmbeddedAudioOutputChannels
UWord numEmbeddedAudioOutputChannels
Total number of embedded (SDI) audio output channels.
Definition: ntv2devicescanner.h:95
DeviceCapabilities::GetNumHDMIAudioOutputChannels
UWord GetNumHDMIAudioOutputChannels(void)
Definition: ntv2card.h:198
NTV2DeviceCanDoBreakoutBox
bool NTV2DeviceCanDoBreakoutBox(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:1817