|
AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
Go to the documentation of this file.
28 int main (
int argc,
const char ** argv)
34 int channelNumber (1);
35 int doMultiFormat (0);
37 int numAudioLinks (1);
48 {
"device",
'd',
POPT_ARG_STRING, &pDeviceSpec, 0,
"device to use",
"index#, serial#, or model" },
49 {
"channel",
'c',
POPT_ARG_INT, &channelNumber, 0,
"channel to use",
"1-8" },
51 {
"pixelFormat",
'p',
POPT_ARG_STRING, &pPixelFormat, 0,
"pixel format to use",
"'?' or 'list' to list" },
52 {
"frames", 0,
POPT_ARG_STRING, &pFramesSpec, 0,
"frames to AutoCirculate",
"num[@min] or min-max" },
53 {
"videoFormat",
'v',
POPT_ARG_STRING, &pVideoFormat, 0,
"video format to produce",
"'?' or 'list' to list" },
54 {
"audioLinks",
'a',
POPT_ARG_INT, &numAudioLinks, 0,
"# audio systems to link",
"1-4 0=silence" },
64 {cerr <<
"## ERROR: " << popt.
errorStr() << endl;
return 2;}
66 {cout << argv[0] <<
", NTV2 SDK " <<
::NTV2Version() << endl;
return 0;}
69 const string deviceSpec (pDeviceSpec ? pDeviceSpec :
"0");
76 if ((channelNumber < 1) || (channelNumber > 8))
77 {cerr <<
"## ERROR: Invalid channel number " << channelNumber <<
" -- expected 1 thru 8" << endl;
return 1;}
81 const string videoFormatStr (pVideoFormat ? pVideoFormat :
"");
84 if (videoFormatStr ==
"?" || videoFormatStr ==
"list")
87 { cerr <<
"## ERROR: Invalid '--videoFormat' value '" << videoFormatStr <<
"' -- expected values:" << endl
93 const string pixelFormatStr (pPixelFormat ? pPixelFormat :
"");
95 if (pixelFormatStr ==
"?" || pixelFormatStr ==
"list")
99 cerr <<
"## ERROR: Invalid '--pixelFormat' value '" << pixelFormatStr <<
"' -- expected values:" << endl
105 static const string legalFramesSpec (
"{frameCount}[@{firstFrameNum}] or {firstFrameNum}-{lastFrameNum}");
106 const string framesSpec (pFramesSpec ? pFramesSpec :
"");
107 if (!framesSpec.empty())
110 if (!parseResult.empty())
111 {cerr <<
"## ERROR: Bad 'frames' spec '" << framesSpec <<
"'\n## " << parseResult << endl;
return 1;}
114 {cerr <<
"## ERROR: Bad 'frames' spec '" << framesSpec <<
"'\n## Expected " << legalFramesSpec << endl;
return 1;}
128 {cout <<
"## ERROR: Initialization failed: " <<
::AJAStatusToString(status) << endl;
return 1;}
139 cout <<
" Frames Frames Buffer" << endl
140 <<
" Played Dropped Level" << endl;
static std::string GetVideoFormatStrings(const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_NON_4KUHD, const std::string inDeviceSpecifier=std::string())
bool fDoHDMIOutput
If true, enable HDMI output; otherwise, disable HDMI output.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
void SignalHandler(int inSignal)
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
ULWord GetProcessedFrameCount(void) const
ULWord GetBufferLevel(void) const
int main(int argc, const char **argv)
bool fDoMultiFormat
If true, enable device-sharing; otherwise take exclusive control of device.
std::string setFromString(const std::string &inStr)
bool fDoLinkGrouping
If true, enables 6/12G output mode on IoX3/Kona5 (4K/8K)
static NTV2VideoFormat GetVideoFormatFromString(const std::string &inStr, const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_NON_4KUHD)
Returns the NTV2VideoFormat that matches the given string.
#define NTV2_IS_4K_VIDEO_FORMAT(__f__)
bool fDoTsiRouting
If true, enable TSI routing; otherwise route for square division (4K/8K)
I am an object that can play out a 4K or UHD test pattern (with timecode) to an output of an AJA devi...
static bool IsValidDevice(const std::string &inDeviceSpec)
NTV2ACFrameRange fFrames
AutoCirculate frame count or range.
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
static NTV2FrameBufferFormat GetPixelFormatFromString(const std::string &inStr)
Returns the NTV2FrameBufferFormat that matches the given string.
UWord fNumAudioLinks
The number of audio systems to control for multi-link audio (4K/8K)
NTV2VideoFormat fVideoFormat
The video format to use.
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
NTV2Channel fOutputChannel
The device channel to use.
static bool gGlobalQuit((0))
virtual const std::string & errorStr(void) const
std::string NTV2Version(const bool inDetailed=false)
virtual AJAStatus Run(void)
Runs me.
static AJAStatus Open(bool incrementRefCount=false)
bool fDoRGBOnWire
If true, produce RGB on the wire; otherwise output YUV.
std::string AJAStatusToString(const AJAStatus inStatus, const bool inDetailed)
ULWord GetDroppedFrameCount(void) const
Header file for NTV2Player4K demonstration class.
@ NTV2_FORMAT_4x1920x1080p_2398
static std::string GetPixelFormatStrings(const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL, const std::string inDeviceSpecifier=std::string())
Configures an NTV2Player instance.
NTV2PixelFormat fPixelFormat
The pixel format to use.
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
#define AJA_FAILURE(_status_)
virtual void GetACStatus(AUTOCIRCULATE_STATUS &outStatus)
Provides status information about my output (playout) process.