AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
CNTV2DemoCommon Class Reference

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)
 

Detailed Description

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.

Member Typedef Documentation

◆ ACFrameRange

Deprecated:
Starting in SDK 17.0, use NTV2ACFrameRange from now on

Definition at line 845 of file ntv2democommon.h.

◆ PoptOpts

Definition at line 847 of file ntv2democommon.h.

Member Function Documentation

◆ BFT()

bool CNTV2DemoCommon::BFT ( void  )
static

Definition at line 1632 of file ntv2democommon.cpp.

◆ ConfigureAudioSystems()

bool CNTV2DemoCommon::ConfigureAudioSystems ( CNTV2Card inDevice,
const CaptureConfig inConfig,
const NTV2AudioSystemSet  inAudioSystems 
)
static

Configures capture audio systems.

Parameters
[in]inDeviceSpecifies the device to configure.
[in]inConfigSpecifies the capture configuration (primarily for fInputSource).
[in]inAudioSystemsSpecifies the audio systems to configure.
Returns
True if successful; otherwise false.

Definition at line 1570 of file ntv2democommon.cpp.

◆ Get4KInputFormat()

bool CNTV2DemoCommon::Get4KInputFormat ( NTV2VideoFormat inOutVideoFormat)
static

Given a video format, if all 4 inputs are the same and promotable to 4K, this function does the promotion.

Parameters
inOutVideoFormatOn entry, specifies the wire format; on exit, receives the 4K video format.
Returns
True if successful; otherwise false.

Definition at line 1195 of file ntv2democommon.cpp.

◆ Get8KInputFormat()

bool CNTV2DemoCommon::Get8KInputFormat ( NTV2VideoFormat inOutVideoFormat)
static

Given a video format, if all 4 inputs are the same and promotable to 8K, this function does the promotion.

Parameters
inOutVideoFormatOn entry, specifies the wire format; on exit, receives the 4K video format.
Returns
True if successful; otherwise false.

Definition at line 1239 of file ntv2democommon.cpp.

◆ GetAJAFrameRate()

AJA_FrameRate CNTV2DemoCommon::GetAJAFrameRate ( const NTV2FrameRate  inFrameRate)
static
Returns
The equivalent AJA_FrameRate for the given NTV2FrameRate.
Parameters
[in]inFrameRateSpecifies the NTV2FrameRate to be converted into an equivalent AJA_FrameRate.

defined(NTV2_DEPRECATE_16_0)

Definition at line 1118 of file ntv2democommon.cpp.

◆ GetAJAPixelFormat()

AJA_PixelFormat CNTV2DemoCommon::GetAJAPixelFormat ( const NTV2PixelFormat  inFormat)
static
Returns
The equivalent AJA_PixelFormat for the given NTV2FrameBufferFormat.
Parameters
[in]inFormatSpecifies the NTV2FrameBufferFormat to be converted into an equivalent AJA_PixelFormat.

Definition at line 1150 of file ntv2democommon.cpp.

◆ GetAudioSystemFromString()

NTV2AudioSystem CNTV2DemoCommon::GetAudioSystemFromString ( const std::string &  inStr)
static

Returns the NTV2AudioSystem that matches the given string.

Parameters
[in]inStrSpecifies the string to be converted to an NTV2AudioSystem.
Returns
The given string converted to an NTV2AudioSystem, or NTV2_AUDIOSYSTEM_INVALID if there's no match.

Definition at line 952 of file ntv2democommon.cpp.

◆ GetAudioSystemStrings()

string CNTV2DemoCommon::GetAudioSystemStrings ( const std::string  inDeviceSpecifier = std::string ())
static
Parameters
[in]inDeviceSpecifierAn optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns the audio systems that are compatible with that device.
Returns
A string that can be printed to show the available audio systems that are supported by a given device.
Note
These audio system strings are mere conveniences for specifying audio systems in the command-line-based demo apps, and are subject to change without notice. They are not intended to be canonical in any way.

