AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
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 (!::NTV2DeviceCanDo4KVideo (mInputDeviceID))
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 (!::NTV2DeviceCanDo4KVideo (mOutputDeviceID))
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 (::NTV2DeviceGetNumFrameStores (mInputDeviceID) < 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 (::NTV2DeviceCanDoMultiFormat (mInputDeviceID))
123  mInputDevice.SetMultiFormatMode (false);
124  if (::NTV2DeviceCanDoMultiFormat (mOutputDeviceID))
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 (::NTV2DeviceGetNumFrameStores (mInputDeviceID))
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 (::NTV2DeviceGetNumFrameStores (mOutputDeviceID))
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 (::NTV2DeviceHasBiDirectionalSDI (mInputDeviceID))
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 (!::NTV2DeviceCanDoFrameBufferFormat (mInputDeviceID, 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  return AJA_STATUS_SUCCESS;
257 
258 } // SetupInputVideo
259 
260 
262 {
263  // We turned off the transmit for the capture device, so now turn them on for the playback device...
264  if (::NTV2DeviceHasBiDirectionalSDI (mOutputDeviceID))
265  {
266  // Devices having bidirectional SDI must be set to "transmit"...
267  if (mSingleDevice)
268  {
269  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL5, true);
270  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL6, true);
271  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL7, true);
272  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL8, true);
273  }
274  else
275  {
276  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL1, true);
277  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL2, true);
278  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL3, true);
279  mOutputDevice.SetSDITransmitEnable (NTV2_CHANNEL4, true);
280  }
281  }
282 
283  // Set the video format to match the incoming video format...
284  mOutputDevice.SetVideoFormat (mVideoFormat);
285  mOutputDevice.SetReference (NTV2_REFERENCE_FREERUN);
286 
287  if (mVideoFormat == NTV2_FORMAT_UNKNOWN)
288  return AJA_STATUS_NOINPUT; // Sorry, can't handle this format
289 
290  // Set the frame buffer pixel format for all the channels on the device
291  // (assuming the device supports that pixel format -- otherwise default to 8-bit YCbCr)...
292  if (!::NTV2DeviceCanDoFrameBufferFormat (mOutputDeviceID, mConfig.fPixelFormat))
294 
295  // ...and set the pixel format for all frame stores...
296  if (mSingleDevice)
297  {
298  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL5, mConfig.fPixelFormat);
299  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL6, mConfig.fPixelFormat);
300  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL7, mConfig.fPixelFormat);
301  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL8, mConfig.fPixelFormat);
302  }
303  else
304  {
305  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL1, mConfig.fPixelFormat);
306  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL2, mConfig.fPixelFormat);
307  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL3, mConfig.fPixelFormat);
308  mOutputDevice.SetFrameBufferFormat (NTV2_CHANNEL4, mConfig.fPixelFormat);
309  }
310 
311  // Set all frame buffers to playback
312  if (mSingleDevice)
313  {
314  mOutputDevice.SetMode (NTV2_CHANNEL5, NTV2_MODE_DISPLAY);
315  mOutputDevice.SetMode (NTV2_CHANNEL6, NTV2_MODE_DISPLAY);
316  mOutputDevice.SetMode (NTV2_CHANNEL7, NTV2_MODE_DISPLAY);
317  mOutputDevice.SetMode (NTV2_CHANNEL8, NTV2_MODE_DISPLAY);
318  }
319  else
320  {
321  mOutputDevice.SetMode (NTV2_CHANNEL1, NTV2_MODE_DISPLAY);
322  mOutputDevice.SetMode (NTV2_CHANNEL2, NTV2_MODE_DISPLAY);
323  mOutputDevice.SetMode (NTV2_CHANNEL3, NTV2_MODE_DISPLAY);
324  mOutputDevice.SetMode (NTV2_CHANNEL4, NTV2_MODE_DISPLAY);
325  }
326 
327  // Subscribe the output interrupt (it's enabled by default).
328  // If using a single-device, then subscribe the output channel to
329  // channel 5's interrupts, otherwise channel 1's...
330  if (mSingleDevice)
331  {
332  mOutputDevice.EnableOutputInterrupt (NTV2_CHANNEL5);
334  }
335  else
336  {
337  mOutputDevice.EnableOutputInterrupt(NTV2_CHANNEL1);
339  }
340 
341 
342  mOutputDevice.SetEnableVANCData (false, false);
343 
344  return AJA_STATUS_SUCCESS;
345 
346 } // SetupOutputVideo
347 
348 
350 {
351  // We will be capturing and playing back with audio system 1.
352  // First, determine how many channels the device is capable of capturing or playing out...
353  const uint16_t numberOfAudioChannels (::NTV2DeviceGetMaxAudioChannels (mInputDeviceID));
354 
355  // Have the input audio system grab audio from the designated input source...
357 
358  mInputDevice.SetNumberAudioChannels (numberOfAudioChannels, mInputAudioSystem);
359  mInputDevice.SetAudioRate (NTV2_AUDIO_48K, mInputAudioSystem);
360 
361  // How big should the on-device audio buffer be? 1MB? 2MB? 4MB? 8MB?
362  // For this demo, 4MB will work best across all platforms (Windows, Mac & Linux)...
363  mInputDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mInputAudioSystem);
364 
365  // Loopback mode is used to play whatever audio appears in the input signal when
366  // it's connected directly to an output (i.e., "end-to-end" mode). If loopback is
367  // left enabled, the video will lag the audio as video frames get briefly delayed
368  // in our ring buffer. Audio, therefore, needs to come out of the (buffered) frame
369  // data being played, so loopback must be turned off...
370  mInputDevice.SetAudioLoopBack (NTV2_AUDIO_LOOPBACK_OFF, mInputAudioSystem);
371 
372  return AJA_STATUS_SUCCESS;
373 
374 } // SetupInputAudio
375 
376 
378 {
379  // Audio system 1 will be used to capture and playback audio.
380  // First, determine how many channels the device is capable of capturing or playing out...
381  const uint16_t numberOfAudioChannels (::NTV2DeviceGetMaxAudioChannels (mOutputDeviceID));
382 
383  mOutputDevice.SetNumberAudioChannels (numberOfAudioChannels, mOutputAudioSystem);
384  mOutputDevice.SetAudioRate (NTV2_AUDIO_48K, mOutputAudioSystem);
385 
386  // AJA recommends using a 4MB on-device audio buffer...
387  mOutputDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mOutputAudioSystem);
388 
389  // Finally, set up the output audio embedders...
390  if (mSingleDevice)
391  {
392  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL5, mOutputAudioSystem);
393  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL6, mOutputAudioSystem);
394  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL7, mOutputAudioSystem);
395  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL8, mOutputAudioSystem);
396  }
397  else
398  {
399  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL1, mOutputAudioSystem);
400  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL2, mOutputAudioSystem);
401  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL3, mOutputAudioSystem);
402  mOutputDevice.SetSDIOutputAudioSystem (NTV2_CHANNEL4, mOutputAudioSystem);
403  }
404 
405  //
406  // Loopback mode is used to play whatever audio appears in the input signal when
407  // it's connected directly to an output (i.e., "end-to-end" mode). If loopback is
408  // left enabled, the video will lag the audio as video frames get briefly delayed
409  // in our ring buffer. Audio, therefore, needs to come out of the (buffered) frame
410  // data being played, so loopback must be turned off...
411  //
412  mOutputDevice.SetAudioLoopBack(NTV2_AUDIO_LOOPBACK_OFF, mOutputAudioSystem);
413 
414  return AJA_STATUS_SUCCESS;
415 
416 } // SetupAudio
417 
418 
420 {
421  CNTV2DemoCommon::SetDefaultPageSize(); // Set host-specific page size
422 
423  // Let my circular buffer know when it's time to quit...
424  mFrameDataRing.SetAbortFlag (&mGlobalQuit);
425 
426  // Determine video buffer size...
427  const ULWord vidBuffSizeBytes (mFormatDesc.GetVideoWriteSize(ULWord(NTV2Buffer::DefaultPageSize())));
428 
429  // Allocate and add each in-host NTV2FrameData to my mFrameDataRing...
430  mHostBuffers.reserve(CIRCULAR_BUFFER_SIZE);
431  while (mHostBuffers.size() < CIRCULAR_BUFFER_SIZE)
432  {
433  mHostBuffers.push_back(NTV2FrameData()); // Make a new NTV2FrameData...
434  NTV2FrameData & frameData (mHostBuffers.back()); // ...and get a reference to it
435 
436  // Allocate a page-aligned video buffer (if handling video)...
437  if (!mConfig.fSuppressVideo)
438  if (!frameData.fVideoBuffer.Allocate (vidBuffSizeBytes, /*pageAligned*/true))
439  {
440  BURNFAIL("Failed to allocate " << xHEX0N(vidBuffSizeBytes,8) << "-byte video buffer");
441  return AJA_STATUS_MEMORY;
442  }
443 
444  // Allocate a page-aligned audio buffer (if handling audio)...
445  if (mConfig.WithAudio())
446  if (!frameData.fAudioBuffer.Allocate (NTV2_AUDIOSIZE_MAX, /*pageAligned*/true))
447  {
448  BURNFAIL("Failed to allocate " << xHEX0N(NTV2_AUDIOSIZE_MAX,8) << "-byte audio buffer");
449  return AJA_STATUS_MEMORY;
450  }
451  if (frameData.AudioBuffer())
452  frameData.fAudioBuffer.Fill(ULWord(0));
453 
454  // Add this NTV2FrameData to the ring...
455  mFrameDataRing.Add(&frameData);
456  } // for each NTV2FrameData
457 
458  return AJA_STATUS_SUCCESS;
459 
460 } // SetupHostBuffers
461 
462 
464 {
465  // Since this is only a 4k example, we will route all inputs to framebuffers
466  // and color space convert when necessary...
467  mInputDevice.ClearRouting ();
468  if(IsRGBFormat(mConfig.fPixelFormat))
469  {
474 
479  }
480  else
481  {
486  }
487 
488 } // RouteInputSignal
489 
490 
492 {
493  // Since this is only a 4k example, route all framebuffers to SDI outputs, and colorspace convert when necessary...
494  if (!mSingleDevice)
495  mOutputDevice.ClearRouting ();
496  if (!mSingleDevice)
497  {
498  if (::IsRGBFormat (mConfig.fPixelFormat))
499  {
504 
509  }
510  else
511  {
516  }
517  }
518  else
519  {
520  if (::IsRGBFormat (mConfig.fPixelFormat))
521  {
526 
531  }
532  else
533  {
538  }
539  }
540 
541 } // RouteOutputSignal
542 
543 
545 {
546  // Start the playout and capture threads...
547  StartPlayThread ();
549 
550  return AJA_STATUS_SUCCESS;
551 
552 } // Run
553 
554 
555 
557 
558 // This is where we will start the play thread
560 {
561  // Create and start the playout thread...
562  mPlayThread.Attach(PlayThreadStatic, this);
564  mPlayThread.Start();
565 
566 } // StartPlayThread
567 
568 
569 // The playout thread function
570 void NTV2Burn4KQuadrant::PlayThreadStatic (AJAThread * pThread, void * pContext) // static
571 { (void) pThread;
572  // Grab the NTV2Burn4K instance pointer from the pContext parameter,
573  // then call its PlayFrames method...
574  NTV2Burn4KQuadrant * pApp(reinterpret_cast<NTV2Burn4KQuadrant*>(pContext));
575  pApp->PlayFrames();
576 
577 } // PlayThreadStatic
578 
579 
581 {
582  const ULWord acOptions (AUTOCIRCULATE_WITH_RP188);
583  ULWord goodXfers(0), badXfers(0), starves(0), noRoomWaits(0);
584  AUTOCIRCULATE_TRANSFER outputXferInfo;
585  AUTOCIRCULATE_STATUS outputStatus;
586 
587  if (mSingleDevice)
588  {
589  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL5);
590  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL6);
591  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL7);
592  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL8);
593  }
594  else
595  {
596  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL1);
597  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL2);
598  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL3);
599  mOutputDevice.AutoCirculateStop (NTV2_CHANNEL4);
600  }
601  mOutputDevice.WaitForOutputVerticalInterrupt(mConfig.fOutputChannel, 4); // Let it stop
602  BURNNOTE("Thread started");
603 
604  // Initialize AutoCirculate...
605  if (!mOutputDevice.AutoCirculateInitForOutput (mConfig.fOutputChannel, mConfig.fOutputFrames.count(), mOutputAudioSystem, acOptions,
606  1 /*numChannels*/, mConfig.fOutputFrames.firstFrame(), mConfig.fOutputFrames.lastFrame()))
607  {BURNFAIL("AutoCirculateInitForOutput failed"); mGlobalQuit = true;}
608 
609  while (!mGlobalQuit)
610  {
611  mOutputDevice.AutoCirculateGetStatus (mConfig.fOutputChannel, outputStatus);
612 
613  // Check if there's room for another frame on the card...
614  if (outputStatus.CanAcceptMoreOutputFrames())
615  {
616  // Device has at least one free frame buffer that can be filled.
617  // Wait for the next frame in our ring to become ready to "consume"...
618  NTV2FrameData * pFrameData (mFrameDataRing.StartConsumeNextBuffer());
619  if (!pFrameData)
620  {starves++; continue;} // Producer thread isn't producing frames fast enough
621 
622  // Transfer the timecode-burned frame to the device for playout...
623  outputXferInfo.SetVideoBuffer (pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
624  if (pFrameData->AudioBuffer())
625  outputXferInfo.SetAudioBuffer(pFrameData->AudioBuffer(), pFrameData->AudioBufferSize());
626  outputXferInfo.SetOutputTimeCode(pFrameData->Timecode(NTV2_TCINDEX_SDI1), NTV2_TCINDEX_SDI1);
628 
629  // Transfer the frame to the device for eventual playout...
630  if (mOutputDevice.AutoCirculateTransfer (mConfig.fOutputChannel, outputXferInfo))
631  goodXfers++;
632  else
633  badXfers++;
634 
635  if (goodXfers == 3) // Start AutoCirculate playout once 3 frames are buffered on the device...
636  mOutputDevice.AutoCirculateStart(mConfig.fOutputChannel);
637 
638  // Signal that the frame has been "consumed"...
639  mFrameDataRing.EndConsumeNextBuffer();
640  continue; // Back to top of while loop
641  } // if CanAcceptMoreOutputFrames
642 
643  // Wait for one or more buffers to become available on the device, which should occur at next VBI...
644  noRoomWaits++;
645  mOutputDevice.WaitForOutputVerticalInterrupt(mConfig.fOutputChannel);
646  } // loop til quit signaled
647 
648  // Stop AutoCirculate...
649  mOutputDevice.AutoCirculateStop(mConfig.fOutputChannel);
650  BURNNOTE("Thread completed: " << DEC(goodXfers) << " xfers, " << DEC(badXfers) << " failed, "
651  << DEC(starves) << " ring starves, " << DEC(noRoomWaits) << " device starves");
652 } // PlayFrames
653 
654 
656 
657 
658 
660 //
661 // This is where the capture thread gets started
662 //
664 {
665  // Create and start the capture thread...
666  mCaptureThread.Attach(CaptureThreadStatic, this);
667  mCaptureThread.SetPriority(AJA_ThreadPriority_High);
668  mCaptureThread.Start();
669 
670 } // StartCaptureThread
671 
672 
673 //
674 // The static capture thread function
675 //
676 void NTV2Burn4KQuadrant::CaptureThreadStatic (AJAThread * pThread, void * pContext) // static
677 { (void) pThread;
678  // Grab the NTV2Burn4K instance pointer from the pContext parameter,
679  // then call its CaptureFrames method...
680  NTV2Burn4KQuadrant * pApp (reinterpret_cast<NTV2Burn4KQuadrant*>(pContext));
681  pApp->CaptureFrames();
682 } // CaptureThreadStatic
683 
684 
685 //
686 // Repeatedly captures frames until told to stop
687 //
689 {
690  AUTOCIRCULATE_TRANSFER inputXferInfo;
691  ULWord goodXfers(0), badXfers(0), ringFulls(0), devWaits(0);
692  BURNNOTE("Thread started");
693 
694  mInputDevice.AutoCirculateStop (NTV2_CHANNEL1);
695  mInputDevice.AutoCirculateStop (NTV2_CHANNEL2);
696  mInputDevice.AutoCirculateStop (NTV2_CHANNEL3);
697  mInputDevice.AutoCirculateStop (NTV2_CHANNEL4);
698  AJATime::Sleep (1000);
699 
700  // Enable analog LTC input (some LTC inputs are shared with reference input)
701  mInputDevice.SetLTCInputEnable (true);
702 
703  // Set all sources to capture embedded LTC (Use 1 for VITC1)
704  mInputDevice.SetRP188SourceFilter (NTV2_CHANNEL1, 0);
705  mInputDevice.SetRP188SourceFilter (NTV2_CHANNEL2, 0);
706  mInputDevice.SetRP188SourceFilter (NTV2_CHANNEL3, 0);
707  mInputDevice.SetRP188SourceFilter (NTV2_CHANNEL4, 0);
708 
709  // Initialize AutoCirculate...
710  if (!mInputDevice.AutoCirculateInitForInput (mConfig.fInputChannel, // channel
711  mConfig.fInputFrames.count(), // numFrames (zero if specifying range)
712  mInputAudioSystem, // audio system
713  AUTOCIRCULATE_WITH_RP188, // flags
714  1, // frameStores to gang
715  mConfig.fInputFrames.firstFrame(), mConfig.fInputFrames.lastFrame()))
716  {BURNFAIL("AutoCirculateInitForInput failed"); mGlobalQuit = true;}
717  else
718  // Start AutoCirculate running...
719  mInputDevice.AutoCirculateStart (mConfig.fInputChannel);
720 
721  while (!mGlobalQuit)
722  {
723  AUTOCIRCULATE_STATUS acStatus;
724  mInputDevice.AutoCirculateGetStatus (mConfig.fInputChannel, acStatus);
725 
726  if (acStatus.IsRunning() && acStatus.HasAvailableInputFrame())
727  {
728  // At this point, there's at least one fully-formed frame available in the device's frame buffer
729  // memory waiting to be transferred to the host. Reserve an NTV2FrameData to fill ("produce"),
730  // and use it in the next frame transferred from the device...
731  NTV2FrameData * pFrameData (mFrameDataRing.StartProduceNextBuffer ());
732  if (!pFrameData)
733  {ringFulls++; continue;} // Ring full -- consumer thread isn't consuming frames fast enough
734 
735  inputXferInfo.SetVideoBuffer(pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
736  if (pFrameData->AudioBuffer())
737  inputXferInfo.SetAudioBuffer(pFrameData->AudioBuffer(), pFrameData->AudioBufferSize());
738 
739  // Transfer the frame from the device into our host buffers...
740  if (mInputDevice.AutoCirculateTransfer (mConfig.fInputChannel, inputXferInfo)) goodXfers++;
741  else badXfers++;
742 
743  // Remember the amount, in bytes, of captured audio & anc data...
744  pFrameData->fNumAudioBytes = pFrameData->AudioBuffer() ? inputXferInfo.GetCapturedAudioByteCount() : 0;
745 
746  // Get a timecode to use for burn-in...
747  NTV2_RP188 thisFrameTC;
748  inputXferInfo.GetInputTimeCodes (pFrameData->fTimecodes, mConfig.fInputChannel);
749  if (!pFrameData->HasValidTimecode(mConfig.fTimecodeSource))
750  { // Invent a timecode (based on frame count)...
751  const NTV2FrameRate ntv2FrameRate (::GetNTV2FrameRateFromVideoFormat (mVideoFormat));
752  const TimecodeFormat tcFormat (CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat(ntv2FrameRate));
753  const CRP188 inventedTC (inputXferInfo.GetTransferStatus().GetProcessedFrameCount(), 0, 0, 10, tcFormat);
754  inventedTC.GetRP188Reg(thisFrameTC);
755  }
756  CRP188 tc(thisFrameTC);
757  string tcStr;
758  tc.GetRP188Str(tcStr);
759 
760  // While this NTV2FrameData's buffers are locked, "burn" timecode into the raster...
761  mTCBurner.BurnTimeCode (pFrameData->VideoBuffer(), tcStr.c_str(), 80);
762 
763  // Signal that we're done "producing" this frame, making it available for future "consumption"...
764  mFrameDataRing.EndProduceNextBuffer();
765  } // if A/C running and frame(s) are available for transfer
766  else
767  {
768  // Either AutoCirculate is not running, or there were no frames available on the device to transfer.
769  // Rather than waste CPU cycles spinning, waiting until a frame becomes available, it's far more
770  // efficient to wait for the next input vertical interrupt event to get signaled...
771  devWaits++;
772  mInputDevice.WaitForInputVerticalInterrupt (mConfig.fInputChannel);
773  }
774  } // loop til quit signaled
775 
776  // Stop AutoCirculate...
777  mInputDevice.AutoCirculateStop (mConfig.fInputChannel);
778  BURNNOTE("Thread completed: " << DEC(goodXfers) << " xfers, " << DEC(badXfers) << " failed, "
779  << DEC(ringFulls) << " ring full(s), " << DEC(devWaits) << " device waits");
780 
781 } // CaptureFrames
782 
783 
785 
786 
788 {
789  mInputDevice.AutoCirculateGetStatus (mConfig.fInputChannel, inputStatus);
790  mOutputDevice.AutoCirculateGetStatus(mConfig.fOutputChannel, outputStatus);
791 
792 } // GetACStatus
793 
794 
796 {
797  switch (inInputSource)
798  {
799  case NTV2_INPUTSOURCE_SDI1: return kRegRP188InOut1DBB; // reg 29
800  case NTV2_INPUTSOURCE_SDI2: return kRegRP188InOut2DBB; // reg 64
801  case NTV2_INPUTSOURCE_SDI3: return kRegRP188InOut3DBB; // reg 268
802  case NTV2_INPUTSOURCE_SDI4: return kRegRP188InOut4DBB; // reg 273
803  default: return 0;
804  } // switch on input source
805 
806 } // GetRP188RegisterForInput
807 
808 
810 {
811  bool result (false);
813  ULWord regValue (0);
814 
815  //
816  // Bit 16 of the RP188 DBB register will be set if there is timecode embedded in the input signal...
817  //
818  if (regNum && mInputDevice.ReadRegister(regNum, regValue) && regValue & BIT(16))
819  result = true;
820  return result;
821 
822 } // InputSignalHasTimecode
NTV2_XptFrameBuffer6YUV
@ NTV2_XptFrameBuffer6YUV
Definition: ntv2enums.h:2562
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:377
NTV2_XptFrameBuffer4YUV
@ NTV2_XptFrameBuffer4YUV
Definition: ntv2enums.h:2517
NTV2Burn4KQuadrant::RouteOutputSignal
virtual void RouteOutputSignal(void)
Sets up board routing for playout.
Definition: ntv2burn4kquadrant.cpp:491
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
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:570
AUTOCIRCULATE_TRANSFER::GetTransferStatus
const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus(void) const
Returns a constant reference to my AUTOCIRCULATE_TRANSFER_STATUS.
Definition: ntv2publicinterface.h:8258
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
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:8270
kRegRP188InOut3DBB
@ kRegRP188InOut3DBB
Definition: ntv2publicinterface.h:362
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
AUTOCIRCULATE_TRANSFER_STATUS::GetProcessedFrameCount
ULWord GetProcessedFrameCount(void) const
Definition: ntv2publicinterface.h:7868
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:2489
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:709
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:2614
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:2716
NTV2Burn4KQuadrant::StartPlayThread
virtual void StartPlayThread(void)
Starts my playout thread.
Definition: ntv2burn4kquadrant.cpp:559
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:368
NTV2Burn4KQuadrant::StartCaptureThread
virtual void StartCaptureThread(void)
Starts my capture thread.
Definition: ntv2burn4kquadrant.cpp:663
NTV2_XptCSC4VidInput
@ NTV2_XptCSC4VidInput
Definition: ntv2enums.h:2710
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:1910
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:2566
NTV2_XptFrameBuffer3YUV
@ NTV2_XptFrameBuffer3YUV
Definition: ntv2enums.h:2515
AJA_STATUS_BUSY
@ AJA_STATUS_BUSY
Definition: types.h:378
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
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
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
NTV2DeviceCanDoMultiFormat
bool NTV2DeviceCanDoMultiFormat(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4065
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:832
AJA_STATUS_MEMORY
@ AJA_STATUS_MEMORY
Definition: types.h:384
NTV2_XptSDIOut7Input
@ NTV2_XptSDIOut7Input
Definition: ntv2enums.h:2744
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:2574
NTV2Burn4KQuadrant::CaptureFrames
virtual void CaptureFrames(void)
Repeatedly captures frames using AutoCirculate (until global quit flag set).
Definition: ntv2burn4kquadrant.cpp:688
NTV2_XptFrameBuffer1RGB
@ NTV2_XptFrameBuffer1RGB
Definition: ntv2enums.h:2480
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
BurnConfig::fSuppressVideo
bool fSuppressVideo
If true, suppress video; otherwise include video.
Definition: ntv2democommon.h:390
NTV2_XptFrameBuffer4Input
@ NTV2_XptFrameBuffer4Input
Definition: ntv2enums.h:2694
NTV2_XptFrameBuffer3Input
@ NTV2_XptFrameBuffer3Input
Definition: ntv2enums.h:2692
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_XptSDIOut4Input
@ NTV2_XptSDIOut4Input
Definition: ntv2enums.h:2738
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:2653
NTV2_XptCSC7VidYUV
@ NTV2_XptCSC7VidYUV
Definition: ntv2enums.h:2577
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
NTV2_XptCSC1VidInput
@ NTV2_XptCSC1VidInput
Definition: ntv2enums.h:2704
AUTOCIRCULATE_STATUS::CanAcceptMoreOutputFrames
bool CanAcceptMoreOutputFrames(void) const
Definition: ntv2publicinterface.h:7176
NTV2Burn4KQuadrant::Quit
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2burn4kquadrant.cpp:58
NTV2_XptFrameBuffer3RGB
@ NTV2_XptFrameBuffer3RGB
Definition: ntv2enums.h:2516
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
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:1099
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:488
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
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:387
AJAStatus
AJAStatus
Definition: types.h:365
NTV2Buffer::DefaultPageSize
static size_t DefaultPageSize(void)
Definition: ntv2publicinterface.cpp:1905
NTV2_XptCSC3VidRGB
@ NTV2_XptCSC3VidRGB
Definition: ntv2enums.h:2535
NTV2Burn4KQuadrant::SetupOutputVideo
virtual AJAStatus SetupOutputVideo(void)
Sets up everything I need for playing 4K video.
Definition: ntv2burn4kquadrant.cpp:261
NTV2_TCINDEX_SDI1_LTC
@ NTV2_TCINDEX_SDI1_LTC
SDI 1 embedded ATC LTC.
Definition: ntv2enums.h:3872
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:2549
NTV2_XptFrameBuffer1Input
@ NTV2_XptFrameBuffer1Input
Definition: ntv2enums.h:2688
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:3868
NTV2_XptCSC4VidRGB
@ NTV2_XptCSC4VidRGB
Definition: ntv2enums.h:2538
NTV2_XptCSC1VidYUV
@ NTV2_XptCSC1VidYUV
Definition: ntv2enums.h:2475
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: ntv2audio.cpp:573
NTV2FrameData::HasValidTimecode
bool HasValidTimecode(const NTV2TCIndex inTCNdx) const
Definition: ntv2democommon.h:129
ULWord
uint32_t ULWord
Definition: ajatypes.h:246
kRegRP188InOut2DBB
@ kRegRP188InOut2DBB
Definition: ntv2publicinterface.h:138
NTV2FrameData::fVideoBuffer
NTV2Buffer fVideoBuffer
Host video buffer.
Definition: ntv2democommon.h:82
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7105
ntv2devicescanner.h
Declares the CNTV2DeviceScanner class.
NTV2_XptCSC4VidYUV
@ NTV2_XptCSC4VidYUV
Definition: ntv2enums.h:2537
NTV2_XptSDIIn3
@ NTV2_XptSDIIn3
Definition: ntv2enums.h:2526
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:2479
NTV2_XptSDIOut2Input
@ NTV2_XptSDIOut2Input
Definition: ntv2enums.h:2734
NTV2DeviceHasBiDirectionalSDI
bool NTV2DeviceHasBiDirectionalSDI(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:6454
CNTV2DemoCommon::SetDefaultPageSize
static size_t SetDefaultPageSize(void)
Definition: ntv2democommon.cpp:1505
NTV2FrameData::Timecode
NTV2_RP188 Timecode(const NTV2TCIndex inTCNdx) const
Definition: ntv2democommon.cpp:382
NTV2Burn4KQuadrant::RouteInputSignal
virtual void RouteInputSignal(void)
Sets up board routing for capture.
Definition: ntv2burn4kquadrant.cpp:463
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
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::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
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
NTV2DeviceCanDo4KVideo
bool NTV2DeviceCanDo4KVideo(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:827
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:2718
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:7904
NTV2_XptCSC3VidInput
@ NTV2_XptCSC3VidInput
Definition: ntv2enums.h:2708
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:2606
NTV2DeviceGetNumFrameStores
UWord NTV2DeviceGetNumFrameStores(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10487
CNTV2Card::AutoCirculateStop
virtual bool AutoCirculateStop(const NTV2Channel inChannel, const bool inAbort=false)
Stops AutoCirculate for the given channel, and releases the on-device frame buffers that were allocat...
Definition: ntv2autocirculate.cpp:519
NTV2Burn4KQuadrant::SetupInputAudio
virtual AJAStatus SetupInputAudio(void)
Sets up everything I need for capturing audio.
Definition: ntv2burn4kquadrant.cpp:349
CNTV2DriverInterface::IsDeviceReady
virtual bool IsDeviceReady(const bool inCheckValid=(0))
Definition: ntv2driverinterface.cpp:1228
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
CRP188
Definition: ntv2rp188.h:55
NTV2Burn4KQuadrant::Run
virtual AJAStatus Run(void)
Runs me.
Definition: ntv2burn4kquadrant.cpp:544
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
AJA_STATUS_UNSUPPORTED
@ AJA_STATUS_UNSUPPORTED
Definition: types.h:381
NTV2_XptSDIOut5Input
@ NTV2_XptSDIOut5Input
Definition: ntv2enums.h:2740
BurnConfig::fInputChannel
NTV2Channel fInputChannel
The input channel to use.
Definition: ntv2democommon.h:381
NTV2_XptSDIIn2
@ NTV2_XptSDIIn2
Definition: ntv2enums.h:2472
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
CNTV2DriverInterface::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2driverinterface.h:574
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:2746
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:580
NTV2_XptFrameBuffer8RGB
@ NTV2_XptFrameBuffer8RGB
Definition: ntv2enums.h:2567
AJA_STATUS_INITIALIZE
@ AJA_STATUS_INITIALIZE
Definition: types.h:373
NTV2Burn4KQuadrant::GetRP188RegisterForInput
static ULWord GetRP188RegisterForInput(const NTV2InputSource inInputSource)
Returns the RP188 DBB register number to use for the given NTV2InputSource.
Definition: ntv2burn4kquadrant.cpp:795
NTV2Burn4KQuadrant::SetupHostBuffers
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
Definition: ntv2burn4kquadrant.cpp:419
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5579
NTV2_XptFrameBuffer6RGB
@ NTV2_XptFrameBuffer6RGB
Definition: ntv2enums.h:2563
NTV2_XptFrameBuffer2Input
@ NTV2_XptFrameBuffer2Input
Definition: ntv2enums.h:2690
false
#define false
Definition: ntv2devicefeatures.h:25
NTV2_XptFrameBuffer4RGB
@ NTV2_XptFrameBuffer4RGB
Definition: ntv2enums.h:2518
AUTOCIRCULATE_WITH_RP188
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
Definition: ntv2publicinterface.h:5490
NTV2ACFrameRange::lastFrame
UWord lastFrame(void) const
Definition: ntv2utils.h:976
AUTOCIRCULATE_STATUS::IsRunning
bool IsRunning(void) const
Definition: ntv2publicinterface.h:7211
kRegRP188InOut4DBB
@ kRegRP188InOut4DBB
Definition: ntv2publicinterface.h:367
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:2488
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:6705
NTV2_XptFrameBuffer5RGB
@ NTV2_XptFrameBuffer5RGB
Definition: ntv2enums.h:2561
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:1948
NTV2_XptSDIIn1
@ NTV2_XptSDIIn1
Definition: ntv2enums.h:2471
NTV2_XptFrameBuffer7YUV
@ NTV2_XptFrameBuffer7YUV
Definition: ntv2enums.h:2564
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:2742
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:2521
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
NTV2_XptCSC2VidRGB
@ NTV2_XptCSC2VidRGB
Definition: ntv2enums.h:2491
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:371
AUTOCIRCULATE_STATUS::HasAvailableInputFrame
bool HasAvailableInputFrame(void) const
Definition: ntv2publicinterface.h:7181
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:2534
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
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
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:3815
NTV2_XptCSC1VidRGB
@ NTV2_XptCSC1VidRGB
Definition: ntv2enums.h:2476
NTV2_XptSDIIn4
@ NTV2_XptSDIIn4
Definition: ntv2enums.h:2527
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
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:2580
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:787
AJA_STATUS_OPEN
@ AJA_STATUS_OPEN
Definition: types.h:375
NTV2Burn4KQuadrant::~NTV2Burn4KQuadrant
virtual ~NTV2Burn4KQuadrant()
Definition: ntv2burn4kquadrant.cpp:37
NTV2_XptCSC2VidYUV
@ NTV2_XptCSC2VidYUV
Definition: ntv2enums.h:2490
CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1000
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
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:2732
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
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
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
BURNINFO
#define BURNINFO(_expr_)
Definition: ntv2democommon.h:44
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
xHEX0N
#define xHEX0N(__x__, __n__)
Definition: ntv2publicinterface.h:5578
AJA_FAILURE
#define AJA_FAILURE(_status_)
Definition: types.h:358
BurnConfig::fInputFrames
NTV2ACFrameRange fInputFrames
Ingest frame count or range.
Definition: ntv2democommon.h:384
NTV2_XptFrameBuffer5YUV
@ NTV2_XptFrameBuffer5YUV
Definition: ntv2enums.h:2560
NTV2_XptCSC5VidInput
@ NTV2_XptCSC5VidInput
Definition: ntv2enums.h:2712
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
NTV2_XptCSC2VidInput
@ NTV2_XptCSC2VidInput
Definition: ntv2enums.h:2706
NTV2_XptFrameBuffer7RGB
@ NTV2_XptFrameBuffer7RGB
Definition: ntv2enums.h:2565
NTV2Burn4KQuadrant::InputSignalHasTimecode
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false.
Definition: ntv2burn4kquadrant.cpp:809
NTV2_XptSDIOut1Input
@ NTV2_XptSDIOut1Input
Definition: ntv2enums.h:2732
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_OEM_TASKS
@ NTV2_OEM_TASKS
2: OEM: Device is configured by controlling application(s), with minimal driver involvement.
Definition: ntv2publicinterface.h:4261
NTV2_XptSDIOut3Input
@ NTV2_XptSDIOut3Input
Definition: ntv2enums.h:2736
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:208
NTV2_XptCSC6VidInput
@ NTV2_XptCSC6VidInput
Definition: ntv2enums.h:2714
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:676