AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
ntv2burn.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2burn.h"
9 #include "ntv2devicescanner.h"
10 #include "ntv2testpatterngen.h" // Needed for --novideo
11 #include "ajabase/common/types.h"
12 #include "ajabase/system/process.h"
15 #include <iostream>
16 
17 using namespace std;
18 
19 //#define NTV2_BUFFER_LOCKING // Define this to pre-lock video/audio buffers in kernel
20 #define HasWidgetsAnyOf(_w1,_w2,_w3) (mDevice.features().CanDoWidget(_w1) || mDevice.features().CanDoWidget(_w2) || mDevice.features().CanDoWidget(_w3))
21 #if defined(_DEBUG)
22  static const bool sShowConfig(true);
23 #else
24  static const bool sShowConfig(false);
25 #endif
26 static const uint32_t kAppSignature (NTV2_FOURCC('B','u','r','n'));
27 
28 
30 
31 
32 NTV2Burn::NTV2Burn (const BurnConfig & inConfig)
33  : mConfig (inConfig),
34  mPlayThread (AJAThread()),
35  mCaptureThread (AJAThread()),
36  mDeviceID (DEVICE_ID_NOTFOUND),
37  mVideoFormat (NTV2_FORMAT_UNKNOWN),
38  mSavedTaskMode (NTV2_DISABLE_TASKS),
39  mAudioSystem (inConfig.WithAudio() ? ::NTV2InputSourceToAudioSystem(inConfig.fInputSource) : NTV2_AUDIOSYSTEM_INVALID),
40  mGlobalQuit (false)
41 {
42 } // constructor
43 
44 
46 {
47  Quit(); // Stop my capture and playout threads, then destroy them
48  mDevice.UnsubscribeInputVerticalEvent(mConfig.fInputChannel); // Unsubscribe from input VBI event
49 } // destructor
50 
51 
52 void NTV2Burn::Quit (void)
53 {
54  // Set the global 'quit' flag, and wait for the threads to go inactive...
55  mGlobalQuit = true;
56 
57  while (mPlayThread.Active())
58  AJATime::Sleep(10);
59 
60  while (mCaptureThread.Active())
61  AJATime::Sleep(10);
62 
63  if (!mConfig.fDoMultiFormat)
64  { // Release the device...
66  if (NTV2_IS_VALID_TASK_MODE(mSavedTaskMode))
67  mDevice.SetEveryFrameServices(mSavedTaskMode); // Restore prior task mode
68  }
69 } // Quit
70 
71 
73 {
75 
76  // Open the device...
78  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not found" << endl; return AJA_STATUS_OPEN;}
79 
80  if (!mDevice.IsDeviceReady(false))
81  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not ready" << endl; return AJA_STATUS_INITIALIZE;}
82 
83  mDeviceID = mDevice.GetDeviceID(); // Keep the device ID handy since it will be used frequently
84  if (!mDevice.features().CanDoCapture())
85  {cerr << "## ERROR: Device '" << mDeviceID << "' cannot capture" << endl; return AJA_STATUS_FEATURE;}
86  if (!mDevice.features().CanDoPlayback())
87  {cerr << "## ERROR: Device '" << mDeviceID << "' cannot playout" << endl; return AJA_STATUS_FEATURE;}
88 
89  ULWord appSignature (0);
90  int32_t appPID (0);
91  mDevice.GetStreamingApplication (appSignature, appPID); // Who currently "owns" the device?
92  mDevice.GetEveryFrameServices(mSavedTaskMode); // Save the current device state
93  if (!mConfig.fDoMultiFormat)
94  {
96  {
97  cerr << "## ERROR: Unable to acquire device because another app (pid " << appPID << ") owns it" << endl;
98  return AJA_STATUS_BUSY; // Some other app is using the device
99  }
100  mDevice.ClearRouting(); // Clear the current device routing (since I "own" the device)
101  }
102  mDevice.SetEveryFrameServices(NTV2_OEM_TASKS); // Force OEM tasks
103 
104  // Configure the SDI relays if present
105  if (mDevice.features().HasSDIRelays())
106  {
107  // Note that if the board's jumpers are not set in the position
108  // to enable the watchdog timer, these calls will have no effect.
109  mDevice.SetSDIWatchdogEnable(true, 0); // SDI 1/2
110  mDevice.SetSDIWatchdogEnable(true, 1); // SDI 3/4
111 
112  // Set timeout delay to 2 seconds expressed in multiples of 8 ns
113  // and take the relays out of bypass...
114  mDevice.SetSDIWatchdogTimeout(2 * 125000000);
115  mDevice.KickSDIWatchdog();
116 
117  // Give the mechanical relays some time to switch...
118  AJATime::Sleep(500);
119  }
120 
121  // Make sure the device actually supports custom anc before using it...
122  if (mConfig.WithAnc())
123  mConfig.fWithAnc = mDevice.features().CanDoCustomAnc();
124 
125  // Set up the video and audio...
126  status = SetupVideo();
127  if (AJA_FAILURE(status))
128  return status;
129  status = mConfig.WithAudio() ? SetupAudio() : AJA_STATUS_SUCCESS;
130  if (AJA_FAILURE(status))
131  return status;
132 
133  // Set up the circular buffers...
134  status = SetupHostBuffers();
135  if (AJA_FAILURE(status))
136  return status;
137 
138  // Set up the signal routing...
141 
142  // Lastly, prepare my AJATimeCodeBurn instance...
144  mFormatDesc.numPixels,
145  mFormatDesc.numLines);
146  // Ready to go...
147  if (mConfig.IsVerbose() || sShowConfig)
148  { cerr << mConfig;
149  if (mDevice.IsRemote())
150  cerr << "Device Description: " << mDevice.GetDescription() << endl;
151  cerr << endl;
152  }
153  BURNINFO("Configuration: " << mConfig);
154  return AJA_STATUS_SUCCESS;
155 
156 } // Init
157 
158 
160 {
161  // If no input source specified, choose a default...
163  {
165  if (mConfig.IsVerbose())
166  cout << "## NOTE: Input source was not specified, will use " << mConfig.ISrcStr() << endl;
167  }
168 
169  // Does this device have the requested input source?
170  if (!mDevice.features().CanDoInputSource(mConfig.fInputSource))
171  {cerr << "## ERROR: Device does not have input source " << mConfig.ISrcStr() << endl; return AJA_STATUS_BAD_PARAM;}
172 
173  // The input channel should match the input source...
175  if (mConfig.IsVerbose())
176  cout << "## NOTE: Input FrameStore chosen to be " << mConfig.IChStr() << endl;
177 
178  // Enable/subscribe interrupts...
179  mDevice.EnableInputInterrupt(mConfig.fInputChannel);
183 
184  // Flip the input spigot to "receive" if necessary...
185  bool isXmit (false);
186  if (mDevice.features().HasBiDirectionalSDI() // If device has bidirectional SDI connectors...
187  && mConfig.ISrcIsSDI() // ...and desired input source is SDI...
188  && mDevice.GetSDITransmitEnable (mConfig.fInputChannel, isXmit) // ...and GetSDITransmitEnable succeeds...
189  && isXmit) // ...and input is set to "transmit"...
190  {
191  mDevice.SetSDITransmitEnable (mConfig.fInputChannel, false); // ...then disable transmit mode...
192  mDevice.WaitForOutputVerticalInterrupt (NTV2_CHANNEL1, 10); // ...and give device time to lock to input
193  } // if input SDI connector needs to switch from transmit mode
194 
195  // Is there an input signal? What format is it?
196  mVideoFormat = mDevice.GetInputVideoFormat(mConfig.fInputSource);
197  if (mVideoFormat == NTV2_FORMAT_UNKNOWN)
198  {cerr << "## ERROR: No signal at input " << mConfig.ISrcStr() << endl; return AJA_STATUS_NOINPUT;}
199  if (mConfig.IsVerbose())
200  cout << "## NOTE: Signal at input " << mConfig.ISrcStr() << " is " << ::NTV2VideoFormatToString(mVideoFormat, true) << endl;
201 
202  // Free-run the device clock, since E-to-E mode isn't used, nor is a mixer tied to the input...
204 
205  // Check the timecode source...
207  {
208  const NTV2Channel tcChannel (::NTV2TimecodeIndexToChannel(mConfig.fTimecodeSource));
209  const NTV2Channel endNum (NTV2Channel (mDevice.features().GetNumVideoChannels()));
210  if (tcChannel >= endNum)
211  {cerr << "## ERROR: Timecode source '" << ::NTV2TCIndexToString(mConfig.fTimecodeSource, true) << "' illegal on this device" << endl; return AJA_STATUS_BAD_PARAM;}
212  if (tcChannel == mConfig.fOutputChannel)
213  {cerr << "## ERROR: Timecode source '" << ::NTV2TCIndexToString(mConfig.fTimecodeSource, true) << "' conflicts with output channel" << endl; return AJA_STATUS_BAD_PARAM;}
214  if (mDevice.features().HasBiDirectionalSDI() // If device has bidirectional SDI connectors...
215  && mDevice.GetSDITransmitEnable (tcChannel, isXmit) // ...and GetSDITransmitEnable succeeds...
216  && isXmit) // ...and the SDI timecode source is set to "transmit"...
217  {
218  mDevice.SetSDITransmitEnable (tcChannel, false); // ...then disable transmit mode...
219  mDevice.WaitForInputVerticalInterrupt(tcChannel, 12); // ...and allow device to lock to input signal
220  } // if SDI must switch from transmit to receive
221 
222  // Configure for VITC capture
223  mDevice.SetRP188SourceFilter(tcChannel, 0x01);
224 
225  const NTV2VideoFormat tcInputVideoFormat (mDevice.GetInputVideoFormat (::NTV2TimecodeIndexToInputSource(mConfig.fTimecodeSource)));
226  if (tcInputVideoFormat == NTV2_FORMAT_UNKNOWN)
227  cerr << "## WARNING: Timecode source '" << ::NTV2TCIndexToString(mConfig.fTimecodeSource, true) << "' has no input signal" << endl;
228  if (!InputSignalHasTimecode())
229  cerr << "## WARNING: Timecode source '" << ::NTV2TCIndexToString(mConfig.fTimecodeSource, true) << "' has no embedded timecode" << endl;
230  }
232  cerr << "## WARNING: Timecode source '" << ::NTV2TCIndexToString(mConfig.fTimecodeSource, true) << "' has no embedded timecode" << endl;
233 
234  if (NTV2_IS_ANALOG_TIMECODE_INDEX(mConfig.fTimecodeSource) && mDevice.features().CanDoLTCInOnRefPort())
235  mDevice.SetLTCInputEnable(true); // Enable analog LTC input (some LTC inputs are shared with reference input)
236  mDevice.DisableRP188Bypass (::NTV2InputSourceToChannel(mConfig.fInputSource)); // AutoCirculate will drive timecode output
237 
238  // Final pre-flight checks...
239  if (!mDevice.features().CanDoFrameBufferFormat(mConfig.fPixelFormat))
240  {cerr << "## ERROR: " << ::NTV2FrameBufferFormatToString(mConfig.fPixelFormat) << " unsupported" << endl; return AJA_STATUS_UNSUPPORTED;}
241  if (mFormatDesc.IsPlanar())
242  {cerr << "## ERROR: This demo doesn't work with planar pixel formats" << endl; return AJA_STATUS_UNSUPPORTED;}
243  if (mFormatDesc.IsSD() && mConfig.WithTallVANC() && mConfig.fPixelFormat == NTV2_FBF_8BIT_YCBCR)
244  {cerr << "## ERROR: NTV2_VANCDATA_8BITSHIFT_ENABLE unsupported in firmware for SD video" << endl; return AJA_STATUS_UNSUPPORTED;}
245  if (mConfig.WithTallVANC() && mConfig.fPixelFormat != NTV2_FBF_8BIT_YCBCR && mConfig.fPixelFormat != NTV2_FBF_10BIT_YCBCR)
246  {cerr << "## ERROR: Tall-frame VANC requires NTV2_FBF_8BIT_YCBCR or NTV2_FBF_10BIT_YCBCR pixel format" << endl; return AJA_STATUS_UNSUPPORTED;}
247  if (mConfig.WithTallVANC() && (mFormatDesc.Is4K() || mFormatDesc.Is8K()))
248  {cerr << "## ERROR: Tall-frame VANC unsupported for 4K or 8K video" << endl; return AJA_STATUS_UNSUPPORTED;}
249 
250  // If the device supports different per-channel video formats, configure it as requested...
251  if (mDevice.features().CanDoMultiFormat())
252  mDevice.SetMultiFormatMode(mConfig.fDoMultiFormat);
253 
254  // Get the raster description...
255  mFormatDesc = NTV2FormatDescriptor (mVideoFormat, mConfig.fPixelFormat,
256  mConfig.WithTallVANC() ? NTV2_VANCMODE_TALLER : NTV2_VANCMODE_OFF);
257 
258  // Configure the input FrameStore...
259  mDevice.EnableChannel (mConfig.fInputChannel);
260  mDevice.SetVideoFormat (mVideoFormat, false, false, mDevice.features().CanDoMultiFormat() ? mConfig.fInputChannel : NTV2_CHANNEL1);
261  mDevice.SetFrameBufferFormat (mConfig.fInputChannel, mConfig.fPixelFormat);
262  mDevice.SetVANCMode (mConfig.WithTallVANC() ? NTV2_VANCMODE_TALLER : NTV2_VANCMODE_OFF, mConfig.fInputChannel);
263  mDevice.SetVANCShiftMode (mConfig.fInputChannel, ::Is8BitFrameBufferFormat(mConfig.fPixelFormat) && mConfig.WithTallVANC()
265 
266  // Choose an output channel/FrameStore, and enable it...
267  const UWord numFrameStores (mDevice.features().GetNumFrameStores());
268  switch (mConfig.fInputSource)
269  {
270  case NTV2_INPUTSOURCE_SDI1: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL2 : (numFrameStores == 2 ? NTV2_CHANNEL2 : NTV2_CHANNEL3);
271  break;
272 
274  case NTV2_INPUTSOURCE_SDI2: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL3 : NTV2_CHANNEL4;
275  break;
276 
279  break;
280 
282  case NTV2_INPUTSOURCE_SDI4: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL5 : NTV2_CHANNEL3;
283  break;
284 
285  case NTV2_INPUTSOURCE_SDI5: mConfig.fOutputChannel = NTV2_CHANNEL6; break;
286  case NTV2_INPUTSOURCE_SDI6: mConfig.fOutputChannel = NTV2_CHANNEL7; break;
287  case NTV2_INPUTSOURCE_SDI7: mConfig.fOutputChannel = NTV2_CHANNEL8; break;
288  case NTV2_INPUTSOURCE_SDI8: mConfig.fOutputChannel = NTV2_CHANNEL7; break;
289 
291  case NTV2_INPUTSOURCE_HDMI1: mConfig.fOutputChannel = numFrameStores < 3 ? NTV2_CHANNEL2 : NTV2_CHANNEL3;
292  mAudioSystem = NTV2_AUDIOSYSTEM_2;
293  break;
294  default:
295  case NTV2_INPUTSOURCE_INVALID: cerr << "## ERROR: Bad input source" << endl; return AJA_STATUS_BAD_PARAM;
296  }
297  if (mConfig.IsVerbose())
298  cout << "## NOTE: Output FrameStore chosen to be " << mConfig.OChStr() << endl;
300  {
302  if (NTV2_IS_VALID_CHANNEL(mConfig.ODstCh()))
303  if (mConfig.ODstCh() != mConfig.fOutputChannel)
304  if (mConfig.WithAnc() && !mConfig.WithTallVANC())
305  {
306  const string oldChStr(mConfig.OChStr());
307  mConfig.fOutputChannel = mConfig.ODstCh();
308  if (mConfig.IsVerbose())
309  cout << "## NOTE: Output " << mConfig.ODstStr() << " with Anc forced FrameStore change to "
310  << mConfig.OChStr() << " from " << oldChStr << endl;
311  }
312  }
313  else // else output destination not specified
314  { // Pick an appropriate output spigot based on the output channel...
317  { // If device has only one SDI output
319  if (mConfig.IsVerbose())
320  cout << "## NOTE: Output destination was not specified, will use " << mConfig.ODstStr() << endl;
321  }
322  }
323  if (mDevice.features().HasBiDirectionalSDI() // If device has bidirectional SDI connectors...
324  && mConfig.ODstIsSDI()) // ...and output destination is SDI...
325  mDevice.SetSDITransmitEnable (mConfig.ODstCh(), true); // ...then enable transmit mode
326  if (mConfig.fInputChannel == mConfig.fOutputChannel)
327  {cerr << "## ERROR: Input " << mConfig.IChStr() << " & output " << mConfig.OChStr() << " conflict" << endl; return AJA_STATUS_BAD_PARAM;}
328  if (mDevice.features().HasBiDirectionalSDI() && mConfig.ISrcIsSDI() && mConfig.ODstIsSDI() && mConfig.ISrcCh() == mConfig.ODstCh())
329  {cerr << "## ERROR: SDI conflict: input " << mConfig.ISrcStr() << " & output " << mConfig.ODstStr() << " are same connector" << endl; return AJA_STATUS_BAD_PARAM;}
330 
331  // Configure the output FrameStore...
332  mDevice.EnableChannel(mConfig.fOutputChannel);
333  mDevice.SetVideoFormat (mVideoFormat, false, false, mConfig.fOutputChannel);
334  mDevice.SetFrameBufferFormat (mConfig.fOutputChannel, mConfig.fPixelFormat);
335  mDevice.SetVANCMode (mConfig.WithTallVANC() ? NTV2_VANCMODE_TALLER : NTV2_VANCMODE_OFF, mConfig.fOutputChannel);
336  mDevice.SetVANCShiftMode (mConfig.fOutputChannel, ::Is8BitFrameBufferFormat(mConfig.fPixelFormat) && mConfig.WithTallVANC()
338  return AJA_STATUS_SUCCESS;
339 
340 } // SetupVideo
341 
342 
344 {
345  if (!NTV2_IS_VALID_AUDIO_SYSTEM(mAudioSystem))
346  return AJA_STATUS_SUCCESS;
347 
348  // Have the audio subsystem capture audio from the designated input source...
349  mDevice.SetAudioSystemInputSource (mAudioSystem, ::NTV2InputSourceToAudioSource(mConfig.fInputSource),
351 
352  // It's best to use all available audio channels...
353  mDevice.SetNumberAudioChannels (mDevice.features().GetMaxAudioChannels(), mAudioSystem);
354 
355  // Assume 48kHz PCM...
356  mDevice.SetAudioRate (NTV2_AUDIO_48K, mAudioSystem);
357 
358  // 4MB device audio buffers work best...
359  mDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mAudioSystem);
360 
361  // Set up the output audio embedders...
362  if (mDevice.features().GetNumAudioSystems() > 1)
363  {
364  // Some devices, like the Kona1, have 2 FrameStores but only 1 SDI output,
365  // which makes mConfig.fOutputChannel == NTV2_CHANNEL2, but need SDIoutput to be NTV2_CHANNEL1...
366  UWord SDIoutput(mConfig.fOutputChannel);
367  if (SDIoutput >= mDevice.features().GetNumVideoOutputs())
368  SDIoutput = mDevice.features().GetNumVideoOutputs() - 1;
369  mDevice.SetSDIOutputAudioSystem (NTV2Channel(SDIoutput), mAudioSystem);
370 
371  if (mDevice.features().GetNumHDMIVideoOutputs() > 0)
373  }
374 
375  //
376  // Loopback mode plays whatever audio appears in the input signal when it's
377  // connected directly to an output (i.e., "end-to-end" mode). If loopback is
378  // left enabled, the video will lag the audio as video frames get briefly delayed
379  // in our ring buffer. Audio, therefore, needs to come out of the (buffered) frame
380  // data being played, so loopback must be turned off...
381  //
382  mDevice.SetAudioLoopBack (NTV2_AUDIO_LOOPBACK_OFF, mAudioSystem);
383  return AJA_STATUS_SUCCESS;
384 
385 } // SetupAudio
386 
387 
389 {
390  CNTV2DemoCommon::SetDefaultPageSize(); // Set host-specific page size
391 
392  // Let my circular buffer know when it's time to quit...
393  mFrameDataRing.SetAbortFlag (&mGlobalQuit);
394 
395  // Determine video buffer size...
396  const ULWord vidBuffSizeBytes (mFormatDesc.GetVideoWriteSize(ULWord(NTV2Buffer::DefaultPageSize())));
397 
398  // Determine per-field max Anc buffer size...
399  ULWord ancBuffSizeBytes (0);
400  if (!mDevice.GetAncRegionOffsetFromBottom (ancBuffSizeBytes, NTV2_AncRgn_Field2))
401  ancBuffSizeBytes = NTV2_ANCSIZE_MAX;
402 
403  // Allocate and add each in-host NTV2FrameData to my mFrameDataRing...
404  mHostBuffers.reserve(CIRCULAR_BUFFER_SIZE);
405  while (mHostBuffers.size() < CIRCULAR_BUFFER_SIZE)
406  {
407  mHostBuffers.push_back(NTV2FrameData()); // Make a new NTV2FrameData...
408  NTV2FrameData & frameData (mHostBuffers.back()); // ...and get a reference to it
409 
410  // Allocate a page-aligned video buffer (if handling video)...
411  if (!mConfig.fSuppressVideo)
412  if (!frameData.fVideoBuffer.Allocate (vidBuffSizeBytes, /*pageAligned*/true))
413  {
414  BURNFAIL("Failed to allocate " << xHEX0N(vidBuffSizeBytes,8) << "-byte video buffer");
415  return AJA_STATUS_MEMORY;
416  }
417  #ifdef NTV2_BUFFER_LOCKING
418  if (frameData.fVideoBuffer)
419  mDevice.DMABufferLock(frameData.fVideoBuffer, true);
420  #endif
421 
422  // Allocate a page-aligned audio buffer (if handling audio)...
423  if (NTV2_IS_VALID_AUDIO_SYSTEM(mAudioSystem) && mConfig.WithAudio())
424  if (!frameData.fAudioBuffer.Allocate (NTV2_AUDIOSIZE_MAX, /*pageAligned*/true))
425  {
426  BURNFAIL("Failed to allocate " << xHEX0N(NTV2_AUDIOSIZE_MAX,8) << "-byte audio buffer");
427  return AJA_STATUS_MEMORY;
428  }
429  if (frameData.AudioBuffer())
430  frameData.fAudioBuffer.Fill(ULWord(0));
431 
432  if (mConfig.WithAnc() && !mConfig.WithTallVANC())
433  { // Allocate page-aligned anc buffers...
434  if (!frameData.fAncBuffer.Allocate (ancBuffSizeBytes, /*pageAligned*/true))
435  {
436  BURNFAIL("Failed to allocate " << xHEX0N(ancBuffSizeBytes,8) << "-byte anc buffer");
437  return AJA_STATUS_MEMORY;
438  }
439  if (!::IsProgressivePicture(mVideoFormat))
440  if (!frameData.fAncBuffer2.Allocate(ancBuffSizeBytes, /*pageAligned*/true))
441  {
442  BURNFAIL("Failed to allocate " << xHEX0N(ancBuffSizeBytes,8) << "-byte F2 anc buffer");
443  return AJA_STATUS_MEMORY;
444  }
445  }
446  if (frameData.AncBuffer())
447  frameData.AncBuffer().Fill(ULWord(0));
448  if (frameData.AncBuffer2())
449  frameData.AncBuffer2().Fill(ULWord(0));
450 
451  // Add this NTV2FrameData to the ring...
452  mFrameDataRing.Add(&frameData);
453  } // for each NTV2FrameData
454 
455  return AJA_STATUS_SUCCESS;
456 
457 } // SetupHostBuffers
458 
459 
461 {
462  const NTV2OutputCrosspointID inputOutputXpt (::GetInputSourceOutputXpt(mConfig.fInputSource));
464  const bool isRGB (::IsRGBFormat(mConfig.fPixelFormat));
465 
466  if (isRGB)
467  {
468  // If the frame buffer is configured for RGB pixel format, incoming YUV must be converted.
469  // This routes the video signal from the input through a color space converter before
470  // connecting to the RGB frame buffer...
471  const NTV2InputCrosspointID cscVideoInputXpt (::GetCSCInputXptFromChannel (mConfig.fInputChannel));
472  const NTV2OutputCrosspointID cscOutputXpt (::GetCSCOutputXptFromChannel (mConfig.fInputChannel, false/*isKey*/, true/*isRGB*/));
473 
474  mDevice.Connect (cscVideoInputXpt, inputOutputXpt); // Connect the CSC's video input to the input spigot's output
475  mDevice.Connect (fbInputXpt, cscOutputXpt); // Connect the frame store's input to the CSC's output
476  }
477  else
478  mDevice.Connect (fbInputXpt, inputOutputXpt); // Route the YCbCr signal directly from the input to the frame buffer's input
479 
480 } // RouteInputSignal
481 
482 
484 {
485  const NTV2InputXptID outputInputXpt (::GetOutputDestInputXpt(mConfig.fOutputDest));
487  const bool isRGB (::IsRGBFormat(mConfig.fPixelFormat));
488  NTV2OutputXptID outputXpt (fbOutputXpt);
489 
490  if (isRGB)
491  {
492  const NTV2OutputXptID cscVidOutputXpt (::GetCSCOutputXptFromChannel(mConfig.fOutputChannel)); // Use CSC's YUV video output
493  const NTV2InputXptID cscVidInputXpt (::GetCSCInputXptFromChannel(mConfig.fOutputChannel));
494 
495  mDevice.Connect (cscVidInputXpt, fbOutputXpt); // Connect the CSC's video input to the frame store's output
496  mDevice.Connect (outputInputXpt, cscVidOutputXpt); // Connect the SDI output's input to the CSC's video output
497  outputXpt = cscVidOutputXpt;
498  }
499  else
500  mDevice.Connect (outputInputXpt, outputXpt);
501 
502  mTCOutputs.clear ();
503  mTCOutputs.insert (::NTV2ChannelToTimecodeIndex(mConfig.fOutputChannel));
504 
505  if (!mConfig.fDoMultiFormat)
506  {
507  // Route all SDI outputs to the outputXpt...
508  const NTV2Channel startNum (NTV2_CHANNEL1);
509  const NTV2Channel endNum (NTV2Channel(mDevice.features().GetNumVideoChannels()));
511  NTV2WidgetID outputWidgetID (NTV2_WIDGET_INVALID);
512 
513  for (NTV2Channel chan (startNum); chan < endNum; chan = NTV2Channel (chan + 1))
514  {
515  // this kills vitc capture
516 // mDevice.SetRP188SourceFilter (chan, 0); // Set all SDI spigots to capture embedded LTC (VITC could be an option)
517 
518  if (chan == mConfig.fInputChannel || chan == mConfig.fOutputChannel)
519  continue; // Skip the input & output channel, already routed
520  if (NTV2_IS_VALID_CHANNEL (tcInputChannel) && chan == tcInputChannel)
521  continue; // Skip the timecode input channel
522  if (mDevice.features().HasBiDirectionalSDI())
523  mDevice.SetSDITransmitEnable (chan, true);
524  if (CNTV2SignalRouter::GetWidgetForInput (::GetSDIOutputInputXpt (chan, mDevice.features().CanDoDualLink()), outputWidgetID, mDeviceID))
525  if (mDevice.features().CanDoWidget(outputWidgetID))
526  {
527  mDevice.Connect (::GetSDIOutputInputXpt (chan), outputXpt);
528  mTCOutputs.insert (::NTV2ChannelToTimecodeIndex (chan));
529  mTCOutputs.insert (::NTV2ChannelToTimecodeIndex (chan, true));
530  }
531  } // for each output spigot
532 
533  // If HDMI and/or analog video outputs are available, route them, too...
534  if (mDevice.features().GetNumHDMIVideoOutputs() > 0)
535  mDevice.Connect (NTV2_XptHDMIOutQ1Input, outputXpt); // Route the output signal to the HDMI output
536  if (mDevice.features().CanDoWidget(NTV2_WgtAnalogOut1))
537  mDevice.Connect (NTV2_XptAnalogOutInput, outputXpt); // Route the output signal to the Analog output
538  if (mDevice.features().CanDoWidget(NTV2_WgtSDIMonOut1))
539  mDevice.Connect (::GetSDIOutputInputXpt (NTV2_CHANNEL5), outputXpt); // Route the output signal to the SDI monitor output
540  } // if not multiChannel
541  PLDBG(mTCOutputs.size() << " timecode destination(s): " << mTCOutputs);
542 
543 } // RouteOutputSignal
544 
545 
547 {
548  // Start the playout and capture threads...
549  StartPlayThread();
551  return AJA_STATUS_SUCCESS;
552 
553 } // Run
554 
555 
556 
558 
559 // This is where we will start the play thread
561 {
562  // Create and start the playout thread...
563  mPlayThread.Attach(PlayThreadStatic, this);
565  mPlayThread.Start();
566 
567 } // StartPlayThread
568 
569 
570 // The playout thread function
571 void NTV2Burn::PlayThreadStatic (AJAThread * pThread, void * pContext) // static
572 { (void) pThread;
573  // Grab the NTV2Burn instance pointer from the pContext parameter,
574  // then call its PlayFrames method...
575  NTV2Burn * pApp (reinterpret_cast<NTV2Burn*>(pContext));
576  pApp->PlayFrames();
577 
578 } // PlayThreadStatic
579 
580 
582 {
583  const ULWord acOptions (AUTOCIRCULATE_WITH_RP188
584  | (mConfig.WithAnc() && !mConfig.WithTallVANC() ? AUTOCIRCULATE_WITH_ANC : 0));
585  ULWord goodXfers(0), badXfers(0), starves(0), noRoomWaits(0);
586  AUTOCIRCULATE_TRANSFER outputXferInfo;
587  AUTOCIRCULATE_STATUS outputStatus;
588 
589  // Stop AutoCirculate on this channel, just in case some other app left it running...
590  mDevice.AutoCirculateStop(mConfig.fOutputChannel);
591  mDevice.WaitForOutputVerticalInterrupt(mConfig.fOutputChannel, 4); // Let it stop
592  BURNNOTE("Thread started");
593 
594  // Initialize AutoCirculate...
595  if (!mDevice.AutoCirculateInitForOutput (mConfig.fOutputChannel, mConfig.fOutputFrames.count(), mAudioSystem, acOptions,
596  1 /*numChannels*/, mConfig.fOutputFrames.firstFrame(), mConfig.fOutputFrames.lastFrame()))
597  {BURNFAIL("AutoCirculateInitForOutput failed"); mGlobalQuit = true;}
598  else if (!mConfig.WithVideo())
599  { // Video suppressed --
600  // Clear device frame buffers being AutoCirculated (prevent garbage output frames)
601  NTV2Buffer tmpFrame (mFormatDesc.GetVideoWriteSize());
602  NTV2TestPatternGen blackPatternGen;
603  blackPatternGen.DrawTestPattern (NTV2_TestPatt_Black, mFormatDesc, tmpFrame);
604  mDevice.AutoCirculateGetStatus (mConfig.fOutputChannel, outputStatus);
605  for (uint16_t frmNum(outputStatus.GetStartFrame()); frmNum <= outputStatus.GetEndFrame(); frmNum++)
606  mDevice.DMAWriteFrame(ULWord(frmNum), tmpFrame, mFormatDesc.GetTotalBytes(), mConfig.fOutputChannel);
607  } // else if --novideo
608 
609  while (!mGlobalQuit)
610  {
611  mDevice.AutoCirculateGetStatus (mConfig.fOutputChannel, outputStatus);
612 
613  // Check if there's room for another frame on the card...
614  if (outputStatus.CanAcceptMoreOutputFrames())
615  {
616  // Device has at least one free frame buffer that can be filled.
617  // Wait for the next frame in our ring to become ready to "consume"...
618  NTV2FrameData * pFrameData (mFrameDataRing.StartConsumeNextBuffer());
619  if (!pFrameData)
620  {starves++; continue;} // Producer thread isn't producing frames fast enough
621 
622  // Prepare to transfer this timecode-burned frame to the device for playout.
623  // Set the XferInfo struct's video, audio and anc buffers from playData's buffers...
624  if (pFrameData->VideoBuffer())
625  outputXferInfo.SetVideoBuffer (pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
626  if (pFrameData->AudioBuffer())
627  outputXferInfo.SetAudioBuffer (pFrameData->AudioBuffer(), pFrameData->NumCapturedAudioBytes());
628  if (pFrameData->AncBuffer() || pFrameData->AncBuffer2())
629  outputXferInfo.SetAncBuffers (pFrameData->AncBuffer(), pFrameData->AncBufferSize(), pFrameData->AncBuffer2(), pFrameData->AncBuffer2Size());
630 
631  // Tell AutoCirculate to embed this frame's timecode(s) into the SDI output(s)...
632  outputXferInfo.SetOutputTimeCodes(pFrameData->fTimecodes);
633  PLDBG(pFrameData->fTimecodes);
634 
635  // Transfer the frame to the device for eventual playout...
636  if (mDevice.AutoCirculateTransfer (mConfig.fOutputChannel, outputXferInfo))
637  goodXfers++;
638  else
639  badXfers++;
640 
641  if (goodXfers == 3) // Start AutoCirculate playout once 3 frames are buffered on the device...
642  mDevice.AutoCirculateStart(mConfig.fOutputChannel);
643 
644  // Signal that the frame has been "consumed"...
645  mFrameDataRing.EndConsumeNextBuffer ();
646  continue; // Back to top of while loop
647  } // if CanAcceptMoreOutputFrames
648 
649  // Wait for one or more buffers to become available on the device, which should occur at next VBI...
650  noRoomWaits++;
652  } // loop til quit signaled
653 
654  // Stop AutoCirculate...
655  mDevice.AutoCirculateStop(mConfig.fOutputChannel);
656  BURNNOTE("Thread completed: " << DEC(goodXfers) << " xfers, " << DEC(badXfers) << " failed, "
657  << DEC(starves) << " ring starves, " << DEC(noRoomWaits) << " device starves");
658 } // PlayFrames
659 
660 
662 
663 
664 
666 //
667 // This is where the capture thread gets started
668 //
670 {
671  // Create and start the capture thread...
672  mCaptureThread.Attach(CaptureThreadStatic, this);
673  mCaptureThread.SetPriority(AJA_ThreadPriority_High);
674  mCaptureThread.Start();
675 
676 } // StartCaptureThread
677 
678 
679 //
680 // The static capture thread function
681 //
682 void NTV2Burn::CaptureThreadStatic (AJAThread * pThread, void * pContext) // static
683 { (void) pThread;
684  // Grab the NTV2Burn instance pointer from the pContext parameter,
685  // then call its CaptureFrames method...
686  NTV2Burn * pApp (reinterpret_cast<NTV2Burn*>(pContext));
687  pApp->CaptureFrames();
688 } // CaptureThreadStatic
689 
690 
691 //
692 // Repeatedly captures frames until told to stop
693 //
695 {
696  AUTOCIRCULATE_TRANSFER inputXferInfo;
697  const ULWord acOptions ((mConfig.WithTimecode() ? AUTOCIRCULATE_WITH_RP188 : 0)
698  | (mConfig.WithAnc() && !mConfig.WithTallVANC() ? AUTOCIRCULATE_WITH_ANC : 0));
699  ULWord goodXfers(0), badXfers(0), ringFulls(0), devWaits(0);
700  Bouncer<UWord> yPercent (85/*upperLimit*/, 1/*lowerLimit*/, 1/*startValue*/); // "Bounces" timecode up & down in raster
701  BURNNOTE("Thread started");
702 
703  // Stop AutoCirculate on this channel, just in case some other app left it running...
704  mDevice.AutoCirculateStop(mConfig.fInputChannel);
705 
706  // Initialize AutoCirculate...
707  if (!mDevice.AutoCirculateInitForInput (mConfig.fInputChannel, // channel
708  mConfig.fInputFrames.count(), // numFrames (zero if specifying range)
709  mAudioSystem, // audio system
710  acOptions, // flags
711  1, // frameStores to gang
712  mConfig.fInputFrames.firstFrame(), mConfig.fInputFrames.lastFrame()))
713  {BURNFAIL("AutoCirculateInitForInput failed"); mGlobalQuit = true;}
714  else
715  // Start AutoCirculate running...
716  mDevice.AutoCirculateStart (mConfig.fInputChannel);
717 
718  while (!mGlobalQuit)
719  {
720  AUTOCIRCULATE_STATUS acStatus;
721  mDevice.AutoCirculateGetStatus (mConfig.fInputChannel, acStatus);
722 
723  if (mDevice.features().HasSDIRelays())
724  mDevice.KickSDIWatchdog(); // Prevent watchdog from timing out and putting the relays into bypass mode
725 
726  if (acStatus.IsRunning() && acStatus.HasAvailableInputFrame())
727  {
728  // At this point, there's at least one fully-formed frame available in the device's frame buffer
729  // memory waiting to be transferred to the host. Reserve an NTV2FrameData to fill ("produce"),
730  // and use it in the next frame transferred from the device...
731  NTV2FrameData * pFrameData (mFrameDataRing.StartProduceNextBuffer ());
732  if (!pFrameData)
733  {ringFulls++; continue;} // Ring full -- consumer thread isn't consuming frames fast enough
734 
735  if (pFrameData->VideoBuffer())
736  inputXferInfo.SetVideoBuffer (pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
737  if (pFrameData->AudioBuffer())
738  inputXferInfo.SetAudioBuffer (pFrameData->AudioBuffer(), pFrameData->AudioBufferSize());
739  if (pFrameData->AncBuffer() || pFrameData->AncBuffer2())
740  inputXferInfo.SetAncBuffers (pFrameData->AncBuffer(), pFrameData->AncBufferSize(), pFrameData->AncBuffer2(), pFrameData->AncBuffer2Size());
741 
742  // Transfer the frame from the device into our host buffers...
743  if (mDevice.AutoCirculateTransfer (mConfig.fInputChannel, inputXferInfo)) goodXfers++;
744  else badXfers++;
745 
746  // Remember the amount, in bytes, of captured audio & anc data...
747  pFrameData->fNumAudioBytes = pFrameData->AudioBuffer() ? inputXferInfo.GetCapturedAudioByteCount() : 0;
748  pFrameData->fNumAncBytes = pFrameData->AncBuffer() ? inputXferInfo.GetCapturedAncByteCount(false/*F1*/): 0;
749  pFrameData->fNumAnc2Bytes = pFrameData->AncBuffer2() ? inputXferInfo.GetCapturedAncByteCount(true/*F2*/) : 0;
750  if (pFrameData->AncBuffer())
751  { // Zero F1 anc buffer memory past last byte written by anc extractor
752  NTV2Buffer stale (pFrameData->fAncBuffer.GetHostAddress(pFrameData->fNumAncBytes),
753  pFrameData->fAncBuffer.GetByteCount() - pFrameData->fNumAncBytes);
754  stale.Fill(uint8_t(0));
755  }
756  if (pFrameData->AncBuffer2())
757  { // Zero F2 anc buffer memory past last byte written by anc extractor
758  NTV2Buffer stale (pFrameData->AncBuffer2().GetHostAddress(pFrameData->fNumAnc2Bytes),
759  pFrameData->AncBuffer2().GetByteCount() - pFrameData->fNumAnc2Bytes);
760  stale.Fill(uint8_t(0));
761  }
762 
763  if (pFrameData->AncBuffer() && !mConfig.WithHanc())
764  AJAAncList::StripNativeInserterGUMPPackets (pFrameData->AncBuffer(), pFrameData->AncBuffer());
765  if (pFrameData->AncBuffer2() && !mConfig.WithHanc())
767 
768  // Determine which timecode value should be burned in to the video frame
769  string timeCodeString;
770  NTV2_RP188 timecodeValue;
772  {
773  // Use the embedded input time code...
774  mDevice.GetRP188Data (mConfig.fInputChannel, timecodeValue);
775  CRP188 inputRP188Info (timecodeValue);
776  inputRP188Info.GetRP188Str(timeCodeString);
777  }
779  {
780  // Use the analog input time code...
781  mDevice.ReadAnalogLTCInput (mConfig.fTimecodeSource == NTV2_TCINDEX_LTC1 ? 0 : 1, timecodeValue);
782  CRP188 analogRP188Info (timecodeValue);
783  analogRP188Info.GetRP188Str(timeCodeString);
784  }
785  else
786  {
787  // Invent a timecode (based on the number of frames procesed)...
788  const NTV2FrameRate ntv2FrameRate (GetNTV2FrameRateFromVideoFormat (mVideoFormat));
789  const TimecodeFormat tcFormat (CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat(ntv2FrameRate));
790  const CRP188 frameRP188Info (inputXferInfo.GetTransferStatus().GetProcessedFrameCount(), 0, 0, 10, tcFormat);
791 
792  frameRP188Info.GetRP188Reg(timecodeValue);
793  frameRP188Info.GetRP188Str(timeCodeString);
794  }
795 
796  // Get a timecode to use for burn-in...
797  NTV2_RP188 thisFrameTC;
798  inputXferInfo.GetInputTimeCodes (pFrameData->fTimecodes, mConfig.fInputChannel);
799  if (pFrameData->HasValidTimecode(mConfig.fTimecodeSource))
800  {
801  thisFrameTC = pFrameData->fTimecodes[mConfig.fTimecodeSource];
802  }
803  else
804  { // Invent a timecode (based on frame count)...
805  const NTV2FrameRate ntv2FrameRate (::GetNTV2FrameRateFromVideoFormat (mVideoFormat));
806  const TimecodeFormat tcFormat (CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat(ntv2FrameRate));
807  const CRP188 inventedTC (inputXferInfo.GetTransferStatus().GetProcessedFrameCount(), 0, 0, 10, tcFormat);
808  inventedTC.GetRP188Reg(thisFrameTC);
809  }
810 
811  // While this NTV2FrameData's buffers are locked, "burn" timecode into the raster...
812  NTV2Buffer visibleRgn (mFormatDesc.GetTopVisibleRowAddress(pFrameData->VideoBuffer()),
813  mFormatDesc.GetVisibleRasterBytes());
814  mTCBurner.BurnTimeCode (visibleRgn, timeCodeString.c_str(), yPercent.Next());
815 
816  // Signal that we're done "producing" this frame, making it available for future "consumption"...
817  mFrameDataRing.EndProduceNextBuffer();
818  } // if A/C running and frame(s) are available for transfer
819  else
820  {
821  // Either AutoCirculate is not running, or there were no frames available on the device to transfer.
822  // Rather than waste CPU cycles spinning, waiting until a frame becomes available, it's far more
823  // efficient to wait for the next input vertical interrupt event to get signaled...
824  devWaits++;
825  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
826  }
827  } // loop til quit signaled
828 
829  // Stop AutoCirculate...
830  mDevice.AutoCirculateStop (mConfig.fInputChannel);
831  BURNNOTE("Thread completed: " << DEC(goodXfers) << " xfers, " << DEC(badXfers) << " failed, "
832  << DEC(ringFulls) << " ring full(s), " << DEC(devWaits) << " device waits");
833 
834 } // CaptureFrames
835 
836 
838 
839 
840 void NTV2Burn::GetStatus (AUTOCIRCULATE_STATUS & outInputStatus, AUTOCIRCULATE_STATUS & outOutputStatus)
841 {
842  mDevice.AutoCirculateGetStatus (mConfig.fInputChannel, outInputStatus);
843  mDevice.AutoCirculateGetStatus (mConfig.fOutputChannel, outOutputStatus);
844 
845 } // GetStatus
846 
847 
848 static ULWord GetRP188RegisterForInput (const NTV2InputSource inInputSource)
849 {
850  switch (inInputSource)
851  {
852  case NTV2_INPUTSOURCE_SDI1: return kRegRP188InOut1DBB; // reg 29
853  case NTV2_INPUTSOURCE_SDI2: return kRegRP188InOut2DBB; // reg 64
854  case NTV2_INPUTSOURCE_SDI3: return kRegRP188InOut3DBB; // reg 268
855  case NTV2_INPUTSOURCE_SDI4: return kRegRP188InOut4DBB; // reg 273
856  case NTV2_INPUTSOURCE_SDI5: return kRegRP188InOut5DBB; // reg 342
857  case NTV2_INPUTSOURCE_SDI6: return kRegRP188InOut6DBB; // reg 418
858  case NTV2_INPUTSOURCE_SDI7: return kRegRP188InOut7DBB; // reg 427
859  case NTV2_INPUTSOURCE_SDI8: return kRegRP188InOut8DBB; // reg 436
860  default: return 0;
861  } // switch on input source
862 
863 } // GetRP188RegisterForInput
864 
865 
867 {
868  const ULWord regNum (::GetRP188RegisterForInput(mConfig.fInputSource));
869  ULWord regValue(0);
870 
871  // Bit 16 of the RP188 DBB register will be set if there is timecode embedded in the input signal...
872  return regNum && mDevice.ReadRegister(regNum, regValue) && regValue & BIT(16);
873 
874 } // InputSignalHasTimecode
875 
876 
878 {
880  return false;
882  bool result(false);
883  mDevice.driverInterface().ReadRegister(kRegLTCStatusControl, result, regMask);
884  return result;
885 
886 } // AnalogLTCInputHasTimecode
NTV2TestPatternGen::DrawTestPattern
virtual bool DrawTestPattern(const std::string &inTPName, const NTV2FormatDescriptor &inFormatDesc, NTV2Buffer &inBuffer)
Renders the given test pattern or color into a host raster buffer.
CNTV2Card::SubscribeOutputVerticalEvent
virtual bool SubscribeOutputVerticalEvent(const NTV2Channel inChannel)
Causes me to be notified when an output vertical blanking interrupt is generated for the given output...
Definition: ntv2subscriptions.cpp:25
CNTV2Card::SetVANCMode
virtual bool SetVANCMode(const NTV2VANCMode inVancMode, const NTV2Channel inChannel=NTV2_CHANNEL1)
Sets the VANC mode for the given FrameStore.
Definition: ntv2register.cpp:2640
GetRP188RegisterForInput
static ULWord GetRP188RegisterForInput(const NTV2InputSource inInputSource)
Definition: ntv2burn.cpp:848
NTV2TimecodeIndexToChannel
NTV2Channel NTV2TimecodeIndexToChannel(const NTV2TCIndex inTCIndex)
Converts the given NTV2TCIndex value into the appropriate NTV2Channel value.
Definition: ntv2utils.cpp:5039
CNTV2Card::SetMultiFormatMode
virtual bool SetMultiFormatMode(const bool inEnable)
Enables or disables multi-format (per channel) device operation. If enabled, each device channel can ...
Definition: ntv2register.cpp:4379
NTV2_INPUTSOURCE_SDI4
@ NTV2_INPUTSOURCE_SDI4
Identifies the 4th SDI video input.
Definition: ntv2enums.h:1254
GetSDIOutputInputXpt
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inSDIOutput, const bool inIsDS2=false)
Definition: ntv2signalrouter.cpp:942
NTV2ChannelToInputSource
NTV2InputSource NTV2ChannelToInputSource(const NTV2Channel inChannel, const NTV2IOKinds inKinds=NTV2_IOKINDS_SDI)
Definition: ntv2utils.cpp:5192
BurnConfig::OChStr
std::string OChStr(void) const
Definition: ntv2democommon.h:447
NTV2InputSourceToChannel
NTV2Channel NTV2InputSourceToChannel(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2Channel value.
Definition: ntv2utils.cpp:5107
AUTOCIRCULATE_TRANSFER::GetTransferStatus
const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus(void) const
Returns a constant reference to my AUTOCIRCULATE_TRANSFER_STATUS.
Definition: ntv2publicinterface.h:8357
NTV2_IOKINDS_HDMI
@ NTV2_IOKINDS_HDMI
Specifies HDMI input/output kinds.
Definition: ntv2enums.h:1275
NTV2_IS_SDI_TIMECODE_INDEX
#define NTV2_IS_SDI_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3950
NTV2_AUDIO_LOOPBACK_OFF
@ NTV2_AUDIO_LOOPBACK_OFF
Embeds silence (zeroes) into the data stream.
Definition: ntv2enums.h:2005
NTV2FormatDescriptor::GetVideoWriteSize
ULWord GetVideoWriteSize(ULWord inPageSize=4096UL) const
Definition: ntv2formatdescriptor.cpp:866
CNTV2Card::GetAncRegionOffsetFromBottom
virtual bool GetAncRegionOffsetFromBottom(ULWord &outByteOffsetFromBottom, const NTV2AncillaryDataRegion inAncRegion=NTV2_AncRgn_All)
Answers with the byte offset to the start of an ancillary data region within a device frame buffer,...
Definition: ntv2dma.cpp:601
NTV2_CHANNEL8
@ NTV2_CHANNEL8
Specifies channel or Frame Store 8 (or the 8th item).
Definition: ntv2enums.h:1343
DEVICE_ID_KONAHDMI
@ DEVICE_ID_KONAHDMI
See KONA HDMI.
Definition: ntv2enums.h:66
AUTOCIRCULATE_TRANSFER::GetCapturedAudioByteCount
ULWord GetCapturedAudioByteCount(void) const
Definition: ntv2publicinterface.h:8369
kRegRP188InOut3DBB
@ kRegRP188InOut3DBB
Definition: ntv2publicinterface.h:391
NTV2_INPUTSOURCE_SDI6
@ NTV2_INPUTSOURCE_SDI6
Identifies the 6th SDI video input.
Definition: ntv2enums.h:1256
BurnConfig::ISrcIsSDI
bool ISrcIsSDI(void) const
Definition: ntv2democommon.h:443
NTV2_WgtSDIOut2
@ NTV2_WgtSDIOut2
Definition: ntv2enums.h:2897
BurnConfig::ISrcStr
std::string ISrcStr(void) const
Definition: ntv2democommon.h:441
NTV2_IS_VALID_TASK_MODE
#define NTV2_IS_VALID_TASK_MODE(__m__)
Definition: ntv2publicinterface.h:4296
NTV2Burn::Init
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2burn.cpp:72
NTV2_FOURCC
#define NTV2_FOURCC(_a_, _b_, _c_, _d_)
Definition: ntv2publicinterface.h:5444
NTV2_CHANNEL2
@ NTV2_CHANNEL2
Specifies channel or Frame Store 2 (or the 2nd item).
Definition: ntv2enums.h:1337
NTV2_VANCDATA_NORMAL
@ NTV2_VANCDATA_NORMAL
Definition: ntv2enums.h:3768
AJA_ThreadPriority_High
@ AJA_ThreadPriority_High
Definition: thread.h:44
NTV2ACFrameRange::firstFrame
UWord firstFrame(void) const
Definition: ntv2utils.h:983
CNTV2Card::KickSDIWatchdog
virtual bool KickSDIWatchdog(void)
Restarts the countdown timer to prevent the watchdog timer from timing out.
Definition: ntv2register.cpp:4045
NTV2_WgtSDIMonOut1
@ NTV2_WgtSDIMonOut1
Definition: ntv2enums.h:2940
CNTV2Card::SetVideoFormat
virtual bool SetVideoFormat(const NTV2VideoFormat inVideoFormat, const bool inIsAJARetail=(!(0)), const bool inKeepVancSettings=(0), const NTV2Channel inChannel=NTV2_CHANNEL1)
Configures the AJA device to handle a specific video format.
Definition: ntv2register.cpp:204
AUTOCIRCULATE_TRANSFER_STATUS::GetProcessedFrameCount
ULWord GetProcessedFrameCount(void) const
Definition: ntv2publicinterface.h:7956
AJATimeCodeBurn::RenderTimeCodeFont
AJA_EXPORT bool RenderTimeCodeFont(AJA_PixelFormat pixelFormat, uint32_t numPixels, uint32_t numLines)
Definition: timecodeburn.cpp:447
CNTV2Card::SetSDIWatchdogEnable
virtual bool SetSDIWatchdogEnable(const bool inEnable, const UWord inIndex0)
Sets the connector pair relays to be under watchdog timer control or manual control.
Definition: ntv2register.cpp:4127
NTV2_AUDIO_BUFFER_BIG
@ NTV2_AUDIO_BUFFER_BIG
Definition: ntv2enums.h:1894
CNTV2MacDriverInterface::ReadRegister
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device....
Definition: ntv2macdriverinterface.cpp:389
NTV2FormatDescriptor
Describes a video frame for a given video standard or format and pixel format, including the total nu...
Definition: ntv2formatdescriptor.h:41
types.h
Declares common types used in the ajabase library.
NTV2FrameData
I encapsulate the video, audio and anc host buffers used in the AutoCirculate demos....
Definition: ntv2democommon.h:79
AUTOCIRCULATE_TRANSFER::SetAudioBuffer
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2737
Is8BitFrameBufferFormat
bool Is8BitFrameBufferFormat(const NTV2FrameBufferFormat fbFormat)
Definition: ntv2utils.cpp:5512
CRP188::GetRP188Reg
bool GetRP188Reg(RP188_STRUCT &outRP188) const
Definition: ntv2rp188.cpp:1241
NTV2_INPUTSOURCE_SDI7
@ NTV2_INPUTSOURCE_SDI7
Identifies the 7th SDI video input.
Definition: ntv2enums.h:1257
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1334
NTV2FrameData::fNumAncBytes
ULWord fNumAncBytes
Actual number of captured F1 anc bytes.
Definition: ntv2democommon.h:89
NTV2Buffer
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
Definition: ntv2publicinterface.h:6022
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:381
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6096
NTV2Burn::RouteOutputSignal
virtual void RouteOutputSignal(void)
Sets up board routing for playout.
Definition: ntv2burn.cpp:483
GetNTV2FrameRateFromVideoFormat
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:3530
AJAThread::Attach
virtual AJAStatus Attach(AJAThreadFunction *pThreadFunction, void *pUserContext)
Definition: thread.cpp:169
CNTV2Card::WaitForInputVerticalInterrupt
virtual bool WaitForInputVerticalInterrupt(const NTV2Channel inChannel=NTV2_CHANNEL1, UWord inRepeatCount=1)
Efficiently sleeps the calling thread/process until the next one or more field (interlaced video) or ...
Definition: ntv2subscriptions.cpp:149
CNTV2Card::EnableInputInterrupt
virtual bool EnableInputInterrupt(const NTV2Channel channel=NTV2_CHANNEL1)
Allows the CNTV2Card instance to wait for and respond to input vertical blanking interrupts originati...
Definition: ntv2interrupts.cpp:23
NTV2_AUDIO_48K
@ NTV2_AUDIO_48K
Definition: ntv2enums.h:1905
NTV2FrameData::AncBuffer2
NTV2Buffer & AncBuffer2(void)
Definition: ntv2democommon.h:117
CNTV2Card::ReadAnalogLTCInput
virtual bool ReadAnalogLTCInput(const UWord inLTCInput, RP188_STRUCT &outRP188Data)
Reads the current contents of the device's analog LTC input registers.
Definition: ntv2register.cpp:3695
systemtime.h
Declares the AJATime class.
BurnConfig::fOutputDest
NTV2OutputDest fOutputDest
The device output connector to use (NTV2_OUTPUTDESTINATION_INVALID means unspecified)
Definition: ntv2democommon.h:393
AJATimeCodeBurn::BurnTimeCode
AJA_EXPORT bool BurnTimeCode(void *pBaseVideoAddress, const std::string &inTimeCodeStr, const uint32_t inYPercent)
Definition: timecodeburn.cpp:45
ancillarylist.h
Declares the AJAAncillaryList class.
AJA_STATUS_BUSY
@ AJA_STATUS_BUSY
Definition: types.h:391
NTV2FormatDescriptor::GetTopVisibleRowAddress
UByte * GetTopVisibleRowAddress(UByte *pInStartAddress) const
Definition: ntv2formatdescriptor.h:236
CNTV2DeviceScanner::GetFirstDeviceFromArgument
static bool GetFirstDeviceFromArgument(const std::string &inArgument, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the AJA device that matches a command li...
Definition: ntv2devicescanner.cpp:374
BurnConfig::fDoMultiFormat
bool fDoMultiFormat
If true, enables device-sharing; otherwise takes exclusive control of the device.
Definition: ntv2democommon.h:398
BurnConfig::fTimecodeSource
NTV2TCIndex fTimecodeSource
Timecode source to use.
Definition: ntv2democommon.h:397
NTV2FormatDescriptor::GetVisibleRasterBytes
ULWord GetVisibleRasterBytes(const UWord inPlaneIndex0=0) const
Definition: ntv2formatdescriptor.h:140
AJACircularBuffer::StartConsumeNextBuffer
FrameDataPtr StartConsumeNextBuffer(void)
The thread that's responsible for processing incoming frames – the consumer – calls this function to ...
Definition: circularbuffer.h:153
NTV2Burn::CaptureThreadStatic
static void CaptureThreadStatic(AJAThread *pThread, void *pContext)
This is the capture thread's static callback function that gets called when the capture thread runs....
Definition: ntv2burn.cpp:682
NTV2InputSourceToEmbeddedAudioInput
NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value.
Definition: ntv2utils.cpp:4937
NTV2ACFrameRange::count
UWord count(void) const
Definition: ntv2utils.h:982
ntv2testpatterngen.h
Declares the NTV2TestPatternGen class.
GetFrameBufferInputXptFromChannel
NTV2InputXptID GetFrameBufferInputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsBInput=false)
Definition: ntv2signalrouter.cpp:762
NTV2Burn::StartCaptureThread
virtual void StartCaptureThread(void)
Starts my capture thread.
Definition: ntv2burn.cpp:669
CNTV2Card::ClearRouting
virtual bool ClearRouting(void)
Removes all existing signal path connections between any and all widgets on the AJA device.
Definition: ntv2regroute.cpp:278
CNTV2Card::AutoCirculateInitForInput
virtual bool AutoCirculateInitForInput(const NTV2Channel inChannel, const UWord inFrameCount=7, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_INVALID, const ULWord inOptionFlags=0, const UByte inNumChannels=1, const UWord inStartFrameNumber=0, const UWord inEndFrameNumber=0)
Prepares for subsequent AutoCirculate ingest, designating a contiguous block of frame buffers on the ...
Definition: ntv2autocirculate.cpp:221
CNTV2MacDriverInterface::ReleaseStreamForApplication
virtual bool ReleaseStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Releases exclusive use of the AJA device for the given process, permitting other processes to acquire...
Definition: ntv2macdriverinterface.cpp:516
NTV2_WIDGET_INVALID
@ NTV2_WIDGET_INVALID
Definition: ntv2enums.h:2999
NTV2_AncRgn_Field2
@ NTV2_AncRgn_Field2
Identifies the "normal" Field 2 ancillary data region.
Definition: ntv2enums.h:4182
kRegRP188InOut5DBB
@ kRegRP188InOut5DBB
Definition: ntv2publicinterface.h:479
NTV2FrameData::fAncBuffer2
NTV2Buffer fAncBuffer2
Additional "F2" host anc buffer.
Definition: ntv2democommon.h:86
AJA_STATUS_MEMORY
@ AJA_STATUS_MEMORY
Definition: types.h:397
AJACircularBuffer::EndProduceNextBuffer
void EndProduceNextBuffer(void)
The producer thread calls this function to signal that it has finished populating the frame it obtain...
Definition: circularbuffer.h:259
kRegMaskLTC2InPresent
@ kRegMaskLTC2InPresent
Definition: ntv2publicinterface.h:1884
NTV2Buffer::Allocate
bool Allocate(const size_t inByteCount, const bool inPageAligned=false)
Allocates (or re-allocates) my user-space storage using the given byte count. I assume full responsib...
Definition: ntv2publicinterface.cpp:1647
BurnConfig::ODstStr
std::string ODstStr(void) const
Definition: ntv2democommon.h:444
NTV2_IS_VALID_OUTPUT_DEST
#define NTV2_IS_VALID_OUTPUT_DEST(_dest_)
Definition: ntv2enums.h:1324
BurnConfig::fSuppressVideo
bool fSuppressVideo
If true, suppress video; otherwise include video.
Definition: ntv2democommon.h:400
NTV2InputXptID
enum NTV2InputCrosspointID NTV2InputXptID
AUTOCIRCULATE_TRANSFER::SetAncBuffers
bool SetAncBuffers(ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my ancillary data buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2745
NTV2FrameData::fAncBuffer
NTV2Buffer fAncBuffer
Host ancillary data buffer.
Definition: ntv2democommon.h:85
TimecodeFormat
TimecodeFormat
Definition: ntv2rp188.h:27
CNTV2Card::SetAudioLoopBack
virtual bool SetAudioLoopBack(const NTV2AudioLoopBack inMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Enables or disables NTV2AudioLoopBack mode for the given NTV2AudioSystem.
Definition: ntv2audio.cpp:300
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or Frame Store 1 (or the first item).
Definition: ntv2enums.h:1336
CNTV2Card::SetFrameBufferFormat
virtual bool SetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat inNewFormat, bool inIsAJARetail=(!(0)), NTV2HDRXferChars inXferChars=NTV2_VPID_TC_SDR_TV, NTV2HDRColorimetry inColorimetry=NTV2_VPID_Color_Rec709, NTV2HDRLuminance inLuminance=NTV2_VPID_Luminance_YCbCr)
Sets the frame buffer format for the given FrameStore on the AJA device.
Definition: ntv2register.cpp:1812
CNTV2Card::SetSDITransmitEnable
virtual bool SetSDITransmitEnable(const NTV2Channel inChannel, const bool inEnable)
Sets the specified bidirectional SDI connector to act as an input or an output.
Definition: ntv2register.cpp:3796
NTV2ChannelToOutputDestination
NTV2OutputDestination NTV2ChannelToOutputDestination(const NTV2Channel inChannel, const NTV2IOKinds inKinds=NTV2_IOKINDS_SDI)
Converts the given NTV2Channel value into its ordinary equivalent NTV2OutputDestination.
Definition: ntv2utils.cpp:5227
CNTV2Card::GetSDITransmitEnable
virtual bool GetSDITransmitEnable(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the specified SDI connector is currently acting as a transmitter (i....
Definition: ntv2register.cpp:3817
CNTV2Card::SetVANCShiftMode
virtual bool SetVANCShiftMode(NTV2Channel inChannel, NTV2VANCDataShiftMode inMode)
Enables or disables the "VANC Shift Mode" feature for the given channel.
Definition: ntv2register.cpp:2800
AUTOCIRCULATE_STATUS::CanAcceptMoreOutputFrames
bool CanAcceptMoreOutputFrames(void) const
Definition: ntv2publicinterface.h:7264
NTV2_FIELD0
@ NTV2_FIELD0
Identifies the first field in time for an interlaced video frame, or the first and only field in a pr...
Definition: ntv2enums.h:1817
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
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:399
NTV2_INPUTSOURCE_HDMI3
@ NTV2_INPUTSOURCE_HDMI3
Identifies the 3rd HDMI video input.
Definition: ntv2enums.h:1249
NTV2Burn::StartPlayThread
virtual void StartPlayThread(void)
Starts my playout thread.
Definition: ntv2burn.cpp:560
NTV2_CHANNEL_INVALID
@ NTV2_CHANNEL_INVALID
Definition: ntv2enums.h:1345
NTV2_CHANNEL6
@ NTV2_CHANNEL6
Specifies channel or Frame Store 6 (or the 6th item).
Definition: ntv2enums.h:1341
kRegMaskLTC1InPresent
@ kRegMaskLTC1InPresent
Definition: ntv2publicinterface.h:1882
NTV2InputSourceToAudioSystem
NTV2AudioSystem NTV2InputSourceToAudioSystem(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2AudioSystem value.
Definition: ntv2utils.cpp:5131
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
NTV2FrameData::VideoBuffer
NTV2Buffer & VideoBuffer(void)
Definition: ntv2democommon.h:106
IsProgressivePicture
bool IsProgressivePicture(const NTV2VideoFormat format)
Definition: ntv2utils.cpp:5451
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
NTV2_CHANNEL4
@ NTV2_CHANNEL4
Specifies channel or Frame Store 4 (or the 4th item).
Definition: ntv2enums.h:1339
CNTV2Card::EnableOutputInterrupt
virtual bool EnableOutputInterrupt(const NTV2Channel channel=NTV2_CHANNEL1)
Allows the CNTV2Card instance to wait for and respond to output vertical blanking interrupts originat...
Definition: ntv2interrupts.cpp:22
GetOutputDestInputXpt
NTV2InputXptID GetOutputDestInputXpt(const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2=false, const UWord inHDMI_Quadrant=99)
Definition: ntv2signalrouter.cpp:928
BurnConfig::ODstCh
NTV2Channel ODstCh(void) const
Definition: ntv2democommon.h:445
BurnConfig::fPixelFormat
NTV2PixelFormat fPixelFormat
The pixel format to use.
Definition: ntv2democommon.h:396
NTV2Burn::CaptureFrames
virtual void CaptureFrames(void)
Repeatedly captures frames using AutoCirculate (until global quit flag set).
Definition: ntv2burn.cpp:694
NTV2_CHANNEL5
@ NTV2_CHANNEL5
Specifies channel or Frame Store 5 (or the 5th item).
Definition: ntv2enums.h:1340
CNTV2DriverInterface::ReadRegister
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device....
Definition: ntv2driverinterface.cpp:429
NTV2Burn::GetStatus
virtual void GetStatus(AUTOCIRCULATE_STATUS &outInputStatus, AUTOCIRCULATE_STATUS &outOutputStatus)
Provides status information about my input (capture) and output (playout) processes.
Definition: ntv2burn.cpp:840
CNTV2Card::features
virtual class DeviceCapabilities & features(void)
Definition: ntv2card.h:141
BurnConfig::fOutputFrames
NTV2ACFrameRange fOutputFrames
Playout frame count or range.
Definition: ntv2democommon.h:395
NTV2_INPUTSOURCE_ANALOG1
@ NTV2_INPUTSOURCE_ANALOG1
Identifies the first analog video input.
Definition: ntv2enums.h:1246
AJAThread
Definition: thread.h:69
AUTOCIRCULATE_WITH_ANC
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
Definition: ntv2publicinterface.h:5528
AJAThread::Active
virtual bool Active()
Definition: thread.cpp:116
NTV2_INPUTSOURCE_SDI1
@ NTV2_INPUTSOURCE_SDI1
Identifies the 1st SDI video input.
Definition: ntv2enums.h:1251
NTV2_IS_ANALOG_TIMECODE_INDEX
#define NTV2_IS_ANALOG_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3939
NTV2_IOKINDS_SDI
@ NTV2_IOKINDS_SDI
Specifies SDI input/output kinds.
Definition: ntv2enums.h:1274
AJA_STATUS_NOINPUT
@ AJA_STATUS_NOINPUT
Definition: types.h:400
AJAStatus
AJAStatus
Definition: types.h:378
sShowConfig
static const bool sShowConfig((0))
NTV2Buffer::DefaultPageSize
static size_t DefaultPageSize(void)
Definition: ntv2publicinterface.cpp:2028
NTV2Burn::NTV2Burn
NTV2Burn(const BurnConfig &inConfig)
Constructs me using the given configuration settings.
Definition: ntv2burn.cpp:32
NTV2_OUTPUTDESTINATION_SDI1
@ NTV2_OUTPUTDESTINATION_SDI1
Definition: ntv2enums.h:1305
NTV2FormatDescriptor::numPixels
ULWord numPixels
Width – total number of pixels per line.
Definition: ntv2formatdescriptor.h:355
CNTV2Card::GetRP188Data
virtual bool GetRP188Data(const NTV2Channel inSDIInput, NTV2_RP188 &outRP188Data)
Reads the raw RP188 data from the DBB/Low/Hi registers for the given SDI input. On newer devices with...
Definition: ntv2register.cpp:2510
process.h
Declares the AJAProcess class.
CNTV2Card::SetRP188SourceFilter
virtual bool SetRP188SourceFilter(const NTV2Channel inSDIInput, const UWord inFilterValue)
Sets the RP188 DBB filter for the given SDI input.
Definition: ntv2register.cpp:2533
NTV2_Wgt3GSDIOut2
@ NTV2_Wgt3GSDIOut2
Definition: ntv2enums.h:2901
NTV2TCIndexToString
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6441
AJATime::Sleep
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
Definition: systemtime.cpp:284
AJACircularBuffer::Add
AJAStatus Add(FrameDataPtr pInFrameData)
Appends a new frame buffer to me, increasing my frame storage capacity by one frame.
Definition: circularbuffer.h:92
NTV2_AUDIOSYSTEM_2
@ NTV2_AUDIOSYSTEM_2
This identifies the 2nd Audio System.
Definition: ntv2enums.h:3851
NTV2_VANCMODE_OFF
@ NTV2_VANCMODE_OFF
This identifies the mode in which there are no VANC lines in the frame buffer.
Definition: ntv2enums.h:3752
BURNFAIL
#define BURNFAIL(_expr_)
Definition: ntv2democommon.h:40
CNTV2Card::SetSDIOutputAudioSystem
virtual bool SetSDIOutputAudioSystem(const NTV2Channel inSDIOutputConnector, const NTV2AudioSystem inAudioSystem)
Sets the device's NTV2AudioSystem that will provide audio for the given SDI output's audio embedder....
Definition: ntv2register.cpp:3949
AJA_STATUS_FEATURE
@ AJA_STATUS_FEATURE
Definition: types.h:393
NTV2FrameData::HasValidTimecode
bool HasValidTimecode(const NTV2TCIndex inTCNdx) const
Definition: ntv2democommon.h:129
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
NTV2FrameData::NumCapturedAudioBytes
ULWord NumCapturedAudioBytes(void) const
Definition: ntv2democommon.h:111
NTV2_VANCDATA_8BITSHIFT_ENABLE
@ NTV2_VANCDATA_8BITSHIFT_ENABLE
Definition: ntv2enums.h:3770
kRegRP188InOut2DBB
@ kRegRP188InOut2DBB
Definition: ntv2publicinterface.h:167
CNTV2Card::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2card.cpp:124
NTV2FrameData::fVideoBuffer
NTV2Buffer fVideoBuffer
Host video buffer.
Definition: ntv2democommon.h:82
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7193
ntv2devicescanner.h
Declares the CNTV2DeviceScanner class.
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or Frame Store 7 (or the 7th item).
Definition: ntv2enums.h:1342
NTV2FrameData::VideoBufferSize
ULWord VideoBufferSize(void) const
Definition: ntv2democommon.h:107
NTV2FormatDescriptor::numLines
ULWord numLines
Height – total number of lines.
Definition: ntv2formatdescriptor.h:354
NTV2FormatDescriptor::GetTotalBytes
ULWord GetTotalBytes(void) const
Definition: ntv2formatdescriptor.cpp:855
CNTV2MacDriverInterface::GetStreamingApplication
virtual bool GetStreamingApplication(ULWord &outAppType, int32_t &outProcessID)
Answers with the four-CC type and process ID of the application that currently "owns" the AJA device ...
Definition: ntv2macdriverinterface.cpp:651
AUTOCIRCULATE_TRANSFER::SetOutputTimeCodes
bool SetOutputTimeCodes(const NTV2TimeCodes &inValues)
Intended for playout, replaces the contents of my acOutputTimeCodes member.
Definition: ntv2publicinterface.cpp:2756
CNTV2DemoCommon::SetDefaultPageSize
static size_t SetDefaultPageSize(void)
Definition: ntv2democommon.cpp:1591
NTV2_INPUTSOURCE_INVALID
@ NTV2_INPUTSOURCE_INVALID
The invalid video input.
Definition: ntv2enums.h:1259
NTV2ChannelToTimecodeIndex
NTV2TCIndex NTV2ChannelToTimecodeIndex(const NTV2Channel inChannel, const bool inEmbeddedLTC=false, const bool inIsF2=false)
Converts the given NTV2Channel value into the equivalent NTV2TCIndex value.
Definition: ntv2utils.cpp:5022
BurnConfig::ISrcCh
NTV2Channel ISrcCh(void) const
Definition: ntv2democommon.h:442
CNTV2Card::UnsubscribeInputVerticalEvent
virtual bool UnsubscribeInputVerticalEvent(const NTV2Channel inChannel=NTV2_CHANNEL1)
Unregisters me so I'm no longer notified when an input VBI is signaled on the given input channel.
Definition: ntv2subscriptions.cpp:75
GetCSCOutputXptFromChannel
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inCSC, const bool inIsKey=false, const bool inIsRGB=false)
Definition: ntv2signalrouter.cpp:819
AJAProcess::GetPid
static uint64_t GetPid()
Definition: process.cpp:35
NTV2_INPUTSOURCE_SDI5
@ NTV2_INPUTSOURCE_SDI5
Identifies the 5th SDI video input.
Definition: ntv2enums.h:1255
NTV2FrameData::AncBufferSize
ULWord AncBufferSize(void) const
Definition: ntv2democommon.h:114
NTV2Burn::PlayThreadStatic
static void PlayThreadStatic(AJAThread *pThread, void *pContext)
This is the playout thread's static callback function that gets called when the playout thread runs....
Definition: ntv2burn.cpp:571
CNTV2Card::SetLTCInputEnable
virtual bool SetLTCInputEnable(const bool inEnable)
Enables or disables the ability for the device to read analog LTC on the reference input connector.
Definition: ntv2register.cpp:3651
CNTV2Card::driverInterface
virtual CNTV2DriverInterface & driverInterface(void)
Definition: ntv2card.h:6121
AUTOCIRCULATE_TRANSFER::GetCapturedAncByteCount
ULWord GetCapturedAncByteCount(const bool inField2=false) const
Definition: ntv2publicinterface.h:8379
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or Frame Store 3 (or the 3rd item).
Definition: ntv2enums.h:1338
UWord
uint16_t UWord
Definition: ajatypes.h:253
AJACircularBuffer::StartProduceNextBuffer
FrameDataPtr StartProduceNextBuffer(void)
The thread that's responsible for providing frames – the producer – calls this function to populate t...
Definition: circularbuffer.h:109
CNTV2Card::AutoCirculateGetStatus
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
Definition: ntv2autocirculate.cpp:646
NTV2FrameData::AudioBufferSize
ULWord AudioBufferSize(void) const
Definition: ntv2democommon.h:110
NTV2FrameData::AncBuffer2Size
ULWord AncBuffer2Size(void) const
Definition: ntv2democommon.h:118
NTV2FrameData::fNumAudioBytes
ULWord fNumAudioBytes
Actual number of captured audio bytes.
Definition: ntv2democommon.h:88
NTV2_IS_VALID_INPUT_SOURCE
#define NTV2_IS_VALID_INPUT_SOURCE(_inpSrc_)
Definition: ntv2enums.h:1266
NTV2_FBF_8BIT_YCBCR
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
Definition: ntv2enums.h:214
NTV2_REFERENCE_FREERUN
@ NTV2_REFERENCE_FREERUN
Specifies the device's internal clock.
Definition: ntv2enums.h:1434
AUTOCIRCULATE_TRANSFER
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
Definition: ntv2publicinterface.h:8002
NTV2VideoFormatToString
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
Definition: ntv2utils.cpp:6793
NTV2InputCrosspointID
NTV2InputCrosspointID
Identifies a widget input that potentially can accept a signal emitted from another widget's output (...
Definition: ntv2enums.h:2721
NTV2FrameData::AudioBuffer
NTV2Buffer & AudioBuffer(void)
Definition: ntv2democommon.h:109
NTV2_TestPatt_Black
@ NTV2_TestPatt_Black
Definition: ntv2testpatterngen.h:37
AUTOCIRCULATE_TRANSFER::SetVideoBuffer
bool SetVideoBuffer(ULWord *pInVideoBuffer, const ULWord inVideoByteCount)
Sets my video buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2729
GetCSCInputXptFromChannel
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
Definition: ntv2signalrouter.cpp:775
NTV2WidgetID
NTV2WidgetID
Definition: ntv2enums.h:2878
CNTV2DriverInterface::IsDeviceReady
virtual bool IsDeviceReady(const bool inCheckValid=(0))
Definition: ntv2driverinterface.cpp:1312
NTV2_INPUTSOURCE_HDMI4
@ NTV2_INPUTSOURCE_HDMI4
Identifies the 4th HDMI video input.
Definition: ntv2enums.h:1250
AJAAncillaryList::StripNativeInserterGUMPPackets
static bool StripNativeInserterGUMPPackets(const NTV2Buffer &inSrc, NTV2Buffer &outDst)
Copies GUMP from inSrc to outDst buffers, but removes ATC, VPID, VITC, EDH & raw/analog packets.
Definition: ancillarylist.cpp:1654
NTV2Burn::InputSignalHasTimecode
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false.
Definition: ntv2burn.cpp:866
NTV2Burn::Quit
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2burn.cpp:52
NTV2_XptHDMIOutQ1Input
@ NTV2_XptHDMIOutQ1Input
Definition: ntv2enums.h:2825
DeviceCapabilities::CanDoInputSource
bool CanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2devicecapabilities.h:233
AJACircularBuffer::EndConsumeNextBuffer
void EndConsumeNextBuffer(void)
The consumer thread calls this function to signal that it has finished processing the frame it obtain...
Definition: circularbuffer.h:266
BurnConfig::fWithAnc
bool fWithAnc
If true, capture & play anc data (LLBurn). Defaults to false.
Definition: ntv2democommon.h:402
NTV2_INPUTSOURCE_HDMI1
@ NTV2_INPUTSOURCE_HDMI1
Identifies the 1st HDMI video input.
Definition: ntv2enums.h:1247
CNTV2Card::GetInputVideoFormat
virtual NTV2VideoFormat GetInputVideoFormat(const NTV2InputSource inVideoSource=NTV2_INPUTSOURCE_SDI1, const bool inIsProgressive=(0))
Returns the video format of the signal that is present on the given input source.
Definition: ntv2register.cpp:3365
CRP188
Definition: ntv2rp188.h:55
AUTOCIRCULATE_STATUS::GetEndFrame
uint16_t GetEndFrame(void) const
Definition: ntv2publicinterface.h:7284
kRegRP188InOut1DBB
@ kRegRP188InOut1DBB
Definition: ntv2publicinterface.h:132
NTV2_AUDIOSIZE_MAX
#define NTV2_AUDIOSIZE_MAX
Definition: ntv2democommon.h:46
CNTV2Card::SetEveryFrameServices
virtual bool SetEveryFrameServices(const NTV2EveryFrameTaskMode inMode)
Sets the device's task mode.
Definition: ntv2register.cpp:179
AJA_STATUS_UNSUPPORTED
@ AJA_STATUS_UNSUPPORTED
Definition: types.h:394
CNTV2Card::SetSDIWatchdogTimeout
virtual bool SetSDIWatchdogTimeout(const ULWord inValue)
Specifies the amount of time that must elapse before the watchdog timer times out.
Definition: ntv2register.cpp:4147
PLDBG
#define PLDBG(_xpr_)
Definition: ntv2democommon.h:38
NTV2_OUTPUT_DEST_IS_SDI
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
Definition: ntv2enums.h:1323
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1348
NTV2_DISABLE_TASKS
@ NTV2_DISABLE_TASKS
0: Disabled: Device is completely configured by controlling application(s) – no driver involvement.
Definition: ntv2publicinterface.h:4290
BurnConfig::IChStr
std::string IChStr(void) const
Definition: ntv2democommon.h:446
BurnConfig::fInputChannel
NTV2Channel fInputChannel
The input channel to use.
Definition: ntv2democommon.h:390
NTV2Burn::SetupVideo
virtual AJAStatus SetupVideo(void)
Sets up everything I need for capturing and playing video.
Definition: ntv2burn.cpp:159
NTV2Buffer::GetHostAddress
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
Definition: ntv2publicinterface.cpp:1703
NTV2TestPatternGen
The NTV2 test pattern generator.
Definition: ntv2testpatterngen.h:69
NTV2_INPUTSOURCE_HDMI2
@ NTV2_INPUTSOURCE_HDMI2
Identifies the 2nd HDMI video input.
Definition: ntv2enums.h:1248
NTV2OutputCrosspointID
NTV2OutputCrosspointID
Identifies a widget output, a signal source, that potentially can drive another widget's input (ident...
Definition: ntv2enums.h:2502
BurnConfig::fDeviceSpec
std::string fDeviceSpec
The AJA device to use.
Definition: ntv2democommon.h:388
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1244
BurnConfig::fInputSource
NTV2InputSource fInputSource
The device input connector to use.
Definition: ntv2democommon.h:392
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:521
NTV2FrameData::fAudioBuffer
NTV2Buffer fAudioBuffer
Host audio buffer.
Definition: ntv2democommon.h:84
BurnConfig::ODstIsSDI
bool ODstIsSDI(void) const
Definition: ntv2democommon.h:448
NTV2Burn
I capture frames from a video signal provided to an AJA device's video input. I burn timecode into th...
Definition: ntv2burn.h:30
CNTV2Card::Connect
virtual bool Connect(const NTV2InputCrosspointID inInputXpt, const NTV2OutputCrosspointID inOutputXpt, const bool inValidate=(0))
Connects the given widget signal input (sink) to the given widget signal output (source).
Definition: ntv2regroute.cpp:87
NTV2_FBF_10BIT_YCBCR
@ NTV2_FBF_10BIT_YCBCR
See 10-Bit YCbCr Format.
Definition: ntv2enums.h:213
AJA_STATUS_INITIALIZE
@ AJA_STATUS_INITIALIZE
Definition: types.h:386
NTV2_VANCMODE_TALLER
@ NTV2_VANCMODE_TALLER
This identifies the mode in which there are some + extra VANC lines in the frame buffer.
Definition: ntv2enums.h:3754
CNTV2Card::SetHDMIOutAudioSource2Channel
virtual bool SetHDMIOutAudioSource2Channel(const NTV2AudioChannelPair inNewValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the HDMI output's 2-channel audio source.
Definition: ntv2audio.cpp:863
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5606
false
#define false
Definition: ntv2devicefeatures.h:25
NTV2Burn::PlayFrames
virtual void PlayFrames(void)
Repeatedly plays out frames using AutoCirculate (until global quit flag set).
Definition: ntv2burn.cpp:581
AUTOCIRCULATE_WITH_RP188
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
Definition: ntv2publicinterface.h:5522
ntv2burn.h
Header file for the NTV2Burn demonstration class.
NTV2ACFrameRange::lastFrame
UWord lastFrame(void) const
Definition: ntv2utils.h:984
AUTOCIRCULATE_STATUS::IsRunning
bool IsRunning(void) const
Definition: ntv2publicinterface.h:7299
GetFrameBufferOutputXptFromChannel
NTV2OutputXptID GetFrameBufferOutputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsRGB=false, const bool inIs425=false)
Definition: ntv2signalrouter.cpp:845
NTV2FrameBufferFormatToString
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6983
kRegRP188InOut4DBB
@ kRegRP188InOut4DBB
Definition: ntv2publicinterface.h:396
NTV2_INPUTSOURCE_SDI8
@ NTV2_INPUTSOURCE_SDI8
Identifies the 8th SDI video input.
Definition: ntv2enums.h:1258
AJA_STATUS_BAD_PARAM
@ AJA_STATUS_BAD_PARAM
Definition: types.h:392
CNTV2Card::WaitForOutputVerticalInterrupt
virtual bool WaitForOutputVerticalInterrupt(const NTV2Channel inChannel=NTV2_CHANNEL1, UWord inRepeatCount=1)
Efficiently sleeps the calling thread/process until the next one or more field (interlaced video) or ...
Definition: ntv2subscriptions.cpp:134
NTV2_INPUTSOURCE_SDI2
@ NTV2_INPUTSOURCE_SDI2
Identifies the 2nd SDI video input.
Definition: ntv2enums.h:1252
std
Definition: json.hpp:5362
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:6790
NTV2_TCINDEX_LTC2
@ NTV2_TCINDEX_LTC2
Analog LTC 2.
Definition: ntv2enums.h:3914
NTV2Burn::AnalogLTCInputHasTimecode
virtual bool AnalogLTCInputHasTimecode(void)
Returns true if there is a valid LTC signal on my device's primary analog LTC input port; otherwise r...
Definition: ntv2burn.cpp:877
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5470
CNTV2Card::AutoCirculateTransfer
virtual bool AutoCirculateTransfer(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &transferInfo)
Transfers all or part of a frame as specified in the given AUTOCIRCULATE_TRANSFER object to/from the ...
Definition: ntv2autocirculate.cpp:695
CNTV2DemoCommon::GetAJAPixelFormat
static AJA_PixelFormat GetAJAPixelFormat(const NTV2PixelFormat inFormat)
Definition: ntv2democommon.cpp:1150
AUTOCIRCULATE_STATUS::GetStartFrame
uint16_t GetStartFrame(void) const
Definition: ntv2publicinterface.h:7279
CNTV2Card::AutoCirculateInitForOutput
virtual bool AutoCirculateInitForOutput(const NTV2Channel inChannel, const UWord inFrameCount=7, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_INVALID, const ULWord inOptionFlags=0, const UByte inNumChannels=1, const UWord inStartFrameNumber=0, const UWord inEndFrameNumber=0)
Prepares for subsequent AutoCirculate playout, designating a contiguous block of frame buffers on the...
Definition: ntv2autocirculate.cpp:353
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
NTV2FrameData::fNumAnc2Bytes
ULWord fNumAnc2Bytes
Actual number of captured F2 anc bytes.
Definition: ntv2democommon.h:90
Bouncer
A handy class that makes it easy to "bounce" an unsigned integer value between a minimum and maximum ...
Definition: ntv2democommon.h:167
NTV2Burn::SetupHostBuffers
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
Definition: ntv2burn.cpp:388
NTV2_WgtAnalogOut1
@ NTV2_WgtAnalogOut1
Definition: ntv2enums.h:2912
CIRCULAR_BUFFER_SIZE
static const size_t CIRCULAR_BUFFER_SIZE(10)
Number of NTV2FrameData's in our ring.
CNTV2MacDriverInterface::AcquireStreamForApplication
virtual bool AcquireStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Reserves exclusive use of the AJA device for a given process, preventing other processes on the host ...
Definition: ntv2macdriverinterface.cpp:481
DeviceCapabilities::CanDoWidget
bool CanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2devicecapabilities.h:260
NTV2Burn::RouteInputSignal
virtual void RouteInputSignal(void)
Sets up board routing for capture.
Definition: ntv2burn.cpp:460
CNTV2SignalRouter::GetWidgetForInput
static bool GetWidgetForInput(const NTV2InputXptID inInputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified input crosspoint.
Definition: ntv2signalrouter.cpp:398
HasWidgetsAnyOf
#define HasWidgetsAnyOf(_w1, _w2, _w3)
Definition: ntv2burn.cpp:20
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:407
AUTOCIRCULATE_STATUS::HasAvailableInputFrame
bool HasAvailableInputFrame(void) const
Definition: ntv2publicinterface.h:7269
NTV2_Wgt12GSDIOut2
@ NTV2_Wgt12GSDIOut2
Definition: ntv2enums.h:2983
CNTV2Card::GetEveryFrameServices
virtual bool GetEveryFrameServices(NTV2EveryFrameTaskMode &outMode)
Retrieves the device's current "retail service" task mode.
Definition: ntv2register.cpp:184
GetInputSourceOutputXpt
NTV2OutputXptID GetInputSourceOutputXpt(const NTV2InputSource inInputSource, const bool inIsSDI_DS2=false, const bool inIsHDMI_RGB=false, const UWord inHDMI_Quadrant=0)
Definition: ntv2signalrouter.cpp:865
CNTV2Card::DMAWriteFrame
virtual bool DMAWriteFrame(const ULWord inFrameNumber, const ULWord *pInFrameBuffer, const ULWord inByteCount)
Transfers a single frame from the host to the AJA device.
Definition: ntv2dma.cpp:65
NTV2Burn::SetupAudio
virtual AJAStatus SetupAudio(void)
Sets up everything I need for capturing and playing audio.
Definition: ntv2burn.cpp:343
NTV2TimecodeIndexToInputSource
NTV2InputSource NTV2TimecodeIndexToInputSource(const NTV2TCIndex inTCIndex)
Converts the given NTV2TCIndex value into the appropriate NTV2InputSource value.
Definition: ntv2utils.cpp:5048
CNTV2Card::DisableRP188Bypass
virtual bool DisableRP188Bypass(const NTV2Channel inSDIOutput)
Configures the SDI output's embedder to embed SMPTE 12M timecode specified in calls to CNTV2Card::Set...
Definition: ntv2register.cpp:2562
AJACircularBuffer::SetAbortFlag
void SetAbortFlag(const bool *pAbortFlag)
Tells me the boolean variable I should monitor such that when it gets set to "true" will cause any th...
Definition: circularbuffer.h:51
NTV2OutputXptID
enum NTV2OutputCrosspointID NTV2OutputXptID
NTV2Buffer::Fill
bool Fill(const T &inValue)
Fills me with the given scalar value.
Definition: ntv2publicinterface.h:6248
AJAThread::SetPriority
virtual AJAStatus SetPriority(AJAThreadPriority priority)
Definition: thread.cpp:133
CNTV2Card::AutoCirculateStart
virtual bool AutoCirculateStart(const NTV2Channel inChannel, const ULWord64 inStartTime=0)
Starts AutoCirculating the specified channel that was previously initialized by CNTV2Card::AutoCircul...
Definition: ntv2autocirculate.cpp:503
CNTV2Card::SetReference
virtual bool SetReference(const NTV2ReferenceSource inRefSource, const bool inKeepFramePulseSelect=(0))
Sets the device's clock reference source. See Video Output Clocking & Synchronization for more inform...
Definition: ntv2register.cpp:1484
AJA_STATUS_OPEN
@ AJA_STATUS_OPEN
Definition: types.h:388
NTV2Burn::Run
virtual AJAStatus Run(void)
Runs me.
Definition: ntv2burn.cpp:546
CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1096
CNTV2Card::WaitForInputFieldID
virtual bool WaitForInputFieldID(const NTV2FieldID inFieldID, const NTV2Channel inChannel=NTV2_CHANNEL1)
Efficiently sleeps the calling thread/process until the next input VBI for the given field and input ...
Definition: ntv2subscriptions.cpp:214
AUTOCIRCULATE_TRANSFER::GetInputTimeCodes
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Intended for capture, answers with the timecodes captured in my acTransferStatus member's acFrameStam...
Definition: ntv2publicinterface.cpp:2855
kRegRP188InOut7DBB
@ kRegRP188InOut7DBB
Definition: ntv2publicinterface.h:585
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
Bouncer::Next
T Next(void)
Definition: ntv2democommon.h:193
NTV2_INPUTSOURCE_SDI3
@ NTV2_INPUTSOURCE_SDI3
Identifies the 3rd SDI video input.
Definition: ntv2enums.h:1253
AJAThread::Start
virtual AJAStatus Start()
Definition: thread.cpp:91
NTV2InputSourceToAudioSource
NTV2AudioSource NTV2InputSourceToAudioSource(const NTV2InputSource inInputSource)
Definition: ntv2utils.cpp:4961
BURNINFO
#define BURNINFO(_expr_)
Definition: ntv2democommon.h:44
BIT
#define BIT(_x_)
Definition: ajatypes.h:563
CNTV2Card::SubscribeInputVerticalEvent
virtual bool SubscribeInputVerticalEvent(const NTV2Channel inChannel=NTV2_CHANNEL1)
Causes me to be notified when an input vertical blanking interrupt occurs on the given input channel.
Definition: ntv2subscriptions.cpp:39
xHEX0N
#define xHEX0N(__x__, __n__)
Definition: ntv2publicinterface.h:5605
AJA_FAILURE
#define AJA_FAILURE(_status_)
Definition: types.h:371
BurnConfig::fInputFrames
NTV2ACFrameRange fInputFrames
Ingest frame count or range.
Definition: ntv2democommon.h:394
NTV2_IS_VALID_AUDIO_SYSTEM
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
Definition: ntv2enums.h:3867
NTV2_AudioChannel1_2
@ NTV2_AudioChannel1_2
This selects audio channels 1 and 2 (Group 1 channels 1 and 2)
Definition: ntv2enums.h:3089
NTV2_TCINDEX_LTC1
@ NTV2_TCINDEX_LTC1
Analog LTC 1.
Definition: ntv2enums.h:3913
kRegLTCStatusControl
@ kRegLTCStatusControl
Definition: ntv2publicinterface.h:356
BurnConfig
Configures an NTV2Burn or NTV2FieldBurn instance.
Definition: ntv2democommon.h:385
CNTV2Card::EnableChannel
virtual bool EnableChannel(const NTV2Channel inChannel)
Enables the given FrameStore.
Definition: ntv2register.cpp:2097
DeviceCapabilities::CanDoFrameBufferFormat
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2devicecapabilities.h:223
NTV2Burn::~NTV2Burn
virtual ~NTV2Burn()
Definition: ntv2burn.cpp:45
NTV2FrameData::AncBuffer
NTV2Buffer & AncBuffer(void)
Definition: ntv2democommon.h:113
kAppSignature
static const uint32_t kAppSignature(((((uint32_t)( 'B'))<< 24)|(((uint32_t)( 'u'))<< 16)|(((uint32_t)( 'r'))<< 8)|(((uint32_t)( 'n'))<< 0)))
NTV2_XptAnalogOutInput
@ NTV2_XptAnalogOutInput
Definition: ntv2enums.h:2841
CNTV2Card::AutoCirculateStop
virtual bool AutoCirculateStop(const NTV2Channel inChannel, const bool inAbort=(0))
Stops AutoCirculate for the given channel, and releases the on-device frame buffers that were allocat...
Definition: ntv2autocirculate.cpp:519
DEVICE_ID_NOTFOUND
@ DEVICE_ID_NOTFOUND
Invalid or "not found".
Definition: ntv2enums.h:92
NTV2_ANCSIZE_MAX
#define NTV2_ANCSIZE_MAX
Definition: ntv2democommon.h:47
CRP188::GetRP188Str
bool GetRP188Str(std::string &sRP188) const
Definition: ntv2rp188.cpp:918
BurnConfig::fOutputChannel
NTV2Channel fOutputChannel
The output channel to use.
Definition: ntv2democommon.h:391
NTV2_OEM_TASKS
@ NTV2_OEM_TASKS
2: OEM: Device is configured by controlling application(s), with minimal driver involvement.
Definition: ntv2publicinterface.h:4292
kRegRP188InOut6DBB
@ kRegRP188InOut6DBB
Definition: ntv2publicinterface.h:575
BURNNOTE
#define BURNNOTE(_expr_)
Definition: ntv2democommon.h:43
NTV2FrameData::fTimecodes
NTV2TimeCodes fTimecodes
Map of TC indexes to NTV2_RP188 values.
Definition: ntv2democommon.h:87
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
kRegRP188InOut8DBB
@ kRegRP188InOut8DBB
Definition: ntv2publicinterface.h:595
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3860