Definition at line 925 of file ntv2democommon.cpp.

◆ GetGlobalMutexName()

const char * CNTV2DemoCommon::GetGlobalMutexName ( void  )
static
Returns
A pointer to a 'C' string containing the name of the AJA NTV2 demonstration application global mutex.

Definition at line 1284 of file ntv2democommon.cpp.

◆ GetInputRouting()

bool CNTV2DemoCommon::GetInputRouting ( NTV2XptConnections outConnections,
const CaptureConfig inConfig,
const bool  isInputRGB = (0) 
)
static

Answers with the crosspoint connections needed to implement the given capture configuration.

Parameters
[in]inConfigSpecifies the CaptureConfig to route for.
[in]isInputRGBOptionally specifies if the input is RGB. Defaults to false (YUV).
[out]outConnectionsReceives the crosspoint connection set.

Definition at line 1306 of file ntv2democommon.cpp.

◆ GetInputRouting4K()

bool CNTV2DemoCommon::GetInputRouting4K ( NTV2XptConnections outConnections,
const CaptureConfig inConfig,
const NTV2DeviceID  inDevID = DEVICE_ID_INVALID,
const bool  isInputRGB = (0) 
)
static

Answers with the crosspoint connections needed to implement the given 4K/UHD capture configuration.

Parameters
[in]inConfigSpecifies the CaptureConfig to route for.
[in]inDevIDOptionally specifies the NTV2DeviceID.
[in]isInputRGBOptionally specifies if the input is RGB. Defaults to false (YUV).
[out]outConnectionsReceives the crosspoint connection set.

Definition at line 1335 of file ntv2democommon.cpp.

◆ GetInputRouting8K()

bool CNTV2DemoCommon::GetInputRouting8K ( NTV2XptConnections outConnections,
const CaptureConfig inConfig,
const NTV2VideoFormat  inVidFormat,
const NTV2DeviceID  inDevID = DEVICE_ID_INVALID,
const bool  isInputRGB = (0) 
)
static

Answers with the crosspoint connections needed to implement the given 8K/UHD2 capture configuration.

Parameters
[in]inConfigSpecifies the CaptureConfig to route for.
[in]inDevIDOptionally specifies the NTV2DeviceID.
[in]isInputRGBOptionally specifies if the input is RGB. Defaults to false (YUV).
[out]outConnectionsReceives the crosspoint connection set.

Definition at line 1483 of file ntv2democommon.cpp.

◆ GetInputSourceFromString()

NTV2InputSource CNTV2DemoCommon::GetInputSourceFromString ( const std::string &  inStr,
const NTV2IOKinds  inKinds = NTV2_IOKINDS_ALL,
const std::string  inDevSpec = std::string() 
)
static

Returns the NTV2InputSource that matches the given string.

Parameters
[in]inStrSpecifies the string to be converted to an NTV2InputSource.
[in]inKindsSpecifies the types of input sources returned. Defaults to all sources.
[in]inDevSpecAn 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.
Returns
The given string converted to an NTV2InputSource, or NTV2_INPUTSOURCE_INVALID if there's no match.

Definition at line 721 of file ntv2democommon.cpp.

◆ GetInputSourceStrings()

string CNTV2DemoCommon::GetInputSourceStrings ( const NTV2IOKinds  inKinds = NTV2_IOKINDS_ALL,
const std::string  inDevSpec = std::string () 
)
static
Parameters
[in]inKindsSpecifies the types of input sources returned. Defaults to all sources.
[in]inDevSpecAn optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns those input sources that are supported by the device.
Returns
A string that can be printed to show the available input sources (or those that are supported by a given device).
Note
These input source strings are mere conveniences for specifying input sources in the command-line-based demo apps, and are subject to change without notice. They are not intended to be canonical in any way.

Definition at line 689 of file ntv2democommon.cpp.

◆ GetOutputDestinationFromString()

