AJA NTV2 SDK  18.0.0.2717
NTV2 SDK 18.0.0.2717
ntv2player8k.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2player8k.h"
9 #include "ntv2debug.h"
10 #include "ntv2devicescanner.h"
11 #include "ntv2testpatterngen.h"
13 #include "ajabase/system/process.h"
17 
18 using namespace std;
19 
20 #define NTV2_BUFFER_LOCKING // IMPORTANT FOR 8K: Define this to pre-lock video/audio buffers in kernel
21 
22 
28 static ULWord gAncMaxSizeBytes (NTV2_ANCSIZE_MAX); // Max per-frame anc buffer size, in bytes
29 
38 static const uint32_t gAudMaxSizeBytes (256 * 1024); // Max per-frame audio buffer size, in bytes
39 
40 static const bool BUFFER_PAGE_ALIGNED (true);
41 
42 // Audio tone generator data
43 static const double gFrequencies [] = {250.0, 500.0, 1000.0, 2000.0};
44 static const ULWord gNumFrequencies (sizeof(gFrequencies) / sizeof(double));
45 // Unlike NTV2Player, this demo uses the same waveform amplitude in each audio channel
46 
47 
49  : mConfig (inConfig),
50  mConsumerThread (),
51  mProducerThread (),
52  mDevice (),
53  mDeviceID (DEVICE_ID_INVALID),
54  mSavedTaskMode (NTV2_TASK_MODE_INVALID),
55  mCurrentFrame (0),
56  mCurrentSample (0),
57  mToneFrequency (440.0),
58  mAudioSystem (NTV2_AUDIOSYSTEM_INVALID),
59  mFormatDesc (),
60  mGlobalQuit (false),
61  mTCBurner (),
62  mHostBuffers (),
63  mFrameDataRing (),
64  mTestPatRasters ()
65 {
66 }
67 
68 
70 {
71  // Stop my playout and producer threads, then destroy them...
72  Quit();
73 
74  mDevice.UnsubscribeOutputVerticalEvent(mConfig.fOutputChannel); // Unsubscribe from output VBI event
75 } // destructor
76 
77 
78 void NTV2Player8K::Quit (void)
79 {
80  // Set the global 'quit' flag, and wait for the threads to go inactive...
81  mGlobalQuit = true;
82 
83  while (mProducerThread.Active())
84  AJATime::Sleep(10);
85 
86  while (mConsumerThread.Active())
87  AJATime::Sleep(10);
88 
89 #if defined(NTV2_BUFFER_LOCKING)
90  mDevice.DMABufferUnlockAll();
91 #endif // NTV2_BUFFER_LOCKING
92  if (!mConfig.fDoMultiFormat && mDevice.IsOpen())
93  {
95  if (NTV2_IS_VALID_TASK_MODE(mSavedTaskMode))
96  mDevice.SetTaskMode(mSavedTaskMode); // Restore prior task mode
97  }
98 } // Quit
99 
100 
102 {
103  AJAStatus status (AJA_STATUS_SUCCESS);
104 
105  // Open the device...
107  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not found" << endl; return AJA_STATUS_OPEN;}
108  mDeviceID = mDevice.GetDeviceID(); // Keep this ID handy -- it's used frequently
109 
110  if (!mDevice.IsDeviceReady(false))
111  {cerr << "## ERROR: Device '" << mConfig.fDeviceSpec << "' not ready" << endl; return AJA_STATUS_INITIALIZE;}
112  if (!mDevice.features().CanDoPlayback())
113  {cerr << "## ERROR: '" << mDevice.GetDisplayName() << "' is capture-only" << endl; return AJA_STATUS_FEATURE;}
114 
115  const UWord maxNumChannels (mDevice.features().GetNumFrameStores());
116 
117  // Check for an invalid configuration
119  {cerr << "## ERROR: HFR RGB output not supported" << endl; return AJA_STATUS_BAD_PARAM;}
120 
121  // Check for valid channel...
122  if (UWord(mConfig.fOutputChannel) >= maxNumChannels)
123  {
124  cerr << "## ERROR: Cannot use channel '" << DEC(mConfig.fOutputChannel+1) << "' -- device only supports channel 1"
125  << (maxNumChannels > 1 ? string(" thru ") + string(1, char(maxNumChannels+'0')) : "") << endl;
126  return AJA_STATUS_UNSUPPORTED;
127  }
128  if (mConfig.fOutputChannel != NTV2_CHANNEL1 && mConfig.fOutputChannel != NTV2_CHANNEL3)
129  {
130  cerr << "## ERROR: 8K/UHD2 requires Ch1 or Ch3, not Ch" << DEC(mConfig.fOutputChannel) << endl;
131  return AJA_STATUS_BAD_PARAM;
132  }
133 
134  if (!mConfig.fDoMultiFormat)
135  {
136  mDevice.GetTaskMode(mSavedTaskMode); // Save the current task mode
138  return AJA_STATUS_BUSY; // Device is in use by another app -- fail
139  }
140  mDevice.SetTaskMode(NTV2_OEM_TASKS); // Set OEM service level
141 
142  if (mDevice.features().CanDoMultiFormat())
143  mDevice.SetMultiFormatMode(mConfig.fDoMultiFormat);
144  else
145  mConfig.fDoMultiFormat = false;
146 
147  // Set up the video and audio...
148  status = SetUpVideo();
149  if (AJA_FAILURE(status))
150  return status;
151  status = mConfig.WithAudio() ? SetUpAudio() : AJA_STATUS_SUCCESS;
152  if (AJA_FAILURE(status))
153  return status;
154 
155  // Set up the circular buffers, and the test pattern buffers...
156  status = SetUpHostBuffers();
157  if (AJA_FAILURE(status))
158  return status;
159  status = SetUpTestPatternBuffers();
160  if (AJA_FAILURE(status))
161  return status;
162 
163  // Set up the device signal routing...
165 
166  // Lastly, prepare my AJATimeCodeBurn instance...
167  if (!mTCBurner.RenderTimeCodeFont (CNTV2DemoCommon::GetAJAPixelFormat(mConfig.fPixelFormat), mFormatDesc.numPixels, mFormatDesc.numLines))
168  {cerr << "## ERROR: RenderTimeCodeFont failed for: " << mFormatDesc << endl; return AJA_STATUS_UNSUPPORTED;}
169 
170  // Ready to go...
171  #if defined(_DEBUG)
172  cerr << mConfig;
173  if (mDevice.IsRemote())
174  cerr << "Device Description: " << mDevice.GetDescription() << endl;
175  cerr << endl;
176  #endif // defined(_DEBUG)
177  return AJA_STATUS_SUCCESS;
178 
179 } // Init
180 
181 
183 {
184  // Configure the device to output the requested video format...
185  if (mConfig.fVideoFormat == NTV2_FORMAT_UNKNOWN)
186  return AJA_STATUS_BAD_PARAM;
187  if (!mDevice.features().CanDoVideoFormat(mConfig.fVideoFormat))
188  { cerr << "## ERROR: '" << mDevice.GetDisplayName() << "' doesn't support "
189  << ::NTV2VideoFormatToString(mConfig.fVideoFormat) << endl;
190  return AJA_STATUS_UNSUPPORTED;
191  }
192  if (!mDevice.features().CanDoFrameBufferFormat(mConfig.fPixelFormat))
193  { cerr << "## ERROR: '" << mDevice.GetDisplayName() << "' doesn't support "
194  << ::NTV2FrameBufferFormatString(mConfig.fPixelFormat) << endl;
195  return AJA_STATUS_UNSUPPORTED;
196  }
197  if (::IsRGBFormat(mConfig.fPixelFormat) != mConfig.fDoRGBOnWire && mDevice.features().GetNumCSCs() == 0)
198  { cerr << "## ERROR: '" << mDevice.GetDisplayName() << "' has no CSCs, and '--pixelFormat' \""
199  << ::NTV2FrameBufferFormatToString(mConfig.fPixelFormat, true) << "\" contradicts '--rgb' setting" << endl;
200  return AJA_STATUS_UNSUPPORTED;
201  }
202 
203  NTV2ChannelSet channels13, frameStores;
204  channels13.insert(NTV2_CHANNEL1); channels13.insert(NTV2_CHANNEL3);
205  if (mConfig.fDoTsiRouting)
206  { // "Tsi" routing requires 2 FrameStores
207  if (channels13.find(mConfig.fOutputChannel) == channels13.end())
208  return AJA_STATUS_BAD_PARAM; // fOutputChannel not Ch1 or Ch3
209  frameStores = ::NTV2MakeChannelSet (mConfig.fOutputChannel, 2); // 2 FrameStores starting at fOutputChannel
210  }
211  else
212  { // "Squares" routing requires 4 FrameStores
213  if (mConfig.fOutputChannel != NTV2_CHANNEL1)
214  return AJA_STATUS_BAD_PARAM; // fOutputChannel not Ch1
215  frameStores = ::NTV2MakeChannelSet (mConfig.fOutputChannel, 4); // 4 FrameStores starting at fOutputChannel
216  }
217 
218  // Keep the raster description handy...
219  mFormatDesc = NTV2FormatDescriptor(mConfig.fVideoFormat, mConfig.fPixelFormat);
220  if (!mFormatDesc.IsValid())
221  return AJA_STATUS_FAIL;
222 
223  // Turn on the FrameStores (to read frame buffer memory and transmit video)...
224  mDevice.EnableChannels (frameStores, /*disableOthers=*/!mConfig.fDoMultiFormat);
225 
226  // This demo requires VANC be disabled...
227  mDevice.SetVANCMode (frameStores, NTV2_VANCMODE_OFF); // VANC is incompatible with 8K/UHD2 formats
228 
229  // Set the FrameStore video format...
230  mDevice.SetVideoFormat (mConfig.fVideoFormat, false, false, mConfig.fOutputChannel);
231  mDevice.SetQuadQuadFrameEnable (true, mConfig.fOutputChannel);
232  mDevice.SetQuadQuadSquaresEnable (!mConfig.fDoTsiRouting, mConfig.fOutputChannel);
233 
234  // Set the frame buffer pixel format for the device FrameStore(s)...
235  mDevice.SetFrameBufferFormat (frameStores, mConfig.fPixelFormat);
236 
237  // The output interrupt is Enabled by default, but on some platforms, you must subscribe to it
238  // in order to be able to wait on its event/semaphore...
240 
241  // Get current per-field maximum Anc buffer size...
244 
245  // Set output clock reference...
246  mDevice.SetReference(mDevice.features().CanDo2110() ? NTV2_REFERENCE_SFP1_PTP : NTV2_REFERENCE_FREERUN);
247 
248  // At this point, video setup is complete (except for widget signal routing).
249  return AJA_STATUS_SUCCESS;
250 
251 } // SetUpVideo
252 
253 
255 {
256  uint16_t numAudioChannels (mDevice.features().GetMaxAudioChannels());
257  if (numAudioChannels > 8) // If audio system handles more than 8 channels...
258  if (!mDevice.features().CanDo2110()) // ...and SDI (i.e. not ST 2110 IP streaming)...
259  if (NTV2_IS_UHD2_FULL_VIDEO_FORMAT(mConfig.fVideoFormat)) // ...and 8K (narrower HANC only fits 8 audio channels)
260  numAudioChannels = 8; // ...then reduce to 8 audio channels
261 
262  // Use the NTV2AudioSystem that has the same ordinal value as the output FrameStore/Channel...
263  mAudioSystem = ::NTV2ChannelToAudioSystem(mConfig.fOutputChannel);
264 
265  if (mConfig.fNumAudioLinks > 1) // For users that want to send 32 or 64 audio channels on 2 or 4 SDI links
266  switch (mAudioSystem)
267  {
268  default:
269  case NTV2_AUDIOSYSTEM_1:
270  { const UWord numChan(NTV2_IS_QUAD_QUAD_HFR_VIDEO_FORMAT(mConfig.fVideoFormat) ? 4 : 2);
271  const NTV2AudioSystemSet audSystems (::NTV2MakeAudioSystemSet (mAudioSystem, numChan));
272  for (UWord chan(0); chan < numChan; chan++)
273  mDevice.SetSDIOutputAudioSystem (NTV2Channel(chan), NTV2AudioSystem(chan));
274  mDevice.SetNumberAudioChannels (numAudioChannels, audSystems);
275  mDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, audSystems);
276  mDevice.SetAudioLoopBack (NTV2_AUDIO_LOOPBACK_OFF, audSystems);
277  break;
278  }
279  case NTV2_AUDIOSYSTEM_3:
282  break;
283  }
284  else
285  {
286  mDevice.SetSDIOutputAudioSystem (::NTV2MakeChannelSet (NTV2_CHANNEL1, 4), mAudioSystem);
287  mDevice.SetNumberAudioChannels (numAudioChannels, mAudioSystem);
288  mDevice.SetAudioBufferSize (NTV2_AUDIO_BUFFER_BIG, mAudioSystem);
289  mDevice.SetAudioLoopBack (NTV2_AUDIO_LOOPBACK_OFF, mAudioSystem);
290  }
291 
292  if (mConfig.fDoHDMIOutput)
293  {
297  }
298 
299  return AJA_STATUS_SUCCESS;
300 
301 } // SetUpAudio
302 
303 
305 {
306  CNTV2DemoCommon::SetDefaultPageSize(); // Set host-specific page size
307 
308  // Let my circular buffer know when it's time to quit...
309  mFrameDataRing.SetAbortFlag (&mGlobalQuit);
310 
311  // Multi-link audio uses stacked buffers for transferring to the board,
312  // the first byte after the end of the first audio link buffer is the start of the second audio link buffer.
313  const size_t audioBufferSize (gAudMaxSizeBytes * uint32_t(mConfig.fNumAudioLinks));
314 
315  // Allocate and add each in-host NTV2FrameData to my circular buffer member variable...
316  mHostBuffers.reserve(CIRCULAR_BUFFER_SIZE);
317  while (mHostBuffers.size() < CIRCULAR_BUFFER_SIZE)
318  {
319  mHostBuffers.push_back(NTV2FrameData()); // Make a new NTV2FrameData...
320  NTV2FrameData & frameData(mHostBuffers.back()); // ...and get a reference to it
321 
322  // Don't allocate a page-aligned video buffer here.
323  // Instead, the test pattern buffers are used (and re-used) in the consumer thread.
324  // This saves a LOT of memory and time spent copying data with these large 4K/UHD rasters.
325  // NOTE: This differs substantially from the NTV2Player demo, which pre-allocates the ring of video buffers
326  // here, then in its producer thread, copies a fresh, unmodified test pattern raster into the video
327  // buffer, blits timecode into it, then transfers it to the hardware in its consumer thread.
328 
329  // Allocate a page-aligned audio buffer (if transmitting audio)
330  if (mConfig.WithAudio())
331  if (!frameData.fAudioBuffer.Allocate (audioBufferSize, BUFFER_PAGE_ALIGNED))
332  {
333  PLFAIL("Failed to allocate " << xHEX0N(audioBufferSize,8) << "-byte audio buffer");
334  return AJA_STATUS_MEMORY;
335  }
336  if (frameData.fAudioBuffer)
337  {
338  frameData.fAudioBuffer.Fill(ULWord(0));
339  #ifdef NTV2_BUFFER_LOCKING
340  mDevice.DMABufferLock(frameData.fAudioBuffer, /*alsoPreLockSGL*/true);
341  #endif
342  }
343  mFrameDataRing.Add (&frameData);
344  } // for each NTV2FrameData
345  return AJA_STATUS_SUCCESS;
346 
347 } // SetUpHostBuffers
348 
349 
351 {
352  vector<NTV2TestPatternSelect> testPatIDs;
353  testPatIDs.push_back(NTV2_TestPatt_ColorBars100);
354  testPatIDs.push_back(NTV2_TestPatt_ColorBars75);
355  testPatIDs.push_back(NTV2_TestPatt_Ramp);
356  testPatIDs.push_back(NTV2_TestPatt_MultiBurst);
357  testPatIDs.push_back(NTV2_TestPatt_LineSweep);
358  testPatIDs.push_back(NTV2_TestPatt_CheckField);
359  testPatIDs.push_back(NTV2_TestPatt_FlatField);
360  testPatIDs.push_back(NTV2_TestPatt_MultiPattern);
361  testPatIDs.push_back(NTV2_TestPatt_Black);
362  testPatIDs.push_back(NTV2_TestPatt_White);
363  testPatIDs.push_back(NTV2_TestPatt_Border);
364  testPatIDs.push_back(NTV2_TestPatt_LinearRamp);
365  testPatIDs.push_back(NTV2_TestPatt_SlantRamp);
366  testPatIDs.push_back(NTV2_TestPatt_ZonePlate);
367  testPatIDs.push_back(NTV2_TestPatt_ColorQuadrant);
368  testPatIDs.push_back(NTV2_TestPatt_ColorQuadrantBorder);
369 
370  mTestPatRasters.clear();
371  for (size_t tpNdx(0); tpNdx < testPatIDs.size(); tpNdx++)
372  mTestPatRasters.push_back(NTV2Buffer());
373 
374  if (!mFormatDesc.IsValid())
375  {PLFAIL("Bad format descriptor"); return AJA_STATUS_FAIL;}
376  if (mFormatDesc.IsVANC())
377  {PLFAIL("VANC incompatible with UHD2/8K: " << mFormatDesc); return AJA_STATUS_FAIL;}
378 
379  // Set up one video buffer for each test pattern...
380  for (size_t tpNdx(0); tpNdx < testPatIDs.size(); tpNdx++)
381  {
382  // Allocate the buffer memory...
383  if (!mTestPatRasters.at(tpNdx).Allocate (mFormatDesc.GetVideoWriteSize(), BUFFER_PAGE_ALIGNED))
384  { PLFAIL("Test pattern buffer " << DEC(tpNdx+1) << " of " << DEC(testPatIDs.size()) << ": "
385  << xHEX0N(mFormatDesc.GetVideoWriteSize(),8) << "-byte page-aligned alloc failed");
386  return AJA_STATUS_MEMORY;
387  }
388 
389  // Fill the buffer with test pattern...
390  NTV2TestPatternGen testPatternGen;
391  if (!testPatternGen.DrawTestPattern (testPatIDs.at(tpNdx), mFormatDesc, mTestPatRasters.at(tpNdx)))
392  {
393  cerr << "## ERROR: DrawTestPattern " << DEC(tpNdx) << " failed: " << mFormatDesc << endl;
394  return AJA_STATUS_FAIL;
395  }
396 
397  #ifdef NTV2_BUFFER_LOCKING
398  // Try to prelock the memory, including its scatter-gather list...
399  if (!mDevice.DMABufferLock(mTestPatRasters.at(tpNdx), /*alsoLockSegmentMap=*/true))
400  PLWARN("Test pattern buffer " << DEC(tpNdx+1) << " of " << DEC(testPatIDs.size()) << ": failed to pre-lock");
401  #endif
402  } // loop for each predefined pattern
403  PLNOTE(DEC(testPatIDs.size()) << " test pattern buffers created, " << DEC(mFormatDesc.GetVideoWriteSize() / 1024 / 1024)
404  << "MB each, " << DEC(mFormatDesc.GetVideoWriteSize() / 1024 / 1024 * testPatIDs.size()) << "MB total");
405  return AJA_STATUS_SUCCESS;
406 
407 } // SetUpTestPatternBuffers
408 
409 
411 {
412  NTV2XptConnections connections; // Routing connections to make
413 
414  if (mConfig.fDoTsiRouting)
415  {
416  if (::IsRGBFormat(mConfig.fPixelFormat))
417  { // RGB on wire requires DualLinkOut widgets
418  if (mConfig.fOutputChannel < NTV2_CHANNEL3)
419  {
424  if (mConfig.fDoHDMIOutput)
426  }
427  else
428  {
433  if (mConfig.fDoHDMIOutput)
435  }
444  mDevice.SetSDITransmitEnable (NTV2_CHANNEL1, true);
445  mDevice.SetSDITransmitEnable (NTV2_CHANNEL2, true);
446  mDevice.SetSDITransmitEnable (NTV2_CHANNEL3, true);
447  mDevice.SetSDITransmitEnable (NTV2_CHANNEL4, true);
456  }
457  else
458  {
459  if (mConfig.fOutputChannel < NTV2_CHANNEL3)
460  {
462  {
467  mDevice.SetSDITransmitEnable (NTV2_CHANNEL1, true);
468  mDevice.SetSDITransmitEnable (NTV2_CHANNEL2, true);
469  mDevice.SetSDITransmitEnable (NTV2_CHANNEL3, true);
470  mDevice.SetSDITransmitEnable (NTV2_CHANNEL4, true);
479  if (mConfig.fDoHDMIOutput)
481  }
482  else
483  {
488  mDevice.SetSDITransmitEnable (NTV2_CHANNEL1, true);
489  mDevice.SetSDITransmitEnable (NTV2_CHANNEL2, true);
494  if (mConfig.fDoHDMIOutput)
496  }
497  }
498  else
499  {
501  {
506  mDevice.SetSDITransmitEnable (NTV2_CHANNEL1, true);
507  mDevice.SetSDITransmitEnable (NTV2_CHANNEL2, true);
508  mDevice.SetSDITransmitEnable (NTV2_CHANNEL3, true);
509  mDevice.SetSDITransmitEnable (NTV2_CHANNEL4, true);
518  if (mConfig.fDoHDMIOutput)
520  }
521  else
522  {
527  mDevice.SetSDITransmitEnable (NTV2_CHANNEL3, true);
528  mDevice.SetSDITransmitEnable (NTV2_CHANNEL4, true);
533  if (mConfig.fDoHDMIOutput)
535  }
536  }
537  }
538  }
539  else
540  {
541  if (::IsRGBFormat(mConfig.fPixelFormat))
542  { // RGB on wire requires DualLinkOut widgets
555  mDevice.SetSDITransmitEnable (NTV2_CHANNEL1, true);
556  mDevice.SetSDITransmitEnable (NTV2_CHANNEL2, true);
557  mDevice.SetSDITransmitEnable (NTV2_CHANNEL3, true);
558  mDevice.SetSDITransmitEnable (NTV2_CHANNEL4, true);
567  }
568  else
569  {
574  mDevice.SetSDITransmitEnable (NTV2_CHANNEL1, true);
575  mDevice.SetSDITransmitEnable (NTV2_CHANNEL2, true);
576  mDevice.SetSDITransmitEnable (NTV2_CHANNEL3, true);
577  mDevice.SetSDITransmitEnable (NTV2_CHANNEL4, true);
586  }
587  }
588  return mDevice.ApplySignalRoute(connections, /*replaceExistingRouting?*/!mConfig.fDoMultiFormat);
589 
590 } // RouteOutputSignal
591 
592 
594 {
595  // Start my consumer and producer threads...
598  return AJA_STATUS_SUCCESS;
599 
600 } // Run
601 
602 
603 
605 // This is where the play thread starts
606 
608 {
609  // Create and start the playout thread...
610  mConsumerThread.Attach (ConsumerThreadStatic, this);
611  mConsumerThread.SetPriority(AJA_ThreadPriority_High);
612  mConsumerThread.Start();
613 
614 } // StartConsumerThread
615 
616 
617 // The playout thread function
618 void NTV2Player8K::ConsumerThreadStatic (AJAThread * pThread, void * pContext) // static
619 { (void) pThread;
620  // Grab the NTV2Player8K instance pointer from the pContext parameter,
621  // then call its PlayFrames method...
622  NTV2Player8K * pApp (reinterpret_cast<NTV2Player8K*>(pContext));
623  if (pApp)
624  pApp->ConsumeFrames();
625 
626 } // ConsumerThreadStatic
627 
628 
630 {
631  ULWord acOptions (AUTOCIRCULATE_WITH_RP188);
632  AUTOCIRCULATE_TRANSFER outputXfer;
633  AUTOCIRCULATE_STATUS outputStatus;
634  AJAAncillaryData * pPkt (AJA_NULL);
635  ULWord goodXfers(0), badXfers(0), prodWaits(0), noRoomWaits(0);
636  const UWord numACFramesPerChannel(7);
637 
638  // Stop AutoCirculate, just in case someone else left it running...
639  mDevice.AutoCirculateStop(mConfig.fOutputChannel);
640  mDevice.WaitForOutputVerticalInterrupt(mConfig.fOutputChannel, 4); // Let it stop
641  PLNOTE("Thread started");
642 
643  if (pPkt)
644  { // Allocate page-aligned host Anc buffer...
645  uint32_t hdrPktSize (0);
646  if (!outputXfer.acANCBuffer.Allocate(gAncMaxSizeBytes, BUFFER_PAGE_ALIGNED) || !outputXfer.acANCBuffer.Fill(0LL))
647  PLWARN("Anc buffer " << xHEX0N(gAncMaxSizeBytes,8) << "(" << DEC(gAncMaxSizeBytes) << ")-byte allocate failed -- HDR anc insertion disabled");
648  else if (AJA_FAILURE(pPkt->GenerateTransmitData (outputXfer.acANCBuffer, outputXfer.acANCBuffer, hdrPktSize)))
649  {
650  PLWARN("HDR anc insertion disabled -- GenerateTransmitData failed");
651  outputXfer.acANCBuffer.Deallocate();
652  }
653  else
654  acOptions |= AUTOCIRCULATE_WITH_ANC;
655  }
656 #ifdef NTV2_BUFFER_LOCKING
657  if (outputXfer.acANCBuffer)
658  mDevice.DMABufferLock(outputXfer.acANCBuffer, /*alsoLockSGL*/true);
659 #endif
660 
661  // Calculate start & end frame numbers...
662  const UWord startNum (mConfig.fOutputChannel < 2 ? 0 : numACFramesPerChannel); // Ch1: frames 0-6
663  const UWord endNum (mConfig.fOutputChannel < 2 ? numACFramesPerChannel-1 : numACFramesPerChannel*2-1); // Ch5: frames 7-13
664  if (mConfig.fNumAudioLinks > 1)
665  {
668  {
671  }
672  }
673 
674  // Initialize & start AutoCirculate...
675  bool initOK (mDevice.AutoCirculateInitForOutput (mConfig.fOutputChannel, 0, mAudioSystem, acOptions,
676  1 /*numChannels*/, startNum, endNum));
677  if (!initOK)
678  {PLFAIL("AutoCirculateInitForOutput failed"); mGlobalQuit = true;}
679 
680  while (!mGlobalQuit)
681  {
682  mDevice.AutoCirculateGetStatus (mConfig.fOutputChannel, outputStatus);
683 
684  // Check if there's room for another frame on the card...
685  if (outputStatus.CanAcceptMoreOutputFrames())
686  {
687  // Device has at least one free frame buffer that can be filled.
688  // Wait for the next frame in our ring to become ready to "consume"...
689  NTV2FrameData * pFrameData (mFrameDataRing.StartConsumeNextBuffer());
690  if (!pFrameData)
691  {prodWaits++; continue;}
692 
693  // Unlike in the NTV2Player demo, I now burn the current timecode into the test pattern buffer that was noted
694  // earlier into this FrameData in my Producer thread. This is done to avoid copying large 8K/UHD2 rasters.
695  const NTV2FrameRate ntv2FrameRate (::GetNTV2FrameRateFromVideoFormat(mConfig.fVideoFormat));
696  const TimecodeFormat tcFormat (CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat(ntv2FrameRate));
697  const CRP188 rp188Info (mCurrentFrame++, 0, 0, 10, tcFormat);
698  NTV2_RP188 tcData;
699  string timeCodeString;
700 
701  rp188Info.GetRP188Reg (tcData);
702  rp188Info.GetRP188Str (timeCodeString);
703  mTCBurner.BurnTimeCode (pFrameData->fVideoBuffer, timeCodeString.c_str(), 80);
704 
705  // Transfer the timecode-burned frame (plus audio) to the device for playout...
706  outputXfer.acVideoBuffer.Set (pFrameData->fVideoBuffer, pFrameData->fVideoBuffer);
707  outputXfer.acAudioBuffer.Set (pFrameData->fAudioBuffer, pFrameData->fNumAudioBytes);
708  outputXfer.SetOutputTimeCode (tcData, ::NTV2ChannelToTimecodeIndex(mConfig.fOutputChannel, /*LTC=*/false, /*F2=*/false));
709  outputXfer.SetOutputTimeCode (tcData, ::NTV2ChannelToTimecodeIndex(mConfig.fOutputChannel, /*LTC=*/true, /*F2=*/false));
710 
711  // Perform the DMA transfer to the device...
712  if (mDevice.AutoCirculateTransfer (mConfig.fOutputChannel, outputXfer))
713  goodXfers++;
714  else
715  badXfers++;
716 
717  if (goodXfers == 3)
718  mDevice.AutoCirculateStart(mConfig.fOutputChannel);
719 
720  // Signal that the frame has been "consumed"...
721  mFrameDataRing.EndConsumeNextBuffer();
722  continue; // Back to top of while loop
723  }
724 
725  // Wait for one or more buffers to become available on the device, which should occur at next VBI...
726  noRoomWaits++;
728  } // loop til quit signaled
729 
730  // Stop AutoCirculate...
731  mDevice.AutoCirculateStop(mConfig.fOutputChannel);
732  PLNOTE("Thread completed: " << DEC(goodXfers) << " xfers, " << DEC(badXfers) << " failed, "
733  << DEC(prodWaits) << " starves, " << DEC(noRoomWaits) << " VBI waits");
734 
735 } // ConsumeFrames
736 
737 
738 
740 // This is where the producer thread starts
741 
743 {
744  // Create and start the producer thread...
745  mProducerThread.Attach(ProducerThreadStatic, this);
746  mProducerThread.SetPriority(AJA_ThreadPriority_High);
747  mProducerThread.Start();
748 
749 } // StartProducerThread
750 
751 
752 void NTV2Player8K::ProducerThreadStatic (AJAThread * pThread, void * pContext) // static
753 {
754  (void) pThread;
755  NTV2Player8K * pApp (reinterpret_cast<NTV2Player8K*>(pContext));
756  if (pApp)
757  pApp->ProduceFrames();
758 
759 } // ProducerThreadStatic
760 
761 
763 {
764  ULWord freqNdx(0), testPatNdx(0), badTally(0);
765  double timeOfLastSwitch (0.0);
766 
769 
770  PLNOTE("Thread started");
771  while (!mGlobalQuit)
772  {
773  NTV2FrameData * pFrameData (mFrameDataRing.StartProduceNextBuffer());
774  if (!pFrameData)
775  { badTally++; // No frame available!
776  AJATime::Sleep(10); // Wait a bit for the consumer thread to free one up for me...
777  continue; // ...then try again
778  }
779 
780  // Unlike NTV2Player::ProduceFrames, NTV2Player8K::ProduceFrames doesn't touch this frame's video buffer.
781  // Instead, to avoid wasting time copying large 8K/UHD2 rasters, in this thread we simply note which test
782  // pattern buffer is to be modified and subsequently transferred to the hardware. This happens later, in
783  // NTV2Player8K::ConsumeFrames...
784  NTV2Buffer & testPatVidBuffer(mTestPatRasters.at(testPatNdx));
785  pFrameData->fVideoBuffer.Set(testPatVidBuffer.GetHostPointer(), testPatVidBuffer.GetByteCount());
786 
787  // If also playing audio...
788  if (pFrameData->AudioBuffer()) // ...then generate audio tone data for this frame...
789  pFrameData->fNumAudioBytes = AddTone(pFrameData->fAudioBuffer); // ...and remember number of audio bytes to xfer
790 
791  // Every few seconds, change the test pattern and tone frequency...
792  const double currentTime (timeBase.FramesToSeconds(mCurrentFrame++));
793  if (currentTime > timeOfLastSwitch + 4.0)
794  {
795  freqNdx = (freqNdx + 1) % gNumFrequencies;
796  testPatNdx = (testPatNdx + 1) % ULWord(mTestPatRasters.size());
797  mToneFrequency = gFrequencies[freqNdx];
798  timeOfLastSwitch = currentTime;
799  PLINFO("F" << DEC0N(mCurrentFrame,6) << ": tone=" << mToneFrequency << "Hz, pattern='" << tpNames.at(testPatNdx) << "'");
800  } // if time to switch test pattern & tone frequency
801 
802  // Signal that I'm done producing this FrameData, making it immediately available for transfer/playout...
803  mFrameDataRing.EndProduceNextBuffer();
804 
805  } // loop til mGlobalQuit goes true
806  PLNOTE("Thread completed: " << DEC(mCurrentFrame) << " frame(s) produced, " << DEC(badTally) << " failed");
807 
808 } // ProduceFrames
809 
810 
811 uint32_t NTV2Player8K::AddTone (ULWord * audioBuffer)
812 {
815  ULWord numChannels (0);
816 
817  mDevice.GetFrameRate (frameRate, mConfig.fOutputChannel);
818  mDevice.GetAudioRate (audioRate, mAudioSystem);
819  mDevice.GetNumberAudioChannels (numChannels, mAudioSystem);
820 
821  // Since audio on AJA devices use fixed sample rates (typically 48KHz), certain video frame rates will
822  // necessarily result in some frames having more audio samples than others. GetAudioSamplesPerFrame is
823  // called to calculate the correct sample count for the current frame...
824  const ULWord numSamples (::GetAudioSamplesPerFrame (frameRate, audioRate, mCurrentFrame));
825  const double sampleRateHertz (::GetAudioSamplesPerSecond(audioRate));
826 
827  // Unlike NTV2Player::AddTone, NTV2Player8K::AddTone handles multi-link audio:
828  ULWord bytesWritten(0), startSample(mCurrentSample);
829  for (UWord linkNdx(0); linkNdx < mConfig.fNumAudioLinks; linkNdx++)
830  {
831  mCurrentSample = startSample;
832  bytesWritten += ::AddAudioTone (audioBuffer + (bytesWritten/4), // audio buffer to fill
833  mCurrentSample, // which sample for continuing the waveform
834  numSamples, // number of samples to generate
835  sampleRateHertz, // sample rate [Hz]
836  0.5, // amplitude
837  mToneFrequency, // tone frequency [Hz]
838  31, // bits per sample
839  false, // don't byte swap
840  numChannels); // number of audio channels to generate
841  } // for each SDI audio link
842  return bytesWritten;
843 
844 } // AddTone
845 
846 
848 {
849  mDevice.AutoCirculateGetStatus (mConfig.fOutputChannel, outStatus);
850 }
NTV2TestPatternGen::DrawTestPattern
virtual bool DrawTestPattern(const std::string &inTPName, const NTV2FormatDescriptor &inFormatDesc, NTV2Buffer &inBuffer)
Renders the given test pattern or color into a host raster buffer.
CNTV2Card::SubscribeOutputVerticalEvent
virtual bool SubscribeOutputVerticalEvent(const NTV2Channel inChannel)
Causes me to be notified when an output vertical blanking interrupt is generated for the given output...
Definition: ntv2subscriptions.cpp:25
CNTV2Card::SetVANCMode
virtual bool SetVANCMode(const NTV2VANCMode inVancMode, const NTV2Channel inChannel=NTV2_CHANNEL1)
Sets the VANC mode for the given FrameStore.
Definition: ntv2register.cpp:2703
NTV2_XptFrameBuffer4YUV
@ NTV2_XptFrameBuffer4YUV
Definition: ntv2enums.h:2573
NTV2Player8K::StartConsumerThread
virtual void StartConsumerThread(void)
Starts my consumer thread.
Definition: ntv2player8k.cpp:607
CNTV2Card::SetMultiFormatMode
virtual bool SetMultiFormatMode(const bool inEnable)
Enables or disables multi-format (per channel) device operation. If enabled, each device channel can ...
Definition: ntv2register.cpp:4428
NTV2_XptHDMIOutInput
@ NTV2_XptHDMIOutInput
Definition: ntv2enums.h:2851
gNumFrequencies
static const ULWord gNumFrequencies(sizeof(gFrequencies)/sizeof(double))
DeviceCapabilities::CanDoVideoFormat
bool CanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2devicecapabilities.h:255
PlayerConfig::fDoHDMIOutput
bool fDoHDMIOutput
If true, enable HDMI output; otherwise, disable HDMI output.
Definition: ntv2democommon.h:336
NTV2_AUDIO_LOOPBACK_OFF
@ NTV2_AUDIO_LOOPBACK_OFF
Embeds silence (zeroes) into the data stream.
Definition: ntv2enums.h:2026
NTV2FormatDescriptor::GetVideoWriteSize
ULWord GetVideoWriteSize(ULWord inPageSize=4096UL) const
Definition: ntv2formatdescriptor.cpp:957
CNTV2Card::GetAncRegionOffsetFromBottom
virtual bool GetAncRegionOffsetFromBottom(ULWord &outByteOffsetFromBottom, const NTV2AncillaryDataRegion inAncRegion=NTV2_AncRgn_All)
Answers with the byte offset to the start of an ancillary data region within a device frame buffer,...
Definition: ntv2dma.cpp:601
NTV2_TestPatt_CheckField
@ NTV2_TestPatt_CheckField
Definition: ntv2testpatterngen.h:34
ancillarydata_hdr_hlg.h
Declares the AJAAncillaryData_HDR_HLG class.
NTV2_REFERENCE_SFP1_PTP
@ NTV2_REFERENCE_SFP1_PTP
Specifies the PTP source on SFP 1.
Definition: ntv2enums.h:1464
NTV2Player8K::SetUpHostBuffers
virtual AJAStatus SetUpHostBuffers(void)
Sets up my host video & audio buffers.
Definition: ntv2player8k.cpp:304
NTV2_XptFrameBuffer1_DS2YUV
@ NTV2_XptFrameBuffer1_DS2YUV
Definition: ntv2enums.h:2661
NTV2_IS_VALID_TASK_MODE
#define NTV2_IS_VALID_TASK_MODE(__m__)
Definition: ntv2publicinterface.h:4474
NTV2_XptSDIOut4InputDS2
@ NTV2_XptSDIOut4InputDS2
Definition: ntv2enums.h:2802
NTV2_CHANNEL2
@ NTV2_CHANNEL2
Specifies channel or FrameStore 2 (or the 2nd item).
Definition: ntv2enums.h:1356
AJA_ThreadPriority_High
@ AJA_ThreadPriority_High
Definition: thread.h:44
CNTV2Card::SetVideoFormat
virtual bool SetVideoFormat(const NTV2VideoFormat inVideoFormat, const bool inIsAJARetail=(!(0)), const bool inKeepVancSettings=(0), const NTV2Channel inChannel=NTV2_CHANNEL1)
Configures the AJA device to handle a specific video format.
Definition: ntv2register.cpp:204
AJATimeCodeBurn::RenderTimeCodeFont
AJA_EXPORT bool RenderTimeCodeFont(AJA_PixelFormat pixelFormat, uint32_t numPixels, uint32_t numLines)
Definition: timecodeburn.cpp:447
NTV2Player8K::AddTone
virtual uint32_t AddTone(ULWord *audioBuffer)
Inserts audio tone (based on my current tone frequency) into the given audio buffer.
Definition: ntv2player8k.cpp:811
NTV2_XptFrameBuffer2RGB
@ NTV2_XptFrameBuffer2RGB
Definition: ntv2enums.h:2545
NTV2_TestPatt_MultiBurst
@ NTV2_TestPatt_MultiBurst
Definition: ntv2testpatterngen.h:32
NTV2_AUDIO_BUFFER_BIG
@ NTV2_AUDIO_BUFFER_BIG
Definition: ntv2enums.h:1915
NTV2Player8K::SetUpAudio
virtual AJAStatus SetUpAudio(void)
Performs all audio setup.
Definition: ntv2player8k.cpp:254
NTV2_XptSDIOut3InputDS2
@ NTV2_XptSDIOut3InputDS2
Definition: ntv2enums.h:2800
NTV2FormatDescriptor
Describes a video frame for a given video standard or format and pixel format, including the total nu...
Definition: ntv2formatdescriptor.h:41
NTV2FrameData
I encapsulate the video, audio and anc host buffers used in the AutoCirculate demos....
Definition: ntv2democommon.h:79
CRP188::GetRP188Reg
bool GetRP188Reg(RP188_STRUCT &outRP188) const
Definition: ntv2rp188.cpp:1241
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1353
NTV2Buffer
Describes a user-space buffer on the host computer. I have an address and a length,...
Definition: ntv2publicinterface.h:6216
NTV2_XptDuallinkOut1
@ NTV2_XptDuallinkOut1
Definition: ntv2enums.h:2541
AJA_STATUS_SUCCESS
@ AJA_STATUS_SUCCESS
Definition: types.h:381
ntv2player8k.h
Header file for NTV2Player8K demonstration class.
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6290
NTV2_AUDIOSYSTEM_4
@ NTV2_AUDIOSYSTEM_4
This identifies the 4th Audio System.
Definition: ntv2enums.h:3885
GetNTV2FrameRateFromVideoFormat
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:3630
NTV2_XptFrameBuffer3_DS2YUV
@ NTV2_XptFrameBuffer3_DS2YUV
Definition: ntv2enums.h:2665
AJAThread::Attach
virtual AJAStatus Attach(AJAThreadFunction *pThreadFunction, void *pUserContext)
Definition: thread.cpp:169
NTV2_IS_QUAD_QUAD_HFR_VIDEO_FORMAT
#define NTV2_IS_QUAD_QUAD_HFR_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:822
NTV2_AUDIO_48K
@ NTV2_AUDIO_48K
Definition: ntv2enums.h:1926
NTV2Player8K::Quit
virtual void Quit(void)
Gracefully stops me from running.
Definition: ntv2player8k.cpp:78
AJATimeCodeBurn::BurnTimeCode
AJA_EXPORT bool BurnTimeCode(void *pBaseVideoAddress, const std::string &inTimeCodeStr, const uint32_t inYPercent)
Definition: timecodeburn.cpp:45
NTV2_XptFrameBuffer4_DS2YUV
@ NTV2_XptFrameBuffer4_DS2YUV
Definition: ntv2enums.h:2667
NTV2_XptFrameBuffer3YUV
@ NTV2_XptFrameBuffer3YUV
Definition: ntv2enums.h:2571
NTV2Buffer::Deallocate
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
Definition: ntv2publicinterface.cpp:1844
NTV2Player8K::StartProducerThread
virtual void StartProducerThread(void)
Starts my producer thread.
Definition: ntv2player8k.cpp:742
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:338
NTV2_FRAMERATE_INVALID
@ NTV2_FRAMERATE_INVALID
Definition: ntv2enums.h:437
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3882
AJACircularBuffer::StartConsumeNextBuffer
FrameDataPtr StartConsumeNextBuffer(void)
The thread that's responsible for processing incoming frames – the consumer – calls this function to ...
Definition: circularbuffer.h:153
NTV2Player8K::SetUpTestPatternBuffers
virtual AJAStatus SetUpTestPatternBuffers(void)
Creates my test pattern buffers.
Definition: ntv2player8k.cpp:350
ntv2testpatterngen.h
Declares the NTV2TestPatternGen class.
AUTOCIRCULATE_TRANSFER::acAudioBuffer
NTV2Buffer acAudioBuffer
The host audio buffer. This field is owned by the client application, and thus is responsible for all...
Definition: ntv2publicinterface.h:8317
NTV2_TestPatt_ColorBars100
@ NTV2_TestPatt_ColorBars100
Definition: ntv2testpatterngen.h:28
NTV2XptConnection
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnection
Definition: ntv2signalrouter.h:38
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5771
CNTV2MacDriverInterface::ReleaseStreamForApplication
virtual bool ReleaseStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Releases exclusive use of the AJA device for the given process, permitting other processes to acquire...
Definition: ntv2macdriverinterface.cpp:540
BUFFER_PAGE_ALIGNED
static const bool BUFFER_PAGE_ALIGNED((!(0)))
NTV2_AncRgn_Field2
@ NTV2_AncRgn_Field2
Identifies the "normal" Field 2 ancillary data region.
Definition: ntv2enums.h:4215
AJA_STATUS_MEMORY
@ AJA_STATUS_MEMORY
Definition: types.h:397
AUTOCIRCULATE_WITH_MULTILINK_AUDIO3
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO3
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 3.
Definition: ntv2publicinterface.h:5715
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_XptFrameBuffer1RGB
@ NTV2_XptFrameBuffer1RGB
Definition: ntv2enums.h:2536
NTV2Buffer::Allocate
bool Allocate(const size_t inByteCount, const bool inPageAligned=false)
Allocates (or re-allocates) my user-space storage using the given byte count. I assume full responsib...
Definition: ntv2publicinterface.cpp:1810
NTV2_XptSDIOut2InputDS2
@ NTV2_XptSDIOut2InputDS2
Definition: ntv2enums.h:2798
PlayerConfig::fDoMultiFormat
bool fDoMultiFormat
If true, enable device-sharing; otherwise take exclusive control of device.
Definition: ntv2democommon.h:331
CNTV2Card::ApplySignalRoute
virtual bool ApplySignalRoute(const CNTV2SignalRouter &inRouter, const bool inReplace=(0))
Applies the given routing table to the AJA device.
Definition: ntv2regroute.cpp:277
TimecodeFormat
TimecodeFormat
Definition: ntv2rp188.h:22
CNTV2Card::SetTaskMode
virtual bool SetTaskMode(const NTV2TaskMode inMode)
Sets the device's task mode.
Definition: ntv2register.cpp:179
NTV2_AUDIO_FORMAT_LPCM
@ NTV2_AUDIO_FORMAT_LPCM
Definition: ntv2enums.h:1949
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:2801
NTV2_CHANNEL1
@ NTV2_CHANNEL1
Specifies channel or FrameStore 1 (or the first item).
Definition: ntv2enums.h:1355
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:2939
ntv2debug.h
CNTV2Card::SetFrameBufferFormat
virtual bool SetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat inNewFormat, bool inIsAJARetail=(!(0)), NTV2HDRXferChars inXferChars=NTV2_VPID_TC_SDR_TV, NTV2HDRColorimetry inColorimetry=NTV2_VPID_Color_Rec709, NTV2HDRLuminance inLuminance=NTV2_VPID_Luminance_YCbCr)
Sets the frame buffer format for the given FrameStore on the AJA device.
Definition: ntv2register.cpp:1856
NTV2FrameBufferFormatString
const char * NTV2FrameBufferFormatString(NTV2FrameBufferFormat fmt)
Definition: ntv2debug.cpp:209
CNTV2Card::SetSDITransmitEnable
virtual bool SetSDITransmitEnable(const NTV2Channel inChannel, const bool inEnable)
Sets the specified bidirectional SDI connector to act as an input or an output.
Definition: ntv2register.cpp:3859
AUTOCIRCULATE_STATUS::CanAcceptMoreOutputFrames
bool CanAcceptMoreOutputFrames(void) const
Definition: ntv2publicinterface.h:7476
NTV2_XptFrameBuffer3RGB
@ NTV2_XptFrameBuffer3RGB
Definition: ntv2enums.h:2572
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
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:408
CNTV2Card::GetTaskMode
virtual bool GetTaskMode(NTV2TaskMode &outMode)
Retrieves the device's current task mode.
Definition: ntv2register.cpp:184
NTV2_IS_UHD2_FULL_VIDEO_FORMAT
#define NTV2_IS_UHD2_FULL_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:884
CNTV2Card::DMABufferLock
virtual bool DMABufferLock(const NTV2Buffer &inBuffer, bool inMap=(0), bool inRDMA=(0))
Page-locks the given host buffer to reduce transfer time and CPU usage of DMA transfers.
Definition: ntv2dma.cpp:429
NTV2_CHANNEL4
@ NTV2_CHANNEL4
Specifies channel or FrameStore 4 (or the 4th item).
Definition: ntv2enums.h:1358
NTV2_XptFrameBuffer2_DS2YUV
@ NTV2_XptFrameBuffer2_DS2YUV
Definition: ntv2enums.h:2663
PlayerConfig::fDoTsiRouting
bool fDoTsiRouting
If true, enable TSI routing; otherwise route for square division (4K/8K)
Definition: ntv2democommon.h:337
AUTOCIRCULATE_WITH_MULTILINK_AUDIO1
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO1
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 1.
Definition: ntv2publicinterface.h:5713
NTV2MakeAudioSystemSet
NTV2AudioSystemSet NTV2MakeAudioSystemSet(const NTV2AudioSystem inFirstAudioSystem, const UWord inCount=1)
Definition: ntv2publicinterface.cpp:3634
CNTV2Card::features
virtual class DeviceCapabilities & features(void)
Definition: ntv2card.h:148
AJAThread
Definition: thread.h:69
AUTOCIRCULATE_WITH_ANC
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
Definition: ntv2publicinterface.h:5709
AJAThread::Active
virtual bool Active()
Definition: thread.cpp:116
CNTV2Card::DMABufferUnlockAll
virtual bool DMABufferUnlockAll()
Unlocks all previously-locked buffers used for DMA transfers.
Definition: ntv2dma.cpp:457
CNTV2Card::GetDisplayName
virtual std::string GetDisplayName(void)
Answers with this device's display name.
Definition: ntv2card.cpp:86
NTV2_XptFrameBuffer4_DS2RGB
@ NTV2_XptFrameBuffer4_DS2RGB
Definition: ntv2enums.h:2668
NTV2Player8K
I am an object that can play out an 8K or UHD2 test pattern (with timecode) to 4 x 12G SDI outputs of...
Definition: ntv2player8k.h:24
AJAStatus
AJAStatus
Definition: types.h:378
NTV2_TestPatt_White
@ NTV2_TestPatt_White
Definition: ntv2testpatterngen.h:38
NTV2_XptFrameBuffer1_DS2RGB
@ NTV2_XptFrameBuffer1_DS2RGB
Definition: ntv2enums.h:2662
connections
NTV2XptConnections connections
Definition: ntv2vcam.cpp:1011
NTV2Player8K::ConsumeFrames
virtual void ConsumeFrames(void)
My consumer thread that repeatedly plays frames using AutoCirculate (until quit).
Definition: ntv2player8k.cpp:629
NTV2_XptFrameBuffer2_DS2RGB
@ NTV2_XptFrameBuffer2_DS2RGB
Definition: ntv2enums.h:2664
NTV2FormatDescriptor::numPixels
ULWord numPixels
Width – total number of pixels per line.
Definition: ntv2formatdescriptor.h:367
process.h
Declares the AJAProcess class.
NTV2Player8K::SetUpVideo
virtual AJAStatus SetUpVideo(void)
Performs all video setup.
Definition: ntv2player8k.cpp:182
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_XptDuallinkOut3
@ NTV2_XptDuallinkOut3
Definition: ntv2enums.h:2586
NTV2_TestPatt_Ramp
@ NTV2_TestPatt_Ramp
Definition: ntv2testpatterngen.h:31
NTV2_VANCMODE_OFF
@ NTV2_VANCMODE_OFF
This identifies the mode in which there are no VANC lines in the frame buffer.
Definition: ntv2enums.h:3784
CNTV2Card::SetSDIOutputAudioSystem
virtual bool SetSDIOutputAudioSystem(const NTV2Channel inSDIOutputConnector, const NTV2AudioSystem inAudioSystem)
Sets the device's NTV2AudioSystem that will provide audio for the given SDI output's audio embedder....
Definition: ntv2register.cpp:4014
CNTV2Card::GetNumberAudioChannels
virtual bool GetNumberAudioChannels(ULWord &outNumChannels, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Returns the current number of audio channels being captured or played by a given Audio System on the ...
Definition: ntv2audio.cpp:180
AJATimeBase
Definition: timebase.h:18
AJA_STATUS_FEATURE
@ AJA_STATUS_FEATURE
Definition: types.h:393
AJA_STATUS_FAIL
@ AJA_STATUS_FAIL
Definition: types.h:382
ULWord
uint32_t ULWord
Definition: ajatypes.h:276
NTV2_TestPatt_FlatField
@ NTV2_TestPatt_FlatField
Definition: ntv2testpatterngen.h:35
CNTV2Card::EnableChannels
virtual bool EnableChannels(const NTV2ChannelSet &inChannels, const bool inDisableOthers=(0))
Enables the given FrameStore(s).
Definition: ntv2register.cpp:2170
CNTV2Card::GetDescription
virtual std::string GetDescription(void) const
Definition: ntv2card.cpp:137
NTV2FrameData::fVideoBuffer
NTV2Buffer fVideoBuffer
Host video buffer.
Definition: ntv2democommon.h:82
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7405
ntv2devicescanner.h
Declares the CNTV2DeviceScanner class.
AJAAncillaryData
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
Definition: ancillarydata.h:552
NTV2FormatDescriptor::numLines
ULWord numLines
Height – total number of lines.
Definition: ntv2formatdescriptor.h:366
NTV2_XptFrameBuffer1YUV
@ NTV2_XptFrameBuffer1YUV
Definition: ntv2enums.h:2535
NTV2_XptSDIOut2Input
@ NTV2_XptSDIOut2Input
Definition: ntv2enums.h:2797
NTV2_XptDuallinkOut2DS2
@ NTV2_XptDuallinkOut2DS2
Definition: ntv2enums.h:2576
NTV2_XptDuallinkOut1DS2
@ NTV2_XptDuallinkOut1DS2
Definition: ntv2enums.h:2575
CNTV2DemoCommon::SetDefaultPageSize
static size_t SetDefaultPageSize(void)
Definition: ntv2democommon.cpp:1553
NTV2_XptDuallinkOut4DS2
@ NTV2_XptDuallinkOut4DS2
Definition: ntv2enums.h:2589
CNTV2Card::SetHDMIOutAudioFormat
virtual bool SetHDMIOutAudioFormat(const NTV2AudioFormat inNewValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the HDMI output's audio format.
Definition: ntv2audio.cpp:1031
NTV2ChannelToTimecodeIndex
NTV2TCIndex NTV2ChannelToTimecodeIndex(const NTV2Channel inChannel, const bool inEmbeddedLTC=false, const bool inIsF2=false)
Converts the given NTV2Channel value into the equivalent NTV2TCIndex value.
Definition: ntv2utils.cpp:4959
NTV2Player8K::ProducerThreadStatic
static void ProducerThreadStatic(AJAThread *pThread, void *pContext)
This is the producer thread's static callback function that gets called when the producer thread star...
Definition: ntv2player8k.cpp:752
NTV2AudioSystemSet
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
Definition: ntv2publicinterface.h:3984
CNTV2Card::SetSDIOutRGBLevelAConversion
virtual bool SetSDIOutRGBLevelAConversion(const UWord inOutputSpigot, const bool inEnable)
Enables or disables an RGB-over-3G-level-A conversion at the SDI output widget (assuming the AJA devi...
Definition: ntv2register.cpp:4396
AJAProcess::GetPid
static uint64_t GetPid()
Definition: process.cpp:35
PlayerConfig::fNumAudioLinks
UWord fNumAudioLinks
The number of audio systems to control for multi-link audio (4K/8K)
Definition: ntv2democommon.h:330
NTV2_TestPatt_ColorQuadrant
@ NTV2_TestPatt_ColorQuadrant
Definition: ntv2testpatterngen.h:43
NTV2_TestPatt_ColorQuadrantBorder
@ NTV2_TestPatt_ColorQuadrantBorder
Definition: ntv2testpatterngen.h:44
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 FrameStore 3 (or the 3rd item).
Definition: ntv2enums.h:1357
UWord
uint16_t UWord
Definition: ajatypes.h:274
PlayerConfig::fVideoFormat
NTV2VideoFormat fVideoFormat
The video format to use.
Definition: ntv2democommon.h:328
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:668
NTV2FrameData::fNumAudioBytes
ULWord fNumAudioBytes
Actual number of captured audio bytes.
Definition: ntv2democommon.h:88
NTV2_REFERENCE_FREERUN
@ NTV2_REFERENCE_FREERUN
Specifies the device's internal clock.
Definition: ntv2enums.h:1455
NTV2_XptDualLinkOut4Input
@ NTV2_XptDualLinkOut4Input
Definition: ntv2enums.h:2830
AUTOCIRCULATE_TRANSFER
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
Definition: ntv2publicinterface.h:8302
PlayerConfig::fOutputChannel
NTV2Channel fOutputChannel
The device channel to use.
Definition: ntv2democommon.h:324
NTV2VideoFormatToString
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
Definition: ntv2utils.cpp:6735
NTV2FrameData::AudioBuffer
NTV2Buffer & AudioBuffer(void)
Definition: ntv2democommon.h:109
NTV2_TestPatt_Black
@ NTV2_TestPatt_Black
Definition: ntv2testpatterngen.h:37
NTV2_TestPatt_SlantRamp
@ NTV2_TestPatt_SlantRamp
Definition: ntv2testpatterngen.h:41
NTV2_XptSDIOut1InputDS2
@ NTV2_XptSDIOut1InputDS2
Definition: ntv2enums.h:2796
NTV2_TestPatt_ColorBars75
@ NTV2_TestPatt_ColorBars75
Definition: ntv2testpatterngen.h:30
CNTV2DriverInterface::IsDeviceReady
virtual bool IsDeviceReady(const bool inCheckValid=(0))
Definition: ntv2driverinterface.cpp:1348
NTV2_TestPatt_ZonePlate
@ NTV2_TestPatt_ZonePlate
Definition: ntv2testpatterngen.h:42
DEVICE_ID_INVALID
@ DEVICE_ID_INVALID
Definition: ntv2enums.h:96
kDemoAppSignature
static const ULWord kDemoAppSignature((((uint32_t)( 'D'))<< 24)|(((uint32_t)( 'E'))<< 16)|(((uint32_t)( 'M'))<< 8)|(((uint32_t)( 'O'))<< 0))
NTV2Player8K::ProduceFrames
virtual void ProduceFrames(void)
My producer thread that repeatedly produces video frames.
Definition: ntv2player8k.cpp:762
NTV2ChannelSet
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Definition: ntv2publicinterface.h:3938
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
CRP188
Definition: ntv2rp188.h:50
AJA_STATUS_UNSUPPORTED
@ AJA_STATUS_UNSUPPORTED
Definition: types.h:394
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:220
AddAudioTone
bool AddAudioTone(ULWord &outNumBytesWritten, NTV2Buffer &inAudioBuffer, ULWord &inOutCurrentSample, const ULWord inNumSamples, const double inSampleRate, const double inAmplitude, const double inFrequency, const ULWord inNumBits, const bool inByteSwap, const ULWord inNumChannels)
Fills the given buffer with 32-bit (ULWord) audio tone samples.
Definition: ntv2utils.cpp:4413
NTV2Player8K::RouteOutputSignal
virtual bool RouteOutputSignal(void)
Performs all widget/signal routing for playout.
Definition: ntv2player8k.cpp:410
gAudMaxSizeBytes
static const uint32_t gAudMaxSizeBytes(256 *1024)
The maximum number of bytes of 48KHz audio that can be transferred for a single frame....
CNTV2DemoCommon::GetAJAFrameRate
static AJA_FrameRate GetAJAFrameRate(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1080
NTV2TestPatternGen
The NTV2 test pattern generator.
Definition: ntv2testpatterngen.h:69
NTV2Buffer::GetHostPointer
void * GetHostPointer(void) const
Definition: ntv2publicinterface.h:6273
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:530
NTV2FrameData::fAudioBuffer
NTV2Buffer fAudioBuffer
Host audio buffer.
Definition: ntv2democommon.h:84
gAncMaxSizeBytes
static ULWord gAncMaxSizeBytes(NTV2_ANCSIZE_MAX)
The maximum number of bytes of ancillary data that can be transferred for a single field....
NTV2_TestPatt_Border
@ NTV2_TestPatt_Border
Definition: ntv2testpatterngen.h:39
NTV2AudioRate
NTV2AudioRate
Definition: ntv2enums.h:1924
mFormatDesc
mFormatDesc
Definition: ntv2vcam.cpp:942
AJA_STATUS_INITIALIZE
@ AJA_STATUS_INITIALIZE
Definition: types.h:386
NTV2Player8K::Run
virtual AJAStatus Run(void)
Runs me.
Definition: ntv2player8k.cpp:593
PlayerConfig::fDoRGBOnWire
bool fDoRGBOnWire
If true, produce RGB on the wire; otherwise output YUV.
Definition: ntv2democommon.h:338
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5769
NTV2_AUDIOSYSTEM_3
@ NTV2_AUDIOSYSTEM_3
This identifies the 3rd Audio System.
Definition: ntv2enums.h:3884
NTV2Player8K::~NTV2Player8K
virtual ~NTV2Player8K(void)
Definition: ntv2player8k.cpp:69
CNTV2Card::SetHDMIOutAudioRate
virtual bool SetHDMIOutAudioRate(const NTV2AudioRate inNewValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the HDMI output's audio rate.
Definition: ntv2audio.cpp:1009
false
#define false
Definition: ntv2devicefeatures.h:25
NTV2_XptFrameBuffer4RGB
@ NTV2_XptFrameBuffer4RGB
Definition: ntv2enums.h:2574
AUTOCIRCULATE_WITH_MULTILINK_AUDIO2
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO2
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 2.
Definition: ntv2publicinterface.h:5714
AUTOCIRCULATE_WITH_RP188
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
Definition: ntv2publicinterface.h:5703
ancillarydata_hdr_hdr10.h
Declares the AJAAncillaryData_HDR_HDR10 class.
NTV2FrameBufferFormatToString
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6925
PlayerConfig::fDeviceSpec
std::string fDeviceSpec
The AJA device to use.
Definition: ntv2democommon.h:322
NTV2_XptDualLinkOut3Input
@ NTV2_XptDualLinkOut3Input
Definition: ntv2enums.h:2829
NTV2XptConnections
std::map< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnections
Definition: ntv2signalrouter.h:39
AJA_STATUS_BAD_PARAM
@ AJA_STATUS_BAD_PARAM
Definition: types.h:392
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
NTV2MakeChannelSet
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
Definition: ntv2publicinterface.cpp:3579
NTV2_XptFrameBuffer2YUV
@ NTV2_XptFrameBuffer2YUV
Definition: ntv2enums.h:2544
std
Definition: json.hpp:5362
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:7002
AUTOCIRCULATE_TRANSFER::acVideoBuffer
NTV2Buffer acVideoBuffer
The host video buffer. This field is owned by the client application, and thus is responsible for all...
Definition: ntv2publicinterface.h:8310
IsRGBFormat
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Definition: ntv2utils.cpp:5407
NTV2Player8K::ConsumerThreadStatic
static void ConsumerThreadStatic(AJAThread *pThread, void *pContext)
This is the consumer thread's static callback function that gets called when the consumer thread star...
Definition: ntv2player8k.cpp:618
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:717
CNTV2DemoCommon::GetAJAPixelFormat
static AJA_PixelFormat GetAJAPixelFormat(const NTV2PixelFormat inFormat)
Definition: ntv2democommon.cpp:1112
GetAudioSamplesPerFrame
ULWord GetAudioSamplesPerFrame(const NTV2FrameRate inFrameRate, const NTV2AudioRate inAudioRate, ULWord inCadenceFrame=0, bool inIsSMPTE372Enabled=false)
Returns the number of audio samples for a given video frame rate, audio sample rate,...
Definition: ntv2utils.cpp:2889
NTV2Player8K::NTV2Player8K
NTV2Player8K(const PlayerConfig &inConfig)
Constructs me using the given configuration settings.
Definition: ntv2player8k.cpp:48
CNTV2Card::AutoCirculateInitForOutput
virtual bool AutoCirculateInitForOutput(const NTV2Channel inChannel, const UWord inFrameCount=7, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_INVALID, const ULWord inOptionFlags=0, const UByte inNumChannels=1, const UWord inStartFrameNumber=0, const UWord inEndFrameNumber=0)
Prepares for subsequent AutoCirculate playout, designating a contiguous block of frame buffers on the...
Definition: ntv2autocirculate.cpp:364
CIRCULAR_BUFFER_SIZE
static const size_t CIRCULAR_BUFFER_SIZE(10)
Number of NTV2FrameData's in our ring.
CNTV2MacDriverInterface::AcquireStreamForApplication
virtual bool AcquireStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Reserves exclusive use of the AJA device for a given process, preventing other processes on the host ...
Definition: ntv2macdriverinterface.cpp:505
AJAAncillaryData::GenerateTransmitData
virtual AJAStatus GenerateTransmitData(uint8_t *pBuffer, const size_t inMaxBytes, uint32_t &outPacketSize)
Generates "raw" ancillary data from my internal ancillary data (playback) – see SDI Anc Buffer Data F...
Definition: ancillarydata.cpp:766
NTV2_XptDualLinkOut2Input
@ NTV2_XptDualLinkOut2Input
Definition: ntv2enums.h:2828
NTV2_AudioChannel1_8
@ NTV2_AudioChannel1_8
This selects audio channels 1 thru 8.
Definition: ntv2enums.h:3310
CNTV2DriverInterface::GetDeviceID
virtual NTV2DeviceID GetDeviceID(void)
Definition: ntv2driverinterface.cpp:420
NTV2Player8K::Init
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
Definition: ntv2player8k.cpp:101
CNTV2Card::GetAudioRate
virtual bool GetAudioRate(NTV2AudioRate &outRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Returns the current NTV2AudioRate for the given Audio System.
Definition: ntv2audio.cpp:226
CNTV2Card::GetFrameRate
virtual bool GetFrameRate(NTV2FrameRate &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Returns the AJA device's currently configured frame rate via its "value" parameter.
Definition: ntv2register.cpp:1022
NTV2Player8K::GetACStatus
virtual void GetACStatus(AUTOCIRCULATE_STATUS &outStatus)
Provides status information about my output (playout) process.
Definition: ntv2player8k.cpp:847
GetAudioSamplesPerSecond
double GetAudioSamplesPerSecond(const NTV2AudioRate inAudioRate)
Returns the audio sample rate as a number of audio samples per second.
Definition: ntv2utils.cpp:3303
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_TestPatt_MultiPattern
@ NTV2_TestPatt_MultiPattern
Definition: ntv2testpatterngen.h:36
PlayerConfig
Configures an NTV2Player instance.
Definition: ntv2democommon.h:319
CNTV2Card::SetQuadQuadFrameEnable
virtual bool SetQuadQuadFrameEnable(const bool inValue, const NTV2Channel inChannel=NTV2_CHANNEL1)
Enables or disables "quad-quad" 8K frame mode on the device.
Definition: ntv2register.cpp:1125
PlayerConfig::fPixelFormat
NTV2PixelFormat fPixelFormat
The pixel format to use.
Definition: ntv2democommon.h:327
CNTV2Card::SetQuadQuadSquaresEnable
virtual bool SetQuadQuadSquaresEnable(const bool inValue, const NTV2Channel inChannel=NTV2_CHANNEL1)
Enables or disables quad-quad-frame (8K) squares mode on the device.
Definition: ntv2register.cpp:1180
NTV2Buffer::Fill
bool Fill(const T &inValue)
Fills me with the given scalar value.
Definition: ntv2publicinterface.h:6442
AJAThread::SetPriority
virtual AJAStatus SetPriority(AJAThreadPriority priority)
Definition: thread.cpp:133
CNTV2Card::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:525
NTV2TestPatternGen::getTestPatternNames
static NTV2TestPatternNames getTestPatternNames(void)
Definition: ntv2testpatterngen.cpp:2542
NTV2_XptFrameBuffer3_DS2RGB
@ NTV2_XptFrameBuffer3_DS2RGB
Definition: ntv2enums.h:2666
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
PLNOTE
#define PLNOTE(_xpr_)
Definition: ntv2democommon.h:36
AJA_STATUS_OPEN
@ AJA_STATUS_OPEN
Definition: types.h:388
AJATimeBase::FramesToSeconds
double FramesToSeconds(int64_t frames) const
Definition: timebase.cpp:197
CNTV2DemoCommon::NTV2FrameRate2TimecodeFormat
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
Definition: ntv2democommon.cpp:1058
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
NTV2_TestPatt_LineSweep
@ NTV2_TestPatt_LineSweep
Definition: ntv2testpatterngen.h:33
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
ancillarydata_hdr_sdr.h
Declares the AJAAncillaryData_HDR_SDR class.
AJAThread::Start
virtual AJAStatus Start()
Definition: thread.cpp:91
PLFAIL
#define PLFAIL(_xpr_)
Definition: ntv2democommon.h:34
xHEX0N
#define xHEX0N(__x__, __n__)
Definition: ntv2publicinterface.h:5768
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3880
AJA_FAILURE
#define AJA_FAILURE(_status_)
Definition: types.h:371
NTV2_AUDIO_RATE_INVALID
@ NTV2_AUDIO_RATE_INVALID
Definition: ntv2enums.h:1930
gFrequencies
static const double gFrequencies[]
Definition: ntv2player8k.cpp:43
DeviceCapabilities::CanDoFrameBufferFormat
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2devicecapabilities.h:227
CNTV2Card::SetHDMIOutAudioSource8Channel
virtual bool SetHDMIOutAudioSource8Channel(const NTV2Audio8ChannelSelect inNewValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Changes the HDMI output's 8-channel audio source.
Definition: ntv2audio.cpp:935
NTV2_TestPatt_LinearRamp
@ NTV2_TestPatt_LinearRamp
Definition: ntv2testpatterngen.h:40
NTV2ChannelToAudioSystem
NTV2AudioSystem NTV2ChannelToAudioSystem(const NTV2Channel inChannel)
Converts the given NTV2Channel value into its equivalent NTV2AudioSystem.
Definition: ntv2utils.cpp:4866
AUTOCIRCULATE_TRANSFER::acANCBuffer
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
Definition: ntv2publicinterface.h:8328
NTV2FormatDescriptor::IsValid
bool IsValid(void) const
Definition: ntv2formatdescriptor.h:112
PLINFO
#define PLINFO(_xpr_)
Definition: ntv2democommon.h:37
CNTV2Card::AutoCirculateStop
virtual bool AutoCirculateStop(const NTV2Channel inChannel, const bool inAbort=(0))
Stops AutoCirculate for the given channel, and releases the on-device frame buffers that were allocat...
Definition: ntv2autocirculate.cpp:541
NTV2_ANCSIZE_MAX
#define NTV2_ANCSIZE_MAX
Definition: ntv2democommon.h:47
NTV2_XptSDIOut1Input
@ NTV2_XptSDIOut1Input
Definition: ntv2enums.h:2795
PLWARN
#define PLWARN(_xpr_)
Definition: ntv2democommon.h:35
CNTV2Card::SetSDIOutLevelAtoLevelBConversion
virtual bool SetSDIOutLevelAtoLevelBConversion(const UWord inOutputSpigot, const bool inEnable)
Enables or disables 3G level A to 3G level B conversion at the SDI output widget (assuming the AJA de...
Definition: ntv2register.cpp:4364
CRP188::GetRP188Str
bool GetRP188Str(std::string &sRP188) const
Definition: ntv2rp188.cpp:918
NTV2_TASK_MODE_INVALID
@ NTV2_TASK_MODE_INVALID
Definition: ntv2publicinterface.h:4467
NTV2_XptSDIOut3Input
@ NTV2_XptSDIOut3Input
Definition: ntv2enums.h:2799
NTV2_XptDuallinkOut4
@ NTV2_XptDuallinkOut4
Definition: ntv2enums.h:2588
NTV2TestPatternNames
NTV2StringList NTV2TestPatternNames
An ordered sequence of pattern names.
Definition: ntv2testpatterngen.h:21
NTV2Buffer::Set
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
Definition: ntv2publicinterface.cpp:1794
NTV2_XptDuallinkOut2
@ NTV2_XptDuallinkOut2
Definition: ntv2enums.h:2561
NTV2_XptDualLinkOut1Input
@ NTV2_XptDualLinkOut1Input
Definition: ntv2enums.h:2827
NTV2_XptDuallinkOut3DS2
@ NTV2_XptDuallinkOut3DS2
Definition: ntv2enums.h:2587
NTV2_OEM_TASKS
@ NTV2_OEM_TASKS
2: OEM (recommended): device configured by client application(s) with some driver involvement.
Definition: ntv2publicinterface.h:4466
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3892
timebase.h
Declares the AJATimeBase class.