AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
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 
26 #define AsULWordPtr(_p_) reinterpret_cast<ULWord*>(_p_)
27 #define AsCU8Ptr(_p_) reinterpret_cast<const uint8_t*>(_p_)
28 
29 
31  : mConfig (inConfig),
32  mRunThread (AJAThread()),
33  mDeviceID (DEVICE_ID_NOTFOUND),
34  mVideoFormat (NTV2_FORMAT_UNKNOWN),
35  mSavedTaskMode (NTV2_DISABLE_TASKS),
36  mOutputDest (NTV2_OUTPUTDESTINATION_INVALID),
37  mAudioSystem (NTV2_AUDIOSYSTEM_1),
38  mGlobalQuit (false),
39  mAudioInLastAddress (0),
40  mAudioOutLastAddress (0),
41  mFramesProcessed (0),
42  mFramesDropped (0)
43 {
44 } // constructor
45 
46 
48 {
49  // Stop my capture and playout threads, then destroy them...
50  Quit();
51 
52  // Unsubscribe from input vertical event...
54 
55  if (!mConfig.fDoMultiFormat)
56  {
57  mDevice.SetEveryFrameServices (mSavedTaskMode); // Restore prior service level
58  mDevice.ReleaseStreamForApplication (kAppSignature, static_cast<int32_t>(AJAProcess::GetPid())); // Release the device
59  }
60 
61  // Don't leave the audio system active after we exit
62  mDevice.StopAudioInput (mAudioSystem);
63  mDevice.StopAudioOutput (mAudioSystem);
64 
65 } // destructor
66 
67 
68 void NTV2LLBurn::Quit (void)
69 {
70  // Set the global 'quit' flag, and wait for the thread to go inactive...
71  mGlobalQuit = true;
72 
73  while (mRunThread.Active())
74  AJATime::Sleep(10);
75 
76 } // Quit
77 
78 
80 {
82 
83  // Open the device...
85  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not found" << endl; return AJA_STATUS_OPEN;}
86 
87  if (!mDevice.IsDeviceReady (false))
88  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not ready" << endl; return AJA_STATUS_INITIALIZE;}
89 
90  mDeviceID = mDevice.GetDeviceID (); // Keep the device ID handy since it will be used frequently
91 
92  // Burn requires device capable of capturing and playing video...
93  if (!(::NTV2DeviceCanDoCapture(mDeviceID) && ::NTV2DeviceCanDoPlayback(mDeviceID)))
94  {cerr << "## ERROR: Device cannot both capture & play video" << endl; return AJA_STATUS_BAD_PARAM; }
95 
96  ULWord appSignature (0);
97  int32_t appPID (0);
98  mDevice.GetEveryFrameServices (mSavedTaskMode); // Save the current device state
99  mDevice.GetStreamingApplication (appSignature, appPID); // Who currently "owns" the device?
100  if (!mConfig.fDoMultiFormat)
101  {
102  if (!mDevice.AcquireStreamForApplication (kAppSignature, static_cast<int32_t>(AJAProcess::GetPid())))
103  {
104  cerr << "## ERROR: Unable to acquire device because another app (pid " << appPID << ") owns it" << endl;
105  return AJA_STATUS_BUSY; // Some other app is using the device
106  }
107  mDevice.SetEveryFrameServices (NTV2_OEM_TASKS); // Set the OEM service level
108  mDevice.ClearRouting (); // Clear the current device routing (since I "own" the device)
109  }
110  else
111  mDevice.SetEveryFrameServices (NTV2_OEM_TASKS); // Force OEM tasks
112 
113  // Configure the SDI relays if present
114  if (::NTV2DeviceHasSDIRelays (mDeviceID))
115  {
116  // Note that if the board's jumpers are not set in the position
117  // to enable the watchdog timer, these calls will have no effect.
118  mDevice.SetSDIWatchdogEnable(true, 0); // SDI 1/2
119  mDevice.SetSDIWatchdogEnable(true, 1); // SDI 3/4
120 
121  // Set timeout delay to 2 seconds expressed in multiples of 8 ns
122  // and take the relays out of bypass
123  mDevice.SetSDIWatchdogTimeout (2 * 125000000);
124  mDevice.KickSDIWatchdog ();
125 
126  // Give the mechanical relays some time to switch
127  AJATime::Sleep (500);
128  }
129 
130  if (mConfig.WithHanc())
131  {
132  // Transfer audio using HANC extractor/inserter
133  mConfig.fWithAnc = true;
134  mConfig.fSuppressAudio = true;
135  }
136 
137  if (mConfig.WithAnc() && !::NTV2DeviceCanDoCustomAnc(mDeviceID))
138  {cerr << "## WARNING: Device doesn't support custom Anc, '-a -h' option ignored" << endl; mConfig.fWithAnc = false; mConfig.fWithHanc = false;}
139 
140  // Set up the video and audio...
141  status = SetupVideo();
142  if (AJA_FAILURE (status))
143  return status;
144 
145  status = SetupAudio();
146  if (AJA_FAILURE (status))
147  return status;
148 
149  // Set up the circular buffers...
150  status = SetupHostBuffers();
151  if (AJA_FAILURE (status))
152  return status;
153 
155  mDevice.SetLTCInputEnable(true); // Enable analog LTC input (some LTC inputs are shared with reference input)
156 
157  // Lastly, prepare my AJATimeCodeBurn instance...
158  mTCBurner.RenderTimeCodeFont (CNTV2DemoCommon::GetAJAPixelFormat (mConfig.fPixelFormat), mFormatDesc.numPixels, mFormatDesc.numLines);
159 
160  return AJA_STATUS_SUCCESS;
161 
162 } // Init
163 
164 
166 {
167  const uint16_t numFrameStores (::NTV2DeviceGetNumFrameStores (mDeviceID));
168  const uint16_t numSDIOutputs (::NTV2DeviceGetNumVideoOutputs(mDeviceID));
169 
170  // Can the device support the desired input source?
171  if (!::NTV2DeviceCanDoInputSource (mDeviceID, mConfig.fInputSource))
172  {cerr << "## ERROR: This device cannot receive input from the specified source" << endl; return AJA_STATUS_BAD_PARAM;}
173 
174  // Pick an input NTV2Channel from the input source, and enable its frame buffer...
176  mDevice.EnableChannel (mConfig.fInputChannel); // Enable the input frame buffer
177 
178  // Pick an appropriate output NTV2Channel, and enable its frame buffer...
179  switch (mConfig.fInputSource)
180  {
181  case NTV2_INPUTSOURCE_SDI1: mConfig.fOutputChannel = numSDIOutputs < 3 || numFrameStores == 2 || numFrameStores > 4 ? NTV2_CHANNEL2 : NTV2_CHANNEL3; break;
182 
184  case NTV2_INPUTSOURCE_SDI2: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL3 : NTV2_CHANNEL4; break;
185 
187  case NTV2_INPUTSOURCE_SDI3: mConfig.fOutputChannel = NTV2_CHANNEL4; break;
188 
190  case NTV2_INPUTSOURCE_SDI4: mConfig.fOutputChannel = numFrameStores > 4 ? NTV2_CHANNEL5 : NTV2_CHANNEL3; break;
191 
192  case NTV2_INPUTSOURCE_SDI5: mConfig.fOutputChannel = NTV2_CHANNEL6; break;
193  case NTV2_INPUTSOURCE_SDI6: mConfig.fOutputChannel = NTV2_CHANNEL7; break;
194  case NTV2_INPUTSOURCE_SDI7: mConfig.fOutputChannel = NTV2_CHANNEL8; break;
195  case NTV2_INPUTSOURCE_SDI8: mConfig.fOutputChannel = NTV2_CHANNEL7; break;
196 
198  case NTV2_INPUTSOURCE_HDMI1: mConfig.fOutputChannel = numFrameStores < 3 ? NTV2_CHANNEL2 : NTV2_CHANNEL3;
199  mAudioSystem = NTV2_AUDIOSYSTEM_2;
200  break;
201 // default:
202  case NTV2_INPUTSOURCE_INVALID: cerr << "## ERROR: Bad input source" << endl; return AJA_STATUS_BAD_PARAM;
203  }
204 
205  bool isTransmit (false);
206  if (::NTV2DeviceHasBiDirectionalSDI (mDevice.GetDeviceID ()) // If device has bidirectional SDI connectors...
207  && NTV2_INPUT_SOURCE_IS_SDI (mConfig.fInputSource) // ...and desired input source is SDI...
208  && mDevice.GetSDITransmitEnable (mConfig.fInputChannel, isTransmit) // ...and GetSDITransmitEnable succeeds...
209  && isTransmit) // ...and input is set to "transmit"...
210  {
211  mDevice.SetSDITransmitEnable (mConfig.fInputChannel, false); // ...then disable transmit mode...
212  mDevice.WaitForInputVerticalInterrupt(mConfig.fInputChannel, 20); // ...and give the device a dozen frames or so to lock to the input signal
213  } // if input SDI connector needs to switch from transmit mode
214 
215  if (mConfig.WithAnc() && !NTV2_INPUT_SOURCE_IS_SDI(mConfig.fInputSource))
216  cerr << "## WARNING: Non-SDI input source, no Anc capture possible" << endl;
217 
218  // Determine the input video signal format, and set the device's reference source to that input...
219  mVideoFormat = mDevice.GetInputVideoFormat (mConfig.fInputSource);
220  if (mVideoFormat == NTV2_FORMAT_UNKNOWN)
221  {
222  cerr << "## ERROR: The specified input has no signal, or the device cannot handle the signal format" << endl;
223  return AJA_STATUS_NOINPUT; // Sorry, can't handle this format
224  }
225 
227  mAudioSystem = ::NTV2InputSourceToAudioSystem (mConfig.fInputSource);
228  mOutputDest = ::NTV2ChannelToOutputDestination (mConfig.fOutputChannel);
229 
230  if (::NTV2DeviceHasBiDirectionalSDI (mDeviceID) // If device has bidirectional SDI connectors...
231  && NTV2_OUTPUT_DEST_IS_SDI (mOutputDest)) // ...and output destination is SDI...
232  mDevice.SetSDITransmitEnable (mConfig.fOutputChannel, true); // ...then enable transmit mode
233 
234  if (mConfig.WithAnc() && !NTV2_OUTPUT_DEST_IS_SDI(mOutputDest))
235  cerr << "## WARNING: Non-SDI output destination, no Anc playout possible" << endl;
236 
237  mDevice.EnableChannel (mConfig.fInputChannel); // Enable the input frame buffer
238  mDevice.EnableChannel (mConfig.fOutputChannel); // Enable the output frame buffer
239 
240  if(::NTV2DeviceCanDoMultiFormat (mDeviceID) && mConfig.fDoMultiFormat)
241  mDevice.SetMultiFormatMode (true);
242  else if(::NTV2DeviceCanDoMultiFormat (mDeviceID))
243  mDevice.SetMultiFormatMode (false);
244 
245  // Set the input channel format to the detected input format...
246  mDevice.SetVideoFormat (mVideoFormat, false, false, ::NTV2DeviceCanDoMultiFormat(mDeviceID) ? mConfig.fInputChannel : NTV2_CHANNEL1);
247  if (::NTV2DeviceCanDoMultiFormat (mDeviceID)) // If device supports multiple formats per-channel...
248  mDevice.SetVideoFormat (mVideoFormat, false, false, mConfig.fOutputChannel); // ...then also set the output channel format to the detected input format
249 
250  // Set the frame buffer pixel format for both channels on the device, assuming it
251  // supports that pixel format . . . otherwise default to 8-bit YCbCr...
252  if (!::NTV2DeviceCanDoFrameBufferFormat (mDeviceID, mConfig.fPixelFormat))
254 
255  // Set the pixel format for both device frame buffers...
256  mDevice.SetFrameBufferFormat (mConfig.fInputChannel, mConfig.fPixelFormat);
257  mDevice.SetFrameBufferFormat (mConfig.fOutputChannel, mConfig.fPixelFormat);
258 
259  // Enable and subscribe to the interrupts for the channel to be used...
260  mDevice.EnableInputInterrupt (mConfig.fInputChannel);
261  mDevice.SubscribeInputVerticalEvent (mConfig.fInputChannel);
262 
263  // Enable and subscribe to the output interrupts (though it's enabled by default)...
264  mDevice.EnableOutputInterrupt (mConfig.fOutputChannel);
266 
267  // Set the Frame Store modes
268  mDevice.SetMode (mConfig.fInputChannel, NTV2_MODE_CAPTURE);
269  mDevice.SetMode (mConfig.fOutputChannel, NTV2_MODE_DISPLAY);
270 
271  if (!NTV2_IS_SD_VIDEO_FORMAT(mVideoFormat))
272  {
273  // Enable VANC for non-SD formats, to pass thru captions, etc.
274  mDevice.SetEnableVANCData (false);
275  if (::Is8BitFrameBufferFormat (mConfig.fPixelFormat))
276  {
277  // 8-bit FBFs require VANC bit shift...
280  }
281  } // if not SD video
282 
283  // Set the format descriptor
284  mFormatDesc = NTV2FormatDescriptor (mVideoFormat, mConfig.fPixelFormat);
285 
286  // Set up the device signal routing, and both playout and capture AutoCirculate...
289 
290  // Be sure the RP188 mode for the SDI input (expressed as an NTV2Channel),
291  // is set to NTV2_RP188_INPUT...
292  bool isBypassEnabled (false);
293  mDevice.IsRP188BypassEnabled (mConfig.fInputChannel, isBypassEnabled);
294  if (isBypassEnabled)
295  mDevice.DisableRP188Bypass (mConfig.fInputChannel);
296  mDevice.SetRP188Mode (mConfig.fInputChannel, NTV2_RP188_INPUT);
297  mDevice.SetRP188SourceFilter (mConfig.fInputChannel, 0); // 0=LTC 1=VITC1 2=VITC2
298 
299  // Make sure the RP188 mode for all SDI outputs is NTV2_RP188_OUTPUT, and that their RP188
300  // registers are not bypassed (i.e. timecode isn't sourced from an SDI input, as for E-E mode)...
301  NTV2_ASSERT(!mRP188Outputs.empty());
302  for (NTV2ChannelSetConstIter iter(mRP188Outputs.begin()); iter != mRP188Outputs.end(); ++iter)
303  {
304  mDevice.SetRP188Mode (*iter, NTV2_RP188_OUTPUT);
305  mDevice.DisableRP188Bypass (*iter);
306  }
307 
308  // Tell the hardware which buffers to use until the main worker thread runs
309  mDevice.SetInputFrame (mConfig.fInputChannel, 0);
310  mDevice.SetOutputFrame(mConfig.fOutputChannel, 2);
311 
312  return AJA_STATUS_SUCCESS;
313 
314 } // SetupVideo
315 
316 
318 {
319  // Have the audio subsystem capture audio from the designated input source...
321 
322  // It's best to use all available audio channels...
323  mDevice.SetNumberAudioChannels (::NTV2DeviceGetMaxAudioChannels (mDeviceID), mAudioSystem);
324 
325  // Assume 48kHz PCM...
326  mDevice.SetAudioRate (NTV2_AUDIO_48K, mAudioSystem);
327 
328  // 4MB device audio buffers work best...
329  mDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mAudioSystem);
330 
331  // Set up the output audio embedders...
332  if (::NTV2DeviceGetNumAudioSystems (mDeviceID) > 1)
333  {
334  // Some devices, like the Kona1, have 2 FrameStores but only 1 SDI output,
335  // which makes mConfig.fOutputChannel == NTV2_CHANNEL2, but need SDIoutput to be NTV2_CHANNEL1...
336  UWord SDIoutput(mConfig.fOutputChannel);
337  if (SDIoutput >= ::NTV2DeviceGetNumVideoOutputs(mDeviceID))
338  SDIoutput = ::NTV2DeviceGetNumVideoOutputs(mDeviceID) - 1;
339  mDevice.SetSDIOutputAudioSystem (NTV2Channel(SDIoutput), mAudioSystem);
340  }
341 
342  //
343  // Loopback mode plays whatever audio appears in the input signal when it's
344  // connected directly to an output (i.e., "end-to-end" mode). If loopback is
345  // left enabled, the video will lag the audio as video frames get briefly delayed
346  // in our ring buffer. Audio, therefore, needs to come out of the (buffered) frame
347  // data being played, so loopback must be turned off...
348  //
349  mDevice.SetAudioLoopBack (NTV2_AUDIO_LOOPBACK_OFF, mAudioSystem);
350 
351  // Reset both the input and output sides of the audio system so that the buffer
352  // pointers are reset to zero and inhibited from advancing.
353  mDevice.StopAudioOutput (mAudioSystem);
354  mDevice.StopAudioInput (mAudioSystem);
355 
356  // Ensure that the audio system will capture samples when the reset is removed
357  mDevice.SetAudioCaptureEnable (mAudioSystem, true);
358 
359  return AJA_STATUS_SUCCESS;
360 
361 } // SetupAudio
362 
363 
365 {
366  CNTV2DemoCommon::SetDefaultPageSize(); // Set host-specific page size
367 
368  // Allocate and add each in-host buffer to my member variables.
369  // DMA performance can be accelerated slightly by using page-aligned video buffers...
370  mpHostVideoBuffer.Allocate(mFormatDesc.GetVideoWriteSize(ULWord(NTV2Buffer::DefaultPageSize())), true);
371  mpHostAudioBuffer.Allocate(NTV2_AUDIOSIZE_MAX, /*page-aligned*/true);
372  mpHostF1AncBuffer.Allocate(mConfig.WithAnc() ? NTV2_ANCSIZE_MAX : 0, /*pageAligned*/true);
373  mpHostF2AncBuffer = NTV2Buffer(mConfig.WithAnc() ? NTV2_ANCSIZE_MAX : 0);
374 
375  if (!mpHostVideoBuffer || !mpHostAudioBuffer || (mConfig.WithAnc() && !mpHostF1AncBuffer) || (mConfig.WithAnc() && !mpHostF2AncBuffer))
376  {
377  cerr << "## ERROR: Unable to allocate host buffer(s)" << endl;
378  return AJA_STATUS_MEMORY;
379  }
380 
381  return AJA_STATUS_SUCCESS;
382 
383 } // SetupHostBuffers
384 
385 
387 {
388  const NTV2OutputCrosspointID inputOutputXpt (::GetInputSourceOutputXpt (mConfig.fInputSource));
390 
391  if (::IsRGBFormat (mConfig.fPixelFormat))
392  {
393  // If the frame buffer is configured for RGB pixel format, incoming YUV must be converted.
394  // This routes the video signal from the input through a color space converter before
395  // connecting to the RGB frame buffer...
396  const NTV2InputCrosspointID cscVideoInputXpt (::GetCSCInputXptFromChannel (mConfig.fInputChannel));
397  const NTV2OutputCrosspointID cscOutputXpt (::GetCSCOutputXptFromChannel (mConfig.fInputChannel, false, true)); // false=video, true=RGB
398 
399  mDevice.Connect (cscVideoInputXpt, inputOutputXpt); // Connect the CSC's video input to the input spigot's output
400  mDevice.Connect (fbInputXpt, cscOutputXpt); // Connect the frame store's input to the CSC's output
401  }
402  else
403  mDevice.Connect (fbInputXpt, inputOutputXpt); // Route the YCbCr signal directly from the input to the frame buffer's input
404 
405 } // RouteInputSignal
406 
407 
409 {
410  const NTV2InputCrosspointID outputInputXpt (::GetOutputDestInputXpt (mOutputDest));
412  NTV2OutputCrosspointID outputXpt (fbOutputXpt);
413 
414  mRP188Outputs.clear();
415  mRP188Outputs.insert(mConfig.fOutputChannel);
416  if (::IsRGBFormat (mConfig.fPixelFormat))
417  {
418  const NTV2OutputCrosspointID cscVidOutputXpt (::GetCSCOutputXptFromChannel (mConfig.fOutputChannel)); // Use CSC's YUV video output
419  const NTV2InputCrosspointID cscVidInputXpt (::GetCSCInputXptFromChannel (mConfig.fOutputChannel));
420 
421  mDevice.Connect (cscVidInputXpt, fbOutputXpt); // Connect the CSC's video input to the frame store's output
422  mDevice.Connect (outputInputXpt, cscVidOutputXpt); // Connect the SDI output's input to the CSC's video output
423  outputXpt = cscVidOutputXpt;
424  }
425  else
426  mDevice.Connect (outputInputXpt, outputXpt);
427 
428  if (!mConfig.fDoMultiFormat)
429  {
430  // Route all SDI outputs to the outputXpt...
431  const NTV2Channel startNum (NTV2_CHANNEL1);
432  const NTV2Channel endNum (NTV2Channel(::NTV2DeviceGetNumVideoChannels(mDeviceID)));
433  NTV2WidgetID outputWidgetID (NTV2_WIDGET_INVALID);
434 
435  for (NTV2Channel chan(startNum); chan < endNum; chan = NTV2Channel(chan+1))
436  {
437  mDevice.SetRP188SourceFilter (chan, 0); // Set all SDI spigots to capture embedded LTC (0==LTC 1==VITC1 2==VITC2)
438  if (chan == mConfig.fInputChannel || chan == mConfig.fOutputChannel)
439  continue; // Skip the input & output channel, already routed
440  mRP188Outputs.insert(chan); // Add this SDI spigot to those we'll push timecode into
441  if (::NTV2DeviceHasBiDirectionalSDI (mDeviceID))
442  mDevice.SetSDITransmitEnable (chan, true);
443  if (CNTV2SignalRouter::GetWidgetForInput (::GetSDIOutputInputXpt (chan, ::NTV2DeviceCanDoDualLink(mDeviceID)), outputWidgetID))
444  if (::NTV2DeviceCanDoWidget (mDeviceID, outputWidgetID))
445  mDevice.Connect (::GetSDIOutputInputXpt(chan), outputXpt);
446  } // for each output spigot
447 
448  // If HDMI and/or analog video outputs are available, route them, too...
449  if (::NTV2DeviceCanDoWidget (mDeviceID, NTV2_WgtHDMIOut1))
450  mDevice.Connect (NTV2_XptHDMIOutInput, outputXpt); // Route the output signal to the HDMI output
451  if (::NTV2DeviceCanDoWidget (mDeviceID, NTV2_WgtHDMIOut1v2))
452  mDevice.Connect (NTV2_XptHDMIOutQ1Input, outputXpt); // Route the output signal to the HDMI output
453  if (::NTV2DeviceCanDoWidget (mDeviceID, NTV2_WgtAnalogOut1))
454  mDevice.Connect (NTV2_XptAnalogOutInput, outputXpt); // Route the output signal to the Analog output
455  if (::NTV2DeviceCanDoWidget (mDeviceID, NTV2_WgtSDIMonOut1))
456  mDevice.Connect (::GetSDIOutputInputXpt (NTV2_CHANNEL5), outputXpt); // Route the output signal to the SDI monitor output
457  }
458 
459 } // RouteOutputSignal
460 
461 
463 {
464  // Start the main worker thread...
465  StartRunThread ();
466 
467  return AJA_STATUS_SUCCESS;
468 
469 } // Run
470 
471 
473 
474 // This is where we will start the worker thread
476 {
477  // Create and start the worker thread...
478  mRunThread.Attach(RunThreadStatic, this);
480  mRunThread.Start();
481 
482 } // StartRunThread
483 
484 
485 // The worker thread function
486 void NTV2LLBurn::RunThreadStatic (AJAThread * pThread, void * pContext) // static
487 {
488  (void) pThread;
489  // Grab the NTV2LLBurn instance pointer from the pContext parameter,
490  // then call its ProcessFrames method...
491  NTV2LLBurn * pApp (reinterpret_cast <NTV2LLBurn *> (pContext));
492  pApp->ProcessFrames ();
493 
494 } // RunThreadStatic
495 
496 
497 static const bool CLEAR_HOST_ANC_BUFFER_BEFORE_READ (false);
498 static const bool PRINT_ANC_PACKETS_AFTER_READ (false);
499 static const bool CLEAR_DEVICE_ANC_BUFFER_AFTER_READ (false);
500 static const bool REPLACE_OUTGOING_ANC_WITH_CUSTOM_PACKETS (false);
501 
502 
504 {
505  const bool doAncInput (mConfig.WithAnc() && NTV2_INPUT_SOURCE_IS_SDI(mConfig.fInputSource));
506  const bool doAncOutput (mConfig.WithAnc() && NTV2_OUTPUT_DEST_IS_SDI(mOutputDest));
507  const UWord sdiInput (UWord(::GetIndexForNTV2InputSource(mConfig.fInputSource)));
508  const UWord sdiOutput (UWord(::NTV2OutputDestinationToChannel(mOutputDest)));
509  const bool isInterlace (!NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE(mVideoFormat));
510  uint32_t currentInFrame (0); // Will ping-pong between 0 and 1
511  uint32_t currentOutFrame (2); // Will ping-pong between 2 and 3
512  uint32_t currentAudioInAddress (0);
513  uint32_t audioReadOffset (0);
514  uint32_t audioInWrapAddress (0);
515  uint32_t audioOutWrapAddress (0);
516  uint32_t audioBytesCaptured (0);
517  uint32_t ancBytesCapturedF1 (0);
518  uint32_t ancBytesCapturedF2 (0);
519  bool audioIsReset (true);
520  NTV2DIDSet savedDIDs;
521  string timeCodeString;
522 
523  const NTV2Standard videoStandard (::GetNTV2StandardFromVideoFormat(mVideoFormat));
524  const NTV2SmpteLineNumber smpteLineNumInfo (::GetSmpteLineNumber(videoStandard));
525  Bouncer<UWord> yPercent (85/*upperLimit*/, 1/*lowerLimit*/, 1/*startValue*/); // Vertically "bounces" timecode in raster
527  NTV2Buffer zeroesBuffer(mpHostF1AncBuffer.GetByteCount());
528  zeroesBuffer.Fill(ULWord64(0));
529  BURNNOTE("Thread started");
530 
531  // Save current Anc buffer capacity (to restore it later), then max it out...
532  ULWord savedF1ByteCapacity(0), savedF2ByteCapacity(0), offset(0);
533  mDevice.GetAncRegionOffsetAndSize (offset, savedF1ByteCapacity, NTV2_AncRgn_Field1);
534  mDevice.GetAncRegionOffsetAndSize (offset, savedF2ByteCapacity, NTV2_AncRgn_Field2);
536 
537  if (doAncInput)
538  {
539  // Configure extractor
540  mDevice.AncExtractInit(sdiInput, mConfig.fInputChannel);
541 
542  if (mConfig.WithHanc())
543  {
544  mDevice.AncExtractGetFilterDIDs(sdiInput, savedDIDs); // Save current ANC filter (so it can be restored later)
545 
546  // Configure ANC extractor not to filter audio
547  NTV2DIDSet dids;
548 // dids.insert(0xe0); // HD audio group 4 control
549 // dids.insert(0xe1); // HD audio group 3 control
550 // dids.insert(0xe2); // HD audio group 2 control
551 // dids.insert(0xe3); // HD audio group 1 control
552 // dids.insert(0xe4); // HD audio group 4 data
553 // dids.insert(0xe5); // HD audio group 3 data
554 // dids.insert(0xe6); // HD audio group 2 data
555 // dids.insert(0xe7); // HD audio group 1 data
556  dids.insert(0xa0); // 3G audio group 8 control
557  dids.insert(0xa1); // 3G audio group 7 control
558  dids.insert(0xa2); // 3G audio group 6 control
559  dids.insert(0xa3); // 3G audio group 5 control
560  dids.insert(0xa4); // 3G audio group 8 data
561  dids.insert(0xa5); // 3G audio group 7 data
562  dids.insert(0xa6); // 3G audio group 6 data
563  dids.insert(0xa7); // 3G audio group 5 data
564  dids.insert(0x41); // Filter vpid (inserted by sdi output)
565  dids.insert(0x60); // Filter timecode (inserted by sdi output)
566  mDevice.AncExtractSetFilterDIDs (sdiInput, dids);
567 
568  // Enable HANC extraction
569  mDevice.AncExtractSetComponents (sdiInput, true, true, true, true);
570  }
571  else
572  {
573  // Disable HANC extraction
574  mDevice.AncExtractSetComponents (sdiInput, true, true, false, false);
575  }
576 
577  // Start extractor
578  mDevice.AncExtractSetEnable (sdiInput, true);
579  }
580 
581  if (doAncOutput)
582  {
583  // Configure inserter
584  mDevice.AncInsertInit (sdiOutput, mConfig.fInputChannel);
585  mDevice.AncInsertSetComponents (sdiOutput, true, true, mConfig.WithHanc(), mConfig.WithHanc());
586  mDevice.AncInsertSetReadParams (sdiOutput, 0, 0, mConfig.fOutputChannel);
587  mDevice.AncInsertSetField2ReadParams (sdiOutput, 0, 0, mConfig.fOutputChannel);
588  }
589 
590  mDevice.SetAudioOutputEmbedderState (::NTV2OutputDestinationToChannel(mOutputDest), mConfig.WithAudio());
591 
592  mFramesProcessed = mFramesDropped = 0; // Start with a fresh frame count
593 
594  mDevice.GetAudioReadOffset (audioReadOffset, mAudioSystem);
595  mDevice.GetAudioWrapAddress (audioOutWrapAddress, mAudioSystem);
596 
597  // Wait to make sure the next two SDK calls will be made during the same frame...
598  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
599  mDevice.DMAWriteAnc (0, zeroesBuffer, zeroesBuffer);
600  mDevice.DMAWriteAnc (1, zeroesBuffer, zeroesBuffer);
601  mDevice.DMAWriteAnc (2, zeroesBuffer, zeroesBuffer);
602  mDevice.DMAWriteAnc (3, zeroesBuffer, zeroesBuffer);
603 
604  // Before the main loop starts, ping-pong the buffers so the hardware will use
605  // different buffers than the ones it was using while idling...
606  currentInFrame ^= 1;
607  currentOutFrame ^= 1;
608 
609  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
610  if (doAncInput)
611  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
612  if (doAncInput && isInterlace)
613  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
614 
615  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
616 
617  // Wait until the hardware starts filling the new buffers, and then start audio
618  // capture as soon as possible to match the video...
619  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
620  mDevice.StartAudioInput (mAudioSystem);
621 
622  mAudioInLastAddress = audioReadOffset;
623  audioInWrapAddress = audioOutWrapAddress + audioReadOffset;
624  mAudioOutLastAddress = 0;
625 
626  currentInFrame ^= 1;
627  currentOutFrame ^= 1;
628 
629  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
630  if (doAncInput)
631  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
632  if (doAncInput && isInterlace)
633  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
634 
635  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
636 
637  while (!mGlobalQuit)
638  {
639  // Wait until the input has completed capturing a frame...
640  mDevice.WaitForInputFieldID (NTV2_FIELD0, mConfig.fInputChannel);
641 
642  // Flip sense of the buffers again to refer to the buffers that the hardware isn't using (i.e. the off-screen buffers)...
643  currentInFrame ^= 1;
644  currentOutFrame ^= 1;
645 
646  if (mConfig.WithAudio())
647  {
648  // Read the audio position registers as close to the interrupt as possible...
649  mDevice.ReadAudioLastIn (currentAudioInAddress, NTV2AudioSystem(mConfig.fInputChannel));
650  currentAudioInAddress &= ~0x3UL; // Force DWORD alignment
651  currentAudioInAddress += audioReadOffset;
652 
653  if (audioIsReset && mAudioOutLastAddress)
654  {
655  // Now that the audio system has some samples to play, playback can be started...
656  mDevice.StartAudioOutput (mAudioSystem);
657  audioIsReset = false;
658  }
659 
660  if (currentAudioInAddress < mAudioInLastAddress)
661  {
662  // Audio address has wrapped around the end of the buffer.
663  // Do the calculations and transfer from the last address to the end of the buffer...
664  audioBytesCaptured = audioInWrapAddress - mAudioInLastAddress;
665 
666  mDevice.DMAReadAudio (mAudioSystem, mpHostAudioBuffer, mAudioInLastAddress, audioBytesCaptured);
667 
668  // Transfer the new samples from the start of the buffer to the current address...
669  mDevice.DMAReadAudio (mAudioSystem, AsULWordPtr(mpHostAudioBuffer.GetHostAddress(audioBytesCaptured)),
670  audioReadOffset, currentAudioInAddress - audioReadOffset);
671 
672  audioBytesCaptured += currentAudioInAddress - audioReadOffset;
673  }
674  else
675  {
676  audioBytesCaptured = currentAudioInAddress - mAudioInLastAddress;
677 
678  // No wrap, so just perform a linear DMA from the buffer...
679  mDevice.DMAReadAudio (mAudioSystem, mpHostAudioBuffer, mAudioInLastAddress, audioBytesCaptured);
680  }
681 
682  mAudioInLastAddress = currentAudioInAddress;
683  } // if mConfig.WithAudio()
684 
685  // Transfer the new frame to system memory...
686  mDevice.DMAReadFrame (currentInFrame, mpHostVideoBuffer, mpHostVideoBuffer.GetByteCount());
687 
688  if (doAncInput)
689  { // Transfer received Anc data into my F1 & F2 buffers...
690  AJAAncillaryList capturedPackets;
691  // Read ANC bytes captured
692  mDevice.AncExtractGetField1Size (sdiInput, ancBytesCapturedF1);
693  if (isInterlace)
694  mDevice.AncExtractGetField2Size (sdiInput, ancBytesCapturedF2);
696  {
697  mpHostF1AncBuffer.Fill(0);
698  if (isInterlace)
699  mpHostF2AncBuffer.Fill(0);
700  }
701  // Read ANC data
702  mDevice.DMAReadAnc (currentInFrame, mpHostF1AncBuffer, mpHostF2AncBuffer);
703 
705  {
706  AJAAncillaryList::SetFromDeviceAncBuffers (mpHostF1AncBuffer, mpHostF2AncBuffer, capturedPackets);
707  if (capturedPackets.CountAncillaryData()) capturedPackets.Print(cerr, false); // Dump packets
708  }
710  mDevice.DMAWriteAnc (currentInFrame, zeroesBuffer, zeroesBuffer);
711  }
712 
713  // Determine which timecode value should be burned in to the video frame
714  NTV2_RP188 timecodeValue;
716  {
717  // Use the embedded input time code...
718  mDevice.GetRP188Data (mConfig.fInputChannel, timecodeValue);
719  CRP188 inputRP188Info (timecodeValue);
720  inputRP188Info.GetRP188Str(timeCodeString);
721  //cerr << "SDI" << DEC(mConfig.fTimecodeSource) << ":" << timeCodeString << ":" << timecodeValue << endl;
722  }
724  {
725  // Use the analog input time code...
726  mDevice.ReadAnalogLTCInput (mConfig.fTimecodeSource == NTV2_TCINDEX_LTC1 ? 0 : 1, timecodeValue);
727  CRP188 analogRP188Info (timecodeValue);
728  analogRP188Info.GetRP188Str(timeCodeString);
729  //cerr << "Ana" << DEC(mConfig.fTimecodeSource) << ":" << timeCodeString << ":" << timecodeValue << endl;
730  }
731  else
732  {
733  // Invent a timecode (based on the number of frames procesed)...
734  const NTV2FrameRate ntv2FrameRate (GetNTV2FrameRateFromVideoFormat (mVideoFormat));
735  const TimecodeFormat tcFormat (CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat(ntv2FrameRate));
736  const CRP188 frameRP188Info (mFramesProcessed, tcFormat);
737 
738  frameRP188Info.GetRP188Reg(timecodeValue);
739  frameRP188Info.GetRP188Str(timeCodeString);
740  //cerr << "Inv:" << timeCodeString << ":" << timecodeValue << endl;
741  }
742 
743  // "Burn" the timecode into the host buffer while we have full access to it...
744  mTCBurner.BurnTimeCode (reinterpret_cast <char *> (mpHostVideoBuffer.GetHostPointer()), timeCodeString.c_str(), yPercent.Next());
745 
746  if (mConfig.WithAudio())
747  {
748  // Calculate where the next audio samples should go in the buffer, taking wraparound into account...
749  if ((mAudioOutLastAddress + audioBytesCaptured) > audioOutWrapAddress)
750  {
751  // The audio will wrap. Transfer enough bytes to fill the buffer to the end...
752  mDevice.DMAWriteAudio (mAudioSystem, mpHostAudioBuffer, mAudioOutLastAddress, audioOutWrapAddress - mAudioOutLastAddress);
753 
754  // Now transfer the remaining bytes to the front of the buffer...
755  mDevice.DMAWriteAudio (mAudioSystem, AsULWordPtr(mpHostAudioBuffer.GetHostAddress(audioOutWrapAddress - mAudioOutLastAddress)),
756  0, audioBytesCaptured - (audioOutWrapAddress - mAudioOutLastAddress));
757 
758  mAudioOutLastAddress = audioBytesCaptured - (audioOutWrapAddress - mAudioOutLastAddress);
759  }
760  else
761  {
762  // No wrap, so just do a linear DMA from the buffer...
763  mDevice.DMAWriteAudio (mAudioSystem, mpHostAudioBuffer, mAudioOutLastAddress, audioBytesCaptured);
764 
765  mAudioOutLastAddress += audioBytesCaptured;
766  }
767  } // if mConfig.WithAudio()
768 
769  // Send the updated frame back to the board for display...
770  mDevice.DMAWriteFrame (currentOutFrame, mpHostVideoBuffer, mpHostVideoBuffer.GetByteCount());
771 
772  if (doAncOutput)
773  {
775  {
777  AJAAncDataLoc F2Loc(F1AncDataLoc);
778  ULWord pktData(NTV2EndianSwap32(mFramesProcessed));
779  pkt.SetDID(0xC0); pkt.SetSID(0x00); pkt.SetDataLocation(F1AncDataLoc); pkt.SetDataCoding(AJAAncDataCoding_Digital);
780  pkt.SetPayloadData(AsCU8Ptr(&pktData), 4);
781  pkts.AddAncillaryData(pkt);
782  if (isInterlace)
783  {
784  F2Loc.SetLineNumber(uint16_t(smpteLineNumInfo.GetFirstActiveLine(NTV2_FIELD1)
785  + ULWord(F1AncDataLoc.GetLineNumber())
786  - smpteLineNumInfo.GetFirstActiveLine(NTV2_FIELD0)));
787  pkt.SetDID(0xC1); pkt.SetSID(0x01); pkt.SetDataLocation(F2Loc);
788  pktData = ULWord(pktData << 16) | ULWord(pktData >> 16);
789  pkt.SetPayloadData(AsCU8Ptr(&pktData), 4);
790  pkts.AddAncillaryData(pkt);
791  }
792  //pkts.Print(cerr, true); cerr << endl;
793  pkts.GetTransmitData (mpHostF1AncBuffer, mpHostF2AncBuffer, !isInterlace, isInterlace ? smpteLineNumInfo.GetLastLine(NTV2_FIELD0)+1 : 0);
794  }
795  // Write ANC data
796  mDevice.DMAWriteAnc (currentOutFrame, mpHostF1AncBuffer, mpHostF2AncBuffer);
797  }
798 
799  // Write the output timecode (for all SDI output spigots)...
800  for (NTV2ChannelSetConstIter iter(mRP188Outputs.begin()); iter != mRP188Outputs.end(); ++iter)
801  mDevice.SetRP188Data (*iter, timecodeValue);
802 
803  // Check for dropped frames by ensuring the hardware has not started to process
804  // the buffers that were just filled....
805  uint32_t readBackIn;
806  uint32_t readBackOut;
807  mDevice.GetInputFrame (mConfig.fInputChannel, readBackIn);
808  mDevice.GetOutputFrame (mConfig.fOutputChannel, readBackOut);
809 
810  if ((readBackIn == currentInFrame) || (readBackOut == currentOutFrame))
811  {
812  cerr << "## WARNING: Drop detected: current in " << currentInFrame << ", readback in " << readBackIn
813  << ", current out " << currentOutFrame << ", readback out " << readBackOut << endl;
814  mFramesDropped++;
815  }
816  else
817  mFramesProcessed++;
818 
819  // Tell the hardware which buffers to start using at the beginning of the next frame...
820  mDevice.SetInputFrame (mConfig.fInputChannel, currentInFrame);
821  if (doAncInput)
822  mDevice.AncExtractSetWriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
823  if (doAncInput && isInterlace)
824  mDevice.AncExtractSetField2WriteParams (sdiInput, currentInFrame, mConfig.fInputChannel);
825 
826  mDevice.SetOutputFrame (mConfig.fOutputChannel, currentOutFrame);
827  if (doAncOutput)
828  mDevice.AncInsertSetReadParams (sdiOutput, currentOutFrame, ancBytesCapturedF1, mConfig.fOutputChannel);
829  if (doAncOutput && isInterlace)
830  mDevice.AncInsertSetField2ReadParams (sdiOutput, currentOutFrame, ancBytesCapturedF2, mConfig.fOutputChannel);
831 
832  // Enable ANC insertion on first output frame
833  if (mFramesProcessed == 1)
834  mDevice.AncInsertSetEnable (sdiOutput, true);
835 
836  } // loop til quit signaled
837 
838  if (doAncInput)
839  mDevice.AncExtractSetEnable (sdiInput, false); // Stop ANC extractor
840  if (doAncOutput)
841  mDevice.AncInsertSetEnable (sdiOutput, false); // Stop ANC inserter
842 
843  if (doAncInput && mConfig.WithHanc())
844  mDevice.AncExtractSetFilterDIDs (sdiInput, savedDIDs); // Restore prior ANC filtering
845 
846  // Restore previous Anc buffer capacity...
847  mDevice.AncSetFrameBufferSize (savedF1ByteCapacity, savedF2ByteCapacity);
848  BURNNOTE("Thread completed, will exit");
849 
850 } // ProcessFrames
851 
852 
854 
855 
856 void NTV2LLBurn::GetStatus (ULWord & outFramesProcessed, ULWord & outFramesDropped)
857 {
858  outFramesProcessed = mFramesProcessed;
859  outFramesDropped = mFramesDropped;
860 
861 } // GetACStatus
862 
863 
865 {
866  switch (inInputSource)
867  {
868  case NTV2_INPUTSOURCE_SDI1: return kRegRP188InOut1DBB; // reg 29
869  case NTV2_INPUTSOURCE_SDI2: return kRegRP188InOut2DBB; // reg 64
870  case NTV2_INPUTSOURCE_SDI3: return kRegRP188InOut3DBB; // reg 268
871  case NTV2_INPUTSOURCE_SDI4: return kRegRP188InOut4DBB; // reg 273
872  case NTV2_INPUTSOURCE_SDI5: return kRegRP188InOut5DBB; // reg 342
873  case NTV2_INPUTSOURCE_SDI6: return kRegRP188InOut6DBB; // reg 418
874  case NTV2_INPUTSOURCE_SDI7: return kRegRP188InOut7DBB; // reg 427
875  case NTV2_INPUTSOURCE_SDI8: return kRegRP188InOut8DBB; // reg 436
876  default: return 0;
877  } // switch on input source
878 
879 } // GetRP188DBBRegNumForInput
880 
881 
883 {
884  bool result (false);
885  const ULWord regNum (GetRP188DBBRegNumForInput(mConfig.fInputSource));
886  ULWord regValue (0);
887 
888  // Bit 16 of the RP188 DBB register will be set if there is timecode embedded in the input signal...
889  if (regNum && mDevice.ReadRegister(regNum, regValue) && regValue & BIT(16))
890  result = true;
891  return result;
892 
893 } // InputSignalHasTimecode
894 
895 
897 {
898  ULWord regMask (kRegMaskLTC1InPresent);
899  ULWord regValue (0);
900  switch (mConfig.fTimecodeSource)
901  {
902  case NTV2_TCINDEX_LTC1: break;
903  case NTV2_TCINDEX_LTC2: regMask = kRegMaskLTC2InPresent; break;
904  default: return false;
905  }
906  mDevice.ReadRegister (kRegLTCStatusControl, regValue, regMask);
907  return regValue ? true : false;
908 
909 } // 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
NTV2DeviceCanDoCapture
bool NTV2DeviceCanDoCapture(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:1907
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:1260
NTV2InputSourceToReferenceSource
NTV2ReferenceSource NTV2InputSourceToReferenceSource(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2ReferenceSource value.
Definition: ntv2utils.cpp:5081
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:4281
NTV2_INPUTSOURCE_SDI4
@ NTV2_INPUTSOURCE_SDI4
Identifies the 4th SDI video input.
Definition: ntv2enums.h:1231
NTV2_XptHDMIOutInput
@ NTV2_XptHDMIOutInput
Definition: ntv2enums.h:2788
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:5105
NTV2_IS_SD_VIDEO_FORMAT
#define NTV2_IS_SD_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:707
AJAAncDataLoc
Defines where the ancillary data can be found within a video stream.
Definition: ancillarydata.h:224
NTV2_AUDIO_LOOPBACK_OFF
@ NTV2_AUDIO_LOOPBACK_OFF
Embeds silence (zeroes) into the data stream.
Definition: ntv2enums.h:1971
NTV2FormatDescriptor::GetVideoWriteSize
ULWord GetVideoWriteSize(ULWord inPageSize=4096UL) const
Definition: ntv2formatdescriptor.cpp:862
NTV2LLBurn::SetupVideo
virtual AJAStatus SetupVideo(void)
Sets up everything I need for capturing and playing video.
Definition: ntv2llburn.cpp:165
NTV2_CHANNEL8
@ NTV2_CHANNEL8
Specifies channel or Frame Store 8 (or the 8th item).
Definition: ntv2enums.h:1314
kRegRP188InOut3DBB
@ kRegRP188InOut3DBB
Definition: ntv2publicinterface.h:362
NTV2_INPUTSOURCE_SDI6
@ NTV2_INPUTSOURCE_SDI6
Identifies the 6th SDI video input.
Definition: ntv2enums.h:1233
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:195
NTV2_FOURCC
#define NTV2_FOURCC(_a_, _b_, _c_, _d_)
Definition: ntv2publicinterface.h:5413
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:1308
AJA_ThreadPriority_High
@ AJA_ThreadPriority_High
Definition: thread.h:44
CNTV2Card::StartAudioInput
virtual bool StartAudioInput(const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI=false)
Starts the capture side of the given NTV2AudioSystem, writing incoming audio samples into the Audio S...
Definition: ntv2audio.cpp:1218
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:3947
NTV2_WgtSDIMonOut1
@ NTV2_WgtSDIMonOut1
Definition: ntv2enums.h:2904
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:4029
NTV2_AUDIO_BUFFER_BIG
@ NTV2_AUDIO_BUFFER_BIG
Definition: ntv2enums.h:1864
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:2507
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:709
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:5484
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:1234
NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE
#define NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE(__f__)
Definition: ntv2enums.h:1008
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:994
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific Frame Store. They're also commonly used to i...
Definition: ntv2enums.h:1305
NTV2Buffer
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
Definition: ntv2publicinterface.h:5967
NTV2SmpteLineNumber::GetLastLine
ULWord GetLastLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
Definition: ntv2formatdescriptor.cpp:1296
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:368
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6040
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:601
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:1170
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:2537
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:1875
AJAAncDataLoc::SetLineNumber
AJAAncDataLoc & SetLineNumber(const uint16_t inLineNum)
Sets my anc data line number value.
Definition: ancillarydata.h:392
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:3704
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:378
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:436
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:327
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:388
BurnConfig::fSuppressAudio
bool fSuppressAudio
If true, suppress audio; otherwise include audio.
Definition: ntv2democommon.h:389
BurnConfig::fTimecodeSource
NTV2TCIndex fTimecodeSource
Timecode source to use.
Definition: ntv2democommon.h:387
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3811
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:230
NTV2OutputDestinationToChannel
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
Definition: ntv2utils.cpp:5213
NTV2InputSourceToEmbeddedAudioInput
NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value.
Definition: ntv2utils.cpp:4935
CNTV2Card::AncSetFrameBufferSize
virtual bool AncSetFrameBufferSize(const ULWord inF1Size, const ULWord inF2Size)
Sets the capacity of the ANC buffers in device frame memory. (Call NTV2DeviceCanDoCustomAnc to determ...
Definition: ntv2anc.cpp:123
NTV2DeviceCanDoMultiFormat
bool NTV2DeviceCanDoMultiFormat(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4065
GetFrameBufferInputXptFromChannel
NTV2InputXptID GetFrameBufferInputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsBInput=false)
Definition: ntv2signalrouter.cpp:762
NTV2DeviceCanDoDualLink
bool NTV2DeviceCanDoDualLink(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:2357
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
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:832
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:2234
ntv2llburn.h
Header file for the low latency NTV2Burn demonstration class.
NTV2_WIDGET_INVALID
@ NTV2_WIDGET_INVALID
Definition: ntv2enums.h:2963
NTV2_AncRgn_Field2
@ NTV2_AncRgn_Field2
Identifies the "normal" Field 2 ancillary data region.
Definition: ntv2enums.h:4141
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:2207
kRegRP188InOut5DBB
@ kRegRP188InOut5DBB
Definition: ntv2publicinterface.h:450
AJA_STATUS_MEMORY
@ AJA_STATUS_MEMORY
Definition: types.h:384
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:944
kRegMaskLTC2InPresent
@ kRegMaskLTC2InPresent
Definition: ntv2publicinterface.h:1854
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:919
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:1554
AJAAncillaryData::SetDID
virtual AJAStatus SetDID(const uint8_t inDataID)
Sets my Data ID (DID).
Definition: ancillarydata.cpp:188
NTV2ChannelSetConstIter
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
Definition: ntv2publicinterface.h:3824
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:303
NTV2DeviceCanDoFrameBufferFormat
bool NTV2DeviceCanDoFrameBufferFormat(const NTV2DeviceID inDeviceID, const NTV2FrameBufferFormat inFBFormat)
Definition: ntv2devicefeatures.hpp:15330
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or Frame Store 1 (or the first item).
Definition: ntv2enums.h:1307
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:3805
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:3826
CNTV2Card::SetVANCShiftMode
virtual bool SetVANCShiftMode(NTV2Channel inChannel, NTV2VANCDataShiftMode inMode)
Enables or disables the "VANC Shift Mode" feature for the given channel.
Definition: ntv2register.cpp:2816
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:1787
CNTV2Card::SetVideoFormat
virtual bool SetVideoFormat(const NTV2VideoFormat inVideoFormat, const bool inIsAJARetail=true, const bool inKeepVancSettings=false, const NTV2Channel inChannel=NTV2_CHANNEL1)
Configures the AJA device to handle a specific video format.
Definition: ntv2register.cpp:204
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:503
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:396
NTV2_INPUTSOURCE_HDMI3
@ NTV2_INPUTSOURCE_HDMI3
Identifies the 3rd HDMI video input.
Definition: ntv2enums.h:1226
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:851
NTV2_CHANNEL6
@ NTV2_CHANNEL6
Specifies channel or Frame Store 6 (or the 6th item).
Definition: ntv2enums.h:1312
kRegMaskLTC1InPresent
@ kRegMaskLTC1InPresent
Definition: ntv2publicinterface.h:1852
NTV2InputSourceToAudioSystem
NTV2AudioSystem NTV2InputSourceToAudioSystem(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2AudioSystem value.
Definition: ntv2utils.cpp:5129
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:488
NTV2_CHANNEL4
@ NTV2_CHANNEL4
Specifies channel or Frame Store 4 (or the 4th item).
Definition: ntv2enums.h:1310
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:574
AJAAncillaryData::SetDataLocation
virtual AJAStatus SetDataLocation(const AJAAncDataLoc &inLoc)
Sets my ancillary data "location" within the video stream.
Definition: ancillarydata.cpp:256
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:386
NTV2LLBurn::StartRunThread
virtual void StartRunThread(void)
Starts my main worker thread.
Definition: ntv2llburn.cpp:475
NTV2_CHANNEL5
@ NTV2_CHANNEL5
Specifies channel or Frame Store 5 (or the 5th item).
Definition: ntv2enums.h:1311
GetIndexForNTV2InputSource
ULWord GetIndexForNTV2InputSource(const NTV2InputSource inValue)
Definition: ntv2utils.cpp:5306
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:212
NTV2_INPUTSOURCE_ANALOG1
@ NTV2_INPUTSOURCE_ANALOG1
Identifies the first analog video input.
Definition: ntv2enums.h:1223
AJAThread
Definition: thread.h:69
AJAThread::Active
virtual bool Active()
Definition: thread.cpp:116
NTV2_INPUTSOURCE_SDI1
@ NTV2_INPUTSOURCE_SDI1
Identifies the 1st SDI video input.
Definition: ntv2enums.h:1228
NTV2_IS_ANALOG_TIMECODE_INDEX
#define NTV2_IS_ANALOG_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3900
AJA_STATUS_NOINPUT
@ AJA_STATUS_NOINPUT
Definition: types.h:387
AJAStatus
AJAStatus
Definition: types.h:365
NTV2ChannelToOutputDestination
NTV2OutputDestination NTV2ChannelToOutputDestination(const NTV2Channel inChannel)
Converts the given NTV2Channel value into its ordinary equivalent NTV2OutputDestination.
Definition: ntv2utils.cpp:5225
NTV2Buffer::DefaultPageSize
static size_t DefaultPageSize(void)
Definition: ntv2publicinterface.cpp:1905
NTV2_RP188_INPUT
@ NTV2_RP188_INPUT
Definition: ntv2enums.h:2038
NTV2FormatDescriptor::numPixels
ULWord numPixels
Width – total number of pixels per line.
Definition: ntv2formatdescriptor.h:349
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:486
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:2526
CNTV2Card::SetRP188SourceFilter
virtual bool SetRP188SourceFilter(const NTV2Channel inSDIInput, const UWord inFilterValue)
Sets the RP188 DBB filter for the given SDI input.
Definition: ntv2register.cpp:2549
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:969
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:805
NTV2DIDSet
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
Definition: ntv2card.h:47
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:2216
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:153
NTV2_AUDIOSYSTEM_2
@ NTV2_AUDIOSYSTEM_2
This identifies the 2nd Audio System.
Definition: ntv2enums.h:3812
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: ntv2audio.cpp:573
ULWord
uint32_t ULWord
Definition: ajatypes.h:246
NTV2_VANCDATA_8BITSHIFT_ENABLE
@ NTV2_VANCDATA_8BITSHIFT_ENABLE
Definition: ntv2enums.h:3731
NTV2DeviceCanDoWidget
bool NTV2DeviceCanDoWidget(const NTV2DeviceID inDeviceID, const NTV2WidgetID inWidgetID)
Definition: ntv2devicefeatures.hpp:30519
kRegRP188InOut2DBB
@ kRegRP188InOut2DBB
Definition: ntv2publicinterface.h:138
NTV2LLBurn::SetupAudio
virtual AJAStatus SetupAudio(void)
Sets up everything I need for capturing and playing audio.
Definition: ntv2llburn.cpp:317
AsULWordPtr
#define AsULWordPtr(_p_)
Definition: ntv2llburn.cpp:26
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or Frame Store 7 (or the 7th item).
Definition: ntv2enums.h:1313
AJAAncillaryData
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
Definition: ancillarydata.h:550
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:990
NTV2FormatDescriptor::numLines
ULWord numLines
Height – total number of lines.
Definition: ntv2formatdescriptor.h:348
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:452
NTV2_AncRgn_Field1
@ NTV2_AncRgn_Field1
Identifies the "normal" Field 1 ancillary data region.
Definition: ntv2enums.h:4140
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:132
NTV2DeviceHasBiDirectionalSDI
bool NTV2DeviceHasBiDirectionalSDI(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:6454
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:944
CNTV2DemoCommon::SetDefaultPageSize
static size_t SetDefaultPageSize(void)
Definition: ntv2democommon.cpp:1505
NTV2LLBurn::InputSignalHasTimecode
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false.
Definition: ntv2llburn.cpp:882
BurnConfig::fWithHanc
bool fWithHanc
If true, capture & play HANC data, including audio (LLBurn). Defaults to false.
Definition: ntv2democommon.h:393
NTV2_INPUTSOURCE_INVALID
@ NTV2_INPUTSOURCE_INVALID
The invalid video input.
Definition: ntv2enums.h:1236
CNTV2Card::SetReference
virtual bool SetReference(const NTV2ReferenceSource inRefSource, const bool inKeepFramePulseSelect=false)
Sets the device's clock reference source. See Device Clocking and Synchronization for more informatio...
Definition: ntv2register.cpp:1486
AsCU8Ptr
#define AsCU8Ptr(_p_)
Definition: ntv2llburn.cpp:27
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:1232
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:468
CNTV2Card::Connect
virtual bool Connect(const NTV2InputCrosspointID inInputXpt, const NTV2OutputCrosspointID inOutputXpt, const bool inValidate=false)
Connects the given widget signal input (sink) to the given widget signal output (source).
Definition: ntv2regroute.cpp:87
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:3660
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or Frame Store 3 (or the 3rd item).
Definition: ntv2enums.h:1309
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:286
UWord
uint16_t UWord
Definition: ajatypes.h:244
NTV2_FBF_8BIT_YCBCR
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
Definition: ntv2enums.h:211
NTV2InputCrosspointID
NTV2InputCrosspointID
Identifies a widget input that potentially can accept a signal emitted from another widget's output (...
Definition: ntv2enums.h:2685
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:462
NTV2LLBurn::Init
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2llburn.cpp:79
NTV2DeviceGetNumFrameStores
UWord NTV2DeviceGetNumFrameStores(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10487
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:1688
AJAAncillaryList::AddAncillaryData
virtual AJAStatus AddAncillaryData(const AJAAncillaryList &inPackets)
Appends a copy of the given list's packets to me.
Definition: ancillarylist.cpp:313
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:342
NTV2LLBurn::RouteInputSignal
virtual void RouteInputSignal(void)
Sets up board routing for capture.
Definition: ntv2llburn.cpp:386
NTV2WidgetID
NTV2WidgetID
Definition: ntv2enums.h:2842
CNTV2DriverInterface::IsDeviceReady
virtual bool IsDeviceReady(const bool inCheckValid=(0))
Definition: ntv2driverinterface.cpp:1228
NTV2_INPUTSOURCE_HDMI4
@ NTV2_INPUTSOURCE_HDMI4
Identifies the 4th HDMI video input.
Definition: ntv2enums.h:1227
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:194
NTV2DeviceCanDoPlayback
bool NTV2DeviceCanDoPlayback(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4438
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:1550
NTV2_XptHDMIOutQ1Input
@ NTV2_XptHDMIOutQ1Input
Definition: ntv2enums.h:2789
BurnConfig::fWithAnc
bool fWithAnc
If true, capture & play anc data (LLBurn). Defaults to false.
Definition: ntv2democommon.h:392
AJAAncillaryList::CountAncillaryData
virtual uint32_t CountAncillaryData(void) const
Answers with the number of AJAAncillaryData objects I contain (any/all types).
Definition: ancillarylist.h:187
NTV2_INPUTSOURCE_HDMI1
@ NTV2_INPUTSOURCE_HDMI1
Identifies the 1st HDMI video input.
Definition: ntv2enums.h:1224
CLEAR_DEVICE_ANC_BUFFER_AFTER_READ
static const bool CLEAR_DEVICE_ANC_BUFFER_AFTER_READ((0))
CRP188
Definition: ntv2rp188.h:55
NTV2LLBurn::Quit
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2llburn.cpp:68
kRegRP188InOut1DBB
@ kRegRP188InOut1DBB
Definition: ntv2publicinterface.h:103
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:4049
NTV2_OUTPUT_DEST_IS_SDI
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
Definition: ntv2enums.h:1294
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:955
NTV2_DISABLE_TASKS
@ NTV2_DISABLE_TASKS
0: Disabled: Device is completely configured by controlling application(s) – no driver involvement.
Definition: ntv2publicinterface.h:4259
AJAAncillaryData::SetDataCoding
virtual AJAStatus SetDataCoding(const AJAAncDataCoding inCodingType)
Sets my ancillary data coding type (e.g. digital or analog/raw waveform).
Definition: ancillarydata.cpp:328
NTV2DeviceGetNumAudioSystems
UWord NTV2DeviceGetNumAudioSystems(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:9864
BurnConfig::fInputChannel
NTV2Channel fInputChannel
The input channel to use.
Definition: ntv2democommon.h:381
NTV2_RP188_OUTPUT
@ NTV2_RP188_OUTPUT
Definition: ntv2enums.h:2039
NTV2Buffer::GetHostAddress
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
Definition: ntv2publicinterface.cpp:1610
NTV2_INPUTSOURCE_HDMI2
@ NTV2_INPUTSOURCE_HDMI2
Identifies the 2nd HDMI video input.
Definition: ntv2enums.h:1225
NTV2OutputCrosspointID
NTV2OutputCrosspointID
Identifies a widget output, a signal source, that potentially can drive another widget's input (ident...
Definition: ntv2enums.h:2467
BurnConfig::fDeviceSpec
std::string fDeviceSpec
The AJA device to use.
Definition: ntv2democommon.h:379
NTV2Buffer::GetHostPointer
void * GetHostPointer(void) const
Definition: ntv2publicinterface.h:6023
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1221
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:383
ntv2formatdescriptor.h
Declares the NTV2FormatDescriptor class.
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:498
NTV2LLBurn::~NTV2LLBurn
virtual ~NTV2LLBurn()
Definition: ntv2llburn.cpp:47
NTV2_WgtHDMIOut1
@ NTV2_WgtHDMIOut1
Definition: ntv2enums.h:2879
AJA_STATUS_INITIALIZE
@ AJA_STATUS_INITIALIZE
Definition: types.h:373
NTV2SmpteLineNumber
Used to describe Start of Active Video (SAV) location and field dominance for a given NTV2Standard....
Definition: ntv2utils.h:869
NTV2DeviceHasSDIRelays
bool NTV2DeviceHasSDIRelays(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:7367
AJAAncDataStream_1
@ AJAAncDataStream_1
The ancillary data is associated with DS1 of the video stream (Link A).
Definition: ancillarydata.h:104
false
#define false
Definition: ntv2devicefeatures.h:25
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:1288
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:701
kRegRP188InOut4DBB
@ kRegRP188InOut4DBB
Definition: ntv2publicinterface.h:367
NTV2_MODE_CAPTURE
@ NTV2_MODE_CAPTURE
Capture (input) mode, which writes into device SDRAM.
Definition: ntv2enums.h:1202
NTV2_INPUTSOURCE_SDI8
@ NTV2_INPUTSOURCE_SDI8
Identifies the 8th SDI video input.
Definition: ntv2enums.h:1235
NTV2DeviceCanDoInputSource
bool NTV2DeviceCanDoInputSource(const NTV2DeviceID inDeviceID, const NTV2InputSource inInputSource)
Definition: ntv2devicefeatures.hpp:17462
AJA_STATUS_BAD_PARAM
@ AJA_STATUS_BAD_PARAM
Definition: types.h:379
ULWord64
uint64_t ULWord64
Definition: ajatypes.h:249
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:1188
NTV2_INPUTSOURCE_SDI2
@ NTV2_INPUTSOURCE_SDI2
Identifies the 2nd SDI video input.
Definition: ntv2enums.h:1229
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:6705
NTV2_TCINDEX_LTC2
@ NTV2_TCINDEX_LTC2
Analog LTC 2.
Definition: ntv2enums.h:3875
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5442
NTV2LLBurn
Captures video and audio from a signal provided to an input of an AJA device, burns timecode into the...
Definition: ntv2llburn.h:32
NTV2_WgtHDMIOut1v2
@ NTV2_WgtHDMIOut1v2
Definition: ntv2enums.h:2903
NTV2LLBurn::NTV2LLBurn
NTV2LLBurn(const BurnConfig &inConfig)
Constructs me using the given configuration settings.
Definition: ntv2llburn.cpp:30
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))
NTV2DeviceGetNumVideoChannels
ULWord NTV2DeviceGetNumVideoChannels(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11834
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:2876
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:808
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:371
CNTV2Card::StartAudioOutput
virtual bool StartAudioOutput(const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI=false)
Starts the playout side of the given NTV2AudioSystem, reading outgoing audio samples from the Audio S...
Definition: ntv2audio.cpp:1129
AJAAncDataCoding_Digital
@ AJAAncDataCoding_Digital
The ancillary data is in the form of a SMPTE-291 Ancillary Packet.
Definition: ancillarydata.h:475
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:856
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:2225
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
CNTV2Card::SetEnableVANCData
virtual bool SetEnableVANCData(const bool inVANCenabled, const bool inTallerVANC, const NTV2Standard inStandard, const NTV2FrameGeometry inGeometry, const NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2register.cpp:2736
NTV2LLBurn::RouteOutputSignal
virtual void RouteOutputSignal(void)
Sets up board routing for playout.
Definition: ntv2llburn.cpp:408
CNTV2Card::GetInputVideoFormat
virtual NTV2VideoFormat GetInputVideoFormat(const NTV2InputSource inVideoSource=NTV2_INPUTSOURCE_SDI1, const bool inIsProgressive=false)
Returns the video format of the signal that is present on the given input source.
Definition: ntv2register.cpp:3381
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:2565
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:2578
NTV2_INPUT_SOURCE_IS_SDI
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
Definition: ntv2enums.h:1242
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:6192
AJAThread::SetPriority
virtual AJAStatus SetPriority(AJAThreadPriority priority)
Definition: thread.cpp:133
NTV2DeviceGetNumVideoOutputs
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:12012
NTV2DeviceCanDoCustomAnc
bool NTV2DeviceCanDoCustomAnc(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:2087
AJA_STATUS_OPEN
@ AJA_STATUS_OPEN
Definition: types.h:375
AJAAncDataSpace_VANC
@ AJAAncDataSpace_VANC
Ancillary data found between SAV and EAV (.
Definition: ancillarydata.h:176
CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1000
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
CNTV2Card::SetFrameBufferFormat
virtual bool SetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat inNewFormat, bool inIsAJARetail=true, 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:1828
kRegRP188InOut7DBB
@ kRegRP188InOut7DBB
Definition: ntv2publicinterface.h:556
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:149
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:252
Bouncer::Next
T Next(void)
Definition: ntv2democommon.h:193
NTV2_INPUTSOURCE_SDI3
@ NTV2_INPUTSOURCE_SDI3
Identifies the 3rd SDI video input.
Definition: ntv2enums.h:1230
AJAThread::Start
virtual AJAStatus Start()
Definition: thread.cpp:91
NTV2InputSourceToAudioSource
NTV2AudioSource NTV2InputSourceToAudioSource(const NTV2InputSource inInputSource)
Definition: ntv2utils.cpp:4959
CNTV2Card::SetMode
virtual bool SetMode(const NTV2Channel inChannel, const NTV2Mode inNewValue, const bool inIsRetail=true)
Determines if a given FrameStore on the AJA device will be used to capture or playout video.
Definition: ntv2register.cpp:1613
CNTV2DemoCommon::GetAJAPixelFormat
static AJA_PixelFormat GetAJAPixelFormat(const NTV2FrameBufferFormat inFormat)
Definition: ntv2democommon.cpp:1054
BIT
#define BIT(_x_)
Definition: ajatypes.h:654
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:3809
AJA_FAILURE
#define AJA_FAILURE(_status_)
Definition: types.h:358
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:767
NTV2_TCINDEX_LTC1
@ NTV2_TCINDEX_LTC1
Analog LTC 1.
Definition: ntv2enums.h:3874
NTV2_INPUT_SOURCE_IS_ANALOG
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
Definition: ntv2enums.h:1241
kRegLTCStatusControl
@ kRegLTCStatusControl
Definition: ntv2publicinterface.h:327
BurnConfig
Configures an NTV2Burn or NTV2FieldBurn instance.
Definition: ntv2democommon.h:376
CNTV2Card::EnableChannel
virtual bool EnableChannel(const NTV2Channel inChannel)
Enables the given FrameStore.
Definition: ntv2register.cpp:2113
NTV2_MODE_DISPLAY
@ NTV2_MODE_DISPLAY
Playout (output) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1200
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:1279
NTV2_XptAnalogOutInput
@ NTV2_XptAnalogOutInput
Definition: ntv2enums.h:2805
AJAAncDataLink_A
@ AJAAncDataLink_A
The ancillary data is associated with Link A of the video stream.
Definition: ancillarydata.h:80
DEVICE_ID_NOTFOUND
@ DEVICE_ID_NOTFOUND
Invalid or "not found".
Definition: ntv2enums.h:90
NTV2LLBurn::SetupHostBuffers
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
Definition: ntv2llburn.cpp:364
GetRP188DBBRegNumForInput
static ULWord GetRP188DBBRegNumForInput(const NTV2InputSource inInputSource)
Definition: ntv2llburn.cpp:864
NTV2DeviceGetMaxAudioChannels
UWord NTV2DeviceGetMaxAudioChannels(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:8796
CRP188::GetRP188Str
bool GetRP188Str(std::string &sRP188) const
Definition: ntv2rp188.cpp:918
BurnConfig::fOutputChannel
NTV2Channel fOutputChannel
The output channel to use.
Definition: ntv2democommon.h:382
NTV2_FIELD1
@ NTV2_FIELD1
Identifies the last (second) field in time for an interlaced video frame.
Definition: ntv2enums.h:1788
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:896
NTV2_OEM_TASKS
@ NTV2_OEM_TASKS
2: OEM: Device is configured by controlling application(s), with minimal driver involvement.
Definition: ntv2publicinterface.h:4261
kRegRP188InOut6DBB
@ kRegRP188InOut6DBB
Definition: ntv2publicinterface.h:546
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:208
kRegRP188InOut8DBB
@ kRegRP188InOut8DBB
Definition: ntv2publicinterface.h:566
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:755