NTV2OutputDestination CNTV2DemoCommon::GetOutputDestinationFromString ( const std::string &  inStr,
const NTV2IOKinds  inKinds = NTV2_IOKINDS_ALL,
const std::string  inDevSpec = std::string() 
)
static

Returns the NTV2OutputDestination that matches the given string.

Parameters
[in]inStrSpecifies the string to be converted to an NTV2OutputDestination.
[in]inKindsSpecifies the types of output destinations returned. Defaults to all types.
[in]inDevSpecAn optional device specifier. If non-empty, and resolves to a valid device, the returned value, if valid, will be compatible with that device.
Returns
The given string converted to an NTV2OutputDestination, or NTV2_OUTPUTDESTINATION_INVALID if there's no match.

Definition at line 801 of file ntv2democommon.cpp.

◆ GetOutputDestinationStrings()

string CNTV2DemoCommon::GetOutputDestinationStrings ( const NTV2IOKinds  inKinds,
const std::string  inDevSpec = std::string () 
)
static
Parameters
[in]inKindsSpecifies the types of output destinations returned. Defaults to all types.
[in]inDevSpecAn 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.
Returns
A string that can be printed to show the available output destinations (or those that are supported by a given device).
Note
These output destination strings are mere conveniences for specifying output destinations in the command-line-based demo apps, and are subject to change without notice. They are not intended to be canonical in any way.

Definition at line 769 of file ntv2democommon.cpp.

◆ GetPixelFormatFromString()

NTV2PixelFormat CNTV2DemoCommon::GetPixelFormatFromString ( const std::string &  inStr,
const NTV2PixelFormatKinds  inKinds = PIXEL_FORMATS_ALL,
const std::string  inDevSpec = std::string() 
)
static

Returns the NTV2PixelFormat that matches the given string.

Parameters
[in]inStrSpecifies the string to be converted to an NTV2PixelFormat.
[in]inKindsSpecifies the types of pixel formats returned. Defaults to all formats.
[in]inDevSpecAn 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.
Returns
An NTV2PixelFormat, or NTV2_FBF_INVALID if there's no match.

Definition at line 637 of file ntv2democommon.cpp.

◆ GetPixelFormatStrings()

string CNTV2DemoCommon::GetPixelFormatStrings ( const NTV2PixelFormatKinds  inKinds = PIXEL_FORMATS_ALL,
const std::string  inDevSpec = std::string() 
)
static
Parameters
[in]inKindsSpecifies the types of pixel formats returned. Defaults to all formats.
[in]inDevSpecAn optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns those pixel formats that are supported by the device.
Returns
A string that can be printed to show the available pixel formats (or those that are supported by a given device).
Note
These pixel format strings are mere conveniences for specifying pixel formats in the command-line-based demo apps, and are subject to change without notice. They are not intended to be canonical in any way.

Definition at line 605 of file ntv2democommon.cpp.

◆ GetSupportedInputSources()

const NTV2InputSourceSet CNTV2DemoCommon::GetSupportedInputSources ( const NTV2IOKinds  inKinds = NTV2_IOKINDS_ALL)
static
Parameters
[in]inKindsSpecifies the types of input sources returned. Defaults to all sources.
Returns
The supported NTV2InputSourceSet.

Definition at line 673 of file ntv2democommon.cpp.

◆ GetSupportedOutputDestinations()

const NTV2OutputDestinations CNTV2DemoCommon::GetSupportedOutputDestinations ( const NTV2IOKinds  inKinds)
static
Parameters
[in]inKindsSpecifies the types of output destinations returned. Defaults to all types.
Returns
The supported NTV2OutputDestinations.

Definition at line 753 of file ntv2democommon.cpp.

◆ GetSupportedPixelFormats()

NTV2FrameBufferFormatSet CNTV2DemoCommon::GetSupportedPixelFormats ( const NTV2PixelFormatKinds  inKinds = PIXEL_FORMATS_ALL)
static
Parameters
[in]inKindsSpecifies the types of pixel formats returned. Defaults to all formats.
Returns
The supported NTV2FrameBufferFormatSet.

