 |
AJA NTV2 SDK
17.6.0.2675
NTV2 SDK 17.6.0.2675
|
Go to the documentation of this file.
31 int main (
int argc,
const char ** argv)
35 int constLuminance (0);
45 {
"device",
'd',
POPT_ARG_STRING, &pDeviceSpec, 0,
"device to use",
"index#, serial#, or model"},
46 {
"eotf",
'e',
POPT_ARG_INT, &eotf, 0,
"0=TradGammaSDR 1=TradGammaHDR 2=ST2084 3=HLG",
"EOTF to use"},
57 {cerr <<
"## ERROR: " << popt.
errorStr() << endl;
return 1;}
59 {cout <<
"NTV2HDRSetup, NTV2 SDK " <<
::NTV2Version() << endl;
return 0;}
61 if ((eotf < 0) || (eotf > 3))
62 {cerr <<
"## ERROR: Bad EOTF value '" <<
DEC(eotf) <<
"' -- expected 0, 1, 2 or 3" << endl;
return 2;}
67 {cerr <<
"## ERROR: Device '" << pDeviceSpec <<
"' not found" << endl;
return 3;}
70 {cerr <<
"## ERROR: Device '" << pDeviceSpec <<
"' not ready" << endl;
return 4;}
72 if (!device.
features().CanDoHDMIHDROut())
73 {cerr <<
"## ERROR: Device '" << pDeviceSpec <<
"' does not support HDMI HDR" << endl;
return 5;}
83 cerr <<
"## ERROR: Unable to acquire device because another app (pid " <<
appPID <<
") owns it" << endl;
90 static const string sEOTFs[] = {
"Traditional Gamma SDR",
"Traditional Gamma HDR",
"ST-2084",
"HLG",
""};
91 cout <<
"## NOTE: Options specified:" << endl
92 <<
"\tEOTF: " <<
DEC(eotf) <<
" (" << sEOTFs[eotf] <<
")" << endl
93 <<
"\tLuminance: " << (constLuminance ?
"Constant" :
"Non-Constant") << endl
94 <<
"\tDolbyVision: " << (dolbyVision ?
"Enabled" :
"Disabled") << endl;
96 cout <<
"## WARNING: --nohdr option will disable HDMI HDR output" << endl;
#define NTV2_FOURCC(_a_, _b_, _c_, _d_)
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...
virtual bool SetHDMIHDRConstantLuminance(const bool inEnableConstantLuminance, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Enables or disables BT.2020 Y'cC'bcC'rc versus BT.2020 Y'C'bC'r or R'G'B'.
virtual bool ReleaseStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Releases exclusive use of the AJA device for the given process, permitting other processes to acquire...
int main(int argc, const char **argv)
const uint32_t kAppSignature(((((uint32_t)( 'H'))<< 24)|(((uint32_t)( 'd'))<< 16)|(((uint32_t)( 'r'))<< 8)|(((uint32_t)( 's'))<< 0)))
Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal devel...
virtual class DeviceCapabilities & features(void)
Declares the AJAProcess class.
Declares the CNTV2DeviceScanner class.
virtual bool GetStreamingApplication(ULWord &outAppType, int32_t &outProcessID)
Answers with the four-CC type and process ID of the application that currently "owns" the AJA device ...
Declares the CNTV2Card class.
virtual const std::string & errorStr(void) const
std::string NTV2Version(const bool inDetailed=false)
I interrogate and control an AJA video/audio capture/playout device.
static void WaitForEnterKeyPress(void)
Prompts the user (via stdout) to press the Return or Enter key, then waits for it to happen.
virtual bool IsDeviceReady(const bool inCheckValid=(0))
virtual bool SetEveryFrameServices(const NTV2EveryFrameTaskMode inMode)
Sets the device's task mode.
static AJAStatus Open(bool incrementRefCount=false)
virtual bool SetHDMIHDRElectroOpticalTransferFunction(const uint8_t inEOTFByte, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
virtual bool SetHDRData(const HDRFloatValues &inFloatValues, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
virtual bool EnableHDMIHDR(const bool inEnableHDMIHDR, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Enables or disables HDMI HDR.
This file contains some structures, constants, classes and functions that are used in some of the dem...
virtual bool AcquireStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Reserves exclusive use of the AJA device for a given process, preventing other processes on the host ...
NTV2EveryFrameTaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
virtual bool GetEveryFrameServices(NTV2EveryFrameTaskMode &outMode)
Retrieves the device's current "retail service" task mode.
HDRRegValues & setBT2020(void)
defined(NTV2_DEPRECATE_17_6)
virtual bool EnableHDMIHDRDolbyVision(const bool inEnable, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Enables or disables HDMI HDR Dolby Vision.
uint8_t electroOpticalTransferFunction
@ NTV2_OEM_TASKS
2: OEM (recommended): device configured by client application(s) with some driver involvement.