AJA NTV2 SDK  17.5.0.1492
NTV2 SDK 17.5.0.1492
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 
470 {
471  if ((inKinds & VIDEO_FORMATS_ALL) == VIDEO_FORMATS_ALL)
472  return gAllFormats;
473 
474  NTV2VideoFormatSet result;
475  if (inKinds & VIDEO_FORMATS_SDHD)
476  result += gSDHDFormats;
477  if (inKinds & VIDEO_FORMATS_4KUHD)
478  result += g4KFormats;
479  if (inKinds & VIDEO_FORMATS_8KUHD2)
480  result += g8KFormats;
481  return result;
482 }
483 
484 
485 string CNTV2DemoCommon::GetVideoFormatStrings (const NTV2VideoFormatKinds inKinds, const string inDevSpec)
486 {
487  const NTV2VideoFormatSet & formatSet(GetSupportedVideoFormats(inKinds));
488  ostringstream oss;
489  CNTV2Card dev;
490  if (!inDevSpec.empty())
491  dev.Open(inDevSpec);
492 
493  oss << setw(25) << left << "Supported Video Format" << "\t" << setw(16) << left << "Legal -v Values" << endl
494  << setw(25) << left << "------------------------" << "\t" << setw(16) << left << "----------------" << endl;
495  for (NTV2VideoFormatSetConstIter iter(formatSet.begin()); iter != formatSet.end(); ++iter)
496  { const NTV2VideoFormat vf(*iter);
497  const string vfName (::NTV2VideoFormatToString(vf, true));
498  if (vfName == "Unknown")
499  continue;
500  NTV2StringList vfNames;
502  if (vf == it->second)
503  {
504  if (!inDevSpec.empty() && dev.IsOpen() && !dev.features().CanDoVideoFormat(vf))
505  continue;
506  vfNames.push_back(it->first);
507  }
508  if (!vfNames.empty())
509  oss << setw(25) << left << vfName << "\t" << aja::join(vfNames,", ") << endl;
510  }
511  return oss.str();
512 }
513 
514 
515 NTV2VideoFormat CNTV2DemoCommon::GetVideoFormatFromString (const string & inStr, const NTV2VideoFormatKinds inKinds, const string & inDevSpec)
516 {
518  if (iter == gString2VideoFormatMMap.end())
519  return NTV2_FORMAT_UNKNOWN;
520 
521  CNTV2Card dev;
522  if (!inDevSpec.empty())
523  dev.Open(inDevSpec);
524 
525  // If a device was specifed, look for the first name-matching format it supports...
526  NTV2VideoFormat vf(iter->second);
527  while (dev.IsOpen() && !dev.features().CanDoVideoFormat(vf))
528  {
529  if (++iter == gString2VideoFormatMMap.end())
530  return NTV2_FORMAT_UNKNOWN;
531  if (inStr != iter->first)
532  return NTV2_FORMAT_UNKNOWN;
533  vf = iter->second;
534  }
535  if ((inKinds & VIDEO_FORMATS_ALL) == VIDEO_FORMATS_ALL)
536  return vf;
537  if (inKinds & VIDEO_FORMATS_4KUHD && NTV2_IS_4K_VIDEO_FORMAT(vf))
538  return vf;
539  if (inKinds & VIDEO_FORMATS_8KUHD2 && NTV2_IS_QUAD_QUAD_FORMAT(vf))
540  return vf;
541  if (inKinds & VIDEO_FORMATS_SDHD && !NTV2_IS_4K_VIDEO_FORMAT(vf))
542  return vf;
543  return NTV2_FORMAT_UNKNOWN;
544 }
545 
546 
548 {
549  if (inKinds == PIXEL_FORMATS_ALL)
550  return gPixelFormats;
551 
553  if (inKinds & PIXEL_FORMATS_RGB)
554  result += gFBFsRGB;
555  if (inKinds & PIXEL_FORMATS_PLANAR)
556  result += gFBFsPlanar;
557  if (inKinds & PIXEL_FORMATS_RAW)
558  result += gFBFsRaw;
559  if (inKinds & PIXEL_FORMATS_PACKED)
560  result += gFBFsPacked;
561  if (inKinds & PIXEL_FORMATS_ALPHA)
562  result += gFBFsAlpha;
563  return result;
564 }
565 
566 
567 string CNTV2DemoCommon::GetPixelFormatStrings (const NTV2PixelFormatKinds inKinds, const string inDevSpec)
568 {
569  const NTV2FrameBufferFormatSet & formatSet (GetSupportedPixelFormats(inKinds));
570  CNTV2Card dev;
571  ostringstream oss;
572 
573  if (!inDevSpec.empty())
574  dev.Open(inDevSpec);
575 
576  oss << setw(34) << left << "Frame Buffer Format" << "\t" << setw(32) << left << "Legal -p Values" << endl
577  << setw(34) << left << "----------------------------------" << "\t" << setw(32) << left << "--------------------------------" << endl;
578  for (NTV2FrameBufferFormatSetConstIter iter(formatSet.begin()); iter != formatSet.end(); ++iter)
579  {
580  const NTV2PixelFormat pf(*iter);
581  const string pfName (::NTV2FrameBufferFormatToString (pf, true));
582  if (pfName.empty())
583  continue;
584  NTV2StringList pfNames;
586  if (pf == it->second)
587  {
588  if (!inDevSpec.empty() && dev.IsOpen() && !dev.features().CanDoFrameBufferFormat(pf))
589  continue;
590  pfNames.push_back(it->first);
591  }
592  if (!pfNames.empty())
593  oss << setw(35) << left << pfName << "\t" << aja::join(pfNames, ", ") << endl;
594  }
595  return oss.str();
596 }
597 
598 
599 NTV2PixelFormat CNTV2DemoCommon::GetPixelFormatFromString (const string & inStr, const NTV2PixelFormatKinds inKinds, const string inDevSpec)
600 {
602  if (iter == gString2PixelFormatMap.end())
603  return NTV2_FBF_INVALID;
604 
605  CNTV2Card dev;
606  if (!inDevSpec.empty())
607  dev.Open(inDevSpec);
608 
609  // If a device was specifed, look for the first name-matching format it supports...
610  NTV2PixelFormat pf(iter->second);
611  while (dev.IsOpen() && !dev.features().CanDoPixelFormat(pf))
612  {
613  if (++iter == gString2PixelFormatMap.end())
614  return NTV2_FBF_INVALID;
615  if (inStr != iter->first)
616  return NTV2_FBF_INVALID;
617  pf = iter->second;
618  }
619  if ((inKinds & PIXEL_FORMATS_ALL) == PIXEL_FORMATS_ALL)
620  return pf;
621  if (inKinds & PIXEL_FORMATS_RGB && NTV2_IS_FBF_RGB(pf))
622  return pf;
623  if (inKinds & PIXEL_FORMATS_PLANAR && NTV2_IS_FBF_PLANAR(pf))
624  return pf;
625  if (inKinds & PIXEL_FORMATS_RAW && !NTV2_FBF_IS_RAW(pf))
626  return pf;
627  if (inKinds & PIXEL_FORMATS_PACKED && !NTV2_IS_FBF_PRORES(pf))
628  return pf;
629  if (inKinds & PIXEL_FORMATS_ALPHA && !NTV2_FBF_HAS_ALPHA(pf))
630  return pf;
631  return NTV2_FBF_INVALID;
632 }
633 
634 
636 {
637  if (inKinds == NTV2_IOKINDS_ALL)
638  return gInputSources;
639 
640  NTV2InputSourceSet result;
641  if (inKinds & NTV2_IOKINDS_SDI)
642  result += gInputSourcesSDI;
643  if (inKinds & NTV2_IOKINDS_HDMI)
644  result += gInputSourcesHDMI;
645  if (inKinds & NTV2_IOKINDS_ANALOG)
646  result += gInputSourcesAnalog;
647  return result;
648 }
649 
650 
651 string CNTV2DemoCommon::GetInputSourceStrings (const NTV2IOKinds inKinds, const string inDevSpec)
652 {
653  const NTV2InputSourceSet & sourceSet (GetSupportedInputSources(inKinds));
654  CNTV2Card dev;
655  ostringstream oss;
656 
657  if (!inDevSpec.empty())
658  dev.Open(inDevSpec);
659 
660  oss << setw(25) << left << "Input Source" << "\t" << setw(16) << left << "Legal -i Values" << endl
661  << setw(25) << left << "------------------------" << "\t" << setw(16) << left << "----------------" << endl;
662  for (NTV2InputSourceSetConstIter iter(sourceSet.begin()); iter != sourceSet.end(); ++iter)
663  {
664  const NTV2InputSource src(*iter);
665  const string srcName (::NTV2InputSourceToString(src));
666  if (srcName.empty())
667  continue;
668  NTV2StringList srcNames;
670  if (src == it->second)
671  {
672  if (!inDevSpec.empty() && dev.IsOpen() && !dev.features().CanDoInputSource(src))
673  continue;
674  srcNames.push_back(it->first);
675  }
676  if (!srcNames.empty())
677  oss << setw(25) << left << srcName << "\t" << aja::join(srcNames, ", ") << endl;
678  }
679  return oss.str();
680 }
681 
682 
683 NTV2InputSource CNTV2DemoCommon::GetInputSourceFromString (const string & inStr, const NTV2IOKinds inKinds, const string inDevSpec)
684 {
686  if (iter == gString2InputSourceMap.end())
688 
689  CNTV2Card dev;
690  if (!inDevSpec.empty())
691  dev.Open(inDevSpec);
692 
693  // If a device was specifed, look for the first name-matching input source it supports...
694  NTV2InputSource src(iter->second);
695  while (dev.IsOpen() && !dev.features().CanDoInputSource(src))
696  {
697  if (++iter == gString2InputSourceMap.end())
699  if (inStr != iter->first)
701  src = iter->second;
702  }
703  if ((inKinds & NTV2_IOKINDS_ALL) == NTV2_IOKINDS_ALL)
704  return src;
705  if (inKinds & NTV2_IOKINDS_SDI && NTV2_INPUT_SOURCE_IS_SDI(src))
706  return src;
707  if (inKinds & NTV2_IOKINDS_HDMI && NTV2_INPUT_SOURCE_IS_HDMI(src))
708  return src;
709  if (inKinds & NTV2_IOKINDS_ANALOG && NTV2_INPUT_SOURCE_IS_ANALOG(src))
710  return src;
712 }
713 
714 
716 {
717  if (inKinds == NTV2_IOKINDS_ALL)
718  return gOutputDestinations;
719 
720  NTV2OutputDestinations result;
721  if (inKinds & NTV2_IOKINDS_SDI)
722  result += gOutputDestsSDI;
723  if (inKinds & NTV2_IOKINDS_HDMI)
724  result += gOutputDestsHDMI;
725  if (inKinds & NTV2_IOKINDS_ANALOG)
726  result += gOutputDestsAnalog;
727  return result;
728 }
729 
730 
731 string CNTV2DemoCommon::GetOutputDestinationStrings (const NTV2IOKinds inKinds, const string inDevSpec)
732 {
733  const NTV2OutputDestinations & dests (GetSupportedOutputDestinations(inKinds));
734  CNTV2Card dev;
735  ostringstream oss;
736 
737  if (!inDevSpec.empty())
738  dev.Open(inDevSpec);
739 
740  oss << setw(25) << left << "Output Destination" << "\t" << setw(16) << left << "Legal -o Values" << endl
741  << setw(25) << left << "------------------------" << "\t" << setw(16) << left << "----------------" << endl;
742  for (NTV2OutputDestinationsConstIter iter(dests.begin()); iter != dests.end(); ++iter)
743  {
744  const NTV2OutputDest dest(*iter);
745  const string destName(::NTV2OutputDestinationToString(dest));
746  if (destName.empty())
747  continue;
748  NTV2StringList destNames;
750  if (*iter == it->second)
751  {
752  if (!inDevSpec.empty() && dev.IsOpen() && !dev.features().CanDoOutputDestination(dest))
753  continue;
754  destNames.push_back(it->first);
755  }
756  if (!destNames.empty())
757  oss << setw(25) << left << destName << "\t" << aja::join(destNames, ", ") << endl;
758  }
759  return oss.str();
760 }
761 
762 
763 NTV2OutputDestination CNTV2DemoCommon::GetOutputDestinationFromString (const string & inStr, const NTV2IOKinds inKinds, const string inDevSpec)
764 {
766  if (iter == gString2OutputDestMap.end())
768 
769  CNTV2Card dev;
770  if (!inDevSpec.empty())
771  dev.Open(inDevSpec);
772 
773  // If a device was specifed, look for the first name-matching output destination it supports...
774  NTV2OutputDest dst(iter->second);
775  while (dev.IsOpen() && !dev.features().CanDoOutputDestination(dst))
776  {
777  if (++iter == gString2OutputDestMap.end())
779  if (inStr != iter->first)
781  dst = iter->second;
782  }
783  if ((inKinds & NTV2_IOKINDS_ALL) == NTV2_IOKINDS_ALL)
784  return dst;
785  if (inKinds & NTV2_IOKINDS_SDI && NTV2_OUTPUT_DEST_IS_SDI(dst))
786  return dst;
787  if (inKinds & NTV2_IOKINDS_HDMI && NTV2_OUTPUT_DEST_IS_HDMI(dst))
788  return dst;
789  if (inKinds & NTV2_IOKINDS_ANALOG && NTV2_OUTPUT_DEST_IS_ANALOG(dst))
790  return dst;
792 }
793 
794 
796 {
797  if (inKinds == TC_INDEXES_ALL)
798  return gTCIndexes;
799 
800  NTV2TCIndexes result;
801  if (inKinds & TC_INDEXES_SDI)
802  result += gTCIndexesSDI;
803  if (inKinds & TC_INDEXES_ANALOG)
804  result += gTCIndexesAnalog;
805  if (inKinds & TC_INDEXES_ATCLTC)
806  result += gTCIndexesATCLTC;
807  if (inKinds & TC_INDEXES_VITC1)
808  result += gTCIndexesVITC1;
809  if (inKinds & TC_INDEXES_VITC2)
810  result += gTCIndexesVITC2;
811  return result;
812 }
813 
815  const string inDevSpec,
816  const bool inIsInputOnly)
817 {
818  const NTV2TCIndexes & tcIndexes (GetSupportedTCIndexes(inKinds));
819  CNTV2Card dev;
820  ostringstream oss;
821 
822  if (!inDevSpec.empty())
823  dev.Open(inDevSpec);
824 
825  oss << setw(25) << left << "Timecode Index" << "\t" << setw(16) << left << "Legal Values" << endl
826  << setw(25) << left << "------------------------" << "\t" << setw(16) << left << "----------------" << endl;
827  for (NTV2TCIndexesConstIter iter (tcIndexes.begin()); iter != tcIndexes.end(); ++iter)
828  {
829  const NTV2TCIndex tcNdx(*iter);
830  const string tcNdxName (::NTV2TCIndexToString(tcNdx));
831  if (tcNdxName.empty())
832  continue;
833  NTV2StringList tcNdxNames;
834  for (String2TCIndexMapConstIter it (gString2TCIndexMap.begin()); it != gString2TCIndexMap.end(); ++it)
835  if (tcNdx == it->second)
836  {
837  if (!inDevSpec.empty() && dev.IsOpen())
838  if (!(inIsInputOnly ? dev.features().CanDoInputTCIndex(tcNdx) : dev.features().CanDoOutputTCIndex(tcNdx)))
839  continue;
840  tcNdxNames.push_back(it->first);
841  }
842  if (!tcNdxNames.empty())
843  oss << setw(25) << left << tcNdxName << "\t" << aja::join(tcNdxNames, ", ") << endl;
844  }
845  return oss.str();
846 }
847 
848 
849 NTV2TCIndex CNTV2DemoCommon::GetTCIndexFromString (const string & inStr, const NTV2TCIndexKinds inKinds, const string inDevSpec)
850 {
852  if (iter == gString2TCIndexMap.end())
853  return NTV2_TCINDEX_INVALID;
854 
855  CNTV2Card dev;
856  if (!inDevSpec.empty())
857  dev.Open(inDevSpec);
858 
859  // If a device was specifed, look for the first name-matching format it supports...
860  NTV2TCIndex tcNdx(iter->second);
862  while (dev.IsOpen() && !dev.features().CanDoInputSource(tcInpSrc))
863  {
864  if (++iter == gString2TCIndexMap.end())
865  return NTV2_TCINDEX_INVALID;
866  if (inStr != iter->first)
867  return NTV2_TCINDEX_INVALID;
868  tcNdx = iter->second;
869  tcInpSrc = ::NTV2TimecodeIndexToInputSource(tcNdx);
870  }
871  if ((inKinds & TC_INDEXES_ALL) == TC_INDEXES_ALL)
872  return tcNdx;
874  return tcNdx;
875  if (inKinds & TC_INDEXES_ANALOG && NTV2_IS_ANALOG_TIMECODE_INDEX(tcNdx))
876  return tcNdx;
877  if (inKinds & TC_INDEXES_ATCLTC && NTV2_IS_ATC_LTC_TIMECODE_INDEX(tcNdx))
878  return tcNdx;
879  if (inKinds & TC_INDEXES_VITC1 && NTV2_IS_ATC_VITC1_TIMECODE_INDEX(tcNdx))
880  return tcNdx;
881  if (inKinds & TC_INDEXES_VITC2 && NTV2_IS_ATC_VITC2_TIMECODE_INDEX(tcNdx))
882  return tcNdx;
883  return NTV2_TCINDEX_INVALID;
884 }
885 
886 
887 string CNTV2DemoCommon::GetAudioSystemStrings (const string inDeviceSpecifier)
888 {
889  CNTV2Card device;
890  string displayName;
891  ostringstream oss;
892 
893  if (!inDeviceSpecifier.empty())
894  {
895  CNTV2DeviceScanner::GetFirstDeviceFromArgument (inDeviceSpecifier, device);
896  if (device.IsOpen())
897  displayName = device.GetDisplayName();
898  }
899 
900  const UWord numAudioSystems (device.features().GetNumAudioSystems());
901  oss << setw(12) << left << "Audio System" << endl
902  << setw(12) << left << "------------" << endl;
903  for (UWord ndx(0); ndx < 8; ndx++)
904  {
905  oss << setw(12) << left << (ndx+1);
906  if (!displayName.empty() && ndx >= numAudioSystems)
907  oss << "\t## Incompatible with " << displayName;
908  oss << endl;
909  }
910  return oss.str();
911 }
912 
913 
915 {
917  return iter != gString2AudioSystemMap.end() ? iter->second : NTV2_AUDIOSYSTEM_INVALID;
918 }
919 
921 {
922  typedef map<string,string> NTV2StringMap;
923  NTV2StringSet keys;
924  for (String2VANCModeMapConstIter it(gString2VANCModeMap.begin()); it != gString2VANCModeMap.end(); ++it)
925  {
926  const string val(aja::to_string(it->second));
927  if (keys.find(val) == keys.end())
928  keys.insert(val);
929  }
930 
931  NTV2StringMap legals;
932  for (NTV2StringSet::const_iterator kit(keys.begin()); kit != keys.end(); ++kit)
933  {
934  NTV2VANCMode officialVM(NTV2VANCMode(aja::stoul(*kit)));
935  NTV2StringList legalValues;
936  for (String2VANCModeMapConstIter it(gString2VANCModeMap.begin()); it != gString2VANCModeMap.end(); ++it)
937  if (it->second == officialVM)
938  legalValues.push_back(it->first);
939  legals[aja::to_string(officialVM)] = aja::join(legalValues, ", ");
940  }
941 
942  ostringstream oss;
943  oss << setw(12) << left << "VANC Mode" << "\t" << setw(32) << left << "Legal --vanc Values " << endl
944  << setw(12) << left << "---------" << "\t" << setw(32) << left << "--------------------------------" << endl;
945  for (NTV2StringMap::const_iterator it(legals.begin()); it != legals.end(); ++it)
946  oss << setw(12) << left << it->first << "\t" << setw(32) << left << it->second << endl;
947  return oss.str();
948 }
949 
950 
952 {
954  return iter != gString2VANCModeMap.end() ? iter->second : NTV2_VANCMODE_INVALID;
955 }
956 
957 
959 {
960  typedef map<string,string> NTV2StringMap;
961  NTV2StringSet keys;
962  for (String2TPNamesMapConstIter it(gString2TPNamesMap.begin()); it != gString2TPNamesMap.end(); ++it)
963  if (keys.find(it->second) == keys.end())
964  keys.insert(it->second);
965 
966  NTV2StringMap legals;
967  for (NTV2StringSet::const_iterator kit(keys.begin()); kit != keys.end(); ++kit)
968  {
969  const string & officialPatName(*kit);
970  NTV2StringList legalValues;
971  for (String2TPNamesMapConstIter it(gString2TPNamesMap.begin()); it != gString2TPNamesMap.end(); ++it)
972  if (it->second == officialPatName)
973  legalValues.push_back(it->first);
974  legals[officialPatName] = aja::join(legalValues, ", ");
975  }
976 
977  ostringstream oss;
978  oss << setw(25) << left << "Test Pattern or Color " << "\t" << setw(22) << left << "Legal --pattern Values" << endl
979  << setw(25) << left << "------------------------" << "\t" << setw(22) << left << "----------------------" << endl;
980  for (NTV2StringMap::const_iterator it(legals.begin()); it != legals.end(); ++it)
981  oss << setw(25) << left << it->first << "\t" << setw(22) << left << it->second << endl;
982  return oss.str();
983 }
984 
985 
987 {
988  string tpName(inStr);
989  aja::lower(aja::strip(aja::replace(tpName, " ", "")));
991  return (it != gString2TPNamesMap.end()) ? it->second : "";
992 }
993 
994 
995 string CNTV2DemoCommon::ToLower (const string & inStr)
996 {
997  string result(inStr);
998  return aja::lower(result);
999 }
1000 
1001 
1002 string CNTV2DemoCommon::StripFormatString (const std::string & inStr)
1003 {
1004  string result (inStr);
1005  while (result.find (" ") != string::npos)
1006  result.erase (result.find (" "), 1);
1007  while (result.find ("00") != string::npos)
1008  result.erase (result.find ("00"), 2);
1009  while (result.find (".") != string::npos)
1010  result.erase (result.find ("."), 1);
1011  return result;
1012 }
1013 
1014 
1016 {
1017  char result (0);
1018  #if defined (AJAMac) || defined (AJALinux)
1019  struct termios terminalStatus;
1020  ::memset (&terminalStatus, 0, sizeof (terminalStatus));
1021  if (::tcgetattr (0, &terminalStatus) < 0)
1022  cerr << "tcsetattr()";
1023  terminalStatus.c_lflag &= ~uint32_t(ICANON);
1024  terminalStatus.c_lflag &= ~uint32_t(ECHO);
1025  terminalStatus.c_cc[VMIN] = 1;
1026  terminalStatus.c_cc[VTIME] = 0;
1027  if (::tcsetattr (0, TCSANOW, &terminalStatus) < 0)
1028  cerr << "tcsetattr ICANON";
1029  if (::read (0, &result, 1) < 0)
1030  cerr << "read()" << endl;
1031  terminalStatus.c_lflag |= ICANON;
1032  terminalStatus.c_lflag |= ECHO;
1033  if (::tcsetattr (0, TCSADRAIN, &terminalStatus) < 0)
1034  cerr << "tcsetattr ~ICANON" << endl;
1035  #elif defined (MSWindows) || defined (AJAWindows)
1036  HANDLE hdl (GetStdHandle (STD_INPUT_HANDLE));
1037  DWORD nEvents (0);
1038  INPUT_RECORD buffer;
1039  PeekConsoleInput (hdl, &buffer, 1, &nEvents);
1040  if (nEvents > 0)
1041  {
1042  ReadConsoleInput (hdl, &buffer, 1, &nEvents);
1043  result = char (buffer.Event.KeyEvent.wVirtualKeyCode);
1044  }
1045  #endif
1046  return result;
1047 }
1048 
1049 
1051 {
1052  cout << "## Press Enter/Return key to exit: ";
1053  cout.flush();
1054  cin.get();
1055 }
1056 
1057 
1059 {
1061  switch (inFrameRate)
1062  {
1063  case NTV2_FRAMERATE_6000: result = kTCFormat60fps; break;
1064  case NTV2_FRAMERATE_5994: result = kTCFormat60fpsDF; break;
1065  case NTV2_FRAMERATE_4800: result = kTCFormat48fps; break;
1066  case NTV2_FRAMERATE_4795: result = kTCFormat48fps; break;
1067  case NTV2_FRAMERATE_3000: result = kTCFormat30fps; break;
1068  case NTV2_FRAMERATE_2997: result = kTCFormat30fpsDF; break;
1069  case NTV2_FRAMERATE_2500: result = kTCFormat25fps; break;
1070  case NTV2_FRAMERATE_2400: result = kTCFormat24fps; break;
1071  case NTV2_FRAMERATE_2398: result = kTCFormat24fps; break;
1072  case NTV2_FRAMERATE_5000: result = kTCFormat50fps; break;
1073  default: break;
1074  }
1075  return result;
1076 
1077 } // NTV2FrameRate2TimecodeFormat
1078 
1079 
1081 {
1082  switch (inFrameRate)
1083  {
1086 #if !defined(NTV2_DEPRECATE_16_0)
1091 #endif
1092  case NTV2_FRAMERATE_5000: return AJA_FrameRate_5000;
1104 
1105  case NTV2_NUM_FRAMERATES:
1106  case NTV2_FRAMERATE_UNKNOWN: break;
1107  }
1108  return AJA_FrameRate_Unknown;
1109 } // GetAJAFrameRate
1110 
1111 
1113 {
1114  switch (inFormat)
1115  {
1118  case NTV2_FBF_ARGB: return AJA_PixelFormat_ARGB8;
1119  case NTV2_FBF_RGBA: return AJA_PixelFormat_RGBA8;
1122  case NTV2_FBF_ABGR: return AJA_PixelFormat_ABGR8;
1136 
1141 
1146 
1149  case NTV2_FBF_10BIT_ARGB:
1150  case NTV2_FBF_16BIT_ARGB:
1151  case NTV2_FBF_INVALID: break;
1152  }
1153  return AJA_PixelFormat_Unknown;
1154 } // GetAJAPixelFormat
1155 
1156 
1158 {
1159  static struct VideoFormatPair
1160  {
1161  NTV2VideoFormat vIn;
1162  NTV2VideoFormat vOut;
1163  } VideoFormatPairs[] = { // vIn vOut
1182 
1186 
1190  };
1191  for (size_t formatNdx(0); formatNdx < sizeof(VideoFormatPairs) / sizeof(VideoFormatPair); formatNdx++)
1192  if (VideoFormatPairs[formatNdx].vIn == inOutVideoFormat)
1193  {
1194  inOutVideoFormat = VideoFormatPairs[formatNdx].vOut;
1195  return true;
1196  }
1197  return false;
1198 
1199 } // get4KInputFormat
1200 
1202 {
1203  static struct VideoFormatPair
1204  {
1205  NTV2VideoFormat vIn;
1206  NTV2VideoFormat vOut;
1207  } VideoFormatPairs[] = { // vIn vOut
1234  };
1235  for (size_t formatNdx(0); formatNdx < sizeof(VideoFormatPairs) / sizeof(VideoFormatPair); formatNdx++)
1236  if (VideoFormatPairs[formatNdx].vIn == inOutVideoFormat)
1237  {
1238  inOutVideoFormat = VideoFormatPairs[formatNdx].vOut;
1239  return true;
1240  }
1241  return false;
1242 
1243 } // get8KInputFormat
1244 
1245 
1247 {
1248  return gGlobalMutexName.c_str();
1249 }
1250 
1252 {
1253  UWord totFrameStores(inDevice.features().GetNumFrameStores());
1254  UWord totTSIMuxers(inDevice.features().GetNumTSIMuxers());
1255  UWord firstFramestoreIndex = UWord(::GetIndexForNTV2Channel(in1stFrameStore));
1256  UWord tsiMux(firstFramestoreIndex);
1257  NTV2ChannelList result;
1258  if (totFrameStores > totTSIMuxers)
1259  tsiMux = firstFramestoreIndex/2;
1260  else if (totFrameStores < totTSIMuxers)
1261  tsiMux = firstFramestoreIndex*2;
1262  for (UWord num(0); num < inCount; num++)
1263  result.push_back(NTV2Channel(tsiMux + num));
1264  return result;
1265 }
1266 
1267 
1269  const CaptureConfig & inConfig,
1270  const bool isInputRGB)
1271 {
1272  const bool isFrameRGB (::IsRGBFormat(inConfig.fPixelFormat));
1274  const NTV2OutputXptID inputOXpt (::GetInputSourceOutputXpt(inConfig.fInputSource, false, isInputRGB));
1275  const NTV2InputXptID cscVidIXpt (::GetCSCInputXptFromChannel(inConfig.fInputChannel));
1276  NTV2OutputXptID cscOXpt (::GetCSCOutputXptFromChannel(inConfig.fInputChannel, /*key?*/false, /*RGB?*/isFrameRGB));
1277 
1278  conns.clear();
1279  if (isInputRGB && !isFrameRGB)
1280  {
1281  conns.insert(NTV2Connection(fbIXpt, cscOXpt)); // FB <== CSC
1282  conns.insert(NTV2Connection(cscVidIXpt, inputOXpt)); // CSC <== SDIIn/HDMIin
1283  }
1284  else if (!isInputRGB && isFrameRGB)
1285  {
1286  conns.insert(NTV2Connection(fbIXpt, cscOXpt)); // FB <== CSC
1287  conns.insert(NTV2Connection(cscVidIXpt, inputOXpt)); // CSC <== SDIIn/HDMIIn
1288  }
1289  else
1290  conns.insert(NTV2Connection(fbIXpt, inputOXpt)); // FB <== SDIIn/HDMIin
1291 
1292  return !conns.empty();
1293 
1294 } // GetRoutingCapture
1295 
1296 
1298  const CaptureConfig & inConfig,
1299  const NTV2DeviceID devID,
1300  const bool isInputRGB)
1301 {
1302  UWord sdi(0), mux(0), csc(0), fb(0), path(0);
1305  const bool isFrameRGB (::IsRGBFormat(inConfig.fPixelFormat));
1306  conns.clear();
1308  { // HDMI
1309  if (inConfig.fInputChannel == NTV2_CHANNEL1)
1310  { // HDMI CH1234
1311  if (isInputRGB == isFrameRGB)
1312  { // HDMI CH1234 RGB SIGNAL AND RGB FBF OR YUV SIGNAL AND YUV FBF
1313  for (path = 0; path < 4; path++)
1314  { // MUX <== HDMIIn
1315  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1316  out = ::GetInputSourceOutputXpt(inConfig.fInputSource, /*DS2*/false, isInputRGB, /*quadrant*/path);
1317  conns.insert(NTV2Connection(in, out));
1318  // FB <== MUX
1319  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*Binput*/path & 1);
1320  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*RGB*/isInputRGB);
1321  conns.insert(NTV2Connection(in, out));
1322  }
1323  } // HDMI CH1234 RGB SIGNAL AND RGB FBF
1324  else if (isInputRGB && !isFrameRGB)
1325  { // HDMI CH1234 RGB SIGNAL AND YUV FBF
1326  for (path = 0; path < 4; path++)
1327  {
1328  // CSC <== HDMIIn
1329  in = ::GetCSCInputXptFromChannel(NTV2Channel(csc+path));
1330  out = ::GetInputSourceOutputXpt(inConfig.fInputSource, /*DS2*/false, isInputRGB, /*quadrant*/path);
1331  conns.insert(NTV2Connection(in, out));
1332  // MUX <== CSC
1333  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1334  out = ::GetCSCOutputXptFromChannel(NTV2Channel(csc+path), /*key*/false, /*rgb*/isFrameRGB);
1335  conns.insert(NTV2Connection(in, out));
1336  // FB <== MUX
1337  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*DS2*/path & 1);
1338  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*rgb*/isFrameRGB);
1339  conns.insert(NTV2Connection(in, out));
1340  }
1341  } // HDMI CH1234 RGB SIGNAL AND YUV FBF
1342  else // !isInputRGB && isFrameRGB
1343  { // HDMI CH1234 YUV SIGNAL AND RGB FBF
1344  for (path = 0; path < 4; path++)
1345  {
1346  // CSC <== HDMIIn
1347  in = ::GetCSCInputXptFromChannel(NTV2Channel(csc+path));
1348  out = ::GetInputSourceOutputXpt(inConfig.fInputSource, /*DS2*/false, isInputRGB, /*quadrant*/path);
1349  conns.insert(NTV2Connection(in, out));
1350  // MUX <== CSC
1351  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1352  out = ::GetCSCOutputXptFromChannel(NTV2Channel(csc+path), /*key*/false, /*rgb*/isFrameRGB);
1353  conns.insert(NTV2Connection(in, out));
1354  // FB <== MUX
1355  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*DS2*/path & 1);
1356  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*rgb*/isFrameRGB);
1357  conns.insert(NTV2Connection(in, out));
1358  }
1359  } // HDMI CH1234 YUV SIGNAL AND RGB FBF
1360  } // HDMI CH1234
1361  else
1362  { // HDMI CH5678
1363  cerr << "## ERROR: Ch5678 must be for Corvid88, but no HDMI on that device" << endl;
1364  } // HDMI CH5678
1365  } // HDMI
1366  else
1367  { // SDI
1368  if (::NTV2DeviceCanDo12gRouting(devID))
1369  { // FB <== SDIIn
1371  out = ::GetInputSourceOutputXpt(inConfig.fInputSource);
1372  conns.insert(NTV2Connection(in, out));
1373  }
1374  else
1375  { // SDI CH1234 or CH5678
1376  if (inConfig.fInputChannel != NTV2_CHANNEL1)
1377  {fb = 4; sdi = fb; mux = fb / 2; csc = fb;}
1378  if (isFrameRGB)
1379  { // RGB FB
1380  if (inConfig.fDoTSIRouting)
1381  { // SDI CH1234 RGB TSI
1382  for (path = 0; path < 4; path++)
1383  {
1384  // CSC <== SDIIn
1385  in = ::GetCSCInputXptFromChannel(NTV2Channel(csc+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  } // for each spigot
1397  } // SDI CH1234 RGB TSI
1398  else
1399  { // SDI CH1234 RGB SQUARES
1400  for (path = 0; path < 4; path++)
1401  {
1402  // CSC <== SDIIn
1403  in = ::GetCSCInputXptFromChannel(NTV2Channel(csc+path));
1405  conns.insert(NTV2Connection(in, out));
1406  // FB <== CSC
1408  out = ::GetCSCOutputXptFromChannel(NTV2Channel(csc+path), /*key*/false, /*rgb*/isFrameRGB);
1409  conns.insert(NTV2Connection(in, out));
1410  } // for each spigot
1411  } // SDI CH1234 RGB SQUARES
1412  } // SDI CH1234 RGB FBF
1413  else // YUV FBF
1414  {
1415  if (inConfig.fDoTSIRouting)
1416  { // SDI CH1234 YUV TSI
1417  for (path = 0; path < 4; path++)
1418  {
1419  // MUX <== SDIIn
1420  in = ::GetTSIMuxInputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1);
1422  conns.insert(NTV2Connection(in, out));
1423  // FB <== MUX
1424  in = ::GetFrameBufferInputXptFromChannel(NTV2Channel(fb+path/2), /*DS2*/path & 1);
1425  out = ::GetTSIMuxOutputXptFromChannel(NTV2Channel(mux+path/2), /*LinkB*/path & 1, /*rgb*/isFrameRGB);
1426  conns.insert(NTV2Connection(in, out));
1427  } // for each spigot
1428  } // SDI CH1234 YUV TSI
1429  else
1430  {
1431  for (path = 0; path < 4; path++)
1432  { // FB <== SDIIn
1435  conns.insert(NTV2Connection(in, out));
1436  } // for each path
1437  } // SDI CH1234 YUV SQUARES
1438  } // YUV FBF
1439  } // 3G SDI CH1234 or CH5678
1440  } // SDI
1441  return !conns.empty();
1442 } // GetRoutingCapture4K
1443 
1444 
1446  const CaptureConfig & inConfig,
1447  const NTV2VideoFormat inVideoFormat,
1448  const NTV2DeviceID devID,
1449  const bool isInputRGB)
1450 { (void)isInputRGB; (void) devID;
1451  UWord fb(0), path(0);
1454  const bool isFrameRGB (::IsRGBFormat(inConfig.fPixelFormat));
1455  const bool isQuadQuadHFR (NTV2_IS_QUAD_QUAD_HFR_VIDEO_FORMAT(inVideoFormat));
1456  conns.clear();
1457  if (inConfig.fInputChannel % 2)
1458  return false; // Input channel cannot be Ch2/Ch4/Ch6/etc
1459  if (inConfig.fInputChannel > 3)
1460  return false; // Input channel cannot be Ch5 or greater
1461  if (::NTV2InputSourceToChannel(inConfig.fInputSource) % 2)
1462  return false; // Input source cannot be SDIIn2/4/6/etc
1463  if (::NTV2InputSourceToChannel(inConfig.fInputSource) > 3)
1464  return false; // Input source cannot be SDIIn5 or greater
1465 
1466  if (inConfig.fDoTSIRouting)
1467  { // TSI
1468  if (inConfig.fInputChannel)
1469  fb = 2;
1470  for (path = 0; path < 4; path++)
1471  if (isFrameRGB) // Uses 2 FBs, 4 SDIs
1472  { // RGB
1473  // DLInDS1 <== SDIInDS1
1474  in = ::GetDLInInputXptFromChannel (NTV2Channel(path), /*B*/false);
1475  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(path), /*DS2*/false);
1476  conns.insert(NTV2Connection(in, out));
1477  // DLInDS2 <== SDIInDS2
1478  in = ::GetDLInInputXptFromChannel (NTV2Channel(path), /*B*/true);
1479  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(path), /*DS2*/true);
1480  conns.insert(NTV2Connection(in, out));
1481  // FB <== DLIn
1482  in = ::GetFrameBufferInputXptFromChannel (NTV2Channel(fb+path/2), /*B*/path & 1);
1484  conns.insert(NTV2Connection(in, out));
1485  } // if RGB
1486  else if (isQuadQuadHFR) // Uses 2 FBs, 4 SDIs
1487  { // FB <== SDIIn, FBDS2 <== SDIIn
1488  in = ::GetFrameBufferInputXptFromChannel (NTV2Channel(fb+path/2), /*DS2?*/path & 1);
1490  conns.insert(NTV2Connection(in, out));
1491  } // else if YUV QuadQuad
1492  else // Uses 2 FBs, 2 SDIs
1493  { // FB <== SDIIn, FBDS2 <== SDIInDS2
1494  in = ::GetFrameBufferInputXptFromChannel (NTV2Channel(fb+path/2), /*DS2?*/path & 1);
1495  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(fb+path/2), /*DS2?*/path & 1);
1496  conns.insert(NTV2Connection(in, out));
1497  } // else YUV non-QuadQuad
1498  } // if TSI
1499  else
1500  { // Square-division routing
1501  if (inConfig.fInputChannel)
1502  return false; // Sorry, Ch1 only
1503  if (inConfig.fInputSource != NTV2_INPUTSOURCE_SDI1)
1504  return false; // Sorry, SDI1 only (1st SDI of 4 links)
1505  for (path = 0; path < 4; path++) // 4 FBs, 4 SDIs
1506  if (isFrameRGB)
1507  { // RGB
1508  // DLInDS1 <== SDIInDS1
1509  in = ::GetDLInInputXptFromChannel (NTV2Channel(path), /*B*/false);
1510  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(path), /*DS2*/false);
1511  conns.insert(NTV2Connection(in, out));
1512  // DLInDS2 <== SDIInDS2
1513  in = ::GetDLInInputXptFromChannel (NTV2Channel(path), /*B*/true);
1514  out = ::GetSDIInputOutputXptFromChannel (NTV2Channel(path), /*DS2*/true);
1515  conns.insert(NTV2Connection(in, out));
1516  // FB <== DLIn
1519  conns.insert(NTV2Connection(in, out));
1520  } // for each path
1521  else // YUV
1522  { // FB <== SDIIn
1525  conns.insert(NTV2Connection(in, out));
1526  } // for each path
1527  } // else Squares
1528  return !conns.empty();
1529 } // GetInputRouting8K
1530 
1531 
1532 bool CNTV2DemoCommon::ConfigureAudioSystems (CNTV2Card & inDevice, const CaptureConfig & inConfig, const NTV2AudioSystemSet inAudioSystems)
1533 {
1534  UWord failures(0);
1535  UWord numAudChannels(inDevice.features().GetMaxAudioChannels());
1536  for (NTV2AudioSystemSetConstIter it(inAudioSystems.begin()); it != inAudioSystems.end(); ++it)
1537  { const NTV2AudioSystem audSys(*it);
1538  // Have the audio system capture audio from the designated device input...
1539  if (!inDevice.SetAudioSystemInputSource (audSys, NTV2_AUDIO_EMBEDDED,
1541  failures++;
1542 
1543  // Configure for max available audio channels, 48KHz, 4MB buffers, and disable loopback...
1544  if (!inDevice.SetNumberAudioChannels (numAudChannels, audSys)) failures++;
1545  if (!inDevice.SetAudioRate (NTV2_AUDIO_48K, audSys)) failures++;
1546  if (!inDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_SIZE_4MB, audSys)) failures++;
1547  if (!inDevice.SetAudioLoopBack(NTV2_AUDIO_LOOPBACK_OFF, audSys)) failures++;
1548  }
1549  return !failures;
1550 }
1551 
1552 
1554 {
1555  const size_t hwPageSizeBytes (NTV2Buffer::HostPageSize());
1556  const size_t sdkPageSizeBytes (NTV2Buffer::DefaultPageSize());
1557  if (hwPageSizeBytes != sdkPageSizeBytes)
1558  {
1559  if (NTV2Buffer::SetDefaultPageSize(hwPageSizeBytes))
1560  cerr << "## NOTE: Page size changed from " << DEC(sdkPageSizeBytes/1024) << "K to " << DEC(hwPageSizeBytes/1024) << "K" << endl;
1561  else
1562  cerr << "## WARNING: Failed to change page size from " << DEC(sdkPageSizeBytes/1024) << "K to " << DEC(hwPageSizeBytes/1024) << "K" << endl;
1563  }
1564  return hwPageSizeBytes;
1565 }
1566 
1567 
1568 CNTV2DemoCommon::Popt::Popt (const int inArgc, const char ** pArgs, const PoptOpts * pInOptionsTable)
1569 {
1570  mContext = ::poptGetContext(AJA_NULL, inArgc, pArgs, pInOptionsTable, 0);
1571  mResult = ::poptGetNextOpt(mContext);
1572  if (mResult < -1)
1573  { ostringstream oss;
1574  oss << ::poptBadOption(mContext, 0) << ": " << ::poptStrerror(mResult);
1575  mError = oss.str();
1576  }
1577  else
1578  {
1579  const char * pStr (::poptGetArg(mContext));
1580  while (pStr)
1581  {
1582  mOtherArgs.push_back(string(pStr)); // Append to file list
1583  pStr = ::poptGetArg(mContext);
1584  } // for each additional positional argument
1585  }
1586 }
1587 
1589 {
1590  mContext = ::poptFreeContext(mContext);
1591 }
1592 
1593 
1595 {
1596  typedef struct {string fName; NTV2VideoFormat fFormat;} FormatNameDictionary;
1597  static const FormatNameDictionary sVFmtDict[] = {
1598  {"1080i50", NTV2_FORMAT_1080i_5000},
1599  {"1080i", NTV2_FORMAT_1080i_5994},
1600  {"1080i5994", NTV2_FORMAT_1080i_5994},
1601  {"hd", NTV2_FORMAT_1080i_5994},
1602  {"1080i60", NTV2_FORMAT_1080i_6000},
1603  {"720p", NTV2_FORMAT_720p_5994},
1604  {"720p5994", NTV2_FORMAT_720p_5994},
1605  {"720p60", NTV2_FORMAT_720p_6000},
1606  {"1080psf2398", NTV2_FORMAT_1080psf_2398},
1607  {"1080psf24", NTV2_FORMAT_1080psf_2400},
1608  {"1080p2997", NTV2_FORMAT_1080p_2997},
1609  {"1080p30", NTV2_FORMAT_1080p_3000},
1610  {"1080p25", NTV2_FORMAT_1080p_2500},
1611  {"1080p2398", NTV2_FORMAT_1080p_2398},
1612  {"1080p24", NTV2_FORMAT_1080p_2400},
1613  {"2048x1080p2398", NTV2_FORMAT_1080p_2K_2398},
1614  {"2048x1080p24", NTV2_FORMAT_1080p_2K_2400},
1615  {"2048x1080psf2398", NTV2_FORMAT_1080psf_2K_2398},
1616  {"2048x1080psf24", NTV2_FORMAT_1080psf_2K_2400},
1617  {"720p50", NTV2_FORMAT_720p_5000},
1618  {"1080p50b", NTV2_FORMAT_1080p_5000_B},
1619  {"1080p", NTV2_FORMAT_1080p_5994_B},
1620  {"1080p5994b", NTV2_FORMAT_1080p_5994_B},
1621  {"1080p60b", NTV2_FORMAT_1080p_6000_B},
1622  {"720p2398", NTV2_FORMAT_720p_2398},
1623  {"720p25", NTV2_FORMAT_720p_2500},
1624  {"1080p50", NTV2_FORMAT_1080p_5000_A},
1625  {"1080p5994", NTV2_FORMAT_1080p_5994_A},
1626  {"1080p60", NTV2_FORMAT_1080p_6000_A},
1627  {"2048x1080p25", NTV2_FORMAT_1080p_2K_2500},
1628  {"2048x1080psf25", NTV2_FORMAT_1080psf_2K_2500},
1629  {"1080psf25", NTV2_FORMAT_1080psf_2500_2},
1630  {"1080psf2997", NTV2_FORMAT_1080psf_2997_2},
1631  {"1080psf30", NTV2_FORMAT_1080psf_3000_2},
1632  {"525i", NTV2_FORMAT_525_5994},
1633  {"525i2997", NTV2_FORMAT_525_5994},
1634  {"sd", NTV2_FORMAT_525_5994},
1635  {"625i", NTV2_FORMAT_625_5000},
1636  {"625i25", NTV2_FORMAT_625_5000},
1637  {"525i2398", NTV2_FORMAT_525_2398},
1638  {"525i24", NTV2_FORMAT_525_2400},
1639  {"525psf2997", NTV2_FORMAT_525psf_2997},
1640  {"625psf25", NTV2_FORMAT_625psf_2500},
1641  {"2048x1556psf1498", NTV2_FORMAT_2K_1498},
1642  {"2048x1556psf15", NTV2_FORMAT_2K_1500},
1643  {"2048x1556psf2398", NTV2_FORMAT_2K_2398},
1644  {"2048x1556psf24", NTV2_FORMAT_2K_2400},
1645  {"2048x1556psf25", NTV2_FORMAT_2K_2500},
1646  {"4x1920x1080psf2398", NTV2_FORMAT_4x1920x1080psf_2398},
1647  {"4x1920x1080psf24", NTV2_FORMAT_4x1920x1080psf_2400},
1648  {"4x1920x1080psf25", NTV2_FORMAT_4x1920x1080psf_2500},
1649  {"4x1920x1080p2398", NTV2_FORMAT_4x1920x1080p_2398},
1650  {"uhd2398", NTV2_FORMAT_4x1920x1080p_2398},
1651  {"4x1920x1080p24", NTV2_FORMAT_4x1920x1080p_2400},
1652  {"uhd24", NTV2_FORMAT_4x1920x1080p_2400},
1653  {"4x1920x1080p25", NTV2_FORMAT_4x1920x1080p_2500},
1654  {"uhd25", NTV2_FORMAT_4x1920x1080p_2500},
1655  {"4x2048x1080psf2398", NTV2_FORMAT_4x2048x1080psf_2398},
1656  {"4x2048x1080psf24", NTV2_FORMAT_4x2048x1080psf_2400},
1657  {"4x2048x1080psf25", NTV2_FORMAT_4x2048x1080psf_2500},
1658  {"4k2398", NTV2_FORMAT_4x2048x1080p_2398},
1659  {"4x2048x1080p2398", NTV2_FORMAT_4x2048x1080p_2398},
1661  {"4x2048x1080p24", NTV2_FORMAT_4x2048x1080p_2400},
1663  {"4x2048x1080p25", NTV2_FORMAT_4x2048x1080p_2500},
1664  {"4x1920x1080p2997", NTV2_FORMAT_4x1920x1080p_2997},
1665  {"4x1920x1080p30", NTV2_FORMAT_4x1920x1080p_3000},
1666  {"4x1920x1080psf2997", NTV2_FORMAT_4x1920x1080psf_2997},
1667  {"4x1920x1080psf30", NTV2_FORMAT_4x1920x1080psf_3000},
1668  {"4x2048x1080p2997", NTV2_FORMAT_4x2048x1080p_2997},
1669  {"4x2048x1080p30", NTV2_FORMAT_4x2048x1080p_3000},
1670  {"4x2048x1080psf2997", NTV2_FORMAT_4x2048x1080psf_2997},
1671  {"4x2048x1080psf30", NTV2_FORMAT_4x2048x1080psf_3000},
1672  {"4x1920x1080p50", NTV2_FORMAT_4x1920x1080p_5000},
1673  {"uhd50", NTV2_FORMAT_4x1920x1080p_5000},
1674  {"4x1920x1080p5994", NTV2_FORMAT_4x1920x1080p_5994},
1675  {"uhd5994", NTV2_FORMAT_4x1920x1080p_5994},
1676  {"4x1920x1080p60", NTV2_FORMAT_4x1920x1080p_6000},
1678  {"uhd60", NTV2_FORMAT_4x1920x1080p_6000},
1680  {"4x2048x1080p50", NTV2_FORMAT_4x2048x1080p_5000},
1681  {"4k5994", NTV2_FORMAT_4x2048x1080p_5994},
1682  {"4x2048x1080p5994", NTV2_FORMAT_4x2048x1080p_5994},
1685  {"4x2048x1080p60", NTV2_FORMAT_4x2048x1080p_6000},
1686  {"4k4795", NTV2_FORMAT_4x2048x1080p_4795},
1687  {"4x2048x1080p4795", NTV2_FORMAT_4x2048x1080p_4795},
1689  {"4x2048x1080p48", NTV2_FORMAT_4x2048x1080p_4800},
1690  {"4k11988", NTV2_FORMAT_4x2048x1080p_11988},
1691  {"4x2048x1080p11988", NTV2_FORMAT_4x2048x1080p_11988},
1692  {"4k120", NTV2_FORMAT_4x2048x1080p_12000},
1693  {"4x2048x1080p120", NTV2_FORMAT_4x2048x1080p_12000},
1694  {"2048x1080p60", NTV2_FORMAT_1080p_2K_6000_A},
1695  {"2048x1080p5994", NTV2_FORMAT_1080p_2K_5994_A},
1696  {"2048x1080p2997", NTV2_FORMAT_1080p_2K_2997},
1697  {"2048x1080p30", NTV2_FORMAT_1080p_2K_3000},
1698  {"2048x1080p50", NTV2_FORMAT_1080p_2K_5000_A},
1699  {"2048x1080p4795", NTV2_FORMAT_1080p_2K_4795_A},
1700  {"2048x1080p48", NTV2_FORMAT_1080p_2K_4800_A},
1701  {"2048x1080p60b", NTV2_FORMAT_1080p_2K_6000_B},
1702  {"2048x1080p5994b", NTV2_FORMAT_1080p_2K_5994_B},
1703  {"2048x1080p50b", NTV2_FORMAT_1080p_2K_5000_B},
1704  {"2048x1080p48b", NTV2_FORMAT_1080p_2K_4800_B},
1705  {"2048x1080p4795b", NTV2_FORMAT_1080p_2K_4795_B},
1706  {"", NTV2_FORMAT_UNKNOWN} };
1707  if (true)
1708  {
1709  // Dump the gString2VideoFormatMMap map...
1710  for (String2VideoFormatMMapCI it(gString2VideoFormatMMap.begin()); it != gString2VideoFormatMMap.end(); ++it)
1711  {
1712  cout << "'" << it->first << "'\t'" << ::NTV2VideoFormatToString(it->second) << "'\t" << ::NTV2VideoFormatString(it->second) << "\t" << DEC(it->second) << endl;
1713  }
1714  }
1715  cout << endl << endl;
1716  for (unsigned ndx(0); !sVFmtDict[ndx].fName.empty(); ndx++)
1717  {
1718  const string & str (sVFmtDict[ndx].fName);
1719  const NTV2VideoFormat vFormat (sVFmtDict[ndx].fFormat);
1721  const NTV2VideoFormat vFormat2 (it != gString2VideoFormatMMap.end() ? it->second : NTV2_FORMAT_UNKNOWN);
1722  if (vFormat != vFormat2)
1723  cerr << "'" << str << "': '" << ::NTV2VideoFormatString(vFormat) << "' (" << DEC(vFormat) << ") != '" << ::NTV2VideoFormatString(vFormat2) << "' (" << DEC(vFormat2) << ")" << endl;
1724  //SHOULD_BE_EQUAL(vFormat, vFormat2);
1725  }
1726  return true;
1727 }
1728 
1729 
1731 
1732 
1733 AJALabelValuePairs CaptureConfig::Get (const bool inCompact) const
1734 {
1735  AJALabelValuePairs result;
1736  AJASystemInfo::append (result, "Capture Config");
1737  AJASystemInfo::append (result, "Device Specifier", fDeviceSpec);
1738  AJASystemInfo::append (result, "Input Channel", ::NTV2ChannelToString(fInputChannel, inCompact));
1739  AJASystemInfo::append (result, "Input Source", ::NTV2InputSourceToString(fInputSource, inCompact));
1740  AJASystemInfo::append (result, "Pixel Format", ::NTV2FrameBufferFormatToString(fPixelFormat, inCompact));
1741  AJASystemInfo::append (result, "AutoCirc Frames", fFrames.toString());
1742  AJASystemInfo::append (result, "A/B Conversion", fDoABConversion ? "Y" : "N");
1743  AJASystemInfo::append (result, "MultiFormat Mode", fDoMultiFormat ? "Y" : "N");
1744  AJASystemInfo::append (result, "Capture Anc", fWithAnc ? "Y" : "N");
1745  AJASystemInfo::append (result, "Anc Capture File", fAncDataFilePath.empty() ? "---" : fAncDataFilePath);
1746  AJASystemInfo::append (result, "Capture Audio", fWithAudio ? "Y" : "N");
1747  AJASystemInfo::append (result, "Num Audio Links", aja::to_string(fNumAudioLinks));
1748  AJASystemInfo::append (result, "TSI Routing", fDoTSIRouting ? "Y" : "N");
1749  return result;
1750 }
1751 
1752 
1753 std::ostream & operator << (std::ostream & ioStrm, const CaptureConfig & inObj)
1754 {
1755  ioStrm << AJASystemInfo::ToString(inObj.Get());
1756  return ioStrm;
1757 }
1758 
1759 
1761 
1762 
1763 AJALabelValuePairs PlayerConfig::Get (const bool inCompact) const
1764 {
1765  AJALabelValuePairs result;
1766  AJASystemInfo::append (result, "NTV2Player Config");
1767  AJASystemInfo::append (result, "Device Specifier", fDeviceSpec);
1768  AJASystemInfo::append (result, "Video Format", ::NTV2VideoFormatToString(fVideoFormat));
1769  AJASystemInfo::append (result, "Pixel Format", ::NTV2FrameBufferFormatToString(fPixelFormat, inCompact));
1770  AJASystemInfo::append (result, "AutoCirc Frames", fFrames.toString());
1771  AJASystemInfo::append (result, "MultiFormat Mode", fDoMultiFormat ? "Y" : "N");
1772  AJASystemInfo::append (result, "VANC Mode", ::NTV2VANCModeToString(fVancMode));
1773  AJASystemInfo::append (result, "HDR Anc Type", ::AJAAncDataTypeToString(fTransmitHDRType));
1774  AJASystemInfo::append (result, "Output Channel", ::NTV2ChannelToString(fOutputChannel, inCompact));
1775  AJASystemInfo::append (result, "Output Connector", ::NTV2OutputDestinationToString(fOutputDest, inCompact));
1776  AJASystemInfo::append (result, "Anc Playback File", fAncDataFilePath.empty() ? "---" : fAncDataFilePath);
1777  AJASystemInfo::append (result, "Suppress Audio", fSuppressAudio ? "Y" : "N");
1778  AJASystemInfo::append (result, "Num Audio Links", aja::to_string(fNumAudioLinks));
1779  AJASystemInfo::append (result, "Suppress Video", fSuppressVideo ? "Y" : "N");
1780  AJASystemInfo::append (result, "Embedded Timecode", fTransmitLTC ? "LTC" : "VITC");
1781  AJASystemInfo::append (result, "Level Conversion", fDoABConversion ? "Y" : "N");
1782  AJASystemInfo::append (result, "HDMI Output", fDoHDMIOutput ? "Yes" : "No");
1783  AJASystemInfo::append (result, "RGB-On-SDI", fDoRGBOnWire ? "Yes" : "No");
1784  AJASystemInfo::append (result, "TSI Routing", fDoTsiRouting ? "Yes" : "No");
1785  AJASystemInfo::append (result, "6G/12G Output", fDoLinkGrouping ? "Yes" : "No");
1786  return result;
1787 }
1788 
1789 
1790 std::ostream & operator << (std::ostream & ioStrm, const PlayerConfig & inObj)
1791 {
1792  ioStrm << AJASystemInfo::ToString(inObj.Get());
1793  return ioStrm;
1794 }
1795 
1796 
1798 
1799 
1800 AJALabelValuePairs BurnConfig::Get (const bool inCompact) const
1801 {
1802  AJALabelValuePairs result;
1803  AJASystemInfo::append(result, "NTV2Burn Config");
1804  if (fDeviceSpec2.empty())
1805  AJASystemInfo::append(result, "Device Specifier", fDeviceSpec);
1806  else
1807  {
1808  AJASystemInfo::append(result, "Input Device", fDeviceSpec);
1809  AJASystemInfo::append(result, "Output Device", fDeviceSpec2);
1810  }
1811  AJASystemInfo::append(result, "Input Channel", ::NTV2ChannelToString(fInputChannel, inCompact));
1812  AJASystemInfo::append(result, "Output Channel", ::NTV2ChannelToString(fOutputChannel, inCompact));
1813  AJASystemInfo::append(result, "Input Source", ::NTV2InputSourceToString(fInputSource, inCompact));
1814  if (WithTimecode())
1815  AJASystemInfo::append(result, "Timecode Source", ::NTV2TCIndexToString(fTimecodeSource, inCompact));
1816  AJASystemInfo::append(result, "Output Destination", ::NTV2OutputDestinationToString(fOutputDest, inCompact));
1817  AJASystemInfo::append(result, "Pixel Format", ::NTV2FrameBufferFormatToString(fPixelFormat, inCompact));
1818  AJASystemInfo::append(result, "AC Input Frames", fInputFrames.toString());
1819  AJASystemInfo::append(result, "AC Output Frames", fOutputFrames.toString());
1820  AJASystemInfo::append(result, "Include Video", WithVideo() ? "Y" : "N");
1821  AJASystemInfo::append(result, "Include Audio", WithAudio() ? "Y" : "N");
1822  AJASystemInfo::append(result, "Include Anc", WithAnc() ? "Y" : "N");
1823  AJASystemInfo::append(result, "Include HANC", WithHanc() ? "Y" : "N");
1824  AJASystemInfo::append(result, "MultiFormat Mode", fDoMultiFormat ? "Y" : "N");
1825  AJASystemInfo::append(result, "Field Mode", FieldMode() ? "Y" : "N");
1826  AJASystemInfo::append(result, "Verbose Mode", IsVerbose() ? "Y" : "N");
1827  return result;
1828 }
NTV2InputSourceSet
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
Definition: ntv2publicinterface.h:8975
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:643
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:515
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:469
NTV2_FORMAT_625_5000
@ NTV2_FORMAT_625_5000
Definition: ntv2enums.h:571
NTV2_FORMAT_4x1920x1080p_6000
@ NTV2_FORMAT_4x1920x1080p_6000
Definition: ntv2enums.h:607
NTV2ChannelToInputSource
NTV2InputSource NTV2ChannelToInputSource(const NTV2Channel inChannel, const NTV2IOKinds inKinds=NTV2_IOKINDS_SDI)
Definition: ntv2utils.cpp:5197
NTV2_FORMAT_1080psf_2398
@ NTV2_FORMAT_1080psf_2398
Definition: ntv2enums.h:543
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:5112
NTV2Buffer::SetDefaultPageSize
static bool SetDefaultPageSize(const size_t inNewSize)
Changes the default page size for use in future page-aligned allocations.
Definition: ntv2publicinterface.cpp:2155
NTV2_FORMAT_4096x2160p_2400
@ NTV2_FORMAT_4096x2160p_2400
Definition: ntv2enums.h:653
gGlobalMutexName
static const string gGlobalMutexName("com.aja.ntv2.mutex.demo")
DeviceCapabilities::CanDoVideoFormat
bool CanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2devicecapabilities.h:254
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:578
GetSDIInputOutputXptFromChannel
NTV2OutputXptID GetSDIInputOutputXptFromChannel(const NTV2Channel inSDIInput, const bool inIsDS2=false)
Definition: ntv2signalrouter.cpp:921
NTV2_FORMAT_720p_5000
@ NTV2_FORMAT_720p_5000
Definition: ntv2enums.h:554
NTV2_IOKINDS_HDMI
@ NTV2_IOKINDS_HDMI
Specifies HDMI input/output kinds.
Definition: ntv2enums.h:1284
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:2016
gString2OutputDestMap
static String2OutputDestMap gString2OutputDestMap
Definition: ntv2democommon.cpp:77
NTV2_FORMAT_4096x2160p_12000
@ NTV2_FORMAT_4096x2160p_12000
Definition: ntv2enums.h:665
NTV2FrameBufferFormatSetConstIter
NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter
A handy const iterator for iterating over an NTV2FrameBufferFormatSet.
Definition: ntv2publicinterface.h:8965
NTV2_IS_ATC_VITC1_TIMECODE_INDEX
#define NTV2_IS_ATC_VITC1_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3958
NTV2_OUTPUTDESTINATION_HDMI1
@ NTV2_OUTPUTDESTINATION_HDMI1
Definition: ntv2enums.h:1313
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:581
AJA_FrameRate_3000
@ AJA_FrameRate_3000
Definition: videotypes.h:223
NTV2_FORMAT_4x4096x2160p_4800
@ NTV2_FORMAT_4x4096x2160p_4800
Definition: ntv2enums.h:702
NTV2FrameBufferFormatSet
std::set< NTV2FrameBufferFormat > NTV2FrameBufferFormatSet
A set of distinct NTV2FrameBufferFormat values.
Definition: ntv2publicinterface.h:8964
NTV2OutputDestination
NTV2OutputDestination
Identifies a specific video output destination.
Definition: ntv2enums.h:1310
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:696
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:570
kTCFormat24fps
@ kTCFormat24fps
Definition: ntv2rp188.h:30
CNTV2DemoCommon::GetSupportedPixelFormats
static NTV2PixelFormats GetSupportedPixelFormats(const NTV2PixelFormatKinds inKinds=PIXEL_FORMATS_ALL)
Definition: ntv2democommon.cpp:547
String2PixelFormatMap
map< string, NTV2FrameBufferFormat > String2PixelFormatMap
Definition: ntv2democommon.cpp:28
GetDLInInputXptFromChannel
NTV2InputXptID GetDLInInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB=false)
Definition: ntv2signalrouter.cpp:824
NTV2OutputDestinations
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
Definition: ntv2publicinterface.h:8978
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:599
ntv2devicefeatures.h
Declares device capability functions.
NTV2_FORMAT_4096x2160p_11988
@ NTV2_FORMAT_4096x2160p_11988
Definition: ntv2enums.h:664
gInputSourcesHDMI
static NTV2InputSourceSet gInputSourcesHDMI
Definition: ntv2democommon.cpp:66
CNTV2DemoCommon::GetVANCModeFromString
static NTV2VANCMode GetVANCModeFromString(const std::string &inStr)
Definition: ntv2democommon.cpp:951
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:654
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:419
NTV2_TestPatt_All
@ NTV2_TestPatt_All
Definition: ntv2testpatterngen.h:52
NTV2TCIndexes
std::set< NTV2TCIndex > NTV2TCIndexes
Definition: ntv2publicinterface.h:6960
NTV2_FRAMERATE_6000
@ NTV2_FRAMERATE_6000
60 frames per second
Definition: ntv2enums.h:406
CNTV2DemoCommon::GetTSIMuxesForFrameStore
static NTV2ChannelList GetTSIMuxesForFrameStore(CNTV2Card &inDevice, const NTV2Channel in1stFrameStore, const UWord inCount)
Definition: ntv2democommon.cpp:1251
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:1015
NTV2_FORMAT_525psf_2997
@ NTV2_FORMAT_525psf_2997
Definition: ntv2enums.h:574
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1343
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:611
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:645
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:8961
NTV2_FRAMERATE_2997
@ NTV2_FRAMERATE_2997
Fractional rate of 30,000 frames per 1,001 seconds.
Definition: ntv2enums.h:410
NTV2_FORMAT_1080p_2K_6000_B
@ NTV2_FORMAT_1080p_2K_6000_B
Definition: ntv2enums.h:628
NTV2_FORMAT_4096x2160p_5000_B
@ NTV2_FORMAT_4096x2160p_5000_B
Definition: ntv2enums.h:668
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:552
DeviceCapabilities::CanDoInputTCIndex
bool CanDoInputTCIndex(const NTV2TCIndex inTCNdx)
Definition: ntv2devicecapabilities.h:323
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:817
NTV2_AUDIO_48K
@ NTV2_AUDIO_48K
Definition: ntv2enums.h:1916
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:1268
CNTV2DemoCommon::GetAudioSystemStrings
static std::string GetAudioSystemStrings(const std::string inDeviceSpecifier=std::string())
Definition: ntv2democommon.cpp:887
NTV2_FORMAT_1080p_2K_4800_A
@ NTV2_FORMAT_1080p_2K_4800_A
Definition: ntv2enums.h:623
String2TCIndexPair
pair< string, NTV2TCIndex > String2TCIndexPair
Definition: ntv2democommon.cpp:44
NTV2_FORMAT_4x2048x1080p_11988
@ NTV2_FORMAT_4x2048x1080p_11988
Definition: ntv2enums.h:613
AJA_PixelFormat_RGB10
@ AJA_PixelFormat_RGB10
Definition: videotypes.h:128
NTV2_FRAMERATE_12000
@ NTV2_FRAMERATE_12000
120 frames per second
Definition: ntv2enums.h:417
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:539
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:329
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:8979
AJA_PixelFormat_PRORES_DVPRO
@ AJA_PixelFormat_PRORES_DVPRO
Definition: videotypes.h:142
NTV2_FORMAT_4x1920x1080psf_3000
@ NTV2_FORMAT_4x1920x1080psf_3000
Definition: ntv2enums.h:600
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:5220
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:4942
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:620
String2TCIndexMap
map< string, NTV2TCIndex > String2TCIndexMap
Definition: ntv2democommon.cpp:43
NTV2_FORMAT_4x2048x1080p_2997
@ NTV2_FORMAT_4x2048x1080p_2997
Definition: ntv2enums.h:601
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:426
kTCFormat30fpsDF
@ kTCFormat30fpsDF
Definition: ntv2rp188.h:33
DemoCommonInitializer::DemoCommonInitializer
DemoCommonInitializer()
Definition: ntv2democommon.cpp:93
NTV2_FORMAT_4x4096x2160p_2500
@ NTV2_FORMAT_4x4096x2160p_2500
Definition: ntv2enums.h:698
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:701
NTV2_FORMAT_4x1920x1080p_2997
@ NTV2_FORMAT_4x1920x1080p_2997
Definition: ntv2enums.h:597
NTV2_FORMAT_4x1920x1080p_2500
@ NTV2_FORMAT_4x1920x1080p_2500
Definition: ntv2enums.h:590
NTV2_FBF_INVALID
@ NTV2_FBF_INVALID
Definition: ntv2enums.h:248
NTV2_FORMAT_4x2048x1080p_4800
@ NTV2_FORMAT_4x2048x1080p_4800
Definition: ntv2enums.h:612
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:685
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:3961
kTCFormat30fps
@ kTCFormat30fps
Definition: ntv2rp188.h:32
NTV2_IS_ATC_LTC_TIMECODE_INDEX
#define NTV2_IS_ATC_LTC_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3963
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:691
NTV2InputXptID
enum NTV2InputCrosspointID NTV2InputXptID
NTV2_NUM_FRAMERATES
@ NTV2_NUM_FRAMERATES
Definition: ntv2enums.h:431
NTV2_OUTPUT_CROSSPOINT_INVALID
@ NTV2_OUTPUT_CROSSPOINT_INVALID
Definition: ntv2enums.h:2698
CaptureConfig::Get
AJALabelValuePairs Get(const bool inCompact=(0)) const
Definition: ntv2democommon.cpp:1733
NTV2TimeCodesConstIter
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
Definition: ntv2publicinterface.h:6958
TimecodeFormat
TimecodeFormat
Definition: ntv2rp188.h:27
operator<<
std::ostream & operator<<(std::ostream &ioStrm, const CaptureConfig &inObj)
Definition: ntv2democommon.cpp:1753
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 FrameStore 1 (or the first item).
Definition: ntv2enums.h:1345
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:683
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:710
NTV2_FRAMERATE_1898
@ NTV2_FRAMERATE_1898
Definition: ntv2enums.h:424
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:245
GetIndexForNTV2Channel
ULWord GetIndexForNTV2Channel(const NTV2Channel inChannel)
Definition: ntv2utils.cpp:4767
kTCFormat48fps
@ kTCFormat48fps
Definition: ntv2rp188.h:34
NTV2_IOKINDS_ANALOG
@ NTV2_IOKINDS_ANALOG
Specifies analog input/output kinds.
Definition: ntv2enums.h:1285
NTV2_FRAMERATE_2500
@ NTV2_FRAMERATE_2500
25 frames per second
Definition: ntv2enums.h:411
NTV2_FORMAT_1080p_2K_4795_A
@ NTV2_FORMAT_1080p_2K_4795_A
Definition: ntv2enums.h:622
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:1157
NTV2_FORMAT_3840x2160p_2500
@ NTV2_FORMAT_3840x2160p_2500
Definition: ntv2enums.h:636
VIDEO_FORMATS_4KUHD
@ VIDEO_FORMATS_4KUHD
Definition: ntv2democommon.h:226
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:403
String2TPNamesMap
map< string, string > String2TPNamesMap
Definition: ntv2democommon.cpp:47
NTV2_FORMAT_4096x2160p_6000_B
@ NTV2_FORMAT_4096x2160p_6000_B
Definition: ntv2enums.h:670
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:580
NTV2_FORMAT_4x4096x2160p_2997
@ NTV2_FORMAT_4x4096x2160p_2997
Definition: ntv2enums.h:699
NTV2_FRAMERATE_4800
@ NTV2_FRAMERATE_4800
48 frames per second
Definition: ntv2enums.h:415
NTV2_IS_4K_VIDEO_FORMAT
#define NTV2_IS_4K_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:774
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:731
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:412
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:591
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:594
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:1260
NTV2_IS_ANALOG_TIMECODE_INDEX
#define NTV2_IS_ANALOG_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3956
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:1283
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:2150
CNTV2DemoCommon::GetAudioSystemFromString
static NTV2AudioSystem GetAudioSystemFromString(const std::string &inStr)
Returns the NTV2AudioSystem that matches the given string.
Definition: ntv2democommon.cpp:914
NTV2_FORMAT_1080psf_2K_2500
@ NTV2_FORMAT_1080psf_2K_2500
Definition: ntv2enums.h:564
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:958
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:592
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:7263
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:1568
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:6446
NTV2_FORMAT_1080p_5994_B
@ NTV2_FORMAT_1080p_5994_B
Definition: ntv2enums.h:556
gFBFsRaw
static NTV2FrameBufferFormatSet gFBFsRaw
Definition: ntv2democommon.cpp:60
NTV2_FORMAT_1080psf_3000_2
@ NTV2_FORMAT_1080psf_3000_2
Definition: ntv2enums.h:567
NTV2_FORMAT_1080p_2K_2400
@ NTV2_FORMAT_1080p_2K_2400
Definition: ntv2enums.h:551
AJA_PixelFormat_DVCPRO
@ AJA_PixelFormat_DVCPRO
Definition: videotypes.h:133
NTV2_FORMAT_525_2398
@ NTV2_FORMAT_525_2398
Definition: ntv2enums.h:572
NTV2_FORMAT_4x2048x1080p_3000
@ NTV2_FORMAT_4x2048x1080p_3000
Definition: ntv2enums.h:602
NTV2_VANCMODE_OFF
@ NTV2_VANCMODE_OFF
This identifies the mode in which there are no VANC lines in the frame buffer.
Definition: ntv2enums.h:3769
NTV2_FORMAT_4096x2160p_4795
@ NTV2_FORMAT_4096x2160p_4795
Definition: ntv2enums.h:659
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:413
CNTV2DemoCommon::ConfigureAudioSystems
static bool ConfigureAudioSystems(CNTV2Card &inDevice, const CaptureConfig &inConfig, const NTV2AudioSystemSet inAudioSystems)
Configures capture audio systems.
Definition: ntv2democommon.cpp:1532
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:995
NTV2_FORMAT_4x4096x2160p_3000
@ NTV2_FORMAT_4x4096x2160p_3000
Definition: ntv2enums.h:700
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:582
NTV2_FRAMERATE_1900
@ NTV2_FRAMERATE_1900
Definition: ntv2enums.h:423
NTV2_OUTPUT_DEST_IS_HDMI
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
Definition: ntv2enums.h:1330
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:604
NTV2_FORMAT_1080p_2997
@ NTV2_FORMAT_1080p_2997
Definition: ntv2enums.h:545
NTV2_FORMAT_1080p_2K_4795_B
@ NTV2_FORMAT_1080p_2K_4795_B
Definition: ntv2enums.h:624
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:420
NTV2_FORMAT_1080p_3000
@ NTV2_FORMAT_1080p_3000
Definition: ntv2enums.h:546
gString2VideoFormatMMap
static String2VideoFormatMMap gString2VideoFormatMMap
Definition: ntv2democommon.cpp:72
CNTV2DemoCommon::SetDefaultPageSize
static size_t SetDefaultPageSize(void)
Definition: ntv2democommon.cpp:1553
NTV2FrameData::Timecode
NTV2_RP188 Timecode(const NTV2TCIndex inTCNdx) const
Definition: ntv2democommon.cpp:404
NTV2_FORMAT_4x3840x2160p_5994
@ NTV2_FORMAT_4x3840x2160p_5994
Definition: ntv2enums.h:689
NTV2_FORMAT_4096x2160p_2398
@ NTV2_FORMAT_4096x2160p_2398
Definition: ntv2enums.h:652
NTV2_FORMAT_720p_6000
@ NTV2_FORMAT_720p_6000
Definition: ntv2enums.h:542
NTV2_INPUTSOURCE_INVALID
@ NTV2_INPUTSOURCE_INVALID
The invalid video input.
Definition: ntv2enums.h:1268
NTV2_FORMAT_1080p_2500
@ NTV2_FORMAT_1080p_2500
Definition: ntv2enums.h:547
NTV2AudioSystemSet
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
Definition: ntv2publicinterface.h:3915
NTV2_MAX_NUM_VIDEO_FORMATS
@ NTV2_MAX_NUM_VIDEO_FORMATS
Definition: ntv2enums.h:713
CNTV2DemoCommon::BFT
static bool BFT(void)
Definition: ntv2democommon.cpp:1594
NTV2TCIndex
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
Definition: ntv2enums.h:3921
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:847
AJASystemInfo::ToString
virtual void ToString(std::string &outAllLabelsAndValues) const
Answers with a multi-line string that contains the complete host system info table.
GetFrameBufferInputXptFromChannel
#define GetFrameBufferInputXptFromChannel
Definition: ntv2signalrouter.h:732
AJA_FrameRate_2398
@ AJA_FrameRate_2398
Definition: videotypes.h:219
NTV2_FORMAT_4x2048x1080p_5000
@ NTV2_FORMAT_4x2048x1080p_5000
Definition: ntv2enums.h:608
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:567
NTV2_FORMAT_4096x2160p_6000
@ NTV2_FORMAT_4096x2160p_6000
Definition: ntv2enums.h:663
NTV2_OUTPUT_DEST_IS_ANALOG
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
Definition: ntv2enums.h:1331
UWord
uint16_t UWord
Definition: ajatypes.h:253
NTV2VANCModeToString
std::string NTV2VANCModeToString(const NTV2VANCMode inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6557
AJA_PixelFormat_YCBCR10_420PL3LE
@ AJA_PixelFormat_YCBCR10_420PL3LE
Definition: videotypes.h:163
CNTV2DemoCommon::GetVANCModeStrings
static std::string GetVANCModeStrings(void)
Definition: ntv2democommon.cpp:920
CNTV2DemoCommon::GetSupportedTCIndexes
static const NTV2TCIndexes GetSupportedTCIndexes(const NTV2TCIndexKinds inKinds)
Definition: ntv2democommon.cpp:795
NTV2_FORMAT_4x1920x1080p_3000
@ NTV2_FORMAT_4x1920x1080p_3000
Definition: ntv2enums.h:598
NTV2_FORMAT_4x3840x2160p_2997
@ NTV2_FORMAT_4x3840x2160p_2997
Definition: ntv2enums.h:686
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:763
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:1763
NTV2_FORMAT_1080p_5000_B
@ NTV2_FORMAT_1080p_5000_B
Definition: ntv2enums.h:555
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:6798
NTV2_FRAMERATE_1800
@ NTV2_FRAMERATE_1800
Definition: ntv2enums.h:425
NTV2VideoFormatSetConstIter
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
Definition: ntv2publicinterface.h:8962
CNTV2DemoCommon::GetVideoFormatStrings
static std::string GetVideoFormatStrings(const NTV2VideoFormatKinds inKinds=VIDEO_FORMATS_SDHD, const std::string inDevSpec=std::string())
Definition: ntv2democommon.cpp:485
NTV2_FORMAT_4x3840x2160p_5000
@ NTV2_FORMAT_4x3840x2160p_5000
Definition: ntv2enums.h:688
NTV2_FORMAT_1080p_2K_5994_A
@ NTV2_FORMAT_1080p_2K_5994_A
Definition: ntv2enums.h:618
NTV2_INPUT_SOURCE_IS_HDMI
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
Definition: ntv2enums.h:1272
CNTV2DemoCommon::Popt::~Popt
virtual ~Popt()
Definition: ntv2democommon.cpp:1588
NTV2_MAX_NUM_TIMECODE_INDEXES
@ NTV2_MAX_NUM_TIMECODE_INDEXES
Definition: ntv2enums.h:3950
gInitializer
static const DemoCommonInitializer gInitializer
Definition: ntv2democommon.cpp:401
GetCSCInputXptFromChannel
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
Definition: ntv2signalrouter.cpp:803
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:614
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:814
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:575
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:1050
NTV2_AUDIO_BUFFER_SIZE_4MB
@ NTV2_AUDIO_BUFFER_SIZE_4MB
Definition: ntv2enums.h:1903
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:93
NTV2_FORMAT_1080p_2K_2500
@ NTV2_FORMAT_1080p_2K_2500
Definition: ntv2enums.h:563
NTV2_FORMAT_4x4096x2160p_4800_B
@ NTV2_FORMAT_4x4096x2160p_4800_B
Definition: ntv2enums.h:707
NTV2_FORMAT_4x1920x1080psf_2997
@ NTV2_FORMAT_4x1920x1080psf_2997
Definition: ntv2enums.h:599
DeviceCapabilities::CanDoInputSource
bool CanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2devicecapabilities.h:236
CNTV2DemoCommon::GetTestPatternNameFromString
static std::string GetTestPatternNameFromString(const std::string &inStr)
Definition: ntv2democommon.cpp:986
NTV2_FORMAT_1080p_6000_A
@ NTV2_FORMAT_1080p_6000_A
Definition: ntv2enums.h:562
NTV2_INPUTSOURCE_HDMI1
@ NTV2_INPUTSOURCE_HDMI1
Identifies the 1st HDMI video input.
Definition: ntv2enums.h:1256
GetDLInOutputXptFromChannel
NTV2OutputXptID GetDLInOutputXptFromChannel(const NTV2Channel inDLInput)
Definition: ntv2signalrouter.cpp:945
NTV2_FRAMERATE_11988
@ NTV2_FRAMERATE_11988
Fractional rate of 120,000 frames per 1,001 seconds.
Definition: ntv2enums.h:418
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:550
NTV2_FORMAT_3840x2160p_2997
@ NTV2_FORMAT_3840x2160p_2997
Definition: ntv2enums.h:637
NTV2_FORMAT_4096x2160p_4800
@ NTV2_FORMAT_4096x2160p_4800
Definition: ntv2enums.h:660
NTV2StringList
std::vector< std::string > NTV2StringList
Definition: ntv2utils.h:1143
NTV2_FORMAT_1080p_2398
@ NTV2_FORMAT_1080p_2398
Definition: ntv2enums.h:548
gString2VANCModeMap
static String2VANCModeMap gString2VANCModeMap
Definition: ntv2democommon.cpp:75
NTV2VANCMode
NTV2VANCMode
These enum values identify the available VANC modes.
Definition: ntv2enums.h:3767
AJA_FrameRate_4800
@ AJA_FrameRate_4800
Definition: videotypes.h:225
NTV2_INPUT_CROSSPOINT_INVALID
@ NTV2_INPUT_CROSSPOINT_INVALID
Definition: ntv2enums.h:2875
NTV2_FORMAT_1080psf_2K_2400
@ NTV2_FORMAT_1080psf_2K_2400
Definition: ntv2enums.h:553
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:1332
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:3772
CNTV2DemoCommon::GetAJAFrameRate
static AJA_FrameRate GetAJAFrameRate(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1080
NTV2_FORMAT_3840x2160p_5994
@ NTV2_FORMAT_3840x2160p_5994
Definition: ntv2enums.h:642
NTV2_FORMAT_4x4096x2160p_2400
@ NTV2_FORMAT_4x4096x2160p_2400
Definition: ntv2enums.h:697
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:705
NTV2ChannelList
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
Definition: ntv2publicinterface.h:3850
NTV2_FORMAT_3840x2160p_2398
@ NTV2_FORMAT_3840x2160p_2398
Definition: ntv2enums.h:634
AJA_PixelFormat_PRORES_HDV
@ AJA_PixelFormat_PRORES_HDV
Definition: videotypes.h:143
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1253
gOutputDestinations
static NTV2OutputDestinations gOutputDestinations
Definition: ntv2democommon.cpp:68
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:525
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:810
NTV2_FORMAT_4x1920x1080psf_2398
@ NTV2_FORMAT_4x1920x1080psf_2398
Definition: ntv2enums.h:585
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:651
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:1445
NTV2_FORMAT_1080p_2K_6000_A
@ NTV2_FORMAT_1080p_2K_6000_A
Definition: ntv2enums.h:617
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:1286
NTV2_FORMAT_3840x2160p_5000_B
@ NTV2_FORMAT_3840x2160p_5000_B
Definition: ntv2enums.h:644
NTV2_FORMAT_4096x2160p_3000
@ NTV2_FORMAT_4096x2160p_3000
Definition: ntv2enums.h:656
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5647
NTV2_FORMAT_4x1920x1080psf_2500
@ NTV2_FORMAT_4x1920x1080psf_2500
Definition: ntv2enums.h:587
NTV2_FRAMERATE_5994
@ NTV2_FRAMERATE_5994
Fractional rate of 60,000 frames per 1,001 seconds.
Definition: ntv2enums.h:408
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:684
NTV2AudioSystemSetConstIter
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
Definition: ntv2publicinterface.h:3916
AJA_PixelFormat_ABGR8
@ AJA_PixelFormat_ABGR8
Definition: videotypes.h:130
NTV2_FORMAT_4x4096x2160p_5000_B
@ NTV2_FORMAT_4x4096x2160p_5000_B
Definition: ntv2enums.h:708
AJA_PixelFormat_Unknown
@ AJA_PixelFormat_Unknown
Definition: videotypes.h:123
NTV2TCIndexesConstIter
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Definition: ntv2publicinterface.h:6961
NTV2_FBF_10BIT_RAW_YCBCR
@ NTV2_FBF_10BIT_RAW_YCBCR
See 10-Bit Raw YCbCr (CION).
Definition: ntv2enums.h:239
NTV2_OUTPUTDESTINATION_INVALID
@ NTV2_OUTPUTDESTINATION_INVALID
Definition: ntv2enums.h:1322
NTV2_FORMAT_4x2048x1080p_2500
@ NTV2_FORMAT_4x2048x1080p_2500
Definition: ntv2enums.h:596
NTV2_FORMAT_720p_2398
@ NTV2_FORMAT_720p_2398
Definition: ntv2enums.h:558
NTV2_FORMAT_4x1920x1080p_5994
@ NTV2_FORMAT_4x1920x1080p_5994
Definition: ntv2enums.h:606
NTV2_FORMAT_4x4096x2160p_5000
@ NTV2_FORMAT_4x4096x2160p_5000
Definition: ntv2enums.h:703
NTV2FrameBufferFormatToString
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6988
TC_INDEXES_SDI
@ TC_INDEXES_SDI
Definition: ntv2democommon.h:261
NTV2_FORMAT_4x3840x2160p_6000
@ NTV2_FORMAT_4x3840x2160p_6000
Definition: ntv2enums.h:690
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:1370
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:1033
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:8976
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:6871
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:1800
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5475
NTV2_AUDIO_EMBEDDED
@ NTV2_AUDIO_EMBEDDED
Obtain audio samples from the audio that's embedded in the video HANC.
Definition: ntv2enums.h:1993
NTV2_FRAMERATE_UNKNOWN
@ NTV2_FRAMERATE_UNKNOWN
Represents an unknown or invalid frame rate.
Definition: ntv2enums.h:405
NTV2_FORMAT_1080p_5000_A
@ NTV2_FORMAT_1080p_5000_A
Definition: ntv2enums.h:560
CNTV2DemoCommon::GetAJAPixelFormat
static AJA_PixelFormat GetAJAPixelFormat(const NTV2PixelFormat inFormat)
Definition: ntv2democommon.cpp:1112
NTV2_FORMAT_4x2048x1080p_6000
@ NTV2_FORMAT_4x2048x1080p_6000
Definition: ntv2enums.h:610
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:1297
NTV2_FORMAT_4096x2160p_5000
@ NTV2_FORMAT_4096x2160p_5000
Definition: ntv2enums.h:661
NTV2_TCINDEX_DEFAULT
@ NTV2_TCINDEX_DEFAULT
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel)
Definition: ntv2enums.h:3923
NTV2_FORMAT_1080i_5000
@ NTV2_FORMAT_1080i_5000
Definition: ntv2enums.h:538
gTCIndexesAnalog
static NTV2TCIndexSet gTCIndexesAnalog
Definition: ntv2democommon.cpp:81
NTV2_FORMAT_4x1920x1080p_5000
@ NTV2_FORMAT_4x1920x1080p_5000
Definition: ntv2enums.h:605
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:588
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:1354
gInputSourcesSDI
static NTV2InputSourceSet gInputSourcesSDI
Definition: ntv2democommon.cpp:65
NTV2_FORMAT_1080p_6000_B
@ NTV2_FORMAT_1080p_6000_B
Definition: ntv2enums.h:557
NTV2_FORMAT_4x4096x2160p_5994_B
@ NTV2_FORMAT_4x4096x2160p_5994_B
Definition: ntv2enums.h:709
gString2AudioSystemMap
static String2AudioSystemMap gString2AudioSystemMap
Definition: ntv2democommon.cpp:74
NTV2_FORMAT_4096x2160p_2997
@ NTV2_FORMAT_4096x2160p_2997
Definition: ntv2enums.h:655
NTV2_TCINDEX_INVALID
@ NTV2_TCINDEX_INVALID
Definition: ntv2enums.h:3951
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:669
NTV2_FORMAT_4x3840x2160p_5994_B
@ NTV2_FORMAT_4x3840x2160p_5994_B
Definition: ntv2enums.h:692
NTV2_FORMAT_1080p_5994_A
@ NTV2_FORMAT_1080p_5994_A
Definition: ntv2enums.h:561
NTV2_FORMAT_4x3840x2160p_6000_B
@ NTV2_FORMAT_4x3840x2160p_6000_B
Definition: ntv2enums.h:693
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:893
AJA_FrameRate_6000
@ AJA_FrameRate_6000
Definition: videotypes.h:228
NTV2_FORMAT_4x2048x1080p_5994
@ NTV2_FORMAT_4x2048x1080p_5994
Definition: ntv2enums.h:609
gFBFsRGB
static NTV2FrameBufferFormatSet gFBFsRGB
Definition: ntv2democommon.cpp:58
NTV2StringListConstIter
NTV2StringList::const_iterator NTV2StringListConstIter
Definition: ntv2utils.h:1145
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:5053
NTV2_FORMAT_4x3840x2160p_3000
@ NTV2_FORMAT_4x3840x2160p_3000
Definition: ntv2enums.h:687
NTV2_FORMAT_1080p_2K_5994_B
@ NTV2_FORMAT_1080p_2K_5994_B
Definition: ntv2enums.h:627
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:5792
NTV2_INPUT_SOURCE_IS_SDI
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
Definition: ntv2enums.h:1274
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:641
NTV2_FORMAT_720p_5994
@ NTV2_FORMAT_720p_5994
Definition: ntv2enums.h:541
kTCFormatUnknown
@ kTCFormatUnknown
Definition: ntv2rp188.h:29
CNTV2DemoCommon::GetSupportedInputSources
static const NTV2InputSourceSet GetSupportedInputSources(const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Definition: ntv2democommon.cpp:635
NTV2FrameData::LockAll
bool LockAll(CNTV2Card &inDevice)
Definition: ntv2democommon.cpp:412
CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1058
NTV2_FORMAT_1080p_2K_5000_A
@ NTV2_FORMAT_1080p_2K_5000_A
Definition: ntv2enums.h:621
NTV2_FRAMERATE_5000
@ NTV2_FRAMERATE_5000
50 frames per second
Definition: ntv2enums.h:414
NTV2_FORMAT_4x4096x2160p_4795_B
@ NTV2_FORMAT_4x4096x2160p_4795_B
Definition: ntv2enums.h:706
NTV2Buffer::HostPageSize
static size_t HostPageSize(void)
Definition: ntv2publicinterface.cpp:2163
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:849
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:593
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:683
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:230
gFBFsAlpha
static NTV2FrameBufferFormatSet gFBFsAlpha
Definition: ntv2democommon.cpp:62
CNTV2DemoCommon::StripFormatString
static std::string StripFormatString(const std::string &inStr)
Definition: ntv2democommon.cpp:1002
CNTV2DemoCommon::GetGlobalMutexName
static const char * GetGlobalMutexName(void)
Definition: ntv2democommon.cpp:1246
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:416
NTV2_FORMAT_2K_1500
@ NTV2_FORMAT_2K_1500
Definition: ntv2enums.h:579
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:409
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:3865
NTV2_FORMAT_1080p_2K_5000_B
@ NTV2_FORMAT_1080p_2K_5000_B
Definition: ntv2enums.h:626
gString2PixelFormatMap
static String2PixelFormatMap gString2PixelFormatMap
Definition: ntv2democommon.cpp:73
NTV2_FORMAT_525_2400
@ NTV2_FORMAT_525_2400
Definition: ntv2enums.h:573
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:1201
NTV2_FORMAT_1080psf_2997_2
@ NTV2_FORMAT_1080psf_2997_2
Definition: ntv2enums.h:566
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:1273
TC_INDEXES_ANALOG
@ TC_INDEXES_ANALOG
Definition: ntv2democommon.h:262
NTV2_FORMAT_4x4096x2160p_5994
@ NTV2_FORMAT_4x4096x2160p_5994
Definition: ntv2enums.h:704
NTV2_FORMAT_4x2048x1080p_2400
@ NTV2_FORMAT_4x2048x1080p_2400
Definition: ntv2enums.h:595
gFBFsPlanar
static NTV2FrameBufferFormatSet gFBFsPlanar
Definition: ntv2democommon.cpp:59
NTV2_FORMAT_1080p_2K_4800_B
@ NTV2_FORMAT_1080p_2K_4800_B
Definition: ntv2enums.h:625
DeviceCapabilities::CanDoFrameBufferFormat
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2devicecapabilities.h:226
NTV2_FORMAT_4x1920x1080p_2400
@ NTV2_FORMAT_4x1920x1080p_2400
Definition: ntv2enums.h:589
NTV2_FORMAT_4x1920x1080psf_2400
@ NTV2_FORMAT_4x1920x1080psf_2400
Definition: ntv2enums.h:586
gTCIndexesHDMI
static NTV2TCIndexSet gTCIndexesHDMI
Definition: ntv2democommon.cpp:80
NTV2_FORMAT_720p_2500
@ NTV2_FORMAT_720p_2500
Definition: ntv2enums.h:559
NTV2_FORMAT_3840x2160p_6000_B
@ NTV2_FORMAT_3840x2160p_6000_B
Definition: ntv2enums.h:646
NTV2IOKinds
ULWord NTV2IOKinds
Definition: ntv2enums.h:1296
NTV2_FORMAT_1080psf_2500_2
@ NTV2_FORMAT_1080psf_2500_2
Definition: ntv2enums.h:565
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:666
GetTSIMuxInputXptFromChannel
NTV2InputXptID GetTSIMuxInputXptFromChannel(const NTV2Channel inTSIMuxer, const bool inLinkB=false)
Definition: ntv2signalrouter.cpp:1021
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:667
NTV2_FORMAT_3840x2160p_2400
@ NTV2_FORMAT_3840x2160p_2400
Definition: ntv2enums.h:635
NTV2_FORMAT_1080p_2400
@ NTV2_FORMAT_1080p_2400
Definition: ntv2enums.h:549
NTV2_FORMAT_1080i_6000
@ NTV2_FORMAT_1080i_6000
Definition: ntv2enums.h:540
String2VANCModeMap
map< string, NTV2VANCMode > String2VANCModeMap
Definition: ntv2democommon.cpp:34
CNTV2DemoCommon::GetSupportedOutputDestinations
static const NTV2OutputDestinations GetSupportedOutputDestinations(const NTV2IOKinds inKinds)
Definition: ntv2democommon.cpp:715
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:716
gString2TCIndexMap
static String2TCIndexMap gString2TCIndexMap
Definition: ntv2democommon.cpp:85
NTV2_FORMAT_3840x2160p_3000
@ NTV2_FORMAT_3840x2160p_3000
Definition: ntv2enums.h:638
NTV2_FORMAT_1080psf_2400
@ NTV2_FORMAT_1080psf_2400
Definition: ntv2enums.h:544
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:6960
DeviceCapabilities::CanDoOutputTCIndex
bool CanDoOutputTCIndex(const NTV2TCIndex inTCNdx)
Definition: ntv2devicecapabilities.h:332
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:662
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:603
NTV2OutputDestinationToString
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:7286
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3877
NTV2_FORMAT_1080p_2K_2997
@ NTV2_FORMAT_1080p_2K_2997
Definition: ntv2enums.h:619