AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
ntv2democommon.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2democommon.h"
9 #include "ntv2devicescanner.h"
10 #include "ntv2devicefeatures.h"
11 #include "ntv2testpatterngen.h"
12 #include "ntv2debug.h"
13 #include "ntv2utils.h"
14 #include "ajabase/common/common.h"
15 #include <algorithm>
16 #include <map>
17 #include <iomanip>
18 #if defined (AJAMac) || defined (AJALinux)
19  #include <unistd.h>
20  #include <termios.h>
21 #endif
22 
23 using namespace std;
24 
25 typedef multimap <string, NTV2VideoFormat> String2VideoFormatMMap;
26 typedef String2VideoFormatMMap::const_iterator String2VideoFormatMMapCI;
27 
28 typedef map <string, NTV2FrameBufferFormat> String2PixelFormatMap;
29 typedef String2PixelFormatMap::const_iterator String2PixelFormatMapConstIter;
30 
31 typedef map <string, NTV2AudioSystem> String2AudioSystemMap;
32 typedef String2AudioSystemMap::const_iterator String2AudioSystemMapConstIter;
33 
34 typedef map <string, NTV2VANCMode> String2VANCModeMap;
35 typedef String2VANCModeMap::const_iterator String2VANCModeMapConstIter;
36 
37 typedef map <string, NTV2InputSource> String2InputSourceMap;
38 typedef String2InputSourceMap::const_iterator String2InputSourceMapConstIter;
39 
40 typedef map <string, NTV2OutputDestination> String2OutputDestMap;
41 typedef String2OutputDestMap::const_iterator String2OutputDestMapConstIter;
42 
43 typedef map <string, NTV2TCIndex> String2TCIndexMap;
44 typedef pair <string, NTV2TCIndex> String2TCIndexPair;
45 typedef String2TCIndexMap::const_iterator String2TCIndexMapConstIter;
46 
47 typedef map <string, string> String2TPNamesMap;
48 typedef pair <string, string> String2TPNamePair;
49 typedef String2TPNamesMap::const_iterator String2TPNamesMapConstIter;
50 
51 
52 static const string gGlobalMutexName ("com.aja.ntv2.mutex.demo");
88 
89 
91 {
92  public:
94  {
95  typedef pair <string, NTV2VideoFormat> String2VideoFormatPair;
96  typedef pair <string, NTV2FrameBufferFormat> String2PixelFormatPair;
97  typedef pair <string, NTV2AudioSystem> String2AudioSystemPair;
98  typedef pair <string, NTV2VANCMode> String2VANCModePair;
99  typedef pair <string, NTV2InputSource> String2InputSourcePair;
100  typedef pair <string, NTV2OutputDestination> String2OutputDestPair;
101 
102  NTV2_ASSERT (gSDHDFormats.empty());
103  for (NTV2VideoFormat legalFormat(NTV2_FORMAT_UNKNOWN); legalFormat < NTV2_MAX_NUM_VIDEO_FORMATS; legalFormat = NTV2VideoFormat(legalFormat + 1))
104  {
105  if (!NTV2_IS_VALID_VIDEO_FORMAT(legalFormat))
106  continue;
107  string str(::NTV2VideoFormatToString (legalFormat));
108 
109  if (NTV2_IS_QUAD_QUAD_FORMAT(legalFormat))
110  g8KFormats.insert(legalFormat);
111  else if (NTV2_IS_4K_VIDEO_FORMAT(legalFormat))
112  g4KFormats.insert(legalFormat);
113  else
114  gSDHDFormats.insert(legalFormat);
115  gAllFormats.insert(legalFormat);
116 
117  if (legalFormat == NTV2_FORMAT_525_5994) str = "525i2997";
118  else if (legalFormat == NTV2_FORMAT_625_5000) str = "625i25";
119  else if (legalFormat == NTV2_FORMAT_525_2398) str = "525i2398";
120  else if (legalFormat == NTV2_FORMAT_525_2400) str = "525i24";
121  else
122  {
123  if (str.at (str.length() - 1) == 'a') // If it ends in "a"...
124  str.erase (str.length() - 1); // ...lop off the "a"
125 
126  if (str.find(".00") != string::npos) // If it ends in ".00"...
127  str.erase (str.find(".00"), 3); // ...lop off the ".00" (but keep the "b", if any)
128 
129  while (str.find(" ") != string::npos)
130  str.erase (str.find(" "), 1); // Remove all spaces
131 
132  if (str.find(".") != string::npos)
133  str.erase (str.find("."), 1); // Remove "."
134 
135  str = CNTV2DemoCommon::ToLower(str); // Fold to lower case
136  }
137  gString2VideoFormatMMap.insert (String2VideoFormatPair (str, legalFormat));
138  gString2VideoFormatMMap.insert (String2VideoFormatPair (ULWordToString(legalFormat), legalFormat));
139  } // for each video format supported in demo apps
140 
141  // Add popular format names...
142  gString2VideoFormatMMap.insert (String2VideoFormatPair ("sd", NTV2_FORMAT_525_5994));
143  gString2VideoFormatMMap.insert (String2VideoFormatPair ("525i", NTV2_FORMAT_525_5994));
144  gString2VideoFormatMMap.insert (String2VideoFormatPair ("625i", NTV2_FORMAT_625_5000));
145  gString2VideoFormatMMap.insert (String2VideoFormatPair ("720p", NTV2_FORMAT_720p_5994));
146  gString2VideoFormatMMap.insert (String2VideoFormatPair ("hd", NTV2_FORMAT_1080i_5994));
147  gString2VideoFormatMMap.insert (String2VideoFormatPair ("1080i", NTV2_FORMAT_1080i_5994));
148  gString2VideoFormatMMap.insert (String2VideoFormatPair ("1080i50", NTV2_FORMAT_1080i_5000));
149  gString2VideoFormatMMap.insert (String2VideoFormatPair ("1080p", NTV2_FORMAT_1080p_5994_B));
150  gString2VideoFormatMMap.insert (String2VideoFormatPair ("1080p50", NTV2_FORMAT_1080p_5000_B));
151 
152  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd", NTV2_FORMAT_4x1920x1080p_6000));
153  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd", NTV2_FORMAT_3840x2160p_6000));
154  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd2398", NTV2_FORMAT_4x1920x1080p_2398));
155  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd2398", NTV2_FORMAT_3840x2160p_2398));
156  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd24", NTV2_FORMAT_4x1920x1080p_2400));
157  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd24", NTV2_FORMAT_3840x2160p_2400));
158  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd25", NTV2_FORMAT_4x1920x1080p_2500));
159  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd25", NTV2_FORMAT_3840x2160p_2500));
160  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd50", NTV2_FORMAT_4x1920x1080p_5000));
161  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd50", NTV2_FORMAT_3840x2160p_5000));
162  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd5994", NTV2_FORMAT_4x1920x1080p_5994));
163  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd5994", NTV2_FORMAT_3840x2160p_5994));
164  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd60", NTV2_FORMAT_4x1920x1080p_6000));
165  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd60", NTV2_FORMAT_3840x2160p_6000));
166 
167  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k", NTV2_FORMAT_4x2048x1080p_6000));
168  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k", NTV2_FORMAT_4096x2160p_6000));
169  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k2398", NTV2_FORMAT_4x2048x1080p_2398));
170  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k2398", NTV2_FORMAT_4096x2160p_2398));
171  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k24", NTV2_FORMAT_4x2048x1080p_2400));
172  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k24", NTV2_FORMAT_4096x2160p_2400));
173  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k25", NTV2_FORMAT_4x2048x1080p_2500));
174  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k25", NTV2_FORMAT_4096x2160p_2500));
175  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k4795", NTV2_FORMAT_4x2048x1080p_4795));
176  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k4795", NTV2_FORMAT_4096x2160p_4795));
177  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k48", NTV2_FORMAT_4x2048x1080p_4800));
178  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k48", NTV2_FORMAT_4096x2160p_4800));
179  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k50", NTV2_FORMAT_4x2048x1080p_5000));
180  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k50", NTV2_FORMAT_4096x2160p_5000));
181  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k5994", NTV2_FORMAT_4x2048x1080p_5994));
182  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k5994", NTV2_FORMAT_4096x2160p_5994));
183  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k60", NTV2_FORMAT_4x2048x1080p_6000));
184  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k60", NTV2_FORMAT_4096x2160p_6000));
185  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k11988", NTV2_FORMAT_4x2048x1080p_11988));
186  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k11988", NTV2_FORMAT_4096x2160p_11988));
187  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k120", NTV2_FORMAT_4x2048x1080p_12000));
188  gString2VideoFormatMMap.insert (String2VideoFormatPair ("4k120", NTV2_FORMAT_4096x2160p_12000));
189 
190  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd2", NTV2_FORMAT_4x3840x2160p_2398));
191  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd22398", NTV2_FORMAT_4x3840x2160p_2398));
192  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd224", NTV2_FORMAT_4x3840x2160p_2400));
193  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd225", NTV2_FORMAT_4x3840x2160p_2500));
194  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd250", NTV2_FORMAT_4x3840x2160p_5000));
195  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd25994", NTV2_FORMAT_4x3840x2160p_5994));
196  gString2VideoFormatMMap.insert (String2VideoFormatPair ("uhd260", NTV2_FORMAT_4x3840x2160p_6000));
197 
198  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k", NTV2_FORMAT_4x4096x2160p_6000));
199  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k2398", NTV2_FORMAT_4x4096x2160p_2398));
200  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k24", NTV2_FORMAT_4x4096x2160p_2400));
201  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k25", NTV2_FORMAT_4x4096x2160p_2500));
202  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k4795", NTV2_FORMAT_4x4096x2160p_4795));
203  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k48", NTV2_FORMAT_4x4096x2160p_4800));
204  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k50", NTV2_FORMAT_4x4096x2160p_5000));
205  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k5994", NTV2_FORMAT_4x4096x2160p_5994));
206  gString2VideoFormatMMap.insert (String2VideoFormatPair ("8k60", NTV2_FORMAT_4x4096x2160p_6000));
207 
208  NTV2_ASSERT (gPixelFormats.empty ());
209  for (NTV2FrameBufferFormat legalFormat (NTV2_FBF_10BIT_YCBCR); legalFormat < NTV2_FBF_NUMFRAMEBUFFERFORMATS; legalFormat = NTV2FrameBufferFormat (legalFormat + 1))
210  {
211  string str;
212  if (!NTV2_IS_VALID_FRAME_BUFFER_FORMAT (legalFormat))
213  continue;
214 
215  gPixelFormats.insert (legalFormat);
216  if (NTV2_IS_FBF_PLANAR (legalFormat))
217  gFBFsPlanar.insert (legalFormat);
218  if (NTV2_IS_FBF_RGB (legalFormat))
219  gFBFsRGB.insert (legalFormat);
220  if (NTV2_IS_FBF_PRORES (legalFormat))
221  gFBFsProRes.insert (legalFormat);
222  if (NTV2_FBF_HAS_ALPHA (legalFormat))
223  gFBFsAlpha.insert (legalFormat);
224  if (NTV2_FBF_IS_RAW (legalFormat))
225  gFBFsRaw.insert (legalFormat);
226 
227  str = ::NTV2FrameBufferFormatToString (legalFormat, true);
228  while (str.find (" ") != string::npos)
229  str.erase (str.find (" "), 1); // Remove all spaces
230 
231  while (str.find ("-") != string::npos)
232  str.erase (str.find ("-"), 1); // Remove all "-"
233 
234  if (str.find ("compatible") != string::npos)
235  str.erase (str.find ("compatible"), 10); // Remove "compatible"
236 
237  if (str.find ("ittle") != string::npos)
238  str.erase (str.find ("ittle"), 5); // Remove "ittle"
239 
240  if (str.find ("ndian") != string::npos)
241  str.erase (str.find ("ndian"), 5); // Remove "ndian"
242 
243  str = CNTV2DemoCommon::ToLower (str); // Fold to lower case
244 
245  gString2PixelFormatMap.insert (String2PixelFormatPair (str, legalFormat));
246 
247  str = ::NTV2FrameBufferFormatToString (legalFormat, false);
248  if (str.find ("NTV2_FBF_") == 0) // If it starts with "NTV2_FBF_"...
249  str.erase (0, 9); // ...lop it off
250 
251  while (str.find (" ") != string::npos)
252  str.erase (str.find (" "), 1); // Remove all spaces
253 
254  while (str.find ("_") != string::npos)
255  str.erase (str.find ("_"), 1); // Remove all "_"
256 
257  str = CNTV2DemoCommon::ToLower (str); // Fold to lower case
258 
259  gString2PixelFormatMap.insert (String2PixelFormatPair (str, legalFormat));
260  gString2PixelFormatMap.insert (String2PixelFormatPair (::NTV2FrameBufferFormatToString (legalFormat, false), legalFormat));
261  gString2PixelFormatMap.insert (String2PixelFormatPair (ULWordToString (legalFormat), legalFormat));
262  } // for each pixel format supported in demo apps
263 
264  // Add popular pixel format names...
265  gString2PixelFormatMap.insert (String2PixelFormatPair ("v210", NTV2_FBF_10BIT_YCBCR));
266  gString2PixelFormatMap.insert (String2PixelFormatPair ("yuv10", NTV2_FBF_10BIT_YCBCR));
267  gString2PixelFormatMap.insert (String2PixelFormatPair ("2vuy", NTV2_FBF_8BIT_YCBCR));
268  gString2PixelFormatMap.insert (String2PixelFormatPair ("uyvy", NTV2_FBF_8BIT_YCBCR));
269  gString2PixelFormatMap.insert (String2PixelFormatPair ("argb", NTV2_FBF_ARGB));
270  gString2PixelFormatMap.insert (String2PixelFormatPair ("argb8", NTV2_FBF_ARGB));
271  gString2PixelFormatMap.insert (String2PixelFormatPair ("bgra", NTV2_FBF_RGBA));
272  gString2PixelFormatMap.insert (String2PixelFormatPair ("bgra8", NTV2_FBF_RGBA));
273  gString2PixelFormatMap.insert (String2PixelFormatPair ("rgba", NTV2_FBF_RGBA));
274  gString2PixelFormatMap.insert (String2PixelFormatPair ("rgba8", NTV2_FBF_RGBA));
275  gString2PixelFormatMap.insert (String2PixelFormatPair ("rgb10", NTV2_FBF_10BIT_RGB));
276  gString2PixelFormatMap.insert (String2PixelFormatPair ("yuy2", NTV2_FBF_8BIT_YCBCR_YUY2));
277  gString2PixelFormatMap.insert (String2PixelFormatPair ("abgr", NTV2_FBF_ABGR));
278  gString2PixelFormatMap.insert (String2PixelFormatPair ("abgr8", NTV2_FBF_ABGR));
279  gString2PixelFormatMap.insert (String2PixelFormatPair ("rgb10dpx", NTV2_FBF_10BIT_DPX));
280  gString2PixelFormatMap.insert (String2PixelFormatPair ("yuv10dpx", NTV2_FBF_10BIT_YCBCR_DPX));
281  gString2PixelFormatMap.insert (String2PixelFormatPair ("ycbcr10dpx", NTV2_FBF_10BIT_YCBCR_DPX));
282  gString2PixelFormatMap.insert (String2PixelFormatPair ("dvcpro8", NTV2_FBF_8BIT_DVCPRO));
283  gString2PixelFormatMap.insert (String2PixelFormatPair ("i420", NTV2_FBF_8BIT_YCBCR_420PL3));
284  gString2PixelFormatMap.insert (String2PixelFormatPair ("hdv", NTV2_FBF_8BIT_HDV));
285  gString2PixelFormatMap.insert (String2PixelFormatPair ("hdv8", NTV2_FBF_8BIT_HDV));
286  gString2PixelFormatMap.insert (String2PixelFormatPair ("rgb24", NTV2_FBF_24BIT_RGB));
287  gString2PixelFormatMap.insert (String2PixelFormatPair ("bgr24", NTV2_FBF_24BIT_BGR));
288  gString2PixelFormatMap.insert (String2PixelFormatPair ("ycbcra10", NTV2_FBF_10BIT_YCBCRA));
289  gString2PixelFormatMap.insert (String2PixelFormatPair ("rgb10dpxle", NTV2_FBF_10BIT_DPX_LE));
290  gString2PixelFormatMap.insert (String2PixelFormatPair ("proresdvcpro", NTV2_FBF_PRORES_DVCPRO));
291  gString2PixelFormatMap.insert (String2PixelFormatPair ("proreshdv", NTV2_FBF_PRORES_HDV));
292  gString2PixelFormatMap.insert (String2PixelFormatPair ("rgb10packed", NTV2_FBF_10BIT_RGB_PACKED));
293  gString2PixelFormatMap.insert (String2PixelFormatPair ("argb10", NTV2_FBF_10BIT_ARGB));
294  gString2PixelFormatMap.insert (String2PixelFormatPair ("argb16", NTV2_FBF_16BIT_ARGB));
295  gString2PixelFormatMap.insert (String2PixelFormatPair ("rgb10raw", NTV2_FBF_10BIT_RAW_RGB));
296  gString2PixelFormatMap.insert (String2PixelFormatPair ("ycbcr10raw", NTV2_FBF_10BIT_RAW_YCBCR));
297  gString2PixelFormatMap.insert (String2PixelFormatPair ("yuv10raw", NTV2_FBF_10BIT_RAW_YCBCR));
298 
299  // Audio systems...
300  for (uint8_t ndx (0); ndx < 8; ndx++)
301  gString2AudioSystemMap.insert (String2AudioSystemPair(ULWordToString (ndx + 1), NTV2AudioSystem(ndx)));
302 
303  // VANC Modes...
305  {
306  gString2VANCModeMap.insert (String2VANCModePair(aja::to_string(vm), vm));
307 // gString2VANCModeMap.insert (String2VANCModePair(::NTV2VANCModeToString(vm, false), vm));
308  gString2VANCModeMap.insert (String2VANCModePair(::NTV2VANCModeToString(vm, true), vm));
309  }
310 
311  // Input Sources...
316  for (NTV2InputSourceSetConstIter it(gInputSources.begin()); it != gInputSources.end(); ++it)
317  {
318  const NTV2InputSource src(*it);
319  string sSmall(::NTV2InputSourceToString(src, true)), sBig(::NTV2InputSourceToString(src, false));
320  gString2InputSourceMap.insert(String2InputSourcePair(sBig, src));
321  gString2InputSourceMap.insert(String2InputSourcePair(sSmall, src));
322  gString2InputSourceMap.insert(String2InputSourcePair(CNTV2DemoCommon::ToLower(sSmall), src));
323  if (NTV2_INPUT_SOURCE_IS_SDI(src))
324  {
325  sSmall.erase(0, 3); // Erase first 3 chars to leave just the number (e.g. "SDI3" becomes "3")
326  gString2InputSourceMap.insert(String2InputSourcePair(sSmall, src));
327  }
328  } // for each input source
329  gString2InputSourceMap.insert(String2InputSourcePair(string("hdmi"),NTV2_INPUTSOURCE_HDMI1));
330 
331  // Output Destinations...
336  for (NTV2OutputDestinationsConstIter it(gOutputDestinations.begin()); it != gOutputDestinations.end(); ++it)
337  {
338  const NTV2OutputDest dst(*it);
339  string sSmall(::NTV2OutputDestinationToString(dst, true)), sBig(::NTV2OutputDestinationToString(dst, false));
340  gString2OutputDestMap.insert(String2OutputDestPair(sBig, dst));
341  gString2OutputDestMap.insert(String2OutputDestPair(sSmall, dst));
342  gString2OutputDestMap.insert(String2OutputDestPair(CNTV2DemoCommon::ToLower(sSmall), dst));
343  if (NTV2_OUTPUT_DEST_IS_SDI(dst))
344  {
345  const string str(aja::to_string(UWord(::NTV2OutputDestinationToChannel(dst)+1)));
346  gString2OutputDestMap.insert(String2OutputDestPair(str, dst));
347  }
348  } // for each output dest
349  gString2OutputDestMap.insert(String2OutputDestPair(string("hdmi1"), NTV2_OUTPUTDESTINATION_HDMI1));
350 
351  // TCIndexes...
352  for (uint16_t ndx (0); ndx < NTV2_MAX_NUM_TIMECODE_INDEXES; ndx++)
353  {
354  const NTV2TCIndex tcIndex (NTV2TCIndex(ndx+0));
355  if (tcIndex == NTV2_TCINDEX_DEFAULT)
356  continue; // Skip NTV2_TCINDEX_DEFAULT
357  gTCIndexes.insert (tcIndex);
358  gString2TCIndexMap.insert (String2TCIndexPair(ULWordToString(ndx), tcIndex));
359  gString2TCIndexMap.insert (String2TCIndexPair(::NTV2TCIndexToString(tcIndex, false), tcIndex));
361  if (NTV2_IS_ANALOG_TIMECODE_INDEX(tcIndex))
362  gTCIndexesAnalog.insert (tcIndex);
363  else
364  gTCIndexesSDI.insert (tcIndex);
365  if (NTV2_IS_ATC_LTC_TIMECODE_INDEX(tcIndex))
366  gTCIndexesATCLTC.insert (tcIndex);
368  gTCIndexesVITC1.insert (tcIndex);
370  gTCIndexesVITC2.insert (tcIndex);
371  }
372 
373  { // Test Patterns...
377  {
378  string tpName(tpNames.at(tp));
379  aja::replace(aja::replace(aja::replace(tpName, " ", ""), "%", ""), "_", "");
380  gString2TPNamesMap.insert(String2TPNamePair(aja::lower(tpName), tpNames.at(tp)));
381  ostringstream oss; oss << DEC(tp);
382  gString2TPNamesMap.insert(String2TPNamePair(oss.str(), tpNames.at(tp)));
383  }
384  for (NTV2StringListConstIter it(colorNames.begin()); it != colorNames.end(); ++it)
385  {
386  string colorName(*it);
387  aja::replace(aja::replace(aja::replace(colorName, " ", ""), "%", ""), "_", "");
388  gString2TPNamesMap.insert(String2TPNamePair(aja::lower(colorName), *it));
389  }
390  }
391  } // constructor
392  private:
393  string ULWordToString (const ULWord inNum)
394  {
395  ostringstream oss;
396  oss << inNum;
397  return oss.str ();
398  }
399 }; // constructor
400 
402 
403 
405 {
406  NTV2TimeCodesConstIter it(fTimecodes.find(inTCNdx));
407  if (it != fTimecodes.end())
408  return it->second;
409  return NTV2_RP188();
410 }
411 
413 {
414  size_t errorCount(0);
415  if (fVideoBuffer)
416  if (!inDevice.DMABufferLock(fVideoBuffer, true))
417  errorCount++;
418  if (fVideoBuffer2)
419  if (!inDevice.DMABufferLock(fVideoBuffer2, true))
420  errorCount++;
421  if (fAudioBuffer)
422  if (!inDevice.DMABufferLock(fAudioBuffer, true))
423  errorCount++;
424  if (fAncBuffer)
425  if (!inDevice.DMABufferLock(fAncBuffer, true))
426  errorCount++;
427  if (fAncBuffer2)
428  if (!inDevice.DMABufferLock(fAncBuffer2, true))
429  errorCount++;
430  return !errorCount;
431 }
432 
434 {
435  size_t errorCount(0);
436  if (fVideoBuffer)
437  if (!inDevice.DMABufferUnlock(fVideoBuffer))
438  errorCount++;
439  if (fVideoBuffer2)
440  if (!inDevice.DMABufferUnlock(fVideoBuffer2))
441  errorCount++;
442  if (fAudioBuffer)
443  if (!inDevice.DMABufferUnlock(fAudioBuffer))
444  errorCount++;
445  if (fAncBuffer)
446  if (!inDevice.DMABufferUnlock(fAncBuffer))
447  errorCount++;
448  if (fAncBuffer2)
449  if (!inDevice.DMABufferUnlock(fAncBuffer2))
450  errorCount++;
451  return !errorCount;
452 }
453 
454 
455 bool CNTV2DemoCommon::IsValidDevice (const string & inDeviceSpec)
456 {
457  CNTV2Card device;
458  const string deviceSpec (inDeviceSpec.empty() ? "0" : inDeviceSpec);
459  if (! CNTV2DeviceScanner::GetFirstDeviceFromArgument (deviceSpec, device))
460  {
461  if (deviceSpec != "LIST" && deviceSpec != "list" && deviceSpec != "?")
462  cerr << "## ERROR: Failed to open device spec '" << deviceSpec << "'" << endl;
463  return false;
464  }
465  return true;
466 }
467 
468 
469 static string DeviceFilterString (const NTV2DeviceKinds inKinds)
470 {
471  if (inKinds == NTV2_DEVICEKIND_ALL)
472  return "any device";
473  else if (inKinds == NTV2_DEVICEKIND_NONE)
474  return "no device";
475 
476  NTV2StringList strs;
477  if (inKinds & NTV2_DEVICEKIND_INPUT)
478  strs.push_back("capture");
479  if (inKinds & NTV2_DEVICEKIND_OUTPUT)
480  strs.push_back("playout");
481  if (inKinds & NTV2_DEVICEKIND_SDI)
482  strs.push_back("SDI");
483  if (inKinds & NTV2_DEVICEKIND_HDMI)
484  strs.push_back("HDMI");
485  if (inKinds & NTV2_DEVICEKIND_ANALOG)
486  strs.push_back("analog video");
487  if (inKinds & NTV2_DEVICEKIND_SFP)
488  strs.push_back("IP/SFPs");
489  if (inKinds & NTV2_DEVICEKIND_EXTERNAL)
490  strs.push_back("Thunderbolt/PCMCIA");
491  if (inKinds & NTV2_DEVICEKIND_4K)
492  strs.push_back("4K");
493  if (inKinds & NTV2_DEVICEKIND_12G)
494  strs.push_back("12G SDI");
495  if (inKinds & NTV2_DEVICEKIND_6G)
496  strs.push_back("6G SDI");
497  if (inKinds & NTV2_DEVICEKIND_CUSTOM_ANC)
498  strs.push_back("custom Anc");
499  if (inKinds & NTV2_DEVICEKIND_RELAYS)
500  strs.push_back("SDI relays");
501  if (strs.empty())
502  return "??";
503  return aja::join(strs, " | ");
504 }
505 
506 
508 {
509  if ((inKinds & VIDEO_FORMATS_ALL) == VIDEO_FORMATS_ALL)
510  return gAllFormats;
511 
512  NTV2VideoFormatSet result;
513  if (inKinds & VIDEO_FORMATS_SDHD)
514  result += gSDHDFormats;
515  if (inKinds & VIDEO_FORMATS_4KUHD)
516  result += g4KFormats;
517  if (inKinds & VIDEO_FORMATS_8KUHD2)
518  result += g8KFormats;
519  return result;
520 }
521 
522 
523 string CNTV2DemoCommon::GetVideoFormatStrings (const NTV2VideoFormatKinds inKinds, const string inDevSpec)
524 {
525  const NTV2VideoFormatSet & formatSet(GetSupportedVideoFormats(inKinds));
526  ostringstream oss;
527  CNTV2Card dev;
528  if (!inDevSpec.empty())
529  dev.Open(inDevSpec);
530 
531  oss << setw(25) << left << "Supported Video Format" << "\t" << setw(16) << left << "Legal -v Values" << endl
532  << setw(25) << left << "------------------------" << "\t" << setw(16) << left << "----------------" << endl;
533  for (NTV2VideoFormatSetConstIter iter(formatSet.begin()); iter != formatSet.end(); ++iter)
534  { const NTV2VideoFormat vf(*iter);
535  const string vfName (::NTV2VideoFormatToString(vf, true));
536  if (vfName == "Unknown")
537  continue;
538  NTV2StringList vfNames;
540  if (vf == it->second)
541  {
542  if (!inDevSpec.empty() && dev.IsOpen() && !dev.features().CanDoVideoFormat(vf))
543  continue;
544  vfNames.push_back(it->first);
545  }
546  if (!vfNames.empty())
547  oss << setw(25) << left << vfName << "\t" << aja::join(vfNames,", ") << endl;
548  }
549  return oss.str();
550 }
551 
552 
553 NTV2VideoFormat CNTV2DemoCommon::GetVideoFormatFromString (const string & inStr, const NTV2VideoFormatKinds inKinds, const string & inDevSpec)
554 {
556  if (iter == gString2VideoFormatMMap.end())
557  return NTV2_FORMAT_UNKNOWN;
558 
559  CNTV2Card dev;
560  if (!inDevSpec.empty())
561  dev.Open(inDevSpec);
562 
563  // If a device was specifed, look for the first name-matching format it supports...
564  NTV2VideoFormat vf(iter->second);
565  while (dev.IsOpen() && !dev.features().CanDoVideoFormat(vf))
566  {
567  if (++iter == gString2VideoFormatMMap.end())
568  return NTV2_FORMAT_UNKNOWN;
569  if (inStr != iter->first)
570  return NTV2_FORMAT_UNKNOWN;
571  vf = iter->second;
572  }
573  if ((inKinds & VIDEO_FORMATS_ALL) == VIDEO_FORMATS_ALL)
574  return vf;
575  if (inKinds & VIDEO_FORMATS_4KUHD && NTV2_IS_4K_VIDEO_FORMAT(vf))
576  return vf;
577  if (inKinds & VIDEO_FORMATS_8KUHD2 && NTV2_IS_QUAD_QUAD_FORMAT(vf))
578  return vf;
579  if (inKinds & VIDEO_FORMATS_SDHD && !NTV2_IS_4K_VIDEO_FORMAT(vf))
580  return vf;
581  return NTV2_FORMAT_UNKNOWN;
582 }
583 
584 
586 {
587  if (inKinds == PIXEL_FORMATS_ALL)
588  return gPixelFormats;
589 
591  if (inKinds & PIXEL_FORMATS_RGB)
592  result += gFBFsRGB;
593  if (inKinds & PIXEL_FORMATS_PLANAR)
594  result += gFBFsPlanar;
595  if (inKinds & PIXEL_FORMATS_RAW)
596  result += gFBFsRaw;
597  if (inKinds & PIXEL_FORMATS_PACKED)
598  result += gFBFsPacked;
599  if (inKinds & PIXEL_FORMATS_ALPHA)
600  result += gFBFsAlpha;
601  return result;
602 }
603 
604 
605 string CNTV2DemoCommon::GetPixelFormatStrings (const NTV2PixelFormatKinds inKinds, const string inDevSpec)
606 {
607  const NTV2FrameBufferFormatSet & formatSet (GetSupportedPixelFormats(inKinds));
608  CNTV2Card dev;
609  ostringstream oss;
610 
611  if (!inDevSpec.empty())
612  dev.Open(inDevSpec);
613 
614  oss << setw(34) << left << "Frame Buffer Format" << "\t" << setw(32) << left << "Legal -p Values" << endl
615  << setw(34) << left << "----------------------------------" << "\t" << setw(32) << left << "--------------------------------" << endl;
616  for (NTV2FrameBufferFormatSetConstIter iter(formatSet.begin()); iter != formatSet.end(); ++iter)
617  {
618  const NTV2PixelFormat pf(*iter);
619  const string pfName (::NTV2FrameBufferFormatToString (pf, true));
620  if (pfName.empty())
621  continue;
622  NTV2StringList pfNames;
624  if (pf == it->second)
625  {
626  if (!inDevSpec.empty() && dev.IsOpen() && !dev.features().CanDoFrameBufferFormat(pf))
627  continue;
628  pfNames.push_back(it->first);
629  }
630  if (!pfNames.empty())
631  oss << setw(35) << left << pfName << "\t" << aja::join(pfNames, ", ") << endl;
632  }
633  return oss.str();
634 }
635 
636 
637 NTV2PixelFormat CNTV2DemoCommon::GetPixelFormatFromString (const string & inStr, const NTV2PixelFormatKinds inKinds, const string inDevSpec)
638 {
640  if (iter == gString2PixelFormatMap.end())
641  return NTV2_FBF_INVALID;
642 
643  CNTV2Card dev;
644  if (!inDevSpec.empty())
645  dev.Open(inDevSpec);
646 
647  // If a device was specifed, look for the first name-matching format it supports...
648  NTV2PixelFormat pf(iter->second);
649  while (dev.IsOpen() && !dev.features().CanDoPixelFormat(pf))
650  {
651  if (++iter == gString2PixelFormatMap.end())
652  return NTV2_FBF_INVALID;
653  if (inStr != iter->first)
654  return NTV2_FBF_INVALID;
655  pf = iter->second;
656  }
657  if ((inKinds & PIXEL_FORMATS_ALL) == PIXEL_FORMATS_ALL)
658  return pf;
659  if (inKinds & PIXEL_FORMATS_RGB && NTV2_IS_FBF_RGB(pf))
660  return pf;
661  if (inKinds & PIXEL_FORMATS_PLANAR && NTV2_IS_FBF_PLANAR(pf))
662  return pf;
663  if (inKinds & PIXEL_FORMATS_RAW && !NTV2_FBF_IS_RAW(pf))
664  return pf;
665  if (inKinds & PIXEL_FORMATS_PACKED && !NTV2_IS_FBF_PRORES(pf))
666  return pf;
667  if (inKinds & PIXEL_FORMATS_ALPHA && !NTV2_FBF_HAS_ALPHA(pf))
668  return pf;
669  return NTV2_FBF_INVALID;
670 }
671 
672 
674 {
675  if (inKinds == NTV2_IOKINDS_ALL)
676  return gInputSources;
677 
678  NTV2InputSourceSet result;
679  if (inKinds & NTV2_IOKINDS_SDI)
680  result += gInputSourcesSDI;
681  if (inKinds & NTV2_IOKINDS_HDMI)
682  result += gInputSourcesHDMI;
683  if (inKinds & NTV2_IOKINDS_ANALOG)
684  result += gInputSourcesAnalog;
685  return result;
686 }
687 
688 
689 string CNTV2DemoCommon::GetInputSourceStrings (const NTV2IOKinds inKinds, const string inDevSpec)
690 {
691  const NTV2InputSourceSet & sourceSet (GetSupportedInputSources(inKinds));
692  CNTV2Card dev;
693  ostringstream oss;
694 
695  if (!inDevSpec.empty())
696  dev.Open(inDevSpec);
697 
698  oss << setw(25) << left << "Input Source" << "\t" << setw(16) << left << "Legal -i Values" << endl
699  << setw(25) << left << "------------------------" << "\t" << setw(16) << left << "----------------" << endl;
700  for (NTV2InputSourceSetConstIter iter(sourceSet.begin()); iter != sourceSet.end(); ++iter)
701  {
702  const NTV2InputSource src(*iter);
703  const string srcName (::NTV2InputSourceToString(src));
704  if (srcName.empty())
705  continue;
706  NTV2StringList srcNames;
708  if (src == it->second)
709  {
710  if (!inDevSpec.empty() && dev.IsOpen() && !dev.features().CanDoInputSource(src))
711  continue;
712  srcNames.push_back(it->first);
713  }
714  if (!srcNames.empty())
715  oss << setw(25) << left << srcName << "\t" << aja::join(srcNames, ", ") << endl;
716  }
717  return oss.str();
718 }
719 
720 
721 NTV2InputSource CNTV2DemoCommon::GetInputSourceFromString (const string & inStr, const NTV2IOKinds inKinds, const string inDevSpec)
722 {
724  if (iter == gString2InputSourceMap.end())
726 
727  CNTV2Card dev;
728  if (!inDevSpec.empty())
729  dev.Open(inDevSpec);
730 
731  // If a device was specifed, look for the first name-matching input source it supports...
732  NTV2InputSource src(iter->second);
733  while (dev.IsOpen() && !dev.features().CanDoInputSource(src))
734  {
735  if (++iter == gString2InputSourceMap.end())
737  if (inStr != iter->first)
739  src = iter->second;
740  }
741  if ((inKinds & NTV2_IOKINDS_ALL) == NTV2_IOKINDS_ALL)
742  return src;
743  if (inKinds & NTV2_IOKINDS_SDI && NTV2_INPUT_SOURCE_IS_SDI(src))
744  return src;
745  if (inKinds & NTV2_IOKINDS_HDMI && NTV2_INPUT_SOURCE_IS_HDMI(src))
746  return src;
747  if (inKinds & NTV2_IOKINDS_ANALOG && NTV2_INPUT_SOURCE_IS_ANALOG(src))
748  return src;
750 }
751 
752 
754 {
755  if (inKinds == NTV2_IOKINDS_ALL)
756  return gOutputDestinations;
757 
758  NTV2OutputDestinations result;
759  if (inKinds & NTV2_IOKINDS_SDI)
760  result += gOutputDestsSDI;
761  if (inKinds & NTV2_IOKINDS_HDMI)
762  result += gOutputDestsHDMI;
763  if (inKinds & NTV2_IOKINDS_ANALOG)
764  result += gOutputDestsAnalog;
765  return result;
766 }
767 
768 
769 string CNTV2DemoCommon::GetOutputDestinationStrings (const NTV2IOKinds inKinds, const string inDevSpec)
770 {
771  const NTV2OutputDestinations & dests (GetSupportedOutputDestinations(inKinds));
772  CNTV2Card dev;
773  ostringstream oss;
774 
775  if (!inDevSpec.empty())
776  dev.Open(inDevSpec);
777 
778  oss << setw(25) << left << "Output Destination" << "\t" << setw(16) << left << "Legal -o Values" << endl
779  << setw(25) << left << "------------------------" << "\t" << setw(16) << left << "----------------" << endl;
780  for (NTV2OutputDestinationsConstIter iter(dests.begin()); iter != dests.end(); ++iter)
781  {
782  const NTV2OutputDest dest(*iter);
783  const string destName(::NTV2OutputDestinationToString(dest));
784  if (destName.empty())
785  continue;
786  NTV2StringList destNames;
788  if (*iter == it->second)
789  {
790  if (!inDevSpec.empty() && dev.IsOpen() && !dev.features().CanDoOutputDestination(dest))
791  continue;
792  destNames.push_back(it->first);
793  }
794  if (!destNames.empty())
795  oss << setw(25) << left << destName << "\t" << aja::join(destNames, ", ") << endl;
796  }
797  return oss.str();
798 }
799 
800 
801 NTV2OutputDestination CNTV2DemoCommon::GetOutputDestinationFromString (const string & inStr, const NTV2IOKinds inKinds, const string inDevSpec)
802 {
804  if (iter == gString2OutputDestMap.end())
806 
807  CNTV2Card dev;
808  if (!inDevSpec.empty())
809  dev.Open(inDevSpec);
810 
811  // If a device was specifed, look for the first name-matching output destination it supports...
812  NTV2OutputDest dst(iter->second);
813  while (dev.IsOpen() && !dev.features().CanDoOutputDestination(dst))
814  {
815  if (++iter == gString2OutputDestMap.end())
817  if (inStr != iter->first)
819  dst = iter->second;
820  }
821  if ((inKinds & NTV2_IOKINDS_ALL) == NTV2_IOKINDS_ALL)
822  return dst;
823  if (inKinds & NTV2_IOKINDS_SDI && NTV2_OUTPUT_DEST_IS_SDI(dst))
824  return dst;
825  if (inKinds & NTV2_IOKINDS_HDMI && NTV2_OUTPUT_DEST_IS_HDMI(dst))
826  return dst;
827  if (inKinds & NTV2_IOKINDS_ANALOG && NTV2_OUTPUT_DEST_IS_ANALOG(dst))
828  return dst;
830 }
831 
832 
834 {
835  if (inKinds == TC_INDEXES_ALL)
836  return gTCIndexes;
837 
838  NTV2TCIndexes result;
839  if (inKinds & TC_INDEXES_SDI)
840  result += gTCIndexesSDI;
841  if (inKinds & TC_INDEXES_ANALOG)
842  result += gTCIndexesAnalog;
843  if (inKinds & TC_INDEXES_ATCLTC)
844  result += gTCIndexesATCLTC;
845  if (inKinds & TC_INDEXES_VITC1)
846  result += gTCIndexesVITC1;
847  if (inKinds & TC_INDEXES_VITC2)
848  result += gTCIndexesVITC2;
849  return result;
850 }
851 
853  const string inDevSpec,
854  const bool inIsInputOnly)
855 {
856  const NTV2TCIndexes & tcIndexes (GetSupportedTCIndexes(inKinds));
857  CNTV2Card dev;
858  ostringstream oss;
859 
860  if (!inDevSpec.empty())
861  dev.Open(inDevSpec);
862 
863  oss << setw(25) << left << "Timecode Index" << "\t" << setw(16) << left << "Legal Values" << endl
864  << setw(25) << left << "------------------------" << "\t" << setw(16) << left << "----------------" << endl;
865  for (NTV2TCIndexesConstIter iter (tcIndexes.begin()); iter != tcIndexes.end(); ++iter)
866  {
867  const NTV2TCIndex tcNdx(*iter);
868  const string tcNdxName (::NTV2TCIndexToString(tcNdx));
869  if (tcNdxName.empty())
870  continue;
871  NTV2StringList tcNdxNames;
872  for (String2TCIndexMapConstIter it (gString2TCIndexMap.begin()); it != gString2TCIndexMap.end(); ++it)
873  if (tcNdx == it->second)
874  {
875  if (!inDevSpec.empty() && dev.IsOpen())
876  if (!(inIsInputOnly ? dev.features().CanDoInputTCIndex(tcNdx) : dev.features().CanDoOutputTCIndex(tcNdx)))
877  continue;
878  tcNdxNames.push_back(it->first);
879  }
880  if (!tcNdxNames.empty())
881  oss << setw(25) << left << tcNdxName << "\t" << aja::join(tcNdxNames, ", ") << endl;
882  }
883  return oss.str();
884 }
885 
886 
887 NTV2TCIndex CNTV2DemoCommon::GetTCIndexFromString (const string & inStr, const NTV2TCIndexKinds inKinds, const string inDevSpec)
888 {
890  if (iter == gString2TCIndexMap.end())
891  return NTV2_TCINDEX_INVALID;
892 
893  CNTV2Card dev;
894  if (!inDevSpec.empty())
895  dev.Open(inDevSpec);
896 
897  // If a device was specifed, look for the first name-matching format it supports...
898  NTV2TCIndex tcNdx(iter->second);
900  while (dev.IsOpen() && !dev.features().CanDoInputSource(tcInpSrc))
901  {
902  if (++iter == gString2TCIndexMap.end())
903  return NTV2_TCINDEX_INVALID;
904  if (inStr != iter->first)
905  return NTV2_TCINDEX_INVALID;
906  tcNdx = iter->second;
907  tcInpSrc = ::NTV2TimecodeIndexToInputSource(tcNdx);
908  }
909  if ((inKinds & TC_INDEXES_ALL) == TC_INDEXES_ALL)
910  return tcNdx;
912  return tcNdx;
913  if (inKinds & TC_INDEXES_ANALOG && NTV2_IS_ANALOG_TIMECODE_INDEX(tcNdx))
914  return tcNdx;
915  if (inKinds & TC_INDEXES_ATCLTC && NTV2_IS_ATC_LTC_TIMECODE_INDEX(tcNdx))
916  return tcNdx;
917  if (inKinds & TC_INDEXES_VITC1 && NTV2_IS_ATC_VITC1_TIMECODE_INDEX(tcNdx))
918  return tcNdx;
919  if (inKinds & TC_INDEXES_VITC2 && NTV2_IS_ATC_VITC2_TIMECODE_INDEX(tcNdx))
920  return tcNdx;
921  return NTV2_TCINDEX_INVALID;
922 }
923 
924 
925 string CNTV2DemoCommon::GetAudioSystemStrings (const string inDeviceSpecifier)
926 {
927  CNTV2Card device;
928  string displayName;
929  ostringstream oss;
930 
931  if (!inDeviceSpecifier.empty())
932  {
933  CNTV2DeviceScanner::GetFirstDeviceFromArgument (inDeviceSpecifier, device);
934  if (device.IsOpen())
935  displayName = device.GetDisplayName();
936  }
937 
938  const UWord numAudioSystems (device.features().GetNumAudioSystems());
939  oss << setw(12) << left << "Audio System" << endl
940  << setw(12) << left << "------------" << endl;
941  for (UWord ndx(0); ndx < 8; ndx++)
942  {
943  oss << setw(12) << left << (ndx+1);
944  if (!displayName.empty() && ndx >= numAudioSystems)
945  oss << "\t## Incompatible with " << displayName;
946  oss << endl;
947  }
948  return oss.str();
949 }
950 
951 
953 {
955  return iter != gString2AudioSystemMap.end() ? iter->second : NTV2_AUDIOSYSTEM_INVALID;
956 }
957 
959 {
960  typedef map<string,string> NTV2StringMap;
961  NTV2StringSet keys;
962  for (String2VANCModeMapConstIter it(gString2VANCModeMap.begin()); it != gString2VANCModeMap.end(); ++it)
963  {
964  const string val(aja::to_string(it->second));
965  if (keys.find(val) == keys.end())
966  keys.insert(val);
967  }
968 
969  NTV2StringMap legals;
970  for (NTV2StringSet::const_iterator kit(keys.begin()); kit != keys.end(); ++kit)
971  {
972  NTV2VANCMode officialVM(NTV2VANCMode(aja::stoul(*kit)));
973  NTV2StringList legalValues;
974  for (String2VANCModeMapConstIter it(gString2VANCModeMap.begin()); it != gString2VANCModeMap.end(); ++it)
975  if (it->second == officialVM)
976  legalValues.push_back(it->first);
977  legals[aja::to_string(officialVM)] = aja::join(legalValues, ", ");
978  }
979 
980  ostringstream oss;
981  oss << setw(12) << left << "VANC Mode" << "\t" << setw(32) << left << "Legal --vanc Values " << endl
982  << setw(12) << left << "---------" << "\t" << setw(32) << left << "--------------------------------" << endl;
983  for (NTV2StringMap::const_iterator it(legals.begin()); it != legals.end(); ++it)
984  oss << setw(12) << left << it->first << "\t" << setw(32) << left << it->second << endl;
985  return oss.str();
986 }
987 
988 
990 {
992  return iter != gString2VANCModeMap.end() ? iter->second : NTV2_VANCMODE_INVALID;
993 }
994 
995 
997 {
998  typedef map<string,string> NTV2StringMap;
999  NTV2StringSet keys;
1000  for (String2TPNamesMapConstIter it(gString2TPNamesMap.begin()); it != gString2TPNamesMap.end(); ++it)
1001  if (keys.find(it->second) == keys.end())
1002  keys.insert(it->second);
1003 
1004  NTV2StringMap legals;
1005  for (NTV2StringSet::const_iterator kit(keys.begin()); kit != keys.end(); ++kit)
1006  {
1007  const string & officialPatName(*kit);
1008  NTV2StringList legalValues;
1009  for (String2TPNamesMapConstIter it(gString2TPNamesMap.begin()); it != gString2TPNamesMap.end(); ++it)
1010  if (it->second == officialPatName)
1011  legalValues.push_back(it->first);
1012  legals[officialPatName] = aja::join(legalValues, ", ");
1013  }
1014 
1015  ostringstream oss;
1016  oss << setw(25) << left << "Test Pattern or Color " << "\t" << setw(22) << left << "Legal --pattern Values" << endl
1017  << setw(25) << left << "------------------------" << "\t" << setw(22) << left << "----------------------" << endl;
1018  for (NTV2StringMap::const_iterator it(legals.begin()); it != legals.end(); ++it)
1019  oss << setw(25) << left << it->first << "\t" << setw(22) << left << it->second << endl;
1020  return oss.str();
1021 }
1022 
1023 
1025 {
1026  string tpName(inStr);
1027  aja::lower(aja::strip(aja::replace(tpName, " ", "")));
1029  return (it != gString2TPNamesMap.end()) ? it->second : "";
1030 }
1031 
1032 
1033 string CNTV2DemoCommon::ToLower (const string & inStr)
1034 {
1035  string result(inStr);
1036  return aja::lower(result);
1037 }
1038 
1039 
1040 string CNTV2DemoCommon::StripFormatString (const std::string & inStr)
1041 {
1042  string result (inStr);
1043  while (result.find (" ") != string::npos)
1044  result.erase (result.find (" "), 1);
1045  while (result.find ("00") != string::npos)
1046  result.erase (result.find ("00"), 2);
1047  while (result.find (".") != string::npos)
1048  result.erase (result.find ("."), 1);
1049  return result;
1050 }
1051 
1052 
1054 {
1055  char result (0);
1056  #if defined (AJAMac) || defined (AJALinux)
1057  struct termios terminalStatus;
1058  ::memset (&terminalStatus, 0, sizeof (terminalStatus));
1059  if (::tcgetattr (0, &terminalStatus) < 0)
1060  cerr << "tcsetattr()";
1061  terminalStatus.c_lflag &= ~uint32_t(ICANON);
1062  terminalStatus.c_lflag &= ~uint32_t(ECHO);
1063  terminalStatus.c_cc[VMIN] = 1;
1064  terminalStatus.c_cc[VTIME] = 0;
1065  if (::tcsetattr (0, TCSANOW, &terminalStatus) < 0)
1066  cerr << "tcsetattr ICANON";
1067  if (::read (0, &result, 1) < 0)
1068  cerr << "read()" << endl;
1069  terminalStatus.c_lflag |= ICANON;
1070  terminalStatus.c_lflag |= ECHO;
1071  if (::tcsetattr (0, TCSADRAIN, &terminalStatus) < 0)
1072  cerr << "tcsetattr ~ICANON" << endl;
1073  #elif defined (MSWindows) || defined (AJAWindows)
1074  HANDLE hdl (GetStdHandle (STD_INPUT_HANDLE));
1075  DWORD nEvents (0);
1076  INPUT_RECORD buffer;
1077  PeekConsoleInput (hdl, &buffer, 1, &nEvents);
1078  if (nEvents > 0)
1079  {
1080  ReadConsoleInput (hdl, &buffer, 1, &nEvents);
1081  result = char (buffer.Event.KeyEvent.wVirtualKeyCode);
1082  }
1083  #endif
1084  return result;
1085 }
1086 
1087 
1089 {
1090  cout << "## Press Enter/Return key to exit: ";
1091  cout.flush();
1092  cin.get();
1093 }
1094 
1095 
1097 {
1099  switch (inFrameRate)
1100  {
1101  case NTV2_FRAMERATE_6000: result = kTCFormat60fps; break;
1102  case NTV2_FRAMERATE_5994: result = kTCFormat60fpsDF; break;
1103  case NTV2_FRAMERATE_4800: result = kTCFormat48fps; break;
1104  case NTV2_FRAMERATE_4795: result = kTCFormat48fps; break;
1105  case NTV2_FRAMERATE_3000: result = kTCFormat30fps; break;
1106  case NTV2_FRAMERATE_2997: result = kTCFormat30fpsDF; break;
1107  case NTV2_FRAMERATE_2500: result = kTCFormat25fps; break;
1108  case NTV2_FRAMERATE_2400: result = kTCFormat24fps; break;
1109  case NTV2_FRAMERATE_2398: result = kTCFormat24fps; break;
1110  case NTV2_FRAMERATE_5000: result = kTCFormat50fps; break;
1111  default: break;
1112  }
1113  return result;
1114 
1115 } // NTV2FrameRate2TimecodeFormat
1116 
1117 
1119 {
1120  switch (inFrameRate)
1121  {
1124 #if !defined(NTV2_DEPRECATE_16_0)
1129 #endif
1130  case NTV2_FRAMERATE_5000: return AJA_FrameRate_5000;
1142 
1143  case NTV2_NUM_FRAMERATES:
1144  case NTV2_FRAMERATE_UNKNOWN: break;
1145  }
1146  return AJA_FrameRate_Unknown;
1147 } // GetAJAFrameRate
1148 
1149 
1151 {
1152  switch (inFormat)
1153  {
1156  case NTV2_FBF_ARGB: return AJA_PixelFormat_ARGB8;
1157  case NTV2_FBF_RGBA: return AJA_PixelFormat_RGBA8;
1160  case NTV2_FBF_ABGR: return AJA_PixelFormat_ABGR8;
1174 
1179 
1184 
1187  case NTV2_FBF_10BIT_ARGB:
1188  case NTV2_FBF_16BIT_ARGB:
1189  case NTV2_FBF_INVALID: break;
1190  }
1191  return AJA_PixelFormat_Unknown;
1192 } // GetAJAPixelFormat
1193 
1194 
1196 {
1197  static struct VideoFormatPair
1198  {
1199  NTV2VideoFormat vIn;
1200  NTV2VideoFormat vOut;
1201  } VideoFormatPairs[] = { // vIn vOut
1220 
1224 
1228  };
1229  for (size_t formatNdx(0); formatNdx < sizeof(VideoFormatPairs) / sizeof(VideoFormatPair); formatNdx++)
1230  if (VideoFormatPairs[formatNdx].vIn == inOutVideoFormat)
1231  {
1232  inOutVideoFormat = VideoFormatPairs[formatNdx].vOut;
1233  return true;
1234  }
1235  return false;
1236 
1237 } // get4KInputFormat
1238 
1240 {
1241  static struct VideoFormatPair
1242  {
1243  NTV2VideoFormat vIn;
1244  NTV2VideoFormat vOut;
1245  } VideoFormatPairs[] = { // vIn vOut
1272  };
1273  for (size_t formatNdx(0); formatNdx < sizeof(VideoFormatPairs) / sizeof(VideoFormatPair); formatNdx++)
1274  if (VideoFormatPairs[formatNdx].vIn == inOutVideoFormat)
1275  {
1276  inOutVideoFormat = VideoFormatPairs[formatNdx].vOut;
1277  return true;
1278  }
1279  return false;
1280 
1281 } // get8KInputFormat
1282 
1283 
1285 {
1286  return gGlobalMutexName.c_str();
1287 }
1288 
1290 {
1291  UWord totFrameStores(inDevice.features().GetNumFrameStores());
1292  UWord totTSIMuxers(inDevice.features().GetNumTSIMuxers());
1293  UWord firstFramestoreIndex = UWord(::GetIndexForNTV2Channel(in1stFrameStore));
1294  UWord tsiMux(firstFramestoreIndex);
1295  NTV2ChannelList result;
1296  if (totFrameStores > totTSIMuxers)
1297  tsiMux = firstFramestoreIndex/2;
1298  else if (totFrameStores < totTSIMuxers)
1299  tsiMux = firstFramestoreIndex*2;
1300  for (UWord num(0); num < inCount; num++)
1301  result.push_back(NTV2Channel(tsiMux + num));
1302  return result;
1303 }
1304 
1305 
1307  const CaptureConfig & inConfig,
1308  const bool isInputRGB)
1309 {
1310  const bool isFrameRGB (::IsRGBFormat(inConfig.fPixelFormat));
1312  const NTV2OutputXptID inputOXpt (::GetInputSourceOutputXpt(inConfig.fInputSource, false, isInputRGB));
1313  const NTV2InputXptID cscVidIXpt (::GetCSCInputXptFromChannel(inConfig.fInputChannel));
1314  NTV2OutputXptID cscOXpt (::GetCSCOutputXptFromChannel(inConfig.fInputChannel, /*key?*/false, /*RGB?*/isFrameRGB));
1315 
1316  conns.clear();
1317  if (isInputRGB && !isFrameRGB)
1318  {
1319  conns.insert(NTV2Connection(fbIXpt, cscOXpt)); // FB <== CSC
1320  conns.insert(NTV2Connection(cscVidIXpt, inputOXpt)); // CSC <== SDIIn/HDMIin
1321  }
1322  else if (!isInputRGB && isFrameRGB)
1323  {
1324  conns.insert(NTV2Connection(fbIXpt, cscOXpt)); // FB <== CSC
1325  conns.insert(NTV2Connection(cscVidIXpt, inputOXpt)); // CSC <== SDIIn/HDMIIn
1326  }
1327  else
1328  conns.insert(NTV2Connection(fbIXpt, inputOXpt)); // FB <== SDIIn/HDMIin
1329 
1330  return !conns.empty();
1331 
1332 } // GetRoutingCapture
1333 
1334 
1336  const CaptureConfig & inConfig,
1337  const NTV2DeviceID devID,
1338  const bool isInputRGB)
1339 {
1340  UWord sdi(0), mux(0), csc(0), fb(0), path(0);
1343  const bool isFrameRGB (::IsRGBFormat(inConfig.fPixelFormat));
1344  conns.clear();
1346  { // HDMI
1347  if (inConfig.fInputChannel == NTV2_CHANNEL1)
1348  { // HDMI CH1234
1349  if (isInputRGB == isFrameRGB)
1350  { // HDMI CH1234 RGB SIGNAL AND RGB FBF OR YUV SIGNAL AND YUV FBF
1351  for (path = 0; path < 4; path++)
1352  { // MUX <== HDMIIn
1353  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1354  out = ::GetInputSourceOutputXpt(inConfig.fInputSource, /*DS2*/false, isInputRGB, /*quadrant*/path);
1355  conns.insert(NTV2Connection(in, out));
1356  // FB <== MUX
1357  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*Binput*/path & 1);
1358  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*RGB*/isInputRGB);
1359  conns.insert(NTV2Connection(in, out));
1360  }
1361  } // HDMI CH1234 RGB SIGNAL AND RGB FBF
1362  else if (isInputRGB && !isFrameRGB)
1363  { // HDMI CH1234 RGB SIGNAL AND YUV FBF
1364  for (path = 0; path < 4; path++)
1365  {
1366  // CSC <== HDMIIn
1367  in = ::GetCSCInputXptFromChannel(NTV2Channel(csc+path));
1368  out = ::GetInputSourceOutputXpt(inConfig.fInputSource, /*DS2*/false, isInputRGB, /*quadrant*/path);
1369  conns.insert(NTV2Connection(in, out));
1370  // MUX <== CSC
1371  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1372  out = ::GetCSCOutputXptFromChannel(NTV2Channel(csc+path), /*key*/false, /*rgb*/isFrameRGB);
1373  conns.insert(NTV2Connection(in, out));
1374  // FB <== MUX
1375  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*DS2*/path & 1);
1376  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*rgb*/isFrameRGB);
1377  conns.insert(NTV2Connection(in, out));
1378  }
1379  } // HDMI CH1234 RGB SIGNAL AND YUV FBF
1380  else // !isInputRGB && isFrameRGB
1381  { // HDMI CH1234 YUV SIGNAL AND RGB FBF
1382  for (path = 0; path < 4; path++)
1383  {
1384  // CSC <== HDMIIn
1385  in = ::GetCSCInputXptFromChannel(NTV2Channel(csc+path));
1386  out = ::GetInputSourceOutputXpt(inConfig.fInputSource, /*DS2*/false, isInputRGB, /*quadrant*/path);
1387  conns.insert(NTV2Connection(in, out));
1388  // MUX <== CSC
1389  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1390  out = ::GetCSCOutputXptFromChannel(NTV2Channel(csc+path), /*key*/false, /*rgb*/isFrameRGB);
1391  conns.insert(NTV2Connection(in, out));
1392  // FB <== MUX
1393  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*DS2*/path & 1);
1394  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*rgb*/isFrameRGB);
1395  conns.insert(NTV2Connection(in, out));
1396  }
1397  } // HDMI CH1234 YUV SIGNAL AND RGB FBF
1398  } // HDMI CH1234
1399  else
1400  { // HDMI CH5678
1401  cerr << "## ERROR: Ch5678 must be for Corvid88, but no HDMI on that device" << endl;
1402  } // HDMI CH5678
1403  } // HDMI
1404  else
1405  { // SDI
1406  if (::NTV2DeviceCanDo12gRouting(devID))
1407  { // FB <== SDIIn
1409  out = ::GetInputSourceOutputXpt(inConfig.fInputSource);
1410  conns.insert(NTV2Connection(in, out));
1411  }
1412  else
1413  { // SDI CH1234 or CH5678
1414  if (inConfig.fInputChannel != NTV2_CHANNEL1)
1415  {fb = 4; sdi = fb; mux = fb / 2; csc = fb;}
1416  if (isFrameRGB)
1417  { // RGB FB
1418  if (inConfig.fDoTSIRouting)
1419  { // SDI CH1234 RGB TSI
1420  for (path = 0; path < 4; path++)
1421  {
1422  // CSC <== SDIIn
1423  in = ::GetCSCInputXptFromChannel(NTV2Channel(csc+path));
1425  conns.insert(NTV2Connection(in, out));
1426  // MUX <== CSC
1427  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1428  out = ::GetCSCOutputXptFromChannel(NTV2Channel(csc+path), /*key*/false, /*rgb*/isFrameRGB);
1429  conns.insert(NTV2Connection(in, out));
1430  // FB <== MUX
1431  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*DS2*/path & 1);
1432  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*rgb*/isFrameRGB);
1433  conns.insert(NTV2Connection(in, out));
1434  } // for each spigot
1435  } // SDI CH1234 RGB TSI
1436  else
1437  { // SDI CH1234 RGB SQUARES
1438  for (path = 0; path < 4; path++)
1439  {
1440  // CSC <== SDIIn
1441  in = ::GetCSCInputXptFromChannel(NTV2Channel(csc+path));
1443  conns.insert(NTV2Connection(in, out));
1444  // FB <== CSC
1446  out = ::GetCSCOutputXptFromChannel(NTV2Channel(csc+path), /*key*/false, /*rgb*/isFrameRGB);
1447  conns.insert(NTV2Connection(in, out));
1448  } // for each spigot
1449  } // SDI CH1234 RGB SQUARES
1450  } // SDI CH1234 RGB FBF
1451  else // YUV FBF
1452  {
1453  if (inConfig.fDoTSIRouting)
1454  { // SDI CH1234 YUV TSI
1455  for (path = 0; path < 4; path++)
1456  {
1457  // MUX <== SDIIn
1458  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1460  conns.insert(NTV2Connection(in, out));
1461  // FB <== MUX
1462  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*DS2*/path & 1);
1463  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*rgb*/isFrameRGB);
1464  conns.insert(NTV2Connection(in, out));
1465  } // for each spigot
1466  } // SDI CH1234 YUV TSI
1467  else
1468  {
1469  for (path = 0; path < 4; path++)
1470  { // FB <== SDIIn
1473  conns.insert(NTV2Connection(in, out));
1474  } // for each path
1475  } // SDI CH1234 YUV SQUARES
1476  } // YUV FBF
1477  } // 3G SDI CH1234 or CH5678
1478  } // SDI
1479  return !conns.empty();
1480 } // GetRoutingCapture4K
1481 
1482 
1484  const CaptureConfig & inConfig,
1485  const NTV2VideoFormat inVideoFormat,
1486  const NTV2DeviceID devID,
1487  const bool isInputRGB)
1488 { (void)isInputRGB; (void) devID;
1489  UWord fb(0), path(0);
1492  const bool isFrameRGB (::IsRGBFormat(inConfig.fPixelFormat));
1493  const bool isQuadQuadHFR (NTV2_IS_QUAD_QUAD_HFR_VIDEO_FORMAT(inVideoFormat));
1494  conns.clear();
1495  if (inConfig.fInputChannel % 2)
1496  return false; // Input channel cannot be Ch2/Ch4/Ch6/etc
1497  if (inConfig.fInputChannel > 3)
1498  return false; // Input channel cannot be Ch5 or greater
1499  if (::NTV2InputSourceToChannel(inConfig.fInputSource) % 2)
1500  return false; // Input source cannot be SDIIn2/4/6/etc
1501  if (::NTV2InputSourceToChannel(inConfig.fInputSource) > 3)
1502  return false; // Input source cannot be SDIIn5 or greater
1503 
1504  if (inConfig.fDoTSIRouting)
1505  { // TSI
1506  if (inConfig.fInputChannel)
1507  fb = 2;
1508  for (path = 0; path < 4; path++)
1509  if (isFrameRGB) // Uses 2 FBs, 4 SDIs
1510  { // RGB
1511  // DLInDS1 <== SDIInDS1
1512  in = ::GetDLInInputXptFromChannel (NTV2Channel(path), /*B*/false);
1513  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(path), /*DS2*/false);
1514  conns.insert(NTV2Connection(in, out));
1515  // DLInDS2 <== SDIInDS2
1516  in = ::GetDLInInputXptFromChannel (NTV2Channel(path), /*B*/true);
1517  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(path), /*DS2*/true);
1518  conns.insert(NTV2Connection(in, out));
1519  // FB <== DLIn
1520  in = ::GetFrameBufferInputXptFromChannel (NTV2Channel(fb+path/2), /*B*/path & 1);
1522  conns.insert(NTV2Connection(in, out));
1523  } // if RGB
1524  else if (isQuadQuadHFR) // Uses 2 FBs, 4 SDIs
1525  { // FB <== SDIIn, FBDS2 <== SDIIn
1526  in = ::GetFrameBufferInputXptFromChannel (NTV2Channel(fb+path/2), /*DS2?*/path & 1);
1528  conns.insert(NTV2Connection(in, out));
1529  } // else if YUV QuadQuad
1530  else // Uses 2 FBs, 2 SDIs
1531  { // FB <== SDIIn, FBDS2 <== SDIInDS2
1532  in = ::GetFrameBufferInputXptFromChannel (NTV2Channel(fb+path/2), /*DS2?*/path & 1);
1533  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(fb+path/2), /*DS2?*/path & 1);
1534  conns.insert(NTV2Connection(in, out));
1535  } // else YUV non-QuadQuad
1536  } // if TSI
1537  else
1538  { // Square-division routing
1539  if (inConfig.fInputChannel)
1540  return false; // Sorry, Ch1 only
1541  if (inConfig.fInputSource != NTV2_INPUTSOURCE_SDI1)
1542  return false; // Sorry, SDI1 only (1st SDI of 4 links)
1543  for (path = 0; path < 4; path++) // 4 FBs, 4 SDIs
1544  if (isFrameRGB)
1545  { // RGB
1546  // DLInDS1 <== SDIInDS1
1547  in = ::GetDLInInputXptFromChannel (NTV2Channel(path), /*B*/false);
1548  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(path), /*DS2*/false);
1549  conns.insert(NTV2Connection(in, out));
1550  // DLInDS2 <== SDIInDS2
1551  in = ::GetDLInInputXptFromChannel (NTV2Channel(path), /*B*/true);
1552  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(path), /*DS2*/true);
1553  conns.insert(NTV2Connection(in, out));
1554  // FB <== DLIn
1557  conns.insert(NTV2Connection(in, out));
1558  } // for each path
1559  else // YUV
1560  { // FB <== SDIIn
1563  conns.insert(NTV2Connection(in, out));
1564  } // for each path
1565  } // else Squares
1566  return !conns.empty();
1567 } // GetInputRouting8K
1568 
1569 
1570 bool CNTV2DemoCommon::ConfigureAudioSystems (CNTV2Card & inDevice, const CaptureConfig & inConfig, const NTV2AudioSystemSet inAudioSystems)
1571 {
1572  UWord failures(0);
1573  UWord numAudChannels(inDevice.features().GetMaxAudioChannels());
1574  for (NTV2AudioSystemSetConstIter it(inAudioSystems.begin()); it != inAudioSystems.end(); ++it)
1575  { const NTV2AudioSystem audSys(*it);
1576  // Have the audio system capture audio from the designated device input...
1577  if (!inDevice.SetAudioSystemInputSource (audSys, NTV2_AUDIO_EMBEDDED,
1579  failures++;
1580 
1581  // Configure for max available audio channels, 48KHz, 4MB buffers, and disable loopback...
1582  if (!inDevice.SetNumberAudioChannels (numAudChannels, audSys)) failures++;
1583  if (!inDevice.SetAudioRate (NTV2_AUDIO_48K, audSys)) failures++;
1584  if (!inDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_SIZE_4MB, audSys)) failures++;
1585  if (!inDevice.SetAudioLoopBack(NTV2_AUDIO_LOOPBACK_OFF, audSys)) failures++;
1586  }
1587  return !failures;
1588 }
1589 
1590 
1592 {
1593  const size_t hwPageSizeBytes (NTV2Buffer::HostPageSize());
1594  const size_t sdkPageSizeBytes (NTV2Buffer::DefaultPageSize());
1595  if (hwPageSizeBytes != sdkPageSizeBytes)
1596  {
1597  if (NTV2Buffer::SetDefaultPageSize(hwPageSizeBytes))
1598  cerr << "## NOTE: Page size changed from " << DEC(sdkPageSizeBytes/1024) << "K to " << DEC(hwPageSizeBytes/1024) << "K" << endl;
1599  else
1600  cerr << "## WARNING: Failed to change page size from " << DEC(sdkPageSizeBytes/1024) << "K to " << DEC(hwPageSizeBytes/1024) << "K" << endl;
1601  }
1602  return hwPageSizeBytes;
1603 }
1604 
1605 
1606 CNTV2DemoCommon::Popt::Popt (const int inArgc, const char ** pArgs, const PoptOpts * pInOptionsTable)
1607 {
1608  mContext = ::poptGetContext(AJA_NULL, inArgc, pArgs, pInOptionsTable, 0);
1609  mResult = ::poptGetNextOpt(mContext);
1610  if (mResult < -1)
1611  { ostringstream oss;
1612  oss << ::poptBadOption(mContext, 0) << ": " << ::poptStrerror(mResult);
1613  mError = oss.str();
1614  }
1615  else
1616  {
1617  const char * pStr (::poptGetArg(mContext));
1618  while (pStr)
1619  {
1620  mOtherArgs.push_back(string(pStr)); // Append to file list
1621  pStr = ::poptGetArg(mContext);
1622  } // for each additional positional argument
1623  }
1624 }
1625 
1627 {
1628  mContext = ::poptFreeContext(mContext);
1629 }
1630 
1631 
1633 {
1634  typedef struct {string fName; NTV2VideoFormat fFormat;} FormatNameDictionary;
1635  static const FormatNameDictionary sVFmtDict[] = {
1636  {"1080i50", NTV2_FORMAT_1080i_5000},
1637  {"1080i", NTV2_FORMAT_1080i_5994},
1638  {"1080i5994", NTV2_FORMAT_1080i_5994},
1639  {"hd", NTV2_FORMAT_1080i_5994},
1640  {"1080i60", NTV2_FORMAT_1080i_6000},
1641  {"720p", NTV2_FORMAT_720p_5994},
1642  {"720p5994", NTV2_FORMAT_720p_5994},
1643  {"720p60", NTV2_FORMAT_720p_6000},
1644  {"1080psf2398", NTV2_FORMAT_1080psf_2398},
1645  {"1080psf24", NTV2_FORMAT_1080psf_2400},
1646  {"1080p2997", NTV2_FORMAT_1080p_2997},
1647  {"1080p30", NTV2_FORMAT_1080p_3000},
1648  {"1080p25", NTV2_FORMAT_1080p_2500},
1649  {"1080p2398", NTV2_FORMAT_1080p_2398},
1650  {"1080p24", NTV2_FORMAT_1080p_2400},
1651  {"2048x1080p2398", NTV2_FORMAT_1080p_2K_2398},
1652  {"2048x1080p24", NTV2_FORMAT_1080p_2K_2400},
1653  {"2048x1080psf2398", NTV2_FORMAT_1080psf_2K_2398},
1654  {"2048x1080psf24", NTV2_FORMAT_1080psf_2K_2400},
1655  {"720p50", NTV2_FORMAT_720p_5000},
1656  {"1080p50b", NTV2_FORMAT_1080p_5000_B},
1657  {"1080p", NTV2_FORMAT_1080p_5994_B},
1658  {"1080p5994b", NTV2_FORMAT_1080p_5994_B},
1659  {"1080p60b", NTV2_FORMAT_1080p_6000_B},
1660  {"720p2398", NTV2_FORMAT_720p_2398},
1661  {"720p25", NTV2_FORMAT_720p_2500},
1662  {"1080p50", NTV2_FORMAT_1080p_5000_A},
1663  {"1080p5994", NTV2_FORMAT_1080p_5994_A},
1664  {"1080p60", NTV2_FORMAT_1080p_6000_A},
1665  {"2048x1080p25", NTV2_FORMAT_1080p_2K_2500},
1666  {"2048x1080psf25", NTV2_FORMAT_1080psf_2K_2500},
1667  {"1080psf25", NTV2_FORMAT_1080psf_2500_2},
1668  {"1080psf2997", NTV2_FORMAT_1080psf_2997_2},
1669  {"1080psf30", NTV2_FORMAT_1080psf_3000_2},
1670  {"525i", NTV2_FORMAT_525_5994},
1671  {"525i2997", NTV2_FORMAT_525_5994},
1672  {"sd", NTV2_FORMAT_525_5994},
1673  {"625i", NTV2_FORMAT_625_5000},
1674  {"625i25", NTV2_FORMAT_625_5000},
1675  {"525i2398", NTV2_FORMAT_525_2398},
1676  {"525i24", NTV2_FORMAT_525_2400},
1677  {"525psf2997", NTV2_FORMAT_525psf_2997},
1678  {"625psf25", NTV2_FORMAT_625psf_2500},
1679  {"2048x1556psf1498", NTV2_FORMAT_2K_1498},
1680  {"2048x1556psf15", NTV2_FORMAT_2K_1500},
1681  {"2048x1556psf2398", NTV2_FORMAT_2K_2398},
1682  {"2048x1556psf24", NTV2_FORMAT_2K_2400},
1683  {"2048x1556psf25", NTV2_FORMAT_2K_2500},
1684  {"4x1920x1080psf2398", NTV2_FORMAT_4x1920x1080psf_2398},
1685  {"4x1920x1080psf24", NTV2_FORMAT_4x1920x1080psf_2400},
1686  {"4x1920x1080psf25", NTV2_FORMAT_4x1920x1080psf_2500},
1687  {"4x1920x1080p2398", NTV2_FORMAT_4x1920x1080p_2398},
1688  {"uhd2398", NTV2_FORMAT_4x1920x1080p_2398},
1689  {"4x1920x1080p24", NTV2_FORMAT_4x1920x1080p_2400},
1690  {"uhd24", NTV2_FORMAT_4x1920x1080p_2400},
1691  {"4x1920x1080p25", NTV2_FORMAT_4x1920x1080p_2500},
1692  {"uhd25", NTV2_FORMAT_4x1920x1080p_2500},
1693  {"4x2048x1080psf2398", NTV2_FORMAT_4x2048x1080psf_2398},
1694  {"4x2048x1080psf24", NTV2_FORMAT_4x2048x1080psf_2400},
1695  {"4x2048x1080psf25", NTV2_FORMAT_4x2048x1080psf_2500},
1696  {"4k2398", NTV2_FORMAT_4x2048x1080p_2398},
1697  {"4x2048x1080p2398", NTV2_FORMAT_4x2048x1080p_2398},
1699  {"4x2048x1080p24", NTV2_FORMAT_4x2048x1080p_2400},
1701  {"4x2048x1080p25", NTV2_FORMAT_4x2048x1080p_2500},
1702  {"4x1920x1080p2997", NTV2_FORMAT_4x1920x1080p_2997},
1703  {"4x1920x1080p30", NTV2_FORMAT_4x1920x1080p_3000},
1704  {"4x1920x1080psf2997", NTV2_FORMAT_4x1920x1080psf_2997},
1705  {"4x1920x1080psf30", NTV2_FORMAT_4x1920x1080psf_3000},
1706  {"4x2048x1080p2997", NTV2_FORMAT_4x2048x1080p_2997},
1707  {"4x2048x1080p30", NTV2_FORMAT_4x2048x1080p_3000},
1708  {"4x2048x1080psf2997", NTV2_FORMAT_4x2048x1080psf_2997},
1709  {"4x2048x1080psf30", NTV2_FORMAT_4x2048x1080psf_3000},
1710  {"4x1920x1080p50", NTV2_FORMAT_4x1920x1080p_5000},
1711  {"uhd50", NTV2_FORMAT_4x1920x1080p_5000},
1712  {"4x1920x1080p5994", NTV2_FORMAT_4x1920x1080p_5994},
1713  {"uhd5994", NTV2_FORMAT_4x1920x1080p_5994},
1714  {"4x1920x1080p60", NTV2_FORMAT_4x1920x1080p_6000},
1716  {"uhd60", NTV2_FORMAT_4x1920x1080p_6000},
1718  {"4x2048x1080p50", NTV2_FORMAT_4x2048x1080p_5000},
1719  {"4k5994", NTV2_FORMAT_4x2048x1080p_5994},
1720  {"4x2048x1080p5994", NTV2_FORMAT_4x2048x1080p_5994},
1723  {"4x2048x1080p60", NTV2_FORMAT_4x2048x1080p_6000},
1724  {"4k4795", NTV2_FORMAT_4x2048x1080p_4795},
1725  {"4x2048x1080p4795", NTV2_FORMAT_4x2048x1080p_4795},
1727  {"4x2048x1080p48", NTV2_FORMAT_4x2048x1080p_4800},
1728  {"4k11988", NTV2_FORMAT_4x2048x1080p_11988},
1729  {"4x2048x1080p11988", NTV2_FORMAT_4x2048x1080p_11988},
1730  {"4k120", NTV2_FORMAT_4x2048x1080p_12000},
1731  {"4x2048x1080p120", NTV2_FORMAT_4x2048x1080p_12000},
1732  {"2048x1080p60", NTV2_FORMAT_1080p_2K_6000_A},
1733  {"2048x1080p5994", NTV2_FORMAT_1080p_2K_5994_A},
1734  {"2048x1080p2997", NTV2_FORMAT_1080p_2K_2997},
1735  {"2048x1080p30", NTV2_FORMAT_1080p_2K_3000},
1736  {"2048x1080p50", NTV2_FORMAT_1080p_2K_5000_A},
1737  {"2048x1080p4795", NTV2_FORMAT_1080p_2K_4795_A},
1738  {"2048x1080p48", NTV2_FORMAT_1080p_2K_4800_A},
1739  {"2048x1080p60b", NTV2_FORMAT_1080p_2K_6000_B},
1740  {"2048x1080p5994b", NTV2_FORMAT_1080p_2K_5994_B},
1741  {"2048x1080p50b", NTV2_FORMAT_1080p_2K_5000_B},
1742  {"2048x1080p48b", NTV2_FORMAT_1080p_2K_4800_B},
1743  {"2048x1080p4795b", NTV2_FORMAT_1080p_2K_4795_B},
1744  {"", NTV2_FORMAT_UNKNOWN} };
1745  if (true)
1746  {
1747  // Dump the gString2VideoFormatMMap map...
1748  for (String2VideoFormatMMapCI it(gString2VideoFormatMMap.begin()); it != gString2VideoFormatMMap.end(); ++it)
1749  {
1750  cout << "'" << it->first << "'\t'" << ::NTV2VideoFormatToString(it->second) << "'\t" << ::NTV2VideoFormatString(it->second) << "\t" << DEC(it->second) << endl;
1751  }
1752  }
1753  cout << endl << endl;
1754  for (unsigned ndx(0); !sVFmtDict[ndx].fName.empty(); ndx++)
1755  {
1756  const string & str (sVFmtDict[ndx].fName);
1757  const NTV2VideoFormat vFormat (sVFmtDict[ndx].fFormat);
1759  const NTV2VideoFormat vFormat2 (it != gString2VideoFormatMMap.end() ? it->second : NTV2_FORMAT_UNKNOWN);
1760  if (vFormat != vFormat2)
1761  cerr << "'" << str << "': '" << ::NTV2VideoFormatString(vFormat) << "' (" << DEC(vFormat) << ") != '" << ::NTV2VideoFormatString(vFormat2) << "' (" << DEC(vFormat2) << ")" << endl;
1762  //SHOULD_BE_EQUAL(vFormat, vFormat2);
1763  }
1764  return true;
1765 }
1766 
1767 
1769 
1770 
1771 AJALabelValuePairs CaptureConfig::Get (const bool inCompact) const
1772 {
1773  AJALabelValuePairs result;
1774  AJASystemInfo::append (result, "Capture Config");
1775  AJASystemInfo::append (result, "Device Specifier", fDeviceSpec);
1776  AJASystemInfo::append (result, "Input Channel", ::NTV2ChannelToString(fInputChannel, inCompact));
1777  AJASystemInfo::append (result, "Input Source", ::NTV2InputSourceToString(fInputSource, inCompact));
1778  AJASystemInfo::append (result, "Pixel Format", ::NTV2FrameBufferFormatToString(fPixelFormat, inCompact));
1779  AJASystemInfo::append (result, "AutoCirc Frames", fFrames.toString());
1780  AJASystemInfo::append (result, "A/B Conversion", fDoABConversion ? "Y" : "N");
1781  AJASystemInfo::append (result, "MultiFormat Mode", fDoMultiFormat ? "Y" : "N");
1782  AJASystemInfo::append (result, "Capture Anc", fWithAnc ? "Y" : "N");
1783  AJASystemInfo::append (result, "Anc Capture File", fAncDataFilePath.empty() ? "---" : fAncDataFilePath);
1784  AJASystemInfo::append (result, "Capture Audio", fWithAudio ? "Y" : "N");
1785  AJASystemInfo::append (result, "Num Audio Links", aja::to_string(fNumAudioLinks));
1786  AJASystemInfo::append (result, "TSI Routing", fDoTSIRouting ? "Y" : "N");
1787  return result;
1788 }
1789 
1790 
1791 std::ostream & operator << (std::ostream & ioStrm, const CaptureConfig & inObj)
1792 {
1793  ioStrm << AJASystemInfo::ToString(inObj.Get());
1794  return ioStrm;
1795 }
1796 
1797 
1799 
1800 
1801 AJALabelValuePairs PlayerConfig::Get (const bool inCompact) const
1802 {
1803  AJALabelValuePairs result;
1804  AJASystemInfo::append (result, "NTV2Player Config");
1805  AJASystemInfo::append (result, "Device Specifier", fDeviceSpec);
1806  AJASystemInfo::append (result, "Video Format", ::NTV2VideoFormatToString(fVideoFormat));
1807  AJASystemInfo::append (result, "Pixel Format", ::NTV2FrameBufferFormatToString(fPixelFormat, inCompact));
1808  AJASystemInfo::append (result, "AutoCirc Frames", fFrames.toString());
1809  AJASystemInfo::append (result, "MultiFormat Mode", fDoMultiFormat ? "Y" : "N");
1810  AJASystemInfo::append (result, "VANC Mode", ::NTV2VANCModeToString(fVancMode));
1811  AJASystemInfo::append (result, "HDR Anc Type", ::AJAAncDataTypeToString(fTransmitHDRType));
1812  AJASystemInfo::append (result, "Output Channel", ::NTV2ChannelToString(fOutputChannel, inCompact));
1813  AJASystemInfo::append (result, "Output Connector", ::NTV2OutputDestinationToString(fOutputDest, inCompact));
1814  AJASystemInfo::append (result, "Anc Playback File", fAncDataFilePath.empty() ? "---" : fAncDataFilePath);
1815  AJASystemInfo::append (result, "Suppress Audio", fSuppressAudio ? "Y" : "N");
1816  AJASystemInfo::append (result, "Num Audio Links", aja::to_string(fNumAudioLinks));
1817  AJASystemInfo::append (result, "Suppress Video", fSuppressVideo ? "Y" : "N");
1818  AJASystemInfo::append (result, "Embedded Timecode", fTransmitLTC ? "LTC" : "VITC");
1819  AJASystemInfo::append (result, "Level Conversion", fDoABConversion ? "Y" : "N");
1820  AJASystemInfo::append (result, "HDMI Output", fDoHDMIOutput ? "Yes" : "No");
1821  AJASystemInfo::append (result, "RGB-On-SDI", fDoRGBOnWire ? "Yes" : "No");
1822  AJASystemInfo::append (result, "TSI Routing", fDoTsiRouting ? "Yes" : "No");
1823  AJASystemInfo::append (result, "6G/12G Output", fDoLinkGrouping ? "Yes" : "No");
1824  return result;
1825 }
1826 
1827 
1828 std::ostream & operator << (std::ostream & ioStrm, const PlayerConfig & inObj)
1829 {
1830  ioStrm << AJASystemInfo::ToString(inObj.Get());
1831  return ioStrm;
1832 }
1833 
1834 
1836 
1837 
1838 AJALabelValuePairs BurnConfig::Get (const bool inCompact) const
1839 {
1840  AJALabelValuePairs result;
1841  AJASystemInfo::append(result, "NTV2Burn Config");
1842  if (fDeviceSpec2.empty())
1843  AJASystemInfo::append(result, "Device Specifier", fDeviceSpec);
1844  else
1845  {
1846  AJASystemInfo::append(result, "Input Device", fDeviceSpec);
1847  AJASystemInfo::append(result, "Output Device", fDeviceSpec2);
1848  }
1849  AJASystemInfo::append(result, "Input Channel", ::NTV2ChannelToString(fInputChannel, inCompact));
1850  AJASystemInfo::append(result, "Output Channel", ::NTV2ChannelToString(fOutputChannel, inCompact));
1851  AJASystemInfo::append(result, "Input Source", ::NTV2InputSourceToString(fInputSource, inCompact));
1852  if (WithTimecode())
1853  AJASystemInfo::append(result, "Timecode Source", ::NTV2TCIndexToString(fTimecodeSource, inCompact));
1854  AJASystemInfo::append(result, "Output Destination", ::NTV2OutputDestinationToString(fOutputDest, inCompact));
1855  AJASystemInfo::append(result, "Pixel Format", ::NTV2FrameBufferFormatToString(fPixelFormat, inCompact));
1856  AJASystemInfo::append(result, "AC Input Frames", fInputFrames.toString());
1857  AJASystemInfo::append(result, "AC Output Frames", fOutputFrames.toString());
1858  AJASystemInfo::append(result, "Include Video", WithVideo() ? "Y" : "N");
1859  AJASystemInfo::append(result, "Include Audio", WithAudio() ? "Y" : "N");
1860  AJASystemInfo::append(result, "Include Anc", WithAnc() ? "Y" : "N");
1861  AJASystemInfo::append(result, "Include HANC", WithHanc() ? "Y" : "N");
1862  AJASystemInfo::append(result, "MultiFormat Mode", fDoMultiFormat ? "Y" : "N");
1863  AJASystemInfo::append(result, "Field Mode", FieldMode() ? "Y" : "N");
1864  AJASystemInfo::append(result, "Verbose Mode", IsVerbose() ? "Y" : "N");
1865  return result;
1866 }
NTV2InputSourceSet
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
Definition: ntv2publicinterface.h:8816
NTV2TestPatternGen::getColorNames
static NTV2StringList getColorNames(void)
Definition: ntv2testpatterngen.cpp:2552
PIXEL_FORMATS_RGB
@ PIXEL_FORMATS_RGB
Definition: ntv2democommon.h:246
NTV2_FORMAT_3840x2160p_6000
@ NTV2_FORMAT_3840x2160p_6000
Definition: ntv2enums.h:639
NTV2_FBF_10BIT_YCBCR_420PL3_LE
@ NTV2_FBF_10BIT_YCBCR_420PL3_LE
See 3-Plane 10-Bit YCbCr 4:2:0 ('I420_10LE' a.k.a. 'YUV-P420-L10').
Definition: ntv2enums.h:240
TC_INDEXES_VITC1
@ TC_INDEXES_VITC1
Definition: ntv2democommon.h:264
CNTV2DemoCommon::GetVideoFormatFromString
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.
Definition: ntv2democommon.cpp:553
aja::stoul
unsigned long stoul(const std::string &str, std::size_t *idx, int base)
Definition: common.cpp:143
CNTV2DemoCommon::GetSupportedVideoFormats
static NTV2VideoFormatSet GetSupportedVideoFormats(const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD)
Definition: ntv2democommon.cpp:507
NTV2_FORMAT_625_5000
@ NTV2_FORMAT_625_5000
Definition: ntv2enums.h:567
NTV2_FORMAT_4x1920x1080p_6000
@ NTV2_FORMAT_4x1920x1080p_6000
Definition: ntv2enums.h:603
NTV2ChannelToInputSource
NTV2InputSource NTV2ChannelToInputSource(const NTV2Channel inChannel, const NTV2IOKinds inKinds=NTV2_IOKINDS_SDI)
Definition: ntv2utils.cpp:5192
NTV2_FORMAT_1080psf_2398
@ NTV2_FORMAT_1080psf_2398
Definition: ntv2enums.h:539
AJA_FrameRate_1900
@ AJA_FrameRate_1900
Definition: videotypes.h:218
CNTV2Card::DMABufferUnlock
virtual bool DMABufferUnlock(const NTV2Buffer &inBuffer)
Unlocks the given host buffer that was previously locked using CNTV2Card::DMABufferLock.
Definition: ntv2dma.cpp:444
VIDEO_FORMATS_8KUHD2
@ VIDEO_FORMATS_8KUHD2
Definition: ntv2democommon.h:227
NTV2InputSourceToChannel
NTV2Channel NTV2InputSourceToChannel(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2Channel value.
Definition: ntv2utils.cpp:5107
NTV2Buffer::SetDefaultPageSize
static bool SetDefaultPageSize(const size_t inNewSize)
Changes the default page size for use in future page-aligned allocations.
Definition: ntv2publicinterface.cpp:2033
NTV2_FORMAT_4096x2160p_2400
@ NTV2_FORMAT_4096x2160p_2400
Definition: ntv2enums.h:648
gGlobalMutexName
static const string gGlobalMutexName("com.aja.ntv2.mutex.demo")
DeviceCapabilities::CanDoVideoFormat
bool CanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2devicecapabilities.h:251
NTV2_FBF_NUMFRAMEBUFFERFORMATS
@ NTV2_FBF_NUMFRAMEBUFFERFORMATS
Definition: ntv2enums.h:247
AJA_PixelFormat_YCBCR10_422PL
@ AJA_PixelFormat_YCBCR10_422PL
Definition: videotypes.h:157
NTV2_FBF_ARGB
@ NTV2_FBF_ARGB
See 8-Bit ARGB, RGBA, ABGR Formats.
Definition: ntv2enums.h:215
NTV2_FORMAT_2K_1498
@ NTV2_FORMAT_2K_1498
Definition: ntv2enums.h:574
GetSDIInputOutputXptFromChannel
NTV2OutputXptID GetSDIInputOutputXptFromChannel(const NTV2Channel inSDIInput, const bool inIsDS2=false)
Definition: ntv2signalrouter.cpp:893
NTV2_FORMAT_720p_5000
@ NTV2_FORMAT_720p_5000
Definition: ntv2enums.h:550
NTV2_IOKINDS_HDMI
@ NTV2_IOKINDS_HDMI
Specifies HDMI input/output kinds.
Definition: ntv2enums.h:1275
NTV2_FBF_10BIT_YCBCR_420PL2
@ NTV2_FBF_10BIT_YCBCR_420PL2
10-Bit 4:2:0 2-Plane YCbCr
Definition: ntv2enums.h:242
String2PixelFormatMapConstIter
String2PixelFormatMap::const_iterator String2PixelFormatMapConstIter
Definition: ntv2democommon.cpp:29
gTCIndexesVITC1
static NTV2TCIndexSet gTCIndexesVITC1
Definition: ntv2democommon.cpp:83
NTV2_AUDIO_LOOPBACK_OFF
@ NTV2_AUDIO_LOOPBACK_OFF
Embeds silence (zeroes) into the data stream.
Definition: ntv2enums.h:2005
gString2OutputDestMap
static String2OutputDestMap gString2OutputDestMap
Definition: ntv2democommon.cpp:77
NTV2_DEVICEKIND_OUTPUT
@ NTV2_DEVICEKIND_OUTPUT
Specifies devices that output (playout).
Definition: ntv2enums.h:1360
NTV2_FORMAT_4096x2160p_12000
@ NTV2_FORMAT_4096x2160p_12000
Definition: ntv2enums.h:660
NTV2FrameBufferFormatSetConstIter
NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter
A handy const iterator for iterating over an NTV2FrameBufferFormatSet.
Definition: ntv2publicinterface.h:8806
NTV2_IS_ATC_VITC1_TIMECODE_INDEX
#define NTV2_IS_ATC_VITC1_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3941
NTV2_OUTPUTDESTINATION_HDMI1
@ NTV2_OUTPUTDESTINATION_HDMI1
Definition: ntv2enums.h:1304
AJA_PixelFormat_ARGB8
@ AJA_PixelFormat_ARGB8
Definition: videotypes.h:126
HANDLE
short HANDLE
Definition: ajatypes.h:317
NTV2_FORMAT_2K_2400
@ NTV2_FORMAT_2K_2400
Definition: ntv2enums.h:577
NTV2_DEVICEKIND_RELAYS
@ NTV2_DEVICEKIND_RELAYS
Specifies devices that have bypass relays.
Definition: ntv2enums.h:1373
AJA_FrameRate_3000
@ AJA_FrameRate_3000
Definition: videotypes.h:223
NTV2_FORMAT_4x4096x2160p_4800
@ NTV2_FORMAT_4x4096x2160p_4800
Definition: ntv2enums.h:697
NTV2FrameBufferFormatSet
std::set< NTV2FrameBufferFormat > NTV2FrameBufferFormatSet
A set of distinct NTV2FrameBufferFormat values.
Definition: ntv2publicinterface.h:8805
NTV2OutputDestination
NTV2OutputDestination
Identifies a specific video output destination.
Definition: ntv2enums.h:1301
AJA_PixelFormat_YUY28
@ AJA_PixelFormat_YUY28
Definition: videotypes.h:129
gInputSources
static NTV2InputSourceSet gInputSources
Definition: ntv2democommon.cpp:64
poptOption
Definition: options_popt.h:148
NTV2_FORMAT_4x4096x2160p_2398
@ NTV2_FORMAT_4x4096x2160p_2398
Definition: ntv2enums.h:691
AJA_PixelFormat_YCBCR8_422PL3
@ AJA_PixelFormat_YCBCR8_422PL3
Definition: videotypes.h:162
NTV2_FBF_12BIT_RGB_PACKED
@ NTV2_FBF_12BIT_RGB_PACKED
See 12-Bit Packed RGB.
Definition: ntv2enums.h:231
NTV2_FORMAT_525_5994
@ NTV2_FORMAT_525_5994
Definition: ntv2enums.h:566
kTCFormat24fps
@ kTCFormat24fps
Definition: ntv2rp188.h:30
NTV2_DEVICEKIND_ANALOG
@ NTV2_DEVICEKIND_ANALOG
Specifies devices with analog video connectors.
Definition: ntv2enums.h:1363
CNTV2DemoCommon::GetSupportedPixelFormats
static NTV2PixelFormats GetSupportedPixelFormats(const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL)
Definition: ntv2democommon.cpp:585
String2PixelFormatMap
map< string, NTV2FrameBufferFormat > String2PixelFormatMap
Definition: ntv2democommon.cpp:28
GetDLInInputXptFromChannel
NTV2InputXptID GetDLInInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB=false)
Definition: ntv2signalrouter.cpp:796
NTV2OutputDestinations
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
Definition: ntv2publicinterface.h:8819
CNTV2DemoCommon::GetPixelFormatFromString
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.
Definition: ntv2democommon.cpp:637
ntv2devicefeatures.h
Declares device capability functions.
NTV2_FORMAT_4096x2160p_11988
@ NTV2_FORMAT_4096x2160p_11988
Definition: ntv2enums.h:659
gInputSourcesHDMI
static NTV2InputSourceSet gInputSourcesHDMI
Definition: ntv2democommon.cpp:66
CNTV2DemoCommon::GetVANCModeFromString
static NTV2VANCMode GetVANCModeFromString(const std::string &inStr)
Definition: ntv2democommon.cpp:989
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1146
NTV2_IS_FBF_PLANAR
#define NTV2_IS_FBF_PLANAR(__s__)
Definition: ntv2enums.h:258
aja::strip
std::string & strip(std::string &str, const std::string &ws)
Definition: common.cpp:461
NTV2TestPatternSelect
NTV2TestPatternSelect
Identifies a predefined NTV2 test pattern.
Definition: ntv2testpatterngen.h:26
NTV2_FBF_PRORES_HDV
@ NTV2_FBF_PRORES_HDV
Apple ProRes HDV.
Definition: ntv2enums.h:233
NTV2_FORMAT_4096x2160p_2500
@ NTV2_FORMAT_4096x2160p_2500
Definition: ntv2enums.h:649
NTV2_FBF_IS_RAW
#define NTV2_FBF_IS_RAW(__fbf__)
Definition: ntv2enums.h:322
NTV2_FRAMERATE_1500
@ NTV2_FRAMERATE_1500
15 frames per second
Definition: ntv2enums.h:415
NTV2_TestPatt_All
@ NTV2_TestPatt_All
Definition: ntv2testpatterngen.h:52
NTV2TCIndexes
std::set< NTV2TCIndex > NTV2TCIndexes
Definition: ntv2publicinterface.h:6879
NTV2_FRAMERATE_6000
@ NTV2_FRAMERATE_6000
60 frames per second
Definition: ntv2enums.h:402
CNTV2DemoCommon::GetTSIMuxesForFrameStore
static NTV2ChannelList GetTSIMuxesForFrameStore(CNTV2Card &inDevice, const NTV2Channel in1stFrameStore, const UWord inCount)
Definition: ntv2democommon.cpp:1289
NTV2_IS_FBF_PRORES
#define NTV2_IS_FBF_PRORES(__fbf__)
Definition: ntv2enums.h:270
CNTV2DemoCommon::ReadCharacterPress
static char ReadCharacterPress(void)
Returns the character that represents the last key that was pressed on the keyboard without waiting f...
Definition: ntv2democommon.cpp:1053
NTV2_FORMAT_525psf_2997
@ NTV2_FORMAT_525psf_2997
Definition: ntv2enums.h:570
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1334
gPixelFormats
static NTV2FrameBufferFormatSet gPixelFormats
Definition: ntv2democommon.cpp:57
AJA_FrameRate_11988
@ AJA_FrameRate_11988
Definition: videotypes.h:230
NTV2_FORMAT_4x2048x1080p_4795
@ NTV2_FORMAT_4x2048x1080p_4795
Definition: ntv2enums.h:607
AJA_FrameRate_1498
@ AJA_FrameRate_1498
Definition: videotypes.h:213
g4KFormats
static NTV2VideoFormatSet g4KFormats
Definition: ntv2democommon.cpp:55
NTV2_FBF_10BIT_DPX_LE
@ NTV2_FBF_10BIT_DPX_LE
10-Bit DPX Little-Endian
Definition: ntv2enums.h:229
aja::join
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
NTV2_FORMAT_3840x2160p_5994_B
@ NTV2_FORMAT_3840x2160p_5994_B
Definition: ntv2enums.h:641
AJA_FrameRate_Unknown
@ AJA_FrameRate_Unknown
Definition: videotypes.h:212
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:508
NTV2VideoFormatSet
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
Definition: ntv2publicinterface.h:8802
NTV2_FRAMERATE_2997
@ NTV2_FRAMERATE_2997
Fractional rate of 30,000 frames per 1,001 seconds.
Definition: ntv2enums.h:406
NTV2_FORMAT_1080p_2K_6000_B
@ NTV2_FORMAT_1080p_2K_6000_B
Definition: ntv2enums.h:624
NTV2_FORMAT_4096x2160p_5000_B
@ NTV2_FORMAT_4096x2160p_5000_B
Definition: ntv2enums.h:663
PIXEL_FORMATS_RAW
@ PIXEL_FORMATS_RAW
Definition: ntv2democommon.h:248
poptGetArg
const char * poptGetArg(poptContext con)
Definition: options_popt.cpp:3494
NTV2_FBF_RGBA
@ NTV2_FBF_RGBA
See 8-Bit ARGB, RGBA, ABGR Formats.
Definition: ntv2enums.h:216
AJA_PixelFormat_BGR8_PACK
@ AJA_PixelFormat_BGR8_PACK
Definition: videotypes.h:137
AJA_PixelFormat_YCbCr8
@ AJA_PixelFormat_YCbCr8
Definition: videotypes.h:125
NTV2_FORMAT_1080psf_2K_2398
@ NTV2_FORMAT_1080psf_2K_2398
Definition: ntv2enums.h:548
DeviceCapabilities::CanDoInputTCIndex
bool CanDoInputTCIndex(const NTV2TCIndex inTCNdx)
Definition: ntv2devicecapabilities.h:320
VIDEO_FORMATS_ALL
@ VIDEO_FORMATS_ALL
Definition: ntv2democommon.h:229
NTV2_IS_QUAD_QUAD_HFR_VIDEO_FORMAT
#define NTV2_IS_QUAD_QUAD_HFR_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:808
NTV2_AUDIO_48K
@ NTV2_AUDIO_48K
Definition: ntv2enums.h:1905
CNTV2DemoCommon::GetInputRouting
static bool GetInputRouting(NTV2XptConnections &outConnections, const CaptureConfig &inConfig, const bool isInputRGB=(0))
Answers with the crosspoint connections needed to implement the given capture configuration.
Definition: ntv2democommon.cpp:1306
CNTV2DemoCommon::GetAudioSystemStrings
static std::string GetAudioSystemStrings(const std::string inDeviceSpecifier=std::string())
Definition: ntv2democommon.cpp:925
NTV2_FORMAT_1080p_2K_4800_A
@ NTV2_FORMAT_1080p_2K_4800_A
Definition: ntv2enums.h:619
String2TCIndexPair
pair< string, NTV2TCIndex > String2TCIndexPair
Definition: ntv2democommon.cpp:44
NTV2_FORMAT_4x2048x1080p_11988
@ NTV2_FORMAT_4x2048x1080p_11988
Definition: ntv2enums.h:609
AJA_PixelFormat_RGB10
@ AJA_PixelFormat_RGB10
Definition: videotypes.h:128
NTV2_FRAMERATE_12000
@ NTV2_FRAMERATE_12000
120 frames per second
Definition: ntv2enums.h:413
AJA_FrameRate_2997
@ AJA_FrameRate_2997
Definition: videotypes.h:222
NTV2_FBF_48BIT_RGB
@ NTV2_FBF_48BIT_RGB
See 48-Bit RGB.
Definition: ntv2enums.h:230
String2InputSourceMap
map< string, NTV2InputSource > String2InputSourceMap
Definition: ntv2democommon.cpp:37
NTV2_FORMAT_1080i_5994
@ NTV2_FORMAT_1080i_5994
Definition: ntv2enums.h:535
CNTV2DeviceScanner::GetFirstDeviceFromArgument
static bool GetFirstDeviceFromArgument(const std::string &inArgument, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the AJA device that matches a command li...
Definition: ntv2devicescanner.cpp:374
gString2TPNamesMap
static String2TPNamesMap gString2TPNamesMap
Definition: ntv2democommon.cpp:86
PIXEL_FORMATS_PLANAR
@ PIXEL_FORMATS_PLANAR
Definition: ntv2democommon.h:247
poptStrerror
const char * poptStrerror(const int error)
Definition: options_popt.cpp:3633
NTV2OutputDestinationsConstIter
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
Definition: ntv2publicinterface.h:8820
AJA_PixelFormat_PRORES_DVPRO
@ AJA_PixelFormat_PRORES_DVPRO
Definition: videotypes.h:142
NTV2_FORMAT_4x1920x1080psf_3000
@ NTV2_FORMAT_4x1920x1080psf_3000
Definition: ntv2enums.h:596
String2VANCModeMapConstIter
String2VANCModeMap::const_iterator String2VANCModeMapConstIter
Definition: ntv2democommon.cpp:35
CaptureConfig::fPixelFormat
NTV2PixelFormat fPixelFormat
Pixel format to use.
Definition: ntv2democommon.h:282
NTV2OutputDestinationToChannel
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
Definition: ntv2utils.cpp:5215
String2VideoFormatMMapCI
String2VideoFormatMMap::const_iterator String2VideoFormatMMapCI
Definition: ntv2democommon.cpp:26
NTV2InputSourceToEmbeddedAudioInput
NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value.
Definition: ntv2utils.cpp:4937
NTV2_FBF_8BIT_HDV
@ NTV2_FBF_8BIT_HDV
See 8-Bit HDV.
Definition: ntv2enums.h:225
AJA_PixelFormat_YCBCR8_422PL
@ AJA_PixelFormat_YCBCR8_422PL
Definition: videotypes.h:159
ntv2testpatterngen.h
Declares the NTV2TestPatternGen class.
NTV2_FORMAT_1080p_2K_3000
@ NTV2_FORMAT_1080p_2K_3000
Definition: ntv2enums.h:616
String2TCIndexMap
map< string, NTV2TCIndex > String2TCIndexMap
Definition: ntv2democommon.cpp:43
GetFrameBufferInputXptFromChannel
NTV2InputXptID GetFrameBufferInputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsBInput=false)
Definition: ntv2signalrouter.cpp:762
NTV2_FORMAT_4x2048x1080p_2997
@ NTV2_FORMAT_4x2048x1080p_2997
Definition: ntv2enums.h:597
NTV2_TestPatt_ColorBars100
@ NTV2_TestPatt_ColorBars100
Definition: ntv2testpatterngen.h:28
NTV2_FBF_10BIT_ARGB
@ NTV2_FBF_10BIT_ARGB
10-Bit ARGB
Definition: ntv2enums.h:235
NTV2_FBF_10BIT_YCBCRA
@ NTV2_FBF_10BIT_YCBCRA
10-Bit YCbCrA
Definition: ntv2enums.h:228
AJAAncDataTypeToString
const std::string & AJAAncDataTypeToString(const AJAAncDataType inValue, const bool inCompact=true)
Definition: ancillarydata.cpp:1391
NTV2_FRAMERATE_1798
@ NTV2_FRAMERATE_1798
Definition: ntv2enums.h:422
kTCFormat30fpsDF
@ kTCFormat30fpsDF
Definition: ntv2rp188.h:33
DemoCommonInitializer::DemoCommonInitializer
DemoCommonInitializer()
Definition: ntv2democommon.cpp:93
NTV2_FORMAT_4x4096x2160p_2500
@ NTV2_FORMAT_4x4096x2160p_2500
Definition: ntv2enums.h:693
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
NTV2VideoFormatKinds
ULWord NTV2VideoFormatKinds
Definition: ntv2democommon.h:240
NTV2_FORMAT_4x4096x2160p_4795
@ NTV2_FORMAT_4x4096x2160p_4795
Definition: ntv2enums.h:696
NTV2_FORMAT_4x1920x1080p_2997
@ NTV2_FORMAT_4x1920x1080p_2997
Definition: ntv2enums.h:593
NTV2_FORMAT_4x1920x1080p_2500
@ NTV2_FORMAT_4x1920x1080p_2500
Definition: ntv2enums.h:586
NTV2_FBF_INVALID
@ NTV2_FBF_INVALID
Definition: ntv2enums.h:248
NTV2_FORMAT_4x2048x1080p_4800
@ NTV2_FORMAT_4x2048x1080p_4800
Definition: ntv2enums.h:608
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:210
NTV2_FORMAT_4x3840x2160p_2500
@ NTV2_FORMAT_4x3840x2160p_2500
Definition: ntv2enums.h:680
String2VideoFormatMMap
multimap< string, NTV2VideoFormat > String2VideoFormatMMap
Definition: ntv2democommon.cpp:25
NTV2_IS_ATC_VITC2_TIMECODE_INDEX
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3944
kTCFormat30fps
@ kTCFormat30fps
Definition: ntv2rp188.h:32
NTV2_IS_ATC_LTC_TIMECODE_INDEX
#define NTV2_IS_ATC_LTC_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3946
gFBFsProRes
static NTV2FrameBufferFormatSet gFBFsProRes
Definition: ntv2democommon.cpp:63
NTV2_FBF_10BIT_DPX
@ NTV2_FBF_10BIT_DPX
See 10-Bit RGB - DPX Format.
Definition: ntv2enums.h:221
NTV2_FORMAT_4x3840x2160p_5000_B
@ NTV2_FORMAT_4x3840x2160p_5000_B
Definition: ntv2enums.h:686
NTV2InputXptID
enum NTV2InputCrosspointID NTV2InputXptID
NTV2_NUM_FRAMERATES
@ NTV2_NUM_FRAMERATES
Definition: ntv2enums.h:427
NTV2_OUTPUT_CROSSPOINT_INVALID
@ NTV2_OUTPUT_CROSSPOINT_INVALID
Definition: ntv2enums.h:2687
CaptureConfig::Get
AJALabelValuePairs Get(const bool inCompact=(0)) const
Definition: ntv2democommon.cpp:1771
NTV2TimeCodesConstIter
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
Definition: ntv2publicinterface.h:6877
TimecodeFormat
TimecodeFormat
Definition: ntv2rp188.h:27
operator<<
std::ostream & operator<<(std::ostream &ioStrm, const CaptureConfig &inObj)
Definition: ntv2democommon.cpp:1791
CNTV2Card::SetAudioLoopBack
virtual bool SetAudioLoopBack(const NTV2AudioLoopBack inMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Enables or disables NTV2AudioLoopBack mode for the given NTV2AudioSystem.
Definition: ntv2audio.cpp:300
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or Frame Store 1 (or the first item).
Definition: ntv2enums.h:1336
gOutputDestsHDMI
static NTV2OutputDestinations gOutputDestsHDMI
Definition: ntv2democommon.cpp:70
AJA_FrameRate_2400
@ AJA_FrameRate_2400
Definition: videotypes.h:220
ntv2debug.h
NTV2_FORMAT_4x3840x2160p_2398
@ NTV2_FORMAT_4x3840x2160p_2398
Definition: ntv2enums.h:678
NTV2_FBF_24BIT_RGB
@ NTV2_FBF_24BIT_RGB
See 24-Bit RGB.
Definition: ntv2enums.h:226
NTV2_FORMAT_4x4096x2160p_6000_B
@ NTV2_FORMAT_4x4096x2160p_6000_B
Definition: ntv2enums.h:705
NTV2_FRAMERATE_1898
@ NTV2_FRAMERATE_1898
Definition: ntv2enums.h:420
PIXEL_FORMATS_ALPHA
@ PIXEL_FORMATS_ALPHA
Definition: ntv2democommon.h:250
AJA_PixelFormat_YCBCR8_420PL3
@ AJA_PixelFormat_YCBCR8_420PL3
Definition: videotypes.h:161
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::void
j template void())
Definition: json.hpp:4893
DeviceCapabilities::CanDoOutputDestination
bool CanDoOutputDestination(const NTV2OutputDestination inDest)
Definition: ntv2devicecapabilities.h:242
GetIndexForNTV2Channel
ULWord GetIndexForNTV2Channel(const NTV2Channel inChannel)
Definition: ntv2utils.cpp:4762
kTCFormat48fps
@ kTCFormat48fps
Definition: ntv2rp188.h:34
NTV2_IOKINDS_ANALOG
@ NTV2_IOKINDS_ANALOG
Specifies analog input/output kinds.
Definition: ntv2enums.h:1276
NTV2_FRAMERATE_2500
@ NTV2_FRAMERATE_2500
25 frames per second
Definition: ntv2enums.h:407
NTV2_DEVICEKIND_HDMI
@ NTV2_DEVICEKIND_HDMI
Specifies devices with HDMI connectors.
Definition: ntv2enums.h:1362
NTV2_FORMAT_1080p_2K_4795_A
@ NTV2_FORMAT_1080p_2K_4795_A
Definition: ntv2enums.h:618
CNTV2DemoCommon::Get4KInputFormat
static bool Get4KInputFormat(NTV2VideoFormat &inOutVideoFormat)
Given a video format, if all 4 inputs are the same and promotable to 4K, this function does the promo...
Definition: ntv2democommon.cpp:1195
NTV2_FORMAT_3840x2160p_2500
@ NTV2_FORMAT_3840x2160p_2500
Definition: ntv2enums.h:632
VIDEO_FORMATS_4KUHD
@ VIDEO_FORMATS_4KUHD
Definition: ntv2democommon.h:226
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:399
String2TPNamesMap
map< string, string > String2TPNamesMap
Definition: ntv2democommon.cpp:47
NTV2_FORMAT_4096x2160p_6000_B
@ NTV2_FORMAT_4096x2160p_6000_B
Definition: ntv2enums.h:665
TC_INDEXES_ATCLTC
@ TC_INDEXES_ATCLTC
Definition: ntv2democommon.h:263
DemoCommonInitializer
Definition: ntv2democommon.cpp:90
CNTV2Card::SetAudioSystemInputSource
virtual bool SetAudioSystemInputSource(const NTV2AudioSystem inAudioSystem, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedInput)
Sets the audio source for the given NTV2AudioSystem on the device.
Definition: ntv2audio.cpp:485
NTV2OutputDest
enum NTV2OutputDestination NTV2OutputDest
kTCFormat60fps
@ kTCFormat60fps
Definition: ntv2rp188.h:36
NTV2_FORMAT_2K_2398
@ NTV2_FORMAT_2K_2398
Definition: ntv2enums.h:576
NTV2_FORMAT_4x4096x2160p_2997
@ NTV2_FORMAT_4x4096x2160p_2997
Definition: ntv2enums.h:694
NTV2_FRAMERATE_4800
@ NTV2_FRAMERATE_4800
48 frames per second
Definition: ntv2enums.h:411
NTV2_IS_4K_VIDEO_FORMAT
#define NTV2_IS_4K_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:769
CNTV2Card::DMABufferLock
virtual bool DMABufferLock(const NTV2Buffer &inBuffer, bool inMap=(0), bool inRDMA=(0))
Page-locks the given host buffer to reduce transfer time and CPU usage of DMA transfers.
Definition: ntv2dma.cpp:429
AJA_FrameRate_1898
@ AJA_FrameRate_1898
Definition: videotypes.h:217
CNTV2DemoCommon::GetOutputDestinationStrings
static std::string GetOutputDestinationStrings(const NTV2IOKinds inKinds, const std::string inDevSpec=std::string())
Definition: ntv2democommon.cpp:769
AJA_FrameRate_1500
@ AJA_FrameRate_1500
Definition: videotypes.h:214
AJA_FrameRate
AJA_FrameRate
Definition: videotypes.h:210
NTV2_FRAMERATE_2400
@ NTV2_FRAMERATE_2400
24 frames per second
Definition: ntv2enums.h:408
gTCIndexesATCLTC
static NTV2TCIndexSet gTCIndexesATCLTC
Definition: ntv2democommon.cpp:82
TC_INDEXES_VITC2
@ TC_INDEXES_VITC2
Definition: ntv2democommon.h:265
CNTV2Card::features
virtual class DeviceCapabilities & features(void)
Definition: ntv2card.h:141
NTV2_FORMAT_4x2048x1080psf_2398
@ NTV2_FORMAT_4x2048x1080psf_2398
Definition: ntv2enums.h:587
NTV2_FBF_10BIT_RGB_PACKED
@ NTV2_FBF_10BIT_RGB_PACKED
10-Bit Packed RGB
Definition: ntv2enums.h:234
NTV2_FBF_8BIT_YCBCR_420PL2
@ NTV2_FBF_8BIT_YCBCR_420PL2
8-Bit 4:2:0 2-Plane YCbCr
Definition: ntv2enums.h:244
String2TPNamePair
pair< string, string > String2TPNamePair
Definition: ntv2democommon.cpp:48
NTV2_FORMAT_4x2048x1080p_2398
@ NTV2_FORMAT_4x2048x1080p_2398
Definition: ntv2enums.h:590
AJA_PixelFormat_RGB_DPX_LE
@ AJA_PixelFormat_RGB_DPX_LE
Definition: videotypes.h:139
AJA_PixelFormat_YCbCr_DPX
@ AJA_PixelFormat_YCbCr_DPX
Definition: videotypes.h:132
AJA_PixelFormat_RGB16
@ AJA_PixelFormat_RGB16
Definition: videotypes.h:147
NTV2_INPUTSOURCE_SDI1
@ NTV2_INPUTSOURCE_SDI1
Identifies the 1st SDI video input.
Definition: ntv2enums.h:1251
NTV2_IS_ANALOG_TIMECODE_INDEX
#define NTV2_IS_ANALOG_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3939
CNTV2Card::GetDisplayName
virtual std::string GetDisplayName(void)
Answers with this device's display name.
Definition: ntv2card.cpp:86
NTV2_IOKINDS_SDI
@ NTV2_IOKINDS_SDI
Specifies SDI input/output kinds.
Definition: ntv2enums.h:1274
CNTV2DemoCommon::IsValidDevice
static bool IsValidDevice(const std::string &inDeviceSpec)
Definition: ntv2democommon.cpp:455
gAllFormats
static NTV2VideoFormatSet gAllFormats
Definition: ntv2democommon.cpp:53
AJA_PixelFormat_RGB8_PACK
@ AJA_PixelFormat_RGB8_PACK
Definition: videotypes.h:136
NTV2Buffer::DefaultPageSize
static size_t DefaultPageSize(void)
Definition: ntv2publicinterface.cpp:2028
CNTV2DemoCommon::GetAudioSystemFromString
static NTV2AudioSystem GetAudioSystemFromString(const std::string &inStr)
Returns the NTV2AudioSystem that matches the given string.
Definition: ntv2democommon.cpp:952
NTV2_FORMAT_1080psf_2K_2500
@ NTV2_FORMAT_1080psf_2K_2500
Definition: ntv2enums.h:560
NTV2PixelFormatKinds
ULWord NTV2PixelFormatKinds
Definition: ntv2democommon.h:255
AJA_FrameRate_4795
@ AJA_FrameRate_4795
Definition: videotypes.h:224
String2TPNamesMapConstIter
String2TPNamesMap::const_iterator String2TPNamesMapConstIter
Definition: ntv2democommon.cpp:49
CNTV2DemoCommon::GetTestPatternStrings
static std::string GetTestPatternStrings(void)
Definition: ntv2democommon.cpp:996
kTCFormat50fps
@ kTCFormat50fps
Definition: ntv2rp188.h:35
NTV2_IS_FBF_RGB
#define NTV2_IS_FBF_RGB(__fbf__)
Definition: ntv2enums.h:274
NTV2_FORMAT_4x2048x1080psf_2400
@ NTV2_FORMAT_4x2048x1080psf_2400
Definition: ntv2enums.h:588
aja::lower
std::string & lower(std::string &str)
Definition: common.cpp:436
NTV2_FBF_10BIT_RAW_RGB
@ NTV2_FBF_10BIT_RAW_RGB
10-Bit Raw RGB
Definition: ntv2enums.h:238
NTV2InputSourceToString
std::string NTV2InputSourceToString(const NTV2InputSource inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7258
AJA_FrameRate_2500
@ AJA_FrameRate_2500
Definition: videotypes.h:221
CNTV2DemoCommon::Popt::Popt
Popt(const int inArgc, const char **pArgs, const PoptOpts *pInOptionsTable)
Definition: ntv2democommon.cpp:1606
gTCIndexesVITC2
static NTV2TCIndexSet gTCIndexesVITC2
Definition: ntv2democommon.cpp:84
AJA_PixelFormat_HDV
@ AJA_PixelFormat_HDV
Definition: videotypes.h:135
NTV2TCIndexToString
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6441
NTV2_FORMAT_1080p_5994_B
@ NTV2_FORMAT_1080p_5994_B
Definition: ntv2enums.h:552
gFBFsRaw
static NTV2FrameBufferFormatSet gFBFsRaw
Definition: ntv2democommon.cpp:60
NTV2_FORMAT_1080psf_3000_2
@ NTV2_FORMAT_1080psf_3000_2
Definition: ntv2enums.h:563
NTV2_FORMAT_1080p_2K_2400
@ NTV2_FORMAT_1080p_2K_2400
Definition: ntv2enums.h:547
AJA_PixelFormat_DVCPRO
@ AJA_PixelFormat_DVCPRO
Definition: videotypes.h:133
NTV2DeviceKinds
enum _NTV2DeviceKinds NTV2DeviceKinds
These enum values are used for device selection/filtering.
NTV2_FORMAT_525_2398
@ NTV2_FORMAT_525_2398
Definition: ntv2enums.h:568
NTV2_FORMAT_4x2048x1080p_3000
@ NTV2_FORMAT_4x2048x1080p_3000
Definition: ntv2enums.h:598
NTV2_DEVICEKIND_CUSTOM_ANC
@ NTV2_DEVICEKIND_CUSTOM_ANC
Specifies devices that have custom Anc inserter/extractor firmware.
Definition: ntv2enums.h:1372
NTV2_VANCMODE_OFF
@ NTV2_VANCMODE_OFF
This identifies the mode in which there are no VANC lines in the frame buffer.
Definition: ntv2enums.h:3752
NTV2_FORMAT_4096x2160p_4795
@ NTV2_FORMAT_4096x2160p_4795
Definition: ntv2enums.h:654
aja::replace
std::string & replace(std::string &str, const std::string &from, const std::string &to)
Definition: common.cpp:110
NTV2_FRAMERATE_2398
@ NTV2_FRAMERATE_2398
Fractional rate of 24,000 frames per 1,001 seconds.
Definition: ntv2enums.h:409
CNTV2DemoCommon::ConfigureAudioSystems
static bool ConfigureAudioSystems(CNTV2Card &inDevice, const CaptureConfig &inConfig, const NTV2AudioSystemSet inAudioSystems)
Configures capture audio systems.
Definition: ntv2democommon.cpp:1570
kTCFormat25fps
@ kTCFormat25fps
Definition: ntv2rp188.h:31
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
CNTV2DemoCommon::ToLower
static std::string ToLower(const std::string &inStr)
Returns the given string after converting it to lower case.
Definition: ntv2democommon.cpp:1033
NTV2_FORMAT_4x4096x2160p_3000
@ NTV2_FORMAT_4x4096x2160p_3000
Definition: ntv2enums.h:695
AJASystemInfo::append
static AJALabelValuePairs & append(AJALabelValuePairs &inOutTable, const std::string &inLabel, const std::string &inValue=std::string())
A convenience function that appends the given label and value strings to the provided AJALabelValuePa...
Definition: info.h:168
NTV2_FORMAT_2K_2500
@ NTV2_FORMAT_2K_2500
Definition: ntv2enums.h:578
NTV2_FRAMERATE_1900
@ NTV2_FRAMERATE_1900
Definition: ntv2enums.h:419
NTV2_OUTPUT_DEST_IS_HDMI
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
Definition: ntv2enums.h:1321
ntv2devicescanner.h
Declares the CNTV2DeviceScanner class.
CaptureConfig
This class is used to configure an NTV2Capture instance.
Definition: ntv2democommon.h:274
gFBFsPacked
static NTV2FrameBufferFormatSet gFBFsPacked
Definition: ntv2democommon.cpp:61
NTV2_FORMAT_4x2048x1080psf_3000
@ NTV2_FORMAT_4x2048x1080psf_3000
Definition: ntv2enums.h:600
NTV2_FORMAT_1080p_2997
@ NTV2_FORMAT_1080p_2997
Definition: ntv2enums.h:541
NTV2_DEVICEKIND_12G
@ NTV2_DEVICEKIND_12G
Specifies devices that have 12G SDI connectors.
Definition: ntv2enums.h:1371
NTV2_FORMAT_1080p_2K_4795_B
@ NTV2_FORMAT_1080p_2K_4795_B
Definition: ntv2enums.h:620
AJA_PixelFormat_YCBCR10_420PL
@ AJA_PixelFormat_YCBCR10_420PL
Definition: videotypes.h:156
NTV2_FRAMERATE_1498
@ NTV2_FRAMERATE_1498
Fractional rate of 15,000 frames per 1,001 seconds.
Definition: ntv2enums.h:416
NTV2_FORMAT_1080p_3000
@ NTV2_FORMAT_1080p_3000
Definition: ntv2enums.h:542
gString2VideoFormatMMap
static String2VideoFormatMMap gString2VideoFormatMMap
Definition: ntv2democommon.cpp:72
CNTV2DemoCommon::SetDefaultPageSize
static size_t SetDefaultPageSize(void)
Definition: ntv2democommon.cpp:1591
NTV2FrameData::Timecode
NTV2_RP188 Timecode(const NTV2TCIndex inTCNdx) const
Definition: ntv2democommon.cpp:404
NTV2_FORMAT_4x3840x2160p_5994
@ NTV2_FORMAT_4x3840x2160p_5994
Definition: ntv2enums.h:684
NTV2_FORMAT_4096x2160p_2398
@ NTV2_FORMAT_4096x2160p_2398
Definition: ntv2enums.h:647
NTV2_FORMAT_720p_6000
@ NTV2_FORMAT_720p_6000
Definition: ntv2enums.h:538
NTV2_INPUTSOURCE_INVALID
@ NTV2_INPUTSOURCE_INVALID
The invalid video input.
Definition: ntv2enums.h:1259
NTV2_DEVICEKIND_4K
@ NTV2_DEVICEKIND_4K
Specifies devices that can do 4K video.
Definition: ntv2enums.h:1367
NTV2_FORMAT_1080p_2500
@ NTV2_FORMAT_1080p_2500
Definition: ntv2enums.h:543
NTV2AudioSystemSet
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
Definition: ntv2publicinterface.h:3900
NTV2_MAX_NUM_VIDEO_FORMATS
@ NTV2_MAX_NUM_VIDEO_FORMATS
Definition: ntv2enums.h:708
CNTV2DemoCommon::BFT
static bool BFT(void)
Definition: ntv2democommon.cpp:1632
NTV2TCIndex
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
Definition: ntv2enums.h:3904
AJA_PixelFormat_RGBA8
@ AJA_PixelFormat_RGBA8
Definition: videotypes.h:127
String2AudioSystemMap
map< string, NTV2AudioSystem > String2AudioSystemMap
Definition: ntv2democommon.cpp:31
GetCSCOutputXptFromChannel
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inCSC, const bool inIsKey=false, const bool inIsRGB=false)
Definition: ntv2signalrouter.cpp:819
AJASystemInfo::ToString
virtual void ToString(std::string &outAllLabelsAndValues) const
Answers with a multi-line string that contains the complete host system info table.
AJA_FrameRate_2398
@ AJA_FrameRate_2398
Definition: videotypes.h:219
NTV2_FORMAT_4x2048x1080p_5000
@ NTV2_FORMAT_4x2048x1080p_5000
Definition: ntv2enums.h:604
NTV2_FBF_24BIT_BGR
@ NTV2_FBF_24BIT_BGR
See 24-Bit BGR.
Definition: ntv2enums.h:227
AJA_PixelFormat_YCBCR10_422PL3LE
@ AJA_PixelFormat_YCBCR10_422PL3LE
Definition: videotypes.h:164
CNTV2DemoCommon::GetPixelFormatStrings
static std::string GetPixelFormatStrings(const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL, const std::string inDevSpec=std::string())
Definition: ntv2democommon.cpp:605
NTV2_FORMAT_4096x2160p_6000
@ NTV2_FORMAT_4096x2160p_6000
Definition: ntv2enums.h:658
NTV2_OUTPUT_DEST_IS_ANALOG
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
Definition: ntv2enums.h:1322
UWord
uint16_t UWord
Definition: ajatypes.h:253
NTV2VANCModeToString
std::string NTV2VANCModeToString(const NTV2VANCMode inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6552
AJA_PixelFormat_YCBCR10_420PL3LE
@ AJA_PixelFormat_YCBCR10_420PL3LE
Definition: videotypes.h:163
CNTV2DemoCommon::GetVANCModeStrings
static std::string GetVANCModeStrings(void)
Definition: ntv2democommon.cpp:958
CNTV2DemoCommon::GetSupportedTCIndexes
static const NTV2TCIndexes GetSupportedTCIndexes(const NTV2TCIndexKinds inKinds)
Definition: ntv2democommon.cpp:833
NTV2_FORMAT_4x1920x1080p_3000
@ NTV2_FORMAT_4x1920x1080p_3000
Definition: ntv2enums.h:594
NTV2_FORMAT_4x3840x2160p_2997
@ NTV2_FORMAT_4x3840x2160p_2997
Definition: ntv2enums.h:681
NTV2_FBF_8BIT_YCBCR
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
Definition: ntv2enums.h:214
CNTV2DemoCommon::GetOutputDestinationFromString
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.
Definition: ntv2democommon.cpp:801
ntv2utils.h
Declares numerous NTV2 utility functions.
AJA_PixelFormat_RGB10_PACK
@ AJA_PixelFormat_RGB10_PACK
Definition: videotypes.h:144
PlayerConfig::Get
AJALabelValuePairs Get(const bool inCompact=(0)) const
Renders a human-readable representation of me.
Definition: ntv2democommon.cpp:1801
NTV2_FORMAT_1080p_5000_B
@ NTV2_FORMAT_1080p_5000_B
Definition: ntv2enums.h:551
AJA_PixelFormat_RGB_DPX
@ AJA_PixelFormat_RGB_DPX
Definition: videotypes.h:131
poptFreeContext
poptContext poptFreeContext(poptContext con)
Definition: options_popt.cpp:3539
NTV2VideoFormatToString
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
Definition: ntv2utils.cpp:6793
NTV2_FRAMERATE_1800
@ NTV2_FRAMERATE_1800
Definition: ntv2enums.h:421
NTV2VideoFormatSetConstIter
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
Definition: ntv2publicinterface.h:8803
CNTV2DemoCommon::GetVideoFormatStrings
static std::string GetVideoFormatStrings(const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD, const std::string inDevSpec=std::string())
Definition: ntv2democommon.cpp:523
NTV2_FORMAT_4x3840x2160p_5000
@ NTV2_FORMAT_4x3840x2160p_5000
Definition: ntv2enums.h:683
NTV2_FORMAT_1080p_2K_5994_A
@ NTV2_FORMAT_1080p_2K_5994_A
Definition: ntv2enums.h:614
NTV2_INPUT_SOURCE_IS_HDMI
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
Definition: ntv2enums.h:1263
CNTV2DemoCommon::Popt::~Popt
virtual ~Popt()
Definition: ntv2democommon.cpp:1626
NTV2_MAX_NUM_TIMECODE_INDEXES
@ NTV2_MAX_NUM_TIMECODE_INDEXES
Definition: ntv2enums.h:3933
gInitializer
static const DemoCommonInitializer gInitializer
Definition: ntv2democommon.cpp:401
GetCSCInputXptFromChannel
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
Definition: ntv2signalrouter.cpp:775
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
NTV2_FORMAT_4x2048x1080p_12000
@ NTV2_FORMAT_4x2048x1080p_12000
Definition: ntv2enums.h:610
NTV2_DEVICEKIND_ALL
@ NTV2_DEVICEKIND_ALL
Specifies any/all devices.
Definition: ntv2enums.h:1357
kTCFormat60fpsDF
@ kTCFormat60fpsDF
Definition: ntv2rp188.h:37
CNTV2DemoCommon::GetTCIndexStrings
static std::string GetTCIndexStrings(const NTV2TCIndexKinds inKinds=TC_INDEXES_ALL, const std::string inDeviceSpecifier=std::string(), const bool inIsInputOnly=(!(0)))
Definition: ntv2democommon.cpp:852
NTV2_DEVICEKIND_INPUT
@ NTV2_DEVICEKIND_INPUT
Specifies devices that input (capture).
Definition: ntv2enums.h:1359
NTV2_FBF_10BIT_YCBCR_422PL2
@ NTV2_FBF_10BIT_YCBCR_422PL2
10-Bit 4:2:2 2-Plane YCbCr
Definition: ntv2enums.h:243
NTV2Connection
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2Connection
This links an NTV2InputXptID and an NTV2OutputXptID.
Definition: ntv2signalrouter.h:38
NTV2_FORMAT_625psf_2500
@ NTV2_FORMAT_625psf_2500
Definition: ntv2enums.h:571
CNTV2DemoCommon::WaitForEnterKeyPress
static void WaitForEnterKeyPress(void)
Prompts the user (via stdout) to press the Return or Enter key, then waits for it to happen.
Definition: ntv2democommon.cpp:1088
NTV2_AUDIO_BUFFER_SIZE_4MB
@ NTV2_AUDIO_BUFFER_SIZE_4MB
Definition: ntv2enums.h:1892
NTV2_DEVICEKIND_EXTERNAL
@ NTV2_DEVICEKIND_EXTERNAL
Specifies external devices (e.g. Thunderbolt).
Definition: ntv2enums.h:1366
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:93
NTV2_FORMAT_1080p_2K_2500
@ NTV2_FORMAT_1080p_2K_2500
Definition: ntv2enums.h:559
NTV2_FORMAT_4x4096x2160p_4800_B
@ NTV2_FORMAT_4x4096x2160p_4800_B
Definition: ntv2enums.h:702
NTV2_FORMAT_4x1920x1080psf_2997
@ NTV2_FORMAT_4x1920x1080psf_2997
Definition: ntv2enums.h:595
DeviceCapabilities::CanDoInputSource
bool CanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2devicecapabilities.h:233
CNTV2DemoCommon::GetTestPatternNameFromString
static std::string GetTestPatternNameFromString(const std::string &inStr)
Definition: ntv2democommon.cpp:1024
NTV2_FORMAT_1080p_6000_A
@ NTV2_FORMAT_1080p_6000_A
Definition: ntv2enums.h:558
NTV2_INPUTSOURCE_HDMI1
@ NTV2_INPUTSOURCE_HDMI1
Identifies the 1st HDMI video input.
Definition: ntv2enums.h:1247
GetDLInOutputXptFromChannel
NTV2OutputXptID GetDLInOutputXptFromChannel(const NTV2Channel inDLInput)
Definition: ntv2signalrouter.cpp:917
NTV2_FRAMERATE_11988
@ NTV2_FRAMERATE_11988
Fractional rate of 120,000 frames per 1,001 seconds.
Definition: ntv2enums.h:414
DeviceFilterString
static string DeviceFilterString(const NTV2DeviceKinds inKinds)
Definition: ntv2democommon.cpp:469
AJA_FrameRate_5994
@ AJA_FrameRate_5994
Definition: videotypes.h:227
AJA_FrameRate_1800
@ AJA_FrameRate_1800
Definition: videotypes.h:216
NTV2_FORMAT_1080p_2K_2398
@ NTV2_FORMAT_1080p_2K_2398
Definition: ntv2enums.h:546
NTV2_FORMAT_3840x2160p_2997
@ NTV2_FORMAT_3840x2160p_2997
Definition: ntv2enums.h:633
NTV2_FORMAT_4096x2160p_4800
@ NTV2_FORMAT_4096x2160p_4800
Definition: ntv2enums.h:655
NTV2StringList
std::vector< std::string > NTV2StringList
Definition: ntv2utils.h:1143
NTV2_FORMAT_1080p_2398
@ NTV2_FORMAT_1080p_2398
Definition: ntv2enums.h:544
gString2VANCModeMap
static String2VANCModeMap gString2VANCModeMap
Definition: ntv2democommon.cpp:75
NTV2VANCMode
NTV2VANCMode
These enum values identify the available VANC modes.
Definition: ntv2enums.h:3750
AJA_FrameRate_4800
@ AJA_FrameRate_4800
Definition: videotypes.h:225
NTV2_INPUT_CROSSPOINT_INVALID
@ NTV2_INPUT_CROSSPOINT_INVALID
Definition: ntv2enums.h:2858
NTV2_FORMAT_1080psf_2K_2400
@ NTV2_FORMAT_1080psf_2K_2400
Definition: ntv2enums.h:549
AJA_PixelFormat_YCbCrA10
@ AJA_PixelFormat_YCbCrA10
Definition: videotypes.h:138
NTV2_OUTPUT_DEST_IS_SDI
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
Definition: ntv2enums.h:1323
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:199
PIXEL_FORMATS_PACKED
@ PIXEL_FORMATS_PACKED
Definition: ntv2democommon.h:249
NTV2_VANCMODE_INVALID
@ NTV2_VANCMODE_INVALID
This identifies the invalid (unspecified, uninitialized) VANC mode.
Definition: ntv2enums.h:3755
CNTV2DemoCommon::GetAJAFrameRate
static AJA_FrameRate GetAJAFrameRate(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1118
NTV2_FORMAT_3840x2160p_5994
@ NTV2_FORMAT_3840x2160p_5994
Definition: ntv2enums.h:638
NTV2_FORMAT_4x4096x2160p_2400
@ NTV2_FORMAT_4x4096x2160p_2400
Definition: ntv2enums.h:692
NTV2_FBF_8BIT_YCBCR_YUY2
@ NTV2_FBF_8BIT_YCBCR_YUY2
See Alternate 8-Bit YCbCr ('YUY2').
Definition: ntv2enums.h:218
CaptureConfig::fInputChannel
NTV2Channel fInputChannel
The device channel to use.
Definition: ntv2democommon.h:279
gSDHDFormats
static NTV2VideoFormatSet gSDHDFormats
Definition: ntv2democommon.cpp:54
NTV2_FORMAT_4x4096x2160p_6000
@ NTV2_FORMAT_4x4096x2160p_6000
Definition: ntv2enums.h:700
NTV2ChannelList
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
Definition: ntv2publicinterface.h:3835
NTV2_FORMAT_3840x2160p_2398
@ NTV2_FORMAT_3840x2160p_2398
Definition: ntv2enums.h:630
AJA_PixelFormat_PRORES_HDV
@ AJA_PixelFormat_PRORES_HDV
Definition: videotypes.h:143
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1244
gOutputDestinations
static NTV2OutputDestinations gOutputDestinations
Definition: ntv2democommon.cpp:68
NTV2_DEVICEKIND_SDI
@ NTV2_DEVICEKIND_SDI
Specifies devices with SDI connectors.
Definition: ntv2enums.h:1361
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:521
VIDEO_FORMATS_SDHD
@ VIDEO_FORMATS_SDHD
Definition: ntv2democommon.h:225
NTV2_IS_QUAD_QUAD_FORMAT
#define NTV2_IS_QUAD_QUAD_FORMAT(__f__)
Definition: ntv2enums.h:801
NTV2_FORMAT_4x1920x1080psf_2398
@ NTV2_FORMAT_4x1920x1080psf_2398
Definition: ntv2enums.h:581
NTV2DeviceCanDo12gRouting
bool NTV2DeviceCanDo12gRouting(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:293
poptGetContext
poptContext poptGetContext(const char *name, int argc, const char **argv, const struct poptOption *options, unsigned int flags)
Definition: options_popt.cpp:2264
CNTV2DemoCommon::GetInputSourceStrings
static std::string GetInputSourceStrings(const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL, const std::string inDevSpec=std::string())
Definition: ntv2democommon.cpp:689
CNTV2DemoCommon::GetInputRouting8K
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.
Definition: ntv2democommon.cpp:1483
NTV2_FORMAT_1080p_2K_6000_A
@ NTV2_FORMAT_1080p_2K_6000_A
Definition: ntv2enums.h:613
NTV2_FBF_10BIT_YCBCR
@ NTV2_FBF_10BIT_YCBCR
See 10-Bit YCbCr Format.
Definition: ntv2enums.h:213
String2InputSourceMapConstIter
String2InputSourceMap::const_iterator String2InputSourceMapConstIter
Definition: ntv2democommon.cpp:38
NTV2_FBF_PRORES_DVCPRO
@ NTV2_FBF_PRORES_DVCPRO
Apple ProRes DVC Pro.
Definition: ntv2enums.h:232
g8KFormats
static NTV2VideoFormatSet g8KFormats
Definition: ntv2democommon.cpp:56
NTV2_IOKINDS_ALL
@ NTV2_IOKINDS_ALL
Specifies any/all input/output kinds.
Definition: ntv2enums.h:1277
NTV2_DEVICEKIND_SFP
@ NTV2_DEVICEKIND_SFP
Specifies devices with SFP connectors.
Definition: ntv2enums.h:1364
NTV2_FORMAT_3840x2160p_5000_B
@ NTV2_FORMAT_3840x2160p_5000_B
Definition: ntv2enums.h:640
NTV2_FORMAT_4096x2160p_3000
@ NTV2_FORMAT_4096x2160p_3000
Definition: ntv2enums.h:651
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5606
NTV2_FORMAT_4x1920x1080psf_2500
@ NTV2_FORMAT_4x1920x1080psf_2500
Definition: ntv2enums.h:583
NTV2_FRAMERATE_5994
@ NTV2_FRAMERATE_5994
Fractional rate of 60,000 frames per 1,001 seconds.
Definition: ntv2enums.h:404
poptGetNextOpt
int poptGetNextOpt(poptContext con)
Definition: options_popt.cpp:3236
ntv2democommon.h
This file contains some structures, constants, classes and functions that are used in some of the dem...
common.h
Private include file for all ajabase sources.
NTV2_FORMAT_4x3840x2160p_2400
@ NTV2_FORMAT_4x3840x2160p_2400
Definition: ntv2enums.h:679
NTV2AudioSystemSetConstIter
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
Definition: ntv2publicinterface.h:3901
AJA_PixelFormat_ABGR8
@ AJA_PixelFormat_ABGR8
Definition: videotypes.h:130
NTV2_FORMAT_4x4096x2160p_5000_B
@ NTV2_FORMAT_4x4096x2160p_5000_B
Definition: ntv2enums.h:703
AJA_PixelFormat_Unknown
@ AJA_PixelFormat_Unknown
Definition: videotypes.h:123
NTV2TCIndexesConstIter
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Definition: ntv2publicinterface.h:6880
NTV2_FBF_10BIT_RAW_YCBCR
@ NTV2_FBF_10BIT_RAW_YCBCR
See 10-Bit Raw YCbCr (CION).
Definition: ntv2enums.h:239
NTV2_DEVICEKIND_6G
@ NTV2_DEVICEKIND_6G
Specifies devices that have 6G SDI connectors.
Definition: ntv2enums.h:1370
NTV2_OUTPUTDESTINATION_INVALID
@ NTV2_OUTPUTDESTINATION_INVALID
Definition: ntv2enums.h:1313
NTV2_FORMAT_4x2048x1080p_2500
@ NTV2_FORMAT_4x2048x1080p_2500
Definition: ntv2enums.h:592
NTV2_FORMAT_720p_2398
@ NTV2_FORMAT_720p_2398
Definition: ntv2enums.h:554
NTV2_FORMAT_4x1920x1080p_5994
@ NTV2_FORMAT_4x1920x1080p_5994
Definition: ntv2enums.h:602
NTV2_FORMAT_4x4096x2160p_5000
@ NTV2_FORMAT_4x4096x2160p_5000
Definition: ntv2enums.h:698
NTV2FrameBufferFormatToString
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6983
TC_INDEXES_SDI
@ TC_INDEXES_SDI
Definition: ntv2democommon.h:261
NTV2_FORMAT_4x3840x2160p_6000
@ NTV2_FORMAT_4x3840x2160p_6000
Definition: ntv2enums.h:685
CaptureConfig::fDoTSIRouting
bool fDoTSIRouting
If true, do TSI routing; otherwise squares.
Definition: ntv2democommon.h:288
NTV2DeviceGetSupportedOutputDests
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Returns a set of distinct NTV2OutputDest values supported on the given device.
Definition: ntv2publicinterface.cpp:1302
AJA_PixelFormat_YCbCr10
@ AJA_PixelFormat_YCbCr10
Definition: videotypes.h:124
NTV2XptConnections
std::map< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnections
Definition: ntv2signalrouter.h:39
GetTSIMuxOutputXptFromChannel
NTV2OutputXptID GetTSIMuxOutputXptFromChannel(const NTV2Channel inTSIMuxer, const bool inLinkB=false, const bool inIsRGB=false)
Definition: ntv2signalrouter.cpp:1005
NTV2_FBF_10BIT_YCBCR_DPX
@ NTV2_FBF_10BIT_YCBCR_DPX
See 10-Bit YCbCr - DPX Format.
Definition: ntv2enums.h:222
AJA_FrameRate_12000
@ AJA_FrameRate_12000
Definition: videotypes.h:231
NTV2InputSourceSetConstIter
NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter
A handy const iterator for iterating over an NTV2InputSourceSet.
Definition: ntv2publicinterface.h:8817
gOutputDestsAnalog
static NTV2OutputDestinations gOutputDestsAnalog
Definition: ntv2democommon.cpp:71
std
Definition: json.hpp:5362
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:6790
NTV2_FBF_10BIT_YCBCR_422PL3_LE
@ NTV2_FBF_10BIT_YCBCR_422PL3_LE
See 3-Plane 10-Bit YCbCr 4:2:2 ('I422_10LE' a.k.a. 'YUV-P-L10').
Definition: ntv2enums.h:241
AJA_FrameRate_1798
@ AJA_FrameRate_1798
Definition: videotypes.h:215
BurnConfig::Get
AJALabelValuePairs Get(const bool inCompact=(0)) const
Renders a human-readable representation of me.
Definition: ntv2democommon.cpp:1838
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5470
NTV2_AUDIO_EMBEDDED
@ NTV2_AUDIO_EMBEDDED
Obtain audio samples from the audio that's embedded in the video HANC.
Definition: ntv2enums.h:1982
NTV2_FRAMERATE_UNKNOWN
@ NTV2_FRAMERATE_UNKNOWN
Represents an unknown or invalid frame rate.
Definition: ntv2enums.h:401
NTV2_FORMAT_1080p_5000_A
@ NTV2_FORMAT_1080p_5000_A
Definition: ntv2enums.h:556
CNTV2DemoCommon::GetAJAPixelFormat
static AJA_PixelFormat GetAJAPixelFormat(const NTV2PixelFormat inFormat)
Definition: ntv2democommon.cpp:1150
NTV2_FORMAT_4x2048x1080p_6000
@ NTV2_FORMAT_4x2048x1080p_6000
Definition: ntv2enums.h:606
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
CNTV2DemoCommon::GetInputRouting4K
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.
Definition: ntv2democommon.cpp:1335
NTV2_FORMAT_4096x2160p_5000
@ NTV2_FORMAT_4096x2160p_5000
Definition: ntv2enums.h:656
NTV2_TCINDEX_DEFAULT
@ NTV2_TCINDEX_DEFAULT
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel)
Definition: ntv2enums.h:3906
NTV2_FORMAT_1080i_5000
@ NTV2_FORMAT_1080i_5000
Definition: ntv2enums.h:534
gTCIndexesAnalog
static NTV2TCIndexSet gTCIndexesAnalog
Definition: ntv2democommon.cpp:81
NTV2_FORMAT_4x1920x1080p_5000
@ NTV2_FORMAT_4x1920x1080p_5000
Definition: ntv2enums.h:601
NTV2_FBF_8BIT_YCBCR_420PL3
@ NTV2_FBF_8BIT_YCBCR_420PL3
See 3-Plane 8-Bit YCbCr 4:2:0 ('I420' a.k.a. 'YUV-P420').
Definition: ntv2enums.h:224
gOutputDestsSDI
static NTV2OutputDestinations gOutputDestsSDI
Definition: ntv2democommon.cpp:69
NTV2_FORMAT_4x1920x1080p_2398
@ NTV2_FORMAT_4x1920x1080p_2398
Definition: ntv2enums.h:584
NTV2DeviceGetSupportedInputSources
bool NTV2DeviceGetSupportedInputSources(const NTV2DeviceID inDeviceID, NTV2InputSourceSet &outInputSources, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Returns a set of distinct NTV2InputSource values supported on the given device.
Definition: ntv2publicinterface.cpp:1286
gInputSourcesSDI
static NTV2InputSourceSet gInputSourcesSDI
Definition: ntv2democommon.cpp:65
NTV2_FORMAT_1080p_6000_B
@ NTV2_FORMAT_1080p_6000_B
Definition: ntv2enums.h:553
NTV2_FORMAT_4x4096x2160p_5994_B
@ NTV2_FORMAT_4x4096x2160p_5994_B
Definition: ntv2enums.h:704
gString2AudioSystemMap
static String2AudioSystemMap gString2AudioSystemMap
Definition: ntv2democommon.cpp:74
NTV2_FORMAT_4096x2160p_2997
@ NTV2_FORMAT_4096x2160p_2997
Definition: ntv2enums.h:650
NTV2_TCINDEX_INVALID
@ NTV2_TCINDEX_INVALID
Definition: ntv2enums.h:3934
NTV2_FBF_8BIT_DVCPRO
@ NTV2_FBF_8BIT_DVCPRO
See 8-Bit DVCPro.
Definition: ntv2enums.h:223
gTestPatternNames
static NTV2StringList gTestPatternNames
Definition: ntv2democommon.cpp:87
NTV2_FORMAT_4096x2160p_5994_B
@ NTV2_FORMAT_4096x2160p_5994_B
Definition: ntv2enums.h:664
NTV2_FORMAT_4x3840x2160p_5994_B
@ NTV2_FORMAT_4x3840x2160p_5994_B
Definition: ntv2enums.h:687
NTV2_FORMAT_1080p_5994_A
@ NTV2_FORMAT_1080p_5994_A
Definition: ntv2enums.h:557
NTV2_FORMAT_4x3840x2160p_6000_B
@ NTV2_FORMAT_4x3840x2160p_6000_B
Definition: ntv2enums.h:688
NTV2_FBF_8BIT_YCBCR_422PL2
@ NTV2_FBF_8BIT_YCBCR_422PL2
8-Bit 4:2:2 2-Plane YCbCr
Definition: ntv2enums.h:245
GetInputSourceOutputXpt
NTV2OutputXptID GetInputSourceOutputXpt(const NTV2InputSource inInputSource, const bool inIsSDI_DS2=false, const bool inIsHDMI_RGB=false, const UWord inHDMI_Quadrant=0)
Definition: ntv2signalrouter.cpp:865
AJA_FrameRate_6000
@ AJA_FrameRate_6000
Definition: videotypes.h:228
NTV2_FORMAT_4x2048x1080p_5994
@ NTV2_FORMAT_4x2048x1080p_5994
Definition: ntv2enums.h:605
gFBFsRGB
static NTV2FrameBufferFormatSet gFBFsRGB
Definition: ntv2democommon.cpp:58
NTV2StringListConstIter
NTV2StringList::const_iterator NTV2StringListConstIter
Definition: ntv2utils.h:1145
NTV2_DEVICEKIND_NONE
@ NTV2_DEVICEKIND_NONE
Doesn't specify any kind of device.
Definition: ntv2enums.h:1374
NTV2FrameData::UnlockAll
bool UnlockAll(CNTV2Card &inDevice)
Definition: ntv2democommon.cpp:433
gTCIndexesSDI
static NTV2TCIndexSet gTCIndexesSDI
Definition: ntv2democommon.cpp:79
AJA_PixelFormat
AJA_PixelFormat
Definition: videotypes.h:121
NTV2TimecodeIndexToInputSource
NTV2InputSource NTV2TimecodeIndexToInputSource(const NTV2TCIndex inTCIndex)
Converts the given NTV2TCIndex value into the appropriate NTV2InputSource value.
Definition: ntv2utils.cpp:5048
NTV2_FORMAT_4x3840x2160p_3000
@ NTV2_FORMAT_4x3840x2160p_3000
Definition: ntv2enums.h:682
NTV2_FORMAT_1080p_2K_5994_B
@ NTV2_FORMAT_1080p_2K_5994_B
Definition: ntv2enums.h:623
gString2InputSourceMap
static String2InputSourceMap gString2InputSourceMap
Definition: ntv2democommon.cpp:76
NTV2_FBF_16BIT_ARGB
@ NTV2_FBF_16BIT_ARGB
16-Bit ARGB
Definition: ntv2enums.h:236
PlayerConfig
Configures an NTV2Player instance.
Definition: ntv2democommon.h:319
NTV2ChannelToString
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5787
NTV2_INPUT_SOURCE_IS_SDI
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
Definition: ntv2enums.h:1265
NTV2OutputXptID
enum NTV2OutputCrosspointID NTV2OutputXptID
NTV2_FBF_8BIT_YCBCR_422PL3
@ NTV2_FBF_8BIT_YCBCR_422PL3
See 3-Plane 8-Bit YCbCr 4:2:2 (Weitek 'Y42B' a.k.a. 'YUV-P8').
Definition: ntv2enums.h:237
NTV2TestPatternGen::getTestPatternNames
static NTV2TestPatternNames getTestPatternNames(void)
Definition: ntv2testpatterngen.cpp:2542
NTV2_FORMAT_3840x2160p_5000
@ NTV2_FORMAT_3840x2160p_5000
Definition: ntv2enums.h:637
NTV2_FORMAT_720p_5994
@ NTV2_FORMAT_720p_5994
Definition: ntv2enums.h:537
kTCFormatUnknown
@ kTCFormatUnknown
Definition: ntv2rp188.h:29
CNTV2DemoCommon::GetSupportedInputSources
static const NTV2InputSourceSet GetSupportedInputSources(const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Definition: ntv2democommon.cpp:673
NTV2FrameData::LockAll
bool LockAll(CNTV2Card &inDevice)
Definition: ntv2democommon.cpp:412
CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1096
NTV2_FORMAT_1080p_2K_5000_A
@ NTV2_FORMAT_1080p_2K_5000_A
Definition: ntv2enums.h:617
NTV2_FRAMERATE_5000
@ NTV2_FRAMERATE_5000
50 frames per second
Definition: ntv2enums.h:410
NTV2_FORMAT_4x4096x2160p_4795_B
@ NTV2_FORMAT_4x4096x2160p_4795_B
Definition: ntv2enums.h:701
NTV2Buffer::HostPageSize
static size_t HostPageSize(void)
Definition: ntv2publicinterface.cpp:2041
CNTV2DemoCommon::GetTCIndexFromString
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.
Definition: ntv2democommon.cpp:887
CNTV2Card::SetNumberAudioChannels
virtual bool SetNumberAudioChannels(const ULWord inNumChannels, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the number of audio channels to be concurrently captured or played for a given Audio System on t...
Definition: ntv2audio.cpp:146
CNTV2Card::SetAudioBufferSize
virtual bool SetAudioBufferSize(const NTV2AudioBufferSize inValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Changes the size of the audio buffer that is used for a given Audio System in the AJA device.
Definition: ntv2audio.cpp:249
NTV2_FORMAT_4x2048x1080psf_2500
@ NTV2_FORMAT_4x2048x1080psf_2500
Definition: ntv2enums.h:589
CNTV2DemoCommon::GetInputSourceFromString
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.
Definition: ntv2democommon.cpp:721
NTV2_FBF_10BIT_RGB
@ NTV2_FBF_10BIT_RGB
See 10-Bit RGB Format.
Definition: ntv2enums.h:217
DeviceCapabilities::CanDoPixelFormat
bool CanDoPixelFormat(const NTV2PixelFormat inPF)
Definition: ntv2devicecapabilities.h:227
gFBFsAlpha
static NTV2FrameBufferFormatSet gFBFsAlpha
Definition: ntv2democommon.cpp:62
CNTV2DemoCommon::StripFormatString
static std::string StripFormatString(const std::string &inStr)
Definition: ntv2democommon.cpp:1040
CNTV2DemoCommon::GetGlobalMutexName
static const char * GetGlobalMutexName(void)
Definition: ntv2democommon.cpp:1284
poptBadOption
const char * poptBadOption(poptContext con, unsigned int flags)
Definition: options_popt.cpp:3623
NTV2_FRAMERATE_4795
@ NTV2_FRAMERATE_4795
Fractional rate of 48,000 frames per 1,001 seconds.
Definition: ntv2enums.h:412
NTV2_FORMAT_2K_1500
@ NTV2_FORMAT_2K_1500
Definition: ntv2enums.h:575
aja::to_string
std::string to_string(bool val)
Definition: common.cpp:180
NTV2_FRAMERATE_3000
@ NTV2_FRAMERATE_3000
30 frames per second
Definition: ntv2enums.h:405
NTV2_IS_VALID_FRAME_BUFFER_FORMAT
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
Definition: ntv2enums.h:254
AJALabelValuePairs
std::vector< AJALabelValuePair > AJALabelValuePairs
An ordered sequence of label/value pairs.
Definition: info.h:69
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3848
NTV2_FORMAT_1080p_2K_5000_B
@ NTV2_FORMAT_1080p_2K_5000_B
Definition: ntv2enums.h:622
gString2PixelFormatMap
static String2PixelFormatMap gString2PixelFormatMap
Definition: ntv2democommon.cpp:73
NTV2_FORMAT_525_2400
@ NTV2_FORMAT_525_2400
Definition: ntv2enums.h:569
CNTV2DemoCommon::Get8KInputFormat
static bool Get8KInputFormat(NTV2VideoFormat &inOutVideoFormat)
Given a video format, if all 4 inputs are the same and promotable to 8K, this function does the promo...
Definition: ntv2democommon.cpp:1239
NTV2_FORMAT_1080psf_2997_2
@ NTV2_FORMAT_1080psf_2997_2
Definition: ntv2enums.h:562
String2OutputDestMap
map< string, NTV2OutputDestination > String2OutputDestMap
Definition: ntv2democommon.cpp:40
String2AudioSystemMapConstIter
String2AudioSystemMap::const_iterator String2AudioSystemMapConstIter
Definition: ntv2democommon.cpp:32
NTV2_INPUT_SOURCE_IS_ANALOG
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
Definition: ntv2enums.h:1264
TC_INDEXES_ANALOG
@ TC_INDEXES_ANALOG
Definition: ntv2democommon.h:262
NTV2_FORMAT_4x4096x2160p_5994
@ NTV2_FORMAT_4x4096x2160p_5994
Definition: ntv2enums.h:699
NTV2_FORMAT_4x2048x1080p_2400
@ NTV2_FORMAT_4x2048x1080p_2400
Definition: ntv2enums.h:591
gFBFsPlanar
static NTV2FrameBufferFormatSet gFBFsPlanar
Definition: ntv2democommon.cpp:59
NTV2_FORMAT_1080p_2K_4800_B
@ NTV2_FORMAT_1080p_2K_4800_B
Definition: ntv2enums.h:621
DeviceCapabilities::CanDoFrameBufferFormat
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2devicecapabilities.h:223
NTV2_FORMAT_4x1920x1080p_2400
@ NTV2_FORMAT_4x1920x1080p_2400
Definition: ntv2enums.h:585
NTV2_FORMAT_4x1920x1080psf_2400
@ NTV2_FORMAT_4x1920x1080psf_2400
Definition: ntv2enums.h:582
gTCIndexesHDMI
static NTV2TCIndexSet gTCIndexesHDMI
Definition: ntv2democommon.cpp:80
NTV2_FORMAT_720p_2500
@ NTV2_FORMAT_720p_2500
Definition: ntv2enums.h:555
NTV2_FORMAT_3840x2160p_6000_B
@ NTV2_FORMAT_3840x2160p_6000_B
Definition: ntv2enums.h:642
NTV2IOKinds
ULWord NTV2IOKinds
Definition: ntv2enums.h:1287
NTV2_FORMAT_1080psf_2500_2
@ NTV2_FORMAT_1080psf_2500_2
Definition: ntv2enums.h:561
CNTV2DriverInterface::Open
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
Definition: ntv2driverinterface.cpp:131
NTV2TCIndexKinds
enum _NTV2TCIndexKinds NTV2TCIndexKinds
NTV2_FORMAT_4096x2160p_4795_B
@ NTV2_FORMAT_4096x2160p_4795_B
Definition: ntv2enums.h:661
GetTSIMuxInputXptFromChannel
NTV2InputXptID GetTSIMuxInputXptFromChannel(const NTV2Channel inTSIMuxer, const bool inLinkB=false)
Definition: ntv2signalrouter.cpp:993
String2OutputDestMapConstIter
String2OutputDestMap::const_iterator String2OutputDestMapConstIter
Definition: ntv2democommon.cpp:41
gInputSourcesAnalog
static NTV2InputSourceSet gInputSourcesAnalog
Definition: ntv2democommon.cpp:67
NTV2_FORMAT_4096x2160p_4800_B
@ NTV2_FORMAT_4096x2160p_4800_B
Definition: ntv2enums.h:662
NTV2_FORMAT_3840x2160p_2400
@ NTV2_FORMAT_3840x2160p_2400
Definition: ntv2enums.h:631
NTV2_FORMAT_1080p_2400
@ NTV2_FORMAT_1080p_2400
Definition: ntv2enums.h:545
NTV2_FORMAT_1080i_6000
@ NTV2_FORMAT_1080i_6000
Definition: ntv2enums.h:536
String2VANCModeMap
map< string, NTV2VANCMode > String2VANCModeMap
Definition: ntv2democommon.cpp:34
CNTV2DemoCommon::GetSupportedOutputDestinations
static const NTV2OutputDestinations GetSupportedOutputDestinations(const NTV2IOKinds inKinds)
Definition: ntv2democommon.cpp:753
NTV2_FBF_ABGR
@ NTV2_FBF_ABGR
See 8-Bit ARGB, RGBA, ABGR Formats.
Definition: ntv2enums.h:219
CaptureConfig::fInputSource
NTV2InputSource fInputSource
The device input connector to use.
Definition: ntv2democommon.h:280
NTV2_IS_VALID_VIDEO_FORMAT
#define NTV2_IS_VALID_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:711
gString2TCIndexMap
static String2TCIndexMap gString2TCIndexMap
Definition: ntv2democommon.cpp:85
NTV2_FORMAT_3840x2160p_3000
@ NTV2_FORMAT_3840x2160p_3000
Definition: ntv2enums.h:634
NTV2_FORMAT_1080psf_2400
@ NTV2_FORMAT_1080psf_2400
Definition: ntv2enums.h:540
AJA_PixelFormat_YCBCR8_420PL
@ AJA_PixelFormat_YCBCR8_420PL
Definition: videotypes.h:158
AJA_PixelFormat_RGB12P
@ AJA_PixelFormat_RGB12P
Definition: videotypes.h:141
NTV2TCIndexSet
std::set< NTV2TCIndex > NTV2TCIndexSet
A set of distinct NTV2TCIndex values.
Definition: ntv2publicinterface.h:6879
DeviceCapabilities::CanDoOutputTCIndex
bool CanDoOutputTCIndex(const NTV2TCIndex inTCNdx)
Definition: ntv2devicecapabilities.h:329
TC_INDEXES_ALL
@ TC_INDEXES_ALL
Definition: ntv2democommon.h:267
String2TCIndexMapConstIter
String2TCIndexMap::const_iterator String2TCIndexMapConstIter
Definition: ntv2democommon.cpp:45
NTV2_FORMAT_4096x2160p_5994
@ NTV2_FORMAT_4096x2160p_5994
Definition: ntv2enums.h:657
NTV2_FBF_HAS_ALPHA
#define NTV2_FBF_HAS_ALPHA(__fbf__)
Definition: ntv2enums.h:314
PIXEL_FORMATS_ALL
@ PIXEL_FORMATS_ALL
Definition: ntv2democommon.h:252
gTCIndexes
static NTV2TCIndexSet gTCIndexes
Definition: ntv2democommon.cpp:78
NTV2VideoFormatString
const char * NTV2VideoFormatString(NTV2VideoFormat fmt)
Definition: ntv2debug.cpp:318
CNTV2Card::SetAudioRate
virtual bool SetAudioRate(const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the NTV2AudioRate for the given Audio System.
Definition: ntv2audio.cpp:205
NTV2_FORMAT_4x2048x1080psf_2997
@ NTV2_FORMAT_4x2048x1080psf_2997
Definition: ntv2enums.h:599
NTV2OutputDestinationToString
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7281
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3860
NTV2_FORMAT_1080p_2K_2997
@ NTV2_FORMAT_1080p_2K_2997
Definition: ntv2enums.h:615