AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
ntv2autocirculate.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2card.h"
9 #include "ntv2utils.h"
10 #include "ntv2rp188.h"
11 #include "ntv2endian.h"
12 #include "ajabase/system/lock.h"
13 #include "ajabase/system/debug.h"
17 #include "ajabase/common/common.h"
18 #include <iomanip>
19 #include <assert.h>
20 #include <algorithm>
21 
22 
23 using namespace std;
24 
25 #if defined(MSWindows)
26  #undef min
27 #endif
28 
29 #if 0
30  // Debug builds can clear Anc buffers during A/C capture
31  #define AJA_NTV2_CLEAR_DEVICE_ANC_BUFFER_AFTER_CAPTURE_XFER // Requires non-zero kVRegZeroDeviceAncPostCapture
32  #define AJA_NTV2_CLEAR_HOST_ANC_BUFFER_TAIL_AFTER_CAPTURE_XFER // Requires non-zero kVRegZeroHostAncPostCapture
33 #endif // _DEBUG
34 
35 // Logging Macros
36 #define ACINSTP(_p_) " " << HEX0N(uint64_t(_p_),8)
37 #define ACTHIS ACINSTP(this)
38 
39 #define ACFAIL(__x__) AJA_sERROR (AJA_DebugUnit_AutoCirculate, ACTHIS << "::" << AJAFUNC << ": " << __x__)
40 #define ACWARN(__x__) AJA_sWARNING(AJA_DebugUnit_AutoCirculate, ACTHIS << "::" << AJAFUNC << ": " << __x__)
41 #define ACNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_AutoCirculate, ACTHIS << "::" << AJAFUNC << ": " << __x__)
42 #define ACINFO(__x__) AJA_sINFO (AJA_DebugUnit_AutoCirculate, ACTHIS << "::" << AJAFUNC << ": " << __x__)
43 #define ACDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_AutoCirculate, ACTHIS << "::" << AJAFUNC << ": " << __x__)
44 
45 #define RCVFAIL(__x__) AJA_sERROR (AJA_DebugUnit_Anc2110Rcv, ACTHIS << "::" << AJAFUNC << ": " << __x__)
46 #define RCVWARN(__x__) AJA_sWARNING(AJA_DebugUnit_Anc2110Rcv, ACTHIS << "::" << AJAFUNC << ": " << __x__)
47 #define RCVNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_Anc2110Rcv, ACTHIS << "::" << AJAFUNC << ": " << __x__)
48 #define RCVINFO(__x__) AJA_sINFO (AJA_DebugUnit_Anc2110Rcv, ACTHIS << "::" << AJAFUNC << ": " << __x__)
49 #define RCVDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_Anc2110Rcv, ACTHIS << "::" << AJAFUNC << ": " << __x__)
50 
51 #define XMTFAIL(__x__) AJA_sERROR (AJA_DebugUnit_Anc2110Xmit, ACTHIS << "::" << AJAFUNC << ": " << __x__)
52 #define XMTWARN(__x__) AJA_sWARNING(AJA_DebugUnit_Anc2110Xmit, ACTHIS << "::" << AJAFUNC << ": " << __x__)
53 #define XMTNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_Anc2110Xmit, ACTHIS << "::" << AJAFUNC << ": " << __x__)
54 #define XMTINFO(__x__) AJA_sINFO (AJA_DebugUnit_Anc2110Xmit, ACTHIS << "::" << AJAFUNC << ": " << __x__)
55 #define XMTDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_Anc2110Xmit, ACTHIS << "::" << AJAFUNC << ": " << __x__)
56 
57 
58 static const char gFBAllocLockName[] = "com.aja.ntv2.mutex.FBAlloc";
59 static AJALock gFBAllocLock(gFBAllocLockName); // New in SDK 15: Global mutex to avoid device frame buffer allocation race condition
60 
61 
62 //GetFrameStamp(NTV2Crosspoint channelSpec, ULONG frameNum, FRAME_STAMP_STRUCT* pFrameStamp)
63 //When a channelSpec is autocirculating, the ISR or DPC will continously fill in a
64 // FRAME_STAMP_STRUCT for the frame it is working on.
65 // The framestamp structure is intended to give enough information to determine if frames
66 // have been dropped either on input or output. It also allows for synchronization of
67 // audio and video by stamping the audioinputaddress at the start and end of a video frame.
68 bool CNTV2Card::GetFrameStamp (NTV2Crosspoint channelSpec, ULWord frameNum, FRAME_STAMP_STRUCT* pFrameStamp)
69 {
70  // Insure that the CNTV2Card has been 'open'ed
71  if (! _boardOpened ) return false;
72 
73  // Fill in our OS independent data structure
74  AUTOCIRCULATE_DATA autoCircData (eGetFrameStamp, channelSpec);
75  autoCircData.lVal1 = LWord(frameNum);
76  autoCircData.pvVal1 = PVOID(pFrameStamp);
77 
78  // The following is ignored by Windows; it looks at the
79  // channel spec and frame num in the autoCircData instead.
80  pFrameStamp->channelSpec = channelSpec;
81  pFrameStamp->frame = frameNum;
82 
83  // Call the OS specific method
84  return AutoCirculate (autoCircData);
85 }
86 
87 // GetAutoCirculate(NTV2Crosspoint channelSpec,AUTOCIRCULATE_STATUS_STRUCT* autoCirculateStatus )
88 // Returns true if communication with the driver was successful.
89 // Passes back: whether associated channelSpec is currently autocirculating;
90 // Frame Range (Start and End); and Current Active Frame.
91 //
92 // Note that Current Active Frame is reliable,
93 // whereas reading, for example, the Ch1OutputFrame register is not reliable,
94 // because the latest-written value may or may-not have been clocked-in to the hardware.
95 // Note also that this value is valid only if bIsCirculating is true.
97 {
98  // Insure that the CNTV2Card has been 'open'ed
99  if (!_boardOpened) return false;
100 
101  // The following is ignored by Windows.
102  autoCirculateStatus -> channelSpec = channelSpec;
103 
104  // Fill in our OS independent data structure
105  AUTOCIRCULATE_DATA autoCircData (eGetAutoCirc, channelSpec);
106  autoCircData.pvVal1 = PVOID(autoCirculateStatus);
107 
108  // Call the OS specific method
109  return AutoCirculate (autoCircData);
110 }
111 
112 
113 bool CNTV2Card::FindUnallocatedFrames (const UWord inFrameCount, LWord & outStartFrame, LWord & outEndFrame, const NTV2Channel inFrameStore)
114 {
115  outStartFrame = outEndFrame = -1;
116  if (!IsOpen())
117  {ACFAIL("Not open"); return false;}
118  if (!inFrameCount)
119  {ACFAIL("Must request at least one frame"); return false;}
120 
121  // Before inventorying SDRAM, disable the framestore(s) of interest (if enabled),
122  // to maximize contiguous available free memory (since those frames will be re-utilized anyway)...
124  NTV2ChannelSet enabledFrameStores;
125  bool isQuad(false), isQuadQuad(false), wasEnabled(false);
126  if (inFrameStore != NTV2_CHANNEL_INVALID) // Caller wants to utilize a specific FrameStore?
127  {
128  NTV2Channel ch(inFrameStore);
129  while (IsChannelEnabled(ch, wasEnabled) && wasEnabled) // Is it currently enabled?
130  {
131  enabledFrameStores.insert(ch);
132  if (enabledFrameStores.size() == 1)
133  {
134  GetVideoFormat(vFmt, inFrameStore); // Get its video format
135  isQuad = NTV2_IS_QUAD_FRAME_FORMAT(vFmt); // Is quad format?
136  isQuadQuad = NTV2_IS_QUAD_QUAD_FORMAT(vFmt); // Is quad-quad format?
137  if (!isQuad && !isQuadQuad)
138  break;
139  }
140  ch = NTV2Channel(ch+1);
141  if (UWord(ch) > (UWord(inFrameStore)+1))
142  break;
143  }
144  DisableChannels(enabledFrameStores); // Temporarily disable it/them, to preclude it/them from fragmenting free memory
145  }
146 
147  // Inventory device SDRAM utilization...
148  SDRAMAuditor auditor(*this); // Using this constructor automatically excludes audio buffers from consideration, by default
149  ULWordSequence freeRgns8MB, freeRgns;
150  auditor.GetFreeRegions (freeRgns8MB);
151  if (!enabledFrameStores.empty())
152  EnableChannels(enabledFrameStores); // Restore FrameStore enabled state
153 
154  if (freeRgns8MB.empty())
155  {ACFAIL("No free regions"); return false;}
156  if (!auditor.TranslateRegions (freeRgns, freeRgns8MB, isQuad, isQuadQuad))
157  {ACFAIL("TranslateRegions failed"); return false;}
158  if (freeRgns.empty())
159  {ACFAIL("No free regions after translation"); return false;}
160 
161  // Look for first free region whose length >= inFrameCount...
162  for (size_t ndx(0); ndx < freeRgns.size(); ndx++)
163  { const ULWord val(freeRgns.at(ndx));
164  UWord startFrame(val >> 16), lengthFrames(UWord(val & 0x0000FFFF));
165  if (inFrameCount > lengthFrames) // Will it fit?
166  continue; // No, skip it
167  // Yes -- use it
168  outStartFrame = LWord(startFrame);
169  outEndFrame = LWord(startFrame + inFrameCount - 1);
170  break; // Done, found!
171  }
172  const string qstr (isQuad ? " quad" : (isQuadQuad ? " quad-quad" : ""));
173  if (outStartFrame < 0 || outEndFrame < 0)
174  {
175  #if defined(_DEBUG)
176  auditor.DumpBlocks(cerr);
177  #endif // _DEBUG
178  ostringstream dump; dump << DEC(freeRgns.size()) << " free region(s):" << endl;
179  if (!freeRgns.empty())
180  dump << " Tgt Frms 8MB Frms" << endl;
181  for (size_t ndx(0); ndx < freeRgns.size(); ndx++)
182  { ULWord rgn(freeRgns.at(ndx)), rgn8(freeRgns8MB.at(ndx));
183  UWord startBlk(rgn >> 16), numBlks(UWord(rgn & 0x0000FFFF));
184  UWord startBlk8(rgn8 >> 16), numBlks8(UWord(rgn8 & 0x0000FFFF));
185  if (numBlks > 1)
186  dump << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " ";
187  else
188  dump << "Frm " << DEC0N(startBlk,3) << " ";
189  if (numBlks8 > 1)
190  dump << DEC0N(startBlk8,3) << "-" << DEC0N(startBlk8+numBlks8-1,3) << endl;
191  else
192  dump << DEC0N(startBlk8,3) << endl;
193  }
194  ACFAIL("Cannot find " << DEC(inFrameCount) << " contiguous" << qstr << " frames in these " << dump.str());
195  return false;
196  }
197  ACINFO("Found requested " << DEC(inFrameCount) << " contiguous" << qstr << " frames (" << DEC(outStartFrame) << "-" << DEC(outEndFrame) << ")");
198  return true;
199 
200 } // FindUnallocatedFrames
201 
202 
203 // Handy function to fetch the NTV2Crosspoint for a given NTV2Channel that works with both pre & post 12.3 drivers.
204 // NOTE: This relies on the channel's NTV2Mode being correct and aligned with the driver's NTV2Crosspoint!
205 static bool GetCurrentACChannelCrosspoint (CNTV2Card & inDevice, const NTV2Channel inChannel, NTV2Crosspoint & outCrosspoint)
206 {
208  outCrosspoint = NTV2CROSSPOINT_INVALID;
209  if (!inDevice.IsOpen ())
210  return false;
211  if (!NTV2_IS_VALID_CHANNEL (inChannel))
212  return false;
213 
214  if (!inDevice.GetMode (inChannel, mode))
215  return false;
216  outCrosspoint = (mode == NTV2_MODE_DISPLAY) ? ::NTV2ChannelToOutputCrosspoint (inChannel) : ::NTV2ChannelToInputCrosspoint (inChannel);
217  return true;
218 }
219 
220 
222  const UWord inFrameCount,
223  const NTV2AudioSystem inAudioSystem,
224  const ULWord inOptionFlags,
225  const UByte inNumChannels,
226  const UWord inStartFrameNumber,
227  const UWord inEndFrameNumber)
228 {
229  if (!NTV2_IS_VALID_CHANNEL(inChannel))
230  {ACFAIL("Ch" << DEC(inChannel+1) << " is illegal channel value"); return false;} // Must be valid channel
231  if (!inNumChannels || inNumChannels > 8)
232  {ACFAIL("Input Ch" << DEC(inChannel+1) << ": illegal 'inNumChannels' value '" << DEC(inNumChannels) << "' -- must be 1-8"); return false;} // At least one channel
233  if (!gFBAllocLock.IsValid())
234  {ACFAIL("Input Ch" << DEC(inChannel+1) << ": FBAllocLock mutex not ready"); return false;} // Mutex not ready
235 
236  AJAAutoLock autoLock (&gFBAllocLock); // Avoid AutoCirculate buffer collisions
237  LWord startFrameNumber(LWord(inStartFrameNumber+0));
238  LWord endFrameNumber (LWord(inEndFrameNumber+0));
239  if (!endFrameNumber && !startFrameNumber)
240  {
241  if (!inFrameCount)
242  {ACFAIL("Input Ch" << DEC(inChannel+1) << ": Zero frames requested"); return false;}
243  if (!FindUnallocatedFrames (inFrameCount, startFrameNumber, endFrameNumber, inChannel))
244  return false;
245  }
246  else if (inFrameCount)
247  ACWARN ("Input Ch" << DEC(inChannel+1) << ": FrameCount " << DEC(inFrameCount) << " ignored -- using start/end " << DEC(inStartFrameNumber)
248  << "/" << DEC(inEndFrameNumber) << " frame numbers");
249  if (endFrameNumber < startFrameNumber) // endFrame must be > startFrame
250  {ACFAIL("Input Ch" << DEC(inChannel+1) << ": EndFrame(" << DEC(endFrameNumber) << ") precedes StartFrame(" << DEC(startFrameNumber) << ")"); return false;}
251  if ((endFrameNumber - startFrameNumber + 1) < 2) // must be at least 2 frames
252  {ACFAIL("Input Ch" << DEC(inChannel+1) << ": Frames " << DEC(startFrameNumber) << "-" << DEC(endFrameNumber) << " < 2 frames"); return false;}
253  if (startFrameNumber >= MAX_FRAMEBUFFERS)
254  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": Start frame " << DEC(startFrameNumber) << " exceeds max " << DEC(MAX_FRAMEBUFFERS-1)); return false;}
255  if (endFrameNumber >= MAX_FRAMEBUFFERS)
256  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": End frame " << DEC(endFrameNumber) << " exceeds max " << DEC(MAX_FRAMEBUFFERS-1)); return false;}
258  ACWARN("Input Ch" << DEC(inChannel+1) << ": MultiLink Audio requested, but device doesn't support it");
259  const UWord numAudSystems(UWord(GetNumSupported(kDeviceGetNumAudioSystems))); // AutoCirc cannot use AudioMixer or HostAudio
260  if (inAudioSystem != NTV2_AUDIOSYSTEM_INVALID)
261  {
262  if (numAudSystems && UWord(inAudioSystem) >= numAudSystems)
263  {ACFAIL("Invalid audio system specified: AudSys" << DEC(inAudioSystem+1) << " -- exceeds max legal AudSys" << DEC(numAudSystems)); return false;}
264  }
265 
266  // Fill in our OS independent data structure...
268  autoCircData.lVal1 = startFrameNumber;
269  autoCircData.lVal2 = endFrameNumber;
270  autoCircData.lVal3 = inAudioSystem;
271  if (inOptionFlags & AUTOCIRCULATE_WITH_MULTILINK_AUDIO1)
272  autoCircData.lVal3 |= NTV2_AUDIOSYSTEM_Plus1;
273  if (inOptionFlags & AUTOCIRCULATE_WITH_MULTILINK_AUDIO2)
274  autoCircData.lVal3 |= NTV2_AUDIOSYSTEM_Plus2;
275  if (inOptionFlags & AUTOCIRCULATE_WITH_MULTILINK_AUDIO3)
276  autoCircData.lVal3 |= NTV2_AUDIOSYSTEM_Plus3;
277  autoCircData.lVal4 = inNumChannels;
278  if (inOptionFlags & AUTOCIRCULATE_WITH_FIELDS)
279  autoCircData.lVal6 |= AUTOCIRCULATE_WITH_FIELDS;
280  if (inOptionFlags & AUTOCIRCULATE_WITH_HDMIAUX)
281  autoCircData.lVal6 |= AUTOCIRCULATE_WITH_HDMIAUX;
282  if (inOptionFlags & AUTOCIRCULATE_WITH_AUDIO_CONTROL)
283  autoCircData.bVal1 = false;
284  else
285  autoCircData.bVal1 = NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem) ? true : false;
286  autoCircData.bVal2 = inOptionFlags & AUTOCIRCULATE_WITH_RP188 ? true : false;
287  autoCircData.bVal3 = inOptionFlags & AUTOCIRCULATE_WITH_FBFCHANGE ? true : false;
288  autoCircData.bVal4 = inOptionFlags & AUTOCIRCULATE_WITH_FBOCHANGE ? true : false;
289  autoCircData.bVal5 = inOptionFlags & AUTOCIRCULATE_WITH_COLORCORRECT ? true : false;
290  autoCircData.bVal6 = inOptionFlags & AUTOCIRCULATE_WITH_VIDPROC ? true : false;
291  autoCircData.bVal7 = inOptionFlags & AUTOCIRCULATE_WITH_ANC ? true : false;
292  autoCircData.bVal8 = inOptionFlags & AUTOCIRCULATE_WITH_LTC ? true : false;
293 
294  const bool result (AutoCirculate(autoCircData)); // Call the OS-specific method
295  if (result)
296  { // Success!
297  #if 1
298  // Warn about interference from other channels...
299  ULWordSequence badRgns;
300  SDRAMAuditor auditor(*this);
301  auditor.GetBadRegions(badRgns);
302  for (size_t ndx(0); ndx < badRgns.size(); ndx++)
303  { const ULWord rgnInfo(badRgns.at(ndx));
304  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
305  NTV2StringSet tags;
306  auditor.GetTagsForFrameIndex (startBlk, tags);
307  const string infoStr (aja::join(tags, ", "));
308  ostringstream acLabel; acLabel << "AC" << DEC(inChannel+1); // Search for label e.g. "AC2"
309  if (infoStr.find(acLabel.str()) != string::npos)
310  { ostringstream warning;
311  if (numBlks > 1)
312  warning << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3);
313  else
314  warning << "Frm " << DEC0N(startBlk,3);
315  ACWARN("Input Ch" << DEC(inChannel+1) << ": memory overlap/interference: " << warning.str() << ": " << infoStr);
316  }
317  } // for each "bad" region
318  #endif
319  #if 1
320  { AUTOCIRCULATE_STATUS stat;
321  if (AutoCirculateGetStatus (inChannel, stat) && !stat.IsStopped() && stat.WithAudio())
322  { // Not stopped and AutoCirculating audio -- check if audio buffer capacity will be exceeded...
323  ULWord audChlsPerSample(0);
326  GetNumberAudioChannels (audChlsPerSample, stat.GetAudioSystem());
327  if (GetFrameRate (fr, inChannel) && NTV2_IS_SUPPORTED_NTV2FrameRate(fr))
328  if (GetAudioRate (ar, stat.GetAudioSystem()) && NTV2_IS_VALID_AUDIO_RATE(ar))
329  {
330  const double framesPerSecond (double(::GetScaleFromFrameRate(fr)) / 100.00);
331  const double samplesPerSecond (double(::GetAudioSamplesPerSecond(ar)));
332  const double bytesPerChannel (4.0);
333  const double channelsPerSample (double(audChlsPerSample+0));
334  const double bytesPerFrame (samplesPerSecond * bytesPerChannel * channelsPerSample / framesPerSecond);
335  const ULWord maxVideoFrames (4UL * 1024UL * 1024UL / ULWord(bytesPerFrame));
336  if (stat.GetFrameCount() > maxVideoFrames)
337  ACWARN("Input Ch" << DEC(inChannel+1) << ": " << DEC(stat.GetFrameCount()) << " frames ("
338  << DEC(stat.GetStartFrame()) << "-" << DEC(stat.GetEndFrame()) << ") exceeds "
339  << DEC(maxVideoFrames) << "-frame max buffer capacity of AudSys" << DEC(stat.GetAudioSystem()+1));
340  }
341  }
342  }
343  #endif
344  ACINFO("Input Ch" << DEC(inChannel+1) << " initialized using frames " << DEC(startFrameNumber) << "-" << DEC(endFrameNumber));
345  }
346  else
347  ACFAIL("Input Ch" << DEC(inChannel+1) << " initialization failed");
348  return result;
349 
350 } // AutoCirculateInitForInput
351 
352 
354  const UWord inFrameCount,
355  const NTV2AudioSystem inAudioSystem,
356  const ULWord inOptionFlags,
357  const UByte inNumChannels,
358  const UWord inStartFrameNumber,
359  const UWord inEndFrameNumber)
360 {
361  if (!NTV2_IS_VALID_CHANNEL(inChannel))
362  {ACFAIL("Ch" << DEC(inChannel+1) << " is illegal channel value"); return false;} // Must be valid channel
363  if (!inNumChannels || inNumChannels > 8)
364  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": illegal 'inNumChannels' value '" << DEC(inNumChannels) << "' -- must be 1-8"); return false;} // At least one channel
365  if (!gFBAllocLock.IsValid())
366  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": FBAllocLock mutex not ready"); return false;} // Mutex not ready
367 
368  AJAAutoLock autoLock (&gFBAllocLock); // Avoid AutoCirculate buffer collisions
369  LWord startFrameNumber(LWord(inStartFrameNumber+0));
370  LWord endFrameNumber (LWord(inEndFrameNumber+0));
371  if (!endFrameNumber && !startFrameNumber)
372  {
373  if (!inFrameCount)
374  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": Zero frames requested"); return false;}
375  if (!FindUnallocatedFrames (inFrameCount, startFrameNumber, endFrameNumber, inChannel))
376  return false;
377  }
378  else if (inFrameCount)
379  ACWARN ("Output Ch" << DEC(inChannel+1) << ": FrameCount " << DEC(inFrameCount) << " ignored -- using start/end "
380  << DEC(inStartFrameNumber) << "/" << DEC(inEndFrameNumber) << " frame numbers");
381  if (endFrameNumber < startFrameNumber) // endFrame must be > startFrame
382  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": EndFrame(" << DEC(endFrameNumber) << ") precedes StartFrame("
383  << DEC(startFrameNumber) << ")"); return false;}
384  if ((endFrameNumber - startFrameNumber + 1) < 2) // must be at least 2 frames
385  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": Frames " << DEC(startFrameNumber) << "-" << DEC(endFrameNumber) << " < 2 frames"); return false;}
386  if (startFrameNumber >= MAX_FRAMEBUFFERS)
387  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": Start frame " << DEC(startFrameNumber) << " exceeds max " << DEC(MAX_FRAMEBUFFERS-1)); return false;}
388  if (endFrameNumber >= MAX_FRAMEBUFFERS)
389  {ACFAIL("Output Ch" << DEC(inChannel+1) << ": End frame " << DEC(endFrameNumber) << " exceeds max " << DEC(MAX_FRAMEBUFFERS-1)); return false;}
391  ACWARN("Output Ch" << DEC(inChannel+1) << ": MultiLink Audio requested, but device doesn't support it");
392  const UWord numAudSystems(UWord(GetNumSupported(kDeviceGetNumAudioSystems))); // AutoCirc cannot use AudioMixer or HostAudio
393  if (inAudioSystem != NTV2_AUDIOSYSTEM_INVALID)
394  {
395  if (numAudSystems && UWord(inAudioSystem) >= numAudSystems)
396  {ACFAIL("Invalid audio system specified: AudSys" << DEC(inAudioSystem+1) << " -- exceeds max legal AudSys" << DEC(numAudSystems)); return false;}
397  }
398 
399  // Warn about "with anc" and VANC mode...
400  if (inOptionFlags & AUTOCIRCULATE_WITH_ANC)
401  {
403  if (GetVANCMode(vancMode, inChannel) && NTV2_IS_VANCMODE_ON(vancMode))
404  ACWARN("Output Ch" << DEC(inChannel+1) << "AUTOCIRCULATE_WITH_ANC set, but also has "
405  << ::NTV2VANCModeToString(vancMode) << " set -- this may cause anc insertion problems");
406  }
407 
408  // Fill in our OS independent data structure...
410  autoCircData.lVal1 = startFrameNumber;
411  autoCircData.lVal2 = endFrameNumber;
412  autoCircData.lVal3 = inAudioSystem;
413  if (inOptionFlags & AUTOCIRCULATE_WITH_MULTILINK_AUDIO1)
414  autoCircData.lVal3 |= NTV2_AUDIOSYSTEM_Plus1;
415  if (inOptionFlags & AUTOCIRCULATE_WITH_MULTILINK_AUDIO2)
416  autoCircData.lVal3 |= NTV2_AUDIOSYSTEM_Plus2;
417  if (inOptionFlags & AUTOCIRCULATE_WITH_MULTILINK_AUDIO3)
418  autoCircData.lVal3 |= NTV2_AUDIOSYSTEM_Plus3;
419  autoCircData.lVal4 = inNumChannels;
420  if (inOptionFlags & AUTOCIRCULATE_WITH_FIELDS)
421  autoCircData.lVal6 |= AUTOCIRCULATE_WITH_FIELDS;
422  if (inOptionFlags & AUTOCIRCULATE_WITH_HDMIAUX)
423  autoCircData.lVal6 |= AUTOCIRCULATE_WITH_HDMIAUX;
424  if (inOptionFlags & AUTOCIRCULATE_WITH_AUDIO_CONTROL)
425  autoCircData.bVal1 = false;
426  else
427  autoCircData.bVal1 = NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem) ? true : false;
428  autoCircData.bVal2 = (inOptionFlags & AUTOCIRCULATE_WITH_RP188) ? true : false;
429  autoCircData.bVal3 = (inOptionFlags & AUTOCIRCULATE_WITH_FBFCHANGE) ? true : false;
430  autoCircData.bVal4 = (inOptionFlags & AUTOCIRCULATE_WITH_FBOCHANGE) ? true : false;
431  autoCircData.bVal5 = (inOptionFlags & AUTOCIRCULATE_WITH_COLORCORRECT) ? true : false;
432  autoCircData.bVal6 = (inOptionFlags & AUTOCIRCULATE_WITH_VIDPROC) ? true : false;
433  autoCircData.bVal7 = (inOptionFlags & AUTOCIRCULATE_WITH_ANC) ? true : false;
434  autoCircData.bVal8 = (inOptionFlags & AUTOCIRCULATE_WITH_LTC) ? true : false;
435  if (IsSupported(kDeviceCanDo2110)) // If S2110 IP device...
436  if (inOptionFlags & AUTOCIRCULATE_WITH_RP188) // and caller wants RP188
437  if (!(inOptionFlags & AUTOCIRCULATE_WITH_ANC)) // but caller failed to enable Anc playout
438  {
439  autoCircData.bVal7 = true; // Enable Anc insertion anyway
440  ACWARN("Output Ch" << DEC(inChannel+1)
441  << ": AUTOCIRCULATE_WITH_RP188 requested without AUTOCIRCULATE_WITH_ANC -- enabled AUTOCIRCULATE_WITH_ANC anyway");
442  }
443 
444  const bool result (AutoCirculate(autoCircData)); // Call the OS-specific method
445  if (result)
446  { // Success!
447  #if 1
448  // Warn about interference from other channels...
449  ULWordSequence badRgns;
450  SDRAMAuditor auditor(*this);
451  auditor.GetBadRegions(badRgns);
452  for (size_t ndx(0); ndx < badRgns.size(); ndx++)
453  { const ULWord rgnInfo(badRgns.at(ndx));
454  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
455  NTV2StringSet tags;
456  auditor.GetTagsForFrameIndex (startBlk, tags);
457  const string infoStr (aja::join(tags, ", "));
458  ostringstream acLabel; acLabel << "AC" << DEC(inChannel+1); // Search for label e.g. "AC2"
459  if (infoStr.find(acLabel.str()) != string::npos)
460  { ostringstream warning;
461  if (numBlks > 1)
462  warning << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3);
463  else
464  warning << "Frm " << DEC0N(startBlk,3);
465  ACWARN("Output Ch" << DEC(inChannel+1) << ": memory overlap/interference: " << warning.str() << ": " << infoStr);
466  }
467  } // for each "bad" region
468  #endif
469  #if 1
470  { AUTOCIRCULATE_STATUS stat;
471  if (AutoCirculateGetStatus (inChannel, stat) && !stat.IsStopped() && stat.WithAudio())
472  { // Not stopped and AutoCirculating audio -- check if audio buffer capacity will be exceeded...
473  ULWord audChlsPerSample(0);
476  GetNumberAudioChannels (audChlsPerSample, stat.GetAudioSystem());
477  if (GetFrameRate (fr, inChannel) && NTV2_IS_SUPPORTED_NTV2FrameRate(fr))
478  if (GetAudioRate (ar, stat.GetAudioSystem()) && NTV2_IS_VALID_AUDIO_RATE(ar))
479  {
480  const double framesPerSecond (double(::GetScaleFromFrameRate(fr)) / 100.00);
481  const double samplesPerSecond (double(::GetAudioSamplesPerSecond(ar)));
482  const double bytesPerChannel (4.0);
483  const double channelsPerSample (double(audChlsPerSample+0));
484  const double bytesPerFrame (samplesPerSecond * bytesPerChannel * channelsPerSample / framesPerSecond);
485  const ULWord maxVideoFrames (4UL * 1024UL * 1024UL / ULWord(bytesPerFrame));
486  if (stat.GetFrameCount() > maxVideoFrames)
487  ACWARN("Output Ch" << DEC(inChannel+1) << ": " << DEC(stat.GetFrameCount()) << " frames ("
488  << DEC(stat.GetStartFrame()) << "-" << DEC(stat.GetEndFrame()) << ") exceeds "
489  << DEC(maxVideoFrames) << "-frame max buffer capacity of AudSys" << DEC(stat.GetAudioSystem()+1));
490  }
491  }
492  }
493  #endif
494  ACINFO("Output Ch" << DEC(inChannel+1) << " initialized using frames " << DEC(startFrameNumber) << "-" << DEC(endFrameNumber));
495  }
496  else
497  ACFAIL("Output Ch" << DEC(inChannel+1) << " initialization failed");
498  return result;
499 
500 } // AutoCirculateInitForOutput
501 
502 
503 bool CNTV2Card::AutoCirculateStart (const NTV2Channel inChannel, const ULWord64 inStartTime)
504 {
505  AUTOCIRCULATE_DATA autoCircData (inStartTime ? eStartAutoCircAtTime : eStartAutoCirc);
506  autoCircData.lVal1 = LWord(inStartTime >> 32);
507  autoCircData.lVal2 = LWord(inStartTime & 0xFFFFFFFF);
508  if (!GetCurrentACChannelCrosspoint (*this, inChannel, autoCircData.channelSpec))
509  return false;
510  const bool result (AutoCirculate(autoCircData));
511  if (result)
512  ACINFO("Started Ch" << DEC(inChannel+1));
513  else
514  ACFAIL("Failed to start Ch" << DEC(inChannel+1));
515  return result;
516 }
517 
518 
519 bool CNTV2Card::AutoCirculateStop (const NTV2Channel inChannel, const bool inAbort)
520 {
521  if (!NTV2_IS_VALID_CHANNEL (inChannel))
522  return false;
523 
524  const AUTO_CIRC_COMMAND acCommand (inAbort ? eAbortAutoCirc : eStopAutoCirc);
525  AUTOCIRCULATE_DATA stopInput (acCommand, ::NTV2ChannelToInputCrosspoint (inChannel));
526  AUTOCIRCULATE_DATA stopOutput (acCommand, ::NTV2ChannelToOutputCrosspoint (inChannel));
528  AUTOCIRCULATE_STATUS acStatus;
529 
530  // Stop input or output A/C using the old driver call...
531  const bool stopInputFailed (!AutoCirculate (stopInput));
532  const bool stopOutputFailed (!AutoCirculate (stopOutput));
533  if (stopInputFailed && stopOutputFailed)
534  {
535  ACFAIL("Failed to stop Ch" << DEC(inChannel+1));
536  return false; // Both failed
537  }
538  if (inAbort)
539  {
540  ACINFO("Aborted Ch" << DEC(inChannel+1));
541  return true; // In abort case, no more to do!
542  }
543 
544  // Wait until driver changes AC state to DISABLED...
545  bool result (GetMode(inChannel, mode));
546  if (NTV2_IS_INPUT_MODE(mode))
547  WaitForInputFieldID(NTV2_FIELD0, inChannel);
548  if (NTV2_IS_OUTPUT_MODE(mode))
549  WaitForOutputFieldID(NTV2_FIELD0, inChannel);
550  if (AutoCirculateGetStatus(inChannel, acStatus) && acStatus.acState != NTV2_AUTOCIRCULATE_DISABLED)
551  {
552  ACWARN("Failed to stop Ch" << DEC(inChannel+1) << " -- retrying with ABORT");
553  return AutoCirculateStop(inChannel, true); // something's wrong -- abort (WARNING: RECURSIVE CALL!)
554  }
555  ACINFO("Stopped Ch" << DEC(inChannel+1));
556  return result;
557 
558 } // AutoCirculateStop
559 
560 
561 bool CNTV2Card::AutoCirculateStop (const NTV2ChannelSet & inChannels, const bool inAbort)
562 { UWord failures(0);
563  for (NTV2ChannelSetConstIter it(inChannels.begin()); it != inChannels.end(); ++it)
564  if (!AutoCirculateStop(*it, inAbort))
565  failures++;
566  return !failures;
567 }
568 
569 
570 bool CNTV2Card::AutoCirculatePause (const NTV2Channel inChannel, const UWord inAtFrameNum)
571 { (void) inAtFrameNum;
572  // Use the old A/C driver call...
573  AUTOCIRCULATE_DATA autoCircData (ePauseAutoCirc);
574  autoCircData.bVal1 = false;
575  if (!GetCurrentACChannelCrosspoint (*this, inChannel, autoCircData.channelSpec))
576  return false;
577 
578  // FUTURE: pass inAtFrameNum
579  // if (inAtFrameNum != 0xFFFF)
580  // autoCircData.lVal6 = LWord(inAtFrameNum);
581  const bool result(AutoCirculate(autoCircData));
582  if (result)
583  ACINFO("Paused Ch" << DEC(inChannel+1));
584  else
585  ACFAIL("Failed to pause Ch" << DEC(inChannel+1));
586  return result;
587 
588 } // AutoCirculatePause
589 
590 
591 bool CNTV2Card::AutoCirculateResume (const NTV2Channel inChannel, const bool inClearDropCount)
592 {
593  // Use the old A/C driver call...
594  AUTOCIRCULATE_DATA autoCircData (ePauseAutoCirc);
595  autoCircData.bVal1 = true;
596  autoCircData.bVal2 = inClearDropCount;
597  if (!GetCurrentACChannelCrosspoint (*this, inChannel, autoCircData.channelSpec))
598  return false;
599 
600  const bool result(AutoCirculate(autoCircData));
601  if (result)
602  ACINFO("Resumed Ch" << DEC(inChannel+1));
603  else
604  ACFAIL("Failed to resume Ch" << DEC(inChannel+1));
605  return result;
606 
607 } // AutoCirculateResume
608 
609 
610 bool CNTV2Card::AutoCirculateFlush (const NTV2Channel inChannel, const bool inClearDropCount)
611 {
612  // Use the old A/C driver call...
614  autoCircData.bVal1 = inClearDropCount;
615  if (!GetCurrentACChannelCrosspoint (*this, inChannel, autoCircData.channelSpec))
616  return false;
617 
618  const bool result(AutoCirculate(autoCircData));
619  if (result)
620  ACINFO("Flushed Ch" << DEC(inChannel+1) << ", " << (inClearDropCount?"cleared":"retained") << " drop count");
621  else
622  ACFAIL("Failed to flush Ch" << DEC(inChannel+1));
623  return result;
624 
625 } // AutoCirculateFlush
626 
627 
628 bool CNTV2Card::AutoCirculatePreRoll (const NTV2Channel inChannel, const ULWord inPreRollFrames)
629 {
630  // Use the old A/C driver call...
632  autoCircData.lVal1 = LWord(inPreRollFrames);
633  if (!GetCurrentACChannelCrosspoint (*this, inChannel, autoCircData.channelSpec))
634  return false;
635 
636  const bool result(AutoCirculate(autoCircData));
637  if (result)
638  ACINFO("Prerolled " << DEC(inPreRollFrames) << " frame(s) on Ch" << DEC(inChannel+1));
639  else
640  ACFAIL("Failed to preroll " << DEC(inPreRollFrames) << " frame(s) on Ch" << DEC(inChannel+1));
641  return result;
642 
643 } // AutoCirculatePreRoll
644 
645 
647 {
648  outStatus.Clear ();
649  if (!GetCurrentACChannelCrosspoint (*this, inChannel, outStatus.acCrosspoint))
650  return false;
651 
653  {
654  const AUTOCIRCULATE_STATUS notRunningStatus (::NTV2ChannelToOutputCrosspoint (inChannel));
655  outStatus = notRunningStatus;
656  return true; // AutoCirculate not running on this channel
657  }
658 
659  const bool result(NTV2Message(outStatus));
660  if (!result)
661  ACFAIL("Failed to get status on Ch" << DEC(inChannel+1));
662  return result;
663 
664 } // AutoCirculateGetStatus
665 
666 
667 bool CNTV2Card::AutoCirculateGetFrameStamp (const NTV2Channel inChannel, const ULWord inFrameNum, FRAME_STAMP & outFrameStamp)
668 {
669  // Use the new driver call...
670  outFrameStamp.acFrameTime = LWord64 (inChannel);
671  outFrameStamp.acRequestedFrame = inFrameNum;
672  return NTV2Message(outFrameStamp);
673 
674 } // AutoCirculateGetFrameStamp
675 
676 
677 bool CNTV2Card::AutoCirculateSetActiveFrame (const NTV2Channel inChannel, const ULWord inNewActiveFrame)
678 {
679  // Use the old A/C driver call...
680  AUTOCIRCULATE_DATA autoCircData (eSetActiveFrame);
681  autoCircData.lVal1 = LWord(inNewActiveFrame);
682  if (!GetCurrentACChannelCrosspoint (*this, inChannel, autoCircData.channelSpec))
683  return false;
684 
685  const bool result(AutoCirculate(autoCircData));
686  if (result)
687  ACINFO("Set active frame to " << DEC(inNewActiveFrame) << " on Ch" << DEC(inChannel+1));
688  else
689  ACFAIL("Failed to set active frame to " << DEC(inNewActiveFrame) << " on Ch" << DEC(inChannel+1));
690  return result;
691 
692 } // AutoCirculateSetActiveFrame
693 
694 
696 {
697  if (!_boardOpened)
698  return false;
699  #if defined(_DEBUG)
700  NTV2_ASSERT (inOutXferInfo.NTV2_IS_STRUCT_VALID ());
701  #endif
702 
705  if (!GetCurrentACChannelCrosspoint (*this, inChannel, crosspoint))
706  return false;
707  if (!NTV2_IS_VALID_NTV2CROSSPOINT(crosspoint))
708  return false;
709  GetEveryFrameServices(taskMode);
710 
711  if (NTV2_IS_INPUT_CROSSPOINT(crosspoint))
712  inOutXferInfo.acTransferStatus.acFrameStamp.acTimeCodes.Fill(ULWord(0xFFFFFFFF)); // Invalidate old timecodes
713  else if (NTV2_IS_OUTPUT_CROSSPOINT(crosspoint))
714  {
715  bool isProgressive (false);
716  IsProgressiveStandard(isProgressive, inChannel);
717  if (inOutXferInfo.acRP188.IsValid())
718  inOutXferInfo.SetAllOutputTimeCodes(inOutXferInfo.acRP188, /*alsoSetF2*/!isProgressive);
719 
720  const NTV2_RP188 * pArray (reinterpret_cast <const NTV2_RP188*>(inOutXferInfo.acOutputTimeCodes.GetHostPointer()));
721  if (pArray && pArray[NTV2_TCINDEX_DEFAULT].IsValid())
722  inOutXferInfo.SetAllOutputTimeCodes(pArray[NTV2_TCINDEX_DEFAULT], /*alsoSetF2*/!isProgressive);
723  }
724 
725  bool tmpLocalF1AncBuffer(false), tmpLocalF2AncBuffer(false);
726  NTV2Buffer savedAncF1, savedAncF2;
727  if (IsSupported(kDeviceCanDo2110) && NTV2_IS_OUTPUT_CROSSPOINT(crosspoint))
728  {
729  // S2110 Playout: So that most Retail & OEM playout apps "just work" with S2110 RTP Anc streams,
730  // our classic SDI Anc data that device firmware normally embeds into SDI output
731  // as derived from registers -- VPID & RP188 -- the SDK here automatically inserts
732  // these packets into the outgoing RTP streams, even if the client didn't provide
733  // Anc buffers in the AUTOCIRCULATE_TRANSFER object, or specify AUTOCIRCULATE_WITH_ANC.
734  ULWord F1OffsetFromBottom(0), F2OffsetFromBottom(0);
735  size_t F1SizeInBytes(0), F2SizeInBytes(0);
736  if (GetAncRegionOffsetFromBottom(F1OffsetFromBottom, NTV2_AncRgn_Field1)
737  && GetAncRegionOffsetFromBottom(F2OffsetFromBottom, NTV2_AncRgn_Field2))
738  {
739  F2SizeInBytes = size_t(F2OffsetFromBottom);
740  if (F2OffsetFromBottom < F1OffsetFromBottom)
741  F1SizeInBytes = size_t(F1OffsetFromBottom - F2OffsetFromBottom);
742  else
743  F1SizeInBytes = size_t(F2OffsetFromBottom - F1OffsetFromBottom);
744  }
745  if ((_boardID == DEVICE_ID_IOIP_2110) || (_boardID == DEVICE_ID_IOIP_2110_RGB12))
746  { // IoIP 2110 Playout requires room for RTP+GUMP per anc buffer, to also operate SDI5 Mon output
747  ULWord F1MonOffsetFromBottom(0), F2MonOffsetFromBottom(0);
748  const bool good (GetAncRegionOffsetFromBottom(F1MonOffsetFromBottom, NTV2_AncRgn_MonField1)
749  && GetAncRegionOffsetFromBottom(F2MonOffsetFromBottom, NTV2_AncRgn_MonField2));
750  if (good // Driver expects anc regions in this order (from bottom): F2Mon, F2, F1Mon, F1
751  && F2MonOffsetFromBottom < F2OffsetFromBottom
752  && F2OffsetFromBottom < F1MonOffsetFromBottom
753  && F1MonOffsetFromBottom < F1OffsetFromBottom)
754  {
755  F1SizeInBytes = size_t(F1OffsetFromBottom - F2OffsetFromBottom);
756  F2SizeInBytes = size_t(F2OffsetFromBottom);
757  }
758  else
759  { // Anc regions out of order!
760  XMTWARN("IoIP 2110 playout anc rgns disordered (offsets from bottom): F2Mon=" << HEX0N(F2MonOffsetFromBottom,8)
761  << " F2=" << HEX0N(F2OffsetFromBottom,8) << " F1Mon=" << HEX0N(F1MonOffsetFromBottom,8)
762  << " F1=" << HEX0N(F1OffsetFromBottom,8));
763  F1SizeInBytes = F2SizeInBytes = 0; // Out of order, don't do Anc
764  }
765  savedAncF1 = inOutXferInfo.acANCBuffer; // copy
766  savedAncF2 = inOutXferInfo.acANCField2Buffer; // copy
767  if (inOutXferInfo.acANCBuffer.GetByteCount() < F1SizeInBytes)
768  { // Enlarge acANCBuffer, and copy everything from savedAncF1 into it...
769  inOutXferInfo.acANCBuffer.Allocate(F1SizeInBytes);
770  inOutXferInfo.acANCBuffer.Fill(uint64_t(0));
771  inOutXferInfo.acANCBuffer.CopyFrom(savedAncF1, 0, 0, savedAncF1.GetByteCount());
772  }
773  if (inOutXferInfo.acANCField2Buffer.GetByteCount() < F2SizeInBytes)
774  { // Enlarge acANCField2Buffer, and copy everything from savedAncF2 into it...
775  inOutXferInfo.acANCField2Buffer.Allocate(F2SizeInBytes);
776  inOutXferInfo.acANCField2Buffer.Fill(uint64_t(0));
777  inOutXferInfo.acANCField2Buffer.CopyFrom(savedAncF2, 0, 0, savedAncF2.GetByteCount());
778  }
779  } // if IoIP 2110 playout
780  else
781  { // else KonaIP 2110 playout
782  if (inOutXferInfo.acANCBuffer.IsNULL())
783  tmpLocalF1AncBuffer = inOutXferInfo.acANCBuffer.Allocate(F1SizeInBytes);
784  else
785  savedAncF1 = inOutXferInfo.acANCBuffer; // copy
786  if (inOutXferInfo.acANCField2Buffer.IsNULL())
787  tmpLocalF2AncBuffer = inOutXferInfo.acANCField2Buffer.Allocate(F2SizeInBytes);
788  else
789  savedAncF2 = inOutXferInfo.acANCField2Buffer; // copy
790  } // else KonaIP 2110 playout
791  S2110DeviceAncToXferBuffers(inChannel, inOutXferInfo);
792  } // if SMPTE 2110 playout
793  else if (IsSupported(kDeviceCanDo2110) && NTV2_IS_INPUT_CROSSPOINT(crosspoint))
794  { // Need local host buffers to receive 2110 Anc VPID & ATC
795  if (inOutXferInfo.acANCBuffer.IsNULL())
796  tmpLocalF1AncBuffer = inOutXferInfo.acANCBuffer.Allocate(2048);
797  if (inOutXferInfo.acANCField2Buffer.IsNULL())
798  tmpLocalF2AncBuffer = inOutXferInfo.acANCField2Buffer.Allocate(2048);
799  } // if SMPTE 2110 capture
800 
802  // Call the driver...
803  inOutXferInfo.acCrosspoint = crosspoint;
804  bool result = NTV2Message(inOutXferInfo);
806 
807  if (result && NTV2_IS_INPUT_CROSSPOINT(crosspoint))
808  {
809  if (IsSupported(kDeviceCanDo2110))
810  { // S2110: decode VPID and timecode anc packets from RTP, and put into A/C Xfer and device regs
811  S2110DeviceAncFromXferBuffers(inChannel, inOutXferInfo);
812  }
813  if (taskMode == NTV2_STANDARD_TASKS)
814  {
815  // After 12.? shipped, we discovered problems with timecode capture in our classic retail stuff.
816  // The acTimeCodes[NTV2_TCINDEX_DEFAULT] was coming up empty.
817  // Rather than fix all three drivers -- the Right, but Difficult Thing To Do --
818  // we decided to do the Easy Thing, here, in user-space.
819 
820  // First, determine the ControlPanel's current Input source (SDIIn1/HDMIIn1 or SDIIn2/HDMIIn2)...
821  ULWord inputSelect (NTV2_Input1Select);
822  ReadRegister (kVRegInputSelect, inputSelect);
823  const bool bIsInput2 (inputSelect == NTV2_Input2Select);
824 
825  // Next, determine the ControlPanel's current TimeCode source (LTC? VITC1? VITC2)...
828 
829  // Now convert that into an NTV2TCIndex...
830  NTV2TCIndex TimecodeIndex = NTV2_TCINDEX_DEFAULT;
831  switch (TimecodeSource)
832  {
833  default:/*kRP188SourceEmbeddedLTC:*/TimecodeIndex = bIsInput2 ? NTV2_TCINDEX_SDI2_LTC : NTV2_TCINDEX_SDI1_LTC; break;
834  case kRP188SourceEmbeddedVITC1: TimecodeIndex = bIsInput2 ? NTV2_TCINDEX_SDI2 : NTV2_TCINDEX_SDI1; break;
835  case kRP188SourceEmbeddedVITC2: TimecodeIndex = bIsInput2 ? NTV2_TCINDEX_SDI2_2 : NTV2_TCINDEX_SDI1_2; break;
836  case kRP188SourceLTCPort: TimecodeIndex = NTV2_TCINDEX_LTC1; break;
837  }
838 
839  // Fetch the TimeCode value that's in that NTV2TCIndex slot...
840  NTV2_RP188 tcValue;
841  inOutXferInfo.GetInputTimeCode(tcValue, TimecodeIndex);
842  if (TimecodeIndex == NTV2_TCINDEX_LTC1)
843  { // Special case for external LTC:
844  // Our driver currently returns all-zero DBB values for external LTC.
845  // It should probably at least set DBB BIT(17) "selected RP188 received" if external LTC is present.
846  // Ticket 3367: Our QuickTime 'vdig' relies on DBB BIT(17) being set, or it assumes timecode is invalid
847  if (tcValue.fLo && tcValue.fHi && tcValue.fLo != 0xFFFFFFFF && tcValue.fHi != 0xFFFFFFFF)
848  tcValue.fDBB |= 0x00020000;
849  }
850 
851  // Valid or not, stuff that TimeCode value into inOutXferInfo.acTransferStatus.acFrameStamp.acTimeCodes[NTV2_TCINDEX_DEFAULT]...
852  NTV2_RP188 * pArray (reinterpret_cast <NTV2_RP188 *> (inOutXferInfo.acTransferStatus.acFrameStamp.acTimeCodes.GetHostPointer()));
853  if (pArray)
854  pArray [NTV2_TCINDEX_DEFAULT] = tcValue;
855  } // if retail mode
856  } // if NTV2Message OK && capturing
857  if (result && NTV2_IS_OUTPUT_CROSSPOINT(crosspoint))
858  {
859  if (savedAncF1)
860  inOutXferInfo.acANCBuffer = savedAncF1; // restore
861  if (savedAncF2)
862  inOutXferInfo.acANCField2Buffer = savedAncF2; // restore
863  } // if successful playout
864 
865  if (tmpLocalF1AncBuffer)
866  inOutXferInfo.acANCBuffer.Deallocate();
867  if (tmpLocalF2AncBuffer)
868  inOutXferInfo.acANCField2Buffer.Deallocate();
869 
870  #if defined (AJA_NTV2_CLEAR_DEVICE_ANC_BUFFER_AFTER_CAPTURE_XFER)
871  if (result && NTV2_IS_INPUT_CROSSPOINT(crosspoint))
872  {
873  ULWord doZeroing (0);
874  if (ReadRegister(kVRegZeroDeviceAncPostCapture, doZeroing) && doZeroing)
875  { // Zero out the Anc buffer on the device...
876  static NTV2Buffer gClearDeviceAncBuffer;
877  const LWord xferFrame (inOutXferInfo.GetTransferFrameNumber());
878  ULWord ancOffsetF1 (0);
879  ULWord ancOffsetF2 (0);
881  ReadRegister(kVRegAncField1Offset, ancOffsetF1);
882  ReadRegister(kVRegAncField2Offset, ancOffsetF2);
883  GetFrameBufferSize(inChannel, fbSize);
884  const ULWord fbByteCount (::NTV2FramesizeToByteCount(fbSize));
885  const ULWord ancOffset (ancOffsetF2 > ancOffsetF1 ? ancOffsetF2 : ancOffsetF1); // Use whichever is larger
886  NTV2_ASSERT (xferFrame != -1);
887  if (gClearDeviceAncBuffer.IsNULL() || (gClearDeviceAncBuffer.GetByteCount() != ancOffset))
888  {
889  gClearDeviceAncBuffer.Allocate(ancOffset); // Allocate it
890  gClearDeviceAncBuffer.Fill (ULWord(0)); // Clear it
891  }
892  if (xferFrame != -1 && fbByteCount && !gClearDeviceAncBuffer.IsNULL())
893  DMAWriteSegments (ULWord(xferFrame),
894  reinterpret_cast<ULWord*>(gClearDeviceAncBuffer.GetHostPointer()), // host buffer
895  fbByteCount - ancOffset, // device memory offset, in bytes
896  gClearDeviceAncBuffer.GetByteCount(), // total number of bytes to xfer
897  1, // numSegments -- one chunk of 'ancOffset'
898  gClearDeviceAncBuffer.GetByteCount(), // segmentHostPitch
899  gClearDeviceAncBuffer.GetByteCount()); // segmentCardPitch
900  }
901  }
902  #endif // AJA_NTV2_CLEAR_DEVICE_ANC_BUFFER_AFTER_CAPTURE_XFER
903 
904  #if defined (AJA_NTV2_CLEAR_HOST_ANC_BUFFER_TAIL_AFTER_CAPTURE_XFER)
905  if (result && NTV2_IS_INPUT_CROSSPOINT(crosspoint))
906  {
907  ULWord doZeroing (0);
908  if (ReadRegister(kVRegZeroHostAncPostCapture, doZeroing) && doZeroing)
909  { // Zero out everything past the last captured Anc byte in the client's host buffer(s)...
910  NTV2Buffer & clientAncBufferF1 (inOutXferInfo.acANCBuffer);
911  NTV2Buffer & clientAncBufferF2 (inOutXferInfo.acANCField2Buffer);
912  const ULWord ancF1ByteCount (inOutXferInfo.GetCapturedAncByteCount(false));
913  const ULWord ancF2ByteCount (inOutXferInfo.GetCapturedAncByteCount(true));
914  void * pF1TailEnd (clientAncBufferF1.GetHostAddress(ancF1ByteCount));
915  void * pF2TailEnd (clientAncBufferF2.GetHostAddress(ancF2ByteCount));
916  if (pF1TailEnd && clientAncBufferF1.GetByteCount() > ancF1ByteCount)
917  ::memset (pF1TailEnd, 0, clientAncBufferF1.GetByteCount() - ancF1ByteCount);
918  if (pF2TailEnd && clientAncBufferF2.GetByteCount() > ancF2ByteCount)
919  ::memset (pF2TailEnd, 0, clientAncBufferF2.GetByteCount() - ancF2ByteCount);
920  }
921  }
922  #endif // AJA_NTV2_CLEAR_HOST_ANC_BUFFER_TAIL_AFTER_CAPTURE_XFER
923 
924  if (result)
925  ACDBG("Transfer successful for Ch" << DEC(inChannel+1));
926  else
927  ACFAIL("Transfer failed on Ch" << DEC(inChannel+1));
928  return result;
929 
930 } // AutoCirculateTransfer
931 
932 
933 static const AJA_FrameRate sNTV2Rate2AJARate[] = { AJA_FrameRate_Unknown // NTV2_FRAMERATE_UNKNOWN = 0,
934  ,AJA_FrameRate_6000 // NTV2_FRAMERATE_6000 = 1,
935  ,AJA_FrameRate_5994 // NTV2_FRAMERATE_5994 = 2,
936  ,AJA_FrameRate_3000 // NTV2_FRAMERATE_3000 = 3,
937  ,AJA_FrameRate_2997 // NTV2_FRAMERATE_2997 = 4,
938  ,AJA_FrameRate_2500 // NTV2_FRAMERATE_2500 = 5,
939  ,AJA_FrameRate_2400 // NTV2_FRAMERATE_2400 = 6,
940  ,AJA_FrameRate_2398 // NTV2_FRAMERATE_2398 = 7,
941  ,AJA_FrameRate_5000 // NTV2_FRAMERATE_5000 = 8,
942  ,AJA_FrameRate_4800 // NTV2_FRAMERATE_4800 = 9,
943  ,AJA_FrameRate_4795 // NTV2_FRAMERATE_4795 = 10,
944  ,AJA_FrameRate_12000 // NTV2_FRAMERATE_12000 = 11,
945  ,AJA_FrameRate_11988 // NTV2_FRAMERATE_11988 = 12,
946  ,AJA_FrameRate_1500 // NTV2_FRAMERATE_1500 = 13,
947  ,AJA_FrameRate_1498 // NTV2_FRAMERATE_1498 = 14,
948 #if !defined(NTV2_DEPRECATE_16_0)
949  ,AJA_FrameRate_1900 // NTV2_FRAMERATE_1900 = 15, // Formerly 09 in older SDKs
950  ,AJA_FrameRate_1898 // NTV2_FRAMERATE_1898 = 16, // Formerly 10 in older SDKs
951  ,AJA_FrameRate_1800 // NTV2_FRAMERATE_1800 = 17, // Formerly 11 in older SDKs
952  ,AJA_FrameRate_1798 // NTV2_FRAMERATE_1798 = 18, // Formerly 12 in older SDKs
953 #endif // !defined(NTV2_DEPRECATE_16_0)
954  };
955 
956 static const TimecodeFormat sNTV2Rate2TCFormat[] = {kTCFormatUnknown // NTV2_FRAMERATE_UNKNOWN = 0,
957  ,kTCFormat60fps // NTV2_FRAMERATE_6000 = 1,
958  ,kTCFormat30fps // NTV2_FRAMERATE_5994 = 2,
959  ,kTCFormat30fps // NTV2_FRAMERATE_3000 = 3,
960  ,kTCFormat30fps // NTV2_FRAMERATE_2997 = 4,
961  ,kTCFormat25fps // NTV2_FRAMERATE_2500 = 5,
962  ,kTCFormat24fps // NTV2_FRAMERATE_2400 = 6,
963  ,kTCFormat24fps // NTV2_FRAMERATE_2398 = 7,
964  ,kTCFormat50fps // NTV2_FRAMERATE_5000 = 8,
965  ,kTCFormat48fps // NTV2_FRAMERATE_4800 = 9,
966  ,kTCFormat48fps // NTV2_FRAMERATE_4795 = 10,
967  ,kTCFormat60fps // NTV2_FRAMERATE_12000 = 11,
968  ,kTCFormat60fps // NTV2_FRAMERATE_11988 = 12,
969  ,kTCFormat30fps // NTV2_FRAMERATE_1500 = 13,
970  ,kTCFormat30fps // NTV2_FRAMERATE_1498 = 14,
971 #if !defined(NTV2_DEPRECATE_16_0)
972  ,kTCFormatUnknown // NTV2_FRAMERATE_1900 = 15,
973  ,kTCFormatUnknown // NTV2_FRAMERATE_1898 = 16,
974  ,kTCFormatUnknown // NTV2_FRAMERATE_1800 = 17,
975  ,kTCFormatUnknown // NTV2_FRAMERATE_1798 = 18,
976 #endif // !defined(NTV2_DEPRECATE_16_0)
977  };
978 
979 // VPID Packet Insertion 1080 720 525 625 1080p 2K 2K1080p 2K1080i UHD 4K UHDHFR 4KHFR
980 static const uint16_t sVPIDLineNumsF1[] = { 10, 10, 13, 9, 10, 10, 10, 10, 10, 10, 10, 10 };
981 static const uint16_t sVPIDLineNumsF2[] = { 572, 0, 276, 322, 0, 0, 0, 572, 0, 0, 0, 0 };
982 
983 // SDI RX Status Registers (for setting/clearing "VPID Present" bits)
985 
986 
988 {
989  // IP 2110 Capture: Extract timecode(s) and put into inOutXferInfo.acTransferStatus.acFrameStamp.acTimeCodes...
990  // Extract VPID and put into SDIIn VPID regs
992  bool result (GetFrameRate(ntv2Rate, inChannel));
993  bool isProgressive (false);
994  const bool isMonitoring (AJADebug::IsActive(AJA_DebugUnit_Anc2110Rcv));
996  NTV2Buffer & ancF1 (inOutXferInfo.acANCBuffer);
997  NTV2Buffer & ancF2 (inOutXferInfo.acANCField2Buffer);
998  AJAAncillaryData * pPkt (AJA_NULL);
999  uint32_t vpidA(0), vpidB(0);
1000  AJAAncillaryList pkts;
1001 
1002  if (!result)
1003  return false; // Can't get frame rate
1004  if (!NTV2_IS_VALID_NTV2FrameRate(ntv2Rate))
1005  return false; // Bad frame rate
1006  if (!GetStandard(standard, inChannel))
1007  return false; // Can't get standard
1008  if (!NTV2_IS_VALID_STANDARD(standard))
1009  return false; // Bad standard
1010  isProgressive = NTV2_IS_PROGRESSIVE_STANDARD(standard);
1011  if (!ancF1.IsNULL() || !ancF2.IsNULL())
1012  if (AJA_FAILURE(AJAAncillaryList::SetFromDeviceAncBuffers(ancF1, ancF2, pkts)))
1013  return false; // Packet import failed
1014 
1015  const NTV2SmpteLineNumber smpteLineNumInfo (::GetSmpteLineNumber(standard));
1016  const uint32_t F2StartLine (isProgressive ? 0 : smpteLineNumInfo.GetLastLine()); // F2 VANC starts past last line of F1
1017 
1018  // Look for ATC and VITC...
1019  for (uint32_t ndx(0); ndx < pkts.CountAncillaryData(); ndx++)
1020  {
1021  pPkt = pkts.GetAncillaryDataAtIndex(ndx);
1022  if (pPkt->GetDID() == 0x41 && pPkt->GetSID() == 0x01) // VPID?
1023  { // VPID!
1024  if (pPkt->GetDC() != 4)
1025  continue; // Skip . . . expected DC == 4
1026  const uint32_t* pULWord (reinterpret_cast<const uint32_t*>(pPkt->GetPayloadData()));
1027  uint32_t vpidValue (pULWord ? *pULWord : 0);
1028  if (!pPkt->GetDataLocation().IsHanc())
1029  continue; // Skip . . . expected IsHANC
1030  vpidValue = NTV2EndianSwap32BtoH(vpidValue);
1031  if (IS_LINKB_AJAAncDataStream(pPkt->GetDataLocation().GetDataStream()))
1032  vpidB = vpidValue;
1033  else
1034  vpidA = vpidValue;
1035  continue; // Done . . . on to next packet
1036  }
1037 
1038  const AJAAncDataType ancType (pPkt->GetAncillaryDataType());
1039  if (ancType != AJAAncDataType_Timecode_ATC)
1040  {
1041  if (ancType == AJAAncDataType_Timecode_VITC && isMonitoring)
1042  RCVWARN("Skipped VITC packet: " << pPkt->AsString(16));
1043  continue; // Not timecode . . . skip
1044  }
1045 
1046  // Got ATC packet!
1047  AJAAncillaryData_Timecode_ATC * pATCPkt(reinterpret_cast<AJAAncillaryData_Timecode_ATC*>(pPkt));
1048  if (!pATCPkt)
1049  continue;
1050 
1052  pATCPkt->GetDBB1PayloadType(payloadType);
1054  switch(payloadType)
1055  {
1057  tcNdx = ::NTV2ChannelToTimecodeIndex (inChannel, /*inEmbeddedLTC*/true, /*inIsF2*/false);
1058  break;
1060  tcNdx = ::NTV2ChannelToTimecodeIndex (inChannel, /*inEmbeddedLTC*/false, /*inIsF2*/false);
1061  break;
1063  tcNdx = ::NTV2ChannelToTimecodeIndex (inChannel, /*inEmbeddedLTC*/false, /*inIsF2*/true);
1064  break;
1065  default:
1066  break;
1067  }
1068  if (!NTV2_IS_VALID_TIMECODE_INDEX(tcNdx))
1069  continue;
1070 
1071  NTV2_RP188 ntv2rp188; // <== This is what we want to get from pATCPkt
1072  AJATimeCode ajaTC; // We can get an AJATimeCode from it via GetTimecode
1073  const AJA_FrameRate ajaRate (sNTV2Rate2AJARate[ntv2Rate]);
1074  AJATimeBase ajaTB (ajaRate);
1075 
1076  bool isDF = false;
1078  pATCPkt->GetDropFrameFlag(isDF, tcFmt);
1079 
1080  pATCPkt->GetTimecode(ajaTC, ajaTB);
1081  // There is an AJATimeCode function to get an NTV2_RP188:
1082  // ajaTC.QueryRP188(ntv2rp188.fDBB, ntv2rp188.fLo, ntv2rp188.fHi, ajaTB, isDF);
1083  // But it's not implemented! D'OH!!
1084  // Let the hacking begin...
1085 
1086  string tcStr;
1087  ajaTC.QueryString(tcStr, ajaTB, isDF);
1088  CRP188 rp188(tcStr, sNTV2Rate2TCFormat[ntv2Rate]);
1089  rp188.SetDropFrame(isDF);
1090  rp188.GetRP188Reg(ntv2rp188);
1091  // Finally, poke the RP188 timecode into the Input Timecodes array...
1092  inOutXferInfo.acTransferStatus.acFrameStamp.SetInputTimecode(tcNdx, ntv2rp188);
1093  } // for each anc packet
1094 
1095  if (isMonitoring)
1096  {
1097  NTV2TimeCodes timecodes;
1098  inOutXferInfo.acTransferStatus.GetFrameStamp().GetInputTimeCodes(timecodes, inChannel);
1099  if (!timecodes.empty()) RCVDBG("Channel" << DEC(inChannel+1) << " timecodes: " << timecodes);
1100  }
1101  if (vpidA || vpidB)
1102  {
1103  if (isMonitoring)
1104  RCVDBG("WriteSDIInVPID chan=" << DEC(inChannel+1) << " VPIDa=" << xHEX0N(vpidA,4) << " VPIDb=" << xHEX0N(vpidB,4));
1105  WriteSDIInVPID(inChannel, vpidA, vpidB);
1106  }
1107  WriteRegister(gSDIInRxStatusRegs[inChannel], vpidA ? 1 : 0, BIT(20), 20); // Set RX VPID Valid LinkA bit if vpidA non-zero
1108  WriteRegister(gSDIInRxStatusRegs[inChannel], vpidB ? 1 : 0, BIT(21), 21); // Set RX VPID Valid LinkB bit if vpidB non-zero
1109 
1110  // Normalize to SDI/GUMP...
1111  return AJA_SUCCESS(pkts.GetTransmitData(ancF1, ancF2, isProgressive, F2StartLine));
1112 
1113 } // S2110DeviceAncFromXferBuffers
1114 
1115 
1117 {
1118  // IP 2110 Capture: Extract timecode(s) and put into RP188 registers
1119  // Extract VPID and put into SDIIn VPID registers
1120  AUTOCIRCULATE_TRANSFER tmpXfer; tmpXfer.acANCBuffer = ancF1; tmpXfer.acANCField2Buffer = ancF2;
1121  if (!S2110DeviceAncFromXferBuffers (inChannel, tmpXfer)) // <== This handles stuffing the VPID regs
1122  {RCVFAIL("S2110DeviceAncFromXferBuffers failed"); return false;}
1123 
1124  NTV2TimeCodes timecodes;
1125  if (!tmpXfer.acTransferStatus.GetFrameStamp().GetInputTimeCodes(timecodes, inChannel))
1126  {RCVFAIL("GetInputTimeCodes failed"); return false;}
1127 
1128  for (NTV2TimeCodesConstIter iter(timecodes.begin()); iter != timecodes.end(); ++iter)
1129  {
1130  //const bool isLTC (NTV2_IS_ATC_LTC_TIMECODE_INDEX(iter->first));
1131  const NTV2_RP188 ntv2rp188 (iter->second);
1132  SetRP188Data (inChannel, ntv2rp188); // Poke the timecode into the SDIIn timecode regs
1133  } // for each good timecode associated with "inChannel"
1134  // No need to log timecodes, already done in S2110DeviceAncFromXferBuffers: //ANCDBG(timecodes);
1135 
1136  return true;
1137 
1138 } // S2110DeviceAncFromBuffers
1139 
1140 
1141 static inline uint32_t EndianSwap32NtoH (const uint32_t inValue) {return NTV2EndianSwap32BtoH(inValue);} // Guaranteed no in-place byte-swap -- always copies
1142 
1143 
1145 {
1146  // IP 2110 Playout: Add relevant transmit timecodes and VPID to outgoing RTP Anc
1148  bool result (GetFrameRate(ntv2Rate, inChannel));
1149  bool isProgressive (false);
1150  bool generateRTP (false);
1151  const bool isMonitoring (AJADebug::IsActive(AJA_DebugUnit_Anc2110Xmit));
1152  const bool isIoIP2110 ((_boardID == DEVICE_ID_IOIP_2110) || (_boardID == DEVICE_ID_IOIP_2110_RGB12));
1154  NTV2Buffer & ancF1 (inOutXferInfo.acANCBuffer);
1155  NTV2Buffer & ancF2 (inOutXferInfo.acANCField2Buffer);
1156  NTV2TaskMode taskMode (NTV2_OEM_TASKS);
1157  ULWord vpidA(0), vpidB(0);
1158  AJAAncillaryList packetList;
1159  const NTV2Channel SDISpigotChannel(GetEveryFrameServices(taskMode) && NTV2_IS_STANDARD_TASKS(taskMode) ? NTV2_CHANNEL3 : inChannel);
1160  ULWord F1OffsetFromBottom(0), F2OffsetFromBottom(0), F1MonOffsetFromBottom(0), F2MonOffsetFromBottom(0);
1161  if (!result)
1162  return false; // Can't get frame rate
1163  if (!NTV2_IS_VALID_NTV2FrameRate(ntv2Rate))
1164  return false; // Bad frame rate
1165  if (!GetStandard(standard, inChannel))
1166  return false; // Can't get standard
1167  if (!NTV2_IS_VALID_STANDARD(standard))
1168  return false; // Bad standard
1169  isProgressive = NTV2_IS_PROGRESSIVE_STANDARD(standard);
1170  const NTV2SmpteLineNumber smpteLineNumInfo (::GetSmpteLineNumber(standard));
1171  const uint32_t F2StartLine (smpteLineNumInfo.GetLastLine()); // F2 VANC starts past last line of F1
1172 
1173  // IoIP 2110 Playout requires RTP+GUMP per anc buffer to operate SDI5 Mon output...
1174  GetAncRegionOffsetFromBottom(F1OffsetFromBottom, NTV2_AncRgn_Field1);
1175  GetAncRegionOffsetFromBottom(F2OffsetFromBottom, NTV2_AncRgn_Field2);
1176  GetAncRegionOffsetFromBottom(F1MonOffsetFromBottom, NTV2_AncRgn_MonField1);
1177  GetAncRegionOffsetFromBottom(F2MonOffsetFromBottom, NTV2_AncRgn_MonField2);
1178  // Define F1 & F2 GUMP sub-buffers from ancF1 & ancF2 (only used for IoIP 2110)...
1179  NTV2Buffer gumpF1(ancF1.GetHostAddress(F1OffsetFromBottom - F1MonOffsetFromBottom), // addr
1180  F1MonOffsetFromBottom - F2OffsetFromBottom); // byteCount
1181  NTV2Buffer gumpF2(ancF2.GetHostAddress(F2OffsetFromBottom - F2MonOffsetFromBottom), // addr
1182  F2MonOffsetFromBottom); // byteCount
1183 
1184  if (ancF1 || ancF2)
1185  {
1186  // Import anc packet list that AutoCirculateTransfer's caller put into Xfer struct's Anc buffers (GUMP or RTP).
1187  // We're going to add VPID and timecode packets to the list.
1188  if (AJA_FAILURE(AJAAncillaryList::SetFromDeviceAncBuffers(ancF1, ancF2, packetList)))
1189  return false; // Packet import failed
1190 
1191  if (!packetList.IsEmpty())
1192  {
1193  const bool isF1RTP (ancF1 ? AJARTPAncPayloadHeader::BufferStartsWithRTPHeader(ancF1) : false);
1194  const bool isF2RTP (ancF2 ? AJARTPAncPayloadHeader::BufferStartsWithRTPHeader(ancF2) : false);
1195  if (isIoIP2110 && isF1RTP && isF2RTP)
1196  { // Generate F1 & F2 GUMP from F1 & F2 RTP...
1197  packetList.GetSDITransmitData(gumpF1, gumpF2, isProgressive, F2StartLine);
1198  }
1199  else
1200  {
1201  if (ancF1)
1202  {
1203  if (isF1RTP)
1204  { // Caller F1 buffer contains RTP
1205  if (isIoIP2110)
1206  { // Generate GUMP from packetList...
1207  NTV2Buffer skipF2Data;
1208  packetList.GetSDITransmitData(gumpF1, skipF2Data, isProgressive, F2StartLine);
1209  }
1210  }
1211  else
1212  { // Caller F1 buffer contains GUMP
1213  generateRTP = true; // Force conversion to RTP
1214  if (isIoIP2110)
1215  { // Copy GUMP to where the driver expects it...
1216  const ULWord gumpLength (std::min(F1MonOffsetFromBottom - F2OffsetFromBottom, gumpF1.GetByteCount()));
1217  gumpF1.CopyFrom(/*src=*/ancF1, /*srcOffset=*/0, /*dstOffset=*/0, /*byteCount=*/gumpLength);
1218  } // if IoIP
1219  } // if F1 is GUMP
1220  } // if ancF1 non-NULL
1221  if (ancF2)
1222  {
1223  if (isF2RTP)
1224  { // Caller F2 buffer contains RTP
1225  if (isIoIP2110)
1226  { // Generate GUMP from packetList...
1227  NTV2Buffer skipF1Data;
1228  packetList.GetSDITransmitData(skipF1Data, gumpF2, isProgressive, F2StartLine);
1229  }
1230  }
1231  else
1232  { // Caller F2 buffer contains GUMP
1233  generateRTP = true; // Force conversion to RTP
1234  if (isIoIP2110)
1235  { // Copy GUMP to where the driver expects it...
1236  const ULWord gumpLength (std::min(F2MonOffsetFromBottom, gumpF2.GetByteCount()));
1237  gumpF2.CopyFrom(/*src=*/ancF2, /*srcOffset=*/0, /*dstOffset=*/0, /*byteCount=*/gumpLength);
1238  } // if IoIP
1239  } // if F2 is GUMP
1240  } // if ancF2 non-NULL
1241  } // else not IoIP or not F1RTP or not F2RTP
1242  } // if caller supplied any anc
1243  } // if either buffer non-empty/NULL
1244 
1245  if (isMonitoring) XMTDBG("ORIG: " << packetList); // Original packet list from caller
1246 
1247  // Callers can override our register-based VPID values...
1248  if (!packetList.CountAncillaryDataWithID(0x41,0x01)) // If no VPID packets in buffer...
1249  {
1250  if (GetSDIOutVPID(vpidA, vpidB, UWord(SDISpigotChannel))) // ...then we'll add them...
1251  {
1252  AJAAncillaryData vpidPkt;
1253  vpidPkt.SetDID(0x41);
1254  vpidPkt.SetSID(0x01);
1259  if (vpidA)
1260  { // LinkA/DS1:
1261  vpidA = ::EndianSwap32NtoH(vpidA);
1262  vpidPkt.SetPayloadData (reinterpret_cast<uint8_t*>(&vpidA), 4);
1263  vpidPkt.SetLocationLineNumber(sVPIDLineNumsF1[standard]);
1264  vpidPkt.GeneratePayloadData();
1265  packetList.AddAncillaryData(vpidPkt); generateRTP = true;
1266  if (!isProgressive)
1267  { // Ditto for Field 2...
1268  vpidPkt.SetLocationLineNumber(sVPIDLineNumsF2[standard]);
1269  packetList.AddAncillaryData(vpidPkt); generateRTP = true;
1270  }
1271  }
1272  if (vpidB)
1273  { // LinkB/DS2:
1274  vpidB = ::EndianSwap32NtoH(vpidB);
1275  vpidPkt.SetPayloadData (reinterpret_cast<uint8_t*>(&vpidB), 4);
1278  vpidPkt.GeneratePayloadData();
1279  packetList.AddAncillaryData(vpidPkt); generateRTP = true;
1280  if (!isProgressive)
1281  { // Ditto for Field 2...
1282  vpidPkt.SetLocationLineNumber(sVPIDLineNumsF2[standard]);
1283  packetList.AddAncillaryData(vpidPkt); generateRTP = true;
1284  }
1285  }
1286  } // if user not inserting his own VPID
1287  else if (isMonitoring) {XMTWARN("GetSDIOutVPID failed for SDI spigot " << ::NTV2ChannelToString(SDISpigotChannel,true));}
1288  } // if no VPID pkts in buffer
1289  else if (isMonitoring) {XMTDBG(DEC(packetList.CountAncillaryDataWithID(0x41,0x01)) << " VPID packet(s) already provided, won't insert any here");}
1290  // IoIP monitor GUMP VPID cannot be overridden -- SDI anc insert always inserts VPID via firmware
1291 
1292  // Callers can override our register-based RP188 values...
1293  if (!packetList.CountAncillaryDataWithType(AJAAncDataType_Timecode_ATC) // if no caller-specified ATC timecodes...
1294  && !packetList.CountAncillaryDataWithType(AJAAncDataType_Timecode_VITC)) // ...and no caller-specified VITC timecodes...
1295  {
1296  if (inOutXferInfo.acOutputTimeCodes) // ...and if there's an output timecode array...
1297  {
1298  const AJA_FrameRate ajaRate (sNTV2Rate2AJARate[ntv2Rate]);
1299  const AJATimeBase ajaTB (ajaRate);
1300  const NTV2TCIndexes tcIndexes (::GetTCIndexesForSDIConnector(SDISpigotChannel));
1301  const size_t maxNumTCs (inOutXferInfo.acOutputTimeCodes.GetByteCount() / sizeof(NTV2_RP188));
1302  NTV2_RP188 * pTimecodes (reinterpret_cast<NTV2_RP188*>(inOutXferInfo.acOutputTimeCodes.GetHostPointer()));
1303 
1304  // For each timecode index for this channel...
1305  for (NTV2TCIndexesConstIter it(tcIndexes.begin()); it != tcIndexes.end(); ++it)
1306  {
1307  const NTV2TCIndex tcNdx(*it);
1308  if (size_t(tcNdx) >= maxNumTCs)
1309  continue; // Skip -- not in the array
1310  if (!NTV2_IS_SDI_TIMECODE_INDEX(tcNdx))
1311  continue; // Skip -- analog or invalid
1312 
1313  const NTV2_RP188 regTC (pTimecodes[tcNdx]);
1314  if (!regTC)
1315  continue; // Skip -- invalid timecode (all FFs)
1316 
1317  const bool isDF = AJATimeCode::QueryIsRP188DropFrame(regTC.fDBB, regTC.fLo, regTC.fHi);
1318 
1319  AJATimeCode tc; tc.SetRP188(regTC.fDBB, regTC.fLo, regTC.fHi, ajaTB);
1320  AJAAncillaryData_Timecode_ATC atc; atc.SetTimecode (tc, ajaTB, isDF);
1321  atc.SetDBB (uint8_t(regTC.fDBB & 0x000000FF), uint8_t(regTC.fDBB & 0x0000FF00 >> 8));
1322  if (NTV2_IS_ATC_VITC2_TIMECODE_INDEX(tcNdx)) // VITC2?
1323  {
1325  atc.SetLocationLineNumber(sVPIDLineNumsF2[standard] - 1); // Line 9 in F2
1326  }
1327  else
1328  { // F1 -- only consider LTC and VITC1 ... nothing else
1329  if (NTV2_IS_ATC_VITC1_TIMECODE_INDEX(tcNdx)) // VITC1?
1331  else if (NTV2_IS_ATC_LTC_TIMECODE_INDEX(tcNdx)) // LTC?
1333  else
1334  continue;
1335  }
1336  atc.GeneratePayloadData();
1337  packetList.AddAncillaryData(atc); generateRTP = true;
1338  } // for each timecode index value
1339  } // if user not inserting his own ATC/VITC
1340  else if (isMonitoring) {XMTWARN("Cannot insert ATC/VITC -- Xfer struct has no acOutputTimeCodes array!");}
1341  } // if no ATC/VITC packets in buffer
1342  else if (isMonitoring) {XMTDBG("ATC and/or VITC packet(s) already provided, won't insert any here");}
1343  // IoIP monitor GUMP VPID cannot be overridden -- SDI anc inserter inserts RP188 via firmware
1344 
1345  if (generateRTP) // if anything added (or forced conversion from GUMP)
1346  { // Re-encode packets into the XferStruct buffers as RTP...
1347  //XMTDBG("CHGD: " << packetList); // DEBUG: Changed packet list (to be converted to RTP)
1348  const bool multiRTPPkt = inOutXferInfo.acTransferStatus.acState == NTV2_AUTOCIRCULATE_INVALID ? true : false;
1349  packetList.SetAllowMultiRTPTransmit(multiRTPPkt);
1350  NTV2Buffer rtpF1 (ancF1.GetHostAddress(0), isIoIP2110 ? F1OffsetFromBottom - F1MonOffsetFromBottom : ancF1.GetByteCount());
1351  NTV2Buffer rtpF2 (ancF2.GetHostAddress(0), isIoIP2110 ? F2OffsetFromBottom - F2MonOffsetFromBottom : ancF2.GetByteCount());
1352  result = AJA_SUCCESS(packetList.GetIPTransmitData (rtpF1, rtpF2, isProgressive, F2StartLine));
1353  //if (isIoIP2110) XMTDBG("F1RTP: " << rtpF1 << " F2RTP: " << rtpF2 << " Xfer: " << inOutXferInfo);
1354 #if 0
1355  DMAWriteAnc(31, rtpF1, rtpF2, NTV2_CHANNEL_INVALID); // DEBUG: DMA RTP into frame 31
1356  if (result)
1357  {
1358  AJAAncillaryList compareRTP; // RTP into compareRTP
1360  //if (packetList.GetAncillaryDataWithID(0x61,0x02)->GetChecksum() != compareRTP.GetAncillaryDataWithID(0x61,0x02)->GetChecksum())
1361  //XMTDBG("COMPRTP608: " << packetList.GetAncillaryDataWithID(0x61,0x02)->AsString(8) << compareRTP.GetAncillaryDataWithID(0x61,0x02)->AsString(8));
1362  string compRTP (compareRTP.CompareWithInfo(packetList, /*ignoreLocation*/false, /*ignoreChecksum*/false));
1363  if (!compRTP.empty())
1364  XMTWARN("MISCOMPARE: " << compRTP);
1365  }
1366  if (isIoIP2110)
1367  {
1368  DMAWriteAnc(32, gumpF1, gumpF2, NTV2_CHANNEL_INVALID); // DEBUG: DMA GUMP into frame 32
1369  if (result)
1370  {
1371  AJAAncillaryList compareGUMP; // GUMP into compareGUMP
1372  NTV2_ASSERT(AJA_SUCCESS(AJAAncillaryList::SetFromDeviceAncBuffers(gumpF1, gumpF2, compareGUMP)));
1373  //if (packetList.GetAncillaryDataWithID(0x61,0x02)->GetChecksum() != compareGUMP.GetAncillaryDataWithID(0x61,0x02)->GetChecksum())
1374  //XMTDBG("COMPGUMP608: " << packetList.GetAncillaryDataWithID(0x61,0x02)->AsString(8) << compareGUMP.GetAncillaryDataWithID(0x61,0x02)->AsString(8));
1375  string compGUMP (compareGUMP.CompareWithInfo(packetList, /*ignoreLocation*/false, /*ignoreChecksum*/false));
1376  if (!compGUMP.empty())
1377  XMTWARN("MISCOMPARE: " << compGUMP);
1378  }
1379  } // IoIP2110
1380 #endif
1381  } // if generateRTP
1382  return result;
1383 
1384 } // S2110DeviceAncToXferBuffers
1385 
1386 
1388 {
1389  // IP 2110 Playout: Add relevant transmit timecodes and VPID to outgoing RTP Anc
1391  bool result (GetFrameRate(ntv2Rate, inChannel));
1392  bool isProgressive (false);
1393  bool changed (false);
1394  const bool isMonitoring (AJADebug::IsActive(AJA_DebugUnit_Anc2110Xmit));
1396  const NTV2Channel SDISpigotChannel(inChannel); // DMAWriteAnc usually for OEM clients -- just use inChannel
1397  ULWord vpidA(0), vpidB(0);
1398  AJAAncillaryList pkts;
1399 
1400  if (!result)
1401  return false; // Can't get frame rate
1402  if (!NTV2_IS_VALID_NTV2FrameRate(ntv2Rate))
1403  return false; // Bad frame rate
1404  if (!GetStandard(standard, inChannel))
1405  return false; // Can't get standard
1406  if (!NTV2_IS_VALID_STANDARD(standard))
1407  return false; // Bad standard
1408  isProgressive = NTV2_IS_PROGRESSIVE_STANDARD(standard);
1409  if (!ancF1.IsNULL() || !ancF2.IsNULL())
1410  if (AJA_FAILURE(AJAAncillaryList::SetFromDeviceAncBuffers(ancF1, ancF2, pkts)))
1411  return false; // Packet import failed
1412 
1413  const NTV2SmpteLineNumber smpteLineNumInfo (::GetSmpteLineNumber(standard));
1414  const uint32_t F2StartLine (smpteLineNumInfo.GetLastLine()); // F2 VANC starts past last line of F1
1415 
1416  // Non-autocirculate users can transmit VPID two ways:
1417  // 1) Insert a VPID packet into the Anc buffer(s) themselves, or
1418  // 2) Set the SDI Out VPID register before calling DMAWriteAnc
1419  // Extract VPID and place into our SDI In VPID register...
1420  if (pkts.CountAncillaryDataWithID(0x41,0x01)) // If no VPID packets in buffer...
1421  {
1422  if (GetSDIOutVPID(vpidA, vpidB, UWord(SDISpigotChannel))) // ...then we'll add them...
1423  {
1424  AJAAncillaryData vpidPkt;
1425  vpidPkt.SetDID(0x41);
1426  vpidPkt.SetSID(0x01);
1431  if (vpidA)
1432  { // LinkA/DS1:
1433  vpidA = ::EndianSwap32NtoH(vpidA);
1434  vpidPkt.SetPayloadData (reinterpret_cast<uint8_t*>(&vpidA), 4);
1435  vpidPkt.SetLocationLineNumber(sVPIDLineNumsF1[standard]);
1436  pkts.AddAncillaryData(vpidPkt); changed = true;
1437  if (!isProgressive)
1438  { // Ditto for Field 2...
1439  vpidPkt.SetLocationLineNumber(sVPIDLineNumsF2[standard]);
1440  pkts.AddAncillaryData(vpidPkt); changed = true;
1441  }
1442  }
1443  if (vpidB)
1444  { // LinkB/DS2:
1445  vpidB = ::EndianSwap32NtoH(vpidB);
1446  vpidPkt.SetPayloadData (reinterpret_cast<uint8_t*>(&vpidB), 4);
1449  vpidPkt.GeneratePayloadData();
1450  pkts.AddAncillaryData(vpidPkt); changed = true;
1451  if (!isProgressive)
1452  { // Ditto for Field 2...
1453  vpidPkt.SetLocationLineNumber(sVPIDLineNumsF2[standard]);
1454  pkts.AddAncillaryData(vpidPkt); changed = true;
1455  }
1456  }
1457  } // if client didn't insert their own VPID
1458  } // if no VPID pkts in buffer
1459  else if (isMonitoring) {XMTDBG(DEC(pkts.CountAncillaryDataWithID(0x41,0x01)) << " VPID packet(s) already provided, won't insert any here");}
1460 
1461  // Non-autocirculate users can transmit timecode two ways:
1462  // 1) Insert ATC or VITC packets into the Anc buffers themselves, or
1463  // 2) Set output timecode using RP188 registers using CNTV2Card::SetRP188Data,
1464  // (but this will only work on newer boards with bidirectional SDI)
1465  if (!pkts.CountAncillaryDataWithType(AJAAncDataType_Timecode_ATC) // if no caller-specified ATC timecodes...
1466  && !pkts.CountAncillaryDataWithType(AJAAncDataType_Timecode_VITC)) // ...and no caller-specified VITC timecodes...
1467  {
1468  if (IsSupported(kDeviceHasBiDirectionalSDI) && IsSupported(kDeviceCanDoStackedAudio)) // if newer device with bidirectional SDI
1469  {
1470  const AJA_FrameRate ajaRate (sNTV2Rate2AJARate[ntv2Rate]);
1471  const AJATimeBase ajaTB (ajaRate);
1472  const NTV2TCIndexes tcIndexes (::GetTCIndexesForSDIConnector(SDISpigotChannel));
1473  NTV2_RP188 regTC;
1474 
1475  // Supposedly, these newer devices support playout readback of their RP188 registers...
1476  GetRP188Data (inChannel, regTC);
1477  if (regTC)
1478  {
1479  // For each timecode index for this channel...
1480  for (NTV2TCIndexesConstIter it(tcIndexes.begin()); it != tcIndexes.end(); ++it)
1481  {
1482  const NTV2TCIndex tcNdx(*it);
1483  if (!NTV2_IS_SDI_TIMECODE_INDEX(tcNdx))
1484  continue; // Skip -- analog or invalid
1485 
1486  // TBD: Does the DBB indicate which timecode it's intended for?
1487  // i.e. VITC? LTC? VITC2?
1488  // For now, transmit all three... TBD
1489 
1490  const bool isDF = AJATimeCode::QueryIsRP188DropFrame(regTC.fDBB, regTC.fLo, regTC.fHi);
1491 
1492  AJATimeCode tc; tc.SetRP188(regTC.fDBB, regTC.fLo, regTC.fHi, ajaTB);
1493  AJAAncillaryData_Timecode_ATC atc; atc.SetTimecode (tc, ajaTB, isDF);
1494  atc.AJAAncillaryData_Timecode_ATC::SetDBB (uint8_t(regTC.fDBB & 0x000000FF), uint8_t(regTC.fDBB & 0x0000FF00 >> 8));
1495  if (NTV2_IS_ATC_VITC2_TIMECODE_INDEX(tcNdx)) // VITC2?
1496  {
1497  if (isProgressive)
1498  continue; // Progressive -- skip VITC2
1500  atc.SetLocationLineNumber(sVPIDLineNumsF2[standard] - 1); // Line 9 in F2
1501  }
1502  else
1503  { // F1 -- only consider LTC and VITC1 ... nothing else
1504  if (NTV2_IS_ATC_VITC1_TIMECODE_INDEX(tcNdx)) // VITC1?
1506  else if (NTV2_IS_ATC_LTC_TIMECODE_INDEX(tcNdx)) // LTC?
1508  else
1509  continue;
1510  }
1511  atc.GeneratePayloadData();
1512  pkts.AddAncillaryData(atc); changed = true;
1513  } // for each timecode index value
1514  } // if GetRP188Data returned valid timecode
1515  } // if newer device with bidirectional spigots
1516  } // if client didn't insert their own ATC/VITC
1517  else if (isMonitoring) {XMTDBG("ATC and/or VITC packet(s) already provided, won't insert any here");}
1518 
1519  if (changed)
1520  { // We must re-encode packets into the RTP buffers only if anything new was added...
1521  ancF1.Fill(ULWord(0)); ancF2.Fill(ULWord(0)); // Clear/reset anc RTP buffers
1522  //XMTDBG(pkts);
1523  result = AJA_SUCCESS(pkts.GetIPTransmitData (ancF1, ancF2, isProgressive, F2StartLine));
1524 #if 0
1525  if (result)
1526  {
1527  AJAAncillaryList comparePkts;
1529  //XMTDBG(comparePkts);
1530  string compareResult (comparePkts.CompareWithInfo(pkts,false,false));
1531  if (!compareResult.empty())
1532  XMTWARN("MISCOMPARE: " << compareResult);
1533  }
1534 #endif
1535  }
1536  return result;
1537 
1538 } // S2110DeviceAncToBuffers
kRP188SourceEmbeddedLTC
@ kRP188SourceEmbeddedLTC
Definition: ntv2publicinterface.h:5049
AJAAncillaryData::SetLocationHorizOffset
virtual AJAStatus SetLocationHorizOffset(const uint16_t inOffset)
Sets my ancillary data "location" horizontal offset.
Definition: ancillarydata.cpp:331
AUTOCIRCULATE_TRANSFER::GetTransferFrameNumber
LWord GetTransferFrameNumber(void) const
Definition: ntv2publicinterface.h:8390
NTV2_AUDIOSYSTEM_Plus3
@ NTV2_AUDIOSYSTEM_Plus3
Definition: ntv2enums.h:3863
kDeviceHasBiDirectionalSDI
@ kDeviceHasBiDirectionalSDI
True if device SDI connectors are bi-directional.
Definition: ntv2devicefeatures.h:92
GetScaleFromFrameRate
ULWord GetScaleFromFrameRate(const NTV2FrameRate inFrameRate)
Definition: ntv2utils.cpp:3354
NTV2TaskMode
enum NTV2EveryFrameTaskMode NTV2TaskMode
kDeviceCanDoStackedAudio
@ kDeviceCanDoStackedAudio
True if device uses a "stacked" arrangement of its audio buffers.
Definition: ntv2devicefeatures.h:85
AJA_FrameRate_1900
@ AJA_FrameRate_1900
Definition: videotypes.h:218
NTV2_AUDIOSYSTEM_Plus1
@ NTV2_AUDIOSYSTEM_Plus1
Definition: ntv2enums.h:3861
LWord
int32_t LWord
Definition: ajatypes.h:254
AJAAncillaryData_Timecode_ATC_DBB1PayloadType_VITC1
@ AJAAncillaryData_Timecode_ATC_DBB1PayloadType_VITC1
Definition: ancillarydata_timecode_atc.h:26
AUTOCIRCULATE_DATA::channelSpec
NTV2Crosspoint channelSpec
Definition: ntv2publicinterface.h:4372
AJATimeCode::QueryString
void QueryString(std::string &str, const AJATimeBase &timeBase, bool bDropFrame)
Definition: timecode.cpp:225
FRAME_STAMP_STRUCT::channelSpec
NTV2Crosspoint channelSpec
Definition: ntv2publicinterface.h:4438
AJAAncillaryList::SetAllowMultiRTPTransmit
virtual void SetAllowMultiRTPTransmit(const bool inAllow)
Determines if multiple RTP packets will be encoded for playout (via GetIPTransmitData)....
Definition: ancillarylist.h:482
NTV2_IS_SDI_TIMECODE_INDEX
#define NTV2_IS_SDI_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3950
kRegRXSDI8Status
@ kRegRXSDI8Status
Definition: ntv2publicinterface.h:765
NTV2_Input1Select
@ NTV2_Input1Select
Definition: ntv2enums.h:2273
NTV2_IS_ATC_VITC1_TIMECODE_INDEX
#define NTV2_IS_ATC_VITC1_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3941
AJAAncillaryData::SetSID
virtual AJAStatus SetSID(const uint8_t inSID)
Sets my Secondary Data ID (SID) - (aka the Data Block Number (DBN) for "Type 1" SMPTE-291 packets).
Definition: ancillarydata.cpp:207
AJA_FrameRate_3000
@ AJA_FrameRate_3000
Definition: videotypes.h:223
AUTOCIRCULATE_STATUS::acCrosspoint
NTV2Crosspoint acCrosspoint
The crosspoint (channel number with direction)
Definition: ntv2publicinterface.h:7195
AUTOCIRCULATE_WITH_FIELDS
#define AUTOCIRCULATE_WITH_FIELDS
Use this to AutoCirculate with fields as frames for interlaced formats.
Definition: ntv2publicinterface.h:5530
CNTV2Card::AutoCirculateSetActiveFrame
virtual bool AutoCirculateSetActiveFrame(const NTV2Channel inChannel, const ULWord inNewActiveFrame)
Immediately changes the Active Frame for the given channel.
Definition: ntv2autocirculate.cpp:677
AUTOCIRCULATE_DATA::bVal2
BOOL_ bVal2
Definition: ntv2publicinterface.h:4382
kTCFormat24fps
@ kTCFormat24fps
Definition: ntv2rp188.h:30
AJAAncillaryData_Timecode_ATC_DBB1PayloadType
AJAAncillaryData_Timecode_ATC_DBB1PayloadType
Definition: ancillarydata_timecode_atc.h:23
kRegRXSDI4Status
@ kRegRXSDI4Status
Definition: ntv2publicinterface.h:729
kRP188SourceEmbeddedVITC1
@ kRP188SourceEmbeddedVITC1
Definition: ntv2publicinterface.h:5050
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1146
CNTV2Card::S2110DeviceAncFromXferBuffers
virtual bool S2110DeviceAncFromXferBuffers(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &inOutXferInfo)
Definition: ntv2autocirculate.cpp:987
AJATimeCode::QueryIsRP188DropFrame
static bool QueryIsRP188DropFrame(const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi)
Definition: timecode.cpp:449
NTV2ChannelToOutputChannelSpec
#define NTV2ChannelToOutputChannelSpec
Definition: ntv2utils.h:598
NTV2_TCINDEX_SDI2_2
@ NTV2_TCINDEX_SDI2_2
SDI 2 embedded VITC 2.
Definition: ntv2enums.h:3926
NTV2TCIndexes
std::set< NTV2TCIndex > NTV2TCIndexes
Definition: ntv2publicinterface.h:6879
CNTV2Card::FindUnallocatedFrames
virtual bool FindUnallocatedFrames(const UWord inFrameCount, LWord &outStartFrame, LWord &outEndFrame, const NTV2Channel inFrameStore=NTV2_CHANNEL_INVALID)
Returns the device frame buffer numbers of the first unallocated contiguous band of frame buffers hav...
Definition: ntv2autocirculate.cpp:113
CRP188::GetRP188Reg
bool GetRP188Reg(RP188_STRUCT &outRP188) const
Definition: ntv2rp188.cpp:1241
AJAAncillaryList::SetFromDeviceAncBuffers
static AJAStatus SetFromDeviceAncBuffers(const NTV2Buffer &inF1AncBuffer, const NTV2Buffer &inF2AncBuffer, AJAAncillaryList &outPackets, const uint32_t inFrameNum=0)
Returns all ancillary data packets found in the given F1 and F2 ancillary data buffers.
Definition: ancillarylist.cpp:1076
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1334
AJA_FrameRate_11988
@ AJA_FrameRate_11988
Definition: videotypes.h:230
NTV2Buffer
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
Definition: ntv2publicinterface.h:6022
NTV2SmpteLineNumber::GetLastLine
ULWord GetLastLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
Definition: ntv2formatdescriptor.cpp:1300
AJA_FrameRate_1498
@ AJA_FrameRate_1498
Definition: videotypes.h:213
aja::join
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
GetTCIndexesForSDIConnector
NTV2TCIndexes GetTCIndexesForSDIConnector(const NTV2Channel inSDIConnector)
Definition: ntv2utils.cpp:5030
sNTV2Rate2TCFormat
static const TimecodeFormat sNTV2Rate2TCFormat[]
Definition: ntv2autocirculate.cpp:956
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6096
NTV2_STANDARD_INVALID
@ NTV2_STANDARD_INVALID
Definition: ntv2enums.h:176
AJA_FrameRate_Unknown
@ AJA_FrameRate_Unknown
Definition: videotypes.h:212
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:508
AJALock::IsValid
virtual bool IsValid(void) const
Definition: lock.h:67
AJAAncillaryList::GetIPTransmitData
virtual AJAStatus GetIPTransmitData(NTV2Buffer &F1Buffer, NTV2Buffer &F2Buffer, const bool inIsProgressive=true, const uint32_t inF2StartLine=0)
Explicitly encodes my AJAAncillaryData packets into the given buffers in RTP Anc Buffer Data Format ....
Definition: ancillarylist.cpp:1581
AJAAncillaryData::SetLocationDataStream
virtual AJAStatus SetLocationDataStream(const AJAAncDataStream inStream)
Sets my ancillary data "location" data stream value (DS1,DS2...).
Definition: ancillarydata.cpp:297
CNTV2Card::AutoCirculatePreRoll
virtual bool AutoCirculatePreRoll(const NTV2Channel inChannel, const ULWord inPreRollFrames)
Tells AutoCirculate how many frames to skip before playout starts for the given channel.
Definition: ntv2autocirculate.cpp:628
CNTV2Card::S2110DeviceAncFromBuffers
virtual bool S2110DeviceAncFromBuffers(const NTV2Channel inChannel, NTV2Buffer &ancF1, NTV2Buffer &ancF2)
Definition: ntv2autocirculate.cpp:1116
AJA_FrameRate_2997
@ AJA_FrameRate_2997
Definition: videotypes.h:222
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:1681
kRegRXSDI5Status
@ kRegRXSDI5Status
Definition: ntv2publicinterface.h:738
ancillarylist.h
Declares the AJAAncillaryList class.
AJAAncDataLink_B
@ AJAAncDataLink_B
The ancillary data is associated with Link B of the video stream.
Definition: ancillarydata.h:82
ancillarydata_timecode_atc.h
Declares the AJAAncillaryData_Timecode_ATC class.
NTV2_IS_VALID_TIMECODE_INDEX
#define NTV2_IS_VALID_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3937
NTV2_FRAMERATE_INVALID
@ NTV2_FRAMERATE_INVALID
Definition: ntv2enums.h:428
ntv2endian.h
Defines a number of handy byte-swapping macros.
SDRAMAuditor::GetTagsForFrameIndex
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:641
AJAAncDataType
AJAAncDataType
Identifies the ancillary data types that are known to this module.
Definition: ancillarydata.h:44
AJAAncillaryList::CountAncillaryDataWithType
virtual uint32_t CountAncillaryDataWithType(const AJAAncDataType inMatchType) const
Answers with the number of AJAAncillaryData objects having the given type.
Definition: ancillarylist.cpp:222
eStartAutoCircAtTime
@ eStartAutoCircAtTime
Definition: ntv2publicinterface.h:4254
AUTOCIRCULATE_DATA::bVal3
BOOL_ bVal3
Definition: ntv2publicinterface.h:4383
AJAAncillaryData::GeneratePayloadData
virtual AJAStatus GeneratePayloadData(void)
Generates the payload data from the "local" ancillary data.
Definition: ancillarydata.h:894
AJAAncDataType_Timecode_VITC
@ AJAAncDataType_Timecode_VITC
SMPTE 12-M Vertical Interval Timecode (aka "VITC")
Definition: ancillarydata.h:49
SDRAMAuditor::GetFreeRegions
bool GetFreeRegions(ULWordSequence &outBlks) const
Answers with the list of free memory regions.
Definition: ntv2card.h:6646
EndianSwap32NtoH
static uint32_t EndianSwap32NtoH(const uint32_t inValue)
Definition: ntv2autocirculate.cpp:1141
AUTOCIRCULATE_TRANSFER::GetInputTimeCode
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Intended for capture, answers with a specific timecode captured in my acTransferStatus member's acFra...
Definition: ntv2publicinterface.cpp:2862
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
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5608
RCVFAIL
#define RCVFAIL(__x__)
Definition: ntv2autocirculate.cpp:45
NTV2_AncRgn_MonField1
@ NTV2_AncRgn_MonField1
Identifies the "monitor" or "auxiliary" Field 1 ancillary data region.
Definition: ntv2enums.h:4183
NTV2_AncRgn_Field2
@ NTV2_AncRgn_Field2
Identifies the "normal" Field 2 ancillary data region.
Definition: ntv2enums.h:4182
AUTOCIRCULATE_WITH_MULTILINK_AUDIO3
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO3
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 3.
Definition: ntv2publicinterface.h:5534
timecode.h
Declares the AJATimeCode class.
NTV2_IS_ATC_VITC2_TIMECODE_INDEX
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3944
NTV2Buffer::Allocate
bool Allocate(const size_t inByteCount, const bool inPageAligned=false)
Allocates (or re-allocates) my user-space storage using the given byte count. I assume full responsib...
Definition: ntv2publicinterface.cpp:1647
kRegRXSDI1Status
@ kRegRXSDI1Status
Definition: ntv2publicinterface.h:702
kTCFormat30fps
@ kTCFormat30fps
Definition: ntv2rp188.h:32
NTV2_IS_ATC_LTC_TIMECODE_INDEX
#define NTV2_IS_ATC_LTC_TIMECODE_INDEX(__x__)
Definition: ntv2enums.h:3946
AJAAncillaryData::SetDID
virtual AJAStatus SetDID(const uint8_t inDataID)
Sets my Data ID (DID).
Definition: ancillarydata.cpp:200
NTV2ChannelSetConstIter
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
Definition: ntv2publicinterface.h:3855
NTV2TimeCodesConstIter
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
Definition: ntv2publicinterface.h:6877
TimecodeFormat
TimecodeFormat
Definition: ntv2rp188.h:27
AJAAncillaryData_Timecode_ATC::GetDBB1PayloadType
virtual AJAStatus GetDBB1PayloadType(AJAAncillaryData_Timecode_ATC_DBB1PayloadType &outType) const
Answers with my current payload type.
Definition: ancillarydata_timecode_atc.cpp:250
AJA_FrameRate_2400
@ AJA_FrameRate_2400
Definition: videotypes.h:220
AJAAncillaryData_Timecode::GetTimecodeFormatFromTimeBase
static AJAAncillaryData_Timecode_Format GetTimecodeFormatFromTimeBase(const AJATimeBase &inTimeBase)
Get the timecode format that matches the input timebase.
Definition: ancillarydata_timecode.cpp:621
AUTOCIRCULATE_STATUS::WithAudio
bool WithAudio(void) const
Definition: ntv2publicinterface.h:7324
NTV2_FIELD0
@ NTV2_FIELD0
Identifies the first field in time for an interlaced video frame, or the first and only field in a pr...
Definition: ntv2enums.h:1817
SDRAMAuditor
Audits an NTV2 device's SDRAM utilization, and can report contiguous regions of SDRAM,...
Definition: ntv2card.h:6591
NTV2_IS_VALID_AUDIO_RATE
#define NTV2_IS_VALID_AUDIO_RATE(_x_)
Definition: ntv2enums.h:1912
AJAAncillaryData_Timecode::GetDropFrameFlag
virtual AJAStatus GetDropFrameFlag(bool &bFlag, AJAAncillaryData_Timecode_Format tcFmt=AJAAncillaryData_Timecode_Format_Unknown) const
Definition: ancillarydata_timecode.cpp:413
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
CNTV2Card::GetFrameStamp
virtual bool GetFrameStamp(NTV2Crosspoint channelSpec, ULWord frameNum, FRAME_STAMP_STRUCT *pFrameStamp)
Definition: ntv2autocirculate.cpp:68
ePrerollAutoCirculate
@ ePrerollAutoCirculate
Definition: ntv2publicinterface.h:4251
AUTOCIRCULATE_DATA::bVal6
BOOL_ bVal6
Definition: ntv2publicinterface.h:4386
kTCFormat48fps
@ kTCFormat48fps
Definition: ntv2rp188.h:34
GetCurrentACChannelCrosspoint
static bool GetCurrentACChannelCrosspoint(CNTV2Card &inDevice, const NTV2Channel inChannel, NTV2Crosspoint &outCrosspoint)
Definition: ntv2autocirculate.cpp:205
AJAAncillaryData_Timecode_ATC_DBB1PayloadType_LTC
@ AJAAncillaryData_Timecode_ATC_DBB1PayloadType_LTC
Definition: ancillarydata_timecode_atc.h:25
AJAAncillaryList
I am an ordered collection of AJAAncillaryData instances which represent one or more SMPTE 291 data p...
Definition: ancillarylist.h:64
NTV2FrameRate
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:399
NTV2FramesizeToByteCount
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
Definition: ntv2utils.cpp:5347
FRAME_STAMP
This is returned by the CNTV2Card::AutoCirculateGetFrameStamp function, and is also embedded in the A...
Definition: ntv2publicinterface.h:7762
NTV2_CHANNEL_INVALID
@ NTV2_CHANNEL_INVALID
Definition: ntv2enums.h:1345
NTV2_Input2Select
@ NTV2_Input2Select
Definition: ntv2enums.h:2274
kTCFormat60fps
@ kTCFormat60fps
Definition: ntv2rp188.h:36
gSDIInRxStatusRegs
static const uint32_t gSDIInRxStatusRegs[]
Definition: ntv2autocirculate.cpp:984
kVRegAncField2Offset
@ kVRegAncField2Offset
Anc Field2 byte offset from end of frame buffer (GUMP on all boards except RTP for SMPTE2022/IP)
Definition: ntv2virtualregisters.h:336
AJA_FrameRate_1898
@ AJA_FrameRate_1898
Definition: videotypes.h:217
AUTOCIRCULATE_STATUS::acState
NTV2AutoCirculateState acState
Current AutoCirculate state.
Definition: ntv2publicinterface.h:7196
AUTOCIRCULATE_WITH_MULTILINK_AUDIO1
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO1
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 1.
Definition: ntv2publicinterface.h:5532
AJA_FrameRate_1500
@ AJA_FrameRate_1500
Definition: videotypes.h:214
AJAAncillaryList::IsEmpty
virtual bool IsEmpty(void) const
Definition: ancillarylist.h:204
AJA_FrameRate
AJA_FrameRate
Definition: videotypes.h:210
CNTV2DriverInterface::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: ntv2driverinterface.cpp:429
AUTOCIRCULATE_WITH_ANC
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
Definition: ntv2publicinterface.h:5528
AUTOCIRCULATE_DATA::lVal3
LWord lVal3
Definition: ntv2publicinterface.h:4376
AUTO_CIRC_COMMAND
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
AUTOCIRCULATE_WITH_FBFCHANGE
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
Definition: ntv2publicinterface.h:5524
NTV2_AUTOCIRCULATE_INVALID
@ NTV2_AUTOCIRCULATE_INVALID
Definition: ntv2publicinterface.h:4279
eAbortAutoCirc
@ eAbortAutoCirc
Definition: ntv2publicinterface.h:4253
FRAME_STAMP::acTimeCodes
NTV2Buffer acTimeCodes
Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCInde...
Definition: ntv2publicinterface.h:7790
NTV2_TCINDEX_SDI2_LTC
@ NTV2_TCINDEX_SDI2_LTC
SDI 2 embedded ATC LTC.
Definition: ntv2enums.h:3912
SDRAMAuditor::DumpBlocks
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
Definition: ntv2card.cpp:552
NTV2_RP188::fLo
ULWord fLo
| BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
Definition: ntv2publicinterface.h:6792
AJA_FrameRate_4795
@ AJA_FrameRate_4795
Definition: videotypes.h:224
kTCFormat50fps
@ kTCFormat50fps
Definition: ntv2rp188.h:35
NTV2_TCINDEX_SDI1_LTC
@ NTV2_TCINDEX_SDI1_LTC
SDI 1 embedded ATC LTC.
Definition: ntv2enums.h:3911
AJA_FrameRate_2500
@ AJA_FrameRate_2500
Definition: videotypes.h:221
NTV2CROSSPOINT_INVALID
@ NTV2CROSSPOINT_INVALID
Definition: ntv2enums.h:1696
NTV2_IS_STANDARD_TASKS
#define NTV2_IS_STANDARD_TASKS(__m__)
Definition: ntv2publicinterface.h:4297
kDeviceGetNumAudioSystems
@ kDeviceGetNumAudioSystems
The number of independent Audio Systems on the device.
Definition: ntv2devicefeatures.h:188
NTV2_RP188::fHi
ULWord fHi
| BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
Definition: ntv2publicinterface.h:6793
AJA_DebugUnit_Anc2110Xmit
@ AJA_DebugUnit_Anc2110Xmit
Definition: debugshare.h:95
kDeviceCanDo2110
@ kDeviceCanDo2110
True if device supports SMPTE ST2110.
Definition: ntv2devicefeatures.h:117
eGetFrameStamp
@ eGetFrameStamp
Definition: ntv2publicinterface.h:4249
FRAME_STAMP_STRUCT
Definition: ntv2publicinterface.h:4436
NTV2_TCINDEX_SDI1
@ NTV2_TCINDEX_SDI1
SDI 1 embedded VITC.
Definition: ntv2enums.h:3907
NTV2_TCINDEX_SDI2
@ NTV2_TCINDEX_SDI2
SDI 2 embedded VITC.
Definition: ntv2enums.h:3908
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:156
CNTV2Card::AutoCirculateGetFrameStamp
virtual bool AutoCirculateGetFrameStamp(const NTV2Channel inChannel, const ULWord inFrameNumber, FRAME_STAMP &outFrameInfo)
Returns precise timing information for the given frame and channel that's currently AutoCirculating.
Definition: ntv2autocirculate.cpp:667
AJAAncillaryData::SetLocationVideoLink
virtual AJAStatus SetLocationVideoLink(const AJAAncDataLink inLink)
Sets my ancillary data "location" within the video stream.
Definition: ancillarydata.cpp:285
AJATimeBase
Definition: timebase.h:18
lock.h
Declares the AJALock class.
NTV2Buffer::IsNULL
bool IsNULL(void) const
Definition: ntv2publicinterface.h:6118
kTCFormat25fps
@ kTCFormat25fps
Definition: ntv2rp188.h:31
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
AUTOCIRCULATE_STATUS
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
Definition: ntv2publicinterface.h:7193
XMTWARN
#define XMTWARN(__x__)
Definition: ntv2autocirculate.cpp:52
NTV2_AUDIOSYSTEM_Plus2
@ NTV2_AUDIOSYSTEM_Plus2
Definition: ntv2enums.h:3862
AJAAncillaryData
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
Definition: ancillarydata.h:552
kVRegAncField1Offset
@ kVRegAncField1Offset
Anc Field1 byte offset from end of frame buffer (GUMP on all boards except RTP for SMPTE2022/IP)
Definition: ntv2virtualregisters.h:335
ACINFO
#define ACINFO(__x__)
Definition: ntv2autocirculate.cpp:42
NTV2_AncRgn_Field1
@ NTV2_AncRgn_Field1
Identifies the "normal" Field 1 ancillary data region.
Definition: ntv2enums.h:4181
AJAAncDataChannel_Y
@ AJAAncDataChannel_Y
The ancillary data is associated with the luminance (Y) channel of the video stream.
Definition: ancillarydata.h:133
AUTOCIRCULATE_DATA::lVal1
LWord lVal1
Definition: ntv2publicinterface.h:4374
NTV2_IS_INPUT_CROSSPOINT
#define NTV2_IS_INPUT_CROSSPOINT(__x__)
Definition: ntv2enums.h:1699
AJAAncillaryData::GetPayloadData
virtual const uint8_t * GetPayloadData(void) const
Definition: ancillarydata.h:801
AJADebug::IsActive
static bool IsActive(int32_t index)
Definition: debug.cpp:279
CNTV2Card::AutoCirculateResume
virtual bool AutoCirculateResume(const NTV2Channel inChannel, const bool inClearDropCount=(0))
Resumes AutoCirculate for the given channel, picking up at the next frame without loss of audio synch...
Definition: ntv2autocirculate.cpp:591
kRegRXSDI7Status
@ kRegRXSDI7Status
Definition: ntv2publicinterface.h:756
sVPIDLineNumsF2
static const uint16_t sVPIDLineNumsF2[]
Definition: ntv2autocirculate.cpp:981
FRAME_STAMP::GetInputTimeCodes
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Returns all RP188 timecodes associated with the frame in NTV2TCIndex order.
Definition: ntv2publicinterface.cpp:2116
NTV2Mode
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
Definition: ntv2enums.h:1221
MAX_FRAMEBUFFERS
#define MAX_FRAMEBUFFERS
Definition: ntv2publicinterface.h:3689
NTV2_IS_VALID_STANDARD
#define NTV2_IS_VALID_STANDARD(__s__)
Definition: ntv2enums.h:179
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:5022
AJATimeCode::SetRP188
void SetRP188(const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi, const AJATimeBase &inTimeBase)
Definition: timecode.cpp:457
eFlushAutoCirculate
@ eFlushAutoCirculate
Definition: ntv2publicinterface.h:4250
ntv2card.h
Declares the CNTV2Card class.
NTV2TCIndex
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
Definition: ntv2enums.h:3904
eGetAutoCirc
@ eGetAutoCirc
Definition: ntv2publicinterface.h:4248
AJA_FrameRate_2398
@ AJA_FrameRate_2398
Definition: videotypes.h:219
AUTOCIRCULATE_DATA::lVal2
LWord lVal2
Definition: ntv2publicinterface.h:4375
AJA_FrameRate_5000
@ AJA_FrameRate_5000
Definition: videotypes.h:226
AUTOCIRCULATE_TRANSFER::acCrosspoint
NTV2Crosspoint acCrosspoint
Will be deprecated – used internally by the SDK. Will be removed when the driver changes to use NTV2C...
Definition: ntv2publicinterface.h:8088
sNTV2Rate2AJARate
static const AJA_FrameRate sNTV2Rate2AJARate[]
Definition: ntv2autocirculate.cpp:933
AUTOCIRCULATE_TRANSFER::GetCapturedAncByteCount
ULWord GetCapturedAncByteCount(const bool inField2=false) const
Definition: ntv2publicinterface.h:8379
NTV2_CHANNEL3
@ NTV2_CHANNEL3
Specifies channel or Frame Store 3 (or the 3rd item).
Definition: ntv2enums.h:1338
NTV2Buffer::CopyFrom
bool CopyFrom(const void *pInSrcBuffer, const ULWord inByteCount)
Replaces my contents from the given memory buffer, resizing me to the new byte count.
Definition: ntv2publicinterface.cpp:1735
UWord
uint16_t UWord
Definition: ajatypes.h:253
NTV2VANCModeToString
std::string NTV2VANCModeToString(const NTV2VANCMode inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6552
CNTV2Card::AutoCirculateGetStatus
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
Definition: ntv2autocirculate.cpp:646
PVOID
void * PVOID
Definition: ajatypes.h:318
NTV2_IS_VANCMODE_ON
#define NTV2_IS_VANCMODE_ON(__v__)
Definition: ntv2enums.h:3761
AUTOCIRCULATE_DATA::bVal5
BOOL_ bVal5
Definition: ntv2publicinterface.h:4385
AUTOCIRCULATE_TRANSFER
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
Definition: ntv2publicinterface.h:8002
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2Framesize
NTV2Framesize
Kona2/Xena2 specific enums.
Definition: ntv2enums.h:2091
CNTV2Card::S2110DeviceAncToBuffers
virtual bool S2110DeviceAncToBuffers(const NTV2Channel inChannel, NTV2Buffer &ancF1, NTV2Buffer &ancF2)
Definition: ntv2autocirculate.cpp:1387
kDeviceCanDoMultiLinkAudio
@ kDeviceCanDoMultiLinkAudio
True if device supports grouped audio system control.
Definition: ntv2devicefeatures.h:128
CNTV2Card::AutoCirculatePause
virtual bool AutoCirculatePause(const NTV2Channel inChannel, const UWord inAtFrameNum=0xFFFF)
Pauses AutoCirculate for the given channel. Once paused, AutoCirculate can be resumed later by callin...
Definition: ntv2autocirculate.cpp:570
AUTOCIRCULATE_WITH_AUDIO_CONTROL
#define AUTOCIRCULATE_WITH_AUDIO_CONTROL
Use this to AutoCirculate with no audio but with audio control.
Definition: ntv2publicinterface.h:5529
AJA_SUCCESS
#define AJA_SUCCESS(_status_)
Definition: types.h:370
CNTV2Card
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
AJAAncillaryList::GetAncillaryDataAtIndex
virtual AJAAncillaryData * GetAncillaryDataAtIndex(const uint32_t inIndex) const
Answers with the AJAAncillaryData object at the given index.
Definition: ancillarylist.cpp:189
AJAAncillaryData::AsString
virtual std::string AsString(const uint16_t inDumpMaxBytes=0) const
Definition: ancillarydata.cpp:1440
NTV2ChannelToInputCrosspoint
NTV2Crosspoint NTV2ChannelToInputCrosspoint(const NTV2Channel inChannel)
Definition: ntv2utils.cpp:4975
ACDBG
#define ACDBG(__x__)
Definition: ntv2autocirculate.cpp:43
AJAAncillaryData_Timecode::GetTimecode
virtual AJAStatus GetTimecode(AJATimeCode &outTimecode, const AJATimeBase &inTimeBase) const
Answers with my timecode "time" as an AJATimeCode.
Definition: ancillarydata_timecode.cpp:235
AUTOCIRCULATE_STATUS::IsStopped
bool IsStopped(void) const
Definition: ntv2publicinterface.h:7309
AJAAncillaryList::AddAncillaryData
virtual AJAStatus AddAncillaryData(const AJAAncillaryList &inPackets)
Appends a copy of the given list's packets to me.
Definition: ancillarylist.cpp:317
NTV2ChannelToOutputCrosspoint
NTV2Crosspoint NTV2ChannelToOutputCrosspoint(const NTV2Channel inChannel)
Definition: ntv2utils.cpp:4986
RCVWARN
#define RCVWARN(__x__)
Definition: ntv2autocirculate.cpp:46
AJAAncillaryData::SetPayloadData
virtual AJAStatus SetPayloadData(const uint8_t *pInData, const uint32_t inByteCount)
Copy data from external memory into my local payload memory.
Definition: ancillarydata.cpp:354
AUTOCIRCULATE_DATA::lVal4
LWord lVal4
Definition: ntv2publicinterface.h:4377
eStartAutoCirc
@ eStartAutoCirc
Definition: ntv2publicinterface.h:4245
NTV2_RP188::fDBB
ULWord fDBB
Definition: ntv2publicinterface.h:6791
AJAAncillaryData_Timecode::SetTimecode
virtual AJAStatus SetTimecode(const AJATimeCode &inTimecode, const AJATimeBase &inTimeBase, const bool inIsDropFrame)
Sets my timecode "time" from an AJATimeCode.
Definition: ancillarydata_timecode.cpp:224
NTV2ChannelSet
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Definition: ntv2publicinterface.h:3854
AUTOCIRCULATE_TRANSFER_STATUS::acFrameStamp
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
Definition: ntv2publicinterface.h:7920
AUTOCIRCULATE_TRANSFER::acANCField2Buffer
NTV2Buffer acANCField2Buffer
The host "Field 2" ancillary data buffer. This field is owned by the client application,...
Definition: ntv2publicinterface.h:8039
AJAAncillaryList::CountAncillaryData
virtual uint32_t CountAncillaryData(void) const
Answers with the number of AJAAncillaryData objects I contain (any/all types).
Definition: ancillarylist.h:199
AJAAncillaryData_Timecode_ATC::SetDBB1PayloadType
virtual AJAStatus SetDBB1PayloadType(const AJAAncillaryData_Timecode_ATC_DBB1PayloadType inType)
Sets my payload type.
Definition: ancillarydata_timecode_atc.cpp:242
CNTV2Card::S2110DeviceAncToXferBuffers
virtual bool S2110DeviceAncToXferBuffers(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &inOutXferInfo)
Definition: ntv2autocirculate.cpp:1144
CRP188
Definition: ntv2rp188.h:55
NTV2_STANDARD_TASKS
@ NTV2_STANDARD_TASKS
1: Standard/Retail: Device is completely controlled by AJA ControlPanel, service/daemon,...
Definition: ntv2publicinterface.h:4291
AUTOCIRCULATE_STATUS::GetEndFrame
uint16_t GetEndFrame(void) const
Definition: ntv2publicinterface.h:7284
AJA_FrameRate_5994
@ AJA_FrameRate_5994
Definition: videotypes.h:227
AJA_FrameRate_1800
@ AJA_FrameRate_1800
Definition: videotypes.h:216
AJAAncillaryData_Timecode_ATC_DBB1PayloadType_VITC2
@ AJAAncillaryData_Timecode_ATC_DBB1PayloadType_VITC2
Definition: ancillarydata_timecode_atc.h:27
gFBAllocLockName
static const char gFBAllocLockName[]
Definition: ntv2autocirculate.cpp:58
NTV2_AncRgn_MonField2
@ NTV2_AncRgn_MonField2
Identifies the "monitor" or "auxiliary" Field 2 ancillary data region.
Definition: ntv2enums.h:4184
NTV2VANCMode
NTV2VANCMode
These enum values identify the available VANC modes.
Definition: ntv2enums.h:3750
AJA_FrameRate_4800
@ AJA_FrameRate_4800
Definition: videotypes.h:225
AJALock
Definition: lock.h:30
CNTV2Card::GetMode
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
Definition: ntv2register.cpp:1625
GetSmpteLineNumber
NTV2SmpteLineNumber GetSmpteLineNumber(const NTV2Standard inStandard)
For the given video standard, returns the SMPTE-designated line numbers for Field 1 and Field 2 that ...
Definition: ntv2utils.h:963
ACWARN
#define ACWARN(__x__)
Definition: ntv2autocirculate.cpp:40
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:199
AUTOCIRCULATE_TRANSFER::acTransferStatus
AUTOCIRCULATE_TRANSFER_STATUS acTransferStatus
Contains status information that's valid after CNTV2Card::AutoCirculateTransfer returns,...
Definition: ntv2publicinterface.h:8054
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1348
NTV2_VANCMODE_INVALID
@ NTV2_VANCMODE_INVALID
This identifies the invalid (unspecified, uninitialized) VANC mode.
Definition: ntv2enums.h:3755
kVRegRP188SourceSelect
@ kVRegRP188SourceSelect
Definition: ntv2virtualregisters.h:162
NTV2ChannelToInputChannelSpec
#define NTV2ChannelToInputChannelSpec
Definition: ntv2utils.h:596
AJAAncillaryList::CompareWithInfo
virtual std::string CompareWithInfo(const AJAAncillaryList &inCompareList, const bool inIgnoreLocation=true, const bool inIgnoreChecksum=true) const
Compares me with another list and returns a std::string that contains a human-readable explanation of...
Definition: ancillarylist.cpp:482
AUTOCIRCULATE_DATA::bVal1
BOOL_ bVal1
Definition: ntv2publicinterface.h:4381
AJAAncDataHorizOffset_AnyHanc
#define AJAAncDataHorizOffset_AnyHanc
HANC – Packet placed/found in any legal area of raster line after EAV.
Definition: ancillarydata.h:211
AJAAncillaryData_Timecode_ATC
I am the ATC-specific (analog) subclass of the AJAAncillaryData_Timecode class.
Definition: ancillarydata_timecode_atc.h:43
NTV2Buffer::GetHostAddress
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
Definition: ntv2publicinterface.cpp:1703
NTV2Buffer::GetHostPointer
void * GetHostPointer(void) const
Definition: ntv2publicinterface.h:6079
AJAAutoLock
Definition: lock.h:91
DEVICE_ID_IOIP_2110
@ DEVICE_ID_IOIP_2110
See Io IP.
Definition: ntv2enums.h:39
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:521
kVRegInputSelect
@ kVRegInputSelect
Definition: ntv2virtualregisters.h:41
AUTOCIRCULATE_WITH_VIDPROC
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
Definition: ntv2publicinterface.h:5527
AJAAncillaryList::CountAncillaryDataWithID
virtual uint32_t CountAncillaryDataWithID(const uint8_t inDID, const uint8_t inSID) const
Answers with the number of AncillaryData objects having the given DataID and SecondaryID.
Definition: ancillarylist.cpp:263
NTV2_IS_QUAD_QUAD_FORMAT
#define NTV2_IS_QUAD_QUAD_FORMAT(__f__)
Definition: ntv2enums.h:801
AUTOCIRCULATE_WITH_FBOCHANGE
#define AUTOCIRCULATE_WITH_FBOCHANGE
Use this to AutoCirculate with the possibility of frame buffer orientation changes.
Definition: ntv2publicinterface.h:5525
SDRAMAuditor::TranslateRegions
bool TranslateRegions(ULWordSequence &outRgns, const ULWordSequence &inRgns, const bool inIsQuad, const bool inIsQuadQuad) const
Translates an 8MB-chunked list of regions into another list of regions with frame indexes and sizes e...
Definition: ntv2card.cpp:659
AUTOCIRCULATE_DATA::lVal6
LWord lVal6
Definition: ntv2publicinterface.h:4379
NTV2AudioRate
NTV2AudioRate
Definition: ntv2enums.h:1903
AJAAncillaryData_Timecode_ATC::SetDBB
virtual AJAStatus SetDBB(uint8_t dbb1, uint8_t dbb2)
Definition: ancillarydata_timecode_atc.cpp:114
NTV2_TCINDEX_SDI1_2
@ NTV2_TCINDEX_SDI1_2
SDI 1 embedded VITC 2.
Definition: ntv2enums.h:3925
AUTOCIRCULATE_STATUS_STRUCT
Definition: ntv2publicinterface.h:4313
NTV2SmpteLineNumber
Used to describe Start of Active Video (SAV) location and field dominance for a given NTV2Standard....
Definition: ntv2utils.h:877
LWord64
int64_t LWord64
Definition: ajatypes.h:257
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5606
AJAAncillaryData::SetLocationLineNumber
virtual AJAStatus SetLocationLineNumber(const uint16_t inLineNum)
Sets my ancillary data "location" frame line number.
Definition: ancillarydata.cpp:321
AJAAncDataStream_1
@ AJAAncDataStream_1
The ancillary data is associated with DS1 of the video stream (Link A).
Definition: ancillarydata.h:105
common.h
Private include file for all ajabase sources.
AUTOCIRCULATE_WITH_MULTILINK_AUDIO2
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO2
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 2.
Definition: ntv2publicinterface.h:5533
UByte
uint8_t UByte
Definition: ajatypes.h:250
AUTOCIRCULATE_WITH_RP188
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
Definition: ntv2publicinterface.h:5522
kRegRXSDI6Status
@ kRegRXSDI6Status
Definition: ntv2publicinterface.h:747
kVRegZeroHostAncPostCapture
@ kVRegZeroHostAncPostCapture
Definition: ntv2virtualregisters.h:466
FRAME_STAMP::SetInputTimecode
bool SetInputTimecode(const NTV2TCIndex inTCNdx, const NTV2_RP188 &inTimecode)
Sets one of my input timecodes.
Definition: ntv2publicinterface.cpp:2188
NTV2TCIndexesConstIter
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Definition: ntv2publicinterface.h:6880
kRegRXSDI2Status
@ kRegRXSDI2Status
Definition: ntv2publicinterface.h:711
HEX0N
#define HEX0N(__x__, __n__)
Definition: debug.cpp:1175
AUTOCIRCULATE_TRANSFER_STATUS::acState
NTV2AutoCirculateState acState
Current AutoCirculate state after the transfer.
Definition: ntv2publicinterface.h:7915
AJAAncillaryData_Timecode_ATC_DBB1PayloadType_Unknown
@ AJAAncillaryData_Timecode_ATC_DBB1PayloadType_Unknown
Definition: ancillarydata_timecode_atc.h:36
NTV2_RP188::IsValid
bool IsValid(void) const
Answers true if I'm valid, or false if I'm not valid.
Definition: ntv2publicinterface.h:6832
AUTOCIRCULATE_STATUS::Clear
void Clear(void)
Clears my data.
Definition: ntv2publicinterface.cpp:2484
ACFAIL
#define ACFAIL(__x__)
Definition: ntv2autocirculate.cpp:39
kRegRXSDI3Status
@ kRegRXSDI3Status
Definition: ntv2publicinterface.h:720
NTV2_IS_VALID_NTV2CROSSPOINT
#define NTV2_IS_VALID_NTV2CROSSPOINT(__x__)
Definition: ntv2enums.h:1717
NTV2TimeCodes
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
Definition: ntv2publicinterface.h:6876
AJA_FrameRate_12000
@ AJA_FrameRate_12000
Definition: videotypes.h:231
kRP188SourceLTCPort
@ kRP188SourceLTCPort
Definition: ntv2publicinterface.h:5052
ULWord64
uint64_t ULWord64
Definition: ajatypes.h:258
AJAAncillaryList::GetTransmitData
virtual AJAStatus GetTransmitData(NTV2Buffer &F1Buffer, NTV2Buffer &F2Buffer, const bool inIsProgressive=true, const uint32_t inF2StartLine=0)
Encodes my AJAAncillaryData packets into the given buffers in the default SDI Anc Buffer Data Format ...
Definition: ancillarylist.cpp:1277
std
Definition: json.hpp:5362
NTV2_RP188
This struct replaces the old RP188_STRUCT.
Definition: ntv2publicinterface.h:6790
AJAAncillaryData_Timecode_Format
AJAAncillaryData_Timecode_Format
Definition: ancillarydata_timecode.h:17
AJA_FrameRate_1798
@ AJA_FrameRate_1798
Definition: videotypes.h:215
kRP188SourceEmbeddedVITC2
@ kRP188SourceEmbeddedVITC2
Definition: ntv2publicinterface.h:5051
AUTOCIRCULATE_WITH_HDMIAUX
#define AUTOCIRCULATE_WITH_HDMIAUX
Use this to AutoCirculate with HDMI auxiliary data.
Definition: ntv2publicinterface.h:5531
AJA_DebugUnit_Anc2110Rcv
@ AJA_DebugUnit_Anc2110Rcv
Definition: debugshare.h:96
ePauseAutoCirc
@ ePauseAutoCirc
Definition: ntv2publicinterface.h:4247
NTV2_FRAMERATE_UNKNOWN
@ NTV2_FRAMERATE_UNKNOWN
Represents an unknown or invalid frame rate.
Definition: ntv2enums.h:401
NTV2EndianSwap32BtoH
#define NTV2EndianSwap32BtoH(__val__)
Definition: ntv2endian.h:63
RP188SourceFilterSelect
RP188SourceFilterSelect
Definition: ntv2publicinterface.h:5047
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
eInitAutoCirc
@ eInitAutoCirc
Definition: ntv2publicinterface.h:4244
ULWordSequence
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:46
AUTOCIRCULATE_TRANSFER::SetAllOutputTimeCodes
bool SetAllOutputTimeCodes(const NTV2_RP188 &inTimecode, const bool inIncludeF2=true)
Intended for playout, replaces all elements of my acOutputTimeCodes member with the given timecode va...
Definition: ntv2publicinterface.cpp:2792
gFBAllocLock
static AJALock gFBAllocLock(gFBAllocLockName)
AUTOCIRCULATE_STATUS::GetStartFrame
uint16_t GetStartFrame(void) const
Definition: ntv2publicinterface.h:7279
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
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
RCVDBG
#define RCVDBG(__x__)
Definition: ntv2autocirculate.cpp:49
eStopAutoCirc
@ eStopAutoCirc
Definition: ntv2publicinterface.h:4246
NTV2_TCINDEX_DEFAULT
@ NTV2_TCINDEX_DEFAULT
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel)
Definition: ntv2enums.h:3906
sVPIDLineNumsF1
static const uint16_t sVPIDLineNumsF1[]
Definition: ntv2autocirculate.cpp:980
AUTOCIRCULATE_WITH_LTC
#define AUTOCIRCULATE_WITH_LTC
Use this to AutoCirculate with analog LTC.
Definition: ntv2publicinterface.h:5523
XMTDBG
#define XMTDBG(__x__)
Definition: ntv2autocirculate.cpp:55
ntv2rp188.h
Declares the CRP188 class. See SMPTE RP188 standard for details.
NTV2EveryFrameTaskMode
NTV2EveryFrameTaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
Definition: ntv2publicinterface.h:4288
AJAAncDataStream_2
@ AJAAncDataStream_2
The ancillary data is associated with DS2 of the video stream (Link A).
Definition: ancillarydata.h:106
CRP188::SetDropFrame
void SetDropFrame(bool bDropFrameFlag)
Definition: ntv2rp188.cpp:734
true
#define true
Definition: ntv2devicefeatures.h:26
NTV2_TCINDEX_INVALID
@ NTV2_TCINDEX_INVALID
Definition: ntv2enums.h:3934
NTV2_IS_QUAD_FRAME_FORMAT
#define NTV2_IS_QUAD_FRAME_FORMAT(__f__)
Definition: ntv2enums.h:794
NTV2_IS_VALID_NTV2FrameRate
#define NTV2_IS_VALID_NTV2FrameRate(__r__)
Definition: ntv2enums.h:431
AJAAncillaryData_Timecode_ATC::GeneratePayloadData
virtual AJAStatus GeneratePayloadData(void)
Generate the payload data from the "local" ancillary data.
Definition: ancillarydata_timecode_atc.cpp:190
AJA_FrameRate_6000
@ AJA_FrameRate_6000
Definition: videotypes.h:228
AUTOCIRCULATE_DATA::bVal4
BOOL_ bVal4
Definition: ntv2publicinterface.h:4384
GetAudioSamplesPerSecond
double GetAudioSamplesPerSecond(const NTV2AudioRate inAudioRate)
Returns the audio sample rate as a number of audio samples per second.
Definition: ntv2utils.cpp:3203
AJARTPAncPayloadHeader::BufferStartsWithRTPHeader
static bool BufferStartsWithRTPHeader(const NTV2Buffer &inBuffer)
Definition: ancillarydata.cpp:2172
AUTOCIRCULATE_TRANSFER::acOutputTimeCodes
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device....
Definition: ntv2publicinterface.h:8047
eSetActiveFrame
@ eSetActiveFrame
Definition: ntv2publicinterface.h:4259
NTV2_MODE_INVALID
@ NTV2_MODE_INVALID
The invalid mode.
Definition: ntv2enums.h:1227
NTV2ChannelToString
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5787
IS_LINKB_AJAAncDataStream
#define IS_LINKB_AJAAncDataStream(_x_)
Definition: ancillarydata.h:115
NTV2Buffer::Fill
bool Fill(const T &inValue)
Fills me with the given scalar value.
Definition: ntv2publicinterface.h:6248
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
AUTOCIRCULATE_DATA::bVal8
BOOL_ bVal8
Definition: ntv2publicinterface.h:4388
NTV2_IS_OUTPUT_CROSSPOINT
#define NTV2_IS_OUTPUT_CROSSPOINT(__x__)
Definition: ntv2enums.h:1708
AUTOCIRCULATE_STATUS::GetFrameCount
ULWord GetFrameCount(void) const
Definition: ntv2publicinterface.h:7239
kVRegZeroDeviceAncPostCapture
@ kVRegZeroDeviceAncPostCapture
Definition: ntv2virtualregisters.h:467
kTCFormatUnknown
@ kTCFormatUnknown
Definition: ntv2rp188.h:29
AUTOCIRCULATE_WITH_COLORCORRECT
#define AUTOCIRCULATE_WITH_COLORCORRECT
Use this to AutoCirculate with color correction.
Definition: ntv2publicinterface.h:5526
FRAME_STAMP::acFrameTime
LWord64 acFrameTime
On exit, contains host OS clock at time of capture/play. On entry, contains NTV2Channel of interest,...
Definition: ntv2publicinterface.h:7764
NTV2_IS_INPUT_MODE
#define NTV2_IS_INPUT_MODE(__mode__)
Definition: ntv2enums.h:1231
FRAME_STAMP_STRUCT::frame
ULWord frame
The frame requested or -1 if not available.
Definition: ntv2publicinterface.h:4449
SDRAMAuditor::GetBadRegions
bool GetBadRegions(ULWordSequence &outBlks) const
Answers with the list of colliding and illegal memory regions.
Definition: ntv2card.h:6656
FRAME_STAMP::acRequestedFrame
ULWord acRequestedFrame
The frame requested (0xFFFFFFFF == "not available"), including for new API (FRAME_STAMP message).
Definition: ntv2publicinterface.h:7766
AUTOCIRCULATE_DATA::bVal7
BOOL_ bVal7
Definition: ntv2publicinterface.h:4387
BIT
#define BIT(_x_)
Definition: ajatypes.h:563
xHEX0N
#define xHEX0N(__x__, __n__)
Definition: ntv2publicinterface.h:5605
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3848
AJA_FAILURE
#define AJA_FAILURE(_status_)
Definition: types.h:371
NTV2_AUDIO_RATE_INVALID
@ NTV2_AUDIO_RATE_INVALID
Definition: ntv2enums.h:1909
NTV2_IS_SUPPORTED_NTV2FrameRate
#define NTV2_IS_SUPPORTED_NTV2FrameRate(__r__)
Definition: ntv2enums.h:432
DEVICE_ID_IOIP_2110_RGB12
@ DEVICE_ID_IOIP_2110_RGB12
See Io IP.
Definition: ntv2enums.h:40
NTV2_IS_VALID_AUDIO_SYSTEM
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
Definition: ntv2enums.h:3867
AUTOCIRCULATE_DATA::pvVal1
void * pvVal1
Definition: ntv2publicinterface.h:4390
NTV2_TCINDEX_LTC1
@ NTV2_TCINDEX_LTC1
Analog LTC 1.
Definition: ntv2enums.h:3913
NTV2_FRAMESIZE_INVALID
@ NTV2_FRAMESIZE_INVALID
Definition: ntv2enums.h:2110
NTV2_MODE_DISPLAY
@ NTV2_MODE_DISPLAY
Playout (output) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1223
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:8028
NTV2Crosspoint
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
Definition: ntv2enums.h:1675
CNTV2Card::AutoCirculateStop
virtual bool AutoCirculateStop(const NTV2Channel inChannel, const bool inAbort=(0))
Stops AutoCirculate for the given channel, and releases the on-device frame buffers that were allocat...
Definition: ntv2autocirculate.cpp:519
AUTOCIRCULATE_TRANSFER_STATUS::GetFrameStamp
const FRAME_STAMP & GetFrameStamp(void) const
Definition: ntv2publicinterface.h:7936
NTV2_IS_OUTPUT_MODE
#define NTV2_IS_OUTPUT_MODE(__mode__)
Definition: ntv2enums.h:1232
CNTV2Card::AutoCirculateFlush
virtual bool AutoCirculateFlush(const NTV2Channel inChannel, const bool inClearDropCount=(0))
Flushes AutoCirculate for the given channel.
Definition: ntv2autocirculate.cpp:610
AJAAncDataLink_A
@ AJAAncDataLink_A
The ancillary data is associated with Link A of the video stream.
Definition: ancillarydata.h:81
AJAAncDataType_Timecode_ATC
@ AJAAncDataType_Timecode_ATC
SMPTE 12-M Ancillary Timecode (formerly known as "RP-188")
Definition: ancillarydata.h:48
debug.h
Declares the AJADebug class.
AUTOCIRCULATE_DATA
Definition: ntv2publicinterface.h:4369
NTV2_IS_PROGRESSIVE_STANDARD
#define NTV2_IS_PROGRESSIVE_STANDARD(__s__)
Definition: ntv2enums.h:180
NTV2_OEM_TASKS
@ NTV2_OEM_TASKS
2: OEM: Device is configured by controlling application(s), with minimal driver involvement.
Definition: ntv2publicinterface.h:4292
CNTV2Card::GetAutoCirculate
virtual bool GetAutoCirculate(NTV2Crosspoint channelSpec, AUTOCIRCULATE_STATUS_STRUCT *autoCirculateStatus)
Definition: ntv2autocirculate.cpp:96
AJAAncillaryData::SetLocationDataChannel
virtual AJAStatus SetLocationDataChannel(const AJAAncDataChannel inChannel)
Sets my ancillary data "location" data channel value (Y or C).
Definition: ancillarydata.cpp:309
AUTOCIRCULATE_STATUS::GetAudioSystem
NTV2AudioSystem GetAudioSystem(void) const
Definition: ntv2publicinterface.h:7294
AUTOCIRCULATE_TRANSFER::acRP188
NTV2_RP188 acRP188
Will be deprecated – use AUTOCIRCULATE_TRANSFER::SetOutputTimeCode instead.
Definition: ntv2publicinterface.h:8087
NTV2_AUTOCIRCULATE_DISABLED
@ NTV2_AUTOCIRCULATE_DISABLED
The AutoCirculate channel is stopped.
Definition: ntv2publicinterface.h:4272
AJATimeCode
Utility class for timecodes.
Definition: timecode.h:17
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3860