AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
ntv2democommon.cpp File Reference

Common implementation code used by many of the demo applications. More...

#include "ntv2democommon.h"
#include "ntv2devicescanner.h"
#include "ntv2devicefeatures.h"
#include "ntv2testpatterngen.h"
#include "ntv2debug.h"
#include "ntv2utils.h"
#include "ajabase/common/common.h"
#include <algorithm>
#include <map>
#include <iomanip>
#include <unistd.h>
#include <termios.h>
Include dependency graph for ntv2democommon.cpp:

Go to the source code of this file.

Classes

class  DemoCommonInitializer
 

Typedefs

typedef multimap< string, NTV2VideoFormatString2VideoFormatMMap
 
typedef String2VideoFormatMMap::const_iterator String2VideoFormatMMapCI
 
typedef map< string, NTV2FrameBufferFormatString2PixelFormatMap
 
typedef String2PixelFormatMap::const_iterator String2PixelFormatMapConstIter
 
typedef map< string, NTV2AudioSystemString2AudioSystemMap
 
typedef String2AudioSystemMap::const_iterator String2AudioSystemMapConstIter
 
typedef map< string, NTV2VANCModeString2VANCModeMap
 
typedef String2VANCModeMap::const_iterator String2VANCModeMapConstIter
 
typedef map< string, NTV2InputSourceString2InputSourceMap
 
typedef String2InputSourceMap::const_iterator String2InputSourceMapConstIter
 
typedef map< string, NTV2OutputDestinationString2OutputDestMap
 
typedef String2OutputDestMap::const_iterator String2OutputDestMapConstIter
 
typedef map< string, NTV2TCIndexString2TCIndexMap
 
typedef pair< string, NTV2TCIndexString2TCIndexPair
 
typedef String2TCIndexMap::const_iterator String2TCIndexMapConstIter
 
typedef map< string, string > String2TPNamesMap
 
typedef pair< string, string > String2TPNamePair
 
typedef String2TPNamesMap::const_iterator String2TPNamesMapConstIter
 

Functions

static const string gGlobalMutexName ("com.aja.ntv2.mutex.demo")
 
static string DeviceFilterString (const NTV2DeviceKinds inKinds)
 
std::ostream & operator<< (std::ostream &ioStrm, const CaptureConfig &inObj)
 
std::ostream & operator<< (std::ostream &ioStrm, const PlayerConfig &inObj)
 

Variables

static NTV2VideoFormatSet gAllFormats
 
static NTV2VideoFormatSet gSDHDFormats
 
static NTV2VideoFormatSet g4KFormats
 
static NTV2VideoFormatSet g8KFormats
 
static NTV2FrameBufferFormatSet gPixelFormats
 
static NTV2FrameBufferFormatSet gFBFsRGB
 
static NTV2FrameBufferFormatSet gFBFsPlanar
 
static NTV2FrameBufferFormatSet gFBFsRaw
 
static NTV2FrameBufferFormatSet gFBFsPacked
 
static NTV2FrameBufferFormatSet gFBFsAlpha
 
static NTV2FrameBufferFormatSet gFBFsProRes
 
static NTV2InputSourceSet gInputSources
 
static NTV2InputSourceSet gInputSourcesSDI
 
static NTV2InputSourceSet gInputSourcesHDMI
 
static NTV2InputSourceSet gInputSourcesAnalog
 
static NTV2OutputDestinations gOutputDestinations
 
static NTV2OutputDestinations gOutputDestsSDI
 
static NTV2OutputDestinations gOutputDestsHDMI
 
static NTV2OutputDestinations gOutputDestsAnalog
 
static String2VideoFormatMMap gString2VideoFormatMMap
 
static String2PixelFormatMap gString2PixelFormatMap
 
static String2AudioSystemMap gString2AudioSystemMap
 
static String2VANCModeMap gString2VANCModeMap
 
static String2InputSourceMap gString2InputSourceMap
 
static String2OutputDestMap gString2OutputDestMap
 
static NTV2TCIndexSet gTCIndexes
 
static NTV2TCIndexSet gTCIndexesSDI
 
static NTV2TCIndexSet gTCIndexesHDMI
 
static NTV2TCIndexSet gTCIndexesAnalog
 
static NTV2TCIndexSet gTCIndexesATCLTC
 
static NTV2TCIndexSet gTCIndexesVITC1
 
static NTV2TCIndexSet gTCIndexesVITC2
 
static String2TCIndexMap gString2TCIndexMap
 
static String2TPNamesMap gString2TPNamesMap
 
