|
AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
Go to the documentation of this file.
114 cout <<
"M31 Presets" << endl;
118 if (!presetStr.empty())
119 cout << ndx <<
": " << presetStr << endl;
126 cout <<
"M31 Formats" << endl;
130 if (!pixFormatStr.empty())
131 cout << ndx <<
": " << pixFormatStr << endl;
142 int main (
int argc,
const char ** argv)
149 uint32_t channelNumber (1);
160 {
"device",
'd',
POPT_ARG_STRING, &pDeviceSpec, 0,
"device to use",
"index#, serial#, or model"},
161 {
"channel",
'c',
POPT_ARG_INT, &channelNumber, 0,
"channel to use",
"1-4"},
162 {
"format",
'f',
POPT_ARG_INT, &codecFormat, 0,
"format to use",
"use '-lf' for list"},
163 {
"preset",
'p',
POPT_ARG_INT, &codecPreset, 0,
"codec preset to use",
"use '-lp' for list"},
164 {
"list",
'l',
POPT_ARG_STRING, &pWhatToList, 0,
"list options",
"p or f (presets or formats)"},
165 {
"info",
'i',
POPT_ARG_NONE, &infoData, 0,
"write encoded info file",
""},
175 if (pWhatToList &&
string(pWhatToList) ==
"p")
177 else if (pWhatToList &&
string(pWhatToList) ==
"f")
179 else if (pWhatToList)
180 {cerr <<
"## ERROR: Invalid argument to --list option, expected 'p' or 'f'" << endl;
return 2;}
183 {cerr <<
"## ERROR: Invalid M31 format " << codecFormat <<
" -- expected 0 thru " << (
gNumCodecFormats) << endl;
return 2;}
186 {cerr <<
"## ERROR: Invalid M31 preset " << codecPreset <<
" -- expected 0 thru " << (
gNumCodecPresets) << endl;
return 2;}
193 {cerr <<
"## ERROR: Invalid channel number " << channelNumber <<
" -- expected 1 thru 4" << endl;
return 2;}
202 NTV2EncodeHEVCFile hevcFileEncoder (pDeviceSpec ?
string (pDeviceSpec) :
"0", inputChannel,
207 {cerr <<
"## ERROR: Initialization failed" << endl;
return 1;}
214 hevcFileEncoder.
Run();
216 cout <<
" Capture Capture" << endl
217 <<
" Frames Frames Buffer" << endl
218 <<
"Processed Dropped Level" << endl;
234 hevcFileEncoder.
Quit();
@ M31_FILE_3840X2160_420_8_5994p
@ M31_FILE_1280X720_420_8_60p
@ M31_FILE_1920X1080_422_10_24p
@ M31_FILE_1920X1080_420_8_50i
Declares the NTV2EncodeHEVCFile class.
@ M31_FILE_2048X1080_422_10_50p
NTV2Channel GetNTV2ChannelForIndex(const ULWord inIndex0)
@ NTV2_FBF_10BIT_YCBCR_420PL2
10-Bit 4:2:0 2-Plane YCbCr
@ M31_FILE_3840X2160_420_8_60p
@ M31_FILE_3840X2160_420_8_50p
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
@ M31_FILE_3840X2160_420_8_2997p
@ M31_FILE_1920X1080_422_10_2398p
@ M31_FILE_1920X1080_422_10_60p
@ M31_FILE_3840X2160_422_8_5994p
@ M31_FILE_3840X2160_422_10_5994p
@ M31_FILE_2048X1080_422_10_5994p
virtual void GetStatus(AVHevcStatus &outStatus)
Provides status information about my input (capture) process.
Declares the AJATime class.
virtual AJAStatus Run(void)
Runs me.
void SignalHandler(int inSignal)
@ M31_FILE_3840X2160_420_8_30p
@ M31_FILE_1920X1080_420_8_25p
static bool gGlobalQuit((0))
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
int main(int argc, const char **argv)
@ M31_FILE_2048X1080_420_8_60p
Instances of me capture frames in real time from a video signal provided to an input of an AJA device...
Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal devel...
@ M31_FILE_1920X1080_420_8_2398p
@ M31_FILE_3840X2160_420_10_60p
@ M31_FILE_2048X1080_420_8_25p
@ M31_FILE_1920X1080_422_10_50i
@ NTV2_CHANNEL4
Specifies channel or Frame Store 4 (or the 4th item).
@ M31_FILE_3840X2160_422_10_25p
@ M31_FILE_3840X2160_422_10_30p
@ NTV2_FBF_8BIT_YCBCR_420PL2
8-Bit 4:2:0 2-Plane YCbCr
@ M31_FILE_3840X2160_420_8_24p
@ M31_FILE_3840X2160_422_10_2398p
@ M31_FILE_1920X1080_420_8_60p
static const size_t gNumCodecPresets(sizeof(kCodecPreset)/sizeof(M31VideoPreset))
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
@ M31_FILE_2048X1080_422_10_60p
@ M31_FILE_1280X720_422_10_5994p
@ M31_FILE_1920X1080_420_8_5994p
@ M31_FILE_1920X1080_422_10_30p
std::string NTV2M31VideoPresetToString(const M31VideoPreset inValue, const bool inForRetailDisplay=false)
@ M31_FILE_1920X1080_420_8_30p
@ M31_FILE_3840X2160_420_10_50p
Declares structs used for the Corvid HEVC.
Declares numerous NTV2 utility functions.
poptContext poptFreeContext(poptContext con)
@ M31_FILE_1920X1080_422_10_25p
const M31VideoPreset kCodecPreset[]
@ M31_FILE_3840X2160_422_10_50p
@ M31_FILE_3840X2160_420_8_2398p
@ M31_FILE_3840X2160_422_8_60p
@ M31_FILE_1280X720_420_8_5994p
@ NTV2_FBF_10BIT_YCBCR_422PL2
10-Bit 4:2:2 2-Plane YCbCr
@ M31_FILE_1920X1080_420_8_2997p
@ M31_FILE_2048X1080_420_8_50p
@ M31_FILE_3840X2160_422_8_50p
virtual M31VideoPreset GetCodecPreset(void)
Get the codec preset.
@ M31_FILE_2048X1080_420_8_2398p
static const size_t gNumCodecFormats(sizeof(kCodecFormat)/sizeof(NTV2FrameBufferFormat))
static AJAStatus Open(bool incrementRefCount=false)
#define NTV2_IS_VALID_CHANNEL(__x__)
@ M31_FILE_1920X1080_420_8_24p
@ M31_FILE_1920X1080_420_8_50p
@ M31_FILE_3840X2160_422_10_24p
const int kNoSelection(1000000000)
poptContext poptGetContext(const char *name, int argc, const char **argv, const struct poptOption *options, unsigned int flags)
@ M31_FILE_1280X720_422_10_50p
@ M31_FILE_1920X1080_422_10_50p
int poptGetNextOpt(poptContext con)
@ M31_FILE_2048X1080_420_8_30p
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
@ M31_FILE_2048X1080_420_8_2997p
const NTV2FrameBufferFormat kCodecFormat[]
@ M31_FILE_2048X1080_422_10_30p
@ M31_FILE_1280X720_422_10_60p
static int printPresets(void)
@ NTV2_FBF_8BIT_YCBCR_422PL2
8-Bit 4:2:2 2-Plane YCbCr
@ M31_FILE_1920X1080_422_10_2997p
@ M31_FILE_3840X2160_422_10_2997p
@ M31_FILE_1920X1080_422_10_5994i
@ M31_FILE_3840X2160_422_10_60p
@ M31_FILE_2048X1080_422_10_2398p
virtual void Quit(void)
Gracefully stops me from running.
@ M31_FILE_2048X1080_422_10_2997p
@ M31_FILE_2048X1080_422_10_25p
@ M31_FILE_1280X720_420_8_50p
#define AJA_FAILURE(_status_)
@ M31_FILE_1920X1080_422_10_5994p
@ M31_FILE_2048X1080_422_10_24p
@ M31_FILE_1920X1080_420_8_5994i
@ M31_FILE_3840X2160_420_8_25p
@ M31_FILE_2048X1080_420_8_24p
static int printFormats(void)
@ M31_FILE_3840X2160_420_10_5994p
@ M31_FILE_2048X1080_420_8_5994p