Definition at line 585 of file ntv2democommon.cpp.

◆ GetSupportedTCIndexes()

const NTV2TCIndexes CNTV2DemoCommon::GetSupportedTCIndexes ( const NTV2TCIndexKinds  inKinds)
static
Parameters
[in]inKindsSpecifies the types of timecode indexes returned. Defaults to all indexes.
Returns
The supported NTV2TCIndexes set.

Definition at line 833 of file ntv2democommon.cpp.

◆ GetSupportedVideoFormats()

NTV2VideoFormatSet CNTV2DemoCommon::GetSupportedVideoFormats ( const NTV2VideoFormatKinds  inKinds = VIDEO_FORMATS_SDHD)
static
Parameters
[in]inKindsSpecifies the types of video formats returned. Defaults to non-4K/UHD formats.
Returns
The supported NTV2VideoFormatSet.

Definition at line 507 of file ntv2democommon.cpp.

◆ GetTCIndexFromString()

NTV2TCIndex CNTV2DemoCommon::GetTCIndexFromString ( const std::string &  inStr,
const NTV2TCIndexKinds  inKinds = TC_INDEXES_ALL,
const std::string  inDevSpec = std::string() 
)
static

Returns the NTV2TCIndex that matches the given string.

Parameters
[in]inStrSpecifies the string to be converted to an NTV2TCIndex.
Returns
The given string converted to an NTV2TCIndex, or NTV2_TCINDEX_INVALID if there's no match.

Definition at line 887 of file ntv2democommon.cpp.

◆ GetTCIndexStrings()

string CNTV2DemoCommon::GetTCIndexStrings ( const NTV2TCIndexKinds  inKinds = TC_INDEXES_ALL,
const std::string  inDeviceSpecifier = std::string(),
const bool  inIsInputOnly = (! (0) ) 
)
static
Parameters
[in]inKindsSpecifies the types of timecode indexes returned. Defaults to all indexes.
[in]inDeviceSpecifierAn 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]inIsInputOnlyOptionally 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).
Returns
A string that can be printed to show the available timecode indexes (or those that are supported by a given device).
Note
These timecode index strings are mere conveniences for specifying timecode indexes in the command-line-based demo apps, and are subject to change without notice. They are not intended to be canonical in any way.

Definition at line 852 of file ntv2democommon.cpp.

◆ GetTestPatternNameFromString()

string CNTV2DemoCommon::GetTestPatternNameFromString ( const std::string &  inStr)
static
Parameters
[in]inStrSpecifies the string to be converted to a valid test pattern or color name.
Returns
The test pattern or color name that best matches the given string, or an empty string if invalid.

Definition at line 1024 of file ntv2democommon.cpp.

◆ GetTestPatternStrings()

string CNTV2DemoCommon::GetTestPatternStrings ( void  )
static
Returns
A string that can be printed to show the available test pattern and color identifiers.
Note
These test pattern strings are mere conveniences for specifying test patterns in the command-line-based demo apps, and are subject to change without notice. They are not intended to be canonical in any way.

Definition at line 996 of file ntv2democommon.cpp.

◆ GetTSIMuxesForFrameStore()

NTV2ChannelList CNTV2DemoCommon::GetTSIMuxesForFrameStore ( CNTV2Card inDevice,
const NTV2Channel  in1stFrameStore,
const UWord  inCount 
)
static
Returns
The TSIMuxes to use given the first FrameStore on the device and a count.
Parameters
[in]inDeviceSpecifies the device being used.
[in]in1stFrameStoreSpecifies the first FrameStore of interest.
[in]inCountSpecifies the number of Muxes.

Definition at line 1289 of file ntv2democommon.cpp.

◆ GetVANCModeFromString()

NTV2VANCMode CNTV2DemoCommon::GetVANCModeFromString ( const std::string &  inStr)
static
Parameters
[in]inStrSpecifies the string to be converted to a NTV2VANCMode.
Returns
The NTV2VANCMode that best matches the given string, or an empty string if invalid.

