![]() |
AJA NTV2 SDK
18.1.0.2262
NTV2 SDK 18.1.0.2262
|
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) |
| static bool | IsValidDevice (const std::string &spec) |
Video Format Functions | |
| static NTV2VideoFormatSet | GetSupportedVideoFormats (const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD) |
| defined(NTV2_DEPRECATE_18_1) More... | |
| 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 486 of file ntv2democommon.h.
Definition at line 849 of file ntv2democommon.h.
| typedef struct poptOption CNTV2DemoCommon::PoptOpts |
Definition at line 851 of file ntv2democommon.h.
|
static |
Definition at line 1627 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 1565 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 1190 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 1234 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 1113 of file ntv2democommon.cpp.
|
static |
| [in] | inFormat | Specifies the NTV2FrameBufferFormat to be converted into an equivalent AJA_PixelFormat. |
Definition at line 1145 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 947 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 920 of file ntv2democommon.cpp.
|
static |
Definition at line 1279 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 1301 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 1330 of file ntv2democommon.cpp.
|
static |
Answers with the crosspoint connections needed to implement the given 8K/UHD2 capture configuration.
| [out] | outConnections | Receives the crosspoint connection set. |
| [in] | inConfig | Specifies the CaptureConfig to route for. |
| [in] | inVidFormat | Specifies the NTV2VideoFormat. |
| [in] | inDevID | Optionally specifies the NTV2DeviceID. |
| [in] | isInputRGB | Optionally specifies if the input is RGB. Defaults to false (YUV). |
Definition at line 1478 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 716 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 684 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 796 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 764 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 632 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 600 of file ntv2democommon.cpp.
|
static |
| [in] | inKinds | Specifies the types of input sources returned. Defaults to all sources. |
Definition at line 668 of file ntv2democommon.cpp.
|
static |
| [in] | inKinds | Specifies the types of output destinations returned. Defaults to all types. |
Definition at line 748 of file ntv2democommon.cpp.
|
static |
| [in] | inKinds | Specifies the types of pixel formats returned. Defaults to all formats. |
Definition at line 580 of file ntv2democommon.cpp.
|
static |
| [in] | inKinds | Specifies the types of timecode indexes returned. Defaults to all indexes. |
Definition at line 828 of file ntv2democommon.cpp.
|
static |
defined(NTV2_DEPRECATE_18_1)
| [in] | inKinds | Specifies the types of video formats returned. Defaults to non-4K/UHD formats. |
Definition at line 502 of file ntv2democommon.cpp.
|
static |
Returns the NTV2TCIndex that matches the given string.
| [in] | inStr | Specifies the string to be converted to an NTV2TCIndex. |
| [in] | inKinds | Optionally specifies the timecode types to filter for. |
| [in] | inDevSpec | Optionally specifies the device specification. |
Definition at line 882 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 847 of file ntv2democommon.cpp.
|
static |
| [in] | inStr | Specifies the string to be converted to a valid test pattern or color name. |
Definition at line 1019 of file ntv2democommon.cpp.
|
static |
Definition at line 991 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 1284 of file ntv2democommon.cpp.
|
static |
| [in] | inStr | Specifies the string to be converted to a NTV2VANCMode. |
Definition at line 984 of file ntv2democommon.cpp.
|
static |
Definition at line 953 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 548 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 518 of file ntv2democommon.cpp.
|
static |
Definition at line 487 of file ntv2democommon.cpp.
|
static |
| [in] | inFrameRate | Specifies the NTV2FrameRate to be converted into an equivalent TimecodeFormat. |
Definition at line 1091 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 1048 of file ntv2democommon.cpp.
|
static |
Definition at line 1586 of file ntv2democommon.cpp.
|
static |
| [in] | inStr | Specifies the string to be stripped. |
Definition at line 1035 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 1028 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 1083 of file ntv2democommon.cpp.