22 : mDevCap(driverInterface())
28 : mDevCap(driverInterface())
30 string hostName(inHostName);
36 #if !defined(NTV2_DEPRECATE_17_2) 97 if (model ==
"Software" || model ==
"AJA Device" || model ==
"(Not Found)" || model ==
"Unknown" || model ==
"???")
101 oss << model <<
" - " << devNdx;
112 string dateStr, timeStr;
116 oss << dateStr <<
" at " << timeStr;
118 oss <<
"Unavailable";
127 return ReadRegister (48, status) ? ((status >> 8) & 0xFF) : -1;
135 oss << hex << version;
148 string hostName(
"localhost"), snStr;
155 oss <<
" '" << snStr <<
"'";
156 if (!hostName.empty())
157 oss <<
" on '" << hostName <<
"'";
164 static const string sDriverBuildTypes [] = {
"",
"b",
"a",
"d"};
165 UWord versions[4] = {0, 0, 0, 0};
172 const string & dabr (sDriverBuildTypes[versBits >> 30]);
174 oss <<
DEC(versions[0]) <<
"." <<
DEC(versions[1]) <<
"." <<
DEC(versions[2]);
176 oss <<
"." <<
DEC(versions[3]);
178 oss << dabr <<
DEC(versions[3]);
186 outMajor = outMinor = outPoint = outBuild = 0;
187 ULWord driverVersionULWord (0);
190 if (!driverVersionULWord)
218 const uint64_t result((hi << 32) | lo);
236 ULWord serialArray[] = {0,0,0,0};
241 outSerialNumberString.clear();
242 for (
int serialIndex = 0; serialIndex < 4; serialIndex++)
243 if (serialArray[serialIndex] != 0xffffffff)
244 for (
int i = 0; i < 4; i++)
246 const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
247 if (tempChar > 0 && tempChar !=
'.')
248 outSerialNumberString.push_back(tempChar);
254 if (outSerialNumberString.empty())
255 {outSerialNumberString =
"INVALID?";
return false;}
260 outSerialNumberString =
"5" + outSerialNumberString;
264 outSerialNumberString =
"6" + outSerialNumberString;
266 outSerialNumberString =
"7" + outSerialNumberString;
330 ::memset (&bitFileInfo, 0,
sizeof (bitFileInfo));
338 outDateStr = reinterpret_cast <
char *> (&bitFileInfo.
dateStr [0]);
339 outTimeStr = reinterpret_cast <
char *> (&bitFileInfo.
timeStr [0]);
348 oss << inBitFileInfo.
dateStr <<
" " << inBitFileInfo.
timeStr <<
" ";
358 outIsSafeBoot =
false;
367 outCanWarmBoot =
false;
375 outCanWarmBoot =
true;
387 const bool bPhonyKBox (
false);
442 ostringstream tempString;
447 outURLString.clear();
448 tempString <<
"http://";
449 ipOctet = (portIP & 0xFF000000) >> 24;
450 tempString << ipOctet <<
".";
451 ipOctet = (portIP & 0x00FF0000) >> 16;
452 tempString << ipOctet <<
".";
453 ipOctet = (portIP & 0x0000FF00) >> 8;
454 tempString << ipOctet <<
".";
455 ipOctet = (portIP & 0x000000FF);
456 tempString << ipOctet;
458 outURLString = tempString.str();
468 ostringstream tempString;
473 outURLString.clear();
474 tempString <<
"http://";
475 ipOctet = (portIP & 0xFF000000) >> 24;
476 tempString << ipOctet <<
".";
477 ipOctet = (portIP & 0x00FF0000) >> 16;
478 tempString << ipOctet <<
".";
479 ipOctet = (portIP & 0x0000FF00) >> 8;
480 tempString << ipOctet <<
".";
481 ipOctet = (portIP & 0x000000FF);
482 tempString << ipOctet;
484 outURLString = tempString.str();
494 for (
ULWord ndx(0); ndx < numSFPs; ndx++)
498 ostringstream tempString;
503 tempString <<
"http://";
504 ipOctet = (portIP & 0xFF000000) >> 24;
505 tempString << ipOctet <<
".";
506 ipOctet = (portIP & 0x00FF0000) >> 16;
507 tempString << ipOctet <<
".";
508 ipOctet = (portIP & 0x0000FF00) >> 8;
509 tempString << ipOctet <<
".";
510 ipOctet = (portIP & 0x000000FF);
511 tempString << ipOctet;
513 OutSFPURLStrings.push_back(tempString.str());
515 return int(OutSFPURLStrings.size());
518 #if !defined(NTV2_DEPRECATE_16_3) 564 return itms.find(
ULWord(inVideoFormat)) != itms.end();
569 return itms.find(
ULWord(inFBFormat)) != itms.end();
575 return wgtIDs.find(inWidgetID) != wgtIDs.end();
580 return itms.find(
ULWord(inConversionMode)) != itms.end();
585 return itms.find(
ULWord(inDSKMode)) != itms.end();
590 return itms.find(
ULWord(inInputSource)) != itms.end();
592 #endif // !defined(NTV2_DEPRECATE_16_3) 607 #define _TO_STR(_x_) #_x_ 609 AJALock DeviceCapabilities::sInitLock;
610 NTV2StringList DeviceCapabilities::sBoolParamIDStrs, DeviceCapabilities::sNumParamIDStrs, DeviceCapabilities::sEnumsIDStrs;
615 if (sBoolParamIDStrs.empty())
750 for (
size_t ndx(0); ndx < sBoolParamIDStrs.size(); ndx++)
751 sBoolParamIDStrs.at(ndx).erase(0, 7);
753 return size_t(p) < sBoolParamIDStrs.size() ? sBoolParamIDStrs.at(
size_t(p)) :
"";
759 if (sNumParamIDStrs.empty())
815 for (
size_t ndx(0); ndx < sNumParamIDStrs.size(); ndx++)
816 sNumParamIDStrs.at(ndx).erase(0, 7);
819 return ndx < sNumParamIDStrs.size() ? sNumParamIDStrs.at(ndx) :
"";
825 if (sEnumsIDStrs.empty())
848 for (
size_t ndx(0); ndx < sEnumsIDStrs.size(); ndx++)
849 sEnumsIDStrs.at(ndx).erase(0, 13);
851 return size_t(p) < sEnumsIDStrs.size() ? sEnumsIDStrs.at(
size_t(p)) :
"";
854 #define InitStrToIDMap(_eid_,_t_,_max_,_fn_) m.clear(); \ 855 for (n = 0; n < _max_; n++) \ 857 if (!aja::lower(st = _fn_(_t_(n), false)).empty()) \ 859 if (!aja::lower(st = _fn_(_t_(n), true)).empty()) \ 862 sStrToIDMaps.at(_eid_) = m; 864 DeviceCapabilities::GenericStrToIDMap DeviceCapabilities::sStrBoolParamIDMap, DeviceCapabilities::sStrNumParamIDMap, DeviceCapabilities::sStrEnumsIDMap;
865 DeviceCapabilities::GenericStrToIDMaps DeviceCapabilities::sStrToIDMaps;
867 void DeviceCapabilities::Init (
void)
870 GenericStrToIDMapCI it;
871 if (sStrBoolParamIDMap.empty())
874 for (
size_t ndx(0); ndx < sBoolParamIDStrs.size(); ndx++)
876 string st(sBoolParamIDStrs.at(ndx));
879 it = sStrBoolParamIDMap.find(st);
880 if (it == sStrBoolParamIDMap.end())
881 sStrBoolParamIDMap[st] =
id;
883 it = sStrBoolParamIDMap.find(st);
884 if (it == sStrBoolParamIDMap.end())
885 sStrBoolParamIDMap[st] =
id;
887 it = sStrBoolParamIDMap.find(st);
888 if (it == sStrBoolParamIDMap.end())
889 sStrBoolParamIDMap[st] =
id;
898 if (sStrNumParamIDMap.empty())
901 for (
size_t ndx(0); ndx < sNumParamIDStrs.size(); ndx++)
903 string st(sNumParamIDStrs.at(ndx));
906 it = sStrNumParamIDMap.find(st);
907 if (it == sStrNumParamIDMap.end())
908 sStrNumParamIDMap[st] =
id;
910 it = sStrNumParamIDMap.find(st);
911 if (it == sStrNumParamIDMap.end())
912 sStrNumParamIDMap[st] =
id;
914 it = sStrNumParamIDMap.find(st);
915 if (it == sStrNumParamIDMap.end())
916 sStrNumParamIDMap[st] =
id;
919 if (sStrEnumsIDMap.empty())
922 for (
size_t ndx(0); ndx < sEnumsIDStrs.size(); ndx++)
924 string st(sEnumsIDStrs.at(ndx));
927 it = sStrEnumsIDMap.find(st);
928 if (it == sStrEnumsIDMap.end())
929 sStrEnumsIDMap[st] =
id;
930 st =
"enumsid_" + st;
931 it = sStrEnumsIDMap.find(st);
932 if (it == sStrEnumsIDMap.end())
933 sStrEnumsIDMap[st] =
id;
935 it = sStrEnumsIDMap.find(st);
936 if (it == sStrEnumsIDMap.end())
937 sStrEnumsIDMap[st] =
id;
939 it = sStrEnumsIDMap.find(st);
940 if (it == sStrEnumsIDMap.end())
941 sStrEnumsIDMap[st] =
id;
944 if (sStrToIDMaps.empty())
949 sStrToIDMaps.push_back(GenericStrToIDMap());
980 if (sStrBoolParamIDMap.empty())
983 GenericStrToIDMapCI it (sStrBoolParamIDMap.find(s));
990 if (sStrNumParamIDMap.empty())
993 GenericStrToIDMapCI it (sStrNumParamIDMap.find(s));
1000 if (sStrEnumsIDMap.empty())
1003 GenericStrToIDMapCI it (sStrEnumsIDMap.find(s));
1010 if (sStrToIDMaps.empty())
1012 if (
id >= sStrToIDMaps.size())
1014 GenericStrToIDMap & m (sStrToIDMaps.at(
id));
1018 if (iter == m.end())
1020 outVal = iter->second;
1039 mNumFrames =
UWord(totalBytes / m8MB);
1040 if (totalBytes % m8MB)
1041 {mNumFrames++; cerr <<
DEC(totalBytes % m8MB) <<
" leftover/spare bytes -- last frame is partial frame" << endl;}
1042 for (
UWord frm(0); frm < mNumFrames; frm++)
1045 return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
1050 for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
1053 oss <<
DEC0N(it->first,3) <<
": " <<
aja::join(tags,
", ") << endl;
1061 for (
size_t ndx(0); ndx < inRgn1.size(); ndx++)
1062 if (result.find(inRgn1.at(ndx)) == result.end())
1063 result.insert(inRgn1.at(ndx));
1064 for (
size_t ndx(0); ndx < inRgn2.size(); ndx++)
1065 if (result.find(inRgn2.at(ndx)) == result.end())
1066 result.insert(inRgn2.at(ndx));
1067 for (
size_t ndx(0); ndx < inRgn3.size(); ndx++)
1068 if (result.find(inRgn3.at(ndx)) == result.end())
1069 result.insert(inRgn3.at(ndx));
1076 GetRegions (freeBlks, goodBlks, badBlks);
1077 ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks));
1081 const ULWord rgnInfo(*it);
1082 const UWord startBlk(rgnInfo >> 16), numBlks(
UWord(rgnInfo & 0x0000FFFF));
1084 GetTagsForFrameIndex (startBlk, tags);
1086 oss <<
"Frms " <<
DEC0N(startBlk,3) <<
"-" <<
DEC0N(startBlk+numBlks-1,3) <<
" : ";
1088 oss <<
"Frm " <<
DEC0N(startBlk,3) <<
" : ";
1100 outFree.clear(); outUsed.clear(); outBad.clear();
1101 FrameTagsConstIter it(mFrameTags.begin());
1102 if (it == mFrameTags.end())
1104 UWord frmStart(it->first), lastFrm(frmStart);
1106 while (++it != mFrameTags.end())
1109 if (tags != runTags)
1111 if (runTags.empty())
1113 if (frmStart != lastFrm)
1114 outFree.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1116 outFree.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1118 else if (runTags.size() > 1)
1120 if (frmStart != lastFrm)
1121 outBad.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1123 outBad.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1127 if (frmStart != lastFrm)
1128 outUsed.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1130 outUsed.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1132 frmStart = lastFrm = it->first;
1136 lastFrm = it->first;
1138 if (runTags.empty())
1140 if (frmStart != lastFrm)
1141 outFree.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1143 outFree.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1145 else if (runTags.size() > 1)
1147 if (frmStart != lastFrm)
1148 outBad.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1150 outBad.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1154 if (frmStart != lastFrm)
1155 outUsed.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1157 outUsed.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1165 FrameTagsConstIter it(mFrameTags.find(inIndex));
1166 if (it == mFrameTags.end())
1168 outTags = it->second;
1174 FrameTagsConstIter it(mFrameTags.find(inIndex));
1175 if (it == mFrameTags.end())
1177 return it->second.size();
1182 outDestRgns.clear();
1183 if (inIsQuad && inIsQuadQuad)
1185 if (inSrcRgns.empty())
1187 const UWord _8MB_frames_per_dest_frame(
UWord(GetIntrinsicFrameByteCount() / m8MB) * (inIsQuad?4:1) * (inIsQuadQuad?16:1));
1188 if (!_8MB_frames_per_dest_frame)
1190 if (_8MB_frames_per_dest_frame == 1)
1191 {outDestRgns = inSrcRgns;
return true;}
1194 for (
size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
1195 {
const ULWord val(inSrcRgns.at(ndx));
1196 ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF);
1197 startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
1198 lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
1199 outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
1207 bool isReading(
false), isWriting(
false);
1211 { ostringstream tag;
1212 tag <<
"Aud" <<
DEC(audSys+1);
1217 TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ?
string() : tag.str());
1229 bool isEnabled(
false), isMultiFormat(
false), isQuad(
false), isQuadQuad(
false), isSquares(
false), isTSI(
false);
1231 uint64_t addr(0), len(0);
1232 if (skipChannels.find(chan) != skipChannels.end())
1239 tag <<
"AC" <<
DEC(chan+1) << (acStatus.
IsInput() ?
" Write" :
" Read");
1240 TagMemoryBlock(addr, tmp + len - addr, tag.str());
1251 inDevice.
GetDeviceFrameInfo (
UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
1253 tag <<
"MR" <<
DEC(chan+1);
1255 tag <<
"Ch" <<
DEC(chan+1);
1257 TagMemoryBlock(addr, len, tag.str());
1263 else if (isQuad && !isQuadQuad && isTSI)
1275 if (!mIntrinsicSize)
1286 if (inStartAddr % m8MB)
1288 if (inByteLength % m8MB)
1292 const UWord startFrm(
UWord(inStartAddr / m8MB)), frmCnt(
UWord(inByteLength / m8MB));
1293 for (
UWord frm(0); frm < frmCnt; frm++)
1295 UWord frameNum(startFrm + frm);
1297 if (tags.find(inTag) == tags.end())
1300 if (frameNum >= mNumFrames)
1301 tags.insert(
"Invalid");
virtual bool DeviceCanDoVideoFormat(const NTV2VideoFormat inVF)
virtual bool GetNumericParam(const ULWord inParamID, ULWord &outValue)
Answers with the numeric value of the given parameter of interest.
size_t GetTagCount(const UWord inIndex) const
virtual bool SetFrameBufferSize(const NTV2Framesize inSize)
Sets the device's intrinsic frame buffer size.
static NTV2BoolParamID StringToBoolParamID(std::string s)
The number of cross-converters on the device.
enum _NTV2NumericParamID NTV2NumericParamID
Used with CNTV2DriverInterface::GetNumericParam to determine device capabilities. ...
std::string NTV2FrameGeometryToString(const NTV2FrameGeometry inValue, const bool inForRetailDisplay=false)
virtual Word GetPCIFPGAVersion(void)
#define NTV2_IS_INPUT_MODE(__mode__)
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)
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
True if device can handle 2Kx1556 (film) video.
#define kQParamVDevIndex
Device index number for .vdev virtual device.
virtual bool GetLPTunnelConfigurationURLString(std::string &outURLString)
True if device supports 3D video output over dual-stream SDI.
virtual bool IS_OUTPUT_SPIGOT_INVALID(const UWord inOutputSpigot)
The version number of the device'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).
True if device has version 3 genlock hardware and/or firmware. (Deprecate – use kDeviceGetGenlockVer...
True if device has SPI flash hardware.
std::string NTV2ModeToString(const NTV2Mode inValue, const bool inCompactDisplay=false)
True if audio system(s) support 2 or more audio channels.
The number of analog video outputs on the device.
virtual ULWord DeviceGetAudioFrameBuffer2(void)
std::string NTV2WidgetIDToString(const NTV2WidgetID inValue, const bool inCompactDisplay=false)
static NTV2Buffer NULL_POINTER
Used for default empty NTV2Buffer parameters – do not modify.
True if device can do ISO conversion.
True if device has enhanced CSCs.
virtual bool DeviceCanDoWidget(const NTV2WidgetID inWgtID)
The number of external reference video inputs on the device.
True if the device supports SMPTE 425 mux control.
#define DEC0N(__x__, __n__)
The number of video channels supported on the device.
virtual bool DeviceCanDoFrameBufferFormat(const NTV2PixelFormat inPF)
I interrogate and control an AJA video/audio capture/playout device.
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...
True if device can squeeze/stretch between 1920x1080/1280x1080 and 1280x720/960x720.
True if device can do 3G level B to 3G level A conversion.
True if device supports an AJA breakout box.
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.
virtual ULWord GetSerialNumberHigh(void)
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=(0))
Assesses the given device.
std::string valueForKey(const std::string &inKey) const
virtual bool DeviceCanDoConversionMode(const NTV2ConversionMode inCM)
True if HDMI in/out supports square-division (quad) raster conversion. (New in SDK 17...
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
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
True if device can display/output video from FrameStore 1.
The number of independent Audio Systems on the device.
Identifies the NTV2AudioRate enumerated type.
bool TranslateRegions(ULWordSequence &outRgns, const ULWordSequence &inRgns, const bool inIsQuad, const bool inIsQuadQuad) const
Translates an 8MB-chunked list of regions into another list of regions with frame indexes and sizes e...
True if device has version 2 genlock hardware and/or firmware. (Deprecate – use kDeviceGetGenlockVer...
Identifies the NTV2OutputDest enumerated type.
enum _NTV2BoolParamID NTV2BoolParamID
Used with CNTV2DriverInterface::GetBoolParam to determine device capabilities.
Identifies the NTV2DSKMode enumerated type.
virtual bool IsMultiRasterWidgetChannel(const NTV2Channel inChannel)
True if device can report if its "fail-safe" firmware is loaded/running.
True if device connects to the host with a cable.
Identifies the AES/EBU audio breakout cable that has XLR connectors.
#define kQParamVDevName
Base name of .vdev file.
#define kNTV2PluginRegInfoKey_ShortName
Plugin short name.
virtual bool GetOutputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current output frame number for the given FrameStore (expressed as an NTV2Channel)...
True if device can detect which audio channel pairs are not carrying PCM (Pulse Code Modulation) audi...
True if device reports genlock frequencies. (New in SDK 18.1)
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call...
static bool isEnabled(CNTV2Card &device, const NTV2Channel inChannel)
True if device supports fast bitfile switching. (New in SDK 18.1)
True if device has an HEVC M31 encoder.
virtual bool IS_INPUT_SPIGOT_INVALID(const UWord inInputSpigot)
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 DeviceCanDoFormat(const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
virtual Word GetDeviceVersion(void)
Answers with this device's version number.
The version number of the LUT(s) on the device.
Identifies the NTV2VideoFormat enumerated type.
The ordinally last geometry (New in SDK 16.0)
True if device has SFP connectors.
ULWord _ulFrameBufferSize
Identifies the NTV2Channel enumerated type.
True if device widget routing can be queried or changed.
True if device can do video processing.
Identifies the NTV2InputSource enumerated type.
#define InitStrToIDMap(_eid_, _t_, _max_, _fn_)
virtual bool GetFrameBufferSize(const NTV2Channel inChannel, NTV2Framesize &outValue)
Answers with the frame size currently being used on the device.
True if the device can do RGB over 3G Level A.
ULWord NTV2DeviceGetAudioFrameBuffer2(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
virtual bool IsAudioInputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the capture side of the given NTV2AudioSystem is currently running...
virtual ULWord GetFrameBufferSize(void) const
The maximum number of 32-bit words that the DMA engine can move at a time on the device.
std::ostream & RawDump(std::ostream &oss) const
Dumps a human-readable list of regions into the given stream.
True if device can handle QRez.
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
The number of DMA engines on the device.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
virtual NTV2Dictionary ConnectParams(void) const
True if Audio System(s) support an adjustable delay.
True if device supports an AJA breakout board. (New in SDK 17.0)
True if device can directly transmit data to another PCIe device via peer-to-peer DMA...
#define NTV2DriverVersionDecode_Major(__vers__)
True if device supports grouped audio system control.
#define NTV2DriverVersionDecode_Point(__vers__)
#define NTV2_ASSERT(_expr_)
virtual bool GetInstalledBitfileInfo(ULWord &outNumBytes, std::string &outDateStr, std::string &outTimeStr)
Returns the bitfile size and time/date stamp from the header of the bitfile that's currently installe...
The number of SDI video outputs on the device.
True if device supports streaming DMA. (New in SDK 17.1)
ULWordSet::const_iterator ULWordSetConstIter
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...
virtual bool IsRemote(void) const
True if device is 64-bit addressable.
True if device can read LTC (Linear TimeCode) from its reference input.
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
virtual bool HasMultiRasterWidget(void)
True if device can mark specific audio channel pairs as not carrying PCM (Pulse Code Modulation) audi...
True if device SDI connectors are bi-directional.
std::string NTV2InputSourceToString(const NTV2InputSource inValue, const bool inForRetailDisplay=false)
Identifies the NTV2AudioSource enumerated type.
static NTV2NumericParamID StringToNumParamID(std::string s)
NTV2FrameRate
Identifies a particular video frame rate.
I'm the base class that undergirds the platform-specific derived classes (from which CNTV2Card is ult...
virtual std::string GetPCIFPGAVersionString(void)
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.
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
True if device supports 3D video input over dual-stream SDI.
True if device supports Programmed I/O.
virtual bool IsAudioOutputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the playout side of the given NTV2AudioSystem is currently running...
True if device SPIFlash ROM is bank-selected. (New in SDK 17.1)
NTV2Standard
Identifies a particular video standard.
The highest register number for the device.
Identifies the NTV2RefSource enumerated type.
Use kDeviceGetSPIVersion instead.
virtual std::string GetDescription(void) const
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
static ULWordSet CoalesceRegions(const ULWordSequence &inRgn1, const ULWordSequence &inRgn2, const ULWordSequence &inRgn3)
The highest bit number of the LED bits in the Global Control Register on the device.
virtual bool IsFailSafeBitfileLoaded(bool &outIsFailSafe)
Answers whether or not the "fail-safe" (aka "safe-boot") bitfile is currently loaded and running in t...
NTV2DeviceID _boardID
My cached device ID.
The number of FrameStores on the device.
static std::string SerialNum64ToString(const uint64_t inSerialNumber)
Returns a string containing the decoded, human-readable device serial number.
static std::string NumParamIDToString(const NTV2NumericParamID p)
True if device can handle quarter-sized frames (pixel-halving and line-halving during input...
virtual bool IsOpen(void) const
True if device has bypass relays on its SDI connectors.
bool _boardOpened
True if I'm open and connected to the device.
std::set< std::string > NTV2StringSet
NTV2BreakoutType
Identifies the Breakout Boxes and Cables that may be attached to an AJA NTV2 device.
True if device can squeeze/stretch between 1920x1080 and 1440x1080.
True if device supports JPEG 2000 codec.
virtual std::string GetBitfileInfoString(const BITFILE_INFO_STRUCT &inBitFileInfo)
Generates and returns an info string with date, time and name for the given inBifFileInfo.
True if device has attached breakout board. (New in SDK 17.0)
virtual bool GetSerialNumberString(std::string &outSerialNumberString)
Answers with a string that contains my human-readable serial number.
True if device has LED(s) on the card bracket. (New in SDK 18.0)
virtual std::string GetDisplayName(void)
Answers with this device's display name.
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.
True if device has any audio input capability (SDI, HDMI or analog) (New in SDK 17.1)
True if device has a headphone jack.
True if device has 25Gbps SFPs. (New in SDK 18.0)
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
True if device has at least one RS-422 serial port, and it (they) can be programmed (for baud rate...
bool IsStopped(void) const
True if device has a pair of unbalanced RCA audio monitor output connectors.
Identifies the NTV2Standard enumerated type.
True if device uses a "stacked" arrangement of its audio buffers.
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
virtual std::string GetDriverVersionString(void)
Answers with this device's driver's version as a human-readable string.
virtual bool DeviceCanDoDSKMode(const NTV2DSKMode inDSKM)
virtual bool GetInputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current input frame index number for the given FrameStore. This identifies which par...
True if device has 12G SDI connectors.
virtual std::string GetDeviceVersionString(void)
Answers with this device's version number as a human-readable string.
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...
virtual bool IS_HDMI_INPUT_SPIGOT_INVALID(const UWord inInputHDMIPort)
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
virtual bool GetDeviceFrameInfo(const UWord inFrameNumber, const NTV2Channel inChannel, uint64_t &outAddress, uint64_t &outLength)
Answers with the address and size of the given frame.
virtual bool GetLPExternalConfigurationURLString(std::string &outURLString)
bool GetRegions(ULWordSequence &outFree, ULWordSequence &outUsed, ULWordSequence &outBad) const
Answers with the lists of free, in-use and conflicting 8MB memory blocks. Each ULWord represents a re...
True if device can rasterize 4 HD signals into a single HDMI output.
Specifies channel or FrameStore 8 (or the 8th item).
True if device supports 2nd-generation PCIe.
True if audio system(s) support 6 or more audio channels.
True if device is local-host-attached, and not remote, software or virtual (new in SDK 17...
Specifies channel or FrameStore 2 (or the 2nd item).
virtual NTV2DeviceID GetDeviceID(void)
Identifies the NTV2FrameGeometry enumerated type.
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
True if device has GPIO interface. (New in SDK 18.0)
True if frame buffer sizes are not fixed.
The number of quarter-size 4K/UHD down-converters on the device.
Identifies the NTV2TCIndex enumerated type for output.
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
True if device is direct addressable.
True if device has any SDI, HDMI or analog video inputs.
True if device has serial SPI flash hardware.
True if device has a local processor handling the product code. (New in SDK 18.1) ...
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
True if device can report its frame size.
The number of LUT banks on the device. (New in SDK 17.0)
True if device has any AES audio output channels (New in SDK 17.1)
virtual std::string GetDescription(void) const
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...
NTV2Framesize
Kona2/Xena2 specific enums.
The number of HDMI video outputs on the device.
Use kDeviceGetSPIVersion instead.
The number of SDI-embedded output audio channels supported by the device.
#define NTV2_IS_VALID_CHANNEL(__x__)
virtual bool DeviceCanDoInputSource(const NTV2InputSource inSrc)
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)
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
Use kDeviceGetSPIVersion instead.
uint16_t GetEndFrame(void) const
True if device can handle SD (Standard Definition) video.
virtual std::string GetModelName(void)
Answers with this device's model name.
virtual int GetSFPConfigurationURLStrings(std::vector< std::string > &sfpURLStrings)
NTV2InputSource
Identifies a specific video input source.
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
True if device mixer/keyer supports adjustable opacity.
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 TagVideoFrames(CNTV2Card &inDevice)
std::string & strip(std::string &str, const std::string &ws)
True if device frame buffer size can be changed.
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.
static std::string EnumsIDToString(const NTV2EnumsID p)
True if Audio System(s) support a 192kHz sample rate.
Use kDeviceGetSPIVersion instead.
True if device has one or more analog video outputs.
virtual bool GetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat &outValue)
Returns the current frame buffer format for the given FrameStore on the AJA device.
NTV2FrameGeometry
Identifies a particular video frame geometry.
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
The number of analog LTC inputs on the device.
This identifies the first Audio System.
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)
True if device supports 1080p RGB at more than 50Hz frame rates.
virtual bool GetFrameGeometry(NTV2FrameGeometry &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Declares numerous NTV2 utility functions.
True if device supports 12G routing crosspoints.
bool TagAudioBuffers(CNTV2Card &inDevice, const bool inMarkStoppedAudioBuffersFree)
The version number of the DAC on the device.
virtual uint64_t GetSerialNumber(void)
Answers with my serial number.
True if device can rasterize 4 HD signals into a single HDMI output.
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
Declares the AJASystemInfo class.
virtual ULWord DeviceGetFrameBufferSize(void)
True if device supports SMPTE ST2110.
True if device can perform SDI error checking.
The number of output converter widgets on the device.
True if device has any analog inputs or outputs.
True if the device can handle 4K/UHD video.
The number of RS-422 serial ports on the device.
True if device has SDI ANC inserter/extractor firmware.
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
ULWord _ulNumFrameBuffers
std::string NTV2AudioRateToString(const NTV2AudioRate inValue, const bool inForRetailDisplay=false)
#define NTV2DriverVersionDecode_Build(__vers__)
True if device supports HDMI HDR output.
True if device can measure its FPGA die temperature.
True if there's at least one UFC, and it can be disabled.
Specifies channel or FrameStore 1 (or the first item).
ULWord NTV2DeviceGetAudioFrameBuffer(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
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.
True if device supports Versal Adaptive SoC System Monitor.
Calculate based on if NTV2_WgtCSC2 is present.
True if device is supported by this SDK.
std::string NTV2ReferenceSourceToString(const NTV2ReferenceSource inValue, const bool inForRetailDisplay=false)
virtual NTV2BreakoutType GetBreakoutHardware(void)
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.
std::string NTV2AudioSourceToString(const NTV2AudioSource inValue, const bool inCompactDisplay=false)
bool CanDoWidget(const NTV2WidgetID inWgtID)
virtual ULWordSet GetSupportedItems(const NTV2EnumsID inEnumsID)
Identifies the AES/EBU audio breakout cable that has BNC connectors.
The number of 2022 channels configured on SFP 2 on the device.
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
True if device has any LUTs.
virtual bool IsChannelEnabled(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the given FrameStore is enabled.
True if device has HDMI AUX data extractor(s).
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
True if device can read LTC (Linear TimeCode) from one of its inputs.
#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.
NTV2AudioSource
This enum value determines/states where an audio system will obtain its audio samples.
virtual bool IS_CHANNEL_INVALID(const NTV2Channel inChannel) const
Declares the CNTV2Card class.
The down-converter delay on the device.
True if device has a PWM-controlled cooling fan. (New in SDK 17.1)
bool NTV2DeviceCanDoFormat(const NTV2DeviceID inDevID, const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Specifies channel or FrameStore 4 (or the 4th item).
enum NTV2OutputDestination NTV2OutputDest
True if device has NorthWest Logic DMA hardware.
Specifies channel or FrameStore 5 (or the 5th item).
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Private include file for all ajabase sources.
The version number of the HDMI chipset on the device.
virtual ULWord DeviceGetNumberFrameBuffers(void)
True if device audio systems can wait for VBI before starting. (New in SDK 17.0)
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
The number of LUT widgets on the device.
The number of analog audio input channels on the device.
True if audio system(s) support 8 or more audio channels.
virtual bool CanWarmBootFPGA(bool &outCanWarmBoot)
Answers whether or not the FPGA can be reloaded without powering off.
bool TagMemoryBlock(const ULWord inStartAddr, const ULWord inByteLength, const std::string &inTag)
True if device has a microphone input connector.
std::string SerialNum64ToString(const uint64_t &inSerNum)
std::string NTV2BitfileTypeToString(const NTV2BitfileType inValue, const bool inCompactDisplay=false)
virtual AJAStatus GetValue(const AJASystemInfoTag inTag, std::string &outValue) const
Answers with the host system info value string for the given AJASystemInfoTag.
std::string join(const std::vector< std::string > &parts, const std::string &delim)
True if device can insert or extract RP-188/VITC2.
No identifiable breakout hardware appears to be attached.
True if device has an HEVC M30 encoder/decoder.
True if device has a firmware audio mixer.
virtual ULWord DeviceGetAudioFrameBuffer(void)
Identifies the NTV2PixelFormat enumerated type.
Identifies the NTV2TCIndex enumerated type for input.
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
Identifies the NTV2Mode enumerated type.
The number of 25Gbps SFPs on the device. (New in SDK 18.1)
std::vector< std::string > NTV2StringList
Specifies channel or FrameStore 6 (or the 6th item).
Identifies the NTV2ConversionMode enumerated type.
True if device connects to the host using a Thunderbolt cable.
virtual bool IsBufferSizeSetBySW(void)
defined(NTV2_DEPRECATE_17_2)
True if device has a bi-directional analog audio connector.
virtual std::string GetFPGAVersionString(const NTV2XilinxFPGA inFPGA=eFPGAVideoProc)
CNTV2Card()
My default constructor.
static NTV2EnumsID StringToEnumsParamID(std::string s)
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
Specifies channel or FrameStore 7 (or the 7th item).
std::string & lower(std::string &str)
The number of 2022 channels configured on SFP 1 on the device.
True if device has a rotary encoder volume control.
The number of colorspace converter widgets on the device.
virtual ULWord GetSerialNumberLow(void)
Identifies the NTV2AudioWidgetID enumerated type.
True if device supports custom HANC packet insertion. (New in SDK 17.1)
True if device can insert and/or extract RP-188/VITC.
True if device supports 8K video formats.
virtual bool GetDriverVersionComponents(UWord &outMajor, UWord &outMinor, UWord &outPoint, UWord &outBuild)
Answers with the individual version components of this device's driver.
Identifies the NTV2FrameRate enumerated type.
Last ordinal value (new in SDK 16.0)
True if device has NTV4 FrameStores. (New in SDK 17.0)
The number of HDMI audio output channels on the device.
The number of SDI video inputs on the device.
True if device fan can be thermostatically controlled.
True if device can can accommodate Apple ProRes-compressed video in its frame buffers.
enum NTV2ReferenceSource NTV2RefSource
uint16_t GetStartFrame(void) const
static bool StringToSupportedEnumsIDValue(ULWord &outVal, const NTV2EnumsID id, std::string s)
True if device can handle HD (High Definition) video.
Declares device capability functions.
True if device has HDMI AUX data inserter(s).
Packed driver version – use NTV2DriverVersionEncode, NTV2DriverVersionDecode* macros to encode/decod...
virtual ~CNTV2Card()
My destructor.
The size, in bytes, of the device's active RAM available for video and audio.
The number of AES/EBU audio input channels on the device.
Specifies channel or FrameStore 3 (or the 3rd item).
std::string NTV2FrameRateToString(const NTV2FrameRate inValue, const bool inForRetailDisplay=false)
True if device has Xilinx DMA hardware.
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
The number of down-converters on the device.
True if Audio System(s) support a 96kHz sample rate.
True if device has any AES audio inputs or outputs.
True if device has one or more analog video inputs.
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.
static std::string BoolParamIDToString(const NTV2BoolParamID p)
virtual bool GetAudioMemoryOffset(const ULWord inOffsetBytes, ULWord &outAbsByteOffset, const NTV2AudioSystem inAudioSystem, const bool inCaptureBuffer=(0))
Answers with the byte offset in device SDRAM into the specified Audio System's audio buffer...
True if device can simultaneously handle different video formats on more than one SDI input or output...