18 #if defined (AJAMac) || defined (AJALinux) 95 typedef pair <string, NTV2VideoFormat> String2VideoFormatPair;
96 typedef pair <string, NTV2FrameBufferFormat> String2PixelFormatPair;
97 typedef pair <string, NTV2AudioSystem> String2AudioSystemPair;
98 typedef pair <string, NTV2VANCMode> String2VANCModePair;
99 typedef pair <string, NTV2InputSource> String2InputSourcePair;
100 typedef pair <string, NTV2OutputDestination> String2OutputDestPair;
123 if (str.at (str.length() - 1) ==
'a')
124 str.erase (str.length() - 1);
126 if (str.find(
".00") != string::npos)
127 str.erase (str.find(
".00"), 3);
129 while (str.find(
" ") != string::npos)
130 str.erase (str.find(
" "), 1);
132 if (str.find(
".") != string::npos)
133 str.erase (str.find(
"."), 1);
228 while (str.find (
" ") != string::npos)
229 str.erase (str.find (
" "), 1);
231 while (str.find (
"-") != string::npos)
232 str.erase (str.find (
"-"), 1);
234 if (str.find (
"compatible") != string::npos)
235 str.erase (str.find (
"compatible"), 10);
237 if (str.find (
"ittle") != string::npos)
238 str.erase (str.find (
"ittle"), 5);
240 if (str.find (
"ndian") != string::npos)
241 str.erase (str.find (
"ndian"), 5);
248 if (str.find (
"NTV2_FBF_") == 0)
251 while (str.find (
" ") != string::npos)
252 str.erase (str.find (
" "), 1);
254 while (str.find (
"_") != string::npos)
255 str.erase (str.find (
"_"), 1);
300 for (uint8_t ndx (0); ndx < 8; ndx++)
378 string tpName(tpNames.at(tp));
381 ostringstream oss; oss <<
DEC(tp);
386 string colorName(*it);
393 string ULWordToString (
const ULWord inNum)
407 if (it != fTimecodes.end())
414 size_t errorCount(0);
435 size_t errorCount(0);
463 NTV2Buffer zero (fAudioBuffer.GetHostAddress(fNumAudioBytes),
464 fAudioBuffer.GetByteCount() - fNumAudioBytes);
465 zero.
Fill(uint32_t(0));
471 NTV2Buffer stale (fAncBuffer.GetHostAddress(fNumAncBytes),
472 fAncBuffer.GetByteCount() - fNumAncBytes);
473 stale.
Fill(uint8_t(0));
479 NTV2Buffer stale (fAncBuffer2.GetHostAddress(fNumAnc2Bytes),
480 fAncBuffer2.GetByteCount() - fNumAnc2Bytes);
481 stale.
Fill(uint8_t(0));
490 const string deviceSpec (inDeviceSpec.empty() ?
"0" : inDeviceSpec);
493 if (deviceSpec !=
"LIST" && deviceSpec !=
"list" && deviceSpec !=
"?")
494 cerr <<
"## ERROR: Failed to open device spec '" << deviceSpec <<
"'" << endl;
522 if (!inDevSpec.empty())
525 oss << setw(25) << left <<
"Supported Video Format" <<
"\t" << setw(16) << left <<
"Legal -v Values" << endl
526 << setw(25) << left <<
"------------------------" <<
"\t" << setw(16) << left <<
"----------------" << endl;
530 if (vfName ==
"Unknown")
534 if (vf == it->second)
538 vfNames.push_back(it->first);
540 if (!vfNames.empty())
541 oss << setw(25) << left << vfName <<
"\t" <<
aja::join(vfNames,
", ") << endl;
554 if (!inDevSpec.empty())
563 if (inStr != iter->first)
605 if (!inDevSpec.empty())
608 oss << setw(34) << left <<
"Frame Buffer Format" <<
"\t" << setw(32) << left <<
"Legal -p Values" << endl
609 << setw(34) << left <<
"----------------------------------" <<
"\t" << setw(32) << left <<
"--------------------------------" << endl;
618 if (pf == it->second)
622 pfNames.push_back(it->first);
624 if (!pfNames.empty())
625 oss << setw(35) << left << pfName <<
"\t" <<
aja::join(pfNames,
", ") << endl;
638 if (!inDevSpec.empty())
647 if (inStr != iter->first)
689 if (!inDevSpec.empty())
692 oss << setw(25) << left <<
"Input Source" <<
"\t" << setw(16) << left <<
"Legal -i Values" << endl
693 << setw(25) << left <<
"------------------------" <<
"\t" << setw(16) << left <<
"----------------" << endl;
702 if (src == it->second)
706 srcNames.push_back(it->first);
708 if (!srcNames.empty())
709 oss << setw(25) << left << srcName <<
"\t" <<
aja::join(srcNames,
", ") << endl;
722 if (!inDevSpec.empty())
731 if (inStr != iter->first)
769 if (!inDevSpec.empty())
772 oss << setw(25) << left <<
"Output Destination" <<
"\t" << setw(16) << left <<
"Legal -o Values" << endl
773 << setw(25) << left <<
"------------------------" <<
"\t" << setw(16) << left <<
"----------------" << endl;
778 if (destName.empty())
782 if (*iter == it->second)
786 destNames.push_back(it->first);
788 if (!destNames.empty())
789 oss << setw(25) << left << destName <<
"\t" <<
aja::join(destNames,
", ") << endl;
802 if (!inDevSpec.empty())
811 if (inStr != iter->first)
847 const string inDevSpec,
848 const bool inIsInputOnly)
850 const NTV2TCIndexes & tcIndexes (GetSupportedTCIndexes(inKinds));
854 if (!inDevSpec.empty())
857 oss << setw(25) << left <<
"Timecode Index" <<
"\t" << setw(16) << left <<
"Legal Values" << endl
858 << setw(25) << left <<
"------------------------" <<
"\t" << setw(16) << left <<
"----------------" << endl;
863 if (tcNdxName.empty())
867 if (tcNdx == it->second)
869 if (!inDevSpec.empty() && dev.
IsOpen())
872 tcNdxNames.push_back(it->first);
874 if (!tcNdxNames.empty())
875 oss << setw(25) << left << tcNdxName <<
"\t" <<
aja::join(tcNdxNames,
", ") << endl;
888 if (!inDevSpec.empty())
898 if (inStr != iter->first)
900 tcNdx = iter->second;
925 if (!inDeviceSpecifier.empty())
933 oss << setw(12) << left <<
"Audio System" << endl
934 << setw(12) << left <<
"------------" << endl;
935 for (
UWord ndx(0); ndx < 8; ndx++)
937 oss << setw(12) << left << (ndx+1);
938 if (!displayName.empty() && ndx >= numAudioSystems)
939 oss <<
"\t## Incompatible with " << displayName;
954 typedef map<string,string> NTV2StringMap;
959 if (keys.find(val) == keys.end())
963 NTV2StringMap legals;
964 for (NTV2StringSet::const_iterator kit(keys.begin()); kit != keys.end(); ++kit)
969 if (it->second == officialVM)
970 legalValues.push_back(it->first);
975 oss << setw(12) << left <<
"VANC Mode" <<
"\t" << setw(32) << left <<
"Legal --vanc Values " << endl
976 << setw(12) << left <<
"---------" <<
"\t" << setw(32) << left <<
"--------------------------------" << endl;
977 for (NTV2StringMap::const_iterator it(legals.begin()); it != legals.end(); ++it)
978 oss << setw(12) << left << it->first <<
"\t" << setw(32) << left << it->second << endl;
992 typedef map<string,string> NTV2StringMap;
995 if (keys.find(it->second) == keys.end())
996 keys.insert(it->second);
998 NTV2StringMap legals;
999 for (NTV2StringSet::const_iterator kit(keys.begin()); kit != keys.end(); ++kit)
1001 const string & officialPatName(*kit);
1004 if (it->second == officialPatName)
1005 legalValues.push_back(it->first);
1006 legals[officialPatName] =
aja::join(legalValues,
", ");
1010 oss << setw(25) << left <<
"Test Pattern or Color " <<
"\t" << setw(22) << left <<
"Legal --pattern Values" << endl
1011 << setw(25) << left <<
"------------------------" <<
"\t" << setw(22) << left <<
"----------------------" << endl;
1012 for (NTV2StringMap::const_iterator it(legals.begin()); it != legals.end(); ++it)
1013 oss << setw(25) << left << it->first <<
"\t" << setw(22) << left << it->second << endl;
1020 string tpName(inStr);
1029 string result(inStr);
1036 string result (inStr);
1037 while (result.find (
" ") != string::npos)
1038 result.erase (result.find (
" "), 1);
1039 while (result.find (
"00") != string::npos)
1040 result.erase (result.find (
"00"), 2);
1041 while (result.find (
".") != string::npos)
1042 result.erase (result.find (
"."), 1);
1050 #if defined (AJAMac) || defined (AJALinux) 1051 struct termios terminalStatus;
1052 ::memset (&terminalStatus, 0,
sizeof (terminalStatus));
1053 if (::tcgetattr (0, &terminalStatus) < 0)
1054 cerr <<
"tcsetattr()";
1055 terminalStatus.c_lflag &= ~uint32_t(ICANON);
1056 terminalStatus.c_lflag &= ~uint32_t(ECHO);
1057 terminalStatus.c_cc[VMIN] = 1;
1058 terminalStatus.c_cc[VTIME] = 0;
1059 if (::tcsetattr (0, TCSANOW, &terminalStatus) < 0)
1060 cerr <<
"tcsetattr ICANON";
1061 if (::read (0, &result, 1) < 0)
1062 cerr <<
"read()" << endl;
1063 terminalStatus.c_lflag |= ICANON;
1064 terminalStatus.c_lflag |= ECHO;
1065 if (::tcsetattr (0, TCSADRAIN, &terminalStatus) < 0)
1066 cerr <<
"tcsetattr ~ICANON" << endl;
1067 #elif defined (MSWindows) || defined (AJAWindows) 1068 HANDLE hdl (GetStdHandle (STD_INPUT_HANDLE));
1070 INPUT_RECORD buffer;
1071 PeekConsoleInput (hdl, &buffer, 1, &nEvents);
1074 ReadConsoleInput (hdl, &buffer, 1, &nEvents);
1075 result = char (buffer.Event.KeyEvent.wVirtualKeyCode);
1084 cout <<
"## Press Enter/Return key to exit: ";
1093 switch (inFrameRate)
1114 switch (inFrameRate)
1118 #if !defined(NTV2_DEPRECATE_16_0) 1124 case NTV2_FRAMERATE_5000: return AJA_FrameRate_5000; 1191 static struct VideoFormatPair
1195 } VideoFormatPairs[] = {
1223 for (
size_t formatNdx(0); formatNdx <
sizeof(VideoFormatPairs) /
sizeof(VideoFormatPair); formatNdx++)
1224 if (VideoFormatPairs[formatNdx].vIn == inOutVideoFormat)
1226 inOutVideoFormat = VideoFormatPairs[formatNdx].vOut;
1235 static struct VideoFormatPair
1239 } VideoFormatPairs[] = {
1267 for (
size_t formatNdx(0); formatNdx <
sizeof(VideoFormatPairs) /
sizeof(VideoFormatPair); formatNdx++)
1268 if (VideoFormatPairs[formatNdx].vIn == inOutVideoFormat)
1270 inOutVideoFormat = VideoFormatPairs[formatNdx].vOut;
1288 UWord tsiMux(firstFramestoreIndex);
1290 if (totFrameStores > totTSIMuxers)
1291 tsiMux = firstFramestoreIndex/2;
1292 else if (totFrameStores < totTSIMuxers)
1293 tsiMux = firstFramestoreIndex*2;
1294 for (
UWord num(0); num < inCount; num++)
1302 const bool isInputRGB)
1311 if (isInputRGB && !isFrameRGB)
1316 else if (!isInputRGB && isFrameRGB)
1324 return !conns.empty();
1332 const bool isInputRGB)
1334 UWord sdi(0), mux(0), csc(0), fb(0), path(0);
1343 if (isInputRGB == isFrameRGB)
1345 for (path = 0; path < 4; path++)
1356 else if (isInputRGB && !isFrameRGB)
1358 for (path = 0; path < 4; path++)
1376 for (path = 0; path < 4; path++)
1395 cerr <<
"## ERROR: Ch5678 must be for Corvid88, but no HDMI on that device" << endl;
1409 {fb = 4; sdi = fb; mux = fb / 2; csc = fb;}
1414 for (path = 0; path < 4; path++)
1432 for (path = 0; path < 4; path++)
1449 for (path = 0; path < 4; path++)
1463 for (path = 0; path < 4; path++)
1473 return !conns.empty();
1481 const bool isInputRGB)
1483 UWord fb(0), path(0);
1502 for (path = 0; path < 4; path++)
1518 else if (isQuadQuadHFR)
1537 for (path = 0; path < 4; path++)
1560 return !conns.empty();
1589 if (hwPageSizeBytes != sdkPageSizeBytes)
1592 cerr <<
"## NOTE: Page size changed from " <<
DEC(sdkPageSizeBytes/1024) <<
"K to " <<
DEC(hwPageSizeBytes/1024) <<
"K" << endl;
1594 cerr <<
"## WARNING: Failed to change page size from " <<
DEC(sdkPageSizeBytes/1024) <<
"K to " <<
DEC(hwPageSizeBytes/1024) <<
"K" << endl;
1596 return hwPageSizeBytes;
1605 { ostringstream oss;
1614 mOtherArgs.push_back(
string(pStr));
1628 typedef struct {
string fName;
NTV2VideoFormat fFormat;} FormatNameDictionary;
1629 static const FormatNameDictionary sVFmtDict[] = {
1747 cout << endl << endl;
1748 for (
unsigned ndx(0); !sVFmtDict[ndx].fName.empty(); ndx++)
1750 const string & str (sVFmtDict[ndx].fName);
1754 if (vFormat != vFormat2)
1777 AJASystemInfo::append (result,
"Anc Capture File", fAncDataFilePath.empty() ?
"---" : fAncDataFilePath);
1807 AJASystemInfo::append (result,
"Anc Playback File", fAncDataFilePath.empty() ?
"---" : fAncDataFilePath);
1835 if (fDeviceSpec2.empty())
NTV2Channel NTV2InputSourceToChannel(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2Channel value.
pair< string, string > String2TPNamePair
String2PixelFormatMap::const_iterator String2PixelFormatMapConstIter
Fractional rate of 15,000 frames per 1,001 seconds.
AJALabelValuePairs Get(const bool inCompact=(0)) const
Renders a human-readable representation of me.
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
static std::string GetTestPatternNameFromString(const std::string &inStr)
static NTV2OutputDestinations gOutputDestinations
enum _NTV2TCIndexKinds NTV2TCIndexKinds
static NTV2TCIndexSet gTCIndexesVITC1
static String2TPNamesMap gString2TPNamesMap
const FRAME_STAMP & GetFrameInfo(void) const
Returns a constant reference to my FRAME_STAMP.
static const char * GetGlobalMutexName(void)
#define NTV2_IS_ATC_VITC1_TIMECODE_INDEX(__x__)
std::set< NTV2FrameBufferFormat > NTV2FrameBufferFormatSet
A set of distinct NTV2FrameBufferFormat values.
String2VideoFormatMMap::const_iterator String2VideoFormatMMapCI
map< string, NTV2VANCMode > String2VANCModeMap
map< string, NTV2InputSource > String2InputSourceMap
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
std::set< NTV2TCIndex > NTV2TCIndexSet
A set of distinct NTV2TCIndex values.
map< string, NTV2FrameBufferFormat > String2PixelFormatMap
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
Specifies SDI input/output kinds.
std::set< NTV2TCIndex > NTV2TCIndexes
virtual bool SetAudioLoopBack(const NTV2AudioLoopBack inMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Enables or disables NTV2AudioLoopBack mode for the given NTV2AudioSystem.
static NTV2TCIndexSet gTCIndexesAnalog
static NTV2VideoFormatSet GetSupportedVideoFormats(const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD)
This identifies the invalid (unspecified, uninitialized) VANC mode.
static NTV2AudioSystem GetAudioSystemFromString(const std::string &inStr)
Returns the NTV2AudioSystem that matches the given string.
bool WithCustomAnc(void) const
bool CanDoPixelFormat(const NTV2PixelFormat inPF)
Same as DeviceCapabilities::CanDoFrameBufferFormat.
I interrogate and control an AJA video/audio capture/playout device.
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
#define NTV2_IS_ATC_LTC_TIMECODE_INDEX(__x__)
10-Bit 4:2:2 2-Plane YCbCr
NTV2OutputDestination
Identifies a specific video output destination.
#define NTV2_IS_QUAD_QUAD_HFR_VIDEO_FORMAT(__f__)
ULWord GetCapturedAudioByteCount(void) const
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
static bool SetDefaultPageSize(const size_t inNewSize)
Changes the default page size for use in future page-aligned allocations.
Identifies the 1st HDMI video input.
Fractional rate of 120,000 frames per 1,001 seconds.
NTV2StringList::const_iterator NTV2StringListConstIter
#define NTV2_IS_FBF_PLANAR(__s__)
ULWord GetIndexForNTV2Channel(const NTV2Channel inChannel)
Declares the NTV2TestPatternGen class.
static bool GetInputRouting8K(NTV2XptConnections &outConnections, const CaptureConfig &inConfig, const NTV2VideoFormat inVidFormat, const NTV2DeviceID inDevID=DEVICE_ID_INVALID, const bool isInputRGB=(0))
Answers with the crosspoint connections needed to implement the given 8K/UHD2 capture configuration...
static NTV2ChannelList GetTSIMuxesForFrameStore(CNTV2Card &inDevice, const NTV2Channel in1stFrameStore, const UWord inCount)
See 10-Bit Raw YCbCr (CION).
static NTV2VideoFormat GetVideoFormatFromString(const std::string &inStr, const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD, const std::string &inDevSpec=std::string())
Returns the NTV2VideoFormat that matches the given string.
NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value.
NTV2InputSource NTV2ChannelToInputSource(const NTV2Channel inChannel, const NTV2IOKinds inKinds=NTV2_IOKINDS_SDI)
multimap< string, NTV2VideoFormat > String2VideoFormatMMap
static std::string GetInputSourceStrings(const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL, const std::string inDevSpec=std::string())
static void WaitForEnterKeyPress(void)
Prompts the user (via stdout) to press the Return or Enter key, then waits for it to happen...
See Alternate 8-Bit YCbCr ('YUY2').
See 10-Bit YCbCr - DPX Format.
std::vector< AJALabelValuePair > AJALabelValuePairs
An ordered sequence of label/value pairs.
bool WithAudio(void) const
#define NTV2_IS_4K_VIDEO_FORMAT(__f__)
See 3-Plane 10-Bit YCbCr 4:2:2 ('I422_10LE' a.k.a. 'YUV-P-L10').
Specifies HDMI input/output kinds.
LWord64 acFrameTime
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
NTV2OutputXptID GetTSIMuxOutputXptFromChannel(const NTV2Channel inTSIMuxer, const bool inLinkB=false, const bool inIsRGB=false)
static std::string GetPixelFormatStrings(const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL, const std::string inDevSpec=std::string())
Obtain audio samples from the audio that's embedded in the video HANC.
NTV2InputXptID GetDLInInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB=false)
String2VANCModeMap::const_iterator String2VANCModeMapConstIter
Specifies any/all input/output kinds.
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel) ...
static NTV2OutputDestinations gOutputDestsHDMI
See 3-Plane 8-Bit YCbCr 4:2:0 ('I420' a.k.a. 'YUV-P420').
static NTV2VideoFormatSet gSDHDFormats
virtual bool SetAudioRate(const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the NTV2AudioRate for the given Audio System.
Fractional rate of 60,000 frames per 1,001 seconds.
static std::string GetTestPatternStrings(void)
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2Connection
This links an NTV2InputXptID and an NTV2OutputXptID.
static String2InputSourceMap gString2InputSourceMap
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
map< string, NTV2TCIndex > String2TCIndexMap
virtual class DeviceCapabilities & features(void)
bool CanDoInputSource(const NTV2InputSource inSrc)
AJALabelValuePairs Get(const bool inCompact=(0)) const
Renders a human-readable representation of me.
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
static String2TCIndexMap gString2TCIndexMap
static NTV2VideoFormatSet gAllFormats
#define NTV2_ASSERT(_expr_)
String2InputSourceMap::const_iterator String2InputSourceMapConstIter
See 3-Plane 8-Bit YCbCr 4:2:2 (Weitek 'Y42B' a.k.a. 'YUV-P8').
Represents an unknown or invalid frame rate.
This struct replaces the old RP188_STRUCT.
poptContext poptGetContext(const char *name, int argc, const char **argv, const struct poptOption *options, unsigned int flags)
#define NTV2_IS_ANALOG_TIMECODE_INDEX(__x__)
NTV2Channel fInputChannel
The device channel to use.
unsigned long stoul(const std::string &str, std::size_t *idx, int base)
UWord GetNumAudioSystems(void)
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
bool Fill(const T &inValue)
Fills me with the given scalar value.
static NTV2StringList gTestPatternNames
Fractional rate of 48,000 frames per 1,001 seconds.
virtual bool SetAudioSystemInputSource(const NTV2AudioSystem inAudioSystem, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedInput)
Sets the audio source for the given NTV2AudioSystem on the device.
std::string NTV2InputSourceToString(const NTV2InputSource inValue, const bool inForRetailDisplay=false)
NTV2OutputXptID GetInputSourceOutputXpt(const NTV2InputSource inInputSource, const bool inIsSDI_DS2=false, const bool inIsHDMI_RGB=false, const UWord inHDMI_Quadrant=0)
static AJA_PixelFormat GetAJAPixelFormat(const NTV2PixelFormat inFormat)
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
NTV2FrameRate
Identifies a particular video frame rate.
UWord GetNumTSIMuxers(void)
8-Bit 4:2:2 2-Plane YCbCr
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
bool CanDoOutputDestination(const NTV2OutputDestination inDest)
This class is used to configure an NTV2Capture instance.
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
static NTV2TCIndexSet gTCIndexesVITC2
virtual bool DMABufferUnlock(const NTV2Buffer &inBuffer)
Unlocks the given host buffer that was previously locked using CNTV2Card::DMABufferLock.
virtual bool IsOpen(void) const
static NTV2PixelFormats GetSupportedPixelFormats(const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL)
std::string to_string(bool val)
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
static bool GetFirstDeviceFromArgument(const std::string &inArgument, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the AJA device that matches a command li...
std::set< std::string > NTV2StringSet
String2AudioSystemMap::const_iterator String2AudioSystemMapConstIter
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
static std::string GetVideoFormatStrings(const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD, const std::string inDevSpec=std::string())
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
static NTV2FrameBufferFormatSet gFBFsAlpha
Specifies analog input/output kinds.
virtual bool DMABufferLock(const NTV2Buffer &inBuffer, bool inMap=(0), bool inRDMA=(0))
Page-locks the given host buffer to reduce transfer time and CPU usage of DMA transfers.
static NTV2StringList getColorNames(void)
const char * poptBadOption(poptContext con, unsigned int flags)
map< string, string > String2TPNamesMap
virtual std::string GetDisplayName(void)
Answers with this device's display name.
#define NTV2_IS_FBF_RGB(__fbf__)
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
static String2VANCModeMap gString2VANCModeMap
static NTV2VideoFormatSet g8KFormats
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
String2TPNamesMap::const_iterator String2TPNamesMapConstIter
bool SetCapturedFrameInfo(const AUTOCIRCULATE_TRANSFER &inXferInfo, const AUTOCIRCULATE_STATUS &acStatus)
bool LockAll(CNTV2Card &inDevice)
static NTV2TCIndex GetTCIndexFromString(const std::string &inStr, const NTV2TCIndexKinds inKinds=TC_INDEXES_ALL, const std::string inDevSpec=std::string())
Returns the NTV2TCIndex that matches the given string.
static String2OutputDestMap gString2OutputDestMap
NTV2InputXptID GetFrameStoreInputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsBInput=false)
static NTV2OutputDestination GetOutputDestinationFromString(const std::string &inStr, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL, const std::string inDevSpec=std::string())
Returns the NTV2OutputDestination that matches the given string.
std::string NTV2VANCModeToString(const NTV2VANCMode inValue, const bool inCompactDisplay=false)
static std::string ToLower(const std::string &inStr)
Returns the given string after converting it to lower case.
static size_t DefaultPageSize(void)
bool CanDoOutputTCIndex(const NTV2TCIndex inTCNdx)
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
See 8-Bit ARGB, RGBA, ABGR Formats.
See 8-Bit ARGB, RGBA, ABGR Formats.
static NTV2VANCMode GetVANCModeFromString(const std::string &inStr)
Embeds silence (zeroes) into the data stream.
static bool Get8KInputFormat(NTV2VideoFormat &inOutVideoFormat)
Given a video format, if all 4 inputs are the same and promotable to 8K, this function does the promo...
static NTV2VideoFormatSet g4KFormats
static String2VideoFormatMMap gString2VideoFormatMMap
pair< string, NTV2TCIndex > String2TCIndexPair
bool WithRP188(void) const
static String2PixelFormatMap gString2PixelFormatMap
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
static NTV2TCIndexSet gTCIndexesSDI
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
See 3-Plane 10-Bit YCbCr 4:2:0 ('I420_10LE' a.k.a. 'YUV-P420-L10').
NTV2OutputXptID GetDLInOutputXptFromChannel(const NTV2Channel inDLInput)
UWord GetNumFrameStores(void)
Declares the CNTV2DeviceScanner class.
static NTV2FrameBufferFormatSet gFBFsPacked
ULWord NTV2PixelFormatKinds
static NTV2OutputDestinations gOutputDestsAnalog
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
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.).
static NTV2TestPatternNames getTestPatternNames(void)
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.
Fractional rate of 30,000 frames per 1,001 seconds.
10-Bit 4:2:0 2-Plane YCbCr
NTV2InputSource
Identifies a specific video input source.
NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter
A handy const iterator for iterating over an NTV2InputSourceSet.
bool IsRGBFormat(const NTV2FrameBufferFormat format)
static NTV2InputSourceSet gInputSourcesSDI
static char ReadCharacterPress(void)
Returns the character that represents the last key that was pressed on the keyboard without waiting f...
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
bool NTV2DeviceCanDo12gRouting(const NTV2DeviceID inDeviceID)
std::string & strip(std::string &str, const std::string &ws)
virtual bool SetAudioBufferSize(const NTV2AudioBufferSize inValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Changes the size of the audio buffer that is used for a given Audio System in the AJA device...
NTV2InputSource fInputSource
The device input connector to use.
static AJALabelValuePairs & append(AJALabelValuePairs &inOutTable, const std::string &inLabel, const std::string &inValue=std::string())
A convenience function that appends the given label and value strings to the provided AJALabelValuePa...
static size_t HostPageSize(void)
static NTV2OutputDestinations gOutputDestsSDI
NTV2InputXptID GetTSIMuxInputXptFromChannel(const NTV2Channel inTSIMuxer, const bool inLinkB=false)
map< string, NTV2OutputDestination > String2OutputDestMap
static std::string GetAudioSystemStrings(const std::string inDeviceSpecifier=std::string())
Declares numerous NTV2 utility functions.
static NTV2TCIndexSet gTCIndexesHDMI
static NTV2FrameBufferFormatSet gFBFsRGB
bool CanDoInputTCIndex(const NTV2TCIndex inTCNdx)
static NTV2TCIndexSet gTCIndexesATCLTC
static NTV2FrameBufferFormatSet gPixelFormats
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Intended for capture, answers with the timecodes captured in my acTransferStatus member's acFrameStam...
static bool Get4KInputFormat(NTV2VideoFormat &inOutVideoFormat)
Given a video format, if all 4 inputs are the same and promotable to 4K, this function does the promo...
See 8-Bit ARGB, RGBA, ABGR Formats.
#define NTV2_IS_QUAD_QUAD_FORMAT(__f__)
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
static const NTV2InputSourceSet GetSupportedInputSources(const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
bool UnlockAll(CNTV2Card &inDevice)
static NTV2InputSourceSet gInputSources
Specifies channel or FrameStore 1 (or the first item).
static bool GetInputRouting4K(NTV2XptConnections &outConnections, const CaptureConfig &inConfig, const NTV2DeviceID inDevID=DEVICE_ID_INVALID, const bool isInputRGB=(0))
Answers with the crosspoint connections needed to implement the given 4K/UHD capture configuration...
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
static NTV2InputSource GetInputSourceFromString(const std::string &inStr, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL, const std::string inDevSpec=std::string())
Returns the NTV2InputSource that matches the given string.
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.
NTV2Channel GetChannel(void) const
NTV2VANCMode
These enum values identify the available VANC modes.
NTV2PixelFormat fPixelFormat
Pixel format to use.
static bool GetInputRouting(NTV2XptConnections &outConnections, const CaptureConfig &inConfig, const bool isInputRGB=(0))
Answers with the crosspoint connections needed to implement the given capture configuration.
static String2AudioSystemMap gString2AudioSystemMap
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
static AJA_FrameRate GetAJAFrameRate(const NTV2FrameRate inFrameRate)
static bool IsValidDevice(const std::string &inDeviceSpec)
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
ULWord NTV2VideoFormatKinds
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
String2TCIndexMap::const_iterator String2TCIndexMapConstIter
String2OutputDestMap::const_iterator String2OutputDestMapConstIter
NTV2InputSource NTV2TimecodeIndexToInputSource(const NTV2TCIndex inTCIndex)
Converts the given NTV2TCIndex value into the appropriate NTV2InputSource value.
enum NTV2OutputDestination NTV2OutputDest
static NTV2TCIndexSet gTCIndexes
enum NTV2InputCrosspointID NTV2InputXptID
This file contains some structures, constants, classes and functions that are used in some of the dem...
const char * poptGetArg(poptContext con)
std::ostream & operator<<(std::ostream &ioStrm, const CaptureConfig &inObj)
Private include file for all ajabase sources.
poptContext poptFreeContext(poptContext con)
Configures an NTV2Player instance.
See 10-Bit RGB - DPX Format.
static bool ConfigureAudioSystems(CNTV2Card &inDevice, const CaptureConfig &inConfig, const NTV2AudioSystemSet inAudioSystems)
Configures capture audio systems.
static std::string GetVANCModeStrings(void)
static const NTV2TCIndexes GetSupportedTCIndexes(const NTV2TCIndexKinds inKinds)
#define NTV2_IS_VALID_VIDEO_FORMAT(__f__)
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
AJALabelValuePairs Get(const bool inCompact=(0)) const
std::string join(const std::vector< std::string > &parts, const std::string &delim)
#define NTV2_FBF_HAS_ALPHA(__fbf__)
int poptGetNextOpt(poptContext con)
NTV2_RP188 Timecode(const NTV2TCIndex inTCNdx) const
static std::string StripFormatString(const std::string &inStr)
static size_t SetDefaultPageSize(void)
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
ULWord64 acAudioClockTimeStamp
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
std::map< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnections
NTV2OutputXptID GetSDIInputOutputXptFromChannel(const NTV2Channel inSDIInput, const bool inIsDS2=false)
Popt(const int inArgc, const char **pArgs, const PoptOpts *pInOptionsTable)
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
ULWord GetCapturedAncByteCount(const bool inField2=false) const
std::vector< std::string > NTV2StringList
UWord GetMaxAudioChannels(void)
static const string gGlobalMutexName("com.aja.ntv2.mutex.demo")
bool CanDoVideoFormat(const NTV2VideoFormat inVF)
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
map< string, NTV2AudioSystem > String2AudioSystemMap
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
std::string & lower(std::string &str)
static NTV2InputSourceSet gInputSourcesHDMI
8-Bit 4:2:0 2-Plane YCbCr
Identifies the 1st SDI video input.
std::string & replace(std::string &str, const std::string &from, const std::string &to)
static std::string GetOutputDestinationStrings(const NTV2IOKinds inKinds, const std::string inDevSpec=std::string())
static NTV2FrameBufferFormatSet gFBFsPlanar
const char * poptStrerror(const int error)
static NTV2FrameBufferFormatSet gFBFsProRes
virtual bool SetNumberAudioChannels(const ULWord inNumChannels, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the number of audio channels to be concurrently captured or played for a given Audio System on t...
const char * NTV2VideoFormatString(NTV2VideoFormat fmt)
virtual void ToString(std::string &outAllLabelsAndValues) const
Answers with a multi-line string that contains the complete host system info table.
static const DemoCommonInitializer gInitializer
enum NTV2OutputCrosspointID NTV2OutputXptID
static NTV2InputSourceSet gInputSourcesAnalog
Declares device capability functions.
static NTV2PixelFormat GetPixelFormatFromString(const std::string &inStr, const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL, const std::string inDevSpec=std::string())
Returns the NTV2PixelFormat that matches the given string.
static NTV2FrameBufferFormatSet gFBFsRaw
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inCSC, const bool inIsKey=false, const bool inIsRGB=false)
This identifies the mode in which there are no VANC lines in the frame buffer.
static std::string GetTCIndexStrings(const NTV2TCIndexKinds inKinds=TC_INDEXES_ALL, const std::string inDeviceSpecifier=std::string(), const bool inIsInputOnly=(!(0)))
Fractional rate of 24,000 frames per 1,001 seconds.
#define NTV2_FBF_IS_RAW(__fbf__)
#define NTV2_IS_FBF_PRORES(__fbf__)
bool fDoTSIRouting
If true, do TSI routing; otherwise squares.
static const NTV2OutputDestinations GetSupportedOutputDestinations(const NTV2IOKinds inKinds)
NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter
A handy const iterator for iterating over an NTV2FrameBufferFormatSet.
NTV2TestPatternSelect
Identifies a predefined NTV2 test pattern.