AJA NTV2 SDK  18.1.0.2262
NTV2 SDK 18.1.0.2262
ntv2driverinterface.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ajatypes.h"
9 #include "ntv2enums.h"
10 #include "ntv2debug.h"
11 #include "ntv2driverinterface.h"
12 #include "ntv2devicefeatures.h"
13 #include "ntv2nubaccess.h"
14 #include "ntv2bitfile.h"
15 #include "ntv2utils.h"
16 #include "ntv2version.h"
17 #include "ntv2devicescanner.h" // for IsHexDigit, IsAlphaNumeric, etc.
18 #include "ajabase/system/debug.h"
19 #include "ajabase/system/atomic.h"
21 #include "ajabase/system/process.h"
22 #include "ajabase/common/common.h" // aja::join
23 #include <string.h>
24 #include <assert.h>
25 #include <iostream>
26 #include <sstream>
27 
28 using namespace std;
29 
30 #define INSTP(_p_) HEX0N(uint64_t(_p_),16)
31 #define DIFAIL(__x__) AJA_sERROR (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
32 #define DIWARN(__x__) AJA_sWARNING(AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
33 #define DINOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
34 #define DIINFO(__x__) AJA_sINFO (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
35 #define DIDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
36 
37 #define ARFAIL(__x__) AJA_sERROR (AJA_DebugUnit_AcquireRelease, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
38 #define ARWARN(__x__) AJA_sWARNING(AJA_DebugUnit_AcquireRelease, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
39 #define ARNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_AcquireRelease, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
40 #define ARINFO(__x__) AJA_sINFO (AJA_DebugUnit_AcquireRelease, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
41 #define ARDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_AcquireRelease, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
42 
43 #if defined(AJA_LINUX)
44  #define KVRegAcquireRefCount kVRegAcquireLinuxReferenceCount
45 #else
46  #define KVRegAcquireRefCount kVRegAcquireReferenceCount
47 #endif
48 
49 // Stats
50 static uint32_t gConstructCount(0); // Number of constructor calls made
51 static uint32_t gDestructCount(0); // Number of destructor calls made
52 static uint32_t gOpenCount(0); // Number of successful Open calls made
53 static uint32_t gCloseCount(0); // Number of Close calls made
54 //#define _DEBUGSTATS_ // Define this to log construct/destruct & open/close tallies
55 #if defined(_DEBUGSTATS_)
56  #define DIDBGX(__x__) AJA_sDEBUG (AJA_DebugUnit_DriverInterface, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
57 #else
58  #define DIDBGX(__x__)
59 #endif
60 
62 
64 {
65  NTV2StringList result;
66  result.push_back("ntv2nub"); result.push_back("ntv2"); result.push_back("ntv2local");
67  return result;
68 }
69 
70 static bool gSharedMode(false);
71 void CNTV2DriverInterface::SetShareMode (const bool inSharedMode) {gSharedMode = inSharedMode;}
73 static bool gOverlappedMode(false);
74 void CNTV2DriverInterface::SetOverlappedMode (const bool inOverlapMode) {gOverlappedMode = inOverlapMode;}
76 
77 
79 
81  : _boardNumber (0)
82  ,_boardID (DEVICE_ID_NOTFOUND)
83  ,_boardOpened (false)
85  ,mRecordRegWrites (false)
86  ,mSkipRegWrites (false)
87 #endif
88  ,_programStatus (0)
89  ,_pRPCAPI (AJA_NULL)
90  ,mInterruptEventHandles ()
91  ,mEventCounts ()
93  ,mRegWrites ()
94  ,mRegWritesLock ()
95 #endif // NTV2_WRITEREG_PROFILING
96 #if !defined(NTV2_DEPRECATE_16_0)
97  ,_pFrameBaseAddress (AJA_NULL)
98  ,_pRegisterBaseAddress (AJA_NULL)
99  ,_pRegisterBaseAddressLength (0)
100  ,_pXena2FlashBaseAddress (AJA_NULL)
101  ,_pCh1FrameBaseAddress (AJA_NULL)
102  ,_pCh2FrameBaseAddress (AJA_NULL)
103 #endif // !defined(NTV2_DEPRECATE_16_0)
104 #if !defined(NTV2_DEPRECATE_17_2)
105  ,_ulNumFrameBuffers (0)
106  ,_ulFrameBufferSize (0)
107 #endif
108 #if !defined(NTV2_DEPRECATE_16_0)
109  ,_pciSlot (0) // DEPRECATE!
110 #endif // !defined(NTV2_DEPRECATE_16_0)
111 {
114  mInterruptEventHandles.push_back(AJA_NULL);
115 
117  while (mEventCounts.size() < eNumInterruptTypes)
118  mEventCounts.push_back(0);
120  DIDBGX(DEC(gConstructCount) << " constructed, " << DEC(gDestructCount) << " destroyed");
121 } // constructor
122 
123 
125 {
127  if (_pRPCAPI)
128  delete _pRPCAPI;
129  _pRPCAPI = AJA_NULL;
130  DIDBGX(DEC(gConstructCount) << " constructed, " << DEC(gDestructCount) << " destroyed");
131 } // destructor
132 
133 CNTV2DriverInterface & CNTV2DriverInterface::operator = (const CNTV2DriverInterface & inRHS)
134 { (void) inRHS; NTV2_ASSERT(false && "Not assignable"); return *this;} // operator =
135 
137 { (void) inObjToCopy; NTV2_ASSERT(false && "Not copyable");} // copy constructor
138 
139 
140 // Open local physical device (via ajantv2 driver)
141 bool CNTV2DriverInterface::Open (const UWord inDeviceIndex)
142 {
143  if (IsOpen() && inDeviceIndex == GetIndexNumber())
144  return true; // Same local device requested, already open
145  Close();
146  if (inDeviceIndex >= MaxNumDevices())
147  {DIFAIL("Requested device index '" << DEC(inDeviceIndex) << "' at/past limit of '" << DEC(MaxNumDevices()) << "'"); return false;}
148  if (!OpenLocalPhysical(inDeviceIndex))
149  {
150  // Check for virtual device...
151  static ULWord sRecursionCheck(0), RECURSION_LIMIT(32);
152  NTV2DeviceInfo info;
153  if (!CNTV2DeviceScanner::GetDeviceInfo (inDeviceIndex, info))
154  return false;
155  sRecursionCheck++; // increment
156  if (sRecursionCheck > RECURSION_LIMIT)
157  {DIFAIL("Failed: " << DEC(RECURSION_LIMIT) << " '.vdev' bounces -- limit exceeded"); return false;}
158  if (!Open(info.vdevUrl))
159  {sRecursionCheck--; return false;} // Open vdev urlSpec failed
160  setDeviceIndexNumber(UWord(info.deviceIndex)); // Patch _boardNumber
161  sRecursionCheck--; // decrement
162  return true;
163  } // if OpenLocalPhysical failed
164 
165 #if !defined(NTV2_ALLOW_OPEN_UNSUPPORTED)
166  // Check if device is officially supported...
167  const NTV2DeviceIDSet legalDeviceIDs(::NTV2GetSupportedDevices());
168  if (legalDeviceIDs.find(_boardID) == legalDeviceIDs.end())
169  {
170  DIFAIL("Device ID " << xHEX0N(_boardID,8) << " (at device index " << inDeviceIndex << ") is not in list of supported devices");
171  Close();
172  return false;
173  }
174 #endif // NTV2_ALLOW_OPEN_UNSUPPORTED
175 
176  // Read driver version...
177  uint16_t drvrVersComps[4] = {0, 0, 0, 0};
178  ULWord driverVersionRaw (0);
179  if (!IsRemote() && !ReadRegister (kVRegDriverVersion, driverVersionRaw))
180  {DIFAIL("ReadRegister(kVRegDriverVersion) failed"); Close(); return false;}
181  drvrVersComps[0] = uint16_t(NTV2DriverVersionDecode_Major(driverVersionRaw)); // major
182  drvrVersComps[1] = uint16_t(NTV2DriverVersionDecode_Minor(driverVersionRaw)); // minor
183  drvrVersComps[2] = uint16_t(NTV2DriverVersionDecode_Point(driverVersionRaw)); // point
184  drvrVersComps[3] = uint16_t(NTV2DriverVersionDecode_Build(driverVersionRaw)); // build
185 
186  // Check driver version (local devices only)
187  NTV2_ASSERT(!IsRemote());
189  DIWARN ("Driver version v" << DEC(drvrVersComps[0]) << "." << DEC(drvrVersComps[1]) << "." << DEC(drvrVersComps[2]) << "."
190  << DEC(drvrVersComps[3]) << " ignored for client SDK v0.0.0.0 (dev mode), driverVersionRaw=" << xHEX0N(driverVersionRaw,8));
191  else if (drvrVersComps[0] == uint16_t(AJA_NTV2_SDK_VERSION_MAJOR))
192  DIDBG ("Driver v" << DEC(drvrVersComps[0]) << "." << DEC(drvrVersComps[1])
193  << "." << DEC(drvrVersComps[2]) << "." << DEC(drvrVersComps[3]) << " == client SDK v"
194  << DEC(uint16_t(AJA_NTV2_SDK_VERSION_MAJOR)) << "." << DEC(uint16_t(AJA_NTV2_SDK_VERSION_MINOR))
195  << "." << DEC(uint16_t(AJA_NTV2_SDK_VERSION_POINT)) << "." << DEC(uint16_t(AJA_NTV2_SDK_BUILD_NUMBER)));
196  else
197  DIWARN ("Driver v" << DEC(drvrVersComps[0]) << "." << DEC(drvrVersComps[1])
198  << "." << DEC(drvrVersComps[2]) << "." << DEC(drvrVersComps[3]) << " != client SDK v"
199  << DEC(uint16_t(AJA_NTV2_SDK_VERSION_MAJOR)) << "." << DEC(uint16_t(AJA_NTV2_SDK_VERSION_MINOR)) << "."
200  << DEC(uint16_t(AJA_NTV2_SDK_VERSION_POINT)) << "." << DEC(uint16_t(AJA_NTV2_SDK_BUILD_NUMBER))
201  << ", driverVersionRaw=" << xHEX0N(driverVersionRaw,8));
202 
203  FinishOpen();
205  DIDBGX(DEC(gOpenCount) << " opened, " << DEC(gCloseCount) << " closed");
206  return true;
207 }
208 
209 // Open remote or virtual device
210 bool CNTV2DriverInterface::Open (const string & inURLSpec)
211 {
212  Close();
214  const NTV2DeviceSpecParser specParser (inURLSpec);
215  if (specParser.HasErrors())
216  {DIFAIL("Bad device specification '" << inURLSpec << "': " << specParser.Error()); return false;}
217 
218  // URLSpecs can specify locally-attached devices...
219  if (specParser.IsLocalDevice())
220  { // Local device...
221  CNTV2Card card;
222  if (specParser.HasResult(kConnectParamDevSerial))
223  { if (CNTV2DeviceScanner::GetDeviceWithSerial(specParser.DeviceSerial(), card))
224  Open(card.GetIndexNumber());
225  }
226  else if (specParser.HasResult(kConnectParamDevModel))
227  { if (CNTV2DeviceScanner::GetFirstDeviceWithName(specParser.DeviceModel(), card))
228  Open(card.GetIndexNumber());
229  }
230  else if (specParser.HasResult(kConnectParamDevID))
231  { if (CNTV2DeviceScanner::GetFirstDeviceWithID(specParser.DeviceID(), card))
232  Open(card.GetIndexNumber());
233  }
234  else if (specParser.HasResult(kConnectParamDevIndex))
235  Open(specParser.DeviceIndex());
236  if (!IsOpen())
237  {DIFAIL("Failed to open " << specParser.InfoString()); return false;}
238  return true;
239  }
240 
241  // Open the remote/virtual device...
242  if (!OpenRemote(specParser))
243  return false; // Failed to open
244 
245  FinishOpen();
247  DIDBGX(DEC(gOpenCount) << " opens, " << DEC(gCloseCount) << " closes");
248  return true;
249 }
250 
252 {
253  if (IsOpen())
254  {
255  // Unsubscribe all...
256  for (INTERRUPT_ENUMS eInt(eVerticalInterrupt); eInt < eNumInterruptTypes; eInt = INTERRUPT_ENUMS(eInt+1))
257  ConfigureSubscription (false, eInt, mInterruptEventHandles[eInt]);
258 
259  const bool closeOK(IsRemote() ? CloseRemote() : CloseLocalPhysical());
260  if (closeOK)
263  DIDBGX(DEC(gOpenCount) << " opens, " << DEC(gCloseCount) << " closes");
264  return closeOK;
265  }
266  return true;
267 
268 } // Close
269 
270 
272 {
273 #if defined(NTV2_NULL_DEVICE)
274  DIFAIL("SDK built with 'NTV2_NULL_DEVICE' defined -- cannot OpenLocalPhysical '" << DEC(inDeviceIndex) << "'");
275 #else // else defined(NTV2_NULL_DEVICE)
276  (void) inDeviceIndex;
277  NTV2_ASSERT(false && "Requires platform-specific implementation");
278 #endif // else NTV2_NULL_DEVICE defined
279  return false;
280 }
281 
283 {
284  NTV2_ASSERT(false && "Requires platform-specific implementation");
285  return false;
286 }
287 
288 #if defined(AJA_WINDOWS)
289  static bool winsock_inited = false;
290  static WSADATA wsaData;
291 
292  static void initWinsock(void)
293  {
294  int wret;
295  if (!winsock_inited)
296  wret = WSAStartup(MAKEWORD(2,2), &wsaData);
297  winsock_inited = true;
298  }
299 #endif // AJA_WINDOWS
300 
301 
303 {
304 #if defined(AJA_WINDOWS)
305  initWinsock();
306 #endif // defined(AJA_WINDOWS)
307  NTV2_ASSERT(!IsOpen()); // Must be closed!
309 
310 #if defined(NTV2_NUB_CLIENT_SUPPORT)
311  if (inParser.Failed())
312  {ostringstream errs; inParser.PrintErrors(errs); DIFAIL("Bad parser: " << errs.str()); return false;}
313  if (inParser.IsLocalDevice())
314  {DIFAIL("Parser infers local device: " << inParser.InfoString()); return false;}
315 
316  NTV2Dictionary connectParams(inParser.Results());
317  // This "connectParams" dictionary has keys/values that determine which plugin to load,
318  // and any other configuration parameters specified by the caller. This dictionary is
319  // modified during the call to "CreateClient" (below) by an NTV2PluginLoader that loads,
320  // interrogates and validates the plugin. Several new keys/values are added to it during
321  // this process that describe the plugin, its signature, and any query parameters it
322  // requires or accepts for further configuration.
323  DIDBG("Opening " << inParser.InfoString());
324  NTV2RPCAPI * pClient (nullptr);
325  try {
326  pClient = NTV2RPCClientAPI::CreateClient(connectParams);
327  } catch (std::bad_alloc &) {
328  pClient = nullptr;
329  DIFAIL("bad_alloc exception");
330  } catch (...) {
331  pClient = nullptr;
332  DIFAIL("exception");
333  }
334  if (!pClient)
335  return false; // Failed to instantiate plugin client
336 
337  // At this point, the plugin's NTV2RPCAPI object exists, but may or may not be useable,
338  // depending on if it's "IsConnected". Before SDK 17.1, the plugin's NTV2Connect function
339  // was commonly called directly from its constructor. After SDK 17.1.0, OpenRemote is
340  // responsible for calling NTV2Connect, to allow tools like NTV2Watcher to probe the
341  // plugin in stages via its client interface.
342  if (!pClient->IsConnected())
343  if (!pClient->NTV2Connect())
344  { DIFAIL("Failed to connect/open '" << inParser.DeviceSpec() << "'");
345  delete pClient;
346  CloseRemote();
347  return false;
348  }
349 
350  // NTV2 physical devices always have a hardware identity -- the NTV2DeviceID read from register 50.
351  // This plugin device is considered "open" if ReadRegister is successful, and returns a non-zero
352  // value that's also not DEVICE_ID_NOTFOUND. (Virtual/software devices that have no NTV2 hardware
353  // corollary should return DEVICE_ID_SOFTWARE.)
354  _pRPCAPI = pClient;
356  if (!IsRemote() || !IsOpen())
357  DIFAIL("Failed to open '" << inParser.DeviceSpec() << "'");
358  return IsRemote() && IsOpen(); // Fail if not remote nor open
359 #else // NTV2_NUB_CLIENT_SUPPORT
360  DIFAIL("SDK built without 'NTV2_NUB_CLIENT_SUPPORT' -- cannot OpenRemote '" << inParser.DeviceSpec() << "'");
361  return false;
362 #endif // NTV2_NUB_CLIENT_SUPPORT
363 } // OpenRemote
364 
365 
367 {
368  if (_pRPCAPI)
369  {
370  DIDBG("Closing remote: " << *_pRPCAPI);
371  if (_pRPCAPI->NTV2Disconnect())
372  DIINFO("Remote closed: " << *_pRPCAPI);
373  else
374  DIFAIL("Remote close (NTV2Disconnect) failed: " << *_pRPCAPI);
375  delete _pRPCAPI;
376  _pRPCAPI = AJA_NULL;
377  _boardOpened = false;
378  return true;
379  }
380  // Wasn't open
381  _boardOpened = false;
382  return false;
383 }
384 
385 
387 {
388  outCount = 0;
389  if (!NTV2_IS_VALID_INTERRUPT_ENUM(inInterrupt))
390  return false;
391  outCount = mEventCounts.at(inInterrupt);
392  return true;
393 }
394 
396 {
397  if (!NTV2_IS_VALID_INTERRUPT_ENUM(inInterrupt))
398  return false;
399  mEventCounts.at(inInterrupt) = inCount;
400  return true;
401 }
402 
404 { (void) eInterrupt;
405  outCount = 0;
406  NTV2_ASSERT(false && "Needs subclass implementation");
407  return false;
408 }
409 
411 {
412  if (!NTV2_IS_VALID_INTERRUPT_ENUM(eInterruptType))
413  return HANDLE(0);
414  return HANDLE(uint64_t(mInterruptEventHandles.at(eInterruptType)));
415 }
416 
417 bool CNTV2DriverInterface::ConfigureInterrupt (const bool bEnable, const INTERRUPT_ENUMS eInterruptType)
418 { (void) bEnable; (void) eInterruptType;
419  NTV2_ASSERT(false && "Needs subclass implementation");
420  return false;
421 }
422 
423 bool CNTV2DriverInterface::ConfigureSubscription (const bool bSubscribe, const INTERRUPT_ENUMS eInterruptType, PULWord & outSubscriptionHdl)
424 {
425  if (!NTV2_IS_VALID_INTERRUPT_ENUM(eInterruptType))
426  return false;
427  outSubscriptionHdl = mInterruptEventHandles.at(eInterruptType);
428  if (bSubscribe)
429  { // If subscribing,
430  mEventCounts [eInterruptType] = 0; // clear this interrupt's event counter
431  DIDBG("Subscribing '" << ::NTV2InterruptEnumString(eInterruptType) << "' (" << UWord(eInterruptType)
432  << "), event counter reset");
433  }
434  else
435  {
436  DIDBGX("Unsubscribing '" << ::NTV2InterruptEnumString(eInterruptType) << "' (" << UWord(eInterruptType) << "), "
437  << mEventCounts[eInterruptType] << " event(s) received");
438  }
439  return true;
440 
441 } // ConfigureSubscription
442 
443 
445 {
446  ULWord value(0);
447  if (IsOpen() && ReadRegister(kRegBoardID, value))
448  {
449  const NTV2DeviceID currentValue(NTV2DeviceID(value+0));
450  if (currentValue != _boardID)
451  DIWARN(xHEX0N(this,16) << ": NTV2DeviceID " << xHEX0N(value,8) << " (" << ::NTV2DeviceIDToString(currentValue)
452  << ") read from register " << kRegBoardID << " doesn't match _boardID " << xHEX0N(_boardID,8) << " ("
453  << ::NTV2DeviceIDToString(_boardID) << ")");
454  return currentValue;
455  }
456  return DEVICE_ID_NOTFOUND;
457 }
458 
459 
460 // Common remote card read register. Subclasses have overloaded function
461 // that does platform-specific read of register on local card.
462 bool CNTV2DriverInterface::ReadRegister (const ULWord inRegNum, ULWord & outValue, const ULWord inMask, const ULWord inShift)
463 {
464 #if defined(NTV2_NUB_CLIENT_SUPPORT)
465  if (IsRemote())
466  return _pRPCAPI->NTV2ReadRegisterRemote (inRegNum, outValue, inMask, inShift);
467 #else
468  (void) inRegNum; (void) outValue; (void) inMask; (void) inShift;
469 #endif
470  return false;
471 }
472 
474 {
475  if (!IsOpen())
476  return false; // Device not open!
477  if (inOutValues.empty())
478  return true; // Nothing to do!
479 
480  NTV2GetRegisters getRegsParams (inOutValues);
481  if (NTV2Message(reinterpret_cast<NTV2_HEADER*>(&getRegsParams)))
482  {
483  if (!getRegsParams.GetRegisterValues(inOutValues))
484  return false;
485  }
486  else // Non-atomic user-space workaround until GETREGS implemented in driver...
487  for (NTV2RegisterReadsIter iter(inOutValues.begin()); iter != inOutValues.end(); ++iter)
488  if (iter->registerNumber != kRegXenaxFlashDOUT) // Prevent firmware erase/program/verify failures
489  if (!ReadRegister (iter->registerNumber, iter->registerValue))
490  return false;
491  return true;
492 }
493 
494 #if !defined(NTV2_DEPRECATE_16_0)
495  // Common remote card read multiple registers. Subclasses have overloaded function
496  bool CNTV2DriverInterface::ReadRegisterMulti (const ULWord inNumRegs, ULWord * pOutWhichRegFailed, NTV2RegInfo pOutRegInfos[])
497  {
498  if (!pOutWhichRegFailed)
499  return false; // NULL pointer
500  *pOutWhichRegFailed = 0xFFFFFFFF;
501  if (!inNumRegs)
502  return false; // numRegs is zero
503 
504  // New in SDK 16.0: Use ReadRegs NTV2Message
505  NTV2RegReads regReads, result;
506  regReads.reserve(inNumRegs); result.reserve(inNumRegs);
507  for (size_t ndx(0); ndx < size_t(inNumRegs); ndx++)
508  regReads.push_back(pOutRegInfos[ndx]);
509  result = regReads;
510  bool retVal (ReadRegisters(result));
511  NTV2_ASSERT(result.size() <= regReads.size());
512  if (result.size() < regReads.size())
513  *pOutWhichRegFailed = result.empty() ? regReads.front().registerNumber : result.back().registerNumber;
514  return retVal;
515  }
516 
518  {
519  AJATime::Sleep(milliseconds);
520  return 0; // Beware, this function always returns zero, even if sleep was interrupted
521  }
522 #endif // !defined(NTV2_DEPRECATE_16_0)
523 
524 
525 // Common remote card write register. Subclasses overloaded this to do platform-specific register write.
526 bool CNTV2DriverInterface::WriteRegister (const ULWord inRegNum, const ULWord inValue, const ULWord inMask, const ULWord inShift)
527 {
528 #if defined(NTV2_WRITEREG_PROFILING)
529  // Recording is done in platform-specific WriteRegister
530 #endif // NTV2_WRITEREG_PROFILING
531 #if defined(NTV2_NUB_CLIENT_SUPPORT)
532  // If we get here, must be a non-physical device connection...
533  return IsRemote() ? _pRPCAPI->NTV2WriteRegisterRemote(inRegNum, inValue, inMask, inShift) : false;
534 #else
535  (void) inRegNum; (void) inValue; (void) inMask; (void) inShift;
536  return false;
537 #endif
538 }
539 
540 
542  const bool inIsRead,
543  const ULWord inFrameNumber,
544  ULWord * pFrameBuffer,
545  const ULWord inCardOffsetBytes,
546  const ULWord inTotalByteCount,
547  const bool inSynchronous)
548 {
549 #if defined(NTV2_NUB_CLIENT_SUPPORT)
551  NTV2Buffer buffer(pFrameBuffer, inTotalByteCount);
552  return _pRPCAPI->NTV2DMATransferRemote(inDMAEngine, inIsRead, inFrameNumber, buffer, inCardOffsetBytes,
553  0/*numSegs*/, 0/*hostPitch*/, 0/*cardPitch*/, inSynchronous);
554 #else
555  (void) inDMAEngine; (void) inIsRead; (void) inFrameNumber; (void) pFrameBuffer; (void) inCardOffsetBytes;
556  (void) inTotalByteCount; (void) inSynchronous;
557  return false;
558 #endif
559 }
560 
562  const bool inIsRead,
563  const ULWord inFrameNumber,
564  ULWord * pFrameBuffer,
565  const ULWord inCardOffsetBytes,
566  const ULWord inTotalByteCount,
567  const ULWord inNumSegments,
568  const ULWord inHostPitchPerSeg,
569  const ULWord inCardPitchPerSeg,
570  const bool inSynchronous)
571 {
572 #if defined(NTV2_NUB_CLIENT_SUPPORT)
574  NTV2Buffer buffer(pFrameBuffer, inTotalByteCount);
575  return _pRPCAPI->NTV2DMATransferRemote(inDMAEngine, inIsRead, inFrameNumber, buffer, inCardOffsetBytes,
576  inNumSegments, inHostPitchPerSeg, inCardPitchPerSeg, inSynchronous);
577 #else
578  (void) inDMAEngine; (void) inIsRead; (void) inFrameNumber; (void) pFrameBuffer; (void) inCardOffsetBytes;
579  (void) inTotalByteCount; (void) inNumSegments; (void) inHostPitchPerSeg; (void) inCardPitchPerSeg; (void) inSynchronous;
580  return false;
581 #endif
582 }
583 
585  const NTV2Channel inDMAChannel,
586  const bool inIsTarget,
587  const ULWord inFrameNumber,
588  const ULWord inCardOffsetBytes,
589  const ULWord inByteCount,
590  const ULWord inNumSegments,
591  const ULWord inSegmentHostPitch,
592  const ULWord inSegmentCardPitch,
593  const PCHANNEL_P2P_STRUCT & inP2PData)
594 { (void) inDMAEngine; (void) inDMAChannel; (void) inIsTarget; (void) inFrameNumber; (void) inCardOffsetBytes;
595  (void) inByteCount; (void) inNumSegments; (void) inSegmentHostPitch; (void) inSegmentCardPitch; (void) inP2PData;
596 #if defined(NTV2_NUB_CLIENT_SUPPORT)
598  // No NTV2DMATransferP2PRemote implementation yet
599 #endif
600  return false;
601 }
602 
603 // Common remote card waitforinterrupt. Subclasses have overloaded function
604 // that does platform-specific waitforinterrupt on local cards.
606 {
607 #if defined(NTV2_NUB_CLIENT_SUPPORT)
608  return _pRPCAPI ? _pRPCAPI->NTV2WaitForInterruptRemote(eInterrupt, timeOutMs) : false;
609 #else
610  (void) eInterrupt;
611  (void) timeOutMs;
612  return false;
613 #endif
614 }
615 
616 // Common remote card autocirculate. Subclasses have overloaded function
617 // that does platform-specific autocirculate on local cards.
619 {
620 #if defined(NTV2_NUB_CLIENT_SUPPORT)
621  if (IsRemote())
622  switch (autoCircData.eCommand)
623  {
624  case eStartAutoCirc:
625  case eAbortAutoCirc:
626  case ePauseAutoCirc:
627  case eFlushAutoCirculate:
628  case eGetAutoCirc:
629  case eStopAutoCirc:
630  case eInitAutoCirc:
631  case eSetActiveFrame:
632  return _pRPCAPI->NTV2AutoCirculateRemote(autoCircData);
633  default: // Others not handled
634  return false;
635  }
636  return false;
637 #else
638  (void) autoCircData;
639  return false;
640 #endif
641 }
642 
644 {
645 #if defined(NTV2_NUB_CLIENT_SUPPORT)
646  return _pRPCAPI ? _pRPCAPI->NTV2MessageRemote(pInMessage) : false;
647 #else
648  (void) pInMessage;
649  return false;
650 #endif
651 }
652 
653 
654 // Common remote card DriverGetBitFileInformation. Subclasses have overloaded function
655 // that does platform-specific function on local cards.
657 { (void)bitFileType;
658  ::memset(&bitFileInfo, 0, sizeof(bitFileInfo));
659  if (IsRemote())
660  return false;
662  return false;
663 
664  ParseFlashHeader(bitFileInfo);
665  bitFileInfo.bitFileType = 0;
666  switch (_boardID)
667  {
668  case DEVICE_ID_CORVID1: bitFileInfo.bitFileType = NTV2_BITFILE_CORVID1_MAIN; break;
669  case DEVICE_ID_CORVID22: bitFileInfo.bitFileType = NTV2_BITFILE_CORVID22_MAIN; break;
670  case DEVICE_ID_CORVID24: bitFileInfo.bitFileType = NTV2_BITFILE_CORVID24_MAIN; break;
671  case DEVICE_ID_CORVID3G: bitFileInfo.bitFileType = NTV2_BITFILE_CORVID3G_MAIN; break;
672  case DEVICE_ID_CORVID44: bitFileInfo.bitFileType = NTV2_BITFILE_CORVID44; break;
678  case DEVICE_ID_CORVID88: bitFileInfo.bitFileType = NTV2_BITFILE_CORVID88; break;
681  case DEVICE_ID_CORVIDHEVC: bitFileInfo.bitFileType = NTV2_BITFILE_CORVIDHEVC; break;
682  case DEVICE_ID_IO4K: bitFileInfo.bitFileType = NTV2_BITFILE_IO4K_MAIN; break;
683  case DEVICE_ID_IO4KPLUS: bitFileInfo.bitFileType = NTV2_BITFILE_IO4KPLUS_MAIN; break;
684  case DEVICE_ID_IO4KUFC: bitFileInfo.bitFileType = NTV2_BITFILE_IO4KUFC_MAIN; break;
686  case DEVICE_ID_IOIP_2022: bitFileInfo.bitFileType = NTV2_BITFILE_IOIP_2022; break;
687  case DEVICE_ID_IOIP_2110: bitFileInfo.bitFileType = NTV2_BITFILE_IOIP_2110; break;
689  case DEVICE_ID_IOXT: bitFileInfo.bitFileType = NTV2_BITFILE_IOXT_MAIN; break;
690  case DEVICE_ID_KONA1: bitFileInfo.bitFileType = NTV2_BITFILE_KONA1; break;
691  case DEVICE_ID_KONA3G: bitFileInfo.bitFileType = NTV2_BITFILE_KONA3G_MAIN; break;
692  case DEVICE_ID_KONA3GQUAD: bitFileInfo.bitFileType = NTV2_BITFILE_KONA3G_QUAD; break;
693  case DEVICE_ID_KONA4: bitFileInfo.bitFileType = NTV2_BITFILE_KONA4_MAIN; break;
694  case DEVICE_ID_KONA4UFC: bitFileInfo.bitFileType = NTV2_BITFILE_KONA4UFC_MAIN; break;
695  case DEVICE_ID_KONA5: bitFileInfo.bitFileType = NTV2_BITFILE_KONA5_MAIN; break;
698  case DEVICE_ID_KONA5_8K: bitFileInfo.bitFileType = NTV2_BITFILE_KONA5_8K_MAIN; break;
712  case DEVICE_ID_SOJI_OE1: bitFileInfo.bitFileType = NTV2_BITFILE_SOJI_OE1_MAIN; break;
713  case DEVICE_ID_SOJI_OE2: bitFileInfo.bitFileType = NTV2_BITFILE_SOJI_OE2_MAIN; break;
714  case DEVICE_ID_SOJI_OE3: bitFileInfo.bitFileType = NTV2_BITFILE_SOJI_OE3_MAIN; break;
715  case DEVICE_ID_SOJI_OE4: bitFileInfo.bitFileType = NTV2_BITFILE_SOJI_OE4_MAIN; break;
716  case DEVICE_ID_SOJI_OE5: bitFileInfo.bitFileType = NTV2_BITFILE_SOJI_OE5_MAIN; break;
717  case DEVICE_ID_SOJI_OE6: bitFileInfo.bitFileType = NTV2_BITFILE_SOJI_OE6_MAIN; break;
718  case DEVICE_ID_SOJI_OE7: bitFileInfo.bitFileType = NTV2_BITFILE_SOJI_OE7_MAIN; break;
722  case DEVICE_ID_KONAHDMI: bitFileInfo.bitFileType = NTV2_BITFILE_KONAHDMI; break;
728  case DEVICE_ID_KONAIP_25G: bitFileInfo.bitFileType = NTV2_BITFILE_KONAIP_25G; break;
732  case DEVICE_ID_KONALHI: bitFileInfo.bitFileType = NTV2_BITFILE_LHI_MAIN; break;
734  case DEVICE_ID_TTAP: bitFileInfo.bitFileType = NTV2_BITFILE_TTAP_MAIN; break;
735  case DEVICE_ID_TTAP_PRO: bitFileInfo.bitFileType = NTV2_BITFILE_TTAP_PRO_MAIN; break;
736  case DEVICE_ID_IOX3: bitFileInfo.bitFileType = NTV2_BITFILE_IOX3_MAIN; break;
737  case DEVICE_ID_KONAX: bitFileInfo.bitFileType = NTV2_BITFILE_KONAX; break;
738  case DEVICE_ID_KONAXM: bitFileInfo.bitFileType = NTV2_BITFILE_KONAXM; break;
739  case DEVICE_ID_KONAX_4CH: bitFileInfo.bitFileType = NTV2_BITFILE_KONAX_4CH; break;
740 
741  case DEVICE_ID_VKONA:
742  case DEVICE_ID_IP25_T:
743  case DEVICE_ID_IP25_R:
744  case DEVICE_ID_FS8:
745  case DEVICE_ID_SOFTWARE:
746  case DEVICE_ID_NOTFOUND: bitFileInfo.bitFileType = NTV2_BITFILE_TYPE_INVALID; break;
747  #if !defined (_DEBUG)
748  default: break;
749  #endif
750  }
751  bitFileInfo.checksum = 0;
752  bitFileInfo.structVersion = 0;
753  bitFileInfo.structSize = sizeof(BITFILE_INFO_STRUCT);
754  bitFileInfo.whichFPGA = eFPGAVideoProc;
755 
756  const string bitFileDesignNameString = string(bitFileInfo.designNameStr) + ".bit";
757  ::strncpy(bitFileInfo.designNameStr, bitFileDesignNameString.c_str(), sizeof(bitFileInfo.designNameStr)-1);
758  return true;
759 }
760 #if 0 // IoIP/KonaIP10G purge
761 bool CNTV2DriverInterface::GetPackageInformation (PACKAGE_INFO_STRUCT & packageInfo)
762 {
763  if (!IsDeviceReady(false) || !IsSupported(kDeviceCanDoIP))
764  return false; // cannot read flash
765 
766  string packInfo;
767  ULWord deviceID = ULWord(_boardID);
768  ReadRegister (kRegBoardID, deviceID);
769 
771  {
772  CNTV2AxiSpiFlash spiFlash(GetIndexNumber(), false);
773 
774  uint32_t offset = spiFlash.Offset(SPI_FLASH_SECTION_MCSINFO);
775  vector<uint8_t> mcsInfoData;
776  if (spiFlash.Read(offset, mcsInfoData, 256))
777  {
778  packInfo.assign(mcsInfoData.begin(), mcsInfoData.end());
779 
780  // remove any trailing nulls
781  size_t found = packInfo.find('\0');
782  if (found != string::npos)
783  {
784  packInfo.resize(found);
785  }
786  }
787  else
788  return false;
789  }
790  else
791  {
792  ULWord baseAddress = (16 * 1024 * 1024) - (3 * 256 * 1024);
793  const ULWord dwordSizeCount = 256/4;
794 
797  bool busy = true;
798  ULWord timeoutCount = 1000;
799  do
800  {
801  ULWord regValue;
803  if (regValue & BIT(8))
804  {
805  busy = true;
806  timeoutCount--;
807  }
808  else
809  busy = false;
810  } while (busy == true && timeoutCount > 0);
811  if (timeoutCount == 0)
812  return false;
813 
814  ULWord* bitFilePtr = new ULWord[dwordSizeCount];
815  for ( ULWord count = 0; count < dwordSizeCount; count++, baseAddress += 4 )
816  {
817  WriteRegister(kRegXenaxFlashAddress, baseAddress);
819  busy = true;
820  timeoutCount = 1000;
821  do
822  {
823  ULWord regValue;
825  if ( regValue & BIT(8))
826  {
827  busy = true;
828  timeoutCount--;
829  }
830  else
831  busy = false;
832  } while(busy == true && timeoutCount > 0);
833  if (timeoutCount == 0)
834  {
835  delete [] bitFilePtr;
836  return false;
837  }
838  ReadRegister(kRegXenaxFlashDOUT, bitFilePtr[count]);
839  }
840 
841  packInfo = reinterpret_cast<char*>(bitFilePtr);
842  delete [] bitFilePtr;
843  }
844 
845  istringstream iss(packInfo);
846  vector<string> results;
847  string token;
848  while (getline(iss,token, ' '))
849  results.push_back(token);
850 
851  if (results.size() < 8)
852  return false;
853 
854  packageInfo.date = results[1];
855  token = results[2];
856  token.erase(remove(token.begin(), token.end(), '\n'), token.end());
857  packageInfo.time = token;
858  packageInfo.buildNumber = results[4];
859  packageInfo.packageNumber = results[7];
860  return true;
861 }
862 #endif // IoIP/KonaIP10G purge
863 // Common remote card DriverGetBuildInformation. Subclasses have overloaded function
864 // that does platform-specific function on local cards.
866 {
867  ::memset(&buildInfo, 0, sizeof(buildInfo));
868  return false;
869 }
870 
871 bool CNTV2DriverInterface::BitstreamWrite (const NTV2Buffer & inBuffer, const bool inFragment, const bool inSwap)
872 {
873  NTV2Bitstream bsMsg (inBuffer,
875  (inFragment? BITSTREAM_FRAGMENT : 0) |
876  (inSwap? BITSTREAM_SWAP : 0));
877  ULWord counts(0);
879  ULWord attempts(counts >> 16), successes(counts & 0x0000FFFF);
880  attempts++;
881  const bool result (NTV2Message (reinterpret_cast<NTV2_HEADER*>(&bsMsg)));
882  if (result)
883  successes++;
884  counts = (attempts << 16) | successes;
886  return result;
887 }
888 
889 bool CNTV2DriverInterface::BitstreamReset (const bool inConfiguration, const bool inInterface)
890 {
891  NTV2Buffer inBuffer;
892  NTV2Bitstream bsMsg (inBuffer,
893  (inConfiguration? BITSTREAM_RESET_CONFIG : 0) |
894  (inInterface? BITSTREAM_RESET_MODULE : 0));
895  return NTV2Message(bsMsg);
896 }
897 
899 {
900  outRegValues.reserve(BITSTREAM_MCAP_DATA);
901  outRegValues.clear();
902 
903  NTV2Buffer inBuffer;
904  NTV2Bitstream bsMsg (inBuffer, BITSTREAM_READ_REGISTERS);
905  if (!NTV2Message(bsMsg))
906  return false;
907 
908  for (UWord ndx(0); ndx < BITSTREAM_MCAP_DATA; ndx++)
909  outRegValues.push_back(bsMsg.mRegisters[ndx]);
910 
911  return true;
912 }
913 
914 bool CNTV2DriverInterface::BitstreamLoad (const bool inSuspend, const bool inResume)
915 {
916  NTV2Buffer inBuffer;
917  NTV2Bitstream bsMsg (inBuffer,
918  (inSuspend? BITSTREAM_SUSPEND : 0) |
919  (inResume? BITSTREAM_RESUME : 0));
920  return NTV2Message(bsMsg);
921 }
922 
924  ULWord flags,
925  NTV2StreamChannel& status)
926 {
927  status.mChannel = inChannel;
928  status.mFlags = flags;
929 
930  return NTV2Message(status);
931 }
932 
934  NTV2Buffer& inBuffer,
935  ULWord64 bufferCookie,
936  ULWord flags,
937  NTV2StreamBuffer& status)
938 {
939  status.mChannel = inChannel;
940  status.mBuffer.Set (inBuffer.GetHostPointer(), inBuffer.GetByteCount());
941  status.mBufferCookie = bufferCookie;
942  status.mFlags = flags;
943 
944  return NTV2Message(status);
945 }
946 
948  NTV2Buffer& inBuffer,
949  ULWord dataSize,
950  ULWord flags,
951  ULWord delay,
952  ULWord timeout,
953  NTV2MailBuffer& status)
954 {
955  status.mChannel = inChannel;
956  status.mBuffer.Set (inBuffer.GetHostPointer(), inBuffer.GetByteCount());
957  status.mDataSize = dataSize;
958  status.mDelay = delay;
959  status.mTimeout = timeout;
960  status.mFlags = flags;
961 
962  return NTV2Message(status);
963 }
964 
965 // FinishOpen
966 // NOTE _boardID must be set before calling this routine.
968 {
969  // HACK! FinishOpen needs frame geometry to determine frame buffer size and number.
971  ULWord val1(0), val2(0);
975  NTV2PixelFormat pf(NTV2PixelFormat((val1 & 0x0F) | ((val2 & 0x1) << 4)));
976 #if !defined(NTV2_DEPRECATE_17_2)
979 #endif
980 
981  ULWord returnVal1 = false;
982  ULWord returnVal2 = false;
987 
988 #if !defined(NTV2_DEPRECATE_16_0)
995 #endif // !defined(NTV2_DEPRECATE_16_0)
996 
997 } // FinishOpen
998 
999 
1001 {
1002  if (!IsDeviceReady(false))
1003  return false; // cannot read flash
1004 
1006  {
1007  uint32_t val;
1008  ReadRegister((0x100000 + 0x08) / 4, val);
1009  if (val != 0x01)
1010  return false; // cannot read flash
1011  }
1012 
1014  {
1017  bool busy = true;
1018  ULWord timeoutCount = 1000;
1019  do
1020  {
1021  ULWord regValue;
1023  if (regValue & BIT(8))
1024  {
1025  busy = true;
1026  timeoutCount--;
1027  }
1028  else
1029  busy = false;
1030  } while (busy && timeoutCount);
1031  if (!timeoutCount)
1032  return false;
1033  }
1034 
1035  // Allocate header buffer, read/fill from SPI-flash...
1036  static const ULWord dwordCount(256/4);
1037  NTV2Buffer bitFileHdrBuffer(dwordCount * sizeof(ULWord));
1038  if (!bitFileHdrBuffer)
1039  return false;
1040 
1041  ULWord* pULWord(bitFileHdrBuffer), baseAddress(0);
1042  for (ULWord count(0); count < dwordCount; count++, baseAddress += 4)
1043  if (!ReadFlashULWord(baseAddress, pULWord[count]))
1044  return false;
1045 
1046  CNTV2Bitfile fileInfo;
1047  std::string headerError;
1048 #if 0 // Fake out:
1049  if (_boardID == DEVICE_ID_TTAP_PRO) // Fake TTapPro -- load "flash" from on-disk bitfile:
1050  { fileInfo.Open("/Users/demo/dev-svn/firmware/T3_Tap/t_tap_pro.bit");
1051  headerError = fileInfo.GetLastError();
1052  } else
1053 #endif
1054  headerError = fileInfo.ParseHeaderFromBuffer(bitFileHdrBuffer);
1055  if (headerError.empty())
1056  {
1057  ::strncpy(bitFileInfo.dateStr, fileInfo.GetDate().c_str(), NTV2_BITFILE_DATETIME_STRINGLENGTH);
1058  ::strncpy(bitFileInfo.timeStr, fileInfo.GetTime().c_str(), NTV2_BITFILE_DATETIME_STRINGLENGTH);
1059  ::strncpy(bitFileInfo.designNameStr, fileInfo.GetDesignName().c_str(), NTV2_BITFILE_DESIGNNAME_STRINGLENGTH);
1060  ::strncpy(bitFileInfo.partNameStr, fileInfo.GetPartName().c_str(), NTV2_BITFILE_PARTNAME_STRINGLENGTH);
1061  bitFileInfo.numBytes = ULWord(fileInfo.GetProgramStreamLength());
1062  }
1063  return headerError.empty();
1064 } // ParseFlashHeader
1065 
1066 bool CNTV2DriverInterface::ReadFlashULWord (const ULWord inAddress, ULWord & outValue, const ULWord inRetryCount)
1067 {
1068  if (!WriteRegister(kRegXenaxFlashAddress, inAddress))
1069  return false;
1071  return false;
1072  bool busy(true);
1073  ULWord timeoutCount(inRetryCount);
1074  do
1075  {
1076  ULWord regValue(0);
1078  if (regValue & BIT(8))
1079  {
1080  busy = true;
1081  timeoutCount--;
1082  }
1083  else
1084  busy = false;
1085  } while (busy && timeoutCount);
1086  if (!timeoutCount)
1087  return false;
1088  return ReadRegister(kRegXenaxFlashDOUT, outValue);
1089 }
1090 
1092 {
1093  _boardNumber = num;
1094  if (IsRemote()) // Remote/virtual device?
1095  if (_pRPCAPI->HasConnectParam(kQParamVDevIndex)) // .vdev-originated device?
1096  {
1097  // Special handling for .vdev devices to work with AJA ControlPanel and R2 services
1099  }
1100 }
1101 
1102 
1103 //--------------------------------------------------------------------------------------------------------------------
1104 // Application acquire and release stuff
1105 //--------------------------------------------------------------------------------------------------------------------
1106 const uint32_t kAgentAppFcc (NTV2_FOURCC('A','j','a','A'));
1107 
1108 
1109 bool CNTV2DriverInterface::AcquireStreamForApplicationWithReference (const ULWord inAppCode, const int32_t inAppPID)
1110 {
1111  ULWord svcInitialized(0);
1112  if (ReadRegister(kVRegServicesInitialized, svcInitialized))
1113  if (!svcInitialized) // if services have never initialized the device
1114  if (inAppCode != kAgentAppFcc) // if not AJA Agent
1116  << " never initialized by AJAAgent, acquiring app " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID " << DEC(inAppPID));
1117 
1118  uint32_t curAppCode(0), curAppPID(0), curTaskMode(0);
1120 
1121  // Check if owner is deceased
1122  if (!AJAProcess::IsValid(curAppPID))
1123  {
1124  // Process doesn't exist, so release it
1125  ARINFO("Streaming app PID " << DEC(curAppPID) << " deceased, will release");
1126  ReleaseStreamForApplication (curAppCode, int32_t(curAppPID)); // ignore result, AJAAgent may have already done this
1127  }
1128  // Re-sample current appCode & appPID...
1130  bool result(false);
1131  int count(0);
1132 
1133  for (count = 0; count < 20; count++)
1134  {
1135  if (!curAppPID)
1136  {
1137  // Nothing has the board
1138  if (!WriteRegister(kVRegApplicationCode, inAppCode)) // Set app code
1139  break; // fail
1140  // Just in case this is not zero
1141  WriteRegister(KVRegAcquireRefCount, 0); // Force to zero
1142  WriteRegister(KVRegAcquireRefCount, 1); // Increment to 1
1143  result = WriteRegister(kVRegApplicationPID, ULWord(inAppPID)); // Set PID
1144  break;
1145  }
1146  else if (curAppCode == inAppCode && curAppPID == ULWord(inAppPID))
1147  { // Process already acquired, so bump the count
1148  result = WriteRegister(KVRegAcquireRefCount, 1);
1149  break;
1150  }
1151  // Someone else has the board, so wait and try again
1152  AJATime::Sleep(50);
1153  } // try up to 20 times
1154  if (result)
1155  ARINFO("Streaming app " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID " << DEC(inAppPID) << " acquired successfully");
1156  else
1157  ARFAIL("Failed to acquire streaming app " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID " << DEC(inAppPID) << (count > 19 ? " (timed out)" : ""));
1158  return result;
1159 } // AcquireStreamForApplicationWithReference
1160 
1161 bool CNTV2DriverInterface::ReleaseStreamForApplicationWithReference (const ULWord inAppCode, const int32_t inAppPID)
1162 {
1163  ULWord currentCode(0), currentPID(0), currentCount(0);
1165  bool result(false);
1166  if (currentCode == inAppCode && currentPID == ULWord(inAppPID))
1167  {
1168  if (currentCount > 1)
1170  else if (currentCount == 1)
1171  result = ReleaseStreamForApplication(inAppCode, inAppPID);
1172  else
1173  result = true;
1174  }
1175  if (result)
1176  ARINFO("Streaming app " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID " << DEC(inAppPID) << " released successfully");
1177  else
1178  ARFAIL("Failed to release streaming app " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID " << DEC(inAppPID));
1179  return result;
1180 } // ReleaseStreamForApplicationWithReference
1181 
1182 bool CNTV2DriverInterface::AcquireStreamForApplication (const ULWord inAppCode, const int32_t inAppPID)
1183 {
1184  ULWord svcInitialized(0);
1185  if (ReadRegister(kVRegServicesInitialized, svcInitialized))
1186  if (!svcInitialized) // if services have never initialized the device
1187  if (inAppCode != kAgentAppFcc) // if not AJA Agent
1189  << " uninitialized by AJAAgent, requesting app " << xHEX0N(inAppCode,8) << ", PID " << DEC(inAppPID));
1190 
1191  // Loop for a while trying to acquire the board
1192  bool result(false);
1193  int count(0);
1194  for (count = 0; count < 20; count++)
1195  {
1196  if (WriteRegister(kVRegApplicationCode, inAppCode))
1197  {
1198  result = WriteRegister(kVRegApplicationPID, ULWord(inAppPID));
1199  break;
1200  }
1201  AJATime::Sleep(50);
1202  }
1203 
1204  if (count > 19) // if timed out
1205  { // Get data about current owner
1206  ULWord currentCode(0), curAppPID(0);
1208 
1209  // Check if owner is deceased
1210  if (!AJAProcess::IsValid(curAppPID))
1211  { // Process doesn't exist, so make the board our own
1212  ARINFO("Streaming app PID " << DEC(curAppPID) << " deceased, will release");
1213  ReleaseStreamForApplication (currentCode, int32_t(curAppPID)); // ignore result, AJAAgent may have already done this
1214  for (count = 0; count < 20; count++)
1215  {
1216  if (WriteRegister(kVRegApplicationCode, inAppCode))
1217  {
1218  result = WriteRegister(kVRegApplicationPID, ULWord(inAppPID));
1219  break;
1220  }
1221  AJATime::Sleep(50);
1222  }
1223  }
1224  // Current owner is alive, so don't interfere
1225  }
1226  if (result)
1227  ARINFO("Streaming app " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID " << DEC(inAppPID) << " acquired successfully");
1228  else
1229  ARFAIL("Failed to acquire streaming app " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID " << DEC(inAppPID) << (count > 19 ? " (timed out)" : ""));
1230  return result;
1231 } // AcquireStreamForApplication
1232 
1233 bool CNTV2DriverInterface::ReleaseStreamForApplication (const ULWord inAppCode, const int32_t inAppPID)
1234 { (void)inAppCode; // Don't care which appCode
1235  uint32_t curAppCode(0), curAppPID(0), curTaskMode(0);
1237 
1238  if (!WriteRegister(kVRegReleaseApplication, ULWord(inAppPID)))
1239  { ARFAIL("Setting kVRegReleaseApplication failed with app PID " << DEC(inAppPID) << ", curAppPID=" << DEC(curAppPID)
1240  << ", curAppCode=" << NTV2_HEADER::FourCCToString(curAppCode) << ", taskMode=" << ::NTV2TaskModeToString(NTV2TaskMode(curTaskMode),true));
1241  return false; // Fail
1242  }
1243 
1244  WriteRegister(KVRegAcquireRefCount, 0); // OK to ignore result
1245  ARINFO("Streaming app " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID " << DEC(inAppPID)
1246  << " released, taskMode=" << ::NTV2TaskModeToString(NTV2TaskMode(curTaskMode),true));
1247  return true;
1248 } // ReleaseStreamForApplication
1249 
1250 bool CNTV2DriverInterface::SetStreamingApplication (const ULWord inAppCode, const int32_t inAppPID)
1251 {
1252 #if 1 // original implementation
1253  bool result (WriteRegister(kVRegForceApplicationCode, inAppCode) && WriteRegister(kVRegForceApplicationPID, ULWord(inAppPID)));
1254  if (result)
1255  ARINFO("Streaming app forcibly set to " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID to " << DEC(inAppPID));
1256  else
1257  ARFAIL("Failed to forcibly set streaming app to " << NTV2_HEADER::FourCCToString(inAppCode) << ", PID to " << DEC(inAppPID));
1258  return result;
1259 #else // begin macOS driver implementation (adapted to use VRegs)
1260  uint32_t oldAppType(0), oldPID(0), oldRefCount(0);
1262 
1263  // SPECIAL CASE: Adobe Plugins
1264  // Adobe plug-in (X-Machina / Greg) are using the OEM driver every frame task
1265  // If they are in control of the board (eg mStreamingAppType == 'auto' && mStreamingAppPID == 0)
1266  // Then we assume they have enabled the OEM every frame task.
1267  // This code restore Kona every-frame task
1268  if (oldAppType == 'auto' && oldPID == 0 && inNewAppType != 'auto')
1270 
1271  // reset override state
1273 
1274  if (inNewAppType)
1275  WriteRegister(kVRegApplicationCode, inNewAppType); // always remember what our previous app was
1276 
1278 
1279  // support for reference counting
1280  if (inNewPID == 0)
1282 #endif // end macOS driver implementation (adapted to use VRegs)
1283 } // SetStreamingApplication
1284 
1285 bool CNTV2DriverInterface::GetStreamingApplication (ULWord & outAppType, int32_t & outProcessID)
1286 {
1287  outAppType = 0;
1288  outProcessID = 0;
1290 }
1291 
1293 {
1294  if (!IsRemote())
1295  return ""; // This implementation is intended for remote/plugin devices
1296  string desc(_pRPCAPI->Description());
1297  if (desc.empty())
1298  { // Plugin/remote device didn't provide description
1299  const NTV2Dictionary parms(ConnectParams());
1300  NTV2StringList strs;
1302  strs.push_back("\"" + parms.valueForKey(kNTV2PluginRegInfoKey_LongName) + "\"");
1303  else if (parms.hasKey(kNTV2PluginRegInfoKey_ShortName))
1304  strs.push_back(parms.valueForKey(kNTV2PluginRegInfoKey_ShortName));
1306  strs.push_back(parms.valueForKey(kNTV2PluginRegInfoKey_Description));
1307  else if (parms.hasKey(kNTV2PluginRegInfoKey_Copyright))
1308  strs.push_back(parms.valueForKey(kNTV2PluginRegInfoKey_Copyright));
1309  else if (parms.hasKey(kNTV2PluginRegInfoKey_Vendor))
1310  strs.push_back(parms.valueForKey(kNTV2PluginRegInfoKey_Vendor));
1311  if (!strs.empty())
1312  desc = aja::join(strs, ", ");
1313  }
1314  return desc;
1315 }
1316 
1318 {
1319  return IsRemote() ? _pRPCAPI->ConnectParams() : NTV2Dictionary();
1320 }
1321 
1322 // This function is used by the retail ControlPanel.
1323 // Read the current RP188 registers (which typically give you the timecode corresponding to the LAST frame).
1324 // NOTE: This is a hack to avoid making a "real" driver call! Since the RP188 data requires three ReadRegister()
1325 // calls, there is a chance that it can straddle a VBI, which could give bad results. To avoid this, we
1326 // read the 3 registers until we get two consecutive passes that give us the same data. (Someday it'd
1327 // be nice if the driver automatically read these as part of its VBI IRQ handler...
1329 { (void) inChannel;
1330  if (!pRP188Data)
1331  return false;
1332 
1333  RP188_STRUCT rp188;
1334  NTV2DeviceID boardID = DEVICE_ID_NOTFOUND;
1336  ULWord dbbReg(0), msReg(0), lsReg(0);
1337 
1340  bool bLTCPort = (source == kRP188SourceLTCPort);
1341 
1342  // values come from LTC port registers
1343  if (bLTCPort)
1344  {
1345  ULWord ltcPresent;
1347 
1348  // there is no equivalent DBB for LTC port - we synthesize it here
1349  rp188.DBB = (ltcPresent) ? 0xFE000000 | NEW_SELECT_RP188_RCVD : 0xFE000000;
1350 
1351  // LTC port registers
1352  dbbReg = 0; // don't care - does not exist
1353  msReg = kRegLTCAnalogBits0_31;
1354  lsReg = kRegLTCAnalogBits32_63;
1355  }
1356  else
1357  {
1358  // values come from RP188 registers
1359  NTV2Channel channel = NTV2_CHANNEL1;
1361 
1362  if (::NTV2DeviceGetNumVideoInputs(boardID) > 1)
1363  {
1365  channel = (inputSelect == NTV2_Input2Select) ? NTV2_CHANNEL2 : NTV2_CHANNEL1;
1366  }
1367  else
1368  channel = NTV2_CHANNEL1;
1369 
1370  // rp188 registers
1371  dbbReg = (channel == NTV2_CHANNEL1 ? kRegRP188InOut1DBB : kRegRP188InOut2DBB);
1372  //Check to see if TC is received
1373  uint32_t tcReceived = 0;
1374  ReadRegister(dbbReg, tcReceived, BIT(16), 16);
1375  if(tcReceived == 0)
1376  return false;//No TC recevied
1377 
1379  switch (rp188.DBB)//What do we have?
1380  {
1381  default:
1382  case 0x01:
1383  case 0x02:
1384  {
1385  //We have VITC - what do we want?
1386  if (pRP188Data->DBB == 0x01 || pRP188Data->DBB == 0x02)
1387  { // We want VITC
1390  }
1391  else
1392  { // We want Embedded LTC, so we should check one other place
1393  uint32_t ltcPresent = 0;
1394  ReadRegister(dbbReg, ltcPresent, BIT(18), 18);
1395  if (ltcPresent != 1)
1396  return false;
1397  //Read LTC registers
1400  }
1401  break;
1402  }
1403  case 0x00:
1404  //We have LTC - do we want it?
1405  if (pRP188Data->DBB != 0x00)
1406  return false;
1409  break;
1410  }
1411  //Re-Read the whole register just in case something is expecting other status values
1412  ReadRegister (dbbReg, rp188.DBB);
1413  }
1414  ReadRegister (msReg, rp188.Low );
1415  ReadRegister (lsReg, rp188.High);
1416 
1417  // register stability filter
1418  do
1419  {
1420  *pRP188Data = rp188; // struct copy to result
1421 
1422  // read again into local struct
1423  if (!bLTCPort)
1424  ReadRegister (dbbReg, rp188.DBB);
1425  ReadRegister (msReg, rp188.Low );
1426  ReadRegister (lsReg, rp188.High);
1427 
1428  // if the new read equals the previous read, consider it done
1429  if (rp188.DBB == pRP188Data->DBB &&
1430  rp188.Low == pRP188Data->Low &&
1431  rp188.High == pRP188Data->High)
1432  break;
1433  } while (true);
1434 
1435  return true;
1436 }
1437 
1439 {
1440  if (NTV2_IS_VALID_INTERRUPT_ENUM(eInterruptType))
1441  mEventCounts[eInterruptType] += 1;
1442 
1443 } // BumpEventCount
1444 
1445 
1446 bool CNTV2DriverInterface::IsDeviceReady (const bool checkValid)
1447 {
1448  if (IsRemote())
1449  {
1450  ULWord reg(0), val(0);
1452  return true; // failed to read VReg -- assume ready
1453  if (!reg)
1454  return true; // reg number is zero -- assume ready
1455  // A non-zero register number was returned (hope it's valid)
1456  if (!ReadRegister(reg, val))
1457  return true; // failed to read -- bad reg num? -- assume device ready
1458  // ReadRegister successful!
1459  return val; // zero means "not ready"; non-zero means "ready"
1460  }
1462  return true; // Non-IP devices always ready
1463 
1465  {
1466  if (!IsMBSystemReady())
1467  return false;
1468 
1469  if (checkValid && !IsMBSystemValid())
1470  return false;
1471  }
1472  else if (!IsLPSystemReady())
1473  return false;
1474  return true; // Ready!
1475 }
1476 
1478 {
1479  return true;
1480 }
1481 
1483 {
1484  return false;
1485 }
1486 
1488 {
1490  return false; // No local proc
1491 
1492  uint32_t val;
1494  if (val == 0x00)
1495  return false; // MB not ready
1496  return true;
1497 }
1498 
1499 #if defined(NTV2_WRITEREG_PROFILING) // Register Write Profiling
1501  {
1502  AJAAutoLock autoLock(&mRegWritesLock);
1503  outRegWrites = mRegWrites;
1504  return true;
1505  }
1506 
1507  bool CNTV2DriverInterface::StartRecordRegisterWrites (const bool inSkipActualWrites)
1508  {
1509  AJAAutoLock autoLock(&mRegWritesLock);
1510  if (mRecordRegWrites)
1511  return false; // Already recording
1512  mRegWrites.clear();
1513  mRecordRegWrites = true;
1514  mSkipRegWrites = inSkipActualWrites;
1515  return true;
1516  }
1517 
1519  { // Identical to Start, but don't clear mRegWrites nor change mSkipRegWrites
1520  AJAAutoLock autoLock(&mRegWritesLock);
1521  if (mRecordRegWrites)
1522  return false; // Already recording
1523  mRecordRegWrites = true;
1524  return true;
1525  }
1526 
1528  { // NB: This will return false if paused
1529  AJAAutoLock autoLock(&mRegWritesLock);
1530  return mRecordRegWrites;
1531  }
1532 
1534  {
1535  AJAAutoLock autoLock(&mRegWritesLock);
1536  mRecordRegWrites = mSkipRegWrites = false;
1537  return true;
1538  }
1539 
1541  { // Identical to Stop, but don't change mSkipRegWrites
1542  AJAAutoLock autoLock(&mRegWritesLock);
1543  if (!mRecordRegWrites)
1544  return false; // Already stopped/paused
1545  mRecordRegWrites = false;
1546  return true;
1547  }
1548 
1550  {
1551  AJAAutoLock autoLock(&mRegWritesLock);
1552  return ULWord(mRegWrites.size());
1553  }
1554 #endif // NTV2_WRITEREG_PROFILING
1555 
1556 
1558 {
1559  ULWordSet result;
1560  if (!IsOpen())
1561  return result;
1562 
1563  // Remote/virtual device gets first dibs on answering...
1564  if (IsRemote() && _pRPCAPI->NTV2GetSupportedRemote (inEnumsID, result))
1565  return result;
1566 
1567  const NTV2DeviceID devID(GetDeviceID());
1568  switch (inEnumsID)
1569  {
1570  case kNTV2EnumsID_DeviceID:
1571  { const NTV2DeviceIDSet devIDs(::NTV2GetSupportedDevices());
1572  for (NTV2DeviceIDSetConstIter it(devIDs.begin()); it != devIDs.end(); ++it)
1573  result.insert(ULWord(*it));
1574  break;
1575  }
1576  case kNTV2EnumsID_Standard:
1577  { NTV2StandardSet standards;
1578  ::NTV2DeviceGetSupportedStandards (devID, standards);
1579  for (NTV2StandardSetConstIter it(standards.begin()); it != standards.end(); ++it)
1580  result.insert(ULWord(*it));
1581  break;
1582  }
1586  for (NTV2FrameBufferFormatSetConstIter it(pfs.begin()); it != pfs.end(); ++it)
1587  result.insert(ULWord(*it));
1588  break;
1589  }
1591  { NTV2GeometrySet fgs;
1593  for (NTV2GeometrySetConstIter it(fgs.begin()); it != fgs.end(); ++it)
1594  result.insert(ULWord(*it));
1595  break;
1596  }
1598  { NTV2FrameRateSet frs;
1600  for (NTV2FrameRateSetConstIter it(frs.begin()); it != frs.end(); ++it)
1601  result.insert(ULWord(*it));
1602  break;
1603  }
1605  { // Needs implementation
1606  break;
1607  }
1609  { NTV2VideoFormatSet vfs;
1611  for (NTV2VideoFormatSetConstIter it(vfs.begin()); it != vfs.end(); ++it)
1612  result.insert(ULWord(*it));
1613  break;
1614  }
1615  case kNTV2EnumsID_Mode:
1616  { if (IsSupported(kDeviceCanDoPlayback)) result.insert(ULWord(NTV2_MODE_OUTPUT));
1617  if (IsSupported(kDeviceCanDoCapture)) result.insert(ULWord(NTV2_MODE_INPUT));
1618  break;
1619  }
1621  { NTV2InputSourceSet srcs;
1623  for (NTV2InputSourceSetConstIter it(srcs.begin()); it != srcs.end(); ++it)
1624  result.insert(ULWord(*it));
1625  break;
1626  }
1628  { NTV2OutputDestinations dsts;
1630  for (NTV2OutputDestinationsConstIter it(dsts.begin()); it != dsts.end(); ++it)
1631  result.insert(ULWord(*it));
1632  break;
1633  }
1634  case kNTV2EnumsID_Channel:
1635  { for (ULWord ch(0); ch < GetNumSupported(kDeviceGetNumFrameStores); ch++)
1636  result.insert(ch);
1637  break;
1638  }
1641  break;
1642  NTV2InputSourceSet inpSrcs;
1643  ::NTV2DeviceGetSupportedInputSources (devID, inpSrcs);
1644  for (NTV2InputSourceSetConstIter it(inpSrcs.begin()); it != inpSrcs.end(); ++it)
1645  { const NTV2ReferenceSource refSrc (::NTV2InputSourceToReferenceSource(*it));
1647  if (result.find(ULWord(refSrc)) == result.end())
1648  result.insert(ULWord(refSrc));
1649  }
1650  result.insert(ULWord(NTV2_REFERENCE_FREERUN)); // Always include Free-Run
1652  result.insert(ULWord(NTV2_REFERENCE_EXTERNAL)); // Has external reference
1653  break;
1654  }
1656  { result.insert(ULWord(NTV2_AUDIO_48K)); // All boards support 48KHz PCM
1657  if (IsSupported(kDeviceCanDoAudio96K)) result.insert(ULWord(NTV2_AUDIO_96K));
1659  break;
1660  }
1663  break;
1664  NTV2InputSourceSet inpSrcs;
1665  ::NTV2DeviceGetSupportedInputSources (devID, inpSrcs);
1666  for (NTV2InputSourceSetConstIter it(inpSrcs.begin()); it != inpSrcs.end(); ++it)
1667  { const NTV2AudioSource audSrc (::NTV2InputSourceToAudioSource(*it));
1668  if (NTV2_IS_VALID_AUDIO_SOURCE(audSrc))
1669  if (result.find(ULWord(audSrc)) == result.end())
1670  result.insert(ULWord(audSrc));
1671  }
1672  break;
1673  }
1674  case kNTV2EnumsID_WidgetID:
1675  { NTV2WidgetIDSet wgts;
1676  CNTV2SignalRouter::GetWidgetIDs (devID, wgts);
1677  for (NTV2WidgetIDSetConstIter it(wgts.begin()); it != wgts.end(); ++it)
1678  result.insert(ULWord(*it));
1679  break;
1680  }
1683  if (::NTV2DeviceCanDoConversionMode (devID, cm))
1684  result.insert(ULWord(cm));
1685  break;
1686  }
1689  if (::NTV2DeviceCanDoInputTCIndex (devID, ndx))
1690  result.insert(ULWord(ndx));
1691  break;
1692  }
1695  if (::NTV2DeviceCanDoOutputTCIndex (devID, ndx))
1696  result.insert(ULWord(ndx));
1697  break;
1698  }
1699  default: break;
1700  }
1701  return result;
1702 }
1703 
1704 bool CNTV2DriverInterface::GetBoolParam (const ULWord inParamID, ULWord & outValue)
1705 {
1706  // Remote/virtual device gets first dibs on answering...
1707  if (IsRemote() && _pRPCAPI->NTV2GetBoolParamRemote (inParamID, outValue))
1708  return true;
1709 
1710  // Is there a register/bit that will answer this query?
1711  const NTV2BoolParamID paramID (NTV2BoolParamID(inParamID+0));
1712  { NTV2RegInfo regInfo; bool invertSense(false);
1713  if (GetRegInfoForBoolParam (paramID, regInfo, invertSense))
1714  {
1715  if (!ReadRegister (regInfo.registerNumber, regInfo.registerValue, regInfo.registerMask, regInfo.registerShift))
1716  return false;
1717  if (invertSense)
1718  outValue = regInfo.registerValue ? 0 : 1;
1719  else
1720  outValue = regInfo.registerValue ? 1 : 0;
1721  return true;
1722  }
1723  }
1724 
1725  // Call classic device features function...
1726  const NTV2DeviceID devID (GetDeviceID());
1727  switch (inParamID)
1728  {
1729  case kDeviceCanChangeEmbeddedAudioClock: outValue = ::NTV2DeviceCanChangeEmbeddedAudioClock(devID); break; // Deprecate?
1731  case kDeviceCanDisableUFC: outValue = ::NTV2DeviceCanDisableUFC(devID); break;
1732  case kDeviceCanDo2KVideo: outValue = ::NTV2DeviceCanDo2KVideo(devID); break;
1735  case kDeviceCanDo425Mux: outValue = ::NTV2DeviceCanDo425Mux(devID); break;
1736  case kDeviceCanDo4KVideo: outValue = ::NTV2DeviceCanDo4KVideo(devID); break;
1739  case kDeviceCanDoAnalogAudio: outValue = ::NTV2DeviceCanDoAnalogAudio(devID); break;
1740  case kDeviceCanDoAnalogVideoIn: outValue = ::NTV2DeviceCanDoAnalogVideoIn(devID); break;
1741  case kDeviceCanDoAnalogVideoOut: outValue = ::NTV2DeviceCanDoAnalogVideoOut(devID); break;
1742  case kDeviceCanDoAudio2Channels: outValue = GetNumSupported(kDeviceGetMaxAudioChannels) >= 2; break; // Deprecate?
1743  case kDeviceCanDoAudio6Channels: outValue = GetNumSupported(kDeviceGetMaxAudioChannels) >= 6; break; // Deprecate?
1744  case kDeviceCanDoAudio8Channels: outValue = GetNumSupported(kDeviceGetMaxAudioChannels) >= 8; break; // Deprecate?
1745  case kDeviceCanDoAudio96K: outValue = ::NTV2DeviceCanDoAudio96K(devID); break; // Deprecate?
1746  case kDeviceCanDoAudioDelay: outValue = ::NTV2DeviceCanDoAudioDelay(devID); break; // Deprecate?
1755  case kDeviceCanDoBreakoutBoard: outValue = ::NTV2DeviceCanDoBreakoutBoard(devID); break;
1756  case kDeviceCanDoBreakoutBox: outValue = ::NTV2DeviceCanDoBreakoutBox(devID); break;
1760  case kDeviceCanDoColorCorrection: outValue = GetNumSupported(kDeviceGetNumLUTs) > 0; break; // Deprecate?
1761  case kDeviceCanDoCustomAnc: outValue = ::NTV2DeviceCanDoCustomAnc(devID); break; // Deprecate?
1762  case kDeviceCanDoDSKOpacity: outValue = ::NTV2DeviceCanDoDSKOpacity(devID); break; // Deprecate?
1763  case kDeviceCanDoDualLink: outValue = ::NTV2DeviceCanDoDualLink(devID); break; // Deprecate?
1764  case kDeviceCanDoDVCProHD: outValue = ::NTV2DeviceCanDoDVCProHD(devID); break; // Deprecate?
1765  case kDeviceCanDoEnhancedCSC: outValue = ::NTV2DeviceCanDoEnhancedCSC(devID); break; // Deprecate?
1766  case kDeviceCanDoFrameStore1Display: outValue = ::NTV2DeviceCanDoFrameStore1Display(devID); break; // Deprecate?
1767  case kDeviceCanDoGPIO: outValue = ::NTV2DeviceCanDoGPIO(devID); break;
1768  case kDeviceCanDoHDMIOutStereo: outValue = ::NTV2DeviceCanDoHDMIOutStereo(devID); break; // Deprecate?
1769  case kDeviceCanDoHDV: outValue = ::NTV2DeviceCanDoHDV(devID); break; // Deprecate?
1770  case kDeviceCanDoHDVideo: outValue = ::NTV2DeviceCanDoHDVideo(devID); break; // Deprecate?
1771  case kDeviceCanDoIsoConvert: outValue = ::NTV2DeviceCanDoIsoConvert(devID); break;
1772  case kDeviceCanDoLTC: outValue = ::NTV2DeviceCanDoLTC(devID); break;
1773  case kDeviceCanDoLTCInOnRefPort: outValue = ::NTV2DeviceCanDoLTCInOnRefPort(devID); break;
1774  case kDeviceCanDoMSI: outValue = ::NTV2DeviceCanDoMSI(devID); break;
1775  case kDeviceCanDoMultiFormat: outValue = ::NTV2DeviceCanDoMultiFormat(devID); break;
1776  case kDeviceCanDoPCMControl: outValue = ::NTV2DeviceCanDoPCMControl(devID); break;
1777  case kDeviceCanDoPCMDetection: outValue = ::NTV2DeviceCanDoPCMDetection(devID); break;
1778  case kDeviceCanDoPIO: outValue = ::NTV2DeviceCanDoPIO(devID); break; // Deprecate?
1782  case kDeviceCanDoProgrammableCSC: outValue = GetNumSupported(kDeviceGetNumCSCs) > 0; break;
1784  case kDeviceCanDoProRes: outValue = ::NTV2DeviceCanDoProRes(devID); break;
1785  case kDeviceCanDoQREZ: outValue = ::NTV2DeviceCanDoQREZ(devID); break;
1786  case kDeviceCanDoQuarterExpand: outValue = ::NTV2DeviceCanDoQuarterExpand(devID); break;
1787  case kDeviceCanDoRateConvert: outValue = ::NTV2DeviceCanDoRateConvert(devID); break; // Deprecate?
1788  case kDeviceCanDoRGBPlusAlphaOut: outValue = ::NTV2DeviceCanDoRGBPlusAlphaOut(devID); break; // Deprecate?
1789  case kDeviceCanDoRP188: outValue = ::NTV2DeviceCanDoRP188(devID); break; // Deprecate?
1790  case kDeviceCanDoSDVideo: outValue = ::NTV2DeviceCanDoSDVideo(devID); break; // Deprecate?
1791  case kDeviceCanDoSDIErrorChecks: outValue = ::NTV2DeviceCanDoSDIErrorChecks(devID); break;
1792  case kDeviceCanDoStackedAudio: outValue = ::NTV2DeviceCanDoStackedAudio(devID); break; // Deprecate?
1793  case kDeviceCanDoStereoIn: outValue = ::NTV2DeviceCanDoStereoIn(devID); break; // Deprecate?
1794  case kDeviceCanDoStereoOut: outValue = ::NTV2DeviceCanDoStereoOut(devID); break; // Deprecate?
1795  case kDeviceCanDoThunderbolt: outValue = ::NTV2DeviceCanDoThunderbolt(devID); break;
1796  case kDeviceCanDoVideoProcessing: outValue = ::NTV2DeviceCanDoVideoProcessing(devID); break;
1797  case kDeviceCanMeasureTemperature: outValue = ::NTV2DeviceCanMeasureTemperature(devID); break;
1798  case kDeviceCanReportFrameSize: outValue = ::NTV2DeviceCanReportFrameSize(devID); break;
1799  case kDeviceHasBiDirectionalSDI: outValue = ::NTV2DeviceHasBiDirectionalSDI(devID); break;
1800  case kDeviceHasBracketLED: outValue = ::NTV2DeviceHasBracketLED(devID); break;
1801  case kDeviceHasColorSpaceConverterOnChannel2: outValue = ::NTV2DeviceCanDoWidget(devID, NTV2_WgtCSC2); break; // Deprecate?
1802  case kDeviceHasIDSwitch: outValue = ::NTV2DeviceCanDoIDSwitch(devID); break;
1803  case kDeviceHasNTV4FrameStores: outValue = ::NTV2DeviceHasNTV4FrameStores(devID); break;
1804  case kDeviceHasNWL: outValue = ::NTV2DeviceHasNWL(devID); break;
1805  case kDeviceHasPCIeGen2: outValue = ::NTV2DeviceHasPCIeGen2(devID); break;
1806  case kDeviceHasRetailSupport: outValue = ::NTV2DeviceHasRetailSupport(devID); break;
1807  case kDeviceHasSDIRelays: outValue = ::NTV2DeviceHasSDIRelays(devID); break;
1808  case kDeviceHasSPIFlash: outValue = ::NTV2DeviceHasSPIFlash(devID); break; // Deprecate?
1809  case kDeviceHasSPIFlashSerial: outValue = ::NTV2DeviceHasSPIFlashSerial(devID); break; // Deprecate?
1810  case kDeviceHasSPIv2: outValue = GetNumSupported(kDeviceGetSPIFlashVersion) == 2; break;
1811  case kDeviceHasSPIv3: outValue = GetNumSupported(kDeviceGetSPIFlashVersion) == 3; break;
1812  case kDeviceHasSPIv4: outValue = GetNumSupported(kDeviceGetSPIFlashVersion) == 4; break;
1813  case kDeviceIs64Bit: outValue = ::NTV2DeviceIs64Bit(devID); break; // Deprecate?
1814  case kDeviceIsDirectAddressable: outValue = ::NTV2DeviceIsDirectAddressable(devID); break; // Deprecate?
1815  case kDeviceIsExternalToHost: outValue = ::NTV2DeviceIsExternalToHost(devID); break;
1816  case kDeviceIsLocalPhysical: outValue = !IsRemote(); break;
1817  case kDeviceIsSupported: outValue = ::NTV2DeviceIsSupported(devID); break;
1818  case kDeviceNeedsRoutingSetup: outValue = ::NTV2DeviceNeedsRoutingSetup(devID); break; // Deprecate?
1820  case kDeviceCanThermostat: outValue = ::NTV2DeviceCanThermostat(devID); break;
1821  case kDeviceHasHEVCM31: outValue = ::NTV2DeviceHasHEVCM31(devID); break;
1822  case kDeviceHasHEVCM30: outValue = ::NTV2DeviceHasHEVCM30(devID); break;
1823  case kDeviceCanDoVITC2: outValue = ::NTV2DeviceCanDoVITC2(devID); break;
1824  case kDeviceCanDoHDMIHDROut: outValue = ::NTV2DeviceCanDoHDMIHDROut(devID); break;
1825  case kDeviceCanDoJ2K: outValue = ::NTV2DeviceCanDoJ2K(devID); break;
1826 
1827  case kDeviceCanDo12gRouting: outValue = ::NTV2DeviceCanDo12gRouting(devID); break;
1828  case kDeviceCanDo12GSDI: outValue = ::NTV2DeviceCanDo12GSDI(devID); break;
1829  case kDeviceCanDo2110: outValue = ::NTV2DeviceCanDo2110(devID); break;
1830  case kDeviceCanDo8KVideo: outValue = ::NTV2DeviceCanDo8KVideo(devID); break;
1831  case kDeviceCanDoAudio192K: outValue = ::NTV2DeviceCanDoAudio192K(devID); break;
1832  case kDeviceCanDoHDMIAuxCapture: outValue = ::NTV2DeviceCanDoCustomAux(devID); break;
1833  case kDeviceCanDoHDMIAuxPlayback: outValue = false && ::NTV2DeviceCanDoCustomAux(devID); break; // SDK 17.1 HDMI AUX is Capture-Only
1834  case kDeviceCanDoFramePulseSelect: outValue = ::NTV2DeviceCanDoFramePulseSelect(devID); break;
1835  case kDeviceCanDoHDMIMultiView: outValue = ::NTV2DeviceCanDoHDMIMultiView(devID); break;
1836  case kDeviceCanDoHFRRGB: outValue = ::NTV2DeviceCanDoHFRRGB(devID); break;
1837  case kDeviceCanDoIP: outValue = ::NTV2DeviceCanDoIP(devID); break;
1838  case kDeviceCanDo25GIP: outValue = ::NTV2DeviceCanDo25GIP(devID); break;
1839  case kDeviceCanDoMultiLinkAudio: outValue = ::NTV2DeviceCanDoMultiLinkAudio(devID); break;
1840  case kDeviceCanDoWarmBootFPGA: outValue = ::NTV2DeviceCanDoWarmBootFPGA(devID); break;
1845  case kDeviceHasGenlockv2: outValue = GetNumSupported(kDeviceGetGenlockVersion) == 2; break; // Deprecate
1846  case kDeviceHasGenlockv3: outValue = GetNumSupported(kDeviceGetGenlockVersion) == 3; break; // Deprecate
1847  case kDeviceHasHeadphoneJack: outValue = ::NTV2DeviceHasHeadphoneJack(devID); break;
1848  case kDeviceHasLEDAudioMeters: outValue = ::NTV2DeviceHasLEDAudioMeters(devID); break;
1849  case kDeviceHasLPProductCode: outValue = ::NTV2DeviceHasLPProductCode(devID); break;
1850  case kDeviceHasRotaryEncoder: outValue = ::NTV2DeviceHasRotaryEncoder(devID); break;
1851  case kDeviceHasSPIv5: outValue = ::NTV2DeviceGetSPIFlashVersion(devID) == 5; break;
1852  case kDeviceHasXilinxDMA: outValue = ::NTV2DeviceHasXilinxDMA(devID); break;
1853  case kDeviceCanDoStreamingDMA: outValue = GetDeviceID() == DEVICE_ID_KONAXM; break;
1854  case kDeviceHasPWMFanControl: outValue = ::NTV2DeviceHasPWMFanControl(devID); break;
1856  || GetNumSupported(kDeviceGetNumHDMIVideoOutputs)) // At least 1 HDMI in/out
1857  && (GetDeviceID() != DEVICE_ID_KONAHDMI) // Not a KonaHDMI
1858  && (!IsSupported(kDeviceCanDoAudioMixer)); // No audio mixer
1859  break;
1862  case kDeviceCanDoVersalSysMon: outValue = ::NTV2DeviceCanDoVersalSysMon(devID); break;
1863 
1865  case kDeviceCanDoP2PReceive: { // K3G+P2P K3GQ+P2P K4Q K4UFC Crv44 Crv88
1866  static const ULWordSet sDevIDsXmit = {0xDB07, 0xDB08, 0xEB0B, 0xEB0C, 0xEB0E, 0xEB0D},
1867  sDevIDsRcv = {0xDB07, 0xDB08, 0xEB0C, 0xEB0E, 0xEB0D};
1868  const ULWordSet & devIDs (inParamID == kDeviceCanDoP2PTransmit ? sDevIDsXmit : sDevIDsRcv);
1869  ULWord pciDevID(0); if (!ReadRegister (kVRegPCIDeviceID, pciDevID)) return false;
1870  outValue = devIDs.find(pciDevID) != devIDs.end();
1871  return true;
1872  }
1873 
1876  default: return false; // Bad param
1877  } // switch on inParamID
1878  return true; // Successfully used old ::NTV2DeviceCanDo function
1879 
1880 } // GetBoolParam
1881 
1882 
1883 bool CNTV2DriverInterface::GetNumericParam (const ULWord inParamID, ULWord & outVal)
1884 {
1885  outVal = 0;
1886 
1887  // Remote/virtual device gets first dibs on answering...
1888  if (IsRemote() && _pRPCAPI->NTV2GetNumericParamRemote (inParamID, outVal))
1889  return true;
1890 
1891  // Is there a register that will answer this query?
1892  const NTV2NumericParamID paramID (NTV2NumericParamID(inParamID+0));
1893  { NTV2RegInfo regInfo;
1894  if (GetRegInfoForNumericParam (paramID, regInfo))
1895  return ReadRegister (regInfo.registerNumber, outVal, regInfo.registerMask, regInfo.registerShift);
1896  }
1897 
1898  // Call classic device features function...
1899  const NTV2DeviceID devID (GetDeviceID());
1900  switch (paramID)
1901  {
1902  case kDeviceGetActiveMemorySize: outVal = ::NTV2DeviceGetActiveMemorySize (devID); break;
1903  case kDeviceGetDACVersion: outVal = ::NTV2DeviceGetDACVersion (devID); break;
1905  case kDeviceGetGenlockVersion: outVal = ULWord(::NTV2DeviceGetGenlockVersion (devID)); break;
1906  case kDeviceGetHDMIVersion: outVal = ::NTV2DeviceGetHDMIVersion (devID); break;
1907  case kDeviceGetLUTVersion: outVal = ::NTV2DeviceGetLUTVersion (devID); break;
1908  case kDeviceGetMaxAudioChannels: outVal = ::NTV2DeviceGetMaxAudioChannels (devID); break;
1909  case kDeviceGetMaxRegisterNumber: outVal = ::NTV2DeviceGetMaxRegisterNumber (devID); break;
1910  case kDeviceGetMaxTransferCount: outVal = ::NTV2DeviceGetMaxTransferCount (devID); break;
1913  case kDeviceGetNum25GSFPs: outVal = ::NTV2DeviceGetNum25GSFPs (devID); break;
1921  case kDeviceGetNumAudioSystems: outVal = ::NTV2DeviceGetNumAudioSystems (devID); break;
1923  + (IsSupported(kDeviceCanDoAudioMixer) ? 1 : 0); break;
1925  case kDeviceGetNumCSCs: outVal = ::NTV2DeviceGetNumCSCs (devID); break;
1926  case kDeviceGetNumDMAEngines: outVal = ::NTV2DeviceGetNumDMAEngines (devID); break;
1927  case kDeviceGetNumDownConverters: outVal = ::NTV2DeviceGetNumDownConverters (devID); break;
1930  case kDeviceGetNumFrameStores: outVal = ::NTV2DeviceGetNumFrameStores (devID); break;
1931  case kDeviceGetNumFrameSyncs: outVal = ::NTV2DeviceGetNumFrameSyncs (devID); break;
1937  case kDeviceGetNumLTCInputs: outVal = ::NTV2DeviceGetNumLTCInputs (devID); break;
1938  case kDeviceGetNumLTCOutputs: outVal = ::NTV2DeviceGetNumLTCOutputs (devID); break;
1939  case kDeviceGetNumLUTs: outVal = ::NTV2DeviceGetNumLUTs (devID); break;
1940  case kDeviceGetNumMixers: outVal = ::NTV2DeviceGetNumMixers (devID); break;
1943  case kDeviceGetNumSerialPorts: outVal = ::NTV2DeviceGetNumSerialPorts (devID); break;
1944  case kDeviceGetNumTSIMuxers: { static const NTV2WidgetID s425MuxerIDs[] = {NTV2_Wgt425Mux1, NTV2_Wgt425Mux2,
1947  for (size_t ndx(0); ndx < sizeof(s425MuxerIDs)/sizeof(NTV2WidgetID); ndx++)
1948  if (wgtIDs.find(s425MuxerIDs[ndx]) != wgtIDs.end())
1949  outVal++;
1950  break;
1951  }
1952  case kDeviceGetNumUpConverters: outVal = ::NTV2DeviceGetNumUpConverters (devID); break;
1953  case kDeviceGetNumVideoChannels: outVal = ::NTV2DeviceGetNumVideoChannels (devID); break;
1954  case kDeviceGetNumVideoInputs: outVal = ::NTV2DeviceGetNumVideoInputs (devID); break;
1955  case kDeviceGetNumVideoOutputs: outVal = ::NTV2DeviceGetNumVideoOutputs (devID); break;
1956  case kDeviceGetPingLED: outVal = ::NTV2DeviceGetPingLED (devID); break;
1957  case kDeviceGetSPIFlashVersion: outVal = ::NTV2DeviceGetSPIFlashVersion (devID); break;
1959  + (IsSupported(kDeviceCanDoAudioMixer) ? 2 : 0); break;
1960  case kDeviceGetUFCVersion: outVal = ::NTV2DeviceGetUFCVersion (devID); break;
1961  default: return false; // Bad param
1962  }
1963  return true; // Successfully used old ::NTV2DeviceGetNum function
1964 
1965 } // GetNumericParam
1966 
1967 
1968 bool CNTV2DriverInterface::GetRegInfoForBoolParam (const NTV2BoolParamID inParamID, NTV2RegInfo & outRegInfo, bool & outFlipSense)
1969 {
1970  outRegInfo.MakeInvalid();
1971  outFlipSense = false;
1972  switch (inParamID)
1973  {
1982 
1983  // kDeviceHasBreakoutBoard's sense is opposite of "BOBAbsent", so set outFlipSense 'true':
1984  case kDeviceHasBreakoutBoard: outRegInfo.Set(kRegBOBStatus, 0, kRegMaskBOBAbsent, kRegShiftBOBAbsent); outFlipSense = true; break;
1985 
1986  default: break;
1987  }
1988  return outRegInfo.IsValid();
1989 }
1990 
1991 
1993 {
1994  outRegInfo.MakeInvalid();
1995  switch (inParamID)
1996  {
1998  default: break;
1999  }
2000  return outRegInfo.IsValid();
2001 }
2002 
2003 
2005 { (void)msgSet; (void) enable;
2006  return false;
2007 }
UWord NTV2DeviceGetNum25GSFPs(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoConversionMode(const NTV2DeviceID inDeviceID, const NTV2ConversionMode inConversionMode)
NTV2Channel mChannel
Stream channel.
UWord NTV2DeviceGetNumUpConverters(const NTV2DeviceID inDeviceID)
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
#define NTV2_IS_VALID_NTV2ReferenceSource(__x__)
Definition: ntv2enums.h:1486
See Io XT.
Definition: ntv2enums.h:44
virtual bool GetNumericParam(const ULWord inParamID, ULWord &outValue)
virtual bool ControlDriverDebugMessages(NTV2_DriverDebugMessageSet msgSet, bool enable)
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
const char * NTV2InterruptEnumString(const unsigned inInterruptEnum)
Definition: ntv2debug.cpp:1179
#define BITSTREAM_READ_REGISTERS
Used in NTV2Bitstream to get status registers.
bool NTV2DeviceCanDoLTC(const NTV2DeviceID inDeviceID)
NTV2StandardSet::const_iterator NTV2StandardSetConstIter
A handy const iterator for iterating over an NTV2StandardSet.
ULWord mFlags
Action flags.
The number of cross-converters on the device.
std::set< NTV2FrameBufferFormat > NTV2FrameBufferFormatSet
A set of distinct NTV2FrameBufferFormat values.
#define ARFAIL(__x__)
enum _NTV2NumericParamID NTV2NumericParamID
Used with CNTV2DriverInterface::GetNumericParam to determine device capabilities. ...
virtual std::string ParseHeaderFromBuffer(const uint8_t *inBitfileBuffer, const size_t inBufferSize)
Parse a bitfile header that&#39;s stored in a buffer.
virtual bool GetRegInfoForBoolParam(const NTV2BoolParamID inParamID, NTV2RegInfo &outRegInfo, bool &outFlipSense)
Answers with the NTV2RegInfo of the register associated with the given boolean (i.e., "Can Do") device feature.
virtual bool AcquireStreamForApplicationWithReference(const ULWord inAppType, const int32_t inProcessID)
A reference-counted version of CNTV2DriverInterface::AcquireStreamForApplication useful for process g...
bool NTV2DeviceCanDoGPIO(const NTV2DeviceID inDeviceID)
virtual bool ResumeRecordRegisterWrites(void)
Resumes recording WriteRegister calls (after a prior call to PauseRecordRegisterWrites).
#define kNTV2PluginRegInfoKey_LongName
Plugin long name.
Definition: ntv2nubaccess.h:77
#define DIDBGX(__x__)
bool NTV2DeviceGetSupportedStandards(const NTV2DeviceID inDeviceID, NTV2StandardSet &outStandards)
Returns a set of distinct NTV2Standard values supported on the given device.
The number of input converter widgets on the device.
virtual bool IsSupported(const NTV2BoolParamID inParamID)
Identifies the NTV2ScanGeometry enumerated type.
The number of TSI muxers on the device. (New in SDK 17.0)
bool NTV2DeviceCanDoMultiLinkAudio(const NTV2DeviceID inDeviceID)
#define AJA_NTV2_SDK_BUILD_NUMBER
The SDK build number, an unsigned decimal integer.
Definition: ntv2version.h:16
True if device can handle 2Kx1556 (film) video.
static bool GetFirstDeviceWithID(const NTV2DeviceID inDeviceID, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the first AJA device found on the host t...
#define kQParamVDevIndex
Device index number for .vdev virtual device.
Definition: ntv2nubaccess.h:46
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
True if device supports 3D video output over dual-stream SDI.
bool NTV2DeviceCanDoJ2K(const NTV2DeviceID inDeviceID)
#define kConnectParamDevSerial
Device with this serial number.
Definition: ntv2nubaccess.h:28
The version number of the device&#39;s genlock hardware/firmware. (New in SDK 17.6)
The number of SDI-embedded input audio channels supported by the device.
True if device DMA hardware supports MSI (Message Signaled Interrupts).
UWord NTV2DeviceGetNumLTCInputs(const NTV2DeviceID inDeviceID)
True if device has version 3 genlock hardware and/or firmware. (Deprecate – use kDeviceGetGenlockVer...
True if device has SPI flash hardware.
ULWord mRegisters[16]
Register data.
True if audio system(s) support 2 or more audio channels.
UWord NTV2DeviceGetNum4kQuarterSizeConverters(const NTV2DeviceID inDeviceID)
The number of analog video outputs on the device.
bool NTV2DeviceCanDoRP188(const NTV2DeviceID inDeviceID)
static bool DeviceSupported(NTV2DeviceID deviceId)
#define DIDBG(__x__)
UWord NTV2DeviceGetNumCrossConverters(const NTV2DeviceID inDeviceID)
std::set< NTV2FrameRate > NTV2FrameRateSet
A set of distinct NTV2FrameRate values. New in SDK 17.0.
True if device can do ISO conversion.
True if device has enhanced CSCs.
virtual bool ReadFlashULWord(const ULWord inAddress, ULWord &outValue, const ULWord inRetryCount=1000)
Specifies the device&#39;s internal clock.
Definition: ntv2enums.h:1462
UWord NTV2DeviceGetNumAnalogAudioOutputChannels(const NTV2DeviceID inDeviceID)
virtual bool NTV2GetNumericParamRemote(const ULWord inParamID, ULWord &outValue)
Declares the CNTV2DriverInterface base class.
ULWord registerMask
My register mask value to use in a ReadRegister or WriteRegister call.
The number of external reference video inputs on the device.
NTV2DeviceIDSet NTV2GetSupportedDevices(const NTV2DeviceKinds inKinds=NTV2_DEVICEKIND_ALL)
Returns an NTV2DeviceIDSet of devices supported by the SDK.
Definition: ntv2utils.cpp:7396
bool NTV2DeviceCanDo25GIP(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetNum2022ChannelsSFP1(const NTV2DeviceID inDeviceID)
True if the device supports SMPTE 425 mux control.
bool NTV2DeviceCanThermostat(const NTV2DeviceID inDeviceID)
virtual bool CloseRemote(void)
Releases host resources associated with the remote/special device connection.
static void SetShareMode(const bool inSharedMode)
Specifies if subsequent Open calls should open the device in shared mode or not.
virtual bool IsLPSystemReady(void)
See KONA IP.
Definition: ntv2enums.h:71
static uint32_t gConstructCount(0)
bool NTV2DeviceCanDoPCMControl(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoDSKOpacity(const NTV2DeviceID inDeviceID)
See Io IP.
Definition: ntv2enums.h:41
The number of video channels supported on the device.
ULWord mFlags
Action flags.
See KONA 5.
Definition: ntv2enums.h:55
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
UWord _boardNumber
My device index number.
The number of mixer/keyer widgets on the device.
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
Definition: ntv2enums.h:221
True if device can squeeze/stretch between 1920x1080/1280x1080 and 1280x720/960x720.
#define BIT(_x_)
Definition: ajatypes.h:596
True if device can do 3G level B to 3G level A conversion.
True if device supports an AJA breakout box.
NTV2TaskMode
Describes the task mode state. See also: NTV2 Device Sharing.
Identifies the NTV2DeviceID enumerated type.
The number of analog LTC outputs on the device.
The number of AES/EBU audio output channels on the device.
uint32_t * PULWord
Definition: ajatypes.h:237
See KONA 5.
Definition: ntv2enums.h:63
#define BITSTREAM_SUSPEND
Used in peta to suspend board before bitstream load.
Declares the AJADebug class.
See KONA LHe Plus.
Definition: ntv2enums.h:77
std::string valueForKey(const std::string &inKey) const
const std::string & DeviceSpec(void) const
NTV2InputVideoSelect
Definition: ntv2enums.h:2299
True if HDMI in/out supports square-division (quad) raster conversion. (New in SDK 17...
UWord NTV2DeviceGetNumFrameSyncs(const NTV2DeviceID inDeviceID)
See KONA 5.
Definition: ntv2enums.h:56
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
See Corvid 88.
Definition: ntv2enums.h:32
#define NEW_SELECT_RP188_RCVD
ULWord NTV2DeviceGetActiveMemorySize(const NTV2DeviceID inDeviceID)
enum _NTV2EnumsID NTV2EnumsID
Identifies NTV2 enumerated types, used in CNTV2DriverInterface::GetSupportedItems.
True if device can warm-boot to load updated firmware.
virtual UWord GetIndexNumber(void) const
virtual bool IsDeviceReady(const bool inCheckValid=(0))
bool NTV2DeviceCanDoHDMIOutStereo(const NTV2DeviceID inDeviceID)
size_t GetByteCount(void) const
bool NTV2DeviceHasNTV4FrameStores(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoAnalogAudio(const NTV2DeviceID inDeviceID)
#define kNTV2PluginRegInfoKey_Copyright
Plugin copyright notice.
Definition: ntv2nubaccess.h:79
True if device can display/output video from FrameStore 1.
The number of independent Audio Systems on the device.
bool NTV2DeviceHasLPProductCode(const NTV2DeviceID inDeviceID)
void setDeviceIndexNumber(const UWord num)
Identifies the NTV2AudioRate enumerated type.
#define kNTV2PluginRegInfoKey_Vendor
Plugin vendor (manufacturer) name.
Definition: ntv2nubaccess.h:73
virtual bool DriverGetBuildInformation(BUILD_INFO_STRUCT &outBuildInfo)
Answers with the driver&#39;s build information.
True if device has version 2 genlock hardware and/or firmware. (Deprecate – use kDeviceGetGenlockVer...
ULWord NTV2DeviceGetLUTVersion(const NTV2DeviceID inDeviceID)
#define NTV2_IS_VALID_INTERRUPT_ENUM(__e__)
bool Failed(void) const
See Corvid 24.
Definition: ntv2enums.h:24
UWord NTV2DeviceGetNumEmbeddedAudioOutputChannels(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDo425Mux(const NTV2DeviceID inDeviceID)
Identifies the NTV2OutputDest enumerated type.
enum _NTV2BoolParamID NTV2BoolParamID
Used with CNTV2DriverInterface::GetBoolParam to determine device capabilities.
bool NTV2DeviceCanDoMultiFormat(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDo12GSDI(const NTV2DeviceID inDeviceID)
True if device can report if its "fail-safe" firmware is loaded/running.
bool NTV2DeviceHasSPIFlash(const NTV2DeviceID inDeviceID)
True if device connects to the host with a cable.
#define DIFAIL(__x__)
bool NTV2DeviceCanDoEnhancedCSC(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoStereoOut(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetNumDownConverters(const NTV2DeviceID inDeviceID)
#define kNTV2PluginRegInfoKey_ShortName
Plugin short name.
Definition: ntv2nubaccess.h:76
True if device can detect which audio channel pairs are not carrying PCM (Pulse Code Modulation) audi...
UWord NTV2DeviceGetNumSerialPorts(const NTV2DeviceID inDeviceID)
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call...
static bool PatchDeviceInfo(const UWord inDevIndex, CNTV2DriverInterface &dev)
virtual bool ConfigureInterrupt(const bool bEnable, const INTERRUPT_ENUMS eInterruptType)
virtual void FinishOpen(void)
Initializes my member variables after a successful Open.
virtual bool GetBoolParam(const ULWord inParamID, ULWord &outValue)
int32_t LWord
Definition: ajatypes.h:235
One-stop shop for parsing device specifications. (New in SDK 16.3) I do very little in the way of val...
bool NTV2DeviceCanDoProRes(const NTV2DeviceID inDeviceID)
Declares the AJATime class.
True if device has an HEVC M31 encoder.
virtual bool IsRecordingRegisterWrites(void) const
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
True if device has LED audio meters.
virtual bool NTV2GetSupportedRemote(const ULWord inEnumsID, ULWordSet &outSupported)
#define NTV2_FOURCC(_a_, _b_, _c_, _d_)
UWord NTV2DeviceGetNumCSCs(const NTV2DeviceID inDeviceID)
if(!(riid==IID_IUnknown) &&!(riid==IID_IClassFactory))
Definition: dllentry.cpp:196
The version number of the LUT(s) on the device.
Identifies the NTV2VideoFormat enumerated type.
See KONA 4 (Quad Mode).
Definition: ntv2enums.h:48
virtual bool HasConnectParam(const std::string &inParam) const
True if device has SFP connectors.
#define BITSTREAM_RESUME
Used in peta to resume board after bitstream load.
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel) ...
Definition: ntv2enums.h:3956
static bool GetShareMode(void)
Identifies the NTV2Channel enumerated type.
True if device widget routing can be queried or changed.
True if device can do video processing.
void MakeInvalid(void)
Invalidates me, setting my register number, value, mask and shift values to 0xFFFFFFFF.
Identifies the NTV2InputSource enumerated type.
ULWord mDelay
Trial delay (us)
virtual bool ReleaseStreamForApplication(const ULWord inAppType, const int32_t inProcessID)
Releases exclusive use of the AJA device for the given process, permitting other processes to acquire...
True if the device can do RGB over 3G Level A.
Definition: json.hpp:5362
NTV2_DriverDebugMessageSet
Definition: ntv2enums.h:3832
See KONA 5.
Definition: ntv2enums.h:58
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
static void SetOverlappedMode(const bool inOverlapMode)
Specifies if the next Open call should try to open the device in overlapped mode or not...
The maximum number of 32-bit words that the DMA engine can move at a time on the device.
True if device can handle QRez.
#define false
UWord NTV2DeviceGetNumAnalogVideoInputs(const NTV2DeviceID inDeviceID)
const uint32_t kAgentAppFcc(((((uint32_t)( 'A'))<< 24)|(((uint32_t)( 'j'))<< 16)|(((uint32_t)( 'a'))<< 8)|(((uint32_t)( 'A'))<< 0)))
UWord NTV2DeviceGetGenlockVersion(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoIsoConvert(const NTV2DeviceID inDeviceID)
See KONA 1.
Definition: ntv2enums.h:45
#define AJA_NTV2_SDK_VERSION_POINT
The SDK "point" release version, an unsigned decimal integer.
Definition: ntv2version.h:15
uint32_t ULWord
Definition: ajatypes.h:236
The number of DMA engines on the device.
virtual bool DmaTransfer(const NTV2DMAEngine inDMAEngine, const bool inIsRead, const ULWord inFrameNumber, ULWord *pFrameBuffer, const ULWord inCardOffsetBytes, const ULWord inTotalByteCount, const bool inSynchronous=(!(0)))
Transfers data between the AJA device and the host. This function will block and not return to the ca...
virtual bool StartRecordRegisterWrites(const bool inSkipActualWrites=(0))
Starts recording all WriteRegister calls.
See KONA 5.
Definition: ntv2enums.h:65
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They&#39;re also commonly use...
Definition: ntv2enums.h:1359
#define BITSTREAM_FRAGMENT
Used in NTV2Bitstream to indicate bitstream is a fragment.
virtual bool SetInterruptEventCount(const INTERRUPT_ENUMS inEventCode, const ULWord inCount)
Resets my interrupt event tally for the given interrupt type. (This is my count of the number of succ...
virtual NTV2Dictionary ConnectParams(void) const
short HANDLE
Definition: ajatypes.h:298
True if Audio System(s) support an adjustable delay.
True if device supports an AJA breakout board. (New in SDK 17.0)
Declares NTV2 "nub" client functions.
bool NTV2DeviceCanDoMSI(const NTV2DeviceID inDeviceID)
True if device can directly transmit data to another PCIe device via peer-to-peer DMA...
See Io 4K Plus.
Definition: ntv2enums.h:37
static bool gSharedMode((0))
bool hasKey(const std::string &inKey) const
#define kConnectParamDevModel
First device of this model (e.g. &#39;kona4&#39;)
Definition: ntv2nubaccess.h:29
#define NTV2DriverVersionDecode_Major(__vers__)
NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter
A handy const iterator for iterating over an NTV2FrameRateSet.
virtual bool BitstreamLoad(const bool inSuspend, const bool inResume)
std::set< NTV2Standard > NTV2StandardSet
A set of distinct NTV2Standard values.
See Corvid 44.
Definition: ntv2enums.h:26
True if device supports grouped audio system control.
#define NTV2DriverVersionDecode_Point(__vers__)
bool NTV2DeviceNeedsRoutingSetup(const NTV2DeviceID inDeviceID)
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:489
The number of SDI video outputs on the device.
virtual bool NTV2DMATransferRemote(const NTV2DMAEngine inDMAEngine, const bool inIsRead, const ULWord inFrameNumber, NTV2Buffer &inOutBuffer, const ULWord inCardOffsetBytes, const ULWord inNumSegments, const ULWord inSegmentHostPitch, const ULWord inSegmentCardPitch, const bool inSynchronous)
#define kConnectParamDevID
First device having this ID (e.g. &#39;0x10518400&#39;)
Definition: ntv2nubaccess.h:30
Output (playout, display) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1244
See KONA 3G (Quad Mode).
Definition: ntv2enums.h:47
True if device supports streaming DMA. (New in SDK 17.1)
bool NTV2DeviceSoftwareCanChangeFrameBufferSize(const NTV2DeviceID inDeviceID)
bool NTV2DeviceIs64Bit(const NTV2DeviceID inDeviceID)
bool IsLocalDevice(void) const
bool NTV2DeviceCanDoFrameStore1Display(const NTV2DeviceID inDeviceID)
NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter
A handy const iterator for iterating over an NTV2GeometrySet.
NTV2FrameBufferFormat NTV2PixelFormat
An alias for NTV2FrameBufferFormat.
Definition: ntv2enums.h:262
virtual size_t GetProgramStreamLength(void) const
Definition: ntv2bitfile.h:210
virtual bool AcquireStreamForApplication(const ULWord inAppType, const int32_t inProcessID)
Reserves exclusive use of the AJA device for a given process, preventing other processes on the host ...
True if device has any audio output capability (SDI, HDMI or analog) (New in SDK 17.1)
The total number of audio systems on the device, including host audio and mixer audio systems...
bool NTV2DeviceHasSPIFlashSerial(const NTV2DeviceID inDeviceID)
virtual bool NTV2GetBoolParamRemote(const ULWord inParamID, ULWord &outValue)
virtual bool IsRemote(void) const
See KONA 5.
Definition: ntv2enums.h:66
bool NTV2DeviceCanReportFailSafeLoaded(const NTV2DeviceID inDeviceID)
bool NTV2DeviceHasBiDirectionalAnalogAudio(const NTV2DeviceID inDeviceID)
True if device is 64-bit addressable.
True if device can read LTC (Linear TimeCode) from its reference input.
See T-TAP.
Definition: ntv2enums.h:93
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
Definition: ntv2enums.h:3954
True if device can mark specific audio channel pairs as not carrying PCM (Pulse Code Modulation) audi...
Specifies the External Reference connector.
Definition: ntv2enums.h:1459
True if device SDI connectors are bi-directional.
static bool GetFirstDeviceWithName(const std::string &inNameSubString, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the first AJA device whose device identi...
bool GetRegisterValues(NTV2RegisterValueMap &outValues) const
Returns an NTV2RegisterValueMap built from my mOutGoodRegisters and mOutValues fields.
virtual bool GetStreamingApplication(ULWord &outAppType, int32_t &outProcessID)
Answers with the four-CC type and process ID of the application that currently "owns" the AJA device ...
Identifies the NTV2AudioSource enumerated type.
UWord NTV2DeviceGetNumHDMIVideoOutputs(const NTV2DeviceID inDeviceID)
I&#39;m the base class that undergirds the platform-specific derived classes (from which CNTV2Card is ult...
An object that can connect to, and operate remote or fake devices. I have three general API groups: ...
True if device has CSCs capable of splitting the key (alpha) and YCbCr (fill) from RGB frame buffers ...
The version number of the UFC on the device.
True if device has at least one programmable color space converter widget.
See KONA 5.
Definition: ntv2enums.h:62
True if device supports 3D video input over dual-stream SDI.
True if device supports Programmed I/O.
bool NTV2DeviceCanDoInputTCIndex(const NTV2DeviceID inDeviceID, const NTV2TCIndex inTCIndex)
True if device SPIFlash ROM is bank-selected. (New in SDK 17.1)
virtual std::string GetDesignName(void) const
Definition: ntv2bitfile.h:139
The highest register number for the device.
Identifies the NTV2RefSource enumerated type.
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
Use kDeviceGetSPIVersion instead.
UWord NTV2DeviceGetNumInputConverters(const NTV2DeviceID inDeviceID)
static NTV2StringList GetLegalSchemeNames(void)
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
virtual bool SetStreamingApplication(const ULWord inAppType, const int32_t inProcessID)
Forcibly sets the four-CC type and process ID of the application that should "own" the AJA device (i...
See KONA 5.
Definition: ntv2enums.h:57
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
The highest bit number of the LED bits in the Global Control Register on the device.
bool NTV2DeviceCanDoDualLink(const NTV2DeviceID inDeviceID)
NTV2DeviceID _boardID
My cached device ID.
bool NTV2DeviceCanDoWidget(const NTV2DeviceID inDeviceID, const NTV2WidgetID inWidgetID)
Enumerations for controlling NTV2 devices.
virtual bool PauseRecordRegisterWrites(void)
Pauses recording WriteRegister calls.
void Set(const ULWord inRegNum, const ULWord inValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Sets me from the given parameters.
The number of FrameStores on the device.
int16_t Word
Definition: ajatypes.h:233
virtual bool NTV2Disconnect(void)
Disconnects me from the remote/fake host, closing the connection.
See Io 4K (Quad Mode).
Definition: ntv2enums.h:36
True if device can handle quarter-sized frames (pixel-halving and line-halving during input...
virtual bool IsOpen(void) const
virtual bool OpenLocalPhysical(const UWord inDeviceIndex)
Opens the local/physical device connection.
True if device has bypass relays on its SDI connectors.
See KONA LHi.
Definition: ntv2enums.h:78
Invalid or "not found".
Definition: ntv2enums.h:100
bool _boardOpened
True if I&#39;m open and connected to the device.
#define AJA_NTV2_SDK_VERSION_MAJOR
The SDK major version number, an unsigned decimal integer.
Definition: ntv2version.h:13
See Corvid HB-R.
Definition: ntv2enums.h:34
NTV2DeviceIDSet::const_iterator NTV2DeviceIDSetConstIter
A convenient const iterator for NTV2DeviceIDSet.
Definition: ntv2utils.h:1045
bool NTV2DeviceCanDoHDV(const NTV2DeviceID inDeviceID)
virtual const std::string & GetLastError(void) const
Definition: ntv2bitfile.h:149
NTV2ReferenceSource
These enum values identify a specific source for the device&#39;s (output) reference clock.
Definition: ntv2enums.h:1457
std::string NTV2TaskModeToString(const NTV2TaskMode inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6356
virtual bool ReadRegisters(NTV2RegisterReads &inOutValues)
Reads the register(s) specified by the given NTV2RegInfo sequence.
virtual void BumpEventCount(const INTERRUPT_ENUMS eInterruptType)
Atomically increments the event count tally for the given interrupt type.
static bool GetDeviceWithSerial(const std::string &inSerialNumber, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the first AJA device whose serial number...
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
UWord NTV2DeviceGetNumFrameStores(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoAudio96K(const NTV2DeviceID inDeviceID)
virtual bool NTV2MessageRemote(NTV2_HEADER *pInMessage)
True if device can squeeze/stretch between 1920x1080 and 1440x1080.
virtual bool Open(const std::string &inBitfilePath)
Opens the bitfile at the given path, then parses its header.
True if device supports JPEG 2000 codec.
NTV2Channel mChannel
Stream channel.
NTV2DMAEngine
Definition: ntv2enums.h:1859
#define BITSTREAM_RESET_CONFIG
Used in NTV2Bitstream to reset config.
#define AJA_NULL
Definition: ajatypes.h:180
virtual const std::string & GetTime(void) const
Definition: ntv2bitfile.h:134
True if device has attached breakout board. (New in SDK 17.0)
True if device has LED(s) on the card bracket. (New in SDK 18.0)
bool NTV2DeviceCanDoHFRRGB(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetDownConverterDelay(const NTV2DeviceID inDeviceID)
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device...
True if device has any SDI, HDMI or analog video outputs.
The number of up-converters on the device.
See KONA 5.
Definition: ntv2enums.h:61
True if device has any audio input capability (SDI, HDMI or analog) (New in SDK 17.1)
See KONA 5.
Definition: ntv2enums.h:67
True if device has a headphone jack.
bool NTV2DeviceHasPWMFanControl(const NTV2DeviceID inDeviceID)
Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal devel...
std::set< NTV2WidgetID > NTV2WidgetIDSet
A collection of distinct NTV2WidgetID values.
See Corvid 44 12G.
Definition: ntv2enums.h:31
virtual bool BitstreamReset(const bool inConfiguration, const bool inInterface)
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
virtual bool CloseLocalPhysical(void)
Releases host resources associated with the local/physical device connection.
Defines for the NTV2 SDK version number, used by ajantv2/includes/ntv2enums.h. See the ajantv2/includ...
enum _INTERRUPT_ENUMS_ INTERRUPT_ENUMS
True if device has 25Gbps SFPs. (New in SDK 18.0)
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
Definition: systemtime.cpp:284
See KONA 5.
Definition: ntv2enums.h:54
bool NTV2DeviceIsSupported(const NTV2DeviceID inDeviceID)
True if device has at least one RS-422 serial port, and it (they) can be programmed (for baud rate...
bool IsValid(void) const
True if device has a pair of unbalanced RCA audio monitor output connectors.
Identifies the NTV2Standard enumerated type.
ULWord NTV2DeviceGetMaxTransferCount(const NTV2DeviceID inDeviceID)
True if device uses a "stacked" arrangement of its audio buffers.
else retVal
Definition: ntv2vcam.cpp:1100
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
#define DIWARN(__x__)
bool mRecordRegWrites
True if recording; otherwise false when not recording.
#define BITSTREAM_MCAP_DATA
MCAP data register.
virtual bool GetRegInfoForNumericParam(const NTV2NumericParamID inParamID, NTV2RegInfo &outRegInfo)
Answers with the NTV2RegInfo of the register associated with the given numeric (i.e., "Get Num") device feature.
Software device that doesn&#39;t emulate one of the above devices.
Definition: ntv2enums.h:83
#define kNTV2PluginRegInfoKey_Description
Brief plugin description.
Definition: ntv2nubaccess.h:78
All new NTV2 structs start with this common header.
NTV2RegWrites NTV2RegisterReads
static std::string FourCCToString(const ULWord in4CC, const char nonPrintable='?')
AJALock mRegWritesLock
Guard mutex for mRegWrites.
ULWord registerShift
My register shift value to use in a ReadRegister or WriteRegister call.
UWord NTV2DeviceGetNumMixers(const NTV2DeviceID inDeviceID)
bool NTV2DeviceGetSupportedFrameRates(const NTV2DeviceID inDeviceID, NTV2FrameRateSet &outRates)
Returns a set of distinct NTV2FrameRate values supported on the given device.
bool NTV2DeviceCanDo3GLevelConversion(const NTV2DeviceID inDeviceID)
True if device has 12G SDI connectors.
std::set< NTV2FrameGeometry > NTV2GeometrySet
A set of distinct NTV2FrameGeometry values.
_EventHandles mInterruptEventHandles
For subscribing to each possible event, one for each interrupt type.
bool NTV2DeviceHasLEDAudioMeters(const NTV2DeviceID inDeviceID)
True if device is supported by AJA "retail" software (AJA ControlPanel & ControlRoom).
The maximum number of audio channels that a single Audio System can support on the device...
See KONA 5.
Definition: ntv2enums.h:59
bool NTV2DeviceCanDoThunderbolt(const NTV2DeviceID inDeviceID)
bool NTV2DeviceHasBiDirectionalSDI(const NTV2DeviceID inDeviceID)
ULWord NTV2DeviceGetHDMIVersion(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoStereoIn(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoPCMDetection(const NTV2DeviceID inDeviceID)
static int32_t Increment(int32_t volatile *pTarget)
Definition: atomic.cpp:82
True if device can rasterize 4 HD signals into a single HDMI output.
virtual bool NTV2WaitForInterruptRemote(const INTERRUPT_ENUMS eInterrupt, const ULWord timeOutMs)
bool NTV2DeviceGetSupportedVideoFormats(const NTV2DeviceID inDeviceID, NTV2VideoFormatSet &outFormats)
Returns a set of distinct NTV2VideoFormat values supported on the given device.
ULWord NTV2DeviceGetUFCVersion(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetNumAnalogVideoOutputs(const NTV2DeviceID inDeviceID)
virtual bool ParseFlashHeader(BITFILE_INFO_STRUCT &outBitfileInfo)
ULWord NTV2DeviceGetPingLED(const NTV2DeviceID inDeviceID)
See KONA HDMI.
Definition: ntv2enums.h:68
bool NTV2DeviceHasPCIeGen2(const NTV2DeviceID inDeviceID)
True if device supports 2nd-generation PCIe.
True if audio system(s) support 6 or more audio channels.
virtual bool GetRecordedRegisterWrites(NTV2RegisterWrites &outRegWrites) const
Answers with the recorded register writes.
static NTV2RPCClientAPI * CreateClient(NTV2ConnectParams &inParams)
Instantiates a new NTV2RPCClientAPI instance using the given NTV2ConnectParams.
bool NTV2DeviceCanReportFrameSize(const NTV2DeviceID inDeviceID)
#define NTV2_WRITEREG_PROFILING
Definition: ajatypes.h:74
True if device is local-host-attached, and not remote, software or virtual (new in SDK 17...
virtual bool ReleaseStreamForApplicationWithReference(const ULWord inAppType, const int32_t inProcessID)
A reference-counted version of CNTV2DriverInterface::ReleaseStreamForApplication useful for process g...
Specifies channel or FrameStore 2 (or the 2nd item).
Definition: ntv2enums.h:1362
See Corvid 44 12G.
Definition: ntv2enums.h:27
virtual NTV2DeviceID GetDeviceID(void)
bool NTV2DeviceHasSDIRelays(const NTV2DeviceID inDeviceID)
Identifies the NTV2FrameGeometry enumerated type.
virtual bool ReadRegisterMulti(const ULWord numRegs, ULWord *pOutWhichRegFailed, NTV2RegInfo aRegs[])
uint64_t ULWord64
Definition: ajatypes.h:239
NTV2Buffer mBuffer
Virtual address of a mail buffer and its length.
NTV2Buffer mBuffer
Virtual address of a stream buffer and its length.
NTV2ConnectParams Results(void) const
See Io Express.
Definition: ntv2enums.h:39
True if device has GPIO interface. (New in SDK 18.0)
True if frame buffer sizes are not fixed.
bool NTV2DeviceCanDo2KVideo(const NTV2DeviceID inDeviceID)
The number of quarter-size 4K/UHD down-converters on the device.
#define ARWARN(__x__)
This is used by the CNTV2Card::ReadRegisters function.
Identifies the NTV2TCIndex enumerated type for output.
ULWord NTV2DeviceGetNumDMAEngines(const NTV2DeviceID inDeviceID)
True if device is direct addressable.
True if device has any SDI, HDMI or analog video inputs.
UWord NTV2DeviceGetNumVideoInputs(const NTV2DeviceID inDeviceID)
True if device has serial SPI flash hardware.
True if device has a local processor handling the product code. (New in SDK 18.1) ...
See KONA LHi.
Definition: ntv2enums.h:79
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
virtual bool WriteRegister(const ULWord inRegNum, const ULWord inValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Updates or replaces all or part of the 32-bit contents of a specific register (real or virtual) on th...
NTV2BitFileType
Definition: ntv2enums.h:3352
True if device can report its frame size.
bool NTV2DeviceCanDisableUFC(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDo4KVideo(const NTV2DeviceID inDeviceID)
Declares the CNTV2DeviceScanner class.
True if device has any AES audio output channels (New in SDK 17.1)
virtual bool NTV2ReadRegisterRemote(const ULWord regNum, ULWord &outRegValue, const ULWord regMask, const ULWord regShift)
bool NTV2DeviceCanReportRunningFirmwareDate(const NTV2DeviceID inDeviceID)
virtual std::string GetDescription(void) const
virtual bool NTV2Message(NTV2_HEADER *pInMessage)
Sends a message to the NTV2 driver (the new, improved, preferred way).
bool NTV2DeviceCanDoRateConvert(const NTV2DeviceID inDeviceID)
static bool GetOverlappedMode(void)
ULWord deviceIndex
Device index number – this will be phased out someday.
The number of HDMI video outputs on the device.
Use kDeviceGetSPIVersion instead.
bool NTV2DeviceGetSupportedPixelFormats(const NTV2DeviceID inDeviceID, NTV2PixelFormats &outFormats)
Returns a set of distinct NTV2FrameBufferFormat values supported on the given device.
#define BITSTREAM_SWAP
Used in NTV2Bitstream to byte swap bitstream data.
The number of SDI-embedded output audio channels supported by the device.
UWord NTV2DeviceGetNumAudioSystems(const NTV2DeviceID inDeviceID)
static uint32_t gCloseCount(0)
Declares the AJAProcess class.
This is used for bitstream maintainance. (New in SDK 16.0)
See KONA 5.
Definition: ntv2enums.h:50
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
The number of frame sync widgets on the device.
virtual bool DriverGetBitFileInformation(BITFILE_INFO_STRUCT &outBitFileInfo, const NTV2BitFileType inBitFileType=NTV2_VideoProcBitFile)
defined(NTV2_DEPRECATE_17_2)
bool NTV2DeviceHasAudioMonitorRCAJacks(const NTV2DeviceID inDeviceID)
See KONA IP.
Definition: ntv2enums.h:72
Use kDeviceGetSPIVersion instead.
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Returns a set of distinct NTV2OutputDest values supported on the given device.
True if device can handle SD (Standard Definition) video.
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4608
Declares the AJAAtomic class.
bool NTV2DeviceCanDoIDSwitch(const NTV2DeviceID inDeviceID)
virtual ~CNTV2DriverInterface()
My destructor.
NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter
A handy const iterator for iterating over an NTV2InputSourceSet.
bool NTV2DeviceCanDoSDIErrorChecks(const NTV2DeviceID inDeviceID)
True if device mixer/keyer supports adjustable opacity.
#define BITSTREAM_WRITE
Used in NTV2Bitstream to write a bitstream.
ULWord mTimeout
Timeout (us)
#define KVRegAcquireRefCount
True if device has a crosspoint connection ROM (New in SDK 17.0)
True if device supports 10-bit RGB input/output over 2-wire SDI.
bool NTV2DeviceCanDo12gRouting(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetNumEmbeddedAudioInputChannels(const NTV2DeviceID inDeviceID)
NTV2WidgetIDSet::const_iterator NTV2WidgetIDSetConstIter
An iterator for iterating over a read-only NTV2WidgetIDSet.
#define kConnectParamDevIndex
Device having this index number.
Definition: ntv2nubaccess.h:27
True if device frame buffer size can be changed.
bool NTV2DeviceIsDirectAddressable(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoStackedAudio(const NTV2DeviceID inDeviceID)
static uint32_t gOpenCount(0)
virtual std::string Description(void) const
True if device can directly receive data from another PCIe device via peer-to-peer DMA...
The number of analog audio output channels on the device.
See KONA 5.
Definition: ntv2enums.h:64
True if Audio System(s) support a 192kHz sample rate.
Use kDeviceGetSPIVersion instead.
True if device has one or more analog video outputs.
#define DEC(__x__)
static bool GetDeviceInfo(const ULWord inDeviceIndexNumber, NTV2DeviceInfo &outDeviceInfo, const bool inRescan=(0))
virtual bool StreamBufferOps(const NTV2Channel inChannel, NTV2Buffer &inBuffer, ULWord64 bufferCookie, ULWord flags, NTV2StreamBuffer &status)
See Corvid 22.
Definition: ntv2enums.h:23
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:350
UWord NTV2DeviceGetNumOutputConverters(const NTV2DeviceID inDeviceID)
std::ostream & PrintErrors(std::ostream &oss) const
The number of analog LTC inputs on the device.
bool NTV2DeviceCanDoWarmBootFPGA(const NTV2DeviceID inDeviceID)
See Corvid HEVC.
Definition: ntv2enums.h:35
bool NTV2DeviceCanDoRGBPlusAlphaOut(const NTV2DeviceID inDeviceID)
The number of analog video inputs on the device.
The total number of audio systems on the device that can read/write audio buffer memory. Includes host audio system, if present. (New in SDK 17.0)
UWord NTV2DeviceGetNumLUTs(const NTV2DeviceID inDeviceID)
True if device supports 1080p RGB at more than 50Hz frame rates.
Declares numerous NTV2 utility functions.
True if device supports 12G routing crosspoints.
virtual Word SleepMs(const LWord msec)
bool NTV2DeviceHasRetailSupport(const NTV2DeviceID inDeviceID)
The version number of the DAC on the device.
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
CNTV2DriverInterface()
My default constructor.
True if device can rasterize 4 HD signals into a single HDMI output.
UWord NTV2DeviceGetNum2022ChannelsSFP2(const NTV2DeviceID inDeviceID)
ULWord NTV2DeviceGetMaxRegisterNumber(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoHDVideo(const NTV2DeviceID inDeviceID)
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
virtual const std::string & GetDate(void) const
Definition: ntv2bitfile.h:129
virtual bool StreamChannelOps(const NTV2Channel inChannel, ULWord flags, NTV2StreamChannel &status)
static bool GetWidgetIDs(const NTV2DeviceID inDeviceID, NTV2WidgetIDSet &outWidgets)
Returns the widget IDs supported by the given device.
virtual bool GetInterruptCount(const INTERRUPT_ENUMS eInterrupt, ULWord &outCount)
Answers with the number of interrupts of the given type processed by the driver.
True if device supports SMPTE ST2110.
True if device can perform SDI error checking.
virtual bool OpenRemote(const NTV2DeviceSpecParser &inSpec)
Peforms the housekeeping details of opening the remote/virtual device using the given specParser...
The number of output converter widgets on the device.
AUTO_CIRC_COMMAND eCommand
True if device has any analog inputs or outputs.
True if the device can handle 4K/UHD video.
bool NTV2DeviceCanDoAudioDelay(const NTV2DeviceID inDeviceID)
static bool gOverlappedMode((0))
The number of RS-422 serial ports on the device.
#define NTV2_BITFILE_PARTNAME_STRINGLENGTH
True if device has SDI ANC inserter/extractor firmware.
UWord NTV2DeviceGetNumHDMIAudioInputChannels(const NTV2DeviceID inDeviceID)
Declares the CNTV2Bitfile class.
ULWord mFlags
Action flags.
See Io X3.
Definition: ntv2enums.h:43
bool NTV2DeviceCanDoVideoProcessing(const NTV2DeviceID inDeviceID)
NTV2WidgetID
Definition: ntv2enums.h:2912
bool NTV2DeviceCanDo8KVideo(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanChangeEmbeddedAudioClock(const NTV2DeviceID inDeviceID)
uint16_t UWord
Definition: ajatypes.h:234
#define NTV2DriverVersionDecode_Build(__vers__)
True if device supports HDMI HDR output.
True if device can measure its FPGA die temperature.
1: Standard/Retail: device configured by AJA ControlPanel, service/daemon, and driver.
_EventCounts mEventCounts
My event tallies, one for each interrupt type. Note that these.
bool NTV2DeviceCanDoQuarterExpand(const NTV2DeviceID inDeviceID)
True if there&#39;s at least one UFC, and it can be disabled.
UWord NTV2DeviceGetNumLTCOutputs(const NTV2DeviceID inDeviceID)
Specifies channel or FrameStore 1 (or the first item).
Definition: ntv2enums.h:1361
True if device can report Mixer delay. (New in SDK 18.1)
True if device can report its running (and not necessarily installed) firmware date.
bool NTV2DeviceHasNWL(const NTV2DeviceID inDeviceID)
See Corvid 44 12G.
Definition: ntv2enums.h:29
True if device supports Versal Adaptive SoC System Monitor.
Calculate based on if NTV2_WgtCSC2 is present.
See Io IP.
Definition: ntv2enums.h:40
True if device is supported by this SDK.
bool NTV2DeviceHasHEVCM31(const NTV2DeviceID inDeviceID)
bool NTV2DeviceGetSupportedInputSources(const NTV2DeviceID inDeviceID, NTV2InputSourceSet &outInputSources, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Returns a set of distinct NTV2InputSource values supported on the given device.
bool NTV2DeviceCanDoRGBLevelAConversion(const NTV2DeviceID inDeviceID)
#define xHEX0N(__x__, __n__)
bool NTV2DeviceIsExternalToHost(const NTV2DeviceID inDeviceID)
A simple (not thread-safe) set of key/value pairs. (New in SDK 16.3)
The number of microphone inputs on the device.
The number of HDMI audio input channels on the device.
True if device supports frame pulse source independent of reference source.
bool NTV2DeviceCanDoSDVideo(const NTV2DeviceID inDeviceID)
virtual bool WaitForInterrupt(const INTERRUPT_ENUMS eInterrupt, const ULWord timeOutMs=68)
See Io 4K (UFC Mode).
Definition: ntv2enums.h:38
virtual ULWordSet GetSupportedItems(const NTV2EnumsID inEnumsID)
The number of 2022 channels configured on SFP 2 on the device.
See Corvid, Corvid 3G.
Definition: ntv2enums.h:22
True if device has any LUTs.
bool NTV2DeviceHasRotaryEncoder(const NTV2DeviceID inDeviceID)
NTV2RegWritesIter NTV2RegisterReadsIter
True if device has HDMI AUX data extractor(s).
#define NTV2_IS_VALID_AUDIO_SOURCE(_x_)
Definition: ntv2enums.h:2023
bool NTV2DeviceCanDoAudio192K(const NTV2DeviceID inDeviceID)
True if device can read LTC (Linear TimeCode) from one of its inputs.
See KONA 5.
Definition: ntv2enums.h:51
#define NTV2DriverVersionDecode_Minor(__vers__)
The SPI-flash version on the device. (New in SDK 17.1)
True if device supports 3D/stereo HDMI video output.
See Corvid 88 (Gen3).
Definition: ntv2enums.h:33
NTV2AudioSource
This enum value determines/states where an audio system will obtain its audio samples.
Definition: ntv2enums.h:2008
The down-converter delay on the device.
True if device has a PWM-controlled cooling fan. (New in SDK 17.1)
bool NTV2DeviceHasHeadphoneJack(const NTV2DeviceID inDeviceID)
virtual const std::string & GetPartName(void) const
Definition: ntv2bitfile.h:144
bool NTV2DeviceCanDoHDMIHDROut(const NTV2DeviceID inDeviceID)
#define DIINFO(__x__)
#define BITSTREAM_RESET_MODULE
Used in NTV2Bitstream to reset module.
std::string vdevUrl
See Corvid 44 12G.
Definition: ntv2enums.h:28
Input (capture) mode, which writes into device SDRAM.
Definition: ntv2enums.h:1246
virtual bool StopRecordRegisterWrites(void)
Stops recording all WriteRegister calls.
bool NTV2DeviceGetSupportedGeometries(const NTV2DeviceID inDeviceID, NTV2GeometrySet &outGeometries)
Returns a set of distinct NTV2FrameGeometry values supported on the given device. ...
bool NTV2DeviceCanDoDVCProHD(const NTV2DeviceID inDeviceID)
virtual bool ConfigureSubscription(const bool bSubscribe, const INTERRUPT_ENUMS inInterruptType, PULWord &outSubcriptionHdl)
bool NTV2DeviceCanDoBreakoutBoard(const NTV2DeviceID inDeviceID)
virtual bool NTV2WriteRegisterRemote(const ULWord regNum, const ULWord regValue, const ULWord regMask, const ULWord regShift)
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
True if device has NorthWest Logic DMA hardware.
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
RP188SourceFilterSelect
Private include file for all ajabase sources.
The version number of the HDMI chipset on the device.
virtual bool GetInterruptEventCount(const INTERRUPT_ENUMS inEventCode, ULWord &outCount)
Answers with the number of interrupt events that I successfully waited for.
bool NTV2DeviceCanDoCustomAnc(const NTV2DeviceID inDeviceID)
True if device audio systems can wait for VBI before starting. (New in SDK 17.0)
The number of LUT widgets on the device.
virtual bool IsMBSystemValid(void)
bool NTV2DeviceCanDoLTCInOnRefPort(const NTV2DeviceID inDeviceID)
The number of analog audio input channels on the device.
True if audio system(s) support 8 or more audio channels.
True if device has a microphone input connector.
virtual bool BitstreamWrite(const NTV2Buffer &inBuffer, const bool inFragment, const bool inSwap)
bool NTV2DeviceCanDoVITC2(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetNumAESAudioOutputChannels(const NTV2DeviceID inDeviceID)
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
True if device can insert or extract RP-188/VITC2.
ULWord NTV2DeviceGetNumVideoChannels(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetSPIFlashVersion(const NTV2DeviceID inDeviceID)
NTV2ConversionMode
Definition: ntv2enums.h:3717
std::set< NTV2DeviceID > NTV2DeviceIDSet
A set of NTV2DeviceIDs.
Definition: ntv2utils.h:1043
True if device has an HEVC M30 encoder/decoder.
void * GetHostPointer(void) const
See KONA X™.
Definition: ntv2enums.h:82
bool NTV2DeviceCanDoBreakoutBox(const NTV2DeviceID inDeviceID)
True if device has a firmware audio mixer.
Identifies the NTV2PixelFormat enumerated type.
NTV2AudioSource NTV2InputSourceToAudioSource(const NTV2InputSource inInputSource)
Definition: ntv2utils.cpp:4904
bool NTV2DeviceCanDoProgrammableRS422(const NTV2DeviceID inDeviceID)
virtual bool BitstreamStatus(NTV2ULWordVector &outRegValues)
Instances of me can parse a bitfile.
Definition: ntv2bitfile.h:86
Identifies the NTV2TCIndex enumerated type for input.
bool NTV2DeviceHasXilinxDMA(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoOutputTCIndex(const NTV2DeviceID inDeviceID, const NTV2TCIndex inTCIndex)
See Corvid 44 (Gen3).
Definition: ntv2enums.h:30
bool NTV2DeviceCanDoIP(const NTV2DeviceID inDeviceID)
Identifies the NTV2Mode enumerated type.
NTV2RegisterWrites mRegWrites
Stores WriteRegister data.
The number of 25Gbps SFPs on the device. (New in SDK 18.1)
UWord NTV2DeviceGetNumHDMIAudioOutputChannels(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoAnalogVideoIn(const NTV2DeviceID inDeviceID)
std::vector< std::string > NTV2StringList
Identifies the NTV2ConversionMode enumerated type.
virtual bool IsMBSystemReady(void)
See KONA 3G (UFC Mode).
Definition: ntv2enums.h:46
bool NTV2DeviceCanDo2110(const NTV2DeviceID inDeviceID)
True if device connects to the host using a Thunderbolt cable.
True if device has a bi-directional analog audio connector.
bool NTV2DeviceHasHEVCM30(const NTV2DeviceID inDeviceID)
std::vector< NTV2RegInfo > NTV2RegisterWrites
bool NTV2DeviceCanDoVersalSysMon(const NTV2DeviceID inDeviceID)
#define ARINFO(__x__)
bool mSkipRegWrites
True if actual register writes are skipped while recording.
See KONA X™.
Definition: ntv2enums.h:80
virtual NTV2ConnectParams ConnectParams(void) const
NTV2RPCAPI * _pRPCAPI
Points to remote or software device interface; otherwise NULL for local physical device.
bool NTV2DeviceCanDoHDMIMultiView(const NTV2DeviceID inDeviceID)
The number of 2022 channels configured on SFP 1 on the device.
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
std::string InfoString(void) const
bool NTV2DeviceHasBracketLED(const NTV2DeviceID inDeviceID)
virtual bool ReadRP188Registers(const NTV2Channel inChannel, RP188_STRUCT *pRP188Data)
See KONA 4 (UFC Mode).
Definition: ntv2enums.h:49
True if device has a rotary encoder volume control.
bool NTV2DeviceCanChangeFrameBufferSize(const NTV2DeviceID inDeviceID)
NTV2Channel mChannel
Mail buffer channel.
UWord NTV2DeviceGetMaxAudioChannels(const NTV2DeviceID inDeviceID)
virtual bool NTV2AutoCirculateRemote(AUTOCIRCULATE_DATA &autoCircData)
UWord NTV2DeviceGetNumHDMIVideoInputs(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoAnalogVideoOut(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanMeasureTemperature(const NTV2DeviceID inDeviceID)
The number of colorspace converter widgets on the device.
Identifies the NTV2AudioWidgetID enumerated type.
UWord NTV2DeviceGetNumReferenceVideoInputs(const NTV2DeviceID inDeviceID)
#define NTV2_BITFILE_DESIGNNAME_STRINGLENGTH
True if device supports custom HANC packet insertion. (New in SDK 17.1)
UWord NTV2DeviceGetDACVersion(const NTV2DeviceID inDeviceID)
True if device can insert and/or extract RP-188/VITC.
True if device supports 8K video formats.
Identifies the NTV2FrameRate enumerated type.
UWord NTV2DeviceGetNumAnalogAudioInputChannels(const NTV2DeviceID inDeviceID)
True if device has NTV4 FrameStores. (New in SDK 17.0)
bool NTV2DeviceCanDoFramePulseSelect(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoQREZ(const NTV2DeviceID inDeviceID)
virtual bool AutoCirculate(AUTOCIRCULATE_DATA &pAutoCircData)
Sends an AutoCirculate command to the NTV2 driver.
virtual bool MailBufferOps(const NTV2Channel inChannel, NTV2Buffer &inBuffer, ULWord dataSize, ULWord flags, ULWord delay, ULWord timeout, NTV2MailBuffer &status)
The number of HDMI audio output channels on the device.
ULWord mDataSize
Size of data in the buffer.
The number of SDI video inputs on the device.
True if device fan can be thermostatically controlled.
#define AJA_NTV2_SDK_VERSION_MINOR
The SDK minor version number, an unsigned decimal integer.
Definition: ntv2version.h:14
static UWord MaxNumDevices(void)
True if device can can accommodate Apple ProRes-compressed video in its frame buffers.
ULWord64 mBufferCookie
Buffer User cookie.
True if device can handle HD (High Definition) video.
Declares device capability functions.
True if device has HDMI AUX data inserter(s).
bool NTV2DeviceCanDoCustomAux(const NTV2DeviceID inDeviceID)
Packed driver version – use NTV2DriverVersionEncode, NTV2DriverVersionDecode* macros to encode/decod...
The size, in bytes, of the device&#39;s active RAM available for video and audio.
The number of AES/EBU audio input channels on the device.
bool NTV2DeviceCanDoPIO(const NTV2DeviceID inDeviceID)
See KONA 5.
Definition: ntv2enums.h:52
See T-TAP Pro.
Definition: ntv2enums.h:94
static bool IsValid(uint64_t pid)
Definition: process.cpp:41
True if device has Xilinx DMA hardware.
See KONA IP25.
Definition: ntv2enums.h:74
The number of down-converters on the device.
NTV2ReferenceSource NTV2InputSourceToReferenceSource(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2ReferenceSource value.
Definition: ntv2utils.cpp:5026
True if Audio System(s) support a 96kHz sample rate.
virtual ULWord GetNumRecordedRegisterWrites(void) const
True if device has any AES audio inputs or outputs.
See KONA XM™.
Definition: ntv2enums.h:81
True if device has one or more analog video inputs.
See Corvid, Corvid 3G.
Definition: ntv2enums.h:25
True if device can do frame rate conversion.
True if device has a mechanical identification switch. (New in SDK 17.1)
The number of HDMI video inputs on the device.
#define NTV2_BITFILE_DATETIME_STRINGLENGTH
See KONA 5.
Definition: ntv2enums.h:60
NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter
A handy const iterator for iterating over an NTV2FrameBufferFormatSet.
virtual HANDLE GetInterruptEvent(const INTERRUPT_ENUMS eInterruptType)
True if device can simultaneously handle different video formats on more than one SDI input or output...
UWord NTV2DeviceGetNumAESAudioInputChannels(const NTV2DeviceID inDeviceID)
static uint32_t gDestructCount(0)