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;
153 oss <<
" '" << snStr <<
"'";
154 if (!hostName.empty())
155 oss <<
" on '" << hostName <<
"'";
162 static const string sDriverBuildTypes [] = {
"",
"b",
"a",
"d"};
163 UWord versions[4] = {0, 0, 0, 0};
170 const string & dabr (sDriverBuildTypes[versBits >> 30]);
172 oss <<
DEC(versions[0]) <<
"." <<
DEC(versions[1]) <<
"." <<
DEC(versions[2]);
174 oss <<
"." <<
DEC(versions[3]);
176 oss << dabr <<
DEC(versions[3]);
184 outMajor = outMinor = outPoint = outBuild = 0;
185 ULWord driverVersionULWord (0);
188 if (!driverVersionULWord)
216 const uint64_t result((hi << 32) | lo);
234 ULWord serialArray[] = {0,0,0,0};
239 outSerialNumberString.clear();
240 for (
int serialIndex = 0; serialIndex < 4; serialIndex++)
241 if (serialArray[serialIndex] != 0xffffffff)
242 for (
int i = 0; i < 4; i++)
244 const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
245 if (tempChar > 0 && tempChar !=
'.')
246 outSerialNumberString.push_back(tempChar);
252 if (outSerialNumberString.empty())
253 {outSerialNumberString =
"INVALID?";
return false;}
258 outSerialNumberString =
"5" + outSerialNumberString;
262 outSerialNumberString =
"6" + outSerialNumberString;
264 outSerialNumberString =
"7" + outSerialNumberString;
328 ::memset (&bitFileInfo, 0,
sizeof (bitFileInfo));
336 outDateStr = reinterpret_cast <
char *> (&bitFileInfo.
dateStr [0]);
337 outTimeStr = reinterpret_cast <
char *> (&bitFileInfo.
timeStr [0]);
346 oss << inBitFileInfo.
dateStr <<
" " << inBitFileInfo.
timeStr <<
" ";
356 outIsSafeBoot =
false;
365 outCanWarmBoot =
false;
373 outCanWarmBoot =
true;
385 const bool bPhonyKBox (
false);
440 ostringstream tempString;
445 outURLString.clear();
446 tempString <<
"http://";
447 ipOctet = (portIP & 0xFF000000) >> 24;
448 tempString << ipOctet <<
".";
449 ipOctet = (portIP & 0x00FF0000) >> 16;
450 tempString << ipOctet <<
".";
451 ipOctet = (portIP & 0x0000FF00) >> 8;
452 tempString << ipOctet <<
".";
453 ipOctet = (portIP & 0x000000FF);
454 tempString << ipOctet;
456 outURLString = tempString.str();
466 ostringstream tempString;
471 outURLString.clear();
472 tempString <<
"http://";
473 ipOctet = (portIP & 0xFF000000) >> 24;
474 tempString << ipOctet <<
".";
475 ipOctet = (portIP & 0x00FF0000) >> 16;
476 tempString << ipOctet <<
".";
477 ipOctet = (portIP & 0x0000FF00) >> 8;
478 tempString << ipOctet <<
".";
479 ipOctet = (portIP & 0x000000FF);
480 tempString << ipOctet;
482 outURLString = tempString.str();
492 for (
ULWord ndx(0); ndx < numSFPs; ndx++)
496 ostringstream tempString;
501 tempString <<
"http://";
502 ipOctet = (portIP & 0xFF000000) >> 24;
503 tempString << ipOctet <<
".";
504 ipOctet = (portIP & 0x00FF0000) >> 16;
505 tempString << ipOctet <<
".";
506 ipOctet = (portIP & 0x0000FF00) >> 8;
507 tempString << ipOctet <<
".";
508 ipOctet = (portIP & 0x000000FF);
509 tempString << ipOctet;
511 OutSFPURLStrings.push_back(tempString.str());
513 return int(OutSFPURLStrings.size());
516 #if !defined(NTV2_DEPRECATE_16_3) 562 return itms.find(
ULWord(inVideoFormat)) != itms.end();
567 return itms.find(
ULWord(inFBFormat)) != itms.end();
573 return wgtIDs.find(inWidgetID) != wgtIDs.end();
578 return itms.find(
ULWord(inConversionMode)) != itms.end();
583 return itms.find(
ULWord(inDSKMode)) != itms.end();
588 return itms.find(
ULWord(inInputSource)) != itms.end();
590 #endif // !defined(NTV2_DEPRECATE_16_3) 605 #define _TO_STR(_x_) #_x_ 607 AJALock DeviceCapabilities::sInitLock;
608 NTV2StringList DeviceCapabilities::sBoolParamIDStrs, DeviceCapabilities::sNumParamIDStrs, DeviceCapabilities::sEnumsIDStrs;
613 if (sBoolParamIDStrs.empty())
748 for (
size_t ndx(0); ndx < sBoolParamIDStrs.size(); ndx++)
749 sBoolParamIDStrs.at(ndx).erase(0, 7);
751 return size_t(p) < sBoolParamIDStrs.size() ? sBoolParamIDStrs.at(
size_t(p)) :
"";
757 if (sNumParamIDStrs.empty())
813 for (
size_t ndx(0); ndx < sNumParamIDStrs.size(); ndx++)
814 sNumParamIDStrs.at(ndx).erase(0, 7);
817 return ndx < sNumParamIDStrs.size() ? sNumParamIDStrs.at(ndx) :
"";
823 if (sEnumsIDStrs.empty())
846 for (
size_t ndx(0); ndx < sEnumsIDStrs.size(); ndx++)
847 sEnumsIDStrs.at(ndx).erase(0, 13);
849 return size_t(p) < sEnumsIDStrs.size() ? sEnumsIDStrs.at(
size_t(p)) :
"";
852 #define InitStrToIDMap(_eid_,_t_,_max_,_fn_) m.clear(); \ 853 for (n = 0; n < _max_; n++) \ 855 if (!aja::lower(st = _fn_(_t_(n), false)).empty()) \ 857 if (!aja::lower(st = _fn_(_t_(n), true)).empty()) \ 860 sStrToIDMaps.at(_eid_) = m; 862 DeviceCapabilities::GenericStrToIDMap DeviceCapabilities::sStrBoolParamIDMap, DeviceCapabilities::sStrNumParamIDMap, DeviceCapabilities::sStrEnumsIDMap;
863 DeviceCapabilities::GenericStrToIDMaps DeviceCapabilities::sStrToIDMaps;
868 return b && pStr ? string(pStr) :
"";
871 void DeviceCapabilities::Init (
void)
874 GenericStrToIDMapCI it;
875 if (sStrBoolParamIDMap.empty())
878 for (
size_t ndx(0); ndx < sBoolParamIDStrs.size(); ndx++)
880 string st(sBoolParamIDStrs.at(ndx));
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;
891 it = sStrBoolParamIDMap.find(st);
892 if (it == sStrBoolParamIDMap.end())
893 sStrBoolParamIDMap[st] =
id;
902 if (sStrNumParamIDMap.empty())
905 for (
size_t ndx(0); ndx < sNumParamIDStrs.size(); ndx++)
907 string st(sNumParamIDStrs.at(ndx));
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;
918 it = sStrNumParamIDMap.find(st);
919 if (it == sStrNumParamIDMap.end())
920 sStrNumParamIDMap[st] =
id;
923 if (sStrEnumsIDMap.empty())
926 for (
size_t ndx(0); ndx < sEnumsIDStrs.size(); ndx++)
928 string st(sEnumsIDStrs.at(ndx));
931 it = sStrEnumsIDMap.find(st);
932 if (it == sStrEnumsIDMap.end())
933 sStrEnumsIDMap[st] =
id;
934 st =
"enumsid_" + st;
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;
943 it = sStrEnumsIDMap.find(st);
944 if (it == sStrEnumsIDMap.end())
945 sStrEnumsIDMap[st] =
id;
948 if (sStrToIDMaps.empty())
953 sStrToIDMaps.push_back(GenericStrToIDMap());
985 if (sStrBoolParamIDMap.empty())
988 GenericStrToIDMapCI it (sStrBoolParamIDMap.find(s));
995 if (sStrNumParamIDMap.empty())
998 GenericStrToIDMapCI it (sStrNumParamIDMap.find(s));
1005 if (sStrEnumsIDMap.empty())
1008 GenericStrToIDMapCI it (sStrEnumsIDMap.find(s));
1015 if (sStrToIDMaps.empty())
1017 if (
id >= sStrToIDMaps.size())
1019 GenericStrToIDMap & m (sStrToIDMaps.at(
id));
1023 if (iter == m.end())
1025 outVal = iter->second;
1044 mNumFrames =
UWord(totalBytes / m8MB);
1045 if (totalBytes % m8MB)
1046 {mNumFrames++; cerr <<
DEC(totalBytes % m8MB) <<
" leftover/spare bytes -- last frame is partial frame" << endl;}
1047 for (
UWord frm(0); frm < mNumFrames; frm++)
1050 return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
1055 for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
1058 oss <<
DEC0N(it->first,3) <<
": " <<
aja::join(tags,
", ") << endl;
1066 for (
size_t ndx(0); ndx < inRgn1.size(); ndx++)
1067 if (result.find(inRgn1.at(ndx)) == result.end())
1068 result.insert(inRgn1.at(ndx));
1069 for (
size_t ndx(0); ndx < inRgn2.size(); ndx++)
1070 if (result.find(inRgn2.at(ndx)) == result.end())
1071 result.insert(inRgn2.at(ndx));
1072 for (
size_t ndx(0); ndx < inRgn3.size(); ndx++)
1073 if (result.find(inRgn3.at(ndx)) == result.end())
1074 result.insert(inRgn3.at(ndx));
1081 GetRegions (freeBlks, goodBlks, badBlks);
1082 ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks));
1086 const ULWord rgnInfo(*it);
1087 const UWord startBlk(rgnInfo >> 16), numBlks(
UWord(rgnInfo & 0x0000FFFF));
1089 GetTagsForFrameIndex (startBlk, tags);
1091 oss <<
"Frms " <<
DEC0N(startBlk,3) <<
"-" <<
DEC0N(startBlk+numBlks-1,3) <<
" : ";
1093 oss <<
"Frm " <<
DEC0N(startBlk,3) <<
" : ";
1105 outFree.clear(); outUsed.clear(); outBad.clear();
1106 FrameTagsConstIter it(mFrameTags.begin());
1107 if (it == mFrameTags.end())
1109 UWord frmStart(it->first), lastFrm(frmStart);
1111 while (++it != mFrameTags.end())
1114 if (tags != runTags)
1116 if (runTags.empty())
1118 if (frmStart != lastFrm)
1119 outFree.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1121 outFree.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1123 else if (runTags.size() > 1)
1125 if (frmStart != lastFrm)
1126 outBad.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1128 outBad.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1132 if (frmStart != lastFrm)
1133 outUsed.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1135 outUsed.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1137 frmStart = lastFrm = it->first;
1141 lastFrm = it->first;
1143 if (runTags.empty())
1145 if (frmStart != lastFrm)
1146 outFree.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1148 outFree.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1150 else if (runTags.size() > 1)
1152 if (frmStart != lastFrm)
1153 outBad.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1155 outBad.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1159 if (frmStart != lastFrm)
1160 outUsed.push_back((
ULWord(frmStart) << 16) |
ULWord(lastFrm-frmStart+1));
1162 outUsed.push_back((
ULWord(frmStart) << 16) |
ULWord(1));
1170 FrameTagsConstIter it(mFrameTags.find(inIndex));
1171 if (it == mFrameTags.end())
1173 outTags = it->second;
1179 FrameTagsConstIter it(mFrameTags.find(inIndex));
1180 if (it == mFrameTags.end())
1182 return it->second.size();
1187 outDestRgns.clear();
1188 if (inIsQuad && inIsQuadQuad)
1190 if (inSrcRgns.empty())
1192 const UWord _8MB_frames_per_dest_frame(
UWord(GetIntrinsicFrameByteCount() / m8MB) * (inIsQuad?4:1) * (inIsQuadQuad?16:1));
1193 if (!_8MB_frames_per_dest_frame)
1195 if (_8MB_frames_per_dest_frame == 1)
1196 {outDestRgns = inSrcRgns;
return true;}
1199 for (
size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
1200 {
const ULWord val(inSrcRgns.at(ndx));
1201 ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF);
1202 startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
1203 lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
1204 outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
1212 bool isReading(
false), isWriting(
false);
1216 { ostringstream tag;
1217 tag <<
"Aud" <<
DEC(audSys+1);
1222 TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ?
string() : tag.str());
1234 bool isEnabled(
false), isMultiFormat(
false), isQuad(
false), isQuadQuad(
false), isSquares(
false), isTSI(
false);
1236 uint64_t addr(0), len(0);
1237 if (skipChannels.find(chan) != skipChannels.end())
1244 tag <<
"AC" <<
DEC(chan+1) << (acStatus.
IsInput() ?
" Write" :
" Read");
1245 TagMemoryBlock(addr, tmp + len - addr, tag.str());
1256 inDevice.
GetDeviceFrameInfo (
UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
1258 tag <<
"MR" <<
DEC(chan+1);
1260 tag <<
"Ch" <<
DEC(chan+1);
1262 TagMemoryBlock(addr, len, tag.str());
1268 else if (isQuad && !isQuadQuad && isTSI)
1280 if (!mIntrinsicSize)
1291 if (inStartAddr % m8MB)
1293 if (inByteLength % m8MB)
1297 const UWord startFrm(
UWord(inStartAddr / m8MB)), frmCnt(
UWord(inByteLength / m8MB));
1298 for (
UWord frm(0); frm < frmCnt; frm++)
1300 UWord frameNum(startFrm + frm);
1302 if (tags.find(inTag) == tags.end())
1305 if (frameNum >= mNumFrames)
1306 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...
std::string NTV2GetHostName(void)
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 supports 10Gbps IP (mutually exclusive with kDeviceCanDo25GIP).
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 supports 25Gbps IP. (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
static string vidfmtstr(const NTV2VideoFormat vf, const bool b)
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)
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)
const char * NTV2VideoFormatString(NTV2VideoFormat fmt)
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...