AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
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),
35  mVideoFormat (NTV2_FORMAT_UNKNOWN),
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.SetEveryFrameServices (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.GetEveryFrameServices (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.SetEveryFrameServices (NTV2_OEM_TASKS); // Set the OEM service level
109  mDevice.ClearRouting (); // Clear the current device routing (since I "own" the device)
110  }
111  else
112  mDevice.SetEveryFrameServices (NTV2_OEM_TASKS); // Force OEM tasks
113 
114  // Configure the SDI relays if present
115  if (mDevice.features().HasSDIRelays())
116  {
117  // Note that if the board's jumpers are not set in the position
118  // to enable the watchdog timer, these calls will have no effect.
119  mDevice.SetSDIWatchdogEnable(true, 0); // SDI 1/2
120  mDevice.SetSDIWatchdogEnable(true, 1); // SDI 3/4
121 
122  // Set timeout delay to 2 seconds expressed in multiples of 8 ns
123  // and take the relays out of bypass
124  mDevice.SetSDIWatchdogTimeout (2 * 125000000);
125  mDevice.KickSDIWatchdog ();
126 
127  // Give the mechanical relays some time to switch
128  AJATime::Sleep (500);
129  }
130 
131  if (mConfig.WithHanc())
132  {
133  // Transfer audio using HANC extractor/inserter
134  mConfig.fWithAnc = true;
135  mConfig.fSuppressAudio = true;
136  }
137 
138  if (mConfig.WithAnc() && !mDevice.features().CanDoCustomAnc())
139  {cerr << "## WARNING: Device doesn't support custom Anc, '-a -h' option ignored" << endl; mConfig.fWithAnc = false; mConfig.fWithHanc = false;}
140 
141  // Set up the video and audio...
142  status = SetupVideo();
143  if (AJA_FAILURE (status))
144  return status;
145 
146  status = SetupAudio();
147  if (AJA_FAILURE (status))
148  return status;
149 
150  // Set up the circular buffers...
151  status = SetupHostBuffers();
152  if (AJA_FAILURE (status))
153  return status;
154 
156  mDevice.SetLTCInputEnable(true); // Enable analog LTC input (some LTC inputs are shared with reference input)
157 
158  // Lastly, prepare my AJATimeCodeBurn instance...
159  mTCBurner.RenderTimeCodeFont (CNTV2DemoCommon::GetAJAPixelFormat (mConfig.fPixelFormat), mFormatDesc.numPixels, mFormatDesc.numLines);
160 
161  return AJA_STATUS_SUCCESS;
162 
163 } // Init
164 
165 
167 {
168  const uint16_t numFrameStores (mDevice.features().GetNumFrameStores());
169  const uint16_t numSDIOutputs (mDevice.features().GetNumVideoOutputs());
170 
171  // Can the device support the desired input source?
172  if (!mDevice.features().CanDoInputSource(mConfig.fInputSource))
173  {cerr << "## ERROR: This device cannot receive input from the specified source" << endl; return AJA_STATUS_BAD_PARAM;}
174 
175  // Pick an input NTV2Channel from the input source, and enable its frame buffer...
177  mDevice.EnableChannel (mConfig.fInputChannel); // Enable the input frame buffer
178 
179  // Pick an appropriate output NTV2Channel, and enable its frame buffer...
180  switch (mConfig.fInputSource)
181  {
182  case NTV2_INPUTSOURCE_SDI1: mConfig.fOutputChannel = numSDIOutputs < 3 || numFrameStores == 2 || numFrameStores > 4 ? NTV2_CHANNEL2 : NTV2_CHANNEL3; break;
183 
185  case NTV2_INPUTSOURCE_SDI2: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL3 : NTV2_CHANNEL4; break;
186 
188  case NTV2_INPUTSOURCE_SDI3: mConfig.fOutputChannel = NTV2_CHANNEL4; break;
189 
191  case NTV2_INPUTSOURCE_SDI4: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL5 : NTV2_CHANNEL3; break;
192 
193  case NTV2_INPUTSOURCE_SDI5: mConfig.fOutputChannel = NTV2_CHANNEL6; break;
194  case NTV2_INPUTSOURCE_SDI6: mConfig.fOutputChannel = NTV2_CHANNEL7; break;
195  case NTV2_INPUTSOURCE_SDI7: mConfig.fOutputChannel = NTV2_CHANNEL8; break;
196  case NTV2_INPUTSOURCE_SDI8: mConfig.fOutputChannel = NTV2_CHANNEL7; break;
197 
199  case NTV2_INPUTSOURCE_HDMI1: mConfig.fOutputChannel = numFrameStores < 3 ? NTV2_CHANNEL2 : NTV2_CHANNEL3;
200  mAudioSystem = NTV2_AUDIOSYSTEM_2;
201  break;
202 // default:
203  case NTV2_INPUTSOURCE_INVALID: cerr << "## ERROR: Bad input source" << endl; return AJA_STATUS_BAD_PARAM;
204  }
205 
206  // Check to see if desired input/output channels are in use by Auto-Circulate, i.e. another Auto-Circulate-based ntv2 demo is running.
207  AUTOCIRCULATE_STATUS acStatus;
208  if (!mDevice.AutoCirculateInitForInput( mConfig.fInputChannel,
212  | (mDevice.features().CanDoCustomAnc() ? AUTOCIRCULATE_WITH_ANC : 0),
213  1, // numChannels to gang
214  0, 0))
215  {
216  cerr << "Failed to init " << NTV2ChannelToString(mConfig.fInputChannel) << " for input. Is channel in-use by Auto-Circulate?" << endl;
217  return AJA_STATUS_FAIL;
218  }
219  if (!mDevice.AutoCirculateGetStatus(mConfig.fInputChannel, acStatus))
220  {
221  cerr << "Error getting Auto-Circulate status for input channel " << NTV2ChannelToString(mConfig.fInputChannel) << endl;
222  return AJA_STATUS_FAIL;
223  }
224  mInputStartFrame = acStatus.acStartFrame;
225  mInputEndFrame = acStatus.acEndFrame;
226 
227  if (!mDevice.AutoCirculateInitForOutput( mConfig.fOutputChannel,
231  | (mDevice.features().CanDoCustomAnc() ? AUTOCIRCULATE_WITH_ANC : 0),
232  1, // numChannels to gang
233  0, 0))
234  {
235  cerr << "Failed to init " << NTV2ChannelToString(mConfig.fOutputChannel) << " for output. Is channel in-use by Auto-Circulate?" << endl;
236  return AJA_STATUS_FAIL;
237  }
238  if (!mDevice.AutoCirculateGetStatus(mConfig.fOutputChannel, acStatus))
239  {
240  cerr << "Error getting Auto-Circulate status for output channel " << NTV2ChannelToString(mConfig.fOutputChannel) << endl;
241  return AJA_STATUS_FAIL;
242  }
243  mOutputStartFrame = acStatus.acStartFrame;
244  mOutputEndFrame = acStatus.acEndFrame;
245 
246  mDevice.AutoCirculateStop(mConfig.fInputChannel);
247  mDevice.AutoCirculateStop(mConfig.fOutputChannel);
248 
249  bool isTransmit (false);
250  if (mDevice.features().HasBiDirectionalSDI() // If device has bidirectional SDI connectors...
251  && NTV2_INPUT_SOURCE_IS_SDI(mConfig.fInputSource) // ...and desired input source is SDI...
252  && mDevice.GetSDITransmitEnable (mConfig.fInputChannel, isTransmit) // ...and GetSDITransmitEnable succeeds...
253  && isTransmit) // ...and input is set to "transmit"...
254  {
255  mDevice.SetSDITransmitEnable (mConfig.fInputChannel, false); // ...then disable transmit mode...
256  mDevice.WaitForInputVerticalInterrupt(mConfig.fInputChannel, 20); // ...and give the device a dozen frames or so to lock to the input signal
257  } // if input SDI connector needs to switch from transmit mode
258 
259  if (mConfig.WithAnc() && !NTV2_INPUT_SOURCE_IS_SDI(mConfig.fInputSource))
260  cerr << "## WARNING: Non-SDI input source, no Anc capture possible" << endl;
261 
262  // Determine the input video signal format, and set the device's reference source to that input...
263  mVideoFormat = mDevice.GetInputVideoFormat (mConfig.fInputSource);
264  if (mVideoFormat == NTV2_FORMAT_UNKNOWN)
265  {
266  cerr << "## ERROR: The specified input has no signal, or the device cannot handle the signal format" << endl;
267  return AJA_STATUS_NOINPUT; // Sorry, can't handle this format
268  }
269 
271  mAudioSystem = ::NTV2InputSourceToAudioSystem (mConfig.fInputSource);
272  mOutputDest = ::NTV2ChannelToOutputDestination (mConfig.fOutputChannel);
273 
274  if (mDevice.features().HasBiDirectionalSDI() // If device has bidirectional SDI connectors...
275  && NTV2_OUTPUT_DEST_IS_SDI(mOutputDest)) // ...and output destination is SDI...
276  mDevice.SetSDITransmitEnable (mConfig.fOutputChannel, true); // ...then enable transmit mode
277 
278  if (mConfig.WithAnc() && !NTV2_OUTPUT_DEST_IS_SDI(mOutputDest))
279  cerr << "## WARNING: Non-SDI output destination, no Anc playout possible" << endl;
280 
281  mDevice.EnableChannel (mConfig.fInputChannel); // Enable the input frame buffer
282  mDevice.EnableChannel (mConfig.fOutputChannel); // Enable the output frame buffer
283 
284  if (mDevice.features().CanDoMultiFormat() && mConfig.fDoMultiFormat)
285  mDevice.SetMultiFormatMode (true);
286  else if (mDevice.features().CanDoMultiFormat())
287  mDevice.SetMultiFormatMode (false);
288 
289  // Set the input channel format to the detected input format...
290  mDevice.SetVideoFormat (mVideoFormat, false, false, mDevice.features().CanDoMultiFormat() ? mConfig.fInputChannel : NTV2_CHANNEL1);
291  if (mDevice.features().CanDoMultiFormat()) // If device supports multiple formats per-channel...
292  mDevice.SetVideoFormat (mVideoFormat, false, false, mConfig.fOutputChannel); // ...then also set the output channel format to the detected input format
293 
294  // Set the frame buffer pixel format for both channels on the device, assuming it
295  // supports that pixel format . . . otherwise default to 8-bit YCbCr...
296  if (!mDevice.features().CanDoFrameBufferFormat(mConfig.fPixelFormat))
298 
299  // Set the pixel format for both device frame buffers...
300  mDevice.SetFrameBufferFormat (mConfig.fInputChannel, mConfig.fPixelFormat);
301  mDevice.SetFrameBufferFormat (mConfig.fOutputChannel, mConfig.fPixelFormat);
302 
303  // Enable and subscribe to the interrupts for the channel to be used...
304  mDevice.EnableInputInterrupt (mConfig.fInputChannel);
305  mDevice.SubscribeInputVerticalEvent (mConfig.fInputChannel);
306 
307  // Enable and subscribe to the output interrupts (though it's enabled by default)...
308  mDevice.EnableOutputInterrupt (mConfig.fOutputChannel);
310 
311  // Set the Frame Store modes
312  mDevice.SetMode (mConfig.fInputChannel, NTV2_MODE_CAPTURE);
313  mDevice.SetMode (mConfig.fOutputChannel, NTV2_MODE_DISPLAY);
314 
315  // Set up the device signal routing, and both playout and capture AutoCirculate...
318 
319  // Now that newer AJA devices can capture/play anc data from separate buffers,
320  // there's no need to enable VANC frame geometries...
321  mDevice.SetVANCMode (NTV2_VANCMODE_OFF, mConfig.fInputChannel);
322  mDevice.SetVANCMode (NTV2_VANCMODE_OFF, mConfig.fOutputChannel);
323  if (::Is8BitFrameBufferFormat(mConfig.fPixelFormat))
324  { // 8-bit FBFs: since not using VANC geometries, disable bit shift...
327  }
328 
329  // Be sure the RP188 mode for the SDI input (expressed as an NTV2Channel),
330  // is set to NTV2_RP188_INPUT...
331  bool isBypassEnabled (false);
332  mDevice.IsRP188BypassEnabled (mConfig.fInputChannel, isBypassEnabled);
333  if (isBypassEnabled)
334  mDevice.DisableRP188Bypass (mConfig.fInputChannel);
335  mDevice.SetRP188Mode (mConfig.fInputChannel, NTV2_RP188_INPUT);
336  mDevice.SetRP188SourceFilter (mConfig.fInputChannel, 0); // 0=LTC 1=VITC1 2=VITC2
337 
338  // Make sure the RP188 mode for all SDI outputs is NTV2_RP188_OUTPUT, and that their RP188
339  // registers are not bypassed (i.e. timecode isn't sourced from an SDI input, as for E-E mode)...
340  NTV2_ASSERT(!mRP188Outputs.empty());
341  for (NTV2ChannelSetConstIter iter(mRP188Outputs.begin()); iter != mRP188Outputs.end(); ++iter)
342  {
343  mDevice.SetRP188Mode (*iter, NTV2_RP188_OUTPUT);
344  mDevice.DisableRP188Bypass (*iter);
345  }
346 
347  // Tell the hardware which buffers to use until the main worker thread runs
348  mDevice.SetInputFrame (mConfig.fInputChannel, 0);
349  mDevice.SetOutputFrame(mConfig.fOutputChannel, 2);
350 
351  // Now that the video is set up, get information about the current frame geometry...
352  mFormatDesc = NTV2FormatDescriptor (mVideoFormat, mConfig.fPixelFormat);
353  return AJA_STATUS_SUCCESS;
354 
355 } // SetupVideo
356 
357 
359 {
360  // Have the audio subsystem capture audio from the designated input source...
362 
363  // It's best to use all available audio channels...
364  mDevice.SetNumberAudioChannels (mDevice.features().GetMaxAudioChannels(), mAudioSystem);
365 
366  // Assume 48kHz PCM...
367  mDevice.SetAudioRate (NTV2_AUDIO_48K, mAudioSystem);
368 
369  // 4MB device audio buffers work best...
370  mDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mAudioSystem);
371 
372  // Set up the output audio embedders...
373  if (mDevice.features().GetNumAudioSystems() > 1)
374  {
375  // Some devices, like the Kona1, have 2 FrameStores but only 1 SDI output,
376  // which makes mConfig.fOutputChannel == NTV2_CHANNEL2, but need SDIoutput to be NTV2_CHANNEL1...
377  UWord SDIoutput(mConfig.fOutputChannel);
378  if (SDIoutput >= mDevice.features().GetNumVideoOutputs())
379  SDIoutput = mDevice.features().GetNumVideoOutputs() - 1;
380  mDevice.SetSDIOutputAudioSystem (NTV2Channel(SDIoutput), mAudioSystem);
381  }
382 
383  //
384  // Loopback mode plays whatever audio appears in the input signal when it's
385  // connected directly to an output (i.e., "end-to-end" mode). If loopback is
386  // left enabled, the video will lag the audio as video frames get briefly delayed
387  // in our ring buffer. Audio, therefore, needs to come out of the (buffered) frame
388  // data being played, so loopback must be turned off...
389  //
390  mDevice.SetAudioLoopBack (NTV2_AUDIO_LOOPBACK_OFF, mAudioSystem);
391 
392  // Reset both the input and output sides of the audio system so that the buffer
393  // pointers are reset to zero and inhibited from advancing.
394  mDevice.StopAudioOutput (mAudioSystem);
395  mDevice.StopAudioInput (mAudioSystem);
396 
397  // Ensure that the audio system will capture samples when the reset is removed
398  mDevice.SetAudioCaptureEnable (mAudioSystem, true);
399 
400  return AJA_STATUS_SUCCESS;
401 
402 } // SetupAudio
403 
404 
406 {
407  CNTV2DemoCommon::SetDefaultPageSize(); // Set host-specific page size
408 
409  // Allocate and add each in-host buffer to my member variables.
410  // DMA performance can be accelerated slightly by using page-aligned video buffers...
411  mpHostVideoBuffer.Allocate(mFormatDesc.GetVideoWriteSize(ULWord(NTV2Buffer::DefaultPageSize())), true);
412  mpHostAudioBuffer.Allocate(NTV2_AUDIOSIZE_MAX, /*page-aligned*/true);
413  mpHostF1AncBuffer.Allocate(mConfig.WithAnc() ? NTV2_ANCSIZE_MAX : 0, /*pageAligned*/true);
414  mpHostF2AncBuffer = NTV2Buffer(mConfig.WithAnc() ? NTV2_ANCSIZE_MAX : 0);
415 
416  if (!mpHostVideoBuffer || !mpHostAudioBuffer || (mConfig.WithAnc() && !mpHostF1AncBuffer) || (mConfig.WithAnc() && !mpHostF2AncBuffer))
417  {
418  cerr << "## ERROR: Unable to allocate host buffer(s)" << endl;
419  return AJA_STATUS_MEMORY;
420  }
421 
422  return AJA_STATUS_SUCCESS;
423 
424 } // SetupHostBuffers
425 
426 
428 {
429  const NTV2OutputCrosspointID inputOutputXpt (::GetInputSourceOutputXpt (mConfig.fInputSource));
431 
432  if (::IsRGBFormat (mConfig.fPixelFormat))
433  {
434  // If the frame buffer is configured for RGB pixel format, incoming YUV must be converted.
435  // This routes the video signal from the input through a color space converter before
436  // connecting to the RGB frame buffer...
437  const NTV2InputCrosspointID cscVideoInputXpt (::GetCSCInputXptFromChannel (mConfig.fInputChannel));
438  const NTV2OutputCrosspointID cscOutputXpt (::GetCSCOutputXptFromChannel (mConfig.fInputChannel, false, true)); // false=video, true=RGB
439 
440  mDevice.Connect (cscVideoInputXpt, inputOutputXpt); // Connect the CSC's video input to the input spigot's output
441  mDevice.Connect (fbInputXpt, cscOutputXpt); // Connect the frame store's input to the CSC's output
442  }
443  else
444  mDevice.Connect (fbInputXpt, inputOutputXpt); // Route the YCbCr signal directly from the input to the frame buffer's input
445 
446 } // RouteInputSignal
447 
448 
450 {
451  const NTV2InputCrosspointID outputInputXpt (::GetOutputDestInputXpt (mOutputDest));
453  NTV2OutputCrosspointID outputXpt (fbOutputXpt);
454 
455  mRP188Outputs.clear();
456  mRP188Outputs.insert(mConfig.fOutputChannel);
457  if (::IsRGBFormat (mConfig.fPixelFormat))
458  {
459  const NTV2OutputCrosspointID cscVidOutputXpt (::GetCSCOutputXptFromChannel (mConfig.fOutputChannel)); // Use CSC's YUV video output
460  const NTV2InputCrosspointID cscVidInputXpt (::GetCSCInputXptFromChannel (mConfig.fOutputChannel));
461 
462  mDevice.Connect (cscVidInputXpt, fbOutputXpt); // Connect the CSC's video input to the frame store's output
463  mDevice.Connect (outputInputXpt, cscVidOutputXpt); // Connect the SDI output's input to the CSC's video output
464  outputXpt = cscVidOutputXpt;
465  }
466  else
467  mDevice.Connect (outputInputXpt, outputXpt);
468 
469  if (!mConfig.fDoMultiFormat)
470  {
471  // Route all SDI outputs to the outputXpt...
472  const NTV2Channel startNum (NTV2_CHANNEL1);
473  const NTV2Channel endNum (NTV2Channel(mDevice.features().GetNumVideoChannels()));
474  NTV2WidgetID outputWidgetID (NTV2_WIDGET_INVALID);
475 
476  for (NTV2Channel chan(startNum); chan < endNum; chan = NTV2Channel(chan+1))
477  {
478  mDevice.SetRP188SourceFilter (chan, 0); // Set all SDI spigots to capture embedded LTC (0==LTC 1==VITC1 2==VITC2)
479  if (chan == mConfig.fInputChannel || chan == mConfig.fOutputChannel)
480  continue; // Skip the input & output channel, already routed
481  mRP188Outputs.insert(chan); // Add this SDI spigot to those we'll push timecode into
482  if (mDevice.features().HasBiDirectionalSDI())
483  mDevice.SetSDITransmitEnable (chan, true);
484  if (CNTV2SignalRouter::GetWidgetForInput (::GetSDIOutputInputXpt (chan, mDevice.features().CanDoDualLink()), outputWidgetID))
485  if (mDevice.features().CanDoWidget(outputWidgetID))
486  mDevice.Connect (::GetSDIOutputInputXpt(chan), outputXpt);
487  } // for each output spigot
488 
489  // If HDMI and/or analog video outputs are available, route them, too...
490  if (mDevice.features().CanDoWidget(NTV2_WgtHDMIOut1))
491  mDevice.Connect (NTV2_XptHDMIOutInput, outputXpt); // Route the output signal to the HDMI output
492  if (mDevice.features().CanDoWidget(NTV2_WgtHDMIOut1v2))
493  mDevice.Connect (NTV2_XptHDMIOutQ1Input, outputXpt); // Route the output signal to the HDMI output
494  if (mDevice.features().CanDoWidget(NTV2_WgtAnalogOut1))
495  mDevice.Connect (NTV2_XptAnalogOutInput, outputXpt); // Route the output signal to the Analog output
496  if (mDevice.features().CanDoWidget(NTV2_WgtSDIMonOut1))
497  mDevice.Connect (::GetSDIOutputInputXpt (NTV2_CHANNEL5), outputXpt); // Route the output signal to the SDI monitor output
498  }
499 
500 } // RouteOutputSignal
501 
502 
504 {
505  // Start the main worker thread...
506  StartRunThread ();
507 
508  return AJA_STATUS_SUCCESS;
509 
510 } // Run
511 
512 
514 
515 // This is where we will start the worker thread
517 {
518  // Create and start the worker thread...
519  mRunThread.Attach(RunThreadStatic, this);
521  mRunThread.Start();
522 
523 } // StartRunThread
524 
525 
526 // The worker thread function
527 void NTV2LLBurn::RunThreadStatic (AJAThread * pThread, void * pContext) // static
528 {
529  (void) pThread;
530  // Grab the NTV2LLBurn instance pointer from the pContext parameter,
531  // then call its ProcessFrames method...
532  NTV2LLBurn * pApp (reinterpret_cast <NTV2LLBurn *> (pContext));
533  pApp->ProcessFrames ();
534 
535 } // RunThreadStatic
536 
537 
538 static const bool CLEAR_HOST_ANC_BUFFER_BEFORE_READ (false);
539 static const bool PRINT_ANC_PACKETS_AFTER_READ (false);
540 static const bool CLEAR_DEVICE_ANC_BUFFER_AFTER_READ (false);
541 static const bool REPLACE_OUTGOING_ANC_WITH_CUSTOM_PACKETS (false);
542 
543 
545 {
546  const bool doAncInput (mConfig.WithAnc() && NTV2_INPUT_SOURCE_IS_SDI(mConfig.fInputSource));
547  const bool doAncOutput (mConfig.WithAnc() && NTV2_OUTPUT_DEST_IS_SDI(mOutputDest));
548  const UWord sdiInput (UWord(::GetIndexForNTV2InputSource(mConfig.fInputSource)));
549  const UWord sdiOutput (UWord(::NTV2OutputDestinationToChannel(mOutputDest)));
550  const bool isInterlace (!NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE(mVideoFormat));
551  uint32_t currentInFrame (mInputStartFrame);
552  uint32_t currentOutFrame (mOutputStartFrame);
553  uint32_t currentAudioInAddress (0);
554  uint32_t audioReadOffset (0);
555  uint32_t audioInWrapAddress (0);
556  uint32_t audioOutWrapAddress (0);
557  uint32_t audioBytesCaptured (0);
558  uint32_t ancBytesCapturedF1 (0);
559  uint32_t ancBytesCapturedF2 (0);
560  bool audioIsReset (true);
561  NTV2DIDSet savedDIDs;
562  string timeCodeString;
563 
564  const NTV2Standard videoStandard (::GetNTV2StandardFromVideoFormat(mVideoFormat));
565  const NTV2SmpteLineNumber smpteLineNumInfo (::GetSmpteLineNumber(videoStandard));
566  Bouncer<UWord> yPercent (85/*upperLimit*/, 1/*lowerLimit*/, 1/*startValue*/); // Vertically "bounces" timecode in raster
568  NTV2Buffer zeroesBuffer(mpHostF1AncBuffer.GetByteCount());
569  zeroesBuffer.Fill(ULWord64(0));
570  BURNNOTE("Thread started");
571 
572  // Save current Anc buffer capacity (to restore it later), then max it out...
573  ULWord savedF1ByteCapacity(0), savedF2ByteCapacity(0), offset(0);
574  mDevice.GetAncRegionOffsetAndSize (offset, savedF1ByteCapacity, NTV2_AncRgn_Field1);
575  mDevice.GetAncRegionOffsetAndSize (offset, savedF2ByteCapacity, NTV2_AncRgn_Field2);
577 
578  if (doAncInput)
579  {
580  // Configure extractor
581  mDevice.AncExtractInit(sdiInput, mConfig.fInputChannel);
582 
583  if (mConfig.WithHanc())
584  {
585  mDevice.AncExtractGetFilterDIDs(sdiInput, savedDIDs); // Save current ANC filter (so it can be restored later)
586 
587  // Configure ANC extractor not to filter audio
588  NTV2DIDSet dids;
589 // dids.insert(0xe0); // HD audio group 4 control
590 // dids.insert(0xe1); // HD audio group 3 control
591 // dids.insert(0xe2); // HD audio group 2 control
592 // dids.insert(0xe3); // HD audio group 1 control
593 // dids.insert(0xe4); // HD audio group 4 data
594 // dids.insert(0xe5); // HD audio group 3 data
595 // dids.insert(0xe6); // HD audio group 2 data
596 // dids.insert(0xe7); // HD audio group 1 data
597  dids.insert(0xa0); // 3G audio group 8 control
598  dids.insert(0xa1); // 3G audio group 7 control
599  dids.insert(0xa2); // 3G audio group 6 control
600  dids.insert(0xa3); // 3G audio group 5 control
601  dids.insert(0xa4); // 3G audio group 8 data
602  dids.insert(0xa5); // 3G audio group 7 data
603  dids.insert(0xa6); // 3G audio group 6 data
604  dids.insert(0xa7); // 3G audio group 5 data
605  dids.insert(0x41); // Filter vpid (inserted by sdi output)
606  dids.insert(0x60); // Filter timecode (inserted by sdi output)
607  mDevice.AncExtractSetFilterDIDs (sdiInput, dids);
608 
609  // Enable HANC extraction
610  mDevice.AncExtractSetComponents (sdiInput, true, true, true, true);
611  }
612  else
613  {
614  // Disable HANC extraction
615  mDevice.AncExtractSetComponents (sdiInput, true, true, false, false);
616  }
617 
618  // Start extractor
619  mDevice.AncExtractSetEnable (sdiInput, true);
620  }
621 
622  if (doAncOutput)
623  {
624  // Configure inserter
625  mDevice.AncInsertInit (sdiOutput, mConfig.fInputChannel);
626  mDevice.AncInsertSetComponents (sdiOutput, true, true, mConfig.WithHanc(), mConfig.WithHanc());
627  mDevice.AncInsertSetReadParams (sdiOutput, 0, 0, mConfig.fOutputChannel);
628  mDevice.AncInsertSetField2ReadParams (sdiOutput, 0, 0, mConfig.fOutputChannel);
629  }
630 
631  mDevice.SetAudioOutputEmbedderState (::NTV2OutputDestinationToChannel(mOutputDest), mConfig.WithAudio());
632 
633  mFramesProcessed = mFramesDropped = 0; // Start with a fresh frame count
634 
635  mDevice.GetAudioReadOffset (audioReadOffset, mAudioSystem);
636  mDevice.GetAudioWrapAddress (audioOutWrapAddress, mAudioSystem);
637 
638  // Wait to make sure the next two SDK calls will be made during the same frame...
639  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
640  mDevice.DMAWriteAnc (0, zeroesBuffer, zeroesBuffer);
641  mDevice.DMAWriteAnc (1, zeroesBuffer, zeroesBuffer);
642  mDevice.DMAWriteAnc (2, zeroesBuffer, zeroesBuffer);
643  mDevice.DMAWriteAnc (3, zeroesBuffer, zeroesBuffer);
644 
645  // Before the main loop starts, ping-pong the buffers so the hardware will use
646  // different buffers than the ones it was using while idling...
647  currentInFrame ^= 1;
648  currentOutFrame ^= 1;
649 
650  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
651  if (doAncInput)
652  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
653  if (doAncInput && isInterlace)
654  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
655 
656  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
657 
658  // Wait until the hardware starts filling the new buffers, and then start audio
659  // capture as soon as possible to match the video...
660  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
661  mDevice.StartAudioInput (mAudioSystem);
662 
663  mAudioInLastAddress = audioReadOffset;
664  audioInWrapAddress = audioOutWrapAddress + audioReadOffset;
665  mAudioOutLastAddress = 0;
666 
667  currentInFrame ^= 1;
668  currentOutFrame ^= 1;
669 
670  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
671  if (doAncInput)
672  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
673  if (doAncInput && isInterlace)
674  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
675 
676  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
677 
678  while (!mGlobalQuit)
679  {
680  // Wait until the input has completed capturing a frame...
681  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
682 
683  // Flip sense of the buffers again to refer to the buffers that the hardware isn't using (i.e. the off-screen buffers)...
684  currentInFrame ^= 1;
685  currentOutFrame ^= 1;
686 
687  if (mConfig.WithAudio())
688  {
689  // Read the audio position registers as close to the interrupt as possible...
690  mDevice.ReadAudioLastIn (currentAudioInAddress, NTV2AudioSystem(mConfig.fInputChannel));
691  currentAudioInAddress &= ~0x3UL; // Force DWORD alignment
692  currentAudioInAddress += audioReadOffset;
693 
694  if (audioIsReset && mAudioOutLastAddress)
695  {
696  // Now that the audio system has some samples to play, playback can be started...
697  mDevice.StartAudioOutput (mAudioSystem);
698  audioIsReset = false;
699  }
700 
701  if (currentAudioInAddress < mAudioInLastAddress)
702  {
703  // Audio address has wrapped around the end of the buffer.
704  // Do the calculations and transfer from the last address to the end of the buffer...
705  audioBytesCaptured = audioInWrapAddress - mAudioInLastAddress;
706 
707  mDevice.DMAReadAudio (mAudioSystem, mpHostAudioBuffer, mAudioInLastAddress, audioBytesCaptured);
708 
709  // Transfer the new samples from the start of the buffer to the current address...
710  mDevice.DMAReadAudio (mAudioSystem, AsULWordPtr(mpHostAudioBuffer.GetHostAddress(audioBytesCaptured)),
711  audioReadOffset, currentAudioInAddress - audioReadOffset);
712 
713  audioBytesCaptured += currentAudioInAddress - audioReadOffset;
714  }
715  else
716  {
717  audioBytesCaptured = currentAudioInAddress - mAudioInLastAddress;
718 
719  // No wrap, so just perform a linear DMA from the buffer...
720  mDevice.DMAReadAudio (mAudioSystem, mpHostAudioBuffer, mAudioInLastAddress, audioBytesCaptured);
721  }
722 
723  mAudioInLastAddress = currentAudioInAddress;
724  } // if mConfig.WithAudio()
725 
726  // Transfer the new frame to system memory...
727  mDevice.DMAReadFrame (currentInFrame, mpHostVideoBuffer, mpHostVideoBuffer.GetByteCount());
728 
729  if (doAncInput)
730  { // Transfer received Anc data into my F1 & F2 buffers...
731  AJAAncillaryList capturedPackets;
732  // Read ANC bytes captured
733  mDevice.AncExtractGetField1Size (sdiInput, ancBytesCapturedF1);
734  if (isInterlace)
735  mDevice.AncExtractGetField2Size (sdiInput, ancBytesCapturedF2);
737  {
738  mpHostF1AncBuffer.Fill(0);
739  if (isInterlace)
740  mpHostF2AncBuffer.Fill(0);
741  }
742  // Read ANC data
743  mDevice.DMAReadAnc (currentInFrame, mpHostF1AncBuffer, mpHostF2AncBuffer);
744 
746  {
747  AJAAncillaryList::SetFromDeviceAncBuffers (mpHostF1AncBuffer, mpHostF2AncBuffer, capturedPackets);
748  if (capturedPackets.CountAncillaryData()) capturedPackets.Print(cerr, false); // Dump packets
749  }
751  mDevice.DMAWriteAnc (currentInFrame, zeroesBuffer, zeroesBuffer);
752  }
753 
754  // Determine which timecode value should be burned in to the video frame
755  NTV2_RP188 timecodeValue;
757  {
758  // Use the embedded input time code...
759  mDevice.GetRP188Data (mConfig.fInputChannel, timecodeValue);
760  CRP188 inputRP188Info (timecodeValue);
761  inputRP188Info.GetRP188Str(timeCodeString);
762  //cerr << "SDI" << DEC(mConfig.fTimecodeSource) << ":" << timeCodeString << ":" << timecodeValue << endl;
763  }
765  {
766  // Use the analog input time code...
767  mDevice.ReadAnalogLTCInput (mConfig.fTimecodeSource == NTV2_TCINDEX_LTC1 ? 0 : 1, timecodeValue);
768  CRP188 analogRP188Info (timecodeValue);
769  analogRP188Info.GetRP188Str(timeCodeString);
770  //cerr << "Ana" << DEC(mConfig.fTimecodeSource) << ":" << timeCodeString << ":" << timecodeValue << endl;
771  }
772  else
773  {
774  // Invent a timecode (based on the number of frames procesed)...
775  const NTV2FrameRate ntv2FrameRate (GetNTV2FrameRateFromVideoFormat (mVideoFormat));
776  const TimecodeFormat tcFormat (CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat(ntv2FrameRate));
777  const CRP188 frameRP188Info (mFramesProcessed, tcFormat);
778 
779  frameRP188Info.GetRP188Reg(timecodeValue);
780  frameRP188Info.GetRP188Str(timeCodeString);
781  //cerr << "Inv:" << timeCodeString << ":" << timecodeValue << endl;
782  }
783 
784  // "Burn" the timecode into the host buffer while we have full access to it...
785  mTCBurner.BurnTimeCode (reinterpret_cast <char *> (mpHostVideoBuffer.GetHostPointer()), timeCodeString.c_str(), yPercent.Next());
786 
787  if (mConfig.WithAudio())
788  {
789  // Calculate where the next audio samples should go in the buffer, taking wraparound into account...
790  if ((mAudioOutLastAddress + audioBytesCaptured) > audioOutWrapAddress)
791  {
792  // The audio will wrap. Transfer enough bytes to fill the buffer to the end...
793  mDevice.DMAWriteAudio (mAudioSystem, mpHostAudioBuffer, mAudioOutLastAddress, audioOutWrapAddress - mAudioOutLastAddress);
794 
795  // Now transfer the remaining bytes to the front of the buffer...
796  mDevice.DMAWriteAudio (mAudioSystem, AsULWordPtr(mpHostAudioBuffer.GetHostAddress(audioOutWrapAddress - mAudioOutLastAddress)),
797  0, audioBytesCaptured - (audioOutWrapAddress - mAudioOutLastAddress));
798 
799  mAudioOutLastAddress = audioBytesCaptured - (audioOutWrapAddress - mAudioOutLastAddress);
800  }
801  else
802  {
803  // No wrap, so just do a linear DMA from the buffer...
804  mDevice.DMAWriteAudio (mAudioSystem, mpHostAudioBuffer, mAudioOutLastAddress, audioBytesCaptured);
805 
806  mAudioOutLastAddress += audioBytesCaptured;
807  }
808  } // if mConfig.WithAudio()
809 
810  // Send the updated frame back to the board for display...
811  mDevice.DMAWriteFrame (currentOutFrame, mpHostVideoBuffer, mpHostVideoBuffer.GetByteCount());
812 
813  if (doAncOutput)
814  {
816  {
818  AJAAncDataLoc F2Loc(F1AncDataLoc);
819  ULWord pktData(NTV2EndianSwap32(mFramesProcessed));
820  pkt.SetDID(0xC0); pkt.SetSID(0x00); pkt.SetDataLocation(F1AncDataLoc); pkt.SetDataCoding(AJAAncDataCoding_Digital);
821  pkt.SetPayloadData(AsCU8Ptr(&pktData), 4);
822  pkts.AddAncillaryData(pkt);
823  if (isInterlace)
824  {
825  F2Loc.SetLineNumber(uint16_t(smpteLineNumInfo.GetFirstActiveLine(NTV2_FIELD1)
826  + ULWord(F1AncDataLoc.GetLineNumber())
827  - smpteLineNumInfo.GetFirstActiveLine(NTV2_FIELD0)));
828  pkt.SetDID(0xC1); pkt.SetSID(0x01); pkt.SetDataLocation(F2Loc);
829  pktData = ULWord(pktData << 16) | ULWord(pktData >> 16);
830  pkt.SetPayloadData(AsCU8Ptr(&pktData), 4);
831  pkts.AddAncillaryData(pkt);
832  }
833  //pkts.Print(cerr, true); cerr << endl;
834  pkts.GetTransmitData (mpHostF1AncBuffer, mpHostF2AncBuffer, !isInterlace, isInterlace ? smpteLineNumInfo.GetLastLine(NTV2_FIELD0)+1 : 0);
835  }
836  // Write ANC data
837  mDevice.DMAWriteAnc (currentOutFrame, mpHostF1AncBuffer, mpHostF2AncBuffer);
838  }
839 
840  // Write the output timecode (for all SDI output spigots)...
841  for (NTV2ChannelSetConstIter iter(mRP188Outputs.begin()); iter != mRP188Outputs.end(); ++iter)
842  mDevice.SetRP188Data (*iter, timecodeValue);
843 
844  // Check for dropped frames by ensuring the hardware has not started to process
845  // the buffers that were just filled....
846  uint32_t readBackIn;
847  uint32_t readBackOut;
848  mDevice.GetInputFrame (mConfig.fInputChannel, readBackIn);
849  mDevice.GetOutputFrame (mConfig.fOutputChannel, readBackOut);
850 
851  if ((readBackIn == currentInFrame) || (readBackOut == currentOutFrame))
852  {
853  cerr << "## WARNING: Drop detected: current in " << currentInFrame << ", readback in " << readBackIn
854  << ", current out " << currentOutFrame << ", readback out " << readBackOut << endl;
855  mFramesDropped++;
856  }
857  else
858  mFramesProcessed++;
859 
860  // Tell the hardware which buffers to start using at the beginning of the next frame...
861  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
862  if (doAncInput)
863  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
864  if (doAncInput && isInterlace)
865  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
866 
867  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
868  if (doAncOutput)
869  mDevice.AncInsertSetReadParams (sdiOutput, currentOutFrame, ancBytesCapturedF1, mConfig.fOutputChannel);
870  if (doAncOutput && isInterlace)
871  mDevice.AncInsertSetField2ReadParams (sdiOutput, currentOutFrame, ancBytesCapturedF2, mConfig.fOutputChannel);
872 
873  // Enable ANC insertion on first output frame
874  if (mFramesProcessed == 1)
875  mDevice.AncInsertSetEnable (sdiOutput, true);
876 
877  } // loop til quit signaled
878 
879  if (doAncInput)
880  mDevice.AncExtractSetEnable (sdiInput, false); // Stop ANC extractor
881  if (doAncOutput)
882  mDevice.AncInsertSetEnable (sdiOutput, false); // Stop ANC inserter
883 
884  if (doAncInput && mConfig.WithHanc())
885  mDevice.AncExtractSetFilterDIDs (sdiInput, savedDIDs); // Restore prior ANC filtering
886 
887  // Restore previous Anc buffer capacity...
888  mDevice.AncSetFrameBufferSize (savedF1ByteCapacity, savedF2ByteCapacity);
889  BURNNOTE("Thread completed, will exit");
890 
891 } // ProcessFrames
892 
893 
895 
896 
897 void NTV2LLBurn::GetStatus (ULWord & outFramesProcessed, ULWord & outFramesDropped)
898 {
899  outFramesProcessed = mFramesProcessed;
900  outFramesDropped = mFramesDropped;
901 
902 } // GetACStatus
903 
904 
906 {
907  switch (inInputSource)
908  {
909  case NTV2_INPUTSOURCE_SDI1: return kRegRP188InOut1DBB; // reg 29
910  case NTV2_INPUTSOURCE_SDI2: return kRegRP188InOut2DBB; // reg 64
911  case NTV2_INPUTSOURCE_SDI3: return kRegRP188InOut3DBB; // reg 268
912  case NTV2_INPUTSOURCE_SDI4: return kRegRP188InOut4DBB; // reg 273
913  case NTV2_INPUTSOURCE_SDI5: return kRegRP188InOut5DBB; // reg 342
914  case NTV2_INPUTSOURCE_SDI6: return kRegRP188InOut6DBB; // reg 418
915  case NTV2_INPUTSOURCE_SDI7: return kRegRP188InOut7DBB; // reg 427
916  case NTV2_INPUTSOURCE_SDI8: return kRegRP188InOut8DBB; // reg 436
917  default: return 0;
918  } // switch on input source
919 
920 } // GetRP188DBBRegNumForInput
921 
922 
924 {
925  bool result (false);
926  const ULWord regNum (GetRP188DBBRegNumForInput(mConfig.fInputSource));
927  ULWord regValue (0);
928 
929  // Bit 16 of the RP188 DBB register will be set if there is timecode embedded in the input signal...
930  if (regNum && mDevice.ReadRegister(regNum, regValue) && regValue & BIT(16))
931  result = true;
932  return result;
933 
934 } // InputSignalHasTimecode
935 
936 
938 {
939  ULWord regMask (kRegMaskLTC1InPresent);
940  ULWord regValue (0);
941  switch (mConfig.fTimecodeSource)
942  {
943  case NTV2_TCINDEX_LTC1: break;
944  case NTV2_TCINDEX_LTC2: regMask = kRegMaskLTC2InPresent; break;
945  default: return false;
946  }
947  mDevice.ReadRegister (kRegLTCStatusControl, regValue, regMask);
948  return regValue ? true : false;
949 
950 } // 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:2640
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:1150
NTV2InputSourceToReferenceSource
NTV2ReferenceSource NTV2InputSourceToReferenceSource(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2ReferenceSource value.
Definition: ntv2utils.cpp:5083
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
NTV2_XptHDMIOutInput
@ NTV2_XptHDMIOutInput
Definition: ntv2enums.h:2824
GetSDIOutputInputXpt
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inSDIOutput, const bool inIsDS2=false)
Definition: ntv2signalrouter.cpp:942
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:5107
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:2005
NTV2FormatDescriptor::GetVideoWriteSize
ULWord GetVideoWriteSize(ULWord inPageSize=4096UL) const
Definition: ntv2formatdescriptor.cpp:866
NTV2LLBurn::SetupVideo
virtual AJAStatus SetupVideo(void)
Sets up everything I need for capturing and playing video.
Definition: ntv2llburn.cpp:166
NTV2_CHANNEL8
@ NTV2_CHANNEL8
Specifies channel or Frame Store 8 (or the 8th item).
Definition: ntv2enums.h:1343
kRegRP188InOut3DBB
@ kRegRP188InOut3DBB
Definition: ntv2publicinterface.h:391
NTV2_INPUTSOURCE_SDI6
@ NTV2_INPUTSOURCE_SDI6
Identifies the 6th SDI video input.
Definition: ntv2enums.h:1256
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:5444
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 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
NTV2SmpteLineNumber::GetFirstActiveLine
ULWord GetFirstActiveLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
Definition: ntv2utils.cpp:4118
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
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
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:2491
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.
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
NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE
#define NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE(__f__)
Definition: ntv2enums.h:1031
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:1076
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1334
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
NTV2SmpteLineNumber::GetLastLine
ULWord GetLastLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
Definition: ntv2formatdescriptor.cpp:1300
AUTOCIRCULATE_STATUS::acStartFrame
LWord acStartFrame
First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
Definition: ntv2publicinterface.h:7197
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:381
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6096
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:508
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:1060
GetNTV2FrameRateFromVideoFormat
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:3530
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:2521
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
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:3695
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
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:374
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:398
BurnConfig::fSuppressAudio
bool fSuppressAudio
If true, suppress audio; otherwise include audio.
Definition: ntv2democommon.h:399
BurnConfig::fTimecodeSource
NTV2TCIndex fTimecodeSource
Timecode source to use.
Definition: ntv2democommon.h:397
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3850
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:5215
NTV2InputSourceToEmbeddedAudioInput
NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value.
Definition: ntv2utils.cpp:4937
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
GetFrameBufferInputXptFromChannel
NTV2InputXptID GetFrameBufferInputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsBInput=false)
Definition: ntv2signalrouter.cpp:762
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
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:2218
ntv2llburn.h
Header file for the low latency NTV2Burn demonstration class.
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
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:2191
kRegRP188InOut5DBB
@ kRegRP188InOut5DBB
Definition: ntv2publicinterface.h:479
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:1884
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
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
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:3855
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
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
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:544
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
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 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
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
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:928
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:396
NTV2LLBurn::StartRunThread
virtual void StartRunThread(void)
Starts my main worker thread.
Definition: ntv2llburn.cpp:516
NTV2_CHANNEL5
@ NTV2_CHANNEL5
Specifies channel or Frame Store 5 (or the 5th item).
Definition: ntv2enums.h:1340
GetIndexForNTV2InputSource
ULWord GetIndexForNTV2InputSource(const NTV2InputSource inValue)
Definition: ntv2utils.cpp:5334
CNTV2Card::features
virtual class DeviceCapabilities & features(void)
Definition: ntv2card.h:141
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: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
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:2028
NTV2_RP188_INPUT
@ NTV2_RP188_INPUT
Definition: ntv2enums.h:2072
NTV2FormatDescriptor::numPixels
ULWord numPixels
Width – total number of pixels per line.
Definition: ntv2formatdescriptor.h:355
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:527
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
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
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:2200
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:156
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
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_FAIL
@ AJA_STATUS_FAIL
Definition: types.h:382
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
kRegRP188InOut2DBB
@ kRegRP188InOut2DBB
Definition: ntv2publicinterface.h:167
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7193
NTV2LLBurn::SetupAudio
virtual AJAStatus SetupAudio(void)
Sets up everything I need for capturing and playing audio.
Definition: ntv2llburn.cpp:358
AsULWordPtr
#define AsULWordPtr(_p_)
Definition: ntv2llburn.cpp:27
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or Frame Store 7 (or the 7th item).
Definition: ntv2enums.h:1342
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:354
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:4181
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:651
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:1607
CNTV2DemoCommon::SetDefaultPageSize
static size_t SetDefaultPageSize(void)
Definition: ntv2democommon.cpp:1591
NTV2LLBurn::InputSignalHasTimecode
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false.
Definition: ntv2llburn.cpp:923
BurnConfig::fWithHanc
bool fWithHanc
If true, capture & play HANC data, including audio (LLBurn). Defaults to false.
Definition: ntv2democommon.h:404
NTV2_INPUTSOURCE_INVALID
@ NTV2_INPUTSOURCE_INVALID
The invalid video input.
Definition: ntv2enums.h:1259
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: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
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:3651
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or Frame Store 3 (or the 3rd item).
Definition: ntv2enums.h:1338
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:253
CNTV2Card::AutoCirculateGetStatus
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
Definition: ntv2autocirculate.cpp:646
NTV2_FBF_8BIT_YCBCR
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
Definition: ntv2enums.h:214
NTV2InputCrosspointID
NTV2InputCrosspointID
Identifies a widget input that potentially can accept a signal emitted from another widget's output (...
Definition: ntv2enums.h:2721
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:1019
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:1108
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:775
NTV2LLBurn::Run
virtual AJAStatus Run(void)
Runs me.
Definition: ntv2llburn.cpp:503
NTV2LLBurn::Init
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2llburn.cpp:80
CNTV2Card::SetAudioOutputEmbedderState
virtual bool SetAudioOutputEmbedderState(const NTV2Channel inSDIOutputConnector, const bool &inEnable)
Enables or disables the audio output embedder for the given SDI output connector (specified as a chan...
Definition: ntv2audio.cpp:1578
AJAAncillaryList::AddAncillaryData
virtual AJAStatus AddAncillaryData(const AJAAncillaryList &inPackets)
Appends a copy of the given list's packets to me.
Definition: ancillarylist.cpp:317
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:427
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
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
AJAAncillaryList::Print
virtual std::ostream & Print(std::ostream &inOutStream, const bool inDetailed=true) const
Dumps a human-readable description of every packet in my list to the given output stream.
Definition: ancillarylist.cpp:1639
NTV2_XptHDMIOutQ1Input
@ NTV2_XptHDMIOutQ1Input
Definition: ntv2enums.h:2825
DeviceCapabilities::CanDoInputSource
bool CanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2devicecapabilities.h:233
BurnConfig::fWithAnc
bool fWithAnc
If true, capture & play anc data (LLBurn). Defaults to false.
Definition: ntv2democommon.h:402
AJAAncillaryList::CountAncillaryData
virtual uint32_t CountAncillaryData(void) const
Answers with the number of AJAAncillaryData objects I contain (any/all types).
Definition: ancillarylist.h:199
NTV2_INPUTSOURCE_HDMI1
@ NTV2_INPUTSOURCE_HDMI1
Identifies the 1st HDMI video input.
Definition: ntv2enums.h:1247
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:3365
CRP188
Definition: ntv2rp188.h:55
NTV2LLBurn::Quit
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2llburn.cpp:69
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
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
NTV2_OUTPUT_DEST_IS_SDI
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
Definition: ntv2enums.h:1323
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:963
NTV2_DISABLE_TASKS
@ NTV2_DISABLE_TASKS
0: Disabled: Device is completely configured by controlling application(s) – no driver involvement.
Definition: ntv2publicinterface.h:4290
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:390
NTV2_RP188_OUTPUT
@ NTV2_RP188_OUTPUT
Definition: ntv2enums.h:2073
NTV2Buffer::GetHostAddress
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
Definition: ntv2publicinterface.cpp:1703
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
NTV2Buffer::GetHostPointer
void * GetHostPointer(void) const
Definition: ntv2publicinterface.h:6079
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1244
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:392
ntv2formatdescriptor.h
Declares the NTV2FormatDescriptor class.
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:521
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:7198
NTV2_WgtHDMIOut1
@ NTV2_WgtHDMIOut1
Definition: ntv2enums.h:2915
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:877
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:5522
GetFrameBufferOutputXptFromChannel
NTV2OutputXptID GetFrameBufferOutputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsRGB=false, const bool inIs425=false)
Definition: ntv2signalrouter.cpp:845
NTV2_OUTPUTDESTINATION_INVALID
@ NTV2_OUTPUTDESTINATION_INVALID
Definition: ntv2enums.h:1313
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:396
NTV2_MODE_CAPTURE
@ NTV2_MODE_CAPTURE
Capture (input) mode, which writes into device SDRAM.
Definition: ntv2enums.h:1225
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
ULWord64
uint64_t ULWord64
Definition: ajatypes.h:258
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:1277
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
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5470
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:1150
NTV2_WgtHDMIOut1v2
@ NTV2_WgtHDMIOut1v2
Definition: ntv2enums.h:2939
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
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:2912
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
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
true
#define true
Definition: ntv2devicefeatures.h:26
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:407
AJAAncDataCoding_Digital
@ AJAAncDataCoding_Digital
The ancillary data is in the form of a SMPTE-291 Ancillary Packet.
Definition: ancillarydata.h:476
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
NTV2LLBurn::GetStatus
virtual void GetStatus(ULWord &outFramesProcessed, ULWord &outFramesDropped)
Provides status information about my input (capture) and output (playout) processes.
Definition: ntv2llburn.cpp:897
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:2209
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:449
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:2549
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
NTV2ChannelToString
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5787
NTV2_INPUT_SOURCE_IS_SDI
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
Definition: ntv2enums.h:1265
GetNTV2StandardFromVideoFormat
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:2277
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::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: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
kNumFrameBuffers
const uint32_t kNumFrameBuffers(2)
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
NTV2DIDSet
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
Definition: ntv2publicinterface.h:76
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
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3848
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:3913
NTV2_INPUT_SOURCE_IS_ANALOG
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
Definition: ntv2enums.h:1264
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
NTV2_MODE_DISPLAY
@ NTV2_MODE_DISPLAY
Playout (output) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1223
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:1169
DeviceCapabilities::CanDoFrameBufferFormat
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2devicecapabilities.h:223
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
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:92
NTV2LLBurn::SetupHostBuffers
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
Definition: ntv2llburn.cpp:405
GetRP188DBBRegNumForInput
static ULWord GetRP188DBBRegNumForInput(const NTV2InputSource inInputSource)
Definition: ntv2llburn.cpp:905
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_FIELD1
@ NTV2_FIELD1
Identifies the last (second) field in time for an interlaced video frame.
Definition: ntv2enums.h:1818
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:937
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
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
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:3860