static NTV2StringList gTestPatternNames
 
static const DemoCommonInitializer gInitializer
 

Detailed Description

Common implementation code used by many of the demo applications.

Definition in file ntv2democommon.cpp.

Typedef Documentation

◆ String2AudioSystemMap

typedef map<string, NTV2AudioSystem> String2AudioSystemMap

Definition at line 31 of file ntv2democommon.cpp.

◆ String2AudioSystemMapConstIter

typedef String2AudioSystemMap::const_iterator String2AudioSystemMapConstIter

Definition at line 32 of file ntv2democommon.cpp.

◆ String2InputSourceMap

typedef map<string, NTV2InputSource> String2InputSourceMap

Definition at line 37 of file ntv2democommon.cpp.

◆ String2InputSourceMapConstIter

typedef String2InputSourceMap::const_iterator String2InputSourceMapConstIter

Definition at line 38 of file ntv2democommon.cpp.

◆ String2OutputDestMap

Definition at line 40 of file ntv2democommon.cpp.

◆ String2OutputDestMapConstIter

typedef String2OutputDestMap::const_iterator String2OutputDestMapConstIter

Definition at line 41 of file ntv2democommon.cpp.

◆ String2PixelFormatMap

Definition at line 28 of file ntv2democommon.cpp.

◆ String2PixelFormatMapConstIter

typedef String2PixelFormatMap::const_iterator String2PixelFormatMapConstIter

Definition at line 29 of file ntv2democommon.cpp.

◆ String2TCIndexMap

typedef map<string, NTV2TCIndex> String2TCIndexMap

Definition at line 43 of file ntv2democommon.cpp.

◆ String2TCIndexMapConstIter

typedef String2TCIndexMap::const_iterator String2TCIndexMapConstIter

Definition at line 45 of file ntv2democommon.cpp.

◆ String2TCIndexPair

typedef pair<string, NTV2TCIndex> String2TCIndexPair

Definition at line 44 of file ntv2democommon.cpp.

◆ String2TPNamePair

typedef pair<string, string> String2TPNamePair

Definition at line 48 of file ntv2democommon.cpp.

◆ String2TPNamesMap

typedef map<string, string> String2TPNamesMap

Definition at line 47 of file ntv2democommon.cpp.

◆ String2TPNamesMapConstIter

typedef String2TPNamesMap::const_iterator String2TPNamesMapConstIter

Definition at line 49 of file ntv2democommon.cpp.

◆ String2VANCModeMap

typedef map<string, NTV2VANCMode> String2VANCModeMap

Definition at line 34 of file ntv2democommon.cpp.

◆ String2VANCModeMapConstIter

typedef String2VANCModeMap::const_iterator String2VANCModeMapConstIter

Definition at line 35 of file ntv2democommon.cpp.

◆ String2VideoFormatMMap

typedef multimap<string, NTV2VideoFormat> String2VideoFormatMMap

Definition at line 25 of file ntv2democommon.cpp.

◆ String2VideoFormatMMapCI

typedef String2VideoFormatMMap::const_iterator String2VideoFormatMMapCI

Definition at line 26 of file ntv2democommon.cpp.

Function Documentation

◆ DeviceFilterString()

static string DeviceFilterString ( const NTV2DeviceKinds  inKinds)
static

Definition at line 469 of file ntv2democommon.cpp.

◆ gGlobalMutexName()

static const string gGlobalMutexName ( "com.aja.ntv2.mutex.demo"  )
static

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  ioStrm,
const CaptureConfig inObj 
)

Definition at line 1791 of file ntv2democommon.cpp.

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  ioStrm,
const PlayerConfig inObj 
)

Definition at line 1828 of file ntv2democommon.cpp.

Variable Documentation

◆ g4KFormats

NTV2VideoFormatSet g4KFormats
static

Definition at line 55 of file ntv2democommon.cpp.

◆ g8KFormats

NTV2VideoFormatSet g8KFormats
static

Definition at line 56 of file ntv2democommon.cpp.

◆ gAllFormats

NTV2VideoFormatSet gAllFormats
static

Definition at line 53 of file ntv2democommon.cpp.

◆ gFBFsAlpha

NTV2FrameBufferFormatSet gFBFsAlpha
static

Definition at line 62 of file ntv2democommon.cpp.

◆ gFBFsPacked

NTV2FrameBufferFormatSet gFBFsPacked
static

Definition at line 61 of file ntv2democommon.cpp.

◆ gFBFsPlanar

NTV2FrameBufferFormatSet gFBFsPlanar
static

Definition at line 59 of file ntv2democommon.cpp.

