AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
A set of common convenience functions used by the NTV2 Demonstration Applications. Most are used for converting a command line argument into NTV2VideoFormat, NTV2FrameBufferFormat, etc. types. More...
#include <ntv2democommon.h>
Classes | |
class | Popt |
Public Types | |
typedef NTV2ACFrameRange | ACFrameRange |
typedef struct poptOption | PoptOpts |
Static Public Member Functions | |
static bool | BFT (void) |
Device Functions | |
static bool | IsValidDevice (const std::string &inDeviceSpec) |
static std::string | GetDeviceStrings (const NTV2DeviceKinds inKinds=NTV2_DEVICEKIND_ALL) |
Video Format Functions | |
static const NTV2VideoFormatSet & | GetSupportedVideoFormats (const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_NON_4KUHD) |
static std::string | GetVideoFormatStrings (const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_NON_4KUHD, const std::string inDeviceSpecifier=std::string()) |
static NTV2VideoFormat | GetVideoFormatFromString (const std::string &inStr, const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_NON_4KUHD) |
Returns the NTV2VideoFormat that matches the given string. More... | |
static bool | Get4KInputFormat (NTV2VideoFormat &inOutVideoFormat) |
Given a video format, if all 4 inputs are the same and promotable to 4K, this function does the promotion. More... | |
static bool | Get8KInputFormat (NTV2VideoFormat &inOutVideoFormat) |
Given a video format, if all 4 inputs are the same and promotable to 8K, this function does the promotion. More... | |
Pixel Format Functions | |
static NTV2FrameBufferFormatSet | GetSupportedPixelFormats (const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL) |
static std::string | GetPixelFormatStrings (const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL, const std::string inDeviceSpecifier=std::string()) |
static NTV2FrameBufferFormat | GetPixelFormatFromString (const std::string &inStr) |
Returns the NTV2FrameBufferFormat that matches the given string. More... | |
static AJA_PixelFormat | GetAJAPixelFormat (const NTV2FrameBufferFormat inFormat) |
Input Source Functions | |
static const NTV2InputSourceSet | GetSupportedInputSources (const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL) |
static std::string | GetInputSourceStrings (const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL, const std::string inDeviceSpecifier=std::string()) |
static NTV2InputSource | GetInputSourceFromString (const std::string &inStr) |
Returns the NTV2InputSource that matches the given string. More... | |
Output Destination Functions | |
static std::string | GetOutputDestinationStrings (const std::string inDeviceSpecifier=std::string()) |
static NTV2OutputDestination | GetOutputDestinationFromString (const std::string &inStr) |
Returns the NTV2OutputDestination that matches the given string. More... | |
Timecode Functions | |
static const NTV2TCIndexes | GetSupportedTCIndexes (const NTV2TCIndexKinds inKinds) |
static std::string | GetTCIndexStrings (const NTV2TCIndexKinds inKinds=TC_INDEXES_ALL, const std::string inDeviceSpecifier=std::string(), const bool inIsInputOnly=(!(0))) |
static NTV2TCIndex | GetTCIndexFromString (const std::string &inStr) |
Returns the NTV2TCIndex that matches the given string. More... | |
Audio System Functions | |
static std::string | GetAudioSystemStrings (const std::string inDeviceSpecifier=std::string()) |
static NTV2AudioSystem | GetAudioSystemFromString (const std::string &inStr) |
Returns the NTV2AudioSystem that matches the given string. More... | |
Test Pattern Functions | |
static std::string | GetTestPatternStrings (void) |
static std::string | GetTestPatternNameFromString (const std::string &inStr) |
VANC Mode Functions | |
static std::string | GetVANCModeStrings (void) |
static NTV2VANCMode | GetVANCModeFromString (const std::string &inStr) |
Routing Functions | |
static bool | GetInputRouting (NTV2XptConnections &outConnections, const CaptureConfig &inConfig, const bool isInputRGB=(0)) |
Answers with the crosspoint connections needed to implement the given capture configuration. More... | |
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. More... | |
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. More... | |
Miscellaneous Functions | |
static std::string | ToLower (const std::string &inStr) |
Returns the given string after converting it to lower case. More... | |
static std::string | StripFormatString (const std::string &inStr) |
static char | ReadCharacterPress (void) |
Returns the character that represents the last key that was pressed on the keyboard without waiting for Enter or Return to be pressed. More... | |
static void | WaitForEnterKeyPress (void) |
Prompts the user (via stdout) to press the Return or Enter key, then waits for it to happen. More... | |
static TimecodeFormat | NTV2FrameRate2TimecodeFormat (const NTV2FrameRate inFrameRate) |
static AJA_FrameRate | GetAJAFrameRate (const NTV2FrameRate inFrameRate) |
static const char * | GetGlobalMutexName (void) |
static NTV2ChannelList | GetTSIMuxesForFrameStore (CNTV2Card &inDevice, const NTV2Channel in1stFrameStore, const UWord inCount) |
static bool | ConfigureAudioSystems (CNTV2Card &inDevice, const CaptureConfig &inConfig, const NTV2AudioSystemSet inAudioSystems) |
Configures capture audio systems. More... | |
static size_t | SetDefaultPageSize (void) |
A set of common convenience functions used by the NTV2 Demonstration Applications. Most are used for converting a command line argument into NTV2VideoFormat, NTV2FrameBufferFormat, etc. types.
Definition at line 448 of file ntv2democommon.h.
Definition at line 798 of file ntv2democommon.h.
typedef struct poptOption CNTV2DemoCommon::PoptOpts |
Definition at line 800 of file ntv2democommon.h.
|
static |
Definition at line 1525 of file ntv2democommon.cpp.
|
static |
Configures capture audio systems.
[in] | inDevice | Specifies the device to configure. |
[in] | inConfig | Specifies the capture configuration (primarily for fInputSource). |
[in] | inAudioSystems | Specifies the audio systems to configure. |
Definition at line 1463 of file ntv2democommon.cpp.
|
static |
Given a video format, if all 4 inputs are the same and promotable to 4K, this function does the promotion.
inOutVideoFormat | On entry, specifies the wire format; on exit, receives the 4K video format. |
Definition at line 1088 of file ntv2democommon.cpp.
|
static |
Given a video format, if all 4 inputs are the same and promotable to 8K, this function does the promotion.
inOutVideoFormat | On entry, specifies the wire format; on exit, receives the 4K video format. |
Definition at line 1132 of file ntv2democommon.cpp.
|
static |
[in] | inFrameRate | Specifies the NTV2FrameRate to be converted into an equivalent AJA_FrameRate. |
defined(NTV2_DEPRECATE_16_0)
Definition at line 1011 of file ntv2democommon.cpp.
|
static |
[in] | inFormat | Specifies the NTV2FrameBufferFormat to be converted into an equivalent AJA_PixelFormat. |
Definition at line 1043 of file ntv2democommon.cpp.
|
static |
Returns the NTV2AudioSystem that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2AudioSystem. |
Definition at line 845 of file ntv2democommon.cpp.
|
static |
[in] | inDeviceSpecifier | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns the audio systems that are compatible with that device. |
Definition at line 818 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the kinds of devices to be returned. Defaults to all available devices. |
Definition at line 490 of file ntv2democommon.cpp.
|
static |
Definition at line 1177 of file ntv2democommon.cpp.
|
static |
Answers with the crosspoint connections needed to implement the given capture configuration.
[in] | inConfig | Specifies the CaptureConfig to route for. |
[in] | isInputRGB | Optionally specifies if the input is RGB. Defaults to false (YUV). |
[out] | outConnections | Receives the crosspoint connection set. |
Definition at line 1199 of file ntv2democommon.cpp.
|
static |
Answers with the crosspoint connections needed to implement the given 4K/UHD capture configuration.
[in] | inConfig | Specifies the CaptureConfig to route for. |
[in] | inDevID | Optionally specifies the NTV2DeviceID. |
[in] | isInputRGB | Optionally specifies if the input is RGB. Defaults to false (YUV). |
[out] | outConnections | Receives the crosspoint connection set. |
Definition at line 1228 of file ntv2democommon.cpp.
|
static |
Answers with the crosspoint connections needed to implement the given 8K/UHD2 capture configuration.
[in] | inConfig | Specifies the CaptureConfig to route for. |
[in] | inDevID | Optionally specifies the NTV2DeviceID. |
[in] | isInputRGB | Optionally specifies if the input is RGB. Defaults to false (YUV). |
[out] | outConnections | Receives the crosspoint connection set. |
Definition at line 1376 of file ntv2democommon.cpp.
|
static |
Returns the NTV2InputSource that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2InputSource. |
Definition at line 706 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of input sources returned. Defaults to all sources. |
[in] | inDeviceSpecifier | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, warns if the input source is incompatible with that device. |
Definition at line 678 of file ntv2democommon.cpp.
|
static |
Returns the NTV2OutputDestination that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2OutputDestination. |
Definition at line 743 of file ntv2democommon.cpp.
|
static |
[in] | inDeviceSpecifier | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, warns if the output destination is incompatible with that device. |
Definition at line 715 of file ntv2democommon.cpp.
|
static |
Returns the NTV2FrameBufferFormat that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2FrameBufferFormat. |
Definition at line 653 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of pixel formats returned. Defaults to all formats. |
[in] | inDeviceSpecifier | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, warns if the pixel format is incompatible with that device. |
Definition at line 600 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of input sources returned. Defaults to all sources. |
Definition at line 660 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of pixel formats returned. Defaults to all formats. |
Definition at line 578 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of timecode indexes returned. Defaults to all indexes. |
Definition at line 752 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of video formats returned. Defaults to non-4K/UHD formats. |
Definition at line 538 of file ntv2democommon.cpp.
|
static |
Returns the NTV2TCIndex that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2TCIndex. |
Definition at line 809 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of timecode indexes returned. Defaults to all indexes. |
[in] | inDeviceSpecifier | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, warns if the timecode index is incompatible with that device. |
[in] | inIsInputOnly | Optionally specifies if intended for timecode input (capture). Defaults to 'true'. Specify 'false' to obtain the list of timecode indexes that are valid for the given device for either input (capture) or output (playout). |
Definition at line 773 of file ntv2democommon.cpp.
|
static |
[in] | inStr | Specifies the string to be converted to a valid test pattern or color name. |
Definition at line 917 of file ntv2democommon.cpp.
|
static |
Definition at line 889 of file ntv2democommon.cpp.
|
static |
[in] | inDevice | Specifies the device being used. |
[in] | in1stFrameStore | Specifies the first FrameStore of interest. |
[in] | inCount | Specifies the number of Muxes. |
Definition at line 1182 of file ntv2democommon.cpp.
|
static |
[in] | inStr | Specifies the string to be converted to a NTV2VANCMode. |
Definition at line 882 of file ntv2democommon.cpp.
|
static |
Definition at line 851 of file ntv2democommon.cpp.
|
static |
Returns the NTV2VideoFormat that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2VideoFormat. |
[in] | inKinds | Specifies which video format type is expected in "inStr", whether non-4K/UHD (the default), exclusively 4K/UHD, or both/all. |
Definition at line 635 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of video formats returned. Defaults to non-4K/UHD formats. |
[in] | inDeviceSpecifier | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, warns if the video format is incompatible with that device. |
Definition at line 550 of file ntv2democommon.cpp.
|
static |
[in] | inDeviceSpec | A string containing a decimal index number, device serial number, or a device model name. |
Definition at line 430 of file ntv2democommon.cpp.
|
static |
[in] | inFrameRate | Specifies the NTV2FrameRate to be converted into an equivalent TimecodeFormat. |
Definition at line 989 of file ntv2democommon.cpp.
|
static |
Returns the character that represents the last key that was pressed on the keyboard without waiting for Enter or Return to be pressed.
Definition at line 946 of file ntv2democommon.cpp.
|
static |
Definition at line 1484 of file ntv2democommon.cpp.
|
static |
[in] | inStr | Specifies the string to be stripped. |
Definition at line 933 of file ntv2democommon.cpp.
|
static |
Returns the given string after converting it to lower case.
[in] | inStr | Specifies the string to be converted to lower case. |
Definition at line 926 of file ntv2democommon.cpp.
|
static |
Prompts the user (via stdout) to press the Return or Enter key, then waits for it to happen.
Definition at line 981 of file ntv2democommon.cpp.