|
AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
Go to the documentation of this file.
27 int main (
int argc,
const char ** argv)
31 int channelNumber (1);
32 int doMultiFormat (0);
34 int doQuadRouting (0);
41 {
"device",
'd',
POPT_ARG_STRING, &pDeviceSpec, 0,
"device to use",
"index#, serial#, or model" },
42 {
"channel",
'c',
POPT_ARG_INT, &channelNumber, 0,
"channel to use",
"1-8" },
44 {
"pixelFormat",
'p',
POPT_ARG_STRING, &pPixelFormat, 0,
"pixel format to use",
"'?' or 'list' to list" },
51 {cerr <<
"## ERROR: " << popt.
errorStr() << endl;
return 2;}
53 {cout << argv[0] <<
", NTV2 SDK " <<
::NTV2Version() << endl;
return 0;}
56 const string deviceSpec (pDeviceSpec ? pDeviceSpec :
"0");
63 if ((channelNumber < 1) || (channelNumber > 8))
64 {cerr <<
"## ERROR: Invalid channel number " << channelNumber <<
" -- expected 1 thru 8" << endl;
return 1;}
68 const string pixelFormatStr (pPixelFormat ? pPixelFormat :
"");
70 if (pixelFormatStr ==
"?" || pixelFormatStr ==
"list")
74 cerr <<
"## ERROR: Invalid '--pixelFormat' value '" << pixelFormatStr <<
"' -- expected values:" << endl
87 {cout <<
"## ERROR: Initialization failed: " <<
::AJAStatusToString(status) << endl;
return 1;}
98 cout <<
" Frames Frames Buffer" << endl
99 <<
" Captured Dropped Level" << endl;
102 ULWord framesProcessed, framesDropped, bufferLevel;
103 capturer.
GetACStatus (framesProcessed, framesDropped, bufferLevel);
104 cout << setw(9) << framesProcessed << setw(9) << framesDropped << setw(9) << bufferLevel <<
"\r" << flush;
bool fDoMultiFormat
If true, use multi-format/multi-channel mode, if device supports it; otherwise normal mode.
virtual void GetACStatus(ULWord &outGoodFrames, ULWord &outDroppedFrames, ULWord &outBufferLevel)
Provides status information about my input (capture) process.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
static bool gGlobalQuit((0))
static void SignalHandler(int inSignal)
NTV2PixelFormat fPixelFormat
Pixel format to use.
int main(int argc, const char **argv)
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
bool fWithAnc
If true, also capture Anc.
Declares the NTV2Capture class.
static bool IsValidDevice(const std::string &inDeviceSpec)
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
This class is used to configure an NTV2Capture instance.
static NTV2FrameBufferFormat GetPixelFormatFromString(const std::string &inStr)
Returns the NTV2FrameBufferFormat that matches the given string.
Instances of me capture frames in real time from a video signal provided to an input of an AJA device...
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
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)
NTV2Channel fInputChannel
The device channel to use.
bool fDoTSIRouting
If true, do TSI routing; otherwise squares.
std::string AJAStatusToString(const AJAStatus inStatus, const bool inDetailed)
static std::string GetPixelFormatStrings(const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL, const std::string inDeviceSpecifier=std::string())
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
#define AJA_FAILURE(_status_)