AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
ntv2burn4kquadrant.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2burn4kquadrant.h"
9 #include "ntv2devicescanner.h"
10 #include "ntv2formatdescriptor.h"
11 #include "ajabase/common/types.h"
12 #include "ajabase/system/process.h"
13 #include <iostream>
14 
15 using namespace std;
16 
17 
18 
20 
21  : mConfig (inConfig),
22  mPlayThread (AJAThread()),
23  mCaptureThread (AJAThread()),
24  mInputAudioSystem (NTV2_AUDIOSYSTEM_1),
25  mOutputAudioSystem (NTV2_AUDIOSYSTEM_1),
26  mSingleDevice (false),
27  mGlobalQuit (false)
28 {
29  CNTV2DemoCommon::SetDefaultPageSize(); // Set host-specific page size
30 
31  if (mConfig.fDeviceSpec == mConfig.fDeviceSpec2)
32  mSingleDevice = true;
33 
34 } // constructor
35 
36 
38 {
39  // Stop my capture and playout threads, then destroy them...
40  Quit ();
41 
42  // Unsubscribe from input vertical event...
43  mInputDevice.UnsubscribeInputVerticalEvent (mConfig.fInputChannel);
44  mOutputDevice.UnsubscribeOutputVerticalEvent (mConfig.fOutputChannel);
45 
46  mInputDevice.SetEveryFrameServices (mInputSavedTaskMode); // Restore prior service level
47  mInputDevice.ReleaseStreamForApplication (kDemoAppSignature, int32_t(AJAProcess::GetPid())); // Release the device
48 
49  if (!mSingleDevice)
50  {
51  mOutputDevice.SetEveryFrameServices (mOutputSavedTaskMode); // Restore prior service level
52  mOutputDevice.ReleaseStreamForApplication (kDemoAppSignature, int32_t(AJAProcess::GetPid())); // Release the device
53  }
54 
55 } // destructor
56 
57 
59 {
60  // Set the global 'quit' flag, and wait for the threads to go inactive...
61  mGlobalQuit = true;
62 
63  while (mPlayThread.Active())
64  AJATime::Sleep(10);
65 
66  while (mCaptureThread.Active())
67  AJATime::Sleep(10);
68 
69 } // Quit
70 
71 
73 {
75 
76  // Open the device...
78  {cerr << "## ERROR: Input device '" << mConfig.fDeviceSpec << "' not found" << endl; return AJA_STATUS_OPEN;}
79 
80  // Store the input device ID in a member because it will be used frequently...
81  mInputDeviceID = mInputDevice.GetDeviceID ();
82  if (!mInputDevice.features().CanDo4KVideo())
83  {cerr << "## ERROR: Input device '" << mConfig.fDeviceSpec << "' cannot do 4K/UHD video" << endl; return AJA_STATUS_UNSUPPORTED;}
84 
85  if (!mInputDevice.IsDeviceReady (false))
86  {cerr << "## ERROR: Input device '" << mConfig.fDeviceSpec << "' not ready" << endl; return AJA_STATUS_INITIALIZE;}
87 
88  // Output device:
90  {cerr << "## ERROR: Output device '" << mConfig.fDeviceSpec2 << "' not found" << endl; return AJA_STATUS_OPEN;}
91 
92  // Store the output device ID in a member because it will be used frequently...
93  mOutputDeviceID = mOutputDevice.GetDeviceID ();
94  if (!mOutputDevice.features().CanDo4KVideo())
95  {cerr << "## ERROR: Output device '" << mConfig.fDeviceSpec2 << "' cannot do 4K/UHD video" << endl; return AJA_STATUS_UNSUPPORTED;}
96 
97  if (!mOutputDevice.IsDeviceReady(false))
98  {cerr << "## ERROR: Output device '" << mConfig.fDeviceSpec2 << "' not ready" << endl; return AJA_STATUS_INITIALIZE;}
99 
100  if (mSingleDevice)
101  {
102  if (mInputDevice.features().GetNumFrameStores() < 8)
103  {cerr << "## ERROR: Single device '" << mConfig.fDeviceSpec2 << "' requires 8 video channels" << endl; return AJA_STATUS_UNSUPPORTED;}
104  mOutputAudioSystem = NTV2_AUDIOSYSTEM_5;
105  mConfig.fOutputChannel = NTV2_CHANNEL5;
106  }
107 
108  if (!mInputDevice.AcquireStreamForApplication (kDemoAppSignature, static_cast<int32_t>(AJAProcess::GetPid())))
109  {cerr << "## ERROR: Input device '" << mConfig.fDeviceSpec << "' is in use by another application" << endl; return AJA_STATUS_BUSY;}
110  mInputDevice.GetEveryFrameServices (mInputSavedTaskMode); // Save the current state before changing it
111  mInputDevice.SetEveryFrameServices (NTV2_OEM_TASKS); // Since this is an OEM demo, use the OEM service level
112 
113  if (!mSingleDevice)
114  {
115  if (!mOutputDevice.AcquireStreamForApplication (kDemoAppSignature, static_cast <int32_t>(AJAProcess::GetPid())))
116  {cerr << "## ERROR: Output device '" << mConfig.fDeviceSpec2 << "' is in use by another application" << endl; return AJA_STATUS_BUSY;}
117 
118  mOutputDevice.GetEveryFrameServices (mOutputSavedTaskMode); // Save the current state before changing it
119  mOutputDevice.SetEveryFrameServices (NTV2_OEM_TASKS); // Since this is an OEM demo, use the OEM service level
120  }
121 
122  if (mInputDevice.features().CanDoMultiFormat())
123  mInputDevice.SetMultiFormatMode (false);
124  if (mOutputDevice.features().CanDoMultiFormat())
125  mOutputDevice.SetMultiFormatMode (false);
126 
127  // Sometimes other applications disable some or all of the frame buffers, so turn them all on here...
128  switch (mInputDevice.features().GetNumFrameStores())
129  {
130  case 8: mInputDevice.EnableChannel (NTV2_CHANNEL8);
131  mInputDevice.EnableChannel (NTV2_CHANNEL7);
132  mInputDevice.EnableChannel (NTV2_CHANNEL6);
133  mInputDevice.EnableChannel (NTV2_CHANNEL5);
134  /* FALLTHRU */
135  case 4: mInputDevice.EnableChannel (NTV2_CHANNEL4);
136  mInputDevice.EnableChannel (NTV2_CHANNEL3);
137  /* FALLTHRU */
138  case 2: mInputDevice.EnableChannel (NTV2_CHANNEL2);
139  /* FALLTHRU */
140  case 1: mInputDevice.EnableChannel (NTV2_CHANNEL1);
141  break;
142  }
143 
144  if (!mSingleDevice) // Don't do this twice if Input & Output devices are same device!
145  switch (mOutputDevice.features().GetNumFrameStores())
146  {
147  case 8: mOutputDevice.EnableChannel (NTV2_CHANNEL8);
148  mOutputDevice.EnableChannel (NTV2_CHANNEL7);
149  mOutputDevice.EnableChannel (NTV2_CHANNEL6);
150  mOutputDevice.EnableChannel (NTV2_CHANNEL5);
151  /* FALLTHRU */
152  case 4: mOutputDevice.EnableChannel (NTV2_CHANNEL4);
153  mOutputDevice.EnableChannel (NTV2_CHANNEL3);
154  /* FALLTHRU */
155  case 2: mOutputDevice.EnableChannel (NTV2_CHANNEL2);
156  /* FALLTHRU */
157  case 1: mOutputDevice.EnableChannel (NTV2_CHANNEL1);
158  break;
159  }
160 
161  // Set up the video and audio...
162  status = SetupInputVideo();
163  if (AJA_FAILURE (status))
164  return status;
165 
166  status = SetupOutputVideo();
167  if (AJA_FAILURE (status))
168  return status;
169 
170  status = SetupInputAudio();
171  if (AJA_FAILURE (status))
172  return status;
173 
174  status = SetupOutputAudio();
175  if (AJA_FAILURE (status))
176  return status;
177 
178  // Set up the circular buffers...
179  status = SetupHostBuffers();
180  if (AJA_FAILURE(status))
181  return status;
182 
183  // Set up the signal routing...
186 
187  // Lastly, prepare my AJATimeCodeBurn instance...
189  mFormatDesc.numPixels,
190  mFormatDesc.numLines);
191  // Ready to go...
192  #if defined(_DEBUG)
193  cerr << mConfig;
194  if (mInputDevice.IsRemote())
195  cerr << "Input Device Desc: " << mInputDevice.GetDescription() << endl;
196  if (mOutputDevice.IsRemote())
197  cerr << "Output Device Desc: " << mOutputDevice.GetDescription() << endl;
198  cerr << endl;
199  #endif // not _DEBUG
200  BURNINFO("Configuration: " << mConfig);
201  return AJA_STATUS_SUCCESS;
202 
203 } // Init
204 
205 
207 {
208  // Set the video format to match the incoming video format.
209  // Does the device support the desired input source?
210  // Since this is a 4k Quadrant example, look at one of the inputs and deduce the 4k geometry from the quadrant geometry...
211 
212  // Determine the input video signal format, and set the device's reference source to that input.
213  // If you want to look at one of the quadrants, say on the HDMI output, then lock to one of the
214  // inputs (this assumes all quadrants are timed)...
215 
216  // First, enable all of the necessary interrupts, and subscribe to the interrupts for the channel to be used...
217  mInputDevice.EnableInputInterrupt (mConfig.fInputChannel);
218  mInputDevice.SubscribeInputVerticalEvent (mConfig.fInputChannel);
219 
220  // Turn multiformat off for this demo -- all multiformat devices will follow channel 1 configuration...
221 
222  // For devices with bi-directional SDI connectors, their transmitter must be turned off before we can read a format...
223  if (mInputDevice.features().HasBiDirectionalSDI())
224  {
225  mInputDevice.SetSDITransmitEnable (NTV2_CHANNEL1, false);
226  mInputDevice.SetSDITransmitEnable (NTV2_CHANNEL2, false);
227  mInputDevice.SetSDITransmitEnable (NTV2_CHANNEL3, false);
228  mInputDevice.SetSDITransmitEnable (NTV2_CHANNEL4, false);
229  AJATime::Sleep(1000);
230  }
231 
232  mVideoFormat = NTV2_FORMAT_UNKNOWN;
233  mVideoFormat = mInputDevice.GetInputVideoFormat (NTV2_INPUTSOURCE_SDI1);
234  mInputDevice.SetReference (NTV2_REFERENCE_INPUT1);
235 
236  if (mVideoFormat == NTV2_FORMAT_UNKNOWN)
237  return AJA_STATUS_NOINPUT; // Sorry, can't handle this format
238 
239  // Set the device format to the input format detected...
240  CNTV2DemoCommon::Get4KInputFormat (mVideoFormat);
241  mInputDevice.SetVideoFormat (mVideoFormat);
242 
243  // Set the frame buffer pixel format for all the channels on the device
244  // (assuming the device supports that pixel format -- otherwise default to 8-bit YCbCr)...
245  if (!mInputDevice.features().CanDoFrameBufferFormat(mConfig.fPixelFormat))
247 
248  // ...and set all buffers pixel format...
249  mInputDevice.SetFrameBufferFormat (NTV2_CHANNEL1, mConfig.fPixelFormat);
250  mInputDevice.SetFrameBufferFormat (NTV2_CHANNEL2, mConfig.fPixelFormat);
251  mInputDevice.SetFrameBufferFormat (NTV2_CHANNEL3, mConfig.fPixelFormat);
252  mInputDevice.SetFrameBufferFormat (NTV2_CHANNEL4, mConfig.fPixelFormat);
253 
254  mInputDevice.SetEnableVANCData (false, false);
255 
256  // Now that the video is set up, get information about the current frame geometry...
257  mFormatDesc = NTV2FormatDescriptor (mVideoFormat, mConfig.fPixelFormat);
258  return AJA_STATUS_SUCCESS;
259 
260 } // SetupInputVideo
261 
262 
264 {
265  // We turned off the transmit for the capture device, so now turn them on for the playback device...
266  if (mOutputDevice.features().HasBiDirectionalSDI())
267  {
268  // Devices having bidirectional SDI must be set to "transmit"...
269  if (mSingleDevice)
270  {
271  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL5, true);
272  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL6, true);
273  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL7, true);
274  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL8, true);
275  }
276  else
277  {
278  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL1, true);
279  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL2, true);
280  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL3, true);
281  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL4, true);
282  }
283  }
284 
285  // Set the video format to match the incoming video format...
286  mOutputDevice.SetVideoFormat (mVideoFormat);
287  mOutputDevice.SetReference (NTV2_REFERENCE_FREERUN);
288 
289  if (mVideoFormat == NTV2_FORMAT_UNKNOWN)
290  return AJA_STATUS_NOINPUT; // Sorry, can't handle this format
291 
292  // Set the frame buffer pixel format for all the channels on the device
293  // (assuming the device supports that pixel format -- otherwise default to 8-bit YCbCr)...
294  if (!mOutputDevice.features().CanDoFrameBufferFormat(mConfig.fPixelFormat))
296 
297  // ...and set the pixel format for all frame stores...
298  if (mSingleDevice)
299  {
300  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL5, mConfig.fPixelFormat);
301  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL6, mConfig.fPixelFormat);
302  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL7, mConfig.fPixelFormat);
303  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL8, mConfig.fPixelFormat);
304  }
305  else
306  {
307  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL1, mConfig.fPixelFormat);
308  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL2, mConfig.fPixelFormat);
309  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL3, mConfig.fPixelFormat);
310  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL4, mConfig.fPixelFormat);
311  }
312 
313  // Set all frame buffers to playback
314  if (mSingleDevice)
315  {
316  mOutputDevice.SetMode (NTV2_CHANNEL5, NTV2_MODE_DISPLAY);
317  mOutputDevice.SetMode (NTV2_CHANNEL6, NTV2_MODE_DISPLAY);
318  mOutputDevice.SetMode (NTV2_CHANNEL7, NTV2_MODE_DISPLAY);
319  mOutputDevice.SetMode (NTV2_CHANNEL8, NTV2_MODE_DISPLAY);
320  }
321  else
322  {
323  mOutputDevice.SetMode (NTV2_CHANNEL1, NTV2_MODE_DISPLAY);
324  mOutputDevice.SetMode (NTV2_CHANNEL2, NTV2_MODE_DISPLAY);
325  mOutputDevice.SetMode (NTV2_CHANNEL3, NTV2_MODE_DISPLAY);
326  mOutputDevice.SetMode (NTV2_CHANNEL4, NTV2_MODE_DISPLAY);
327  }
328 
329  // Subscribe the output interrupt (it's enabled by default).
330  // If using a single-device, then subscribe the output channel to
331  // channel 5's interrupts, otherwise channel 1's...
332  if (mSingleDevice)
333  {
334  mOutputDevice.EnableOutputInterrupt (NTV2_CHANNEL5);
336  }
337  else
338  {
339  mOutputDevice.EnableOutputInterrupt(NTV2_CHANNEL1);
341  }
342 
343  mOutputDevice.SetEnableVANCData (false, false);
344 
345  return AJA_STATUS_SUCCESS;
346 
347 } // SetupOutputVideo
348 
349 
351 {
352  // We will be capturing and playing back with audio system 1.
353  // First, determine how many channels the device is capable of capturing or playing out...
354  const uint16_t numberOfAudioChannels (mInputDevice.features().GetMaxAudioChannels());
355 
356  // Have the input audio system grab audio from the designated input source...
358 
359  mInputDevice.SetNumberAudioChannels (numberOfAudioChannels, mInputAudioSystem);
360  mInputDevice.SetAudioRate (NTV2_AUDIO_48K, mInputAudioSystem);
361 
362  // How big should the on-device audio buffer be? 1MB? 2MB? 4MB? 8MB?
363  // For this demo, 4MB will work best across all platforms (Windows, Mac & Linux)...
364  mInputDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mInputAudioSystem);
365 
366  // Loopback mode is used to play whatever audio appears in the input signal when
367  // it's connected directly to an output (i.e., "end-to-end" mode). If loopback is
368  // left enabled, the video will lag the audio as video frames get briefly delayed
369  // in our ring buffer. Audio, therefore, needs to come out of the (buffered) frame
370  // data being played, so loopback must be turned off...
371  mInputDevice.SetAudioLoopBack (NTV2_AUDIO_LOOPBACK_OFF, mInputAudioSystem);
372 
373  return AJA_STATUS_SUCCESS;
374 
375 } // SetupInputAudio
376 
377 
379 {
380  // Audio system 1 will be used to capture and playback audio.
381  // First, determine how many channels the device is capable of capturing or playing out...
382  const uint16_t numberOfAudioChannels (mOutputDevice.features().GetMaxAudioChannels());
383 
384  mOutputDevice.SetNumberAudioChannels (numberOfAudioChannels, mOutputAudioSystem);
385  mOutputDevice.SetAudioRate (NTV2_AUDIO_48K, mOutputAudioSystem);
386 
387  // AJA recommends using a 4MB on-device audio buffer...
388  mOutputDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mOutputAudioSystem);
389 
390  // Finally, set up the output audio embedders...
391  if (mSingleDevice)
392  {
393  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL5, mOutputAudioSystem);
394  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL6, mOutputAudioSystem);
395  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL7, mOutputAudioSystem);
396  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL8, mOutputAudioSystem);
397  }
398  else
399  {
400  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL1, mOutputAudioSystem);
401  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL2, mOutputAudioSystem);
402  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL3, mOutputAudioSystem);
403  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL4, mOutputAudioSystem);
404  }
405 
406  //
407  // Loopback mode is used to play whatever audio appears in the input signal when
408  // it's connected directly to an output (i.e., "end-to-end" mode). If loopback is
409  // left enabled, the video will lag the audio as video frames get briefly delayed
410  // in our ring buffer. Audio, therefore, needs to come out of the (buffered) frame
411  // data being played, so loopback must be turned off...
412  //
413  mOutputDevice.SetAudioLoopBack(NTV2_AUDIO_LOOPBACK_OFF, mOutputAudioSystem);
414 
415  return AJA_STATUS_SUCCESS;
416 
417 } // SetupAudio
418 
419 
421 {
422  CNTV2DemoCommon::SetDefaultPageSize(); // Set host-specific page size
423 
424  // Let my circular buffer know when it's time to quit...
425  mFrameDataRing.SetAbortFlag (&mGlobalQuit);
426 
427  // Determine video buffer size...
428  const ULWord vidBuffSizeBytes (mFormatDesc.GetVideoWriteSize(ULWord(NTV2Buffer::DefaultPageSize())));
429 
430  // Allocate and add each in-host NTV2FrameData to my mFrameDataRing...
431  mHostBuffers.reserve(CIRCULAR_BUFFER_SIZE);
432  while (mHostBuffers.size() < CIRCULAR_BUFFER_SIZE)
433  {
434  mHostBuffers.push_back(NTV2FrameData()); // Make a new NTV2FrameData...
435  NTV2FrameData & frameData (mHostBuffers.back()); // ...and get a reference to it
436 
437  // Allocate a page-aligned video buffer (if handling video)...
438  if (!mConfig.fSuppressVideo)
439  if (!frameData.fVideoBuffer.Allocate (vidBuffSizeBytes, /*pageAligned*/true))
440  {
441  BURNFAIL("Failed to allocate " << xHEX0N(vidBuffSizeBytes,8) << "-byte video buffer");
442  return AJA_STATUS_MEMORY;
443  }
444 
445  // Allocate a page-aligned audio buffer (if handling audio)...
446  if (mConfig.WithAudio())
447  if (!frameData.fAudioBuffer.Allocate (NTV2_AUDIOSIZE_MAX, /*pageAligned*/true))
448  {
449  BURNFAIL("Failed to allocate " << xHEX0N(NTV2_AUDIOSIZE_MAX,8) << "-byte audio buffer");
450  return AJA_STATUS_MEMORY;
451  }
452  if (frameData.AudioBuffer())
453  frameData.fAudioBuffer.Fill(ULWord(0));
454 
455  // Add this NTV2FrameData to the ring...
456  mFrameDataRing.Add(&frameData);
457  } // for each NTV2FrameData
458 
459  return AJA_STATUS_SUCCESS;
460 
461 } // SetupHostBuffers
462 
463 
465 {
466  // Since this is only a 4k example, we will route all inputs to framebuffers
467  // and color space convert when necessary...
468  mInputDevice.ClearRouting ();
469  if(IsRGBFormat(mConfig.fPixelFormat))
470  {
475 
480  }
481  else
482  {
487  }
488 
489 } // RouteInputSignal
490 
491 
493 {
494  // Since this is only a 4k example, route all framebuffers to SDI outputs, and colorspace convert when necessary...
495  if (!mSingleDevice)
496  mOutputDevice.ClearRouting ();
497  if (!mSingleDevice)
498  {
499  if (::IsRGBFormat (mConfig.fPixelFormat))
500  {
505 
510  }
511  else
512  {
517  }
518  }
519  else
520  {
521  if (::IsRGBFormat (mConfig.fPixelFormat))
522  {
527 
532  }
533  else
534  {
539  }
540  }
541 
542 } // RouteOutputSignal
543 
544 
546 {
547  // Start the playout and capture threads...
548  StartPlayThread ();
550 
551  return AJA_STATUS_SUCCESS;
552 
553 } // Run
554 
555 
556 
558 
559 // This is where we will start the play thread
561 {
562  // Create and start the playout thread...
563  mPlayThread.Attach(PlayThreadStatic, this);
565  mPlayThread.Start();
566 
567 } // StartPlayThread
568 
569 
570 // The playout thread function
571 void NTV2Burn4KQuadrant::PlayThreadStatic (AJAThread * pThread, void * pContext) // static
572 { (void) pThread;
573  // Grab the NTV2Burn4K instance pointer from the pContext parameter,
574  // then call its PlayFrames method...
575  NTV2Burn4KQuadrant * pApp(reinterpret_cast<NTV2Burn4KQuadrant*>(pContext));
576  pApp->PlayFrames();
577 
578 } // PlayThreadStatic
579 
580 
582 {
583  const ULWord acOptions (AUTOCIRCULATE_WITH_RP188);
584  ULWord goodXfers(0), badXfers(0), starves(0), noRoomWaits(0);
585  AUTOCIRCULATE_TRANSFER outputXferInfo;
586  AUTOCIRCULATE_STATUS outputStatus;
587 
588  if (mSingleDevice)
589  {
590  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL5);
591  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL6);
592  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL7);
593  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL8);
594  }
595  else
596  {
597  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL1);
598  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL2);
599  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL3);
600  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL4);
601  }
602  mOutputDevice.WaitForOutputVerticalInterrupt(mConfig.fOutputChannel, 4); // Let it stop
603  BURNNOTE("Thread started");
604 
605  // Initialize AutoCirculate...
606  if (!mOutputDevice.AutoCirculateInitForOutput (mConfig.fOutputChannel, mConfig.fOutputFrames.count(), mOutputAudioSystem, acOptions,
607  1 /*numChannels*/, mConfig.fOutputFrames.firstFrame(), mConfig.fOutputFrames.lastFrame()))
608  {BURNFAIL("AutoCirculateInitForOutput failed"); mGlobalQuit = true;}
609 
610  while (!mGlobalQuit)
611  {
612  mOutputDevice.AutoCirculateGetStatus (mConfig.fOutputChannel, outputStatus);
613 
614  // Check if there's room for another frame on the card...
615  if (outputStatus.CanAcceptMoreOutputFrames())
616  {
617  // Device has at least one free frame buffer that can be filled.
618  // Wait for the next frame in our ring to become ready to "consume"...
619  NTV2FrameData * pFrameData (mFrameDataRing.StartConsumeNextBuffer());
620  if (!pFrameData)
621  {starves++; continue;} // Producer thread isn't producing frames fast enough
622 
623  // Transfer the timecode-burned frame to the device for playout...
624  outputXferInfo.SetVideoBuffer (pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
625  if (pFrameData->AudioBuffer())
626  outputXferInfo.SetAudioBuffer(pFrameData->AudioBuffer(), pFrameData->AudioBufferSize());
627  outputXferInfo.SetOutputTimeCode(pFrameData->Timecode(NTV2_TCINDEX_SDI1), NTV2_TCINDEX_SDI1);
629 
630  // Transfer the frame to the device for eventual playout...
631  if (mOutputDevice.AutoCirculateTransfer (mConfig.fOutputChannel, outputXferInfo))
632  goodXfers++;
633  else
634  badXfers++;
635 
636  if (goodXfers == 3) // Start AutoCirculate playout once 3 frames are buffered on the device...
637  mOutputDevice.AutoCirculateStart(mConfig.fOutputChannel);
638 
639  // Signal that the frame has been "consumed"...
640  mFrameDataRing.EndConsumeNextBuffer();
641  continue; // Back to top of while loop
642  } // if CanAcceptMoreOutputFrames
643 
644  // Wait for one or more buffers to become available on the device, which should occur at next VBI...
645  noRoomWaits++;
646  mOutputDevice.WaitForOutputVerticalInterrupt(mConfig.fOutputChannel);
647  } // loop til quit signaled
648 
649  // Stop AutoCirculate...
650  mOutputDevice.AutoCirculateStop(mConfig.fOutputChannel);
651  BURNNOTE("Thread completed: " << DEC(goodXfers) << " xfers, " << DEC(badXfers) << " failed, "
652  << DEC(starves) << " ring starves, " << DEC(noRoomWaits) << " device starves");
653 } // PlayFrames
654 
655 
657 
658 
659 
661 //
662 // This is where the capture thread gets started
663 //
665 {
666  // Create and start the capture thread...
667  mCaptureThread.Attach(CaptureThreadStatic, this);
668  mCaptureThread.SetPriority(AJA_ThreadPriority_High);
669  mCaptureThread.Start();
670 
671 } // StartCaptureThread
672 
673 
674 //
675 // The static capture thread function
676 //
677 void NTV2Burn4KQuadrant::CaptureThreadStatic (AJAThread * pThread, void * pContext) // static
678 { (void) pThread;
679  // Grab the NTV2Burn4K instance pointer from the pContext parameter,
680  // then call its CaptureFrames method...
681  NTV2Burn4KQuadrant * pApp (reinterpret_cast<NTV2Burn4KQuadrant*>(pContext));
682  pApp->CaptureFrames();
683 } // CaptureThreadStatic
684 
685 
686 //
687 // Repeatedly captures frames until told to stop
688 //
690 {
691  AUTOCIRCULATE_TRANSFER inputXferInfo;
692  ULWord goodXfers(0), badXfers(0), ringFulls(0), devWaits(0);
693  BURNNOTE("Thread started");
694 
695  mInputDevice.AutoCirculateStop (NTV2_CHANNEL1);
696  mInputDevice.AutoCirculateStop (NTV2_CHANNEL2);
697  mInputDevice.AutoCirculateStop (NTV2_CHANNEL3);
698  mInputDevice.AutoCirculateStop (NTV2_CHANNEL4);
699  AJATime::Sleep (1000);
700 
701  // Enable analog LTC input (some LTC inputs are shared with reference input)
702  mInputDevice.SetLTCInputEnable (true);
703 
704  // Set all sources to capture embedded LTC (Use 1 for VITC1)
705  mInputDevice.SetRP188SourceFilter (NTV2_CHANNEL1, 0);
706  mInputDevice.SetRP188SourceFilter (NTV2_CHANNEL2, 0);
707  mInputDevice.SetRP188SourceFilter (NTV2_CHANNEL3, 0);
708  mInputDevice.SetRP188SourceFilter (NTV2_CHANNEL4, 0);
709 
710  // Initialize AutoCirculate...
711  if (!mInputDevice.AutoCirculateInitForInput (mConfig.fInputChannel, // channel
712  mConfig.fInputFrames.count(), // numFrames (zero if specifying range)
713  mInputAudioSystem, // audio system
714  AUTOCIRCULATE_WITH_RP188, // flags
715  1, // frameStores to gang
716  mConfig.fInputFrames.firstFrame(), mConfig.fInputFrames.lastFrame()))
717  {BURNFAIL("AutoCirculateInitForInput failed"); mGlobalQuit = true;}
718  else
719  // Start AutoCirculate running...
720  mInputDevice.AutoCirculateStart (mConfig.fInputChannel);
721 
722  while (!mGlobalQuit)
723  {
724  AUTOCIRCULATE_STATUS acStatus;
725  mInputDevice.AutoCirculateGetStatus (mConfig.fInputChannel, acStatus);
726 
727  if (acStatus.IsRunning() && acStatus.HasAvailableInputFrame())
728  {
729  // At this point, there's at least one fully-formed frame available in the device's frame buffer
730  // memory waiting to be transferred to the host. Reserve an NTV2FrameData to fill ("produce"),
731  // and use it in the next frame transferred from the device...
732  NTV2FrameData * pFrameData (mFrameDataRing.StartProduceNextBuffer ());
733  if (!pFrameData)
734  {ringFulls++; continue;} // Ring full -- consumer thread isn't consuming frames fast enough
735 
736  inputXferInfo.SetVideoBuffer(pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
737  if (pFrameData->AudioBuffer())
738  inputXferInfo.SetAudioBuffer(pFrameData->AudioBuffer(), pFrameData->AudioBufferSize());
739 
740  // Transfer the frame from the device into our host buffers...
741  if (mInputDevice.AutoCirculateTransfer (mConfig.fInputChannel, inputXferInfo)) goodXfers++;
742  else badXfers++;
743 
744  // Remember the amount, in bytes, of captured audio & anc data...
745  pFrameData->fNumAudioBytes = pFrameData->AudioBuffer() ? inputXferInfo.GetCapturedAudioByteCount() : 0;
746 
747  // Get a timecode to use for burn-in...
748  NTV2_RP188 thisFrameTC;
749  inputXferInfo.GetInputTimeCodes (pFrameData->fTimecodes, mConfig.fInputChannel);
750  if (!pFrameData->HasValidTimecode(mConfig.fTimecodeSource))
751  { // Invent a timecode (based on frame count)...
752  const NTV2FrameRate ntv2FrameRate (::GetNTV2FrameRateFromVideoFormat (mVideoFormat));
753  const TimecodeFormat tcFormat (CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat(ntv2FrameRate));
754  const CRP188 inventedTC (inputXferInfo.GetTransferStatus().GetProcessedFrameCount(), 0, 0, 10, tcFormat);
755  inventedTC.GetRP188Reg(thisFrameTC);
756  }
757  CRP188 tc(thisFrameTC);
758  string tcStr;
759  tc.GetRP188Str(tcStr);
760 
761  // While this NTV2FrameData's buffers are locked, "burn" timecode into the raster...
762  mTCBurner.BurnTimeCode (pFrameData->VideoBuffer(), tcStr.c_str(), 80);
763 
764  // Signal that we're done "producing" this frame, making it available for future "consumption"...
765  mFrameDataRing.EndProduceNextBuffer();
766  } // if A/C running and frame(s) are available for transfer
767  else
768  {
769  // Either AutoCirculate is not running, or there were no frames available on the device to transfer.
770  // Rather than waste CPU cycles spinning, waiting until a frame becomes available, it's far more
771  // efficient to wait for the next input vertical interrupt event to get signaled...
772  devWaits++;
773  mInputDevice.WaitForInputVerticalInterrupt (mConfig.fInputChannel);
774  }
775  } // loop til quit signaled
776 
777  // Stop AutoCirculate...
778  mInputDevice.AutoCirculateStop (mConfig.fInputChannel);
779  BURNNOTE("Thread completed: " << DEC(goodXfers) << " xfers, " << DEC(badXfers) << " failed, "
780  << DEC(ringFulls) << " ring full(s), " << DEC(devWaits) << " device waits");
781 
782 } // CaptureFrames
783 
784 
786 
787 
789 {
790  mInputDevice.AutoCirculateGetStatus (mConfig.fInputChannel, inputStatus);
791  mOutputDevice.AutoCirculateGetStatus(mConfig.fOutputChannel, outputStatus);
792 
793 } // GetACStatus
794 
795 
797 {
798  switch (inInputSource)
799  {
800  case NTV2_INPUTSOURCE_SDI1: return kRegRP188InOut1DBB; // reg 29
801  case NTV2_INPUTSOURCE_SDI2: return kRegRP188InOut2DBB; // reg 64
802  case NTV2_INPUTSOURCE_SDI3: return kRegRP188InOut3DBB; // reg 268
803  case NTV2_INPUTSOURCE_SDI4: return kRegRP188InOut4DBB; // reg 273
804  default: return 0;
805  } // switch on input source
806 
807 } // GetRP188RegisterForInput
808 
809 
811 {
812  bool result (false);
814  ULWord regValue (0);
815 
816  //
817  // Bit 16 of the RP188 DBB register will be set if there is timecode embedded in the input signal...
818  //
819  if (regNum && mInputDevice.ReadRegister(regNum, regValue) && regValue & BIT(16))
820  result = true;
821  return result;
822 
823 } // InputSignalHasTimecode
NTV2_XptFrameBuffer6YUV
@ NTV2_XptFrameBuffer6YUV
Definition: ntv2enums.h:2566
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
NTV2Burn4KQuadrant::SetupOutputAudio
virtual AJAStatus SetupOutputAudio(void)
Sets up everything I need for playing audio.
Definition: ntv2burn4kquadrant.cpp:378
NTV2_XptFrameBuffer4YUV
@ NTV2_XptFrameBuffer4YUV
Definition: ntv2enums.h:2521
NTV2Burn4KQuadrant::RouteOutputSignal
virtual void RouteOutputSignal(void)
Sets up board routing for playout.
Definition: ntv2burn4kquadrant.cpp:492
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:1231
NTV2Burn4KQuadrant::PlayThreadStatic
static void PlayThreadStatic(AJAThread *pThread, void *pContext)
This is the playout thread's static callback function that gets called when the playout thread runs....
Definition: ntv2burn4kquadrant.cpp:571
AUTOCIRCULATE_TRANSFER::GetTransferStatus
const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus(void) const
Returns a constant reference to my AUTOCIRCULATE_TRANSFER_STATUS.
Definition: ntv2publicinterface.h:8324
NTV2_AUDIO_LOOPBACK_OFF
@ NTV2_AUDIO_LOOPBACK_OFF
Embeds silence (zeroes) into the data stream.
Definition: ntv2enums.h:1975
NTV2FormatDescriptor::GetVideoWriteSize
ULWord GetVideoWriteSize(ULWord inPageSize=4096UL) const
Definition: ntv2formatdescriptor.cpp:862
NTV2_CHANNEL8
@ NTV2_CHANNEL8
Specifies channel or Frame Store 8 (or the 8th item).
Definition: ntv2enums.h:1314
AUTOCIRCULATE_TRANSFER::GetCapturedAudioByteCount
ULWord GetCapturedAudioByteCount(void) const
Definition: ntv2publicinterface.h:8336
kRegRP188InOut3DBB
@ kRegRP188InOut3DBB
Definition: ntv2publicinterface.h:391
NTV2_REFERENCE_INPUT1
@ NTV2_REFERENCE_INPUT1
Specifies the SDI In 1 connector.
Definition: ntv2enums.h:1402
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
NTV2ACFrameRange::firstFrame
UWord firstFrame(void) const
Definition: ntv2utils.h:975
CNTV2Card::SetVideoFormat
virtual bool SetVideoFormat(const NTV2VideoFormat inVideoFormat, const bool inIsAJARetail=(!(0)), const bool inKeepVancSettings=(0), const NTV2Channel inChannel=NTV2_CHANNEL1)
Configures the AJA device to handle a specific video format.
Definition: ntv2register.cpp:204
AUTOCIRCULATE_TRANSFER_STATUS::GetProcessedFrameCount
ULWord GetProcessedFrameCount(void) const
Definition: ntv2publicinterface.h:7923
AJATimeCodeBurn::RenderTimeCodeFont
AJA_EXPORT bool RenderTimeCodeFont(AJA_PixelFormat pixelFormat, uint32_t numPixels, uint32_t numLines)
Definition: timecodeburn.cpp:447
NTV2_XptFrameBuffer2RGB
@ NTV2_XptFrameBuffer2RGB
Definition: ntv2enums.h:2493
NTV2Burn4KQuadrant::Init
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2burn4kquadrant.cpp:72
NTV2_AUDIO_BUFFER_BIG
@ NTV2_AUDIO_BUFFER_BIG
Definition: ntv2enums.h:1864
CNTV2MacDriverInterface::ReadRegister
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device....
Definition: ntv2macdriverinterface.cpp:389
NTV2FormatDescriptor
Describes a video frame for a given video standard or format and pixel format, including the total nu...
Definition: ntv2formatdescriptor.h:41
types.h
Declares common types used in the ajabase library.
NTV2FrameData
I encapsulate the video, audio and anc host buffers used in the AutoCirculate demos....
Definition: ntv2democommon.h:79
AUTOCIRCULATE_TRANSFER::SetAudioBuffer
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2716
NTV2Burn4KQuadrant::NTV2Burn4KQuadrant
NTV2Burn4KQuadrant(const BurnConfig &inConfig)
Constructs me using the given configuration settings.
Definition: ntv2burn4kquadrant.cpp:19
CRP188::GetRP188Reg
bool GetRP188Reg(RP188_STRUCT &outRP188) const
Definition: ntv2rp188.cpp:1241
NTV2_XptCSC7VidInput
@ NTV2_XptCSC7VidInput
Definition: ntv2enums.h:2721
NTV2Burn4KQuadrant::StartPlayThread
virtual void StartPlayThread(void)
Starts my playout thread.
Definition: ntv2burn4kquadrant.cpp:560
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:381
NTV2Burn4KQuadrant::StartCaptureThread
virtual void StartCaptureThread(void)
Starts my capture thread.
Definition: ntv2burn4kquadrant.cpp:664
NTV2_XptCSC4VidInput
@ NTV2_XptCSC4VidInput
Definition: ntv2enums.h:2715
GetNTV2FrameRateFromVideoFormat
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:3530
AJAThread::Attach
virtual AJAStatus Attach(AJAThreadFunction *pThreadFunction, void *pUserContext)
Definition: thread.cpp:169
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
Definition: ntv2enums.h:1914
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
AJATimeCodeBurn::BurnTimeCode
AJA_EXPORT bool BurnTimeCode(void *pBaseVideoAddress, const std::string &inTimeCodeStr, const uint32_t inYPercent)
Definition: timecodeburn.cpp:45
NTV2_XptFrameBuffer8YUV
@ NTV2_XptFrameBuffer8YUV
Definition: ntv2enums.h:2570
NTV2_XptFrameBuffer3YUV
@ NTV2_XptFrameBuffer3YUV
Definition: ntv2enums.h:2519
AJA_STATUS_BUSY
@ AJA_STATUS_BUSY
Definition: types.h:391
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:366
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:3816
AJACircularBuffer::StartConsumeNextBuffer
FrameDataPtr StartConsumeNextBuffer(void)
The thread that's responsible for processing incoming frames – the consumer – calls this function to ...
Definition: circularbuffer.h:153
NTV2ACFrameRange::count
UWord count(void) const
Definition: ntv2utils.h:974
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
AJA_STATUS_MEMORY
@ AJA_STATUS_MEMORY
Definition: types.h:397
NTV2_XptSDIOut7Input
@ NTV2_XptSDIOut7Input
Definition: ntv2enums.h:2749
AJACircularBuffer::EndProduceNextBuffer
void EndProduceNextBuffer(void)
The producer thread calls this function to signal that it has finished populating the frame it obtain...
Definition: circularbuffer.h:259
NTV2_XptCSC6VidYUV
@ NTV2_XptCSC6VidYUV
Definition: ntv2enums.h:2578
NTV2Burn4KQuadrant::CaptureFrames
virtual void CaptureFrames(void)
Repeatedly captures frames using AutoCirculate (until global quit flag set).
Definition: ntv2burn4kquadrant.cpp:689
NTV2_XptFrameBuffer1RGB
@ NTV2_XptFrameBuffer1RGB
Definition: ntv2enums.h:2484
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:1630
BurnConfig::fSuppressVideo
bool fSuppressVideo
If true, suppress video; otherwise include video.
Definition: ntv2democommon.h:390
NTV2_XptFrameBuffer4Input
@ NTV2_XptFrameBuffer4Input
Definition: ntv2enums.h:2699
NTV2_XptFrameBuffer3Input
@ NTV2_XptFrameBuffer3Input
Definition: ntv2enums.h:2697
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_XptSDIOut4Input
@ NTV2_XptSDIOut4Input
Definition: ntv2enums.h:2743
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or Frame Store 1 (or the first item).
Definition: ntv2enums.h:1307
AUTOCIRCULATE_TRANSFER::SetOutputTimeCode
bool SetOutputTimeCode(const NTV2_RP188 &inTimecode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1)
Intended for playout, sets one element of my acOutputTimeCodes member.
Definition: ntv2publicinterface.cpp:2755
NTV2_XptCSC7VidYUV
@ NTV2_XptCSC7VidYUV
Definition: ntv2enums.h:2581
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
NTV2_XptCSC1VidInput
@ NTV2_XptCSC1VidInput
Definition: ntv2enums.h:2709
AUTOCIRCULATE_STATUS::CanAcceptMoreOutputFrames
bool CanAcceptMoreOutputFrames(void) const
Definition: ntv2publicinterface.h:7231
NTV2Burn4KQuadrant::Quit
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2burn4kquadrant.cpp:58
NTV2_XptFrameBuffer3RGB
@ NTV2_XptFrameBuffer3RGB
Definition: ntv2enums.h:2520
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
CNTV2DemoCommon::Get4KInputFormat
static bool Get4KInputFormat(NTV2VideoFormat &inOutVideoFormat)
Given a video format, if all 4 inputs are the same and promotable to 4K, this function does the promo...
Definition: ntv2democommon.cpp:1088
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:396
NTV2_CHANNEL6
@ NTV2_CHANNEL6
Specifies channel or Frame Store 6 (or the 6th item).
Definition: ntv2enums.h:1312
CNTV2Card::SetAudioSystemInputSource
virtual bool SetAudioSystemInputSource(const NTV2AudioSystem inAudioSystem, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedInput)
Sets the audio source for the given NTV2AudioSystem on the device.
Definition: ntv2audio.cpp:485
NTV2FrameData::VideoBuffer
NTV2Buffer & VideoBuffer(void)
Definition: ntv2democommon.h:106
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
BurnConfig::fPixelFormat
NTV2PixelFormat fPixelFormat
The pixel format to use.
Definition: ntv2democommon.h:386
NTV2_CHANNEL5
@ NTV2_CHANNEL5
Specifies channel or Frame Store 5 (or the 5th item).
Definition: ntv2enums.h:1311
CNTV2Card::features
virtual class DeviceCapabilities & features(void)
Definition: ntv2card.h:141
BurnConfig::fOutputFrames
NTV2ACFrameRange fOutputFrames
Playout frame count or range.
Definition: ntv2democommon.h:385
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
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:2007
NTV2_XptCSC3VidRGB
@ NTV2_XptCSC3VidRGB
Definition: ntv2enums.h:2539
NTV2Burn4KQuadrant::SetupOutputVideo
virtual AJAStatus SetupOutputVideo(void)
Sets up everything I need for playing 4K video.
Definition: ntv2burn4kquadrant.cpp:263
NTV2_TCINDEX_SDI1_LTC
@ NTV2_TCINDEX_SDI1_LTC
SDI 1 embedded ATC LTC.
Definition: ntv2enums.h:3877
NTV2FormatDescriptor::numPixels
ULWord numPixels
Width – total number of pixels per line.
Definition: ntv2formatdescriptor.h:349
process.h
Declares the AJAProcess class.
CNTV2Card::SetRP188SourceFilter
virtual bool SetRP188SourceFilter(const NTV2Channel inSDIInput, const UWord inFilterValue)
Sets the RP188 DBB filter for the given SDI input.
Definition: ntv2register.cpp:2533
NTV2_XptFrameBuffer1Input
@ NTV2_XptFrameBuffer1Input
Definition: ntv2enums.h:2693
AJATime::Sleep
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
Definition: systemtime.cpp:284
AJACircularBuffer::Add
AJAStatus Add(FrameDataPtr pInFrameData)
Appends a new frame buffer to me, increasing my frame storage capacity by one frame.
Definition: circularbuffer.h:92
NTV2_TCINDEX_SDI1
@ NTV2_TCINDEX_SDI1
SDI 1 embedded VITC.
Definition: ntv2enums.h:3873
NTV2_XptCSC4VidRGB
@ NTV2_XptCSC4VidRGB
Definition: ntv2enums.h:2542
NTV2_XptCSC1VidYUV
@ NTV2_XptCSC1VidYUV
Definition: ntv2enums.h:2479
BURNFAIL
#define BURNFAIL(_expr_)
Definition: ntv2democommon.h:40
CNTV2Card::SetSDIOutputAudioSystem
virtual bool SetSDIOutputAudioSystem(const NTV2Channel inSDIOutputConnector, const NTV2AudioSystem inAudioSystem)
Sets the device's NTV2AudioSystem that will provide audio for the given SDI output's audio embedder....
Definition: ntv2register.cpp:3949
NTV2FrameData::HasValidTimecode
bool HasValidTimecode(const NTV2TCIndex inTCNdx) const
Definition: ntv2democommon.h:129
ULWord
uint32_t ULWord
Definition: ajatypes.h:253
kRegRP188InOut2DBB
@ kRegRP188InOut2DBB
Definition: ntv2publicinterface.h:167
CNTV2Card::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2card.cpp:124
NTV2FrameData::fVideoBuffer
NTV2Buffer fVideoBuffer
Host video buffer.
Definition: ntv2democommon.h:82
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7160
ntv2devicescanner.h
Declares the CNTV2DeviceScanner class.
NTV2_XptCSC4VidYUV
@ NTV2_XptCSC4VidYUV
Definition: ntv2enums.h:2541
NTV2_XptSDIIn3
@ NTV2_XptSDIIn3
Definition: ntv2enums.h:2530
NTV2_CHANNEL7
@ NTV2_CHANNEL7
Specifies channel or Frame Store 7 (or the 7th item).
Definition: ntv2enums.h:1313
NTV2FrameData::VideoBufferSize
ULWord VideoBufferSize(void) const
Definition: ntv2democommon.h:107
NTV2FormatDescriptor::numLines
ULWord numLines
Height – total number of lines.
Definition: ntv2formatdescriptor.h:348
NTV2_XptFrameBuffer1YUV
@ NTV2_XptFrameBuffer1YUV
Definition: ntv2enums.h:2483
NTV2_XptSDIOut2Input
@ NTV2_XptSDIOut2Input
Definition: ntv2enums.h:2739
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:1484
NTV2FrameData::Timecode
NTV2_RP188 Timecode(const NTV2TCIndex inTCNdx) const
Definition: ntv2democommon.cpp:379
NTV2Burn4KQuadrant::RouteInputSignal
virtual void RouteInputSignal(void)
Sets up board routing for capture.
Definition: ntv2burn4kquadrant.cpp:464
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
AJAProcess::GetPid
static uint64_t GetPid()
Definition: process.cpp:35
CNTV2Card::SetLTCInputEnable
virtual bool SetLTCInputEnable(const bool inEnable)
Enables or disables the ability for the device to read analog LTC on the reference input connector.
Definition: ntv2register.cpp:3651
CNTV2Card::UnsubscribeOutputVerticalEvent
virtual bool UnsubscribeOutputVerticalEvent(const NTV2Channel inChannel)
Unregisters me so I'm no longer notified when an output VBI is signaled on the given output channel.
Definition: ntv2subscriptions.cpp:61
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or Frame Store 3 (or the 3rd item).
Definition: ntv2enums.h:1309
ntv2burn4kquadrant.h
Header file for the NTV2Burn4KQuadrant demonstration class.
AJACircularBuffer::StartProduceNextBuffer
FrameDataPtr StartProduceNextBuffer(void)
The thread that's responsible for providing frames – the producer – calls this function to populate t...
Definition: circularbuffer.h:109
CNTV2Card::AutoCirculateGetStatus
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
Definition: ntv2autocirculate.cpp:646
NTV2FrameData::AudioBufferSize
ULWord AudioBufferSize(void) const
Definition: ntv2democommon.h:110
NTV2FrameData::fNumAudioBytes
ULWord fNumAudioBytes
Actual number of captured audio bytes.
Definition: ntv2democommon.h:88
NTV2_FBF_8BIT_YCBCR
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
Definition: ntv2enums.h:211
NTV2_XptCSC8VidInput
@ NTV2_XptCSC8VidInput
Definition: ntv2enums.h:2723
NTV2_REFERENCE_FREERUN
@ NTV2_REFERENCE_FREERUN
Specifies the device's internal clock.
Definition: ntv2enums.h:1404
AUTOCIRCULATE_TRANSFER
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
Definition: ntv2publicinterface.h:7969
NTV2_XptCSC3VidInput
@ NTV2_XptCSC3VidInput
Definition: ntv2enums.h:2713
NTV2FrameData::AudioBuffer
NTV2Buffer & AudioBuffer(void)
Definition: ntv2democommon.h:109
AUTOCIRCULATE_TRANSFER::SetVideoBuffer
bool SetVideoBuffer(ULWord *pInVideoBuffer, const ULWord inVideoByteCount)
Sets my video buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Definition: ntv2publicinterface.cpp:2708
NTV2Burn4KQuadrant::SetupInputAudio
virtual AJAStatus SetupInputAudio(void)
Sets up everything I need for capturing audio.
Definition: ntv2burn4kquadrant.cpp:350
CNTV2DriverInterface::IsDeviceReady
virtual bool IsDeviceReady(const bool inCheckValid=(0))
Definition: ntv2driverinterface.cpp:1284
kDemoAppSignature
static const ULWord kDemoAppSignature((((uint32_t)( 'D'))<< 24)|(((uint32_t)( 'E'))<< 16)|(((uint32_t)( 'M'))<< 8)|(((uint32_t)( 'O'))<< 0))
AJACircularBuffer::EndConsumeNextBuffer
void EndConsumeNextBuffer(void)
The consumer thread calls this function to signal that it has finished processing the frame it obtain...
Definition: circularbuffer.h:266
BurnConfig::fDeviceSpec2
std::string fDeviceSpec2
Second AJA device to use (Burn4KQuadrant or BurnBoardToBoard only)
Definition: ntv2democommon.h:380
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
NTV2Burn4KQuadrant::Run
virtual AJAStatus Run(void)
Runs me.
Definition: ntv2burn4kquadrant.cpp:545
kRegRP188InOut1DBB
@ kRegRP188InOut1DBB
Definition: ntv2publicinterface.h:132
NTV2_AUDIOSIZE_MAX
#define NTV2_AUDIOSIZE_MAX
Definition: ntv2democommon.h:46
CNTV2Card::SetEveryFrameServices
virtual bool SetEveryFrameServices(const NTV2EveryFrameTaskMode inMode)
Sets the device's task mode.
Definition: ntv2register.cpp:179
AJA_STATUS_UNSUPPORTED
@ AJA_STATUS_UNSUPPORTED
Definition: types.h:394
NTV2_XptSDIOut5Input
@ NTV2_XptSDIOut5Input
Definition: ntv2enums.h:2745
BurnConfig::fInputChannel
NTV2Channel fInputChannel
The input channel to use.
Definition: ntv2democommon.h:381
NTV2_XptSDIIn2
@ NTV2_XptSDIIn2
Definition: ntv2enums.h:2476
BurnConfig::fDeviceSpec
std::string fDeviceSpec
The AJA device to use.
Definition: ntv2democommon.h:379
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1221
NTV2Burn4KQuadrant::SetupInputVideo
virtual AJAStatus SetupInputVideo(void)
Sets up everything I need for capturing 4K video.
Definition: ntv2burn4kquadrant.cpp:206
ntv2formatdescriptor.h
Declares the NTV2FormatDescriptor class.
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:498
NTV2_XptSDIOut8Input
@ NTV2_XptSDIOut8Input
Definition: ntv2enums.h:2751
NTV2FrameData::fAudioBuffer
NTV2Buffer fAudioBuffer
Host audio buffer.
Definition: ntv2democommon.h:84
NTV2Burn4KQuadrant::PlayFrames
virtual void PlayFrames(void)
Repeatedly plays out frames using AutoCirculate (until global quit flag set).
Definition: ntv2burn4kquadrant.cpp:581
NTV2_XptFrameBuffer8RGB
@ NTV2_XptFrameBuffer8RGB
Definition: ntv2enums.h:2571
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
NTV2Burn4KQuadrant::GetRP188RegisterForInput
static ULWord GetRP188RegisterForInput(const NTV2InputSource inInputSource)
Returns the RP188 DBB register number to use for the given NTV2InputSource.
Definition: ntv2burn4kquadrant.cpp:796
NTV2Burn4KQuadrant::SetupHostBuffers
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
Definition: ntv2burn4kquadrant.cpp:420
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5605
NTV2_XptFrameBuffer6RGB
@ NTV2_XptFrameBuffer6RGB
Definition: ntv2enums.h:2567
NTV2_XptFrameBuffer2Input
@ NTV2_XptFrameBuffer2Input
Definition: ntv2enums.h:2695
false
#define false
Definition: ntv2devicefeatures.h:25
NTV2_XptFrameBuffer4RGB
@ NTV2_XptFrameBuffer4RGB
Definition: ntv2enums.h:2522
AUTOCIRCULATE_WITH_RP188
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
Definition: ntv2publicinterface.h:5521
NTV2ACFrameRange::lastFrame
UWord lastFrame(void) const
Definition: ntv2utils.h:976
AUTOCIRCULATE_STATUS::IsRunning
bool IsRunning(void) const
Definition: ntv2publicinterface.h:7266
kRegRP188InOut4DBB
@ kRegRP188InOut4DBB
Definition: ntv2publicinterface.h:396
CNTV2Card::WaitForOutputVerticalInterrupt
virtual bool WaitForOutputVerticalInterrupt(const NTV2Channel inChannel=NTV2_CHANNEL1, UWord inRepeatCount=1)
Efficiently sleeps the calling thread/process until the next one or more field (interlaced video) or ...
Definition: ntv2subscriptions.cpp:134
NTV2_INPUTSOURCE_SDI2
@ NTV2_INPUTSOURCE_SDI2
Identifies the 2nd SDI video input.
Definition: ntv2enums.h:1229
NTV2_XptFrameBuffer2YUV
@ NTV2_XptFrameBuffer2YUV
Definition: ntv2enums.h:2492
std
Definition: json.hpp:5362
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:6760
NTV2_XptFrameBuffer5RGB
@ NTV2_XptFrameBuffer5RGB
Definition: ntv2enums.h:2565
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5442
NTV2_AUDIO_EMBEDDED
@ NTV2_AUDIO_EMBEDDED
Obtain audio samples from the audio that's embedded in the video HANC.
Definition: ntv2enums.h:1952
NTV2_XptSDIIn1
@ NTV2_XptSDIIn1
Definition: ntv2enums.h:2475
NTV2_XptFrameBuffer7YUV
@ NTV2_XptFrameBuffer7YUV
Definition: ntv2enums.h:2568
CNTV2Card::AutoCirculateTransfer
virtual bool AutoCirculateTransfer(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &transferInfo)
Transfers all or part of a frame as specified in the given AUTOCIRCULATE_TRANSFER object to/from the ...
Definition: ntv2autocirculate.cpp:695
NTV2_XptSDIOut6Input
@ NTV2_XptSDIOut6Input
Definition: ntv2enums.h:2747
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
CIRCULAR_BUFFER_SIZE
static const size_t CIRCULAR_BUFFER_SIZE(10)
Number of NTV2FrameData's in our ring.
NTV2_XptCSC5VidYUV
@ NTV2_XptCSC5VidYUV
Definition: ntv2enums.h:2525
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
NTV2_XptCSC2VidRGB
@ NTV2_XptCSC2VidRGB
Definition: ntv2enums.h:2495
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:381
AUTOCIRCULATE_STATUS::HasAvailableInputFrame
bool HasAvailableInputFrame(void) const
Definition: ntv2publicinterface.h:7236
CNTV2Card::GetEveryFrameServices
virtual bool GetEveryFrameServices(NTV2EveryFrameTaskMode &outMode)
Retrieves the device's current "retail service" task mode.
Definition: ntv2register.cpp:184
NTV2Burn4KQuadrant
Instances of me can capture 4K/UHD video from one 4-channel AJA device, burn timecode into one quadra...
Definition: ntv2burn4kquadrant.h:33
NTV2_XptCSC3VidYUV
@ NTV2_XptCSC3VidYUV
Definition: ntv2enums.h:2538
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:2720
AJACircularBuffer::SetAbortFlag
void SetAbortFlag(const bool *pAbortFlag)
Tells me the boolean variable I should monitor such that when it gets set to "true" will cause any th...
Definition: circularbuffer.h:51
NTV2_AUDIOSYSTEM_5
@ NTV2_AUDIOSYSTEM_5
This identifies the 5th Audio System.
Definition: ntv2enums.h:3820
NTV2_XptCSC1VidRGB
@ NTV2_XptCSC1VidRGB
Definition: ntv2enums.h:2480
NTV2_XptSDIIn4
@ NTV2_XptSDIIn4
Definition: ntv2enums.h:2531
NTV2Buffer::Fill
bool Fill(const T &inValue)
Fills me with the given scalar value.
Definition: ntv2publicinterface.h:6218
AJAThread::SetPriority
virtual AJAStatus SetPriority(AJAThreadPriority priority)
Definition: thread.cpp:133
CNTV2Card::AutoCirculateStart
virtual bool AutoCirculateStart(const NTV2Channel inChannel, const ULWord64 inStartTime=0)
Starts AutoCirculating the specified channel that was previously initialized by CNTV2Card::AutoCircul...
Definition: ntv2autocirculate.cpp:503
NTV2_XptCSC8VidYUV
@ NTV2_XptCSC8VidYUV
Definition: ntv2enums.h:2584
NTV2Burn4KQuadrant::GetACStatus
virtual void GetACStatus(AUTOCIRCULATE_STATUS &outInputStatus, AUTOCIRCULATE_STATUS &outOutputStatus)
Provides status information about my input (capture) and output (playout) processes.
Definition: ntv2burn4kquadrant.cpp:788
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
NTV2Burn4KQuadrant::~NTV2Burn4KQuadrant
virtual ~NTV2Burn4KQuadrant()
Definition: ntv2burn4kquadrant.cpp:37
NTV2_XptCSC2VidYUV
@ NTV2_XptCSC2VidYUV
Definition: ntv2enums.h:2494
CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:989
AUTOCIRCULATE_TRANSFER::GetInputTimeCodes
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Intended for capture, answers with the timecodes captured in my acTransferStatus member's acFrameStam...
Definition: ntv2publicinterface.cpp:2834
CNTV2Card::SetNumberAudioChannels
virtual bool SetNumberAudioChannels(const ULWord inNumChannels, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the number of audio channels to be concurrently captured or played for a given Audio System on t...
Definition: ntv2audio.cpp:146
CNTV2Card::SetAudioBufferSize
virtual bool SetAudioBufferSize(const NTV2AudioBufferSize inValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Changes the size of the audio buffer that is used for a given Audio System in the AJA device.
Definition: ntv2audio.cpp:249
NTV2_INPUTSOURCE_SDI3
@ NTV2_INPUTSOURCE_SDI3
Identifies the 3rd SDI video input.
Definition: ntv2enums.h:1230
AJAThread::Start
virtual AJAStatus Start()
Definition: thread.cpp:91
BURNINFO
#define BURNINFO(_expr_)
Definition: ntv2democommon.h:44
CNTV2DemoCommon::GetAJAPixelFormat
static AJA_PixelFormat GetAJAPixelFormat(const NTV2FrameBufferFormat inFormat)
Definition: ntv2democommon.cpp:1043
BIT
#define BIT(_x_)
Definition: ajatypes.h:561
CNTV2Card::SubscribeInputVerticalEvent
virtual bool SubscribeInputVerticalEvent(const NTV2Channel inChannel=NTV2_CHANNEL1)
Causes me to be notified when an input vertical blanking interrupt occurs on the given input channel.
Definition: ntv2subscriptions.cpp:39
xHEX0N
#define xHEX0N(__x__, __n__)
Definition: ntv2publicinterface.h:5604
AJA_FAILURE
#define AJA_FAILURE(_status_)
Definition: types.h:371
BurnConfig::fInputFrames
NTV2ACFrameRange fInputFrames
Ingest frame count or range.
Definition: ntv2democommon.h:384
NTV2_XptFrameBuffer5YUV
@ NTV2_XptFrameBuffer5YUV
Definition: ntv2enums.h:2564
NTV2_XptCSC5VidInput
@ NTV2_XptCSC5VidInput
Definition: ntv2enums.h:2717
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:2097
NTV2_MODE_DISPLAY
@ NTV2_MODE_DISPLAY
Playout (output) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1200
DeviceCapabilities::CanDoFrameBufferFormat
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2devicecapabilities.h:223
NTV2_XptCSC2VidInput
@ NTV2_XptCSC2VidInput
Definition: ntv2enums.h:2711
NTV2_XptFrameBuffer7RGB
@ NTV2_XptFrameBuffer7RGB
Definition: ntv2enums.h:2569
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
NTV2Burn4KQuadrant::InputSignalHasTimecode
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false.
Definition: ntv2burn4kquadrant.cpp:810
NTV2_XptSDIOut1Input
@ NTV2_XptSDIOut1Input
Definition: ntv2enums.h:2737
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_OEM_TASKS
@ NTV2_OEM_TASKS
2: OEM: Device is configured by controlling application(s), with minimal driver involvement.
Definition: ntv2publicinterface.h:4292
NTV2_XptSDIOut3Input
@ NTV2_XptSDIOut3Input
Definition: ntv2enums.h:2741
BURNNOTE
#define BURNNOTE(_expr_)
Definition: ntv2democommon.h:43
NTV2FrameData::fTimecodes
NTV2TimeCodes fTimecodes
Map of TC indexes to NTV2_RP188 values.
Definition: ntv2democommon.h:87
CNTV2Card::SetAudioRate
virtual bool SetAudioRate(const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the NTV2AudioRate for the given Audio System.
Definition: ntv2audio.cpp:205
NTV2_XptCSC6VidInput
@ NTV2_XptCSC6VidInput
Definition: ntv2enums.h:2719
NTV2Burn4KQuadrant::CaptureThreadStatic
static void CaptureThreadStatic(AJAThread *pThread, void *pContext)
This is the capture thread's static callback function that gets called when the capture thread runs....
Definition: ntv2burn4kquadrant.cpp:677