◆ gFBFsProRes

NTV2FrameBufferFormatSet gFBFsProRes
static

Definition at line 63 of file ntv2democommon.cpp.

◆ gFBFsRaw

NTV2FrameBufferFormatSet gFBFsRaw
static

Definition at line 60 of file ntv2democommon.cpp.

◆ gFBFsRGB

NTV2FrameBufferFormatSet gFBFsRGB
static

Definition at line 58 of file ntv2democommon.cpp.

◆ gInitializer

const DemoCommonInitializer gInitializer
static

Definition at line 401 of file ntv2democommon.cpp.

◆ gInputSources

NTV2InputSourceSet gInputSources
static

Definition at line 64 of file ntv2democommon.cpp.

◆ gInputSourcesAnalog

NTV2InputSourceSet gInputSourcesAnalog
static

Definition at line 67 of file ntv2democommon.cpp.

◆ gInputSourcesHDMI

NTV2InputSourceSet gInputSourcesHDMI
static

Definition at line 66 of file ntv2democommon.cpp.

◆ gInputSourcesSDI

NTV2InputSourceSet gInputSourcesSDI
static

Definition at line 65 of file ntv2democommon.cpp.

◆ gOutputDestinations

NTV2OutputDestinations gOutputDestinations
static

Definition at line 68 of file ntv2democommon.cpp.

◆ gOutputDestsAnalog

NTV2OutputDestinations gOutputDestsAnalog
static

Definition at line 71 of file ntv2democommon.cpp.

◆ gOutputDestsHDMI

NTV2OutputDestinations gOutputDestsHDMI
static

Definition at line 70 of file ntv2democommon.cpp.

◆ gOutputDestsSDI

NTV2OutputDestinations gOutputDestsSDI
static

Definition at line 69 of file ntv2democommon.cpp.

◆ gPixelFormats

NTV2FrameBufferFormatSet gPixelFormats
static

Definition at line 57 of file ntv2democommon.cpp.

◆ gSDHDFormats

NTV2VideoFormatSet gSDHDFormats
static

Definition at line 54 of file ntv2democommon.cpp.

◆ gString2AudioSystemMap

String2AudioSystemMap gString2AudioSystemMap
static

Definition at line 74 of file ntv2democommon.cpp.

◆ gString2InputSourceMap

String2InputSourceMap gString2InputSourceMap
static

Definition at line 76 of file ntv2democommon.cpp.

◆ gString2OutputDestMap

String2OutputDestMap gString2OutputDestMap
static

Definition at line 77 of file ntv2democommon.cpp.

◆ gString2PixelFormatMap

String2PixelFormatMap gString2PixelFormatMap
static

Definition at line 73 of file ntv2democommon.cpp.

◆ gString2TCIndexMap

String2TCIndexMap gString2TCIndexMap
static

Definition at line 85 of file ntv2democommon.cpp.

◆ gString2TPNamesMap

String2TPNamesMap gString2TPNamesMap
static

Definition at line 86 of file ntv2democommon.cpp.

◆ gString2VANCModeMap

String2VANCModeMap gString2VANCModeMap
static

Definition at line 75 of file ntv2democommon.cpp.

◆ gString2VideoFormatMMap

String2VideoFormatMMap gString2VideoFormatMMap
static

Definition at line 72 of file ntv2democommon.cpp.

◆ gTCIndexes

NTV2TCIndexSet gTCIndexes
static

Definition at line 78 of file ntv2democommon.cpp.

◆ gTCIndexesAnalog

NTV2TCIndexSet gTCIndexesAnalog
static

Definition at line 81 of file ntv2democommon.cpp.

◆ gTCIndexesATCLTC

NTV2TCIndexSet gTCIndexesATCLTC
static

Definition at line 82 of file ntv2democommon.cpp.

◆ gTCIndexesHDMI

NTV2TCIndexSet gTCIndexesHDMI
static

Definition at line 80 of file ntv2democommon.cpp.

◆ gTCIndexesSDI

NTV2TCIndexSet gTCIndexesSDI
static

Definition at line 79 of file ntv2democommon.cpp.

◆ gTCIndexesVITC1

NTV2TCIndexSet gTCIndexesVITC1
static

Definition at line 83 of file ntv2democommon.cpp.

◆ gTCIndexesVITC2

NTV2TCIndexSet gTCIndexesVITC2
static

Definition at line 84 of file ntv2democommon.cpp.

◆ gTestPatternNames

NTV2StringList gTestPatternNames
static

Definition at line 87 of file ntv2democommon.cpp.