AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
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 & outSerialNumberString)
215 {
217  {
218  outSerialNumberString = ::SerialNum64ToString(GetSerialNumber());
219  if (outSerialNumberString.empty())
220  {
221  outSerialNumberString = "INVALID?";
222  return false;
223  }
224 
225  const NTV2DeviceID deviceID(GetDeviceID());
226  if (deviceID == DEVICE_ID_IO4KPLUS) // Io4K+/DNxIV?
227  outSerialNumberString = "5" + outSerialNumberString; // prepend with "5"
228  else if (deviceID == DEVICE_ID_IOIP_2022 ||
229  deviceID == DEVICE_ID_IOIP_2110 ||
230  deviceID == DEVICE_ID_IOIP_2110_RGB12) // IoIP/DNxIP?
231  outSerialNumberString = "6" + outSerialNumberString; // prepend with "6"
232  else if (deviceID == DEVICE_ID_IOX3)
233  outSerialNumberString = "7" + outSerialNumberString; // prepend with "7"
234  }
235  else
236  {
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  outSerialNumberString.clear();
243  for (int serialIndex(0); serialIndex < 4; serialIndex++)
244  if (serialArray[serialIndex] != 0xffffffff)
245  for (int i(0); i < 4; i++)
246  {
247  const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
248  if (tempChar > 0 && tempChar != '.')
249  outSerialNumberString.push_back(tempChar);
250  }
251  }
252  return true;
253 } // GetSerialNumberString
254 
255 
256 bool CNTV2Card::IS_CHANNEL_INVALID (const NTV2Channel inChannel) const
257 {
258  if (!NTV2_IS_VALID_CHANNEL (inChannel))
259  return true;
260  return false;
261 }
262 
263 
264 bool CNTV2Card::IS_OUTPUT_SPIGOT_INVALID (const UWord inOutputSpigot)
265 {
266  if (inOutputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoOutputs)))
267  {
269  if (itms.find(ULWord(NTV2_WgtSDIMonOut1)) != itms.end() && inOutputSpigot == 4)
270  return false; // Io4K Monitor Output exception
271  return true; // Invalid
272  }
273  return false;
274 }
275 
276 
277 bool CNTV2Card::IS_INPUT_SPIGOT_INVALID (const UWord inInputSpigot)
278 {
279  if (inInputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoInputs)))
280  return true;
281  return false;
282 }
283 
284 bool CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID (const UWord inInputHDMIPort)
285 {
286  if (inInputHDMIPort >= UWord(GetNumSupported(kDeviceGetNumHDMIVideoInputs)))
287  return true;
288  return false;
289 }
290 
292 {
294  {
295  ULWord totalFrames = GetNumSupported(kDeviceGetActiveMemorySize) / 0x800000;
298  totalFrames -= 6; // Lop off 48MB for HDMI MultiViewer
299  return totalFrames;
300  }
301  return ::NTV2DeviceGetNumberFrameBuffers(_boardID); // Handle non-stacked-audio devices
302 }
303 
304 bool CNTV2Card::GetInstalledBitfileInfo (ULWord & outNumBytes, std::string & outDateStr, std::string & outTimeStr)
305 {
306  outDateStr.clear ();
307  outTimeStr.clear ();
308  outNumBytes = 0;
309 
310  if (!_boardOpened)
311  return false; // Bail if I'm not open
312 
313  BITFILE_INFO_STRUCT bitFileInfo;
314  ::memset (&bitFileInfo, 0, sizeof (bitFileInfo));
315  bitFileInfo.whichFPGA = eFPGAVideoProc;
316 
317  // Call the OS specific method...
319  return false;
320 
321  // Fill in our OS independent data structure...
322  outDateStr = reinterpret_cast <char *> (&bitFileInfo.dateStr [0]);
323  outTimeStr = reinterpret_cast <char *> (&bitFileInfo.timeStr [0]);
324  outNumBytes = bitFileInfo.numBytes;
325  return true;
326 }
327 
329 {
330  ostringstream oss;
331  // format like: "date time name"
332  oss << inBitFileInfo.dateStr << " " << inBitFileInfo.timeStr << " ";
334  oss << "DNxIV";
335  else
336  oss << ::NTV2BitfileTypeToString(NTV2BitfileType(inBitFileInfo.bitFileType), true);
337  return oss.str();
338 }
339 
340 bool CNTV2Card::IsFailSafeBitfileLoaded (bool & outIsSafeBoot)
341 {
342  outIsSafeBoot = false;
344  return false;
345  return CNTV2DriverInterface::ReadRegister(kRegCPLDVersion, outIsSafeBoot, BIT(4), 4);
346 }
347 
348 
349 bool CNTV2Card::CanWarmBootFPGA (bool & outCanWarmBoot)
350 {
351  outCanWarmBoot = false; // Definitely can't
353  return false;
354 
355  ULWord version(0);
356  if (!ReadRegister(kRegCPLDVersion, version, BIT(0)|BIT(1)))
357  return false; // Fail
358  if (version != 3)
359  outCanWarmBoot = true; // Definitely can
360  return true;
361 }
362 
363 
365 {
367  ULWord audioCtlReg (0); // The Audio Control Register tells us what's connected
368 
369  if (IsOpen () && ReadRegister (kRegAud1Control, audioCtlReg))
370  {
371  const bool bPhonyKBox (false); // For debugging
372 
373  switch (_boardID)
374  {
375  case DEVICE_ID_KONA3G:
377  case DEVICE_ID_IO4K:
378  case DEVICE_ID_KONA4:
379  case DEVICE_ID_KONA4UFC:
380  case DEVICE_ID_KONA5:
382  case DEVICE_ID_KONA5_8K:
385  case DEVICE_ID_KONA5_OE1:
387  // Do we have a K3G-Box?
388  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
389  result = NTV2_K3GBox;
390  else
391  result = NTV2_BreakoutCableBNC;
392  break;
394  // Do we have a KL-Box?
395  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
396  result = NTV2_KLBox;
397  else
398  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
399  break;
400  case DEVICE_ID_KONALHI:
401  // Do we have a KLHi-Box?
402  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
403  result = NTV2_KLHiBox;
404  else
405  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
406  break;
407  case DEVICE_ID_KONAX:
408  // Do we have a BOB?
410  result = NTV2_BreakoutBoard;
411  break;
412  default:
413  break;
414  }
415  }
416  return result;
417 }
418 
419 #if !defined(NTV2_DEPRECATE_16_3)
422  NTV2FrameGeometry inFrameGeometry,
423  NTV2Standard inStandard)
424  {
425  return ::NTV2DeviceCanDoFormat (GetDeviceID(), inFrameRate, inFrameGeometry, inStandard);
426  }
427 
429  {
430  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID()); // Revisit for 2MB granularity
431  }
432 
434  {
435  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID()); // Revisit for 2MB granularity
436  }
437 
439  {
440  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID()); // Revisit for 2MB granularity
441  }
442 
444  {
445  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
446  }
447 
449  {
450  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
451  }
452 
454  {
455  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
456  }
457 
459  {
460  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
461  }
462 
465  return itms.find(ULWord(inVideoFormat)) != itms.end();
466  }
467 
470  return itms.find(ULWord(inFBFormat)) != itms.end();
471  }
472 
474  {
476  return wgtIDs.find(inWidgetID) != wgtIDs.end();
477  }
478 
481  return itms.find(ULWord(inConversionMode)) != itms.end();
482  }
483 
486  return itms.find(ULWord(inDSKMode)) != itms.end();
487  }
488 
491  return itms.find(ULWord(inInputSource)) != itms.end();
492  }
493 #endif // !defined(NTV2_DEPRECATE_16_3)
494 
495 
497 
498 
499 bool DeviceCapabilities::CanDoWidget (const NTV2WidgetType inWgtType, const UWord index0)
500 {
502 }
503 
504 
506 
507 
508 bool SDRAMAuditor::AssessDevice (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
509 {
510  mFrameTags.clear();
511  mDeviceID = DEVICE_ID_INVALID;
512  mNumFrames = 0;
513  mIntrinsicSize = 0;
514  if (!inDevice.IsOpen())
515  return false;
516 
517  mDeviceID = inDevice.GetDeviceID();
518  const ULWord totalBytes(::NTV2DeviceGetActiveMemorySize(mDeviceID));
519  mNumFrames = UWord(totalBytes / m8MB);
520  if (totalBytes % m8MB)
521  {mNumFrames++; cerr << DEC(totalBytes % m8MB) << " leftover/spare bytes -- last frame is partial frame" << endl;}
522  for (UWord frm(0); frm < mNumFrames; frm++)
523  mFrameTags.insert(FrameTag(frm, NTV2StringSet()));
524 
525  return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
526 }
527 
528 ostream & SDRAMAuditor::RawDump (ostream & oss) const
529 {
530  for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
531  {
532  const NTV2StringSet & tags(it->second);
533  oss << DEC0N(it->first,3) << ": " << aja::join(tags, ", ") << endl;
534  }
535  return oss;
536 }
537 
539 {
540  ULWordSet result; // Coalesce all regions into this one sorted set
541  for (size_t ndx(0); ndx < inRgn1.size(); ndx++)
542  if (result.find(inRgn1.at(ndx)) == result.end())
543  result.insert(inRgn1.at(ndx));
544  for (size_t ndx(0); ndx < inRgn2.size(); ndx++)
545  if (result.find(inRgn2.at(ndx)) == result.end())
546  result.insert(inRgn2.at(ndx));
547  for (size_t ndx(0); ndx < inRgn3.size(); ndx++)
548  if (result.find(inRgn3.at(ndx)) == result.end())
549  result.insert(inRgn3.at(ndx));
550  return result;
551 }
552 
553 ostream & SDRAMAuditor::DumpBlocks (ostream & oss) const
554 {
555  ULWordSequence badBlks, freeBlks, goodBlks;
556  GetRegions (freeBlks, goodBlks, badBlks);
557  ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks)); // Coalesce all regions into this one sorted set
558 
559  for (ULWordSetConstIter it(rgns.begin()); it != rgns.end(); ++it)
560  {
561  const ULWord rgnInfo(*it);
562  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
563  NTV2StringSet tags;
564  GetTagsForFrameIndex (startBlk, tags);
565  if (numBlks > 1)
566  oss << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " : ";
567  else
568  oss << "Frm " << DEC0N(startBlk,3) << " : ";
569  if (tags.empty())
570  oss << "{free}";
571  else
572  oss << aja::join(tags, ", ");
573  oss << endl;
574  }
575  return oss;
576 }
577 
578 bool SDRAMAuditor::GetRegions (ULWordSequence & outFree, ULWordSequence & outUsed, ULWordSequence & outBad) const
579 {
580  outFree.clear(); outUsed.clear(); outBad.clear();
581  FrameTagsConstIter it(mFrameTags.begin());
582  if (it == mFrameTags.end())
583  return true;
584  UWord frmStart(it->first), lastFrm(frmStart);
585  NTV2StringSet runTags(it->second);
586  while (++it != mFrameTags.end())
587  {
588  const NTV2StringSet & tags(it->second);
589  if (tags != runTags)
590  { // End of current run, start of new run
591  if (runTags.empty())
592  {
593  if (frmStart != lastFrm)
594  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
595  else
596  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
597  }
598  else if (runTags.size() > 1)
599  {
600  if (frmStart != lastFrm)
601  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
602  else
603  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
604  }
605  else
606  {
607  if (frmStart != lastFrm)
608  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
609  else
610  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
611  }
612  frmStart = lastFrm = it->first;
613  runTags = tags;
614  }
615  else
616  lastFrm = it->first; // Continue current run
617  }
618  if (runTags.empty())
619  {
620  if (frmStart != lastFrm)
621  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
622  else
623  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
624  }
625  else if (runTags.size() > 1)
626  {
627  if (frmStart != lastFrm)
628  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
629  else
630  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
631  }
632  else
633  {
634  if (frmStart != lastFrm)
635  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
636  else
637  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
638  }
639  return true;
640 }
641 
642 bool SDRAMAuditor::GetTagsForFrameIndex (const UWord inIndex, NTV2StringSet & outTags) const
643 {
644  outTags.clear();
645  FrameTagsConstIter it(mFrameTags.find(inIndex));
646  if (it == mFrameTags.end())
647  return false;
648  outTags = it->second;
649  return true;
650 }
651 
652 size_t SDRAMAuditor::GetTagCount (const UWord inIndex) const
653 {
654  FrameTagsConstIter it(mFrameTags.find(inIndex));
655  if (it == mFrameTags.end())
656  return 0;
657  return it->second.size();
658 }
659 
660 bool SDRAMAuditor::TranslateRegions (ULWordSequence & outDestRgns, const ULWordSequence & inSrcRgns, const bool inIsQuad, const bool inIsQuadQuad) const
661 {
662  outDestRgns.clear();
663  if (inIsQuad && inIsQuadQuad)
664  return false; // Can't be both
665  if (inSrcRgns.empty())
666  return true; // Empty list, not an error
667  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
668  if (!_8MB_frames_per_dest_frame)
669  return false; // Ordinarily won't happen, but possible with "ntv2:" (fake/software) "devices" having small SDRAM complement
670  if (_8MB_frames_per_dest_frame == 1)
671  {outDestRgns = inSrcRgns; return true;} // Same
672 
673  // For each region...
674  for (size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
675  { const ULWord val(inSrcRgns.at(ndx));
676  ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF); // <== These are in 8MB block units
677  startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
678  lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
679  outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
680  }
681  return true;
682 }
683 
684 bool SDRAMAuditor::TagAudioBuffers (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
685 {
686  ULWord addr(0);
687  bool isReading(false), isWriting(false);
688  const UWord numAudSystems(UWord(inDevice.GetNumSupported(kDeviceGetNumBufferedAudioSystems)));
689  for (NTV2AudioSystem audSys(NTV2_AUDIOSYSTEM_1); audSys < NTV2AudioSystem(numAudSystems); audSys = NTV2AudioSystem(audSys+1))
690  if (inDevice.GetAudioMemoryOffset (0, addr, audSys))
691  { ostringstream tag;
692  tag << "Aud" << DEC(audSys+1);
693  if (inDevice.IsAudioOutputRunning(audSys, isReading) && isReading)
694  tag << " Read";
695  if (inDevice.IsAudioInputRunning(audSys, isWriting) && isWriting)
696  tag << " Write";
697  TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ? string() : tag.str());
698  }
699  return true;
700 }
701 
703 {
704  const UWord numChannels (UWord(inDevice.GetNumSupported(kDeviceGetNumVideoChannels)) + (inDevice.HasMultiRasterWidget() ? 1 : 0));
705  NTV2ChannelSet skipChannels;
706  for (NTV2Channel chan(NTV2_CHANNEL1); chan < NTV2Channel(numChannels); chan = NTV2Channel(chan+1))
707  {
708  AUTOCIRCULATE_STATUS acStatus;
709  bool isEnabled(false), isMultiFormat(false), isQuad(false), isQuadQuad(false), isSquares(false), isTSI(false);
710  ostringstream tag;
711  uint64_t addr(0), len(0);
712  if (skipChannels.find(chan) != skipChannels.end())
713  continue; // Skip this channel/framestore
714  if (inDevice.AutoCirculateGetStatus (chan, acStatus) && !acStatus.IsStopped())
715  {
716  uint64_t tmp(0);
717  inDevice.GetDeviceFrameInfo(acStatus.GetStartFrame(), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, tmp);
718  inDevice.GetDeviceFrameInfo(acStatus.GetEndFrame(), chan, tmp, len);
719  tag << "AC" << DEC(chan+1) << (acStatus.IsInput() ? " Write" : " Read");
720  TagMemoryBlock(addr, tmp + len - addr, tag.str());
721  } // if GetStatus succeeded
722  else if (inDevice.IsChannelEnabled(chan, isEnabled) && isEnabled)
723  {
725  inDevice.GetMode(chan, mode);
726  ULWord frameNum(0);
727  if (NTV2_IS_INPUT_MODE(mode))
728  inDevice.GetInputFrame(chan, frameNum);
729  else
730  inDevice.GetOutputFrame(chan, frameNum);
731  inDevice.GetDeviceFrameInfo (UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
732  if (inDevice.IsMultiRasterWidgetChannel(chan))
733  tag << "MR" << DEC(chan+1); // MultiRaster Viewer
734  else
735  tag << "Ch" << DEC(chan+1);
736  tag << (NTV2_IS_INPUT_MODE(mode) ? " Write" : " Read");
737  TagMemoryBlock(addr, len, tag.str());
738  }
739  if (isSquares && chan == NTV2_CHANNEL1)
740  {skipChannels.insert(NTV2_CHANNEL2); skipChannels.insert(NTV2_CHANNEL3); skipChannels.insert(NTV2_CHANNEL4);}
741  else if (isSquares && chan == NTV2_CHANNEL5)
742  {skipChannels.insert(NTV2_CHANNEL6); skipChannels.insert(NTV2_CHANNEL7); skipChannels.insert(NTV2_CHANNEL8);}
743  else if (isQuad && !isQuadQuad && isTSI)
744  {
745  if (chan == NTV2_CHANNEL1)
746  skipChannels.insert(NTV2_CHANNEL2);
747  else if (chan == NTV2_CHANNEL3)
748  skipChannels.insert(NTV2_CHANNEL4);
749  else if (chan == NTV2_CHANNEL5)
750  skipChannels.insert(NTV2_CHANNEL6);
751  else if (chan == NTV2_CHANNEL7)
752  skipChannels.insert(NTV2_CHANNEL8);
753  }
754  } // for each device channel
755  if (!mIntrinsicSize)
756  {
758  inDevice.GetFrameBufferSize(NTV2_CHANNEL1, frmsz);
759  mIntrinsicSize = ::NTV2FramesizeToByteCount(frmsz);
760  }
761  return true;
762 }
763 
764 bool SDRAMAuditor::TagMemoryBlock (const ULWord inStartAddr, const ULWord inByteLength, const string & inTag)
765 {
766  if (inStartAddr % m8MB)
767  return false;
768  if (inByteLength % m8MB)
769  return false;
770  if (inTag.empty())
771  return false;
772  const UWord startFrm(UWord(inStartAddr / m8MB)), frmCnt(UWord(inByteLength / m8MB));
773  for (UWord frm(0); frm < frmCnt; frm++)
774  {
775  UWord frameNum(startFrm + frm);
776  NTV2StringSet & tags(mFrameTags[frameNum]);
777  if (tags.find(inTag) == tags.end())
778  {
779  tags.insert(inTag);
780  if (frameNum >= mNumFrames)
781  tags.insert("Invalid");
782  }
783  }
784  return true;
785 }
CNTV2Card::DeviceGetAudioFrameBuffer
virtual ULWord DeviceGetAudioFrameBuffer(void)
Definition: ntv2card.cpp:433
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:1314
NTV2_CHANNEL2
@ NTV2_CHANNEL2
Specifies channel or Frame Store 2 (or the 2nd item).
Definition: ntv2enums.h:1308
NTV2_WgtSDIMonOut1
@ NTV2_WgtSDIMonOut1
Definition: ntv2enums.h:2909
kNTV2EnumsID_VideoFormat
@ kNTV2EnumsID_VideoFormat
Identifies the NTV2VideoFormat enumerated type.
Definition: ntv2devicefeatures.h:239
NTV2_VideoProcBitFile
@ NTV2_VideoProcBitFile
Definition: ntv2enums.h:3276
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:684
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1137
NTV2DeviceGetNumberFrameBuffers
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:493
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:1305
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:5993
CNTV2Card::IS_CHANNEL_INVALID
virtual bool IS_CHANNEL_INVALID(const NTV2Channel inChannel) const
Definition: ntv2card.cpp:256
aja::join
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
NTV2WidgetType
NTV2WidgetType
Definition: ntv2enums.h:2973
DEVICE_ID_KONA5
@ DEVICE_ID_KONA5
See KONA 5.
Definition: ntv2enums.h:48
CNTV2Card::IsBreakoutBoardConnected
virtual bool IsBreakoutBoardConnected(void)
Definition: ntv2register.cpp:4731
NTV2_KLBox
@ NTV2_KLBox
Definition: ntv2enums.h:3034
NTV2DeviceGetFrameBufferSize
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:323
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:8262
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:642
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3816
NTV2_BreakoutCableBNC
@ NTV2_BreakoutCableBNC
Identifies the AES/EBU audio breakout cable that has BNC connectors.
Definition: ntv2enums.h:3032
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:5607
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:479
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:207
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:304
kDeviceCanDo12gRouting
@ kDeviceCanDo12gRouting
True if device supports 12G routing crosspoints.
Definition: ntv2devicefeatures.h:115
CNTV2Card::DeviceCanDoFrameBufferFormat
virtual bool DeviceCanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2card.cpp:468
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:1307
ntv2debug.h
CNTV2Card::DeviceCanDoFormat
virtual bool DeviceCanDoFormat(const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2card.cpp:421
NTV2_BreakoutNone
@ NTV2_BreakoutNone
No identifiable breakout hardware appears to be attached.
Definition: ntv2enums.h:3030
CNTV2Card::DeviceCanDoWidget
virtual bool DeviceCanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2card.cpp:473
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:3038
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:396
NTV2FramesizeToByteCount
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
Definition: ntv2utils.cpp:5319
NTV2_CHANNEL6
@ NTV2_CHANNEL6
Specifies channel or Frame Store 6 (or the 6th item).
Definition: ntv2enums.h:1312
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:1310
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:1311
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:7346
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:403
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:277
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:328
NTV2_KLHiBox
@ NTV2_KLHiBox
Definition: ntv2enums.h:3036
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:553
BITFILE_INFO_STRUCT::dateStr
char dateStr[(16)]
Definition: ntv2publicinterface.h:4809
NTV2XilinxFPGA
NTV2XilinxFPGA
Definition: ntv2enums.h:3765
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:264
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:153
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:253
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:7160
CNTV2Card::DeviceCanDoInputSource
virtual bool DeviceCanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2card.cpp:489
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or Frame Store 7 (or the 7th item).
Definition: ntv2enums.h:1313
CNTV2Card::DeviceGetFrameBufferSize
virtual ULWord DeviceGetFrameBufferSize(void)
Definition: ntv2card.cpp:428
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:284
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:291
NTV2Mode
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
Definition: ntv2enums.h:1198
SDRAMAuditor::RawDump
std::ostream & RawDump(std::ostream &oss) const
Dumps a human-readable list of regions into the given stream.
Definition: ntv2card.cpp:528
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:3321
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:340
SDRAMAuditor::GetTagCount
size_t GetTagCount(const UWord inIndex) const
Definition: ntv2card.cpp:652
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:655
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or Frame Store 3 (or the 3rd item).
Definition: ntv2enums.h:1309
UWord
uint16_t UWord
Definition: ajatypes.h:251
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:2061
Word
int16_t Word
Definition: ajatypes.h:250
NTV2BreakoutType
NTV2BreakoutType
Identifies the Breakout Boxes and Cables that may be attached to an AJA NTV2 device.
Definition: ntv2enums.h:3028
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:349
AUTOCIRCULATE_STATUS::IsStopped
bool IsStopped(void) const
Definition: ntv2publicinterface.h:7276
DEVICE_ID_KONALHEPLUS
@ DEVICE_ID_KONALHEPLUS
See KONA LHe Plus.
Definition: ntv2enums.h:74
NTV2WidgetID
NTV2WidgetID
Definition: ntv2enums.h:2847
DEVICE_ID_KONA5_OE1
@ DEVICE_ID_KONA5_OE1
See KONA 5.
Definition: ntv2enums.h:53
NTV2BitfileType
NTV2BitfileType
Definition: ntv2enums.h:3293
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:91
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:7251
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:3031
NTV2DSKMode
NTV2DSKMode
Definition: ntv2enums.h:3419
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:197
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1319
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:364
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:508
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:1221
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:463
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:578
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:660
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:5605
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:2065
CNTV2Card::DeviceCanDoDSKMode
virtual bool DeviceCanDoDSKMode(const NTV2DSKMode inDSKM)
Definition: ntv2card.cpp:484
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:7246
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:702
CNTV2DriverInterface::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2driverinterface.cpp:1132
NTV2FrameGeometry
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:336
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:3633
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:538
kRegReserved55
@ kRegReserved55
Definition: ntv2publicinterface.h:158
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:381
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:4726
NTV2_BreakoutBoard
@ NTV2_BreakoutBoard
Definition: ntv2enums.h:3039
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:1204
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:7735
NTV2_IS_INPUT_MODE
#define NTV2_IS_INPUT_MODE(__mode__)
Definition: ntv2enums.h:1208
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:561
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3814
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
CNTV2Card::HasMultiRasterWidget
virtual bool HasMultiRasterWidget(void)
Definition: ntv2register.cpp:4694
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:3767
CNTV2DriverInterface::DriverGetBitFileInformation
virtual bool DriverGetBitFileInformation(BITFILE_INFO_STRUCT &outBitFileInfo, const NTV2BitFileType inBitFileType=NTV2_VideoProcBitFile)
Answers with the currently-installed bitfile information.
Definition: ntv2driverinterface.cpp:597
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:438
SerialNum64ToString
std::string SerialNum64ToString(const uint64_t &inSerNum)
Definition: ntv2utils.cpp:8110
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:199
CNTV2DriverInterface::GetSupportedItems
virtual ULWordSet GetSupportedItems(const NTV2EnumsID inEnumsID)
Definition: ntv2driverinterface.cpp:1382
NTV2DeviceGetSPIFlashVersion
UWord NTV2DeviceGetSPIFlashVersion(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:12190
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:649