Definition at line 989 of file ntv2democommon.cpp.

◆ GetVANCModeStrings()

string CNTV2DemoCommon::GetVANCModeStrings ( void  )
static
Returns
A string that can be printed to show the available VANC mode identifiers.
Note
These identifiers are mere conveniences for specifying VANC modes in the command-line-based demo apps, and are subject to change without notice. They are not intended to be canonical in any way.

Definition at line 958 of file ntv2democommon.cpp.

◆ GetVideoFormatFromString()

NTV2VideoFormat CNTV2DemoCommon::GetVideoFormatFromString ( const std::string &  inStr,
const NTV2VideoFormatKinds  inKinds = VIDEO_FORMATS_SDHD,
const std::string &  inDevSpec = std::string() 
)
static

Returns the NTV2VideoFormat that matches the given string.

Parameters
[in]inStrSpecifies the string to be converted to an NTV2VideoFormat.
[in]inKindsSpecifies which video format type is expected in "inStr", whether non-4K/UHD (the default), exclusively 4K/UHD, or both/all.
[in]inDevSpecAn 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.
Returns
The given string converted to an NTV2VideoFormat, or NTV2_FORMAT_UNKNOWN if there's no match.

Definition at line 553 of file ntv2democommon.cpp.

◆ GetVideoFormatStrings()

string CNTV2DemoCommon::GetVideoFormatStrings ( const NTV2VideoFormatKinds  inKinds = VIDEO_FORMATS_SDHD,
const std::string  inDevSpec = std::string() 
)
static
Parameters
[in]inKindsSpecifies the types of video formats returned. Defaults to non-4K/UHD formats.
[in]inDevSpecAn optional device specifier. If non-empty, and resolves to a valid, connected AJA device, returns those video formats that are supported by the device.
Returns
A string that can be printed to show the supported video formats.
Note
These video format strings are mere conveniences for specifying video formats in the command-line-based demo apps, and are subject to change without notice. They are not intended to be canonical in any way.

Definition at line 523 of file ntv2democommon.cpp.

◆ IsValidDevice()

bool CNTV2DemoCommon::IsValidDevice ( const std::string &  inDeviceSpec)
static
Parameters
[in]inDeviceSpecA string containing a decimal index number, device serial number, or a device model name.
Returns
True if the specified device exists and can be opened.

Definition at line 455 of file ntv2democommon.cpp.

◆ NTV2FrameRate2TimecodeFormat()

TimecodeFormat CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat ( const NTV2FrameRate  inFrameRate)
static
Returns
The equivalent TimecodeFormat for a given NTV2FrameRate.
Parameters
[in]inFrameRateSpecifies the NTV2FrameRate to be converted into an equivalent TimecodeFormat.

Definition at line 1096 of file ntv2democommon.cpp.

◆ ReadCharacterPress()

char CNTV2DemoCommon::ReadCharacterPress ( void  )
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.

◆ SetDefaultPageSize()

size_t CNTV2DemoCommon::SetDefaultPageSize ( void  )
static

Definition at line 1591 of file ntv2democommon.cpp.

◆ StripFormatString()

string CNTV2DemoCommon::StripFormatString ( const std::string &  inStr)
static
Parameters
[in]inStrSpecifies the string to be stripped.
Returns
The given string after stripping all spaces, periods, and "00"s.
Note
Only works with ASCII character strings!

Definition at line 1040 of file ntv2democommon.cpp.

◆ ToLower()

string CNTV2DemoCommon::ToLower ( const std::string &  inStr)
static

Returns the given string after converting it to lower case.

Parameters
[in]inStrSpecifies the string to be converted to lower case.
Returns
The given string converted to lower-case.
Note
Only works with ASCII characters!

Definition at line 1033 of file ntv2democommon.cpp.

◆ WaitForEnterKeyPress()

void CNTV2DemoCommon::WaitForEnterKeyPress ( void  )
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.


The documentation for this class was generated from the following files: