AJA NTV2 SDK
17.5.0.1242
NTV2 SDK 17.5.0.1242
|
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) |
Video Format Functions | |
static NTV2VideoFormatSet | GetSupportedVideoFormats (const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD) |
static std::string | GetVideoFormatStrings (const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD, const std::string inDevSpec=std::string()) |
static NTV2VideoFormat | GetVideoFormatFromString (const std::string &inStr, const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD, const std::string &inDevSpec=std::string()) |
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 NTV2PixelFormats | GetSupportedPixelFormats (const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL) |
static std::string | GetPixelFormatStrings (const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL, const std::string inDevSpec=std::string()) |
static NTV2PixelFormat | GetPixelFormatFromString (const std::string &inStr, const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL, const std::string inDevSpec=std::string()) |
Returns the NTV2PixelFormat that matches the given string. More... | |
static AJA_PixelFormat | GetAJAPixelFormat (const NTV2PixelFormat 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 inDevSpec=std::string()) |
static NTV2InputSource | GetInputSourceFromString (const std::string &inStr, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL, const std::string inDevSpec=std::string()) |
Returns the NTV2InputSource that matches the given string. More... | |
Output Destination Functions | |
static const NTV2OutputDestinations | GetSupportedOutputDestinations (const NTV2IOKinds inKinds) |
static std::string | GetOutputDestinationStrings (const NTV2IOKinds inKinds, const std::string inDevSpec=std::string()) |
static NTV2OutputDestination | GetOutputDestinationFromString (const std::string &inStr, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL, const std::string inDevSpec=std::string()) |
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, const NTV2TCIndexKinds inKinds=TC_INDEXES_ALL, const std::string inDevSpec=std::string()) |
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 474 of file ntv2democommon.h.
Definition at line 845 of file ntv2democommon.h.
typedef struct poptOption CNTV2DemoCommon::PoptOpts |
Definition at line 847 of file ntv2democommon.h.
|
static |
Definition at line 1632 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 1570 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 1195 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 1239 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 1118 of file ntv2democommon.cpp.
|
static |
[in] | inFormat | Specifies the NTV2FrameBufferFormat to be converted into an equivalent AJA_PixelFormat. |
Definition at line 1150 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 952 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 925 of file ntv2democommon.cpp.
|
static |
Definition at line 1284 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 1306 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 1335 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 1483 of file ntv2democommon.cpp.
|
static |
Returns the NTV2InputSource that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2InputSource. |
[in] | inKinds | Specifies the types of input sources returned. Defaults to all sources. |
[in] | inDevSpec | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns a valid input source only if supported by the device. |
Definition at line 721 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of input sources returned. Defaults to all sources. |
[in] | inDevSpec | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns those input sources that are supported by the device. |
Definition at line 689 of file ntv2democommon.cpp.
|
static |
Returns the NTV2OutputDestination that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2OutputDestination. |
[in] | inKinds | Specifies the types of output destinations returned. Defaults to all types. |
[in] | inDevSpec | An optional device specifier. If non-empty, and resolves to a valid device, the returned value, if valid, will be compatible with that device. |
Definition at line 801 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of output destinations returned. Defaults to all types. |
[in] | inDevSpec | An optional device specifier. If non-empty, and resolves to a valid device, the returned string will only contain output destination values that are compatible with that device. |
Definition at line 769 of file ntv2democommon.cpp.
|
static |
Returns the NTV2PixelFormat that matches the given string.
[in] | inStr | Specifies the string to be converted to an NTV2PixelFormat. |
[in] | inKinds | Specifies the types of pixel formats returned. Defaults to all formats. |
[in] | inDevSpec | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns a valid pixel format only if supported by the device. |
Definition at line 637 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of pixel formats returned. Defaults to all formats. |
[in] | inDevSpec | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns those pixel formats that are supported by the device. |
Definition at line 605 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of input sources returned. Defaults to all sources. |
Definition at line 673 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of output destinations returned. Defaults to all types. |
Definition at line 753 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of pixel formats returned. Defaults to all formats. |
Definition at line 585 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of timecode indexes returned. Defaults to all indexes. |
Definition at line 833 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of video formats returned. Defaults to non-4K/UHD formats. |
Definition at line 507 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 887 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, returns a valid timecode index only if supported by the 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 852 of file ntv2democommon.cpp.
|
static |
[in] | inStr | Specifies the string to be converted to a valid test pattern or color name. |
Definition at line 1024 of file ntv2democommon.cpp.
|
static |
Definition at line 996 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 1289 of file ntv2democommon.cpp.
|
static |
[in] | inStr | Specifies the string to be converted to a NTV2VANCMode. |
Definition at line 989 of file ntv2democommon.cpp.
|
static |
Definition at line 958 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. |
[in] | inDevSpec | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns a valid video format only if supported by the device. |
Definition at line 553 of file ntv2democommon.cpp.
|
static |
[in] | inKinds | Specifies the types of video formats returned. Defaults to non-4K/UHD formats. |
[in] | inDevSpec | An optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns those video formats that are supported by the device. |
Definition at line 523 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 455 of file ntv2democommon.cpp.
|
static |
[in] | inFrameRate | Specifies the NTV2FrameRate to be converted into an equivalent TimecodeFormat. |
Definition at line 1096 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 1053 of file ntv2democommon.cpp.
|
static |
Definition at line 1591 of file ntv2democommon.cpp.
|
static |
[in] | inStr | Specifies the string to be stripped. |
Definition at line 1040 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 1033 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 1088 of file ntv2democommon.cpp.