AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
ntv2card.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
9 #include "ntv2devicefeatures.h"
10 #include "ntv2card.h"
11 #include "ntv2debug.h"
12 #include "ntv2utils.h"
13 #include <sstream>
14 #include "ajabase/common/common.h"
15 //#include "ajabase/system/info.h" // for AJASystemInfo
16 
17 using namespace std;
18 
19 
20 // Default Constructor
22  : mDevCap(driverInterface())
23 {
24  _boardOpened = false;
25 }
26 
27 CNTV2Card::CNTV2Card (const UWord inDeviceIndex, const string & inHostName)
28  : mDevCap(driverInterface())
29 {
30  string hostName(inHostName);
31  aja::strip(hostName);
32  _boardOpened = false;
33  bool openOK = hostName.empty() ? CNTV2DriverInterface::Open(inDeviceIndex) : CNTV2DriverInterface::Open(hostName);
34  if (openOK)
35  {
36  if (IsBufferSizeSetBySW())
37  {
38  NTV2Framesize fbSize;
40  SetFrameBufferSize (fbSize);
41  }
42  else
43  {
45  NTV2FrameBufferFormat format;
46 
47  GetFrameGeometry (fg);
49 
52  }
53  }
54 }
55 
56 // Destructor
58 {
59  if (IsOpen ())
60  Close ();
61 
62 } // destructor
63 
64 
66 {
67  ULWord status (0);
68  return ReadRegister (kRegStatus, status) ? (status & 0xF) : -1;
69 }
70 
71 
73 {
74  ostringstream oss;
76  return oss.str();
77 }
78 
79 
81 {
84 }
85 
87 {
88  ostringstream oss;
89  oss << GetModelName() << " - " << GetIndexNumber();
90  return oss.str();
91 }
92 
93 
95 {
96  ULWord numBytes (0);
97  string dateStr, timeStr;
98  ostringstream oss;
99 
100  if (inFPGA == eFPGAVideoProc && GetInstalledBitfileInfo (numBytes, dateStr, timeStr))
101  oss << dateStr << " at " << timeStr;
102  else
103  oss << "Unavailable";
104 
105  return oss.str ();
106 }
107 
108 
110 {
111  ULWord status (0);
112  return ReadRegister (48, status) ? ((status >> 8) & 0xFF) : -1;
113 }
114 
115 
117 {
118  const UWord version (static_cast<UWord>(GetPCIFPGAVersion()));
119  ostringstream oss;
120  oss << hex << version;
121  return oss.str ();
122 }
123 
124 string CNTV2Card::GetDescription (void) const
125 {
126  if (!IsOpen())
127  return string();
128  if (IsRemote())
130 
131  CNTV2Card * pCard = (CNTV2Card*)(this); // Ugly: *sigh* If only most CNTV2Card member functions were 'const'
132  ostringstream oss;
133  string hostName("localhost"), snStr;
134 // AJASystemInfo sysInfo (AJA_SystemInfoMemoryUnit_Megabytes, AJA_SystemInfoSection_System);
135 // sysInfo.GetValue(AJA_SystemInfoTag_System_Name, hostName);
136  oss << pCard->GetModelName();
137  if (!pCard->GetSerialNumberString(snStr))
138  snStr.clear();
139  if (!snStr.empty())
140  oss << " '" << snStr << "'";
141  if (!hostName.empty())
142  oss << " on '" << hostName << "'";
143  oss << " at index " << DEC(GetIndexNumber());
144  return oss.str();
145 }
146 
148 {
149  static const string sDriverBuildTypes [] = {"", "b", "a", "d"};
150  UWord versions[4] = {0, 0, 0, 0};
151  ULWord versBits(0);
152  if (!GetDriverVersionComponents (versions[0], versions[1], versions[2], versions[3]))
153  return string(); // fail
154  if (!ReadRegister (kVRegDriverVersion, versBits))
155  return string(); // fail
156 
157  const string & dabr (sDriverBuildTypes[versBits >> 30]); // Bits 31:30 == build type
158  ostringstream oss;
159  oss << DEC(versions[0]) << "." << DEC(versions[1]) << "." << DEC(versions[2]);
160  if (dabr.empty())
161  oss << "." << DEC(versions[3]);
162  else
163  oss << dabr << DEC(versions[3]);
164  return oss.str();
165 
166 } // GetDriverVersionString
167 
168 
169 bool CNTV2Card::GetDriverVersionComponents (UWord & outMajor, UWord & outMinor, UWord & outPoint, UWord & outBuild)
170 {
171  outMajor = outMinor = outPoint = outBuild = 0;
172  ULWord driverVersionULWord (0);
173  if (!ReadRegister (kVRegDriverVersion, driverVersionULWord))
174  return false;
175  if (!driverVersionULWord) // If zero --- pre-15.0 driver?
176  return false;
177 
178  // The normal 15.0+ way of decoding the 32-bit driver version value:
179  outMajor = UWord(NTV2DriverVersionDecode_Major(driverVersionULWord));
180  outMinor = UWord(NTV2DriverVersionDecode_Minor(driverVersionULWord));
181  outPoint = UWord(NTV2DriverVersionDecode_Point(driverVersionULWord));
182  outBuild = UWord(NTV2DriverVersionDecode_Build(driverVersionULWord));
183  return true;
184 }
185 
186 
188 {
189  ULWord serialNum (0);
190  return ReadRegister (kRegReserved54, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
191 }
192 
193 
195 {
196  ULWord serialNum (0);
197  return ReadRegister (kRegReserved55, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
198 }
199 
201 {
202  const uint64_t lo(GetSerialNumberLow()), hi(GetSerialNumberHigh());
203  const uint64_t result((hi << 32) | lo);
204  return result;
205 }
206 
207 
208 string CNTV2Card::SerialNum64ToString (const uint64_t inSerialNumber) // Class method
209 {
210  return ::SerialNum64ToString(inSerialNumber);
211 } // SerialNum64ToString
212 
213 
214 bool CNTV2Card::GetSerialNumberString (string & outStr)
215 {
216  outStr.clear();
217  ULWord spiFlashVers(0);
218  if (!GetNumericParam(kDeviceGetSPIFlashVersion, spiFlashVers))
219  return false;
220  if (spiFlashVers < 6)
221  { // Older devices use 2 regs: kRegReserved54 & kRegReserved55
223  if (outStr.empty())
224  {outStr = "INVALID?"; return false;}
225 
226  // Prepend 5/6/7 for Io4K+/IoIP/IoX3, respectively...
227  const NTV2DeviceID devID(GetDeviceID());
228  if (devID == DEVICE_ID_IO4KPLUS)
229  outStr = "5" + outStr; // Io4K+/DNXIV: prepend "5"
230  else if (devID == DEVICE_ID_IOIP_2022 || devID == DEVICE_ID_IOIP_2110 || devID == DEVICE_ID_IOIP_2110_RGB12)
231  outStr = "6" + outStr; // IoIP: prepend "6"
232  else if (devID == DEVICE_ID_IOX3)
233  outStr = "7" + outStr; // IoX3: prepend "7"
234  }
235  else
236  { // Newer devices use 4 regs: kRegReserved54 thru kRegReserved57
237  ULWord serialArray[] = {0,0,0,0};
238  ReadRegister(kRegReserved56, serialArray[0]);
239  ReadRegister(kRegReserved57, serialArray[1]);
240  ReadRegister(kRegReserved54, serialArray[2]);
241  ReadRegister(kRegReserved55, serialArray[3]);
242  for (int serialIndex(0); serialIndex < 4; serialIndex++)
243  if (serialArray[serialIndex] != 0xffffffff)
244  for (int i(0); i < 4; i++)
245  {
246  const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
247  if (tempChar > 0 && tempChar != '.')
248  outStr.push_back(tempChar);
249  }
250  }
251  return true;
252 } // GetSerialNumberString
253 
254 
255 bool CNTV2Card::IS_CHANNEL_INVALID (const NTV2Channel inChannel) const
256 {
257  if (!NTV2_IS_VALID_CHANNEL (inChannel))
258  return true;
259  return false;
260 }
261 
262 
263 bool CNTV2Card::IS_OUTPUT_SPIGOT_INVALID (const UWord inOutputSpigot)
264 {
265  if (inOutputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoOutputs)))
266  {
268  if (itms.find(ULWord(NTV2_WgtSDIMonOut1)) != itms.end() && inOutputSpigot == 4)
269  return false; // Io4K Monitor Output exception
270  return true; // Invalid
271  }
272  return false;
273 }
274 
275 
276 bool CNTV2Card::IS_INPUT_SPIGOT_INVALID (const UWord inInputSpigot)
277 {
278  if (inInputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoInputs)))
279  return true;
280  return false;
281 }
282 
283 bool CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID (const UWord inInputHDMIPort)
284 {
285  if (inInputHDMIPort >= UWord(GetNumSupported(kDeviceGetNumHDMIVideoInputs)))
286  return true;
287  return false;
288 }
289 
291 {
293  {
294  ULWord totalFrames = GetNumSupported(kDeviceGetActiveMemorySize) / 0x800000;
297  totalFrames -= 6; // Lop off 48MB for HDMI MultiViewer
298  return totalFrames;
299  }
300  return ::NTV2DeviceGetNumberFrameBuffers(_boardID); // Handle non-stacked-audio devices
301 }
302 
303 bool CNTV2Card::GetInstalledBitfileInfo (ULWord & outNumBytes, std::string & outDateStr, std::string & outTimeStr)
304 {
305  outDateStr.clear ();
306  outTimeStr.clear ();
307  outNumBytes = 0;
308 
309  if (!_boardOpened)
310  return false; // Bail if I'm not open
311 
312  BITFILE_INFO_STRUCT bitFileInfo;
313  ::memset (&bitFileInfo, 0, sizeof (bitFileInfo));
314  bitFileInfo.whichFPGA = eFPGAVideoProc;
315 
316  // Call the OS specific method...
318  return false;
319 
320  // Fill in our OS independent data structure...
321  outDateStr = reinterpret_cast <char *> (&bitFileInfo.dateStr [0]);
322  outTimeStr = reinterpret_cast <char *> (&bitFileInfo.timeStr [0]);
323  outNumBytes = bitFileInfo.numBytes;
324  return true;
325 }
326 
328 {
329  ostringstream oss;
330  // format like: "date time name"
331  oss << inBitFileInfo.dateStr << " " << inBitFileInfo.timeStr << " ";
333  oss << "DNxIV";
334  else
335  oss << ::NTV2BitfileTypeToString(NTV2BitfileType(inBitFileInfo.bitFileType), true);
336  return oss.str();
337 }
338 
339 bool CNTV2Card::IsFailSafeBitfileLoaded (bool & outIsSafeBoot)
340 {
341  outIsSafeBoot = false;
343  return false;
344  return CNTV2DriverInterface::ReadRegister(kRegCPLDVersion, outIsSafeBoot, BIT(4), 4);
345 }
346 
347 
348 bool CNTV2Card::CanWarmBootFPGA (bool & outCanWarmBoot)
349 {
350  outCanWarmBoot = false; // Definitely can't
352  return false;
353 
354  ULWord version(0);
355  if (!ReadRegister(kRegCPLDVersion, version, BIT(0)|BIT(1)))
356  return false; // Fail
357  if (version != 3)
358  outCanWarmBoot = true; // Definitely can
359  return true;
360 }
361 
362 
364 {
366  ULWord audioCtlReg (0); // The Audio Control Register tells us what's connected
367 
368  if (IsOpen () && ReadRegister (kRegAud1Control, audioCtlReg))
369  {
370  const bool bPhonyKBox (false); // For debugging
371 
372  switch (_boardID)
373  {
374  case DEVICE_ID_KONA3G:
376  case DEVICE_ID_IO4K:
377  case DEVICE_ID_KONA4:
378  case DEVICE_ID_KONA4UFC:
379  case DEVICE_ID_KONA5:
381  case DEVICE_ID_KONA5_8K:
384  case DEVICE_ID_KONA5_OE1:
386  // Do we have a K3G-Box?
387  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
388  result = NTV2_K3GBox;
389  else
390  result = NTV2_BreakoutCableBNC;
391  break;
393  // Do we have a KL-Box?
394  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
395  result = NTV2_KLBox;
396  else
397  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
398  break;
399  case DEVICE_ID_KONALHI:
400  // Do we have a KLHi-Box?
401  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
402  result = NTV2_KLHiBox;
403  else
404  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
405  break;
406  case DEVICE_ID_KONAX:
407  // Do we have a BOB?
409  result = NTV2_BreakoutBoard;
410  break;
411  default:
412  break;
413  }
414  }
415  return result;
416 }
417 
418 #if !defined(NTV2_DEPRECATE_16_3)
421  NTV2FrameGeometry inFrameGeometry,
422  NTV2Standard inStandard)
423  {
424  return ::NTV2DeviceCanDoFormat (GetDeviceID(), inFrameRate, inFrameGeometry, inStandard);
425  }
426 
428  {
429  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID()); // Revisit for 2MB granularity
430  }
431 
433  {
434  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID()); // Revisit for 2MB granularity
435  }
436 
438  {
439  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID()); // Revisit for 2MB granularity
440  }
441 
443  {
444  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
445  }
446 
448  {
449  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
450  }
451 
453  {
454  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
455  }
456 
458  {
459  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
460  }
461 
464  return itms.find(ULWord(inVideoFormat)) != itms.end();
465  }
466 
469  return itms.find(ULWord(inFBFormat)) != itms.end();
470  }
471 
473  {
475  return wgtIDs.find(inWidgetID) != wgtIDs.end();
476  }
477 
480  return itms.find(ULWord(inConversionMode)) != itms.end();
481  }
482 
485  return itms.find(ULWord(inDSKMode)) != itms.end();
486  }
487 
490  return itms.find(ULWord(inInputSource)) != itms.end();
491  }
492 #endif // !defined(NTV2_DEPRECATE_16_3)
493 
494 
496 
497 
498 bool DeviceCapabilities::CanDoWidget (const NTV2WidgetType inWgtType, const UWord index0)
499 {
501 }
502 
503 
505 
506 
507 bool SDRAMAuditor::AssessDevice (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
508 {
509  mFrameTags.clear();
510  mDeviceID = DEVICE_ID_INVALID;
511  mNumFrames = 0;
512  mIntrinsicSize = 0;
513  if (!inDevice.IsOpen())
514  return false;
515 
516  mDeviceID = inDevice.GetDeviceID();
517  const ULWord totalBytes(::NTV2DeviceGetActiveMemorySize(mDeviceID));
518  mNumFrames = UWord(totalBytes / m8MB);
519  if (totalBytes % m8MB)
520  {mNumFrames++; cerr << DEC(totalBytes % m8MB) << " leftover/spare bytes -- last frame is partial frame" << endl;}
521  for (UWord frm(0); frm < mNumFrames; frm++)
522  mFrameTags.insert(FrameTag(frm, NTV2StringSet()));
523 
524  return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
525 }
526 
527 ostream & SDRAMAuditor::RawDump (ostream & oss) const
528 {
529  for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
530  {
531  const NTV2StringSet & tags(it->second);
532  oss << DEC0N(it->first,3) << ": " << aja::join(tags, ", ") << endl;
533  }
534  return oss;
535 }
536 
538 {
539  ULWordSet result; // Coalesce all regions into this one sorted set
540  for (size_t ndx(0); ndx < inRgn1.size(); ndx++)
541  if (result.find(inRgn1.at(ndx)) == result.end())
542  result.insert(inRgn1.at(ndx));
543  for (size_t ndx(0); ndx < inRgn2.size(); ndx++)
544  if (result.find(inRgn2.at(ndx)) == result.end())
545  result.insert(inRgn2.at(ndx));
546  for (size_t ndx(0); ndx < inRgn3.size(); ndx++)
547  if (result.find(inRgn3.at(ndx)) == result.end())
548  result.insert(inRgn3.at(ndx));
549  return result;
550 }
551 
552 ostream & SDRAMAuditor::DumpBlocks (ostream & oss) const
553 {
554  ULWordSequence badBlks, freeBlks, goodBlks;
555  GetRegions (freeBlks, goodBlks, badBlks);
556  ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks)); // Coalesce all regions into this one sorted set
557 
558  for (ULWordSetConstIter it(rgns.begin()); it != rgns.end(); ++it)
559  {
560  const ULWord rgnInfo(*it);
561  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
562  NTV2StringSet tags;
563  GetTagsForFrameIndex (startBlk, tags);
564  if (numBlks > 1)
565  oss << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " : ";
566  else
567  oss << "Frm " << DEC0N(startBlk,3) << " : ";
568  if (tags.empty())
569  oss << "{free}";
570  else
571  oss << aja::join(tags, ", ");
572  oss << endl;
573  }
574  return oss;
575 }
576 
577 bool SDRAMAuditor::GetRegions (ULWordSequence & outFree, ULWordSequence & outUsed, ULWordSequence & outBad) const
578 {
579  outFree.clear(); outUsed.clear(); outBad.clear();
580  FrameTagsConstIter it(mFrameTags.begin());
581  if (it == mFrameTags.end())
582  return true;
583  UWord frmStart(it->first), lastFrm(frmStart);
584  NTV2StringSet runTags(it->second);
585  while (++it != mFrameTags.end())
586  {
587  const NTV2StringSet & tags(it->second);
588  if (tags != runTags)
589  { // End of current run, start of new run
590  if (runTags.empty())
591  {
592  if (frmStart != lastFrm)
593  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
594  else
595  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
596  }
597  else if (runTags.size() > 1)
598  {
599  if (frmStart != lastFrm)
600  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
601  else
602  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
603  }
604  else
605  {
606  if (frmStart != lastFrm)
607  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
608  else
609  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
610  }
611  frmStart = lastFrm = it->first;
612  runTags = tags;
613  }
614  else
615  lastFrm = it->first; // Continue current run
616  }
617  if (runTags.empty())
618  {
619  if (frmStart != lastFrm)
620  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
621  else
622  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
623  }
624  else if (runTags.size() > 1)
625  {
626  if (frmStart != lastFrm)
627  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
628  else
629  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
630  }
631  else
632  {
633  if (frmStart != lastFrm)
634  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
635  else
636  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
637  }
638  return true;
639 }
640 
641 bool SDRAMAuditor::GetTagsForFrameIndex (const UWord inIndex, NTV2StringSet & outTags) const
642 {
643  outTags.clear();
644  FrameTagsConstIter it(mFrameTags.find(inIndex));
645  if (it == mFrameTags.end())
646  return false;
647  outTags = it->second;
648  return true;
649 }
650 
651 size_t SDRAMAuditor::GetTagCount (const UWord inIndex) const
652 {
653  FrameTagsConstIter it(mFrameTags.find(inIndex));
654  if (it == mFrameTags.end())
655  return 0;
656  return it->second.size();
657 }
658 
659 bool SDRAMAuditor::TranslateRegions (ULWordSequence & outDestRgns, const ULWordSequence & inSrcRgns, const bool inIsQuad, const bool inIsQuadQuad) const
660 {
661  outDestRgns.clear();
662  if (inIsQuad && inIsQuadQuad)
663  return false; // Can't be both
664  if (inSrcRgns.empty())
665  return true; // Empty list, not an error
666  const UWord _8MB_frames_per_dest_frame(UWord(GetIntrinsicFrameByteCount() / m8MB) * (inIsQuad?4:1) * (inIsQuadQuad?16:1)); // Should result in 1/4/16 or 2/8/32
667  if (!_8MB_frames_per_dest_frame)
668  return false; // Ordinarily won't happen, but possible with "ntv2:" (fake/software) "devices" having small SDRAM complement
669  if (_8MB_frames_per_dest_frame == 1)
670  {outDestRgns = inSrcRgns; return true;} // Same
671 
672  // For each region...
673  for (size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
674  { const ULWord val(inSrcRgns.at(ndx));
675  ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF); // <== These are in 8MB block units
676  startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
677  lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
678  outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
679  }
680  return true;
681 }
682 
683 bool SDRAMAuditor::TagAudioBuffers (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
684 {
685  ULWord addr(0);
686  bool isReading(false), isWriting(false);
687  const UWord numAudSystems(UWord(inDevice.GetNumSupported(kDeviceGetNumBufferedAudioSystems)));
688  for (NTV2AudioSystem audSys(NTV2_AUDIOSYSTEM_1); audSys < NTV2AudioSystem(numAudSystems); audSys = NTV2AudioSystem(audSys+1))
689  if (inDevice.GetAudioMemoryOffset (0, addr, audSys))
690  { ostringstream tag;
691  tag << "Aud" << DEC(audSys+1);
692  if (inDevice.IsAudioOutputRunning(audSys, isReading) && isReading)
693  tag << " Read";
694  if (inDevice.IsAudioInputRunning(audSys, isWriting) && isWriting)
695  tag << " Write";
696  TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ? string() : tag.str());
697  }
698  return true;
699 }
700 
702 {
703  const UWord numChannels (UWord(inDevice.GetNumSupported(kDeviceGetNumVideoChannels)) + (inDevice.HasMultiRasterWidget() ? 1 : 0));
704  NTV2ChannelSet skipChannels;
705  for (NTV2Channel chan(NTV2_CHANNEL1); chan < NTV2Channel(numChannels); chan = NTV2Channel(chan+1))
706  {
707  AUTOCIRCULATE_STATUS acStatus;
708  bool isEnabled(false), isMultiFormat(false), isQuad(false), isQuadQuad(false), isSquares(false), isTSI(false);
709  ostringstream tag;
710  uint64_t addr(0), len(0);
711  if (skipChannels.find(chan) != skipChannels.end())
712  continue; // Skip this channel/framestore
713  if (inDevice.AutoCirculateGetStatus (chan, acStatus) && !acStatus.IsStopped())
714  {
715  uint64_t tmp(0);
716  inDevice.GetDeviceFrameInfo(acStatus.GetStartFrame(), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, tmp);
717  inDevice.GetDeviceFrameInfo(acStatus.GetEndFrame(), chan, tmp, len);
718  tag << "AC" << DEC(chan+1) << (acStatus.IsInput() ? " Write" : " Read");
719  TagMemoryBlock(addr, tmp + len - addr, tag.str());
720  } // if GetStatus succeeded
721  else if (inDevice.IsChannelEnabled(chan, isEnabled) && isEnabled)
722  {
724  inDevice.GetMode(chan, mode);
725  ULWord frameNum(0);
726  if (NTV2_IS_INPUT_MODE(mode))
727  inDevice.GetInputFrame(chan, frameNum);
728  else
729  inDevice.GetOutputFrame(chan, frameNum);
730  inDevice.GetDeviceFrameInfo (UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
731  if (inDevice.IsMultiRasterWidgetChannel(chan))
732  tag << "MR" << DEC(chan+1); // MultiRaster Viewer
733  else
734  tag << "Ch" << DEC(chan+1);
735  tag << (NTV2_IS_INPUT_MODE(mode) ? " Write" : " Read");
736  TagMemoryBlock(addr, len, tag.str());
737  }
738  if (isSquares && chan == NTV2_CHANNEL1)
739  {skipChannels.insert(NTV2_CHANNEL2); skipChannels.insert(NTV2_CHANNEL3); skipChannels.insert(NTV2_CHANNEL4);}
740  else if (isSquares && chan == NTV2_CHANNEL5)
741  {skipChannels.insert(NTV2_CHANNEL6); skipChannels.insert(NTV2_CHANNEL7); skipChannels.insert(NTV2_CHANNEL8);}
742  else if (isQuad && !isQuadQuad && isTSI)
743  {
744  if (chan == NTV2_CHANNEL1)
745  skipChannels.insert(NTV2_CHANNEL2);
746  else if (chan == NTV2_CHANNEL3)
747  skipChannels.insert(NTV2_CHANNEL4);
748  else if (chan == NTV2_CHANNEL5)
749  skipChannels.insert(NTV2_CHANNEL6);
750  else if (chan == NTV2_CHANNEL7)
751  skipChannels.insert(NTV2_CHANNEL8);
752  }
753  } // for each device channel
754  if (!mIntrinsicSize)
755  {
757  inDevice.GetFrameBufferSize(NTV2_CHANNEL1, frmsz);
758  mIntrinsicSize = ::NTV2FramesizeToByteCount(frmsz);
759  }
760  return true;
761 }
762 
763 bool SDRAMAuditor::TagMemoryBlock (const ULWord inStartAddr, const ULWord inByteLength, const string & inTag)
764 {
765  if (inStartAddr % m8MB)
766  return false;
767  if (inByteLength % m8MB)
768  return false;
769  if (inTag.empty())
770  return false;
771  const UWord startFrm(UWord(inStartAddr / m8MB)), frmCnt(UWord(inByteLength / m8MB));
772  for (UWord frm(0); frm < frmCnt; frm++)
773  {
774  UWord frameNum(startFrm + frm);
775  NTV2StringSet & tags(mFrameTags[frameNum]);
776  if (tags.find(inTag) == tags.end())
777  {
778  tags.insert(inTag);
779  if (frameNum >= mNumFrames)
780  tags.insert("Invalid");
781  }
782  }
783  return true;
784 }
CNTV2Card::DeviceGetAudioFrameBuffer
virtual ULWord DeviceGetAudioFrameBuffer(void)
Definition: ntv2card.cpp:432
kDeviceGetNumVideoInputs
@ kDeviceGetNumVideoInputs
The number of SDI video inputs on the device.
Definition: ntv2devicefeatures.h:207
CNTV2Card::IsAudioOutputRunning
virtual bool IsAudioOutputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the playout side of the given NTV2AudioSystem is currently running.
Definition: ntv2audio.cpp:1066
SDRAMAuditor::TagMemoryBlock
bool TagMemoryBlock(const ULWord inStartAddr, const ULWord inByteLength, const std::string &inTag)
kDeviceCanDoStackedAudio
@ kDeviceCanDoStackedAudio
True if device uses a "stacked" arrangement of its audio buffers.
Definition: ntv2devicefeatures.h:85
CNTV2Card::SetFrameBufferSize
virtual bool SetFrameBufferSize(const NTV2Framesize inSize)
Sets the device's intrinsic frame buffer size.
Definition: ntv2register.cpp:1738
BITFILE_INFO_STRUCT::whichFPGA
NTV2XilinxFPGA whichFPGA
Definition: ntv2publicinterface.h:4816
CNTV2Card::GetSerialNumberHigh
virtual ULWord GetSerialNumberHigh(void)
Definition: ntv2card.cpp:194
NTV2_CHANNEL8
@ NTV2_CHANNEL8
Specifies channel or Frame Store 8 (or the 8th item).
Definition: ntv2enums.h:1343
NTV2_CHANNEL2
@ NTV2_CHANNEL2
Specifies channel or Frame Store 2 (or the 2nd item).
Definition: ntv2enums.h:1337
NTV2_WgtSDIMonOut1
@ NTV2_WgtSDIMonOut1
Definition: ntv2enums.h:2940
kDeviceGetSPIFlashVersion
@ kDeviceGetSPIFlashVersion
The SPI-flash version on the device. (New in SDK 17.1)
Definition: ntv2devicefeatures.h:218
kNTV2EnumsID_VideoFormat
@ kNTV2EnumsID_VideoFormat
Identifies the NTV2VideoFormat enumerated type.
Definition: ntv2devicefeatures.h:239
NTV2_VideoProcBitFile
@ NTV2_VideoProcBitFile
Definition: ntv2enums.h:3307
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:389
SDRAMAuditor::TagAudioBuffers
bool TagAudioBuffers(CNTV2Card &inDevice, const bool inMarkStoppedAudioBuffersFree)
Definition: ntv2card.cpp:683
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1146
NTV2DeviceGetNumberFrameBuffers
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:496
aja::strip
std::string & strip(std::string &str, const std::string &ws)
Definition: common.cpp:461
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1334
CNTV2DriverInterface::_boardOpened
bool _boardOpened
True if I'm open and connected to the device.
Definition: ntv2driverinterface.h:680
NTV2Buffer
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
Definition: ntv2publicinterface.h:6022
CNTV2Card::IS_CHANNEL_INVALID
virtual bool IS_CHANNEL_INVALID(const NTV2Channel inChannel) const
Definition: ntv2card.cpp:255
aja::join
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
NTV2WidgetType
NTV2WidgetType
Definition: ntv2enums.h:3004
DEVICE_ID_KONA5
@ DEVICE_ID_KONA5
See KONA 5.
Definition: ntv2enums.h:48
CNTV2Card::IsBreakoutBoardConnected
virtual bool IsBreakoutBoardConnected(void)
Definition: ntv2register.cpp:4723
NTV2_KLBox
@ NTV2_KLBox
Definition: ntv2enums.h:3065
NTV2DeviceGetFrameBufferSize
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:325
CNTV2Card::GetDeviceVersion
virtual Word GetDeviceVersion(void)
Answers with this device's version number.
Definition: ntv2card.cpp:65
DEVICE_ID_IOX3
@ DEVICE_ID_IOX3
See IoX3.
Definition: ntv2enums.h:41
NTV2DeviceGetActiveMemorySize
ULWord NTV2DeviceGetActiveMemorySize(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:8457
DEVICE_ID_IOIP_2022
@ DEVICE_ID_IOIP_2022
See Io IP.
Definition: ntv2enums.h:38
SDRAMAuditor::GetTagsForFrameIndex
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:641
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3850
NTV2_BreakoutCableBNC
@ NTV2_BreakoutCableBNC
Identifies the AES/EBU audio breakout cable that has BNC connectors.
Definition: ntv2enums.h:3063
CNTV2Card::GetFrameBufferSize
virtual bool GetFrameBufferSize(const NTV2Channel inChannel, NTV2Framesize &outValue)
Answers with the frame size currently being used on the device.
Definition: ntv2register.cpp:2034
BITFILE_INFO_STRUCT::timeStr
char timeStr[(16)]
Definition: ntv2publicinterface.h:4810
DEVICE_ID_KONA5_8KMK
@ DEVICE_ID_KONA5_8KMK
See KONA 5.
Definition: ntv2enums.h:49
CNTV2DriverInterface::_ulNumFrameBuffers
ULWord _ulNumFrameBuffers
Definition: ntv2driverinterface.h:701
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
BITFILE_INFO_STRUCT::bitFileType
ULWord bitFileType
Definition: ntv2publicinterface.h:4813
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5608
CNTV2Card::GetInputFrame
virtual bool GetInputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current input frame index number for the given FrameStore. This identifies which par...
Definition: ntv2register.cpp:2218
kDeviceGetNumVideoOutputs
@ kDeviceGetNumVideoOutputs
The number of SDI video outputs on the device.
Definition: ntv2devicefeatures.h:208
CNTV2Card::DeviceCanDoConversionMode
virtual bool DeviceCanDoConversionMode(const NTV2ConversionMode inCM)
Definition: ntv2card.cpp:478
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:210
CNTV2Card::GetInstalledBitfileInfo
virtual bool GetInstalledBitfileInfo(ULWord &outNumBytes, std::string &outDateStr, std::string &outTimeStr)
Returns the size and time/date stamp of the device's currently-installed firmware.
Definition: ntv2card.cpp:303
kDeviceCanDo12gRouting
@ kDeviceCanDo12gRouting
True if device supports 12G routing crosspoints.
Definition: ntv2devicefeatures.h:115
CNTV2Card::DeviceCanDoFrameBufferFormat
virtual bool DeviceCanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2card.cpp:467
CNTV2DriverInterface::_ulFrameBufferSize
ULWord _ulFrameBufferSize
Definition: ntv2driverinterface.h:702
CNTV2Card::SerialNum64ToString
static std::string SerialNum64ToString(const uint64_t inSerialNumber)
Returns a string containing the decoded, human-readable device serial number.
Definition: ntv2card.cpp:208
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or Frame Store 1 (or the first item).
Definition: ntv2enums.h:1336
ntv2debug.h
CNTV2Card::DeviceCanDoFormat
virtual bool DeviceCanDoFormat(const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2card.cpp:420
NTV2_BreakoutNone
@ NTV2_BreakoutNone
No identifiable breakout hardware appears to be attached.
Definition: ntv2enums.h:3061
CNTV2Card::DeviceCanDoWidget
virtual bool DeviceCanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2card.cpp:472
CNTV2Card::GetFrameBufferFormat
virtual bool GetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat &outValue)
Returns the current frame buffer format for the given FrameStore on the AJA device.
Definition: ntv2register.cpp:1875
kDeviceCanDoWarmBootFPGA
@ kDeviceCanDoWarmBootFPGA
True if device can warm-boot to load updated firmware.
Definition: ntv2devicefeatures.h:129
NTV2_K3GBox
@ NTV2_K3GBox
Definition: ntv2enums.h:3069
CNTV2DriverInterface::_boardID
NTV2DeviceID _boardID
My cached device ID.
Definition: ntv2driverinterface.h:679
kRegReserved57
@ kRegReserved57
Definition: ntv2publicinterface.h:160
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:399
NTV2FramesizeToByteCount
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
Definition: ntv2utils.cpp:5347
NTV2_CHANNEL6
@ NTV2_CHANNEL6
Specifies channel or Frame Store 6 (or the 6th item).
Definition: ntv2enums.h:1341
kDeviceGetNumBufferedAudioSystems
@ kDeviceGetNumBufferedAudioSystems
The total number of audio systems on the device that can read/write audio buffer memory....
Definition: ntv2devicefeatures.h:216
CNTV2Card::GetDeviceVersionString
virtual std::string GetDeviceVersionString(void)
Answers with this device's version number as a human-readable string.
Definition: ntv2card.cpp:72
NTV2_CHANNEL4
@ NTV2_CHANNEL4
Specifies channel or Frame Store 4 (or the 4th item).
Definition: ntv2enums.h:1339
ULWordSetConstIter
ULWordSet::const_iterator ULWordSetConstIter
Definition: ntv2publicinterface.h:55
CNTV2DriverInterface::IsSupported
virtual bool IsSupported(const NTV2BoolParamID inParamID)
Definition: ntv2driverinterface.h:422
NTV2DriverVersionDecode_Point
#define NTV2DriverVersionDecode_Point(__vers__)
Definition: ntv2publicinterface.h:5377
NTV2_CHANNEL5
@ NTV2_CHANNEL5
Specifies channel or Frame Store 5 (or the 5th item).
Definition: ntv2enums.h:1340
CNTV2Card::GetModelName
virtual std::string GetModelName(void)
Answers with this device's model name.
Definition: ntv2card.cpp:80
AUTOCIRCULATE_STATUS::IsInput
bool IsInput(void) const
Definition: ntv2publicinterface.h:7379
CNTV2DriverInterface::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: ntv2driverinterface.cpp:429
isEnabled
static bool isEnabled(CNTV2Card &device, const NTV2Channel inChannel)
Definition: ntv2supportlogger.cpp:143
CNTV2Card::IS_INPUT_SPIGOT_INVALID
virtual bool IS_INPUT_SPIGOT_INVALID(const UWord inInputSpigot)
Definition: ntv2card.cpp:276
CNTV2Card::GetBitfileInfoString
virtual std::string GetBitfileInfoString(const BITFILE_INFO_STRUCT &inBitFileInfo)
Generates and returns an info string with date, time and name for the given inBifFileInfo.
Definition: ntv2card.cpp:327
NTV2_KLHiBox
@ NTV2_KLHiBox
Definition: ntv2enums.h:3067
CNTV2Card::IsAudioInputRunning
virtual bool IsAudioInputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the capture side of the given NTV2AudioSystem is currently running.
Definition: ntv2audio.cpp:1157
CNTV2Card::GetDisplayName
virtual std::string GetDisplayName(void)
Answers with this device's display name.
Definition: ntv2card.cpp:86
kRegReserved54
@ kRegReserved54
Definition: ntv2publicinterface.h:157
SDRAMAuditor::DumpBlocks
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
Definition: ntv2card.cpp:552
BITFILE_INFO_STRUCT::dateStr
char dateStr[(16)]
Definition: ntv2publicinterface.h:4809
NTV2XilinxFPGA
NTV2XilinxFPGA
Definition: ntv2enums.h:3799
kDeviceGetNumAudioSystems
@ kDeviceGetNumAudioSystems
The number of independent Audio Systems on the device.
Definition: ntv2devicefeatures.h:188
kRegReserved56
@ kRegReserved56
Definition: ntv2publicinterface.h:159
CNTV2Card::GetOutputFrame
virtual bool GetOutputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current output frame number for the given FrameStore (expressed as an NTV2Channel).
Definition: ntv2register.cpp:2200
CNTV2Card::IS_OUTPUT_SPIGOT_INVALID
virtual bool IS_OUTPUT_SPIGOT_INVALID(const UWord inOutputSpigot)
Definition: ntv2card.cpp:263
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:156
ULWordSet
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:54
CNTV2Card::GetPCIFPGAVersionString
virtual std::string GetPCIFPGAVersionString(void)
Definition: ntv2card.cpp:116
DEVICE_ID_KONA5_8K
@ DEVICE_ID_KONA5_8K
See KONA 5.
Definition: ntv2enums.h:50
DEVICE_ID_KONA3G
@ DEVICE_ID_KONA3G
See KONA 3G (UFC Mode).
Definition: ntv2enums.h:44
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
NTV2DriverVersionDecode_Major
#define NTV2DriverVersionDecode_Major(__vers__)
Definition: ntv2publicinterface.h:5375
CNTV2Card::NULL_POINTER
static NTV2Buffer NULL_POINTER
Used for default empty NTV2Buffer parameters – do not modify.
Definition: ntv2card.h:6221
kDeviceGetNumVideoChannels
@ kDeviceGetNumVideoChannels
The number of video channels supported on the device.
Definition: ntv2devicefeatures.h:178
CNTV2Card::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2card.cpp:124
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7193
CNTV2Card::DeviceCanDoInputSource
virtual bool DeviceCanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2card.cpp:488
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or Frame Store 7 (or the 7th item).
Definition: ntv2enums.h:1342
CNTV2Card::DeviceGetFrameBufferSize
virtual ULWord DeviceGetFrameBufferSize(void)
Definition: ntv2card.cpp:427
DEVICE_ID_KONAX
@ DEVICE_ID_KONAX
See KONA X.
Definition: ntv2enums.h:77
CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID
virtual bool IS_HDMI_INPUT_SPIGOT_INVALID(const UWord inInputHDMIPort)
Definition: ntv2card.cpp:283
kNTV2EnumsID_ConversionMode
@ kNTV2EnumsID_ConversionMode
Identifies the NTV2ConversionMode enumerated type.
Definition: ntv2devicefeatures.h:248
DEVICE_ID_KONA4UFC
@ DEVICE_ID_KONA4UFC
See KONA 4 (UFC Mode).
Definition: ntv2enums.h:47
CNTV2Card::DeviceGetNumberFrameBuffers
virtual ULWord DeviceGetNumberFrameBuffers(void)
Definition: ntv2card.cpp:290
NTV2Mode
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
Definition: ntv2enums.h:1221
SDRAMAuditor::RawDump
std::ostream & RawDump(std::ostream &oss) const
Dumps a human-readable list of regions into the given stream.
Definition: ntv2card.cpp:527
NTV2DeviceIDToString
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4673
ntv2card.h
Declares the CNTV2Card class.
NTV2_BITFILE_IO4KPLUS_MAIN
@ NTV2_BITFILE_IO4KPLUS_MAIN
Definition: ntv2enums.h:3352
CNTV2Card::GetDeviceFrameInfo
virtual bool GetDeviceFrameInfo(const UWord inFrameNumber, const NTV2Channel inChannel, uint64_t &outAddress, uint64_t &outLength)
Answers with the address and size of the given frame.
Definition: ntv2dma.cpp:375
CNTV2Card::IsFailSafeBitfileLoaded
virtual bool IsFailSafeBitfileLoaded(bool &outIsFailSafe)
Answers whether or not the "fail-safe" (aka "safe-boot") bitfile is currently loaded and running in t...
Definition: ntv2card.cpp:339
CNTV2Card::HasMultiRasterWidget
virtual bool HasMultiRasterWidget(void)
Definition: ntv2card.h:6502
SDRAMAuditor::GetTagCount
size_t GetTagCount(const UWord inIndex) const
Definition: ntv2card.cpp:651
CNTV2Card::GetSerialNumberString
virtual bool GetSerialNumberString(std::string &outSerialNumberString)
Answers with a string that contains my human-readable serial number.
Definition: ntv2card.cpp:214
NTV2DeviceGetAudioFrameBuffer2
ULWord NTV2DeviceGetAudioFrameBuffer2(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
Definition: ntv2devicefeatures.cpp:659
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or Frame Store 3 (or the 3rd item).
Definition: ntv2enums.h:1338
UWord
uint16_t UWord
Definition: ajatypes.h:253
CNTV2Card::AutoCirculateGetStatus
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
Definition: ntv2autocirculate.cpp:646
CNTV2Card::GetSerialNumber
virtual uint64_t GetSerialNumber(void)
Answers with my serial number.
Definition: ntv2card.cpp:200
kNTV2EnumsID_InputSource
@ kNTV2EnumsID_InputSource
Identifies the NTV2InputSource enumerated type.
Definition: ntv2devicefeatures.h:241
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2Framesize
NTV2Framesize
Kona2/Xena2 specific enums.
Definition: ntv2enums.h:2091
Word
int16_t Word
Definition: ajatypes.h:252
NTV2BreakoutType
NTV2BreakoutType
Identifies the Breakout Boxes and Cables that may be attached to an AJA NTV2 device.
Definition: ntv2enums.h:3059
CNTV2DriverInterface::GetNumericParam
virtual bool GetNumericParam(const ULWord inParamID, ULWord &outValue)
Definition: ntv2driverinterface.cpp:1724
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
DEVICE_ID_KONA5_8K_MV_TX
@ DEVICE_ID_KONA5_8K_MV_TX
See KONA 5.
Definition: ntv2enums.h:65
CNTV2Card::CanWarmBootFPGA
virtual bool CanWarmBootFPGA(bool &outCanWarmBoot)
Answers whether or not the FPGA can be reloaded without powering off.
Definition: ntv2card.cpp:348
AUTOCIRCULATE_STATUS::IsStopped
bool IsStopped(void) const
Definition: ntv2publicinterface.h:7309
DEVICE_ID_KONALHEPLUS
@ DEVICE_ID_KONALHEPLUS
See KONA LHe Plus.
Definition: ntv2enums.h:74
NTV2WidgetID
NTV2WidgetID
Definition: ntv2enums.h:2878
DEVICE_ID_KONA5_OE1
@ DEVICE_ID_KONA5_OE1
See KONA 5.
Definition: ntv2enums.h:53
NTV2BitfileType
NTV2BitfileType
Definition: ntv2enums.h:3324
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:93
NTV2ChannelSet
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Definition: ntv2publicinterface.h:3854
AUTOCIRCULATE_STATUS::GetEndFrame
uint16_t GetEndFrame(void) const
Definition: ntv2publicinterface.h:7284
kNTV2EnumsID_WidgetID
@ kNTV2EnumsID_WidgetID
Identifies the NTV2AudioWidgetID enumerated type.
Definition: ntv2devicefeatures.h:247
CNTV2SignalRouter::WidgetIDFromTypeAndChannel
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
Definition: ntv2signalrouter.cpp:523
CNTV2DriverInterface::GetNumSupported
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
Definition: ntv2driverinterface.h:433
CNTV2Card::GetMode
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
Definition: ntv2register.cpp:1625
NTV2_BreakoutCableXLR
@ NTV2_BreakoutCableXLR
Identifies the AES/EBU audio breakout cable that has XLR connectors.
Definition: ntv2enums.h:3062
NTV2DSKMode
NTV2DSKMode
Definition: ntv2enums.h:3452
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:199
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1348
CNTV2Card::GetDriverVersionString
virtual std::string GetDriverVersionString(void)
Answers with this device's driver's version as a human-readable string.
Definition: ntv2card.cpp:147
CNTV2Card::GetBreakoutHardware
virtual NTV2BreakoutType GetBreakoutHardware(void)
Definition: ntv2card.cpp:363
BITFILE_INFO_STRUCT::numBytes
ULWord numBytes
Definition: ntv2publicinterface.h:4808
SDRAMAuditor::AssessDevice
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=(0))
Assesses the given device.
Definition: ntv2card.cpp:507
kDeviceGetNumHDMIVideoInputs
@ kDeviceGetNumHDMIVideoInputs
The number of HDMI video inputs on the device.
Definition: ntv2devicefeatures.h:198
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1244
DEVICE_ID_IOIP_2110
@ DEVICE_ID_IOIP_2110
See Io IP.
Definition: ntv2enums.h:39
kRegStatus
@ kRegStatus
Definition: ntv2publicinterface.h:124
DEVICE_ID_KONA5_3DLUT
@ DEVICE_ID_KONA5_3DLUT
See KONA 5.
Definition: ntv2enums.h:52
CNTV2Card::DeviceCanDoVideoFormat
virtual bool DeviceCanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2card.cpp:462
CNTV2Card::GetFrameGeometry
virtual bool GetFrameGeometry(NTV2FrameGeometry &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2register.cpp:970
kRegCPLDVersion
@ kRegCPLDVersion
Definition: ntv2publicinterface.h:166
SDRAMAuditor::GetRegions
bool GetRegions(ULWordSequence &outFree, ULWordSequence &outUsed, ULWordSequence &outBad) const
Answers with the lists of free, in-use and conflicting 8MB memory blocks. Each ULWord represents a re...
Definition: ntv2card.cpp:577
SDRAMAuditor::TranslateRegions
bool TranslateRegions(ULWordSequence &outRgns, const ULWordSequence &inRgns, const bool inIsQuad, const bool inIsQuadQuad) const
Translates an 8MB-chunked list of regions into another list of regions with frame indexes and sizes e...
Definition: ntv2card.cpp:659
kRegAud1Control
@ kRegAud1Control
Definition: ntv2publicinterface.h:127
kNTV2EnumsID_DSKMode
@ kNTV2EnumsID_DSKMode
Identifies the NTV2DSKMode enumerated type.
Definition: ntv2devicefeatures.h:249
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5606
common.h
Private include file for all ajabase sources.
CNTV2Card::~CNTV2Card
virtual ~CNTV2Card()
My destructor.
Definition: ntv2card.cpp:57
NTV2DriverVersionDecode_Minor
#define NTV2DriverVersionDecode_Minor(__vers__)
Definition: ntv2publicinterface.h:5376
kK2RegMaskKBoxDetect
@ kK2RegMaskKBoxDetect
Definition: ntv2publicinterface.h:1312
DEVICE_ID_IO4KPLUS
@ DEVICE_ID_IO4KPLUS
See Io4K Plus.
Definition: ntv2enums.h:35
NTV2_FRAMESIZE_8MB
@ NTV2_FRAMESIZE_8MB
Definition: ntv2enums.h:2095
CNTV2Card::DeviceCanDoDSKMode
virtual bool DeviceCanDoDSKMode(const NTV2DSKMode inDSKM)
Definition: ntv2card.cpp:483
std
Definition: json.hpp:5362
NTV2DeviceCanDoFormat
bool NTV2DeviceCanDoFormat(const NTV2DeviceID inDevID, const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2utils.cpp:4057
ULWordSequence
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:46
DEVICE_ID_KONA4
@ DEVICE_ID_KONA4
See KONA 4 (Quad Mode).
Definition: ntv2enums.h:46
AUTOCIRCULATE_STATUS::GetStartFrame
uint16_t GetStartFrame(void) const
Definition: ntv2publicinterface.h:7279
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
kDeviceHasMicrophoneInput
@ kDeviceHasMicrophoneInput
True if device has a microphone input connector.
Definition: ntv2devicefeatures.h:141
SDRAMAuditor::TagVideoFrames
bool TagVideoFrames(CNTV2Card &inDevice)
Definition: ntv2card.cpp:701
CNTV2DriverInterface::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2driverinterface.cpp:1160
NTV2FrameGeometry
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:339
CNTV2Card::IsChannelEnabled
virtual bool IsChannelEnabled(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the given FrameStore is enabled.
Definition: ntv2register.cpp:2122
NTV2ConversionMode
NTV2ConversionMode
Definition: ntv2enums.h:3667
DeviceCapabilities::CanDoWidget
bool CanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2devicecapabilities.h:260
CNTV2DriverInterface::GetFrameBufferSize
virtual ULWord GetFrameBufferSize(void) const
Definition: ntv2driverinterface.h:384
CNTV2Card::CNTV2Card
CNTV2Card()
My default constructor.
Definition: ntv2card.cpp:21
SDRAMAuditor::CoalesceRegions
static ULWordSet CoalesceRegions(const ULWordSequence &inRgn1, const ULWordSequence &inRgn2, const ULWordSequence &inRgn3)
Definition: ntv2card.cpp:537
kRegReserved55
@ kRegReserved55
Definition: ntv2publicinterface.h:158
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:407
CNTV2Card::GetDriverVersionComponents
virtual bool GetDriverVersionComponents(UWord &outMajor, UWord &outMinor, UWord &outPoint, UWord &outBuild)
Answers with the individual version components of this device's driver.
Definition: ntv2card.cpp:169
CNTV2Card::IsMultiRasterWidgetChannel
virtual bool IsMultiRasterWidgetChannel(const NTV2Channel inChannel)
Definition: ntv2register.cpp:4718
NTV2_BreakoutBoard
@ NTV2_BreakoutBoard
Definition: ntv2enums.h:3070
CNTV2Card::IsBufferSizeSetBySW
virtual bool IsBufferSizeSetBySW(void)
Definition: ntv2register.cpp:1678
CNTV2Card::GetFPGAVersionString
virtual std::string GetFPGAVersionString(const NTV2XilinxFPGA inFPGA=eFPGAVideoProc)
Definition: ntv2card.cpp:94
kDeviceGetActiveMemorySize
@ kDeviceGetActiveMemorySize
The size, in bytes, of the device's active RAM available for video and audio.
Definition: ntv2devicefeatures.h:169
NTV2_MODE_INVALID
@ NTV2_MODE_INVALID
The invalid mode.
Definition: ntv2enums.h:1227
DEVICE_ID_KONA3GQUAD
@ DEVICE_ID_KONA3GQUAD
See KONA 3G (Quad Mode).
Definition: ntv2enums.h:45
kDeviceCanReportFailSafeLoaded
@ kDeviceCanReportFailSafeLoaded
True if device can report if its "fail-safe" firmware is loaded/running.
Definition: ntv2devicefeatures.h:130
NTV2DriverVersionDecode_Build
#define NTV2DriverVersionDecode_Build(__vers__)
Definition: ntv2publicinterface.h:5378
NTV2BitfileTypeToString
std::string NTV2BitfileTypeToString(const NTV2BitfileType inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7783
NTV2_IS_INPUT_MODE
#define NTV2_IS_INPUT_MODE(__mode__)
Definition: ntv2enums.h:1231
CNTV2Card::GetSerialNumberLow
virtual ULWord GetSerialNumberLow(void)
Definition: ntv2card.cpp:187
kVRegDriverVersion
@ kVRegDriverVersion
Packed driver version – use NTV2DriverVersionEncode, NTV2DriverVersionDecode* macros to encode/decode...
Definition: ntv2virtualregisters.h:29
BIT
#define BIT(_x_)
Definition: ajatypes.h:563
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3848
DEVICE_ID_IOIP_2110_RGB12
@ DEVICE_ID_IOIP_2110_RGB12
See Io IP.
Definition: ntv2enums.h:40
DEVICE_ID_KONA5_2X4K
@ DEVICE_ID_KONA5_2X4K
See KONA 5.
Definition: ntv2enums.h:51
CNTV2DriverInterface
I'm the base class that undergirds the platform-specific derived classes (from which CNTV2Card is ult...
Definition: ntv2driverinterface.h:60
CNTV2Card::GetAudioMemoryOffset
virtual bool GetAudioMemoryOffset(const ULWord inOffsetBytes, ULWord &outAbsByteOffset, const NTV2AudioSystem inAudioSystem, const bool inCaptureBuffer=(0))
Answers with the byte offset in device SDRAM into the specified Audio System's audio buffer.
Definition: ntv2audio.cpp:1723
CNTV2DriverInterface::Open
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
Definition: ntv2driverinterface.cpp:131
DEVICE_ID_IO4K
@ DEVICE_ID_IO4K
See Io4K (Quad Mode).
Definition: ntv2enums.h:34
eFPGAVideoProc
@ eFPGAVideoProc
Definition: ntv2enums.h:3801
CNTV2DriverInterface::DriverGetBitFileInformation
virtual bool DriverGetBitFileInformation(BITFILE_INFO_STRUCT &outBitFileInfo, const NTV2BitFileType inBitFileType=NTV2_VideoProcBitFile)
Answers with the currently-installed bitfile information.
Definition: ntv2driverinterface.cpp:623
DEVICE_ID_KONALHI
@ DEVICE_ID_KONALHI
See KONA LHi.
Definition: ntv2enums.h:75
BITFILE_INFO_STRUCT
Definition: ntv2publicinterface.h:4803
CNTV2Card::DeviceGetAudioFrameBuffer2
virtual ULWord DeviceGetAudioFrameBuffer2(void)
Definition: ntv2card.cpp:437
SerialNum64ToString
std::string SerialNum64ToString(const uint64_t &inSerNum)
Definition: ntv2utils.cpp:8158
CNTV2Card::GetPCIFPGAVersion
virtual Word GetPCIFPGAVersion(void)
Definition: ntv2card.cpp:109
CNTV2DriverInterface::Close
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call.
Definition: ntv2driverinterface.cpp:227
CNTV2DriverInterface::GetSupportedItems
virtual ULWordSet GetSupportedItems(const NTV2EnumsID inEnumsID)
Definition: ntv2driverinterface.cpp:1410
kNTV2EnumsID_PixelFormat
@ kNTV2EnumsID_PixelFormat
Identifies the NTV2PixelFormat enumerated type.
Definition: ntv2devicefeatures.h:235
NTV2DeviceGetAudioFrameBuffer
ULWord NTV2DeviceGetAudioFrameBuffer(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
Definition: ntv2devicefeatures.cpp:653