AJA NTV2 SDK  18.0.0.2717
NTV2 SDK 18.0.0.2717
ntv2llburn.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2llburn.h"
9 #include "ntv2endian.h"
10 #include "ntv2formatdescriptor.h"
11 #include "ajabase/common/types.h"
13 #include <iostream>
14 
15 using namespace std;
16 
17 // Override NTV2_ANCSIZE_MAX for testing new HANC insertion feature
18 #if defined(NTV2_ANCSIZE_MAX)
19  #undef NTV2_ANCSIZE_MAX
20 #endif
21 #define NTV2_ANCSIZE_MAX (256 * 1024) // Super Size Me! 0x40000
22 
23 
24 const uint32_t kAppSignature (NTV2_FOURCC('L','l','b','u'));
25 const uint32_t kNumFrameBuffers (2); // ping-pong between frames N and N+1 (determined by querying Auto-Circulate for available frame-buffers)
26 
27 #define AsULWordPtr(_p_) reinterpret_cast<ULWord*>(_p_)
28 #define AsCU8Ptr(_p_) reinterpret_cast<const uint8_t*>(_p_)
29 
30 
32  : mConfig (inConfig),
33  mRunThread (AJAThread()),
34  mDeviceID (DEVICE_ID_NOTFOUND),
36  mSavedTaskMode (NTV2_DISABLE_TASKS),
37  mOutputDest (NTV2_OUTPUTDESTINATION_INVALID),
38  mAudioSystem (NTV2_AUDIOSYSTEM_1),
39  mGlobalQuit (false),
40  mAudioInLastAddress (0),
41  mAudioOutLastAddress (0),
42  mFramesProcessed (0),
43  mFramesDropped (0)
44 {
45 } // constructor
46 
47 
49 {
50  // Stop my capture and playout threads, then destroy them...
51  Quit();
52 
53  // Unsubscribe from input vertical event...
55 
56  if (!mConfig.fDoMultiFormat)
57  {
58  mDevice.SetTaskMode (mSavedTaskMode); // Restore prior service level
59  mDevice.ReleaseStreamForApplication (kAppSignature, static_cast<int32_t>(AJAProcess::GetPid())); // Release the device
60  }
61 
62  // Don't leave the audio system active after we exit
63  mDevice.StopAudioInput (mAudioSystem);
64  mDevice.StopAudioOutput (mAudioSystem);
65 
66 } // destructor
67 
68 
69 void NTV2LLBurn::Quit (void)
70 {
71  // Set the global 'quit' flag, and wait for the thread to go inactive...
72  mGlobalQuit = true;
73 
74  while (mRunThread.Active())
75  AJATime::Sleep(10);
76 
77 } // Quit
78 
79 
81 {
83 
84  // Open the device...
86  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not found" << endl; return AJA_STATUS_OPEN;}
87 
88  if (!mDevice.IsDeviceReady (false))
89  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not ready" << endl; return AJA_STATUS_INITIALIZE;}
90 
91  mDeviceID = mDevice.GetDeviceID (); // Keep the device ID handy since it will be used frequently
92 
93  // Burn requires device capable of capturing and playing video...
94  if (!(mDevice.features().CanDoCapture() && mDevice.features().CanDoPlayback()))
95  {cerr << "## ERROR: Device cannot both capture & play video" << endl; return AJA_STATUS_BAD_PARAM; }
96 
97  ULWord appSignature (0);
98  int32_t appPID (0);
99  mDevice.GetTaskMode (mSavedTaskMode); // Save the current device state
100  mDevice.GetStreamingApplication (appSignature, appPID); // Who currently "owns" the device?
101  if (!mConfig.fDoMultiFormat)
102  {
103  if (!mDevice.AcquireStreamForApplication (kAppSignature, static_cast<int32_t>(AJAProcess::GetPid())))
104  {
105  cerr << "## ERROR: Unable to acquire device because another app (pid " << appPID << ") owns it" << endl;
106  return AJA_STATUS_BUSY; // Some other app is using the device
107  }
108  mDevice.ClearRouting (); // Clear the current device routing (since I "own" the device)
109  }
110  mDevice.SetTaskMode (NTV2_OEM_TASKS); // Set the OEM service level
111 
112  // Configure the SDI relays if present
113  if (mDevice.features().HasSDIRelays())
114  {
115  // Note that if the board's jumpers are not set in the position
116  // to enable the watchdog timer, these calls will have no effect.
117  mDevice.SetSDIWatchdogEnable(true, 0); // SDI 1/2
118  mDevice.SetSDIWatchdogEnable(true, 1); // SDI 3/4
119 
120  // Set timeout delay to 2 seconds expressed in multiples of 8 ns
121  // and take the relays out of bypass
122  mDevice.SetSDIWatchdogTimeout (2 * 125000000);
123  mDevice.KickSDIWatchdog ();
124 
125  // Give the mechanical relays some time to switch
126  AJATime::Sleep (500);
127  }
128 
129  if (mConfig.WithHanc())
130  {
131  // Transfer audio using HANC extractor/inserter
132  mConfig.fWithAnc = true;
133  mConfig.fSuppressAudio = true;
134  }
135 
136  if (mConfig.WithAnc() && !mDevice.features().CanDoCustomAnc())
137  {cerr << "## WARNING: Device doesn't support custom Anc, '-a -h' option ignored" << endl; mConfig.fWithAnc = false; mConfig.fWithHanc = false;}
138 
139  // Set up the video and audio...
140  status = SetupVideo();
141  if (AJA_FAILURE (status))
142  return status;
143 
144  status = SetupAudio();
145  if (AJA_FAILURE (status))
146  return status;
147 
148  // Set up the circular buffers...
149  status = SetupHostBuffers();
150  if (AJA_FAILURE (status))
151  return status;
152 
154  mDevice.SetLTCInputEnable(true); // Enable analog LTC input (some LTC inputs are shared with reference input)
155 
156  // Lastly, prepare my AJATimeCodeBurn instance...
157  mTCBurner.RenderTimeCodeFont (CNTV2DemoCommon::GetAJAPixelFormat (mConfig.fPixelFormat), mFormatDesc.numPixels, mFormatDesc.numLines);
158 
159  return AJA_STATUS_SUCCESS;
160 
161 } // Init
162 
163 
165 {
166  const uint16_t numFrameStores (mDevice.features().GetNumFrameStores());
167  const uint16_t numSDIOutputs (mDevice.features().GetNumVideoOutputs());
168 
169  // Can the device support the desired input source?
170  if (!mDevice.features().CanDoInputSource(mConfig.fInputSource))
171  {cerr << "## ERROR: This device cannot receive input from the specified source" << endl; return AJA_STATUS_BAD_PARAM;}
172 
173  // Pick an input NTV2Channel from the input source, and enable its frame buffer...
175  mDevice.EnableChannel (mConfig.fInputChannel); // Enable the input frame buffer
176 
177  // Pick an appropriate output NTV2Channel, and enable its frame buffer...
178  switch (mConfig.fInputSource)
179  {
180  case NTV2_INPUTSOURCE_SDI1: mConfig.fOutputChannel = numSDIOutputs < 3 || numFrameStores == 2 || numFrameStores > 4 ? NTV2_CHANNEL2 : NTV2_CHANNEL3; break;
181 
183  case NTV2_INPUTSOURCE_SDI2: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL3 : NTV2_CHANNEL4; break;
184 
186  case NTV2_INPUTSOURCE_SDI3: mConfig.fOutputChannel = NTV2_CHANNEL4; break;
187 
189  case NTV2_INPUTSOURCE_SDI4: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL5 : NTV2_CHANNEL3; break;
190 
191  case NTV2_INPUTSOURCE_SDI5: mConfig.fOutputChannel = NTV2_CHANNEL6; break;
192  case NTV2_INPUTSOURCE_SDI6: mConfig.fOutputChannel = NTV2_CHANNEL7; break;
193  case NTV2_INPUTSOURCE_SDI7: mConfig.fOutputChannel = NTV2_CHANNEL8; break;
194  case NTV2_INPUTSOURCE_SDI8: mConfig.fOutputChannel = NTV2_CHANNEL7; break;
195 
197  case NTV2_INPUTSOURCE_HDMI1: mConfig.fOutputChannel = numFrameStores < 3 ? NTV2_CHANNEL2 : NTV2_CHANNEL3;
198  mAudioSystem = NTV2_AUDIOSYSTEM_2;
199  break;
200 // default:
201  case NTV2_INPUTSOURCE_INVALID: cerr << "## ERROR: Bad input source" << endl; return AJA_STATUS_BAD_PARAM;
202  }
203 
204  // Check to see if desired input/output channels are in use by Auto-Circulate, i.e. another Auto-Circulate-based ntv2 demo is running.
205  AUTOCIRCULATE_STATUS acStatus;
206  if (!mDevice.AutoCirculateInitForInput( mConfig.fInputChannel,
210  | (mDevice.features().CanDoCustomAnc() ? AUTOCIRCULATE_WITH_ANC : 0)))
211  {
212  cerr << "Failed to init " << NTV2ChannelToString(mConfig.fInputChannel) << " for input. Is channel in-use by Auto-Circulate?" << endl;
213  return AJA_STATUS_FAIL;
214  }
215  if (!mDevice.AutoCirculateGetStatus(mConfig.fInputChannel, acStatus))
216  {
217  cerr << "Error getting Auto-Circulate status for input channel " << NTV2ChannelToString(mConfig.fInputChannel) << endl;
218  return AJA_STATUS_FAIL;
219  }
220  mInputStartFrame = acStatus.acStartFrame;
221  mInputEndFrame = acStatus.acEndFrame;
222 
223  if (!mDevice.AutoCirculateInitForOutput( mConfig.fOutputChannel,
226  AUTOCIRCULATE_WITH_RP188 | (mDevice.features().CanDoCustomAnc() ? AUTOCIRCULATE_WITH_ANC : 0)))
227  {
228  cerr << "Failed to init " << NTV2ChannelToString(mConfig.fOutputChannel) << " for output. Is channel in-use by Auto-Circulate?" << endl;
229  return AJA_STATUS_FAIL;
230  }
231  if (!mDevice.AutoCirculateGetStatus(mConfig.fOutputChannel, acStatus))
232  {
233  cerr << "Error getting Auto-Circulate status for output channel " << NTV2ChannelToString(mConfig.fOutputChannel) << endl;
234  return AJA_STATUS_FAIL;
235  }
236  mOutputStartFrame = acStatus.acStartFrame;
237  mOutputEndFrame = acStatus.acEndFrame;
238 
239  mDevice.AutoCirculateStop(mConfig.fInputChannel);
240  mDevice.AutoCirculateStop(mConfig.fOutputChannel);
241 
242  bool isTransmit (false);
243  if (mDevice.features().HasBiDirectionalSDI() // If device has bidirectional SDI connectors...
244  && NTV2_INPUT_SOURCE_IS_SDI(mConfig.fInputSource) // ...and desired input source is SDI...
245  && mDevice.GetSDITransmitEnable (mConfig.fInputChannel, isTransmit) // ...and GetSDITransmitEnable succeeds...
246  && isTransmit) // ...and input is set to "transmit"...
247  {
248  mDevice.SetSDITransmitEnable (mConfig.fInputChannel, false); // ...then disable transmit mode...
249  mDevice.WaitForInputVerticalInterrupt(mConfig.fInputChannel, 20); // ...and give the device a dozen frames or so to lock to the input signal
250  } // if input SDI connector needs to switch from transmit mode
251 
252  if (mConfig.WithAnc() && !NTV2_INPUT_SOURCE_IS_SDI(mConfig.fInputSource))
253  cerr << "## WARNING: Non-SDI input source, no Anc capture possible" << endl;
254 
255  // Determine the input video signal format, and set the device's reference source to that input...
256  mVideoFormat = mDevice.GetInputVideoFormat (mConfig.fInputSource);
257  if (mVideoFormat == NTV2_FORMAT_UNKNOWN)
258  {
259  cerr << "## ERROR: The specified input has no signal, or the device cannot handle the signal format" << endl;
260  return AJA_STATUS_NOINPUT; // Sorry, can't handle this format
261  }
262 
264  mAudioSystem = ::NTV2InputSourceToAudioSystem (mConfig.fInputSource);
265  mOutputDest = ::NTV2ChannelToOutputDestination (mConfig.fOutputChannel);
266 
267  if (mDevice.features().HasBiDirectionalSDI() // If device has bidirectional SDI connectors...
268  && NTV2_OUTPUT_DEST_IS_SDI(mOutputDest)) // ...and output destination is SDI...
269  mDevice.SetSDITransmitEnable (mConfig.fOutputChannel, true); // ...then enable transmit mode
270 
271  if (mConfig.WithAnc() && !NTV2_OUTPUT_DEST_IS_SDI(mOutputDest))
272  cerr << "## WARNING: Non-SDI output destination, no Anc playout possible" << endl;
273 
274  mDevice.EnableChannel (mConfig.fInputChannel); // Enable the input frame buffer
275  mDevice.EnableChannel (mConfig.fOutputChannel); // Enable the output frame buffer
276 
277  if (mDevice.features().CanDoMultiFormat() && mConfig.fDoMultiFormat)
278  mDevice.SetMultiFormatMode (true);
279  else if (mDevice.features().CanDoMultiFormat())
280  mDevice.SetMultiFormatMode (false);
281 
282  // Set the input channel format to the detected input format...
283  mDevice.SetVideoFormat (mVideoFormat, false, false, mDevice.features().CanDoMultiFormat() ? mConfig.fInputChannel : NTV2_CHANNEL1);
284  if (mDevice.features().CanDoMultiFormat()) // If device supports multiple formats per-channel...
285  mDevice.SetVideoFormat (mVideoFormat, false, false, mConfig.fOutputChannel); // ...then also set the output channel format to the detected input format
286 
287  // Set the frame buffer pixel format for both channels on the device, assuming it
288  // supports that pixel format . . . otherwise default to 8-bit YCbCr...
289  if (!mDevice.features().CanDoFrameBufferFormat(mConfig.fPixelFormat))
291 
292  // Set the pixel format for both device frame buffers...
293  mDevice.SetFrameBufferFormat (mConfig.fInputChannel, mConfig.fPixelFormat);
294  mDevice.SetFrameBufferFormat (mConfig.fOutputChannel, mConfig.fPixelFormat);
295 
296  // Enable and subscribe to the interrupts for the channel to be used...
297  mDevice.EnableInputInterrupt (mConfig.fInputChannel);
298  mDevice.SubscribeInputVerticalEvent (mConfig.fInputChannel);
299 
300  // Enable and subscribe to the output interrupts (though it's enabled by default)...
301  mDevice.EnableOutputInterrupt (mConfig.fOutputChannel);
303 
304  // Set the Frame Store modes
305  mDevice.SetMode (mConfig.fInputChannel, NTV2_MODE_CAPTURE);
306  mDevice.SetMode (mConfig.fOutputChannel, NTV2_MODE_DISPLAY);
307 
308  // Set up the device signal routing, and both playout and capture AutoCirculate...
311 
312  // Now that newer AJA devices can capture/play anc data from separate buffers,
313  // there's no need to enable VANC frame geometries...
314  mDevice.SetVANCMode (NTV2_VANCMODE_OFF, mConfig.fInputChannel);
315  mDevice.SetVANCMode (NTV2_VANCMODE_OFF, mConfig.fOutputChannel);
316  if (::Is8BitFrameBufferFormat(mConfig.fPixelFormat))
317  { // 8-bit FBFs: since not using VANC geometries, disable bit shift...
320  }
321 
322  // Be sure the RP188 mode for the SDI input (expressed as an NTV2Channel),
323  // is set to NTV2_RP188_INPUT...
324  bool isBypassEnabled (false);
325  mDevice.IsRP188BypassEnabled (mConfig.fInputChannel, isBypassEnabled);
326  if (isBypassEnabled)
327  mDevice.DisableRP188Bypass (mConfig.fInputChannel);
328  mDevice.SetRP188Mode (mConfig.fInputChannel, NTV2_RP188_INPUT);
329  mDevice.SetRP188SourceFilter (mConfig.fInputChannel, 0); // 0=LTC 1=VITC1 2=VITC2
330 
331  // Make sure the RP188 mode for all SDI outputs is NTV2_RP188_OUTPUT, and that their RP188
332  // registers are not bypassed (i.e. timecode isn't sourced from an SDI input, as for E-E mode)...
333  NTV2_ASSERT(!mRP188Outputs.empty());
334  for (NTV2ChannelSetConstIter iter(mRP188Outputs.begin()); iter != mRP188Outputs.end(); ++iter)
335  {
336  mDevice.SetRP188Mode (*iter, NTV2_RP188_OUTPUT);
337  mDevice.DisableRP188Bypass (*iter);
338  }
339 
340  // Tell the hardware which buffers to use until the main worker thread runs
341  mDevice.SetInputFrame (mConfig.fInputChannel, 0);
342  mDevice.SetOutputFrame(mConfig.fOutputChannel, 2);
343 
344  // Now that the video is set up, get information about the current frame geometry...
345  mFormatDesc = NTV2FormatDescriptor (mVideoFormat, mConfig.fPixelFormat);
346  return AJA_STATUS_SUCCESS;
347 
348 } // SetupVideo
349 
350 
352 {
353  // Have the audio subsystem capture audio from the designated input source...
355 
356  // It's best to use all available audio channels...
357  mDevice.SetNumberAudioChannels (mDevice.features().GetMaxAudioChannels(), mAudioSystem);
358 
359  // Assume 48kHz PCM...
360  mDevice.SetAudioRate (NTV2_AUDIO_48K, mAudioSystem);
361 
362  // 4MB device audio buffers work best...
363  mDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mAudioSystem);
364 
365  // Set up the output audio embedders...
366  if (mDevice.features().GetNumAudioSystems() > 1)
367  {
368  // Some devices, like the Kona1, have 2 FrameStores but only 1 SDI output,
369  // which makes mConfig.fOutputChannel == NTV2_CHANNEL2, but need SDIoutput to be NTV2_CHANNEL1...
370  UWord SDIoutput(mConfig.fOutputChannel);
371  if (SDIoutput >= mDevice.features().GetNumVideoOutputs())
372  SDIoutput = mDevice.features().GetNumVideoOutputs() - 1;
373  mDevice.SetSDIOutputAudioSystem (NTV2Channel(SDIoutput), mAudioSystem);
374  }
375 
376  //
377  // Loopback mode plays whatever audio appears in the input signal when it's
378  // connected directly to an output (i.e., "end-to-end" mode). If loopback is
379  // left enabled, the video will lag the audio as video frames get briefly delayed
380  // in our ring buffer. Audio, therefore, needs to come out of the (buffered) frame
381  // data being played, so loopback must be turned off...
382  //
383  mDevice.SetAudioLoopBack (NTV2_AUDIO_LOOPBACK_OFF, mAudioSystem);
384 
385  // Reset both the input and output sides of the audio system so that the buffer
386  // pointers are reset to zero and inhibited from advancing.
387  mDevice.StopAudioOutput (mAudioSystem);
388  mDevice.StopAudioInput (mAudioSystem);
389 
390  // Ensure that the audio system will capture samples when the reset is removed
391  mDevice.SetAudioCaptureEnable (mAudioSystem, true);
392 
393  return AJA_STATUS_SUCCESS;
394 
395 } // SetupAudio
396 
397 // Fixes internal issue #921
398 // NTV2 device audio systems wrap after reading/writing 65,280 samples of 16-channel audio (or 130,560 samples of 8-channel audio)...
399 // i.e. after reading/writing 4,177,920 bytes max.
400 // A 4MB buffer (4,194,304 bytes) wastes 16K (16,384 bytes), but is page-sized, and readily page-aligned on most host OSes.
401 #define HOST_AUDIO_BUFFER_SIZE 4194304
402 
404 {
405  CNTV2DemoCommon::SetDefaultPageSize(); // Set host-specific page size
406 
407  // Allocate and add each in-host buffer to my member variables.
408  // DMA performance can be accelerated slightly by using page-aligned video buffers...
409  mpHostVideoBuffer.Allocate(mFormatDesc.GetVideoWriteSize(ULWord(NTV2Buffer::DefaultPageSize())), true);
410  mpHostAudioBuffer.Allocate(HOST_AUDIO_BUFFER_SIZE, /*page-aligned*/true);
411  mpHostF1AncBuffer.Allocate(mConfig.WithAnc() ? NTV2_ANCSIZE_MAX : 0, /*pageAligned*/true);
412  mpHostF2AncBuffer = NTV2Buffer(mConfig.WithAnc() ? NTV2_ANCSIZE_MAX : 0);
413 
414  if (!mpHostVideoBuffer || !mpHostAudioBuffer || (mConfig.WithAnc() && !mpHostF1AncBuffer) || (mConfig.WithAnc() && !mpHostF2AncBuffer))
415  {
416  cerr << "## ERROR: Unable to allocate host buffer(s)" << endl;
417  return AJA_STATUS_MEMORY;
418  }
419 
420  return AJA_STATUS_SUCCESS;
421 
422 } // SetupHostBuffers
423 
424 
426 {
427  const NTV2OutputCrosspointID inputOutputXpt (::GetInputSourceOutputXpt (mConfig.fInputSource));
429 
430  if (::IsRGBFormat (mConfig.fPixelFormat))
431  {
432  // If the frame buffer is configured for RGB pixel format, incoming YUV must be converted.
433  // This routes the video signal from the input through a color space converter before
434  // connecting to the RGB frame buffer...
435  const NTV2InputCrosspointID cscVideoInputXpt (::GetCSCInputXptFromChannel (mConfig.fInputChannel));
436  const NTV2OutputCrosspointID cscOutputXpt (::GetCSCOutputXptFromChannel (mConfig.fInputChannel, false, true)); // false=video, true=RGB
437 
438  mDevice.Connect (cscVideoInputXpt, inputOutputXpt); // Connect the CSC's video input to the input spigot's output
439  mDevice.Connect (fbInputXpt, cscOutputXpt); // Connect the frame store's input to the CSC's output
440  }
441  else
442  mDevice.Connect (fbInputXpt, inputOutputXpt); // Route the YCbCr signal directly from the input to the frame buffer's input
443 
444 } // RouteInputSignal
445 
446 
448 {
449  const NTV2InputCrosspointID outputInputXpt (::GetOutputDestInputXpt (mOutputDest));
451  NTV2OutputCrosspointID outputXpt (fbOutputXpt);
452 
453  mRP188Outputs.clear();
454  mRP188Outputs.insert(mConfig.fOutputChannel);
455  if (::IsRGBFormat (mConfig.fPixelFormat))
456  {
457  const NTV2OutputCrosspointID cscVidOutputXpt (::GetCSCOutputXptFromChannel (mConfig.fOutputChannel)); // Use CSC's YUV video output
458  const NTV2InputCrosspointID cscVidInputXpt (::GetCSCInputXptFromChannel (mConfig.fOutputChannel));
459 
460  mDevice.Connect (cscVidInputXpt, fbOutputXpt); // Connect the CSC's video input to the frame store's output
461  mDevice.Connect (outputInputXpt, cscVidOutputXpt); // Connect the SDI output's input to the CSC's video output
462  outputXpt = cscVidOutputXpt;
463  }
464  else
465  mDevice.Connect (outputInputXpt, outputXpt);
466 
467  if (!mConfig.fDoMultiFormat)
468  {
469  // Route all SDI outputs to the outputXpt...
470  const NTV2Channel startNum (NTV2_CHANNEL1);
471  const NTV2Channel endNum (NTV2Channel(mDevice.features().GetNumVideoChannels()));
472  NTV2WidgetID outputWidgetID (NTV2_WIDGET_INVALID);
473 
474  for (NTV2Channel chan(startNum); chan < endNum; chan = NTV2Channel(chan+1))
475  {
476  mDevice.SetRP188SourceFilter (chan, 0); // Set all SDI spigots to capture embedded LTC (0==LTC 1==VITC1 2==VITC2)
477  if (chan == mConfig.fInputChannel || chan == mConfig.fOutputChannel)
478  continue; // Skip the input & output channel, already routed
479  mRP188Outputs.insert(chan); // Add this SDI spigot to those we'll push timecode into
480  if (mDevice.features().HasBiDirectionalSDI())
481  mDevice.SetSDITransmitEnable (chan, true);
482  if (CNTV2SignalRouter::GetWidgetForInput (::GetSDIOutputInputXpt (chan, mDevice.features().CanDoDualLink()), outputWidgetID))
483  if (mDevice.features().CanDoWidget(outputWidgetID))
484  mDevice.Connect (::GetSDIOutputInputXpt(chan), outputXpt);
485  } // for each output spigot
486 
487  // If HDMI and/or analog video outputs are available, route them, too...
488  if (mDevice.features().CanDoWidget(NTV2_WgtHDMIOut1))
489  mDevice.Connect (NTV2_XptHDMIOutInput, outputXpt); // Route the output signal to the HDMI output
490  if (mDevice.features().CanDoWidget(NTV2_WgtHDMIOut1v2))
491  mDevice.Connect (NTV2_XptHDMIOutQ1Input, outputXpt); // Route the output signal to the HDMI output
492  if (mDevice.features().CanDoWidget(NTV2_WgtAnalogOut1))
493  mDevice.Connect (NTV2_XptAnalogOutInput, outputXpt); // Route the output signal to the Analog output
494  if (mDevice.features().CanDoWidget(NTV2_WgtSDIMonOut1))
495  mDevice.Connect (::GetSDIOutputInputXpt (NTV2_CHANNEL5), outputXpt); // Route the output signal to the SDI monitor output
496  }
497 
498 } // RouteOutputSignal
499 
500 
502 {
503  // Start the main worker thread...
504  StartRunThread ();
505 
506  return AJA_STATUS_SUCCESS;
507 
508 } // Run
509 
510 
512 
513 // This is where we will start the worker thread
515 {
516  // Create and start the worker thread...
517  mRunThread.Attach(RunThreadStatic, this);
519  mRunThread.Start();
520 
521 } // StartRunThread
522 
523 
524 // The worker thread function
525 void NTV2LLBurn::RunThreadStatic (AJAThread * pThread, void * pContext) // static
526 {
527  (void) pThread;
528  // Grab the NTV2LLBurn instance pointer from the pContext parameter,
529  // then call its ProcessFrames method...
530  NTV2LLBurn * pApp (reinterpret_cast <NTV2LLBurn *> (pContext));
531  pApp->ProcessFrames ();
532 
533 } // RunThreadStatic
534 
535 
536 static const bool CLEAR_HOST_ANC_BUFFER_BEFORE_READ (false);
537 static const bool PRINT_ANC_PACKETS_AFTER_READ (false);
538 static const bool CLEAR_DEVICE_ANC_BUFFER_AFTER_READ (false);
539 static const bool REPLACE_OUTGOING_ANC_WITH_CUSTOM_PACKETS (false);
540 
541 
543 {
544  const bool doAncInput (mConfig.WithAnc() && NTV2_INPUT_SOURCE_IS_SDI(mConfig.fInputSource));
545  const bool doAncOutput (mConfig.WithAnc() && NTV2_OUTPUT_DEST_IS_SDI(mOutputDest));
546  const UWord sdiInput (UWord(::GetIndexForNTV2InputSource(mConfig.fInputSource)));
547  const UWord sdiOutput (UWord(::NTV2OutputDestinationToChannel(mOutputDest)));
548  const bool isInterlace (!NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE(mVideoFormat));
549  uint32_t currentInFrame (mInputStartFrame);
550  uint32_t currentOutFrame (mOutputStartFrame);
551  uint32_t currentAudioInAddress (0);
552  uint32_t audioReadOffset (0);
553  uint32_t audioInWrapAddress (0);
554  uint32_t audioOutWrapAddress (0);
555  uint32_t audioBytesCaptured (0);
556  uint32_t ancBytesCapturedF1 (0);
557  uint32_t ancBytesCapturedF2 (0);
558  bool audioIsReset (true);
559  NTV2DIDSet savedDIDs;
560  string timeCodeString;
561 
562  const NTV2Standard videoStandard (::GetNTV2StandardFromVideoFormat(mVideoFormat));
563  const NTV2SmpteLineNumber smpteLineNumInfo (::GetSmpteLineNumber(videoStandard));
564  Bouncer<UWord> yPercent (85/*upperLimit*/, 1/*lowerLimit*/, 1/*startValue*/); // Vertically "bounces" timecode in raster
566  NTV2Buffer zeroesBuffer(mpHostF1AncBuffer.GetByteCount());
567  zeroesBuffer.Fill(ULWord64(0));
568  BURNNOTE("Thread started");
569 
570  // Save current Anc buffer capacity (to restore it later), then max it out...
571  ULWord savedF1ByteCapacity(0), savedF2ByteCapacity(0), offset(0);
572  mDevice.GetAncRegionOffsetAndSize (offset, savedF1ByteCapacity, NTV2_AncRgn_Field1);
573  mDevice.GetAncRegionOffsetAndSize (offset, savedF2ByteCapacity, NTV2_AncRgn_Field2);
575 
576  if (doAncInput)
577  {
578  // Configure extractor
579  mDevice.AncExtractInit(sdiInput, mConfig.fInputChannel);
580 
581  if (mConfig.WithHanc())
582  {
583  mDevice.AncExtractGetFilterDIDs(sdiInput, savedDIDs); // Save current ANC filter (so it can be restored later)
584 
585  // Configure ANC extractor not to filter audio
586  NTV2DIDSet dids;
587 // dids.insert(0xe0); // HD audio group 4 control
588 // dids.insert(0xe1); // HD audio group 3 control
589 // dids.insert(0xe2); // HD audio group 2 control
590 // dids.insert(0xe3); // HD audio group 1 control
591 // dids.insert(0xe4); // HD audio group 4 data
592 // dids.insert(0xe5); // HD audio group 3 data
593 // dids.insert(0xe6); // HD audio group 2 data
594 // dids.insert(0xe7); // HD audio group 1 data
595  dids.insert(0xa0); // 3G audio group 8 control
596  dids.insert(0xa1); // 3G audio group 7 control
597  dids.insert(0xa2); // 3G audio group 6 control
598  dids.insert(0xa3); // 3G audio group 5 control
599  dids.insert(0xa4); // 3G audio group 8 data
600  dids.insert(0xa5); // 3G audio group 7 data
601  dids.insert(0xa6); // 3G audio group 6 data
602  dids.insert(0xa7); // 3G audio group 5 data
603  dids.insert(0x41); // Filter vpid (inserted by sdi output)
604  dids.insert(0x60); // Filter timecode (inserted by sdi output)
605  mDevice.AncExtractSetFilterDIDs (sdiInput, dids);
606 
607  // Enable HANC extraction
608  mDevice.AncExtractSetComponents (sdiInput, true, true, true, true);
609  }
610  else
611  {
612  // Disable HANC extraction
613  mDevice.AncExtractSetComponents (sdiInput, true, true, false, false);
614  }
615 
616  // Start extractor
617  mDevice.AncExtractSetEnable (sdiInput, true);
618  }
619 
620  if (doAncOutput)
621  {
622  // Configure inserter
623  mDevice.AncInsertInit (sdiOutput, mConfig.fInputChannel);
624  mDevice.AncInsertSetComponents (sdiOutput, true, true, mConfig.WithHanc(), mConfig.WithHanc());
625  mDevice.AncInsertSetReadParams (sdiOutput, 0, 0, mConfig.fOutputChannel);
626  mDevice.AncInsertSetField2ReadParams (sdiOutput, 0, 0, mConfig.fOutputChannel);
627  }
628 
629  mDevice.SetSDIOutputAudioEnabled (::NTV2OutputDestinationToChannel(mOutputDest), mConfig.WithAudio());
630 
631  mFramesProcessed = mFramesDropped = 0; // Start with a fresh frame count
632 
633  mDevice.GetAudioReadOffset (audioReadOffset, mAudioSystem);
634  mDevice.GetAudioWrapAddress (audioOutWrapAddress, mAudioSystem);
635 
636  // Wait to make sure the next two SDK calls will be made during the same frame...
637  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
638  mDevice.DMAWriteAnc (0, zeroesBuffer, zeroesBuffer);
639  mDevice.DMAWriteAnc (1, zeroesBuffer, zeroesBuffer);
640  mDevice.DMAWriteAnc (2, zeroesBuffer, zeroesBuffer);
641  mDevice.DMAWriteAnc (3, zeroesBuffer, zeroesBuffer);
642 
643  // Before the main loop starts, ping-pong the buffers so the hardware will use
644  // different buffers than the ones it was using while idling...
645  currentInFrame ^= 1;
646  currentOutFrame ^= 1;
647 
648  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
649  if (doAncInput)
650  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
651  if (doAncInput && isInterlace)
652  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
653 
654  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
655 
656  // Wait until the hardware starts filling the new buffers, and then start audio
657  // capture as soon as possible to match the video...
658  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
659  mDevice.StartAudioInput (mAudioSystem);
660 
661  mAudioInLastAddress = audioReadOffset;
662  audioInWrapAddress = audioOutWrapAddress + audioReadOffset;
663  mAudioOutLastAddress = 0;
664 
665  currentInFrame ^= 1;
666  currentOutFrame ^= 1;
667 
668  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
669  if (doAncInput)
670  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
671  if (doAncInput && isInterlace)
672  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
673 
674  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
675 
676  while (!mGlobalQuit)
677  {
678  // Wait until the input has completed capturing a frame...
679  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
680 
681  // Flip sense of the buffers again to refer to the buffers that the hardware isn't using (i.e. the off-screen buffers)...
682  currentInFrame ^= 1;
683  currentOutFrame ^= 1;
684 
685  if (mConfig.WithAudio())
686  {
687  // Read the audio position registers as close to the interrupt as possible...
688  mDevice.ReadAudioLastIn (currentAudioInAddress, NTV2AudioSystem(mConfig.fInputChannel));
689  currentAudioInAddress &= ~0x3UL; // Force DWORD alignment
690  currentAudioInAddress += audioReadOffset;
691 
692  if (audioIsReset && mAudioOutLastAddress)
693  {
694  // Now that the audio system has some samples to play, playback can be started...
695  mDevice.StartAudioOutput (mAudioSystem);
696  audioIsReset = false;
697  }
698 
699  if (currentAudioInAddress < mAudioInLastAddress)
700  {
701  // Audio address has wrapped around the end of the buffer.
702  // Do the calculations and transfer from the last address to the end of the buffer...
703  audioBytesCaptured = audioInWrapAddress - mAudioInLastAddress;
704 
705  mDevice.DMAReadAudio (mAudioSystem, mpHostAudioBuffer, mAudioInLastAddress, audioBytesCaptured);
706 
707  // Transfer the new samples from the start of the buffer to the current address...
708  mDevice.DMAReadAudio (mAudioSystem, AsULWordPtr(mpHostAudioBuffer.GetHostAddress(audioBytesCaptured)),
709  audioReadOffset, currentAudioInAddress - audioReadOffset);
710 
711  audioBytesCaptured += currentAudioInAddress - audioReadOffset;
712  }
713  else
714  {
715  audioBytesCaptured = currentAudioInAddress - mAudioInLastAddress;
716 
717  // No wrap, so just perform a linear DMA from the buffer...
718  mDevice.DMAReadAudio (mAudioSystem, mpHostAudioBuffer, mAudioInLastAddress, audioBytesCaptured);
719  }
720 
721  mAudioInLastAddress = currentAudioInAddress;
722  } // if mConfig.WithAudio()
723 
724  // Transfer the new frame to system memory...
725  mDevice.DMAReadFrame (currentInFrame, mpHostVideoBuffer, mpHostVideoBuffer.GetByteCount());
726 
727  if (doAncInput)
728  { // Transfer received Anc data into my F1 & F2 buffers...
729  AJAAncillaryList capturedPackets;
730  // Read ANC bytes captured
731  mDevice.AncExtractGetField1Size (sdiInput, ancBytesCapturedF1);
732  if (isInterlace)
733  mDevice.AncExtractGetField2Size (sdiInput, ancBytesCapturedF2);
735  {
736  mpHostF1AncBuffer.Fill(0);
737  if (isInterlace)
738  mpHostF2AncBuffer.Fill(0);
739  }
740  // Read ANC data
741  mDevice.DMAReadAnc (currentInFrame, mpHostF1AncBuffer, mpHostF2AncBuffer);
742 
744  {
745  AJAAncillaryList::SetFromDeviceAncBuffers (mpHostF1AncBuffer, mpHostF2AncBuffer, capturedPackets);
746  if (capturedPackets.CountAncillaryData()) capturedPackets.Print(cerr, false); // Dump packets
747  }
749  mDevice.DMAWriteAnc (currentInFrame, zeroesBuffer, zeroesBuffer);
750  }
751 
752  // Determine which timecode value should be burned in to the video frame
753  NTV2_RP188 timecodeValue;
755  {
756  // Use the embedded input time code...
757  mDevice.GetRP188Data (mConfig.fInputChannel, timecodeValue);
758  CRP188 inputRP188Info (timecodeValue);
759  inputRP188Info.GetRP188Str(timeCodeString);
760  //cerr << "SDI" << DEC(mConfig.fTimecodeSource) << ":" << timeCodeString << ":" << timecodeValue << endl;
761  }
763  {
764  // Use the analog input time code...
765  mDevice.ReadAnalogLTCInput (mConfig.fTimecodeSource == NTV2_TCINDEX_LTC1 ? 0 : 1, timecodeValue);
766  CRP188 analogRP188Info (timecodeValue);
767  analogRP188Info.GetRP188Str(timeCodeString);
768  //cerr << "Ana" << DEC(mConfig.fTimecodeSource) << ":" << timeCodeString << ":" << timecodeValue << endl;
769  }
770  else
771  {
772  // Invent a timecode (based on the number of frames procesed)...
773  const NTV2FrameRate ntv2FrameRate (GetNTV2FrameRateFromVideoFormat (mVideoFormat));
774  const TimecodeFormat tcFormat (CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat(ntv2FrameRate));
775  const CRP188 frameRP188Info (mFramesProcessed, tcFormat);
776 
777  frameRP188Info.GetRP188Reg(timecodeValue);
778  frameRP188Info.GetRP188Str(timeCodeString);
779  //cerr << "Inv:" << timeCodeString << ":" << timecodeValue << endl;
780  }
781 
782  // "Burn" the timecode into the host buffer while we have full access to it...
783  mTCBurner.BurnTimeCode (reinterpret_cast <char *> (mpHostVideoBuffer.GetHostPointer()), timeCodeString.c_str(), yPercent.Next());
784 
785  if (mConfig.WithAudio())
786  {
787  // Calculate where the next audio samples should go in the buffer, taking wraparound into account...
788  if ((mAudioOutLastAddress + audioBytesCaptured) > audioOutWrapAddress)
789  {
790  // The audio will wrap. Transfer enough bytes to fill the buffer to the end...
791  mDevice.DMAWriteAudio (mAudioSystem, mpHostAudioBuffer, mAudioOutLastAddress, audioOutWrapAddress - mAudioOutLastAddress);
792 
793  // Now transfer the remaining bytes to the front of the buffer...
794  mDevice.DMAWriteAudio (mAudioSystem, AsULWordPtr(mpHostAudioBuffer.GetHostAddress(audioOutWrapAddress - mAudioOutLastAddress)),
795  0, audioBytesCaptured - (audioOutWrapAddress - mAudioOutLastAddress));
796 
797  mAudioOutLastAddress = audioBytesCaptured - (audioOutWrapAddress - mAudioOutLastAddress);
798  }
799  else
800  {
801  // No wrap, so just do a linear DMA from the buffer...
802  mDevice.DMAWriteAudio (mAudioSystem, mpHostAudioBuffer, mAudioOutLastAddress, audioBytesCaptured);
803 
804  mAudioOutLastAddress += audioBytesCaptured;
805  }
806  } // if mConfig.WithAudio()
807 
808  // Send the updated frame back to the board for display...
809  mDevice.DMAWriteFrame (currentOutFrame, mpHostVideoBuffer, mpHostVideoBuffer.GetByteCount());
810 
811  if (doAncOutput)
812  {
814  {
816  AJAAncDataLoc F2Loc(F1AncDataLoc);
817  ULWord pktData(NTV2EndianSwap32(mFramesProcessed));
818  pkt.SetDID(0xC0); pkt.SetSID(0x00); pkt.SetDataLocation(F1AncDataLoc); pkt.SetDataCoding(AJAAncDataCoding_Digital);
819  pkt.SetPayloadData(AsCU8Ptr(&pktData), 4);
820  pkts.AddAncillaryData(pkt);
821  if (isInterlace)
822  {
823  F2Loc.SetLineNumber(uint16_t(smpteLineNumInfo.GetFirstActiveLine(NTV2_FIELD1)
824  + ULWord(F1AncDataLoc.GetLineNumber())
825  - smpteLineNumInfo.GetFirstActiveLine(NTV2_FIELD0)));
826  pkt.SetDID(0xC1); pkt.SetSID(0x01); pkt.SetDataLocation(F2Loc);
827  pktData = ULWord(pktData << 16) | ULWord(pktData >> 16);
828  pkt.SetPayloadData(AsCU8Ptr(&pktData), 4);
829  pkts.AddAncillaryData(pkt);
830  }
831  //pkts.Print(cerr, true); cerr << endl;
832  pkts.GetTransmitData (mpHostF1AncBuffer, mpHostF2AncBuffer, !isInterlace, isInterlace ? smpteLineNumInfo.GetLastLine(NTV2_FIELD0)+1 : 0);
833  }
834  // Write ANC data
835  mDevice.DMAWriteAnc (currentOutFrame, mpHostF1AncBuffer, mpHostF2AncBuffer);
836  }
837 
838  // Write the output timecode (for all SDI output spigots)...
839  for (NTV2ChannelSetConstIter iter(mRP188Outputs.begin()); iter != mRP188Outputs.end(); ++iter)
840  mDevice.SetRP188Data (*iter, timecodeValue);
841 
842  // Check for dropped frames by ensuring the hardware has not started to process
843  // the buffers that were just filled....
844  uint32_t readBackIn;
845  uint32_t readBackOut;
846  mDevice.GetInputFrame (mConfig.fInputChannel, readBackIn);
847  mDevice.GetOutputFrame (mConfig.fOutputChannel, readBackOut);
848 
849  if ((readBackIn == currentInFrame) || (readBackOut == currentOutFrame))
850  {
851  cerr << "## WARNING: Drop detected: current in " << currentInFrame << ", readback in " << readBackIn
852  << ", current out " << currentOutFrame << ", readback out " << readBackOut << endl;
853  mFramesDropped++;
854  }
855  else
856  mFramesProcessed++;
857 
858  // Tell the hardware which buffers to start using at the beginning of the next frame...
859  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
860  if (doAncInput)
861  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
862  if (doAncInput && isInterlace)
863  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
864 
865  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
866  if (doAncOutput)
867  mDevice.AncInsertSetReadParams (sdiOutput, currentOutFrame, ancBytesCapturedF1, mConfig.fOutputChannel);
868  if (doAncOutput && isInterlace)
869  mDevice.AncInsertSetField2ReadParams (sdiOutput, currentOutFrame, ancBytesCapturedF2, mConfig.fOutputChannel);
870 
871  // Enable ANC insertion on first output frame
872  if (mFramesProcessed == 1)
873  mDevice.AncInsertSetEnable (sdiOutput, true);
874 
875  } // loop til quit signaled
876 
877  if (doAncInput)
878  mDevice.AncExtractSetEnable (sdiInput, false); // Stop ANC extractor
879  if (doAncOutput)
880  mDevice.AncInsertSetEnable (sdiOutput, false); // Stop ANC inserter
881 
882  if (doAncInput && mConfig.WithHanc())
883  mDevice.AncExtractSetFilterDIDs (sdiInput, savedDIDs); // Restore prior ANC filtering
884 
885  // Restore previous Anc buffer capacity...
886  mDevice.AncSetFrameBufferSize (savedF1ByteCapacity, savedF2ByteCapacity);
887  BURNNOTE("Thread completed, will exit");
888 
889 } // ProcessFrames
890 
891 
893 
894 
895 void NTV2LLBurn::GetStatus (ULWord & outFramesProcessed, ULWord & outFramesDropped)
896 {
897  outFramesProcessed = mFramesProcessed;
898  outFramesDropped = mFramesDropped;
899 
900 } // GetACStatus
901 
902 
904 {
905  switch (inInputSource)
906  {
907  case NTV2_INPUTSOURCE_SDI1: return kRegRP188InOut1DBB; // reg 29
908  case NTV2_INPUTSOURCE_SDI2: return kRegRP188InOut2DBB; // reg 64
909  case NTV2_INPUTSOURCE_SDI3: return kRegRP188InOut3DBB; // reg 268
910  case NTV2_INPUTSOURCE_SDI4: return kRegRP188InOut4DBB; // reg 273
911  case NTV2_INPUTSOURCE_SDI5: return kRegRP188InOut5DBB; // reg 342
912  case NTV2_INPUTSOURCE_SDI6: return kRegRP188InOut6DBB; // reg 418
913  case NTV2_INPUTSOURCE_SDI7: return kRegRP188InOut7DBB; // reg 427
914  case NTV2_INPUTSOURCE_SDI8: return kRegRP188InOut8DBB; // reg 436
915  default: return 0;
916  } // switch on input source
917 
918 } // GetRP188DBBRegNumForInput
919 
920 
922 {
923  bool result (false);
924  const ULWord regNum (GetRP188DBBRegNumForInput(mConfig.fInputSource));
925  ULWord regValue (0);
926 
927  // Bit 16 of the RP188 DBB register will be set if there is timecode embedded in the input signal...
928  if (regNum && mDevice.ReadRegister(regNum, regValue) && regValue & BIT(16))
929  result = true;
930  return result;
931 
932 } // InputSignalHasTimecode
933 
934 
936 {
937  ULWord regMask (kRegMaskLTC1InPresent);
938  ULWord regValue (0);
939  switch (mConfig.fTimecodeSource)
940  {
941  case NTV2_TCINDEX_LTC1: break;
942  case NTV2_TCINDEX_LTC2: regMask = kRegMaskLTC2InPresent; break;
943  default: return false;
944  }
945  mDevice.ReadRegister (kRegLTCStatusControl, regValue, regMask);
946  return regValue ? true : false;
947 
948 } // AnalogLTCInputHasTimecode
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:2703
CNTV2Card::StopAudioInput
virtual bool StopAudioInput(const NTV2AudioSystem inAudioSystem)
Stops the capture side of the given NTV2AudioSystem, and resets the capture position (i....
Definition: ntv2audio.cpp:1207
NTV2InputSourceToReferenceSource
NTV2ReferenceSource NTV2InputSourceToReferenceSource(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2ReferenceSource value.
Definition: ntv2utils.cpp:5020
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:4428
NTV2_INPUTSOURCE_SDI4
@ NTV2_INPUTSOURCE_SDI4
Identifies the 4th SDI video input.
Definition: ntv2enums.h:1268
NTV2_XptHDMIOutInput
@ NTV2_XptHDMIOutInput
Definition: ntv2enums.h:2851
GetSDIOutputInputXpt
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inSDIOutput, const bool inIsDS2=false)
Definition: ntv2signalrouter.cpp:972
NTV2_ANCSIZE_MAX
#define NTV2_ANCSIZE_MAX
Definition: ntv2llburn.cpp:21
NTV2InputSourceToChannel
NTV2Channel NTV2InputSourceToChannel(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2Channel value.
Definition: ntv2utils.cpp:5044
AJAAncDataLoc
Defines where the ancillary data can be found within a video stream.
Definition: ancillarydata.h:225
NTV2_AUDIO_LOOPBACK_OFF
@ NTV2_AUDIO_LOOPBACK_OFF
Embeds silence (zeroes) into the data stream.
Definition: ntv2enums.h:2026
NTV2FormatDescriptor::GetVideoWriteSize
ULWord GetVideoWriteSize(ULWord inPageSize=4096UL) const
Definition: ntv2formatdescriptor.cpp:957
NTV2LLBurn::SetupVideo
virtual AJAStatus SetupVideo(void)
Sets up everything I need for capturing and playing video.
Definition: ntv2llburn.cpp:164
NTV2_CHANNEL8
@ NTV2_CHANNEL8
Specifies channel or FrameStore 8 (or the 8th item).
Definition: ntv2enums.h:1362
kRegRP188InOut3DBB
@ kRegRP188InOut3DBB
Definition: ntv2publicinterface.h:409
NTV2_INPUTSOURCE_SDI6
@ NTV2_INPUTSOURCE_SDI6
Identifies the 6th SDI video input.
Definition: ntv2enums.h:1270
AJAAncillaryData::SetSID
virtual AJAStatus SetSID(const uint8_t inSID)
Sets my Secondary Data ID (SID) - (aka the Data Block Number (DBN) for "Type 1" SMPTE-291 packets).
Definition: ancillarydata.cpp:207
NTV2_FOURCC
#define NTV2_FOURCC(_a_, _b_, _c_, _d_)
Definition: ntv2publicinterface.h:5623
CNTV2Card::AncInsertSetEnable
virtual bool AncInsertSetEnable(const UWord inSDIOutput, const bool inIsEnabled)
Enables or disables the given SDI output's Anc inserter frame buffer reads. (Call NTV2DeviceCanDoCust...
Definition: ntv2anc.cpp:374
NTV2_CHANNEL2
@ NTV2_CHANNEL2
Specifies channel or FrameStore 2 (or the 2nd item).
Definition: ntv2enums.h:1356
NTV2_VANCDATA_NORMAL
@ NTV2_VANCDATA_NORMAL
Definition: ntv2enums.h:3800
AJA_ThreadPriority_High
@ AJA_ThreadPriority_High
Definition: thread.h:44
NTV2SmpteLineNumber::GetFirstActiveLine
ULWord GetFirstActiveLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
Definition: ntv2utils.cpp:4219
CNTV2Card::KickSDIWatchdog
virtual bool KickSDIWatchdog(void)
Restarts the countdown timer to prevent the watchdog timer from timing out.
Definition: ntv2register.cpp:4094
NTV2_WgtSDIMonOut1
@ NTV2_WgtSDIMonOut1
Definition: ntv2enums.h:2967
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
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:4176
NTV2_AUDIO_BUFFER_BIG
@ NTV2_AUDIO_BUFFER_BIG
Definition: ntv2enums.h:1915
CNTV2Card::AncInsertInit
virtual bool AncInsertInit(const UWord inSDIOutput, const NTV2Channel inChannel=NTV2_CHANNEL_INVALID, const NTV2Standard inStandard=NTV2_STANDARD_INVALID)
Initializes the given SDI output's Anc inserter for custom Anc packet insertion. (Call NTV2DeviceCanD...
Definition: ntv2anc.cpp:303
CNTV2Card::SetRP188Mode
virtual bool SetRP188Mode(const NTV2Channel inChannel, const NTV2_RP188Mode inMode)
Sets the current RP188 mode – NTV2_RP188_INPUT or NTV2_RP188_OUTPUT – for the given channel.
Definition: ntv2register.cpp:2554
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:405
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.
Is8BitFrameBufferFormat
bool Is8BitFrameBufferFormat(const NTV2FrameBufferFormat fbFormat)
Definition: ntv2utils.cpp:5449
HOST_AUDIO_BUFFER_SIZE
#define HOST_AUDIO_BUFFER_SIZE
Definition: ntv2llburn.cpp:401
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:1271
NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE
#define NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE(__f__)
Definition: ntv2enums.h:1045
AJAAncillaryList::SetFromDeviceAncBuffers
static AJAStatus SetFromDeviceAncBuffers(const NTV2Buffer &inF1AncBuffer, const NTV2Buffer &inF2AncBuffer, AJAAncillaryList &outPackets, const uint32_t inFrameNum=0)
Returns all ancillary data packets found in the given F1 and F2 ancillary data buffers.
Definition: ancillarylist.cpp:1124
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1353
NTV2Buffer
Describes a user-space buffer on the host computer. I have an address and a length,...
Definition: ntv2publicinterface.h:6216
NTV2SmpteLineNumber::GetLastLine
ULWord GetLastLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
Definition: ntv2formatdescriptor.cpp:1391
AUTOCIRCULATE_STATUS::acStartFrame
LWord acStartFrame
First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
Definition: ntv2publicinterface.h:7409
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:381
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6290
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:529
CNTV2Card::StopAudioOutput
virtual bool StopAudioOutput(const NTV2AudioSystem inAudioSystem)
Stops the playout side of the given NTV2AudioSystem, parking the "Read Head" at the start of the play...
Definition: ntv2audio.cpp:1117
GetNTV2FrameRateFromVideoFormat
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:3630
AJAThread::Attach
virtual AJAStatus Attach(AJAThreadFunction *pThreadFunction, void *pUserContext)
Definition: thread.cpp:169
CNTV2Card::SetRP188Data
virtual bool SetRP188Data(const NTV2Channel inSDIOutput, const NTV2_RP188 &inRP188Data)
Writes the raw RP188 data into the DBB/Low/Hi registers for the given SDI output. These values are la...
Definition: ntv2register.cpp:2584
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:1926
AJAAncDataLoc::SetLineNumber
AJAAncDataLoc & SetLineNumber(const uint16_t inLineNum)
Sets my anc data line number value.
Definition: ancillarydata.h:393
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:3758
AJATimeCodeBurn::BurnTimeCode
AJA_EXPORT bool BurnTimeCode(void *pBaseVideoAddress, const std::string &inTimeCodeStr, const uint32_t inYPercent)
Definition: timecodeburn.cpp:45
AJAAncillaryList::Print
virtual std::ostream & Print(std::ostream &oss, const bool inDetailed=true) const
Dumps a human-readable description of every packet in my list to the given output stream.
Definition: ancillarylist.cpp:1685
ancillarylist.h
Declares the AJAAncillaryList class.
AJA_STATUS_BUSY
@ AJA_STATUS_BUSY
Definition: types.h:391
CNTV2Card::GetAudioWrapAddress
virtual bool GetAudioWrapAddress(ULWord &outWrapAddress, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
For the given Audio System, answers with the wrap address, the threshold at which input/record or out...
Definition: ntv2audio.cpp:433
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:338
ntv2endian.h
Defines a number of handy byte-swapping macros.
BurnConfig::fDoMultiFormat
bool fDoMultiFormat
If true, enables device-sharing; otherwise takes exclusive control of the device.
Definition: ntv2democommon.h:396
BurnConfig::fSuppressAudio
bool fSuppressAudio
If true, suppress audio; otherwise include audio.
Definition: ntv2democommon.h:397
BurnConfig::fTimecodeSource
NTV2TCIndex fTimecodeSource
Timecode source to use.
Definition: ntv2democommon.h:395
appPID
int32_t appPID(0)
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3882
CNTV2Card::DMAReadAnc
virtual bool DMAReadAnc(const ULWord inFrameNumber, NTV2Buffer &outAncF1Buffer, NTV2Buffer &outAncF2Buffer=NULL_POINTER, const NTV2Channel inChannel=NTV2_CHANNEL1)
Transfers the contents of the ancillary data buffer(s) from a given frame on the AJA device to the ho...
Definition: ntv2dma.cpp:172
NTV2OutputDestinationToChannel
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
Definition: ntv2utils.cpp:5152
NTV2InputSourceToEmbeddedAudioInput
NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value.
Definition: ntv2utils.cpp:4874
CNTV2Card::AncSetFrameBufferSize
virtual bool AncSetFrameBufferSize(const ULWord inF1Size, const ULWord inF2Size)
Sets the capacity of the SDI ANC or HDMI AUX buffers in device frame memory. (Call NTV2DeviceCanDoCus...
Definition: ntv2anc.cpp:123
CNTV2Card::ClearRouting
virtual bool ClearRouting(void)
Removes all existing signal path connections between any and all widgets on the AJA device.
Definition: ntv2regroute.cpp:313
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:540
CNTV2Card::GetInputFrame
virtual bool GetInputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current input frame index number for the given FrameStore. This identifies which par...
Definition: ntv2register.cpp:2281
ntv2llburn.h
Header file for the low latency NTV2Burn demonstration class.
NTV2_WIDGET_INVALID
@ NTV2_WIDGET_INVALID
Definition: ntv2enums.h:3030
NTV2_AncRgn_Field2
@ NTV2_AncRgn_Field2
Identifies the "normal" Field 2 ancillary data region.
Definition: ntv2enums.h:4215
CNTV2Card::SetOutputFrame
virtual bool SetOutputFrame(const NTV2Channel inChannel, const ULWord inValue)
Sets the output frame index number for the given FrameStore. This identifies which frame in device SD...
Definition: ntv2register.cpp:2254
kRegRP188InOut5DBB
@ kRegRP188InOut5DBB
Definition: ntv2publicinterface.h:497
AJA_STATUS_MEMORY
@ AJA_STATUS_MEMORY
Definition: types.h:397
CNTV2Card::AncExtractSetFilterDIDs
virtual bool AncExtractSetFilterDIDs(const UWord inSDIInput, const NTV2DIDSet &inDIDs)
Replaces the DIDs to be excluded (filtered) by the given SDI input's Anc extractor....
Definition: ntv2anc.cpp:949
kRegMaskLTC2InPresent
@ kRegMaskLTC2InPresent
Definition: ntv2publicinterface.h:1967
CNTV2Card::AncExtractGetFilterDIDs
virtual bool AncExtractGetFilterDIDs(const UWord inSDIInput, NTV2DIDSet &outDIDs)
Answers with the DIDs currently being excluded (filtered) by the SDI input's Anc extractor....
Definition: ntv2anc.cpp:924
mVideoFormat
mVideoFormat
Definition: ntv2vcam.cpp:801
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:1810
AJAAncillaryData::SetDID
virtual AJAStatus SetDID(const uint8_t inDataID)
Sets my Data ID (DID).
Definition: ancillarydata.cpp:200
NTV2ChannelSetConstIter
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
Definition: ntv2publicinterface.h:3939
TimecodeFormat
TimecodeFormat
Definition: ntv2rp188.h:22
CNTV2Card::SetTaskMode
virtual bool SetTaskMode(const NTV2TaskMode inMode)
Sets the device's task mode.
Definition: ntv2register.cpp:179
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:1355
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:1856
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:3859
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:5164
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:3880
CNTV2Card::SetVANCShiftMode
virtual bool SetVANCShiftMode(NTV2Channel inChannel, NTV2VANCDataShiftMode inMode)
Enables or disables the "VANC Shift Mode" feature for the given channel.
Definition: ntv2register.cpp:2863
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:1838
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
AJAAncillaryList
I am an ordered collection of AJAAncillaryData instances which represent one or more SMPTE 291 data p...
Definition: ancillarylist.h:64
NTV2LLBurn::ProcessFrames
virtual void ProcessFrames(void)
Repeatedly captures, burns, and plays frames without using AutoCirculate (until global quit flag set)...
Definition: ntv2llburn.cpp:542
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:408
NTV2_INPUTSOURCE_HDMI3
@ NTV2_INPUTSOURCE_HDMI3
Identifies the 3rd HDMI video input.
Definition: ntv2enums.h:1263
CNTV2Card::AncExtractSetField2WriteParams
virtual bool AncExtractSetField2WriteParams(const UWord inSDIInput, const ULWord inFrameNumber, const NTV2Channel inChannel=NTV2_CHANNEL_INVALID, const NTV2Framesize inFrameSize=NTV2_FRAMESIZE_INVALID)
Configures the given SDI input's Anc extractor to receive the next frame's F2 Anc data....
Definition: ntv2anc.cpp:856
NTV2_CHANNEL6
@ NTV2_CHANNEL6
Specifies channel or FrameStore 6 (or the 6th item).
Definition: ntv2enums.h:1360
CNTV2Card::GetTaskMode
virtual bool GetTaskMode(NTV2TaskMode &outMode)
Retrieves the device's current task mode.
Definition: ntv2register.cpp:184
kRegMaskLTC1InPresent
@ kRegMaskLTC1InPresent
Definition: ntv2publicinterface.h:1965
NTV2InputSourceToAudioSystem
NTV2AudioSystem NTV2InputSourceToAudioSystem(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2AudioSystem value.
Definition: ntv2utils.cpp:5068
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
NTV2_CHANNEL4
@ NTV2_CHANNEL4
Specifies channel or FrameStore 4 (or the 4th item).
Definition: ntv2enums.h:1358
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
CNTV2Card::GetAncRegionOffsetAndSize
virtual bool GetAncRegionOffsetAndSize(ULWord &outByteOffset, ULWord &outByteCount, const NTV2AncillaryDataRegion inAncRegion=NTV2_AncRgn_All)
Answers with the offset and size of an ancillary data region within a device frame buffer.
Definition: ntv2dma.cpp:516
AJAAncillaryData::SetDataLocation
virtual AJAStatus SetDataLocation(const AJAAncDataLoc &inLoc)
Sets my ancillary data "location" within the video stream.
Definition: ancillarydata.cpp:268
CNTV2Card::AncInsertSetComponents
virtual bool AncInsertSetComponents(const UWord inSDIOutput, const bool inVancY, const bool inVancC, const bool inHancY, const bool inHancC)
Enables or disables individual Anc insertion components for the given SDI output. (Call NTV2DeviceCan...
Definition: ntv2anc.cpp:357
GetOutputDestInputXpt
NTV2InputXptID GetOutputDestInputXpt(const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2=false, const UWord inHDMI_Quadrant=99)
Definition: ntv2signalrouter.cpp:958
kAppSignature
const uint32_t kAppSignature(((((uint32_t)( 'L'))<< 24)|(((uint32_t)( 'l'))<< 16)|(((uint32_t)( 'b'))<< 8)|(((uint32_t)( 'u'))<< 0)))
BurnConfig::fPixelFormat
NTV2PixelFormat fPixelFormat
The pixel format to use.
Definition: ntv2democommon.h:394
NTV2LLBurn::StartRunThread
virtual void StartRunThread(void)
Starts my main worker thread.
Definition: ntv2llburn.cpp:514
NTV2_CHANNEL5
@ NTV2_CHANNEL5
Specifies channel or FrameStore 5 (or the 5th item).
Definition: ntv2enums.h:1359
GetIndexForNTV2InputSource
ULWord GetIndexForNTV2InputSource(const NTV2InputSource inValue)
Definition: ntv2utils.cpp:5271
CNTV2Card::features
virtual class DeviceCapabilities & features(void)
Definition: ntv2card.h:148
CNTV2Card::DMAWriteAudio
virtual bool DMAWriteAudio(const NTV2AudioSystem inAudioSystem, const ULWord *pInAudioBuffer, const ULWord inOffsetBytes, const ULWord inByteCount)
Synchronously transfers audio data from the specified host buffer to the given Audio System's buffer ...
Definition: ntv2dma.cpp:154
NTV2_INPUTSOURCE_ANALOG1
@ NTV2_INPUTSOURCE_ANALOG1
Identifies the first analog video input.
Definition: ntv2enums.h:1260
AJAThread
Definition: thread.h:69
AUTOCIRCULATE_WITH_ANC
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
Definition: ntv2publicinterface.h:5709
AJAThread::Active
virtual bool Active()
Definition: thread.cpp:116
NTV2_INPUTSOURCE_SDI1
@ NTV2_INPUTSOURCE_SDI1
Identifies the 1st SDI video input.
Definition: ntv2enums.h:1265
NTV2_IS_ANALOG_TIMECODE_INDEX
#define NTV2_IS_ANALOG_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3971
AJA_STATUS_NOINPUT
@ AJA_STATUS_NOINPUT
Definition: types.h:400
AJAStatus
AJAStatus
Definition: types.h:378
NTV2Buffer::DefaultPageSize
static size_t DefaultPageSize(void)
Definition: ntv2publicinterface.cpp:2191
NTV2_RP188_INPUT
@ NTV2_RP188_INPUT
Definition: ntv2enums.h:2093
NTV2FormatDescriptor::numPixels
ULWord numPixels
Width – total number of pixels per line.
Definition: ntv2formatdescriptor.h:367
NTV2LLBurn::RunThreadStatic
static void RunThreadStatic(AJAThread *pThread, void *pContext)
This is the worker thread's static callback function that gets called when the thread runs....
Definition: ntv2llburn.cpp:525
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:2573
CNTV2Card::SetRP188SourceFilter
virtual bool SetRP188SourceFilter(const NTV2Channel inSDIInput, const UWord inFilterValue)
Sets the RP188 DBB filter for the given SDI input.
Definition: ntv2register.cpp:2596
CNTV2Card::AncExtractGetField1Size
virtual bool AncExtractGetField1Size(const UWord inSDIInput, ULWord &outF1Size)
Answers with the number of bytes of field 1 ANC extracted. (Call NTV2DeviceCanDoCustomAnc to determin...
Definition: ntv2anc.cpp:974
CNTV2Card::AncExtractSetWriteParams
virtual bool AncExtractSetWriteParams(const UWord inSDIInput, const ULWord inFrameNumber, const NTV2Channel inChannel=NTV2_CHANNEL_INVALID, const NTV2Framesize inFrameSize=NTV2_FRAMESIZE_INVALID)
Configures the given SDI input's Anc extractor to receive the next frame's F1 Anc data....
Definition: ntv2anc.cpp:810
CNTV2Card::GetOutputFrame
virtual bool GetOutputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current output frame number for the given FrameStore (expressed as an NTV2Channel).
Definition: ntv2register.cpp:2263
CNTV2Card::AncInsertSetField2ReadParams
virtual bool AncInsertSetField2ReadParams(const UWord inSDIOutput, const ULWord inFrameNumber, const ULWord inF2Size, const NTV2Channel inChannel=NTV2_CHANNEL_INVALID, const NTV2Framesize inFrameSize=NTV2_FRAMESIZE_INVALID)
Configures the Anc inserter for the next frame's F2 Anc data to embed/transmit. (Call NTV2DeviceCanDo...
Definition: ntv2anc.cpp:456
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
REPLACE_OUTGOING_ANC_WITH_CUSTOM_PACKETS
static const bool REPLACE_OUTGOING_ANC_WITH_CUSTOM_PACKETS((0))
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:161
NTV2_AUDIOSYSTEM_2
@ NTV2_AUDIOSYSTEM_2
This identifies the 2nd Audio System.
Definition: ntv2enums.h:3883
NTV2_VANCMODE_OFF
@ NTV2_VANCMODE_OFF
This identifies the mode in which there are no VANC lines in the frame buffer.
Definition: ntv2enums.h:3784
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:4014
AJA_STATUS_FAIL
@ AJA_STATUS_FAIL
Definition: types.h:382
ULWord
uint32_t ULWord
Definition: ajatypes.h:276
kRegRP188InOut2DBB
@ kRegRP188InOut2DBB
Definition: ntv2publicinterface.h:185
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7405
NTV2LLBurn::SetupAudio
virtual AJAStatus SetupAudio(void)
Sets up everything I need for capturing and playing audio.
Definition: ntv2llburn.cpp:351
AsULWordPtr
#define AsULWordPtr(_p_)
Definition: ntv2llburn.cpp:27
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or FrameStore 7 (or the 7th item).
Definition: ntv2enums.h:1361
AJAAncillaryData
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
Definition: ancillarydata.h:552
CNTV2Card::AncExtractGetField2Size
virtual bool AncExtractGetField2Size(const UWord inSDIInput, ULWord &outF2Size)
Answers with the number of bytes of field 2 ANC extracted. (Call NTV2DeviceCanDoCustomAnc to determin...
Definition: ntv2anc.cpp:995
NTV2FormatDescriptor::numLines
ULWord numLines
Height – total number of lines.
Definition: ntv2formatdescriptor.h:366
CNTV2Card::GetAudioReadOffset
virtual bool GetAudioReadOffset(ULWord &outReadOffset, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
For the given Audio System, answers with the byte offset from the start of the audio buffer to the fi...
Definition: ntv2audio.cpp:449
NTV2_AncRgn_Field1
@ NTV2_AncRgn_Field1
Identifies the "normal" Field 1 ancillary data region.
Definition: ntv2enums.h:4214
NTV2EndianSwap32
#define NTV2EndianSwap32(__val__)
Definition: ntv2endian.h:19
AJAAncDataChannel_Y
@ AJAAncDataChannel_Y
The ancillary data is associated with the luminance (Y) channel of the video stream.
Definition: ancillarydata.h:133
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:675
CNTV2Card::SetMode
virtual bool SetMode(const NTV2Channel inChannel, const NTV2Mode inNewValue, const bool inIsRetail=(!(0)))
Determines if a given FrameStore on the AJA device will be used to capture or playout video.
Definition: ntv2register.cpp:1625
CNTV2DemoCommon::SetDefaultPageSize
static size_t SetDefaultPageSize(void)
Definition: ntv2democommon.cpp:1553
NTV2LLBurn::InputSignalHasTimecode
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false.
Definition: ntv2llburn.cpp:921
NTV2ACFrameRange
AutoCirculate Frame Range.
Definition: ntv2utils.h:971
BurnConfig::fWithHanc
bool fWithHanc
If true, capture & play HANC data, including audio (LLBurn). Defaults to false.
Definition: ntv2democommon.h:402
NTV2_INPUTSOURCE_INVALID
@ NTV2_INPUTSOURCE_INVALID
The invalid video input.
Definition: ntv2enums.h:1273
AsCU8Ptr
#define AsCU8Ptr(_p_)
Definition: ntv2llburn.cpp:28
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:849
GetFrameBufferInputXptFromChannel
#define GetFrameBufferInputXptFromChannel
Definition: ntv2signalrouter.h:732
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:1269
CNTV2Card::ReadAudioLastIn
virtual bool ReadAudioLastIn(ULWord &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
For the given Audio System, answers with the byte offset to the last byte of the latest chunk of 4-by...
Definition: ntv2audio.cpp:465
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:3714
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or FrameStore 3 (or the 3rd item).
Definition: ntv2enums.h:1357
CNTV2Card::DMAWriteAnc
virtual bool DMAWriteAnc(const ULWord inFrameNumber, NTV2Buffer &inAncF1Buffer, NTV2Buffer &inAncF2Buffer=NULL_POINTER, const NTV2Channel inChannel=NTV2_CHANNEL1)
Transfers the contents of the ancillary data buffer(s) from the host to a given frame on the AJA devi...
Definition: ntv2dma.cpp:228
UWord
uint16_t UWord
Definition: ajatypes.h:274
CNTV2Card::AutoCirculateGetStatus
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
Definition: ntv2autocirculate.cpp:668
NTV2_FBF_8BIT_YCBCR
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
Definition: ntv2enums.h:219
NTV2InputCrosspointID
NTV2InputCrosspointID
Identifies a widget input that potentially can accept a signal emitted from another widget's output (...
Definition: ntv2enums.h:2748
CNTV2Card::StartAudioOutput
virtual bool StartAudioOutput(const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI=(0))
Starts the playout side of the given NTV2AudioSystem, reading outgoing audio samples from the Audio S...
Definition: ntv2audio.cpp:1076
CNTV2Card::StartAudioInput
virtual bool StartAudioInput(const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI=(0))
Starts the capture side of the given NTV2AudioSystem, writing incoming audio samples into the Audio S...
Definition: ntv2audio.cpp:1165
CNTV2Card::DMAReadFrame
virtual bool DMAReadFrame(const ULWord inFrameNumber, ULWord *pOutFrameBuffer, const ULWord inByteCount)
Transfers a single frame from the AJA device to the host.
Definition: ntv2dma.cpp:41
GetCSCInputXptFromChannel
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
Definition: ntv2signalrouter.cpp:805
NTV2LLBurn::Run
virtual AJAStatus Run(void)
Runs me.
Definition: ntv2llburn.cpp:501
NTV2_DISABLE_TASKS
@ NTV2_DISABLE_TASKS
0: Disabled (never recommended): device configured exclusively by client application(s).
Definition: ntv2publicinterface.h:4464
NTV2LLBurn::Init
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2llburn.cpp:80
AJAAncillaryList::AddAncillaryData
virtual AJAStatus AddAncillaryData(const AJAAncillaryList &inPackets)
Appends a copy of the given list's packets to me.
Definition: ancillarylist.cpp:359
AJAAncillaryData::SetPayloadData
virtual AJAStatus SetPayloadData(const uint8_t *pInData, const uint32_t inByteCount)
Copy data from external memory into my local payload memory.
Definition: ancillarydata.cpp:354
NTV2LLBurn::RouteInputSignal
virtual void RouteInputSignal(void)
Sets up board routing for capture.
Definition: ntv2llburn.cpp:425
NTV2WidgetID
NTV2WidgetID
Definition: ntv2enums.h:2905
CNTV2DriverInterface::IsDeviceReady
virtual bool IsDeviceReady(const bool inCheckValid=(0))
Definition: ntv2driverinterface.cpp:1348
NTV2_INPUTSOURCE_HDMI4
@ NTV2_INPUTSOURCE_HDMI4
Identifies the 4th HDMI video input.
Definition: ntv2enums.h:1264
CNTV2Card::DMAReadAudio
virtual bool DMAReadAudio(const NTV2AudioSystem inAudioSystem, ULWord *pOutAudioBuffer, const ULWord inOffsetBytes, const ULWord inByteCount)
Synchronously transfers audio data from a given Audio System's buffer memory on the AJA device to the...
Definition: ntv2dma.cpp:136
NTV2_XptHDMIOutQ1Input
@ NTV2_XptHDMIOutQ1Input
Definition: ntv2enums.h:2852
DeviceCapabilities::CanDoInputSource
bool CanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2devicecapabilities.h:237
BurnConfig::fWithAnc
bool fWithAnc
If true, capture & play anc data (LLBurn). Defaults to false.
Definition: ntv2democommon.h:400
AJAAncillaryList::CountAncillaryData
virtual uint32_t CountAncillaryData(void) const
Answers with the number of AJAAncillaryData objects I contain (any/all types).
Definition: ancillarylist.h:216
NTV2_INPUTSOURCE_HDMI1
@ NTV2_INPUTSOURCE_HDMI1
Identifies the 1st HDMI video input.
Definition: ntv2enums.h:1261
CLEAR_DEVICE_ANC_BUFFER_AFTER_READ
static const bool CLEAR_DEVICE_ANC_BUFFER_AFTER_READ((0))
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:3428
CRP188
Definition: ntv2rp188.h:50
NTV2LLBurn::Quit
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2llburn.cpp:69
kRegRP188InOut1DBB
@ kRegRP188InOut1DBB
Definition: ntv2publicinterface.h:150
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:4196
CNTV2Card::SetSDIOutputAudioEnabled
virtual bool SetSDIOutputAudioEnabled(const NTV2Channel inSDIOutput, const bool &inEnable)
Enables or disables the audio output embedder for the given SDI output connector (specified as a chan...
Definition: ntv2audio.cpp:1640
NTV2_OUTPUT_DEST_IS_SDI
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
Definition: ntv2enums.h:1342
GetSmpteLineNumber
NTV2SmpteLineNumber GetSmpteLineNumber(const NTV2Standard inStandard)
For the given video standard, returns the SMPTE-designated line numbers for Field 1 and Field 2 that ...
Definition: ntv2utils.h:965
AJAAncillaryData::SetDataCoding
virtual AJAStatus SetDataCoding(const AJAAncDataCoding inCodingType)
Sets my ancillary data coding type (e.g. digital or analog/raw waveform).
Definition: ancillarydata.cpp:340
BurnConfig::fInputChannel
NTV2Channel fInputChannel
The input channel to use.
Definition: ntv2democommon.h:388
NTV2_RP188_OUTPUT
@ NTV2_RP188_OUTPUT
Definition: ntv2enums.h:2094
NTV2Buffer::GetHostAddress
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
Definition: ntv2publicinterface.cpp:1866
NTV2_INPUTSOURCE_HDMI2
@ NTV2_INPUTSOURCE_HDMI2
Identifies the 2nd HDMI video input.
Definition: ntv2enums.h:1262
NTV2OutputCrosspointID
NTV2OutputCrosspointID
Identifies a widget output, a signal source, that potentially can drive another widget's input (ident...
Definition: ntv2enums.h:2523
BurnConfig::fDeviceSpec
std::string fDeviceSpec
The AJA device to use.
Definition: ntv2democommon.h:386
NTV2Buffer::GetHostPointer
void * GetHostPointer(void) const
Definition: ntv2publicinterface.h:6273
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1258
CNTV2Card::AncInsertSetReadParams
virtual bool AncInsertSetReadParams(const UWord inSDIOutput, const ULWord inFrameNumber, const ULWord inF1Size, const NTV2Channel inChannel=NTV2_CHANNEL_INVALID, const NTV2Framesize inFrameSize=NTV2_FRAMESIZE_INVALID)
Configures the Anc inserter for the next frame's F1 Anc data to embed/transmit. (Call NTV2DeviceCanDo...
Definition: ntv2anc.cpp:414
BurnConfig::fInputSource
NTV2InputSource fInputSource
The device input connector to use.
Definition: ntv2democommon.h:390
ntv2formatdescriptor.h
Declares the NTV2FormatDescriptor class.
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:530
NTV2LLBurn::~NTV2LLBurn
virtual ~NTV2LLBurn()
Definition: ntv2llburn.cpp:48
AUTOCIRCULATE_STATUS::acEndFrame
LWord acEndFrame
Last frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
Definition: ntv2publicinterface.h:7410
NTV2_WgtHDMIOut1
@ NTV2_WgtHDMIOut1
Definition: ntv2enums.h:2942
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
AJA_STATUS_INITIALIZE
@ AJA_STATUS_INITIALIZE
Definition: types.h:386
NTV2SmpteLineNumber
Used to describe Start of Active Video (SAV) location and field dominance for a given NTV2Standard....
Definition: ntv2utils.h:879
AJAAncDataStream_1
@ AJAAncDataStream_1
The ancillary data is associated with DS1 of the video stream (Link A).
Definition: ancillarydata.h:105
false
#define false
Definition: ntv2devicefeatures.h:25
AUTOCIRCULATE_WITH_RP188
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
Definition: ntv2publicinterface.h:5703
NTV2_OUTPUTDESTINATION_INVALID
@ NTV2_OUTPUTDESTINATION_INVALID
Definition: ntv2enums.h:1332
CNTV2Card::AncExtractInit
virtual bool AncExtractInit(const UWord inSDIInput, const NTV2Channel inChannel=NTV2_CHANNEL_INVALID, const NTV2Standard inStandard=NTV2_STANDARD_INVALID)
Initializes the given SDI input's Anc extractor for custom Anc packet detection and de-embedding....
Definition: ntv2anc.cpp:706
kRegRP188InOut4DBB
@ kRegRP188InOut4DBB
Definition: ntv2publicinterface.h:414
NTV2_MODE_CAPTURE
@ NTV2_MODE_CAPTURE
Capture (input) mode, which writes into device SDRAM.
Definition: ntv2enums.h:1239
NTV2_INPUTSOURCE_SDI8
@ NTV2_INPUTSOURCE_SDI8
Identifies the 8th SDI video input.
Definition: ntv2enums.h:1272
AJA_STATUS_BAD_PARAM
@ AJA_STATUS_BAD_PARAM
Definition: types.h:392
GetFrameBufferOutputXptFromChannel
#define GetFrameBufferOutputXptFromChannel
Definition: ntv2signalrouter.h:731
ULWord64
uint64_t ULWord64
Definition: ajatypes.h:279
AJAAncillaryList::GetTransmitData
virtual AJAStatus GetTransmitData(NTV2Buffer &F1Buffer, NTV2Buffer &F2Buffer, const bool inIsProgressive=true, const uint32_t inF2StartLine=0)
Encodes my AJAAncillaryData packets into the given buffers in the default SDI Anc Buffer Data Format ...
Definition: ancillarylist.cpp:1325
NTV2_INPUTSOURCE_SDI2
@ NTV2_INPUTSOURCE_SDI2
Identifies the 2nd SDI video input.
Definition: ntv2enums.h:1266
std
Definition: json.hpp:5362
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:7002
NTV2_TCINDEX_LTC2
@ NTV2_TCINDEX_LTC2
Analog LTC 2.
Definition: ntv2enums.h:3946
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5407
NTV2LLBurn
Captures video and audio from a signal provided to an input of an AJA device, burns timecode into the...
Definition: ntv2llburn.h:32
CNTV2DemoCommon::GetAJAPixelFormat
static AJA_PixelFormat GetAJAPixelFormat(const NTV2PixelFormat inFormat)
Definition: ntv2democommon.cpp:1112
appSignature
ULWord appSignature(0)
NTV2_WgtHDMIOut1v2
@ NTV2_WgtHDMIOut1v2
Definition: ntv2enums.h:2966
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:364
NTV2LLBurn::NTV2LLBurn
NTV2LLBurn(const BurnConfig &inConfig)
Constructs me using the given configuration settings.
Definition: ntv2llburn.cpp:31
PRINT_ANC_PACKETS_AFTER_READ
static const bool PRINT_ANC_PACKETS_AFTER_READ((0))
CLEAR_HOST_ANC_BUFFER_BEFORE_READ
static const bool CLEAR_HOST_ANC_BUFFER_BEFORE_READ((0))
Bouncer
A handy class that makes it easy to "bounce" an unsigned integer value between a minimum and maximum ...
Definition: ntv2democommon.h:167
NTV2_WgtAnalogOut1
@ NTV2_WgtAnalogOut1
Definition: ntv2enums.h:2939
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:505
DeviceCapabilities::CanDoWidget
bool CanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2devicecapabilities.h:264
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:394
true
#define true
Definition: ntv2devicefeatures.h:26
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:420
AJAAncDataCoding_Digital
@ AJAAncDataCoding_Digital
The ancillary data is in the form of a SMPTE-291 Ancillary Packet.
Definition: ancillarydata.h:476
GetInputSourceOutputXpt
NTV2OutputXptID GetInputSourceOutputXpt(const NTV2InputSource inInputSource, const bool inIsSDI_DS2=false, const bool inIsHDMI_RGB=false, const UWord inHDMI_Quadrant=0)
Definition: ntv2signalrouter.cpp:895
NTV2LLBurn::GetStatus
virtual void GetStatus(ULWord &outFramesProcessed, ULWord &outFramesDropped)
Provides status information about my input (capture) and output (playout) processes.
Definition: ntv2llburn.cpp:895
CNTV2Card::SetInputFrame
virtual bool SetInputFrame(const NTV2Channel inChannel, const ULWord inValue)
Sets the input frame index number for the given FrameStore. This identifies which frame in device SDR...
Definition: ntv2register.cpp:2272
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
NTV2LLBurn::RouteOutputSignal
virtual void RouteOutputSignal(void)
Sets up board routing for playout.
Definition: ntv2llburn.cpp:447
CNTV2Card::IsRP188BypassEnabled
virtual bool IsRP188BypassEnabled(const NTV2Channel inSDIOutput, bool &outIsBypassEnabled)
Answers if the SDI output's RP-188 bypass mode is enabled or not.
Definition: ntv2register.cpp:2612
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:2625
NTV2ChannelToString
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5724
NTV2_INPUT_SOURCE_IS_SDI
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
Definition: ntv2enums.h:1279
GetNTV2StandardFromVideoFormat
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:2375
NTV2Buffer::Fill
bool Fill(const T &inValue)
Fills me with the given scalar value.
Definition: ntv2publicinterface.h:6442
AJAThread::SetPriority
virtual AJAStatus SetPriority(AJAThreadPriority priority)
Definition: thread.cpp:133
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
AJAAncDataSpace_VANC
@ AJAAncDataSpace_VANC
Ancillary data found between SAV and EAV (.
Definition: ancillarydata.h:177
CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1058
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
kNumFrameBuffers
const uint32_t kNumFrameBuffers(2)
kRegRP188InOut7DBB
@ kRegRP188InOut7DBB
Definition: ntv2publicinterface.h:603
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:1267
AJAThread::Start
virtual AJAStatus Start()
Definition: thread.cpp:91
NTV2InputSourceToAudioSource
NTV2AudioSource NTV2InputSourceToAudioSource(const NTV2InputSource inInputSource)
Definition: ntv2utils.cpp:4898
NTV2DIDSet
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
Definition: ntv2publicinterface.h:76
BIT
#define BIT(_x_)
Definition: ajatypes.h:585
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
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3880
AJA_FAILURE
#define AJA_FAILURE(_status_)
Definition: types.h:371
CNTV2Card::AncExtractSetEnable
virtual bool AncExtractSetEnable(const UWord inSDIInput, const bool inIsEnabled)
Enables or disables the given SDI input's Anc extractor. (Call NTV2DeviceCanDoCustomAnc to determine ...
Definition: ntv2anc.cpp:772
NTV2_TCINDEX_LTC1
@ NTV2_TCINDEX_LTC1
Analog LTC 1.
Definition: ntv2enums.h:3945
NTV2_INPUT_SOURCE_IS_ANALOG
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
Definition: ntv2enums.h:1278
kRegLTCStatusControl
@ kRegLTCStatusControl
Definition: ntv2publicinterface.h:374
BurnConfig
Configures an NTV2Burn or NTV2FieldBurn instance.
Definition: ntv2democommon.h:383
CNTV2Card::EnableChannel
virtual bool EnableChannel(const NTV2Channel inChannel)
Enables the given FrameStore.
Definition: ntv2register.cpp:2160
NTV2_MODE_DISPLAY
@ NTV2_MODE_DISPLAY
Playout (output) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1237
CNTV2Card::SetAudioCaptureEnable
virtual bool SetAudioCaptureEnable(const NTV2AudioSystem inAudioSystem, const bool inEnable)
Enables or disables the writing of incoming audio into the given Audio System's capture buffer.
Definition: ntv2audio.cpp:1226
DeviceCapabilities::CanDoFrameBufferFormat
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2devicecapabilities.h:227
NTV2_XptAnalogOutInput
@ NTV2_XptAnalogOutInput
Definition: ntv2enums.h:2868
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:541
AJAAncDataLink_A
@ AJAAncDataLink_A
The ancillary data is associated with Link A of the video stream.
Definition: ancillarydata.h:81
DEVICE_ID_NOTFOUND
@ DEVICE_ID_NOTFOUND
Invalid or "not found".
Definition: ntv2enums.h:95
NTV2LLBurn::SetupHostBuffers
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
Definition: ntv2llburn.cpp:403
GetRP188DBBRegNumForInput
static ULWord GetRP188DBBRegNumForInput(const NTV2InputSource inInputSource)
Definition: ntv2llburn.cpp:903
CRP188::GetRP188Str
bool GetRP188Str(std::string &sRP188) const
Definition: ntv2rp188.cpp:918
BurnConfig::fOutputChannel
NTV2Channel fOutputChannel
The output channel to use.
Definition: ntv2democommon.h:389
NTV2_FIELD1
@ NTV2_FIELD1
Identifies the last (second) field in time for an interlaced video frame.
Definition: ntv2enums.h:1839
NTV2LLBurn::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: ntv2llburn.cpp:935
kRegRP188InOut6DBB
@ kRegRP188InOut6DBB
Definition: ntv2publicinterface.h:593
BURNNOTE
#define BURNNOTE(_expr_)
Definition: ntv2democommon.h:43
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_OEM_TASKS
@ NTV2_OEM_TASKS
2: OEM (recommended): device configured by client application(s) with some driver involvement.
Definition: ntv2publicinterface.h:4466
kRegRP188InOut8DBB
@ kRegRP188InOut8DBB
Definition: ntv2publicinterface.h:613
CNTV2Card::AncExtractSetComponents
virtual bool AncExtractSetComponents(const UWord inSDIInput, const bool inVancY, const bool inVancC, const bool inHancY, const bool inHancC)
Enables or disables the Anc extraction components for the given SDI input. (Call NTV2DeviceCanDoCusto...
Definition: ntv2anc.cpp:760
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3892