 |
AJA NTV2 SDK
17.6.0.2675
NTV2 SDK 17.6.0.2675
|
Go to the documentation of this file.
25 #if defined(MSWindows)
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
36 #define ACINSTP(_p_) " " << HEX0N(uint64_t(_p_),8)
37 #define ACTHIS ACINSTP(this)
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__)
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__)
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__)
71 if (! _boardOpened )
return false;
81 pFrameStamp->
frame = frameNum;
84 return AutoCirculate (autoCircData);
99 if (!_boardOpened)
return false;
102 autoCirculateStatus -> channelSpec = channelSpec;
109 return AutoCirculate (autoCircData);
115 outStartFrame = outEndFrame = -1;
117 {
ACFAIL(GetDescription() <<
": Not open");
return false;}
119 {
ACFAIL(GetDescription() <<
": Must request at least one frame");
return false;}
125 bool isQuad(
false), isQuadQuad(
false), wasEnabled(
false);
129 while (IsChannelEnabled(ch, wasEnabled) && wasEnabled)
131 enabledFrameStores.insert(ch);
132 if (enabledFrameStores.size() == 1)
134 GetVideoFormat(vFmt, inFrameStore);
137 if (!isQuad && !isQuadQuad)
144 DisableChannels(enabledFrameStores);
151 if (!enabledFrameStores.empty())
152 EnableChannels(enabledFrameStores);
154 if (freeRgns8MB.empty())
155 {
ACFAIL(GetDescription() <<
": No free regions");
return false;}
157 {
ACFAIL(GetDescription() <<
": TranslateRegions failed");
return false;}
158 if (freeRgns.empty())
159 {
ACFAIL(GetDescription() <<
": No free regions after translation");
return false;}
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)
168 outStartFrame =
LWord(startFrame);
169 outEndFrame =
LWord(startFrame + inFrameCount - 1);
172 const string qstr (isQuad ?
" quad" : (isQuadQuad ?
" quad-quad" :
""));
173 if (outStartFrame < 0 || outEndFrame < 0)
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));
186 dump <<
"Frms " <<
DEC0N(startBlk,3) <<
"-" <<
DEC0N(startBlk+numBlks-1,3) <<
" ";
188 dump <<
"Frm " <<
DEC0N(startBlk,3) <<
" ";
190 dump <<
DEC0N(startBlk8,3) <<
"-" <<
DEC0N(startBlk8+numBlks8-1,3) << endl;
192 dump <<
DEC0N(startBlk8,3) << endl;
194 ACFAIL(GetDescription() <<
": Cannot find " <<
DEC(inFrameCount) <<
" contiguous" << qstr <<
" frames in these " << dump.str());
197 ACINFO(GetDescription() <<
": Found requested " <<
DEC(inFrameCount) <<
" contiguous" << qstr <<
" frames (" <<
DEC(outStartFrame) <<
"-" <<
DEC(outEndFrame) <<
")");
209 if (!inDevice.IsOpen ())
214 if (!inDevice.
GetMode (inChannel, mode))
222 const UWord inFrameCount,
224 const ULWord inOptionFlags,
225 const UByte inNumChannels,
226 const UWord inStartFrameNumber,
227 const UWord inEndFrameNumber)
230 {
ACFAIL(GetDescription() <<
": Ch" <<
DEC(inChannel+1) <<
" is illegal channel value");
return false;}
231 if (!inNumChannels || inNumChannels > 8)
232 {
ACFAIL(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
": illegal 'inNumChannels' value '" <<
DEC(inNumChannels) <<
"' -- must be 1-8");
return false;}
234 {
ACFAIL(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
": FBAllocLock mutex not ready");
return false;}
237 LWord startFrameNumber(
LWord(inStartFrameNumber+0));
238 LWord endFrameNumber (
LWord(inEndFrameNumber+0));
239 if (!endFrameNumber && !startFrameNumber)
242 {
ACFAIL(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
": Zero frames requested");
return false;}
243 if (!FindUnallocatedFrames (inFrameCount, startFrameNumber, endFrameNumber, inChannel))
246 else if (inFrameCount)
247 ACWARN (GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
": FrameCount " <<
DEC(inFrameCount) <<
" ignored -- using start/end " <<
DEC(inStartFrameNumber)
248 <<
"/" <<
DEC(inEndFrameNumber) <<
" frame numbers");
249 if (endFrameNumber < startFrameNumber)
250 {
ACFAIL(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
": EndFrame(" <<
DEC(endFrameNumber) <<
") precedes StartFrame(" <<
DEC(startFrameNumber) <<
")");
return false;}
251 if ((endFrameNumber - startFrameNumber + 1) < 2)
252 {
ACFAIL(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
": Frames " <<
DEC(startFrameNumber) <<
"-" <<
DEC(endFrameNumber) <<
" < 2 frames");
return false;}
254 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": Start frame " <<
DEC(startFrameNumber) <<
" exceeds max " <<
DEC(
MAX_FRAMEBUFFERS-1));
return false;}
256 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": End frame " <<
DEC(endFrameNumber) <<
" exceeds max " <<
DEC(
MAX_FRAMEBUFFERS-1));
return false;}
258 ACWARN(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
": MultiLink Audio requested, but device doesn't support it");
262 if (numAudSystems &&
UWord(inAudioSystem) >= numAudSystems)
263 {
ACFAIL(GetDescription() <<
": Invalid audio system specified: AudSys" <<
DEC(inAudioSystem+1) <<
" -- exceeds max legal AudSys" <<
DEC(numAudSystems));
return false;}
268 autoCircData.
lVal1 = startFrameNumber;
269 autoCircData.
lVal2 = endFrameNumber;
270 autoCircData.
lVal3 = inAudioSystem;
277 autoCircData.
lVal4 = inNumChannels;
283 autoCircData.
bVal1 =
false;
294 const bool result (AutoCirculate(autoCircData));
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));
307 const string infoStr (
aja::join(tags,
", "));
308 ostringstream acLabel; acLabel <<
"AC" <<
DEC(inChannel+1);
309 if (infoStr.find(acLabel.str()) != string::npos)
310 { ostringstream warning;
312 warning <<
"Frms " <<
DEC0N(startBlk,3) <<
"-" <<
DEC0N(startBlk+numBlks-1,3);
314 warning <<
"Frm " <<
DEC0N(startBlk,3);
315 ACWARN(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
": memory overlap/interference: " << warning.str() <<
": " << infoStr);
321 if (AutoCirculateGetStatus (inChannel, stat) && !stat.
IsStopped() && stat.
WithAudio())
323 ULWord audChlsPerSample(0);
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));
339 <<
DEC(maxVideoFrames) <<
"-frame max buffer capacity of AudSys" <<
DEC(stat.
GetAudioSystem()+1));
344 ACINFO(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
" initialized using frames " <<
DEC(startFrameNumber) <<
"-" <<
DEC(endFrameNumber));
347 ACFAIL(GetDescription() <<
": Input Ch" <<
DEC(inChannel+1) <<
" initialization failed");
355 const ULWord inOptionFlags,
356 const UByte inNumChannels)
358 return inFrameRange ? AutoCirculateInitForInput (inChannel, inFrameRange.count(), inAudioSystem, inOptionFlags,
359 inNumChannels, inFrameRange.firstFrame(), inFrameRange.lastFrame())
365 const UWord inFrameCount,
367 const ULWord inOptionFlags,
368 const UByte inNumChannels,
369 const UWord inStartFrameNumber,
370 const UWord inEndFrameNumber)
373 {
ACFAIL(GetDescription() <<
": Ch" <<
DEC(inChannel+1) <<
" is illegal channel value");
return false;}
374 if (!inNumChannels || inNumChannels > 8)
375 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": illegal 'inNumChannels' value '" <<
DEC(inNumChannels) <<
"' -- must be 1-8");
return false;}
377 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": FBAllocLock mutex not ready");
return false;}
380 LWord startFrameNumber(
LWord(inStartFrameNumber+0));
381 LWord endFrameNumber (
LWord(inEndFrameNumber+0));
382 if (!endFrameNumber && !startFrameNumber)
385 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": Zero frames requested");
return false;}
386 if (!FindUnallocatedFrames (inFrameCount, startFrameNumber, endFrameNumber, inChannel))
389 else if (inFrameCount)
390 ACWARN (GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": FrameCount " <<
DEC(inFrameCount) <<
" ignored -- using start/end "
391 <<
DEC(inStartFrameNumber) <<
"/" <<
DEC(inEndFrameNumber) <<
" frame numbers");
392 if (endFrameNumber < startFrameNumber)
393 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": EndFrame(" <<
DEC(endFrameNumber) <<
") precedes StartFrame("
394 <<
DEC(startFrameNumber) <<
")");
return false;}
395 if ((endFrameNumber - startFrameNumber + 1) < 2)
396 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": Frames " <<
DEC(startFrameNumber) <<
"-" <<
DEC(endFrameNumber) <<
" < 2 frames");
return false;}
398 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": Start frame " <<
DEC(startFrameNumber) <<
" exceeds max " <<
DEC(
MAX_FRAMEBUFFERS-1));
return false;}
400 {
ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": End frame " <<
DEC(endFrameNumber) <<
" exceeds max " <<
DEC(
MAX_FRAMEBUFFERS-1));
return false;}
402 ACWARN(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": MultiLink Audio requested, but device doesn't support it");
406 if (numAudSystems &&
UWord(inAudioSystem) >= numAudSystems)
407 {
ACFAIL(GetDescription() <<
": Invalid audio system specified: AudSys" <<
DEC(inAudioSystem+1) <<
" -- exceeds max legal AudSys" <<
DEC(numAudSystems));
return false;}
415 ACWARN(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
"AUTOCIRCULATE_WITH_ANC set, but also has "
421 autoCircData.
lVal1 = startFrameNumber;
422 autoCircData.
lVal2 = endFrameNumber;
423 autoCircData.
lVal3 = inAudioSystem;
430 autoCircData.
lVal4 = inNumChannels;
436 autoCircData.
bVal1 =
false;
450 autoCircData.
bVal7 =
true;
451 ACWARN(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1)
452 <<
": AUTOCIRCULATE_WITH_RP188 requested without AUTOCIRCULATE_WITH_ANC -- enabled AUTOCIRCULATE_WITH_ANC anyway");
455 const bool result (AutoCirculate(autoCircData));
463 for (
size_t ndx(0); ndx < badRgns.size(); ndx++)
464 {
const ULWord rgnInfo(badRgns.at(ndx));
465 const UWord startBlk(rgnInfo >> 16), numBlks(
UWord(rgnInfo & 0x0000FFFF));
468 const string infoStr (
aja::join(tags,
", "));
469 ostringstream acLabel; acLabel <<
"AC" <<
DEC(inChannel+1);
470 if (infoStr.find(acLabel.str()) != string::npos)
471 { ostringstream warning;
473 warning <<
"Frms " <<
DEC0N(startBlk,3) <<
"-" <<
DEC0N(startBlk+numBlks-1,3);
475 warning <<
"Frm " <<
DEC0N(startBlk,3);
476 ACWARN(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
": memory overlap/interference: " << warning.str() <<
": " << infoStr);
482 if (AutoCirculateGetStatus (inChannel, stat) && !stat.
IsStopped() && stat.
WithAudio())
484 ULWord audChlsPerSample(0);
493 const double bytesPerChannel (4.0);
494 const double channelsPerSample (
double(audChlsPerSample+0));
495 const double bytesPerFrame (samplesPerSecond * bytesPerChannel * channelsPerSample / framesPerSecond);
496 const ULWord maxVideoFrames (4UL * 1024UL * 1024UL /
ULWord(bytesPerFrame));
500 <<
DEC(maxVideoFrames) <<
"-frame max buffer capacity of AudSys" <<
DEC(stat.
GetAudioSystem()+1));
505 ACINFO(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
" initialized using frames " <<
DEC(startFrameNumber) <<
"-" <<
DEC(endFrameNumber));
508 ACFAIL(GetDescription() <<
": Output Ch" <<
DEC(inChannel+1) <<
" initialization failed");
516 const ULWord inOptionFlags,
517 const UByte inNumChannels)
519 return inFrameRange ? AutoCirculateInitForOutput (inChannel, inFrameRange.count(), inAudioSystem, inOptionFlags,
520 inNumChannels, inFrameRange.firstFrame(), inFrameRange.lastFrame())
528 autoCircData.
lVal1 =
LWord(inStartTime >> 32);
529 autoCircData.
lVal2 =
LWord(inStartTime & 0xFFFFFFFF);
532 const bool result (AutoCirculate(autoCircData));
534 ACINFO(GetDescription() <<
": Started Ch" <<
DEC(inChannel+1));
536 ACFAIL(GetDescription() <<
": Failed to start Ch" <<
DEC(inChannel+1));
553 const bool stopInputFailed (!AutoCirculate (stopInput));
554 const bool stopOutputFailed (!AutoCirculate (stopOutput));
555 if (stopInputFailed && stopOutputFailed)
557 ACFAIL(GetDescription() <<
": Failed to stop Ch" <<
DEC(inChannel+1));
562 ACINFO(GetDescription() <<
": Aborted Ch" <<
DEC(inChannel+1));
567 bool result (GetMode(inChannel, mode));
574 ACWARN(GetDescription() <<
": Failed to stop Ch" <<
DEC(inChannel+1) <<
" -- retrying with ABORT");
575 return AutoCirculateStop(inChannel,
true);
577 ACINFO(GetDescription() <<
": Stopped Ch" <<
DEC(inChannel+1));
586 if (!AutoCirculateStop(*it, inAbort))
593 { (
void) inAtFrameNum;
596 autoCircData.
bVal1 =
false;
603 const bool result(AutoCirculate(autoCircData));
605 ACINFO(GetDescription() <<
": Paused Ch" <<
DEC(inChannel+1));
607 ACFAIL(GetDescription() <<
": Failed to pause Ch" <<
DEC(inChannel+1));
617 autoCircData.
bVal1 =
true;
618 autoCircData.
bVal2 = inClearDropCount;
622 const bool result(AutoCirculate(autoCircData));
624 ACINFO(GetDescription() <<
": Resumed Ch" <<
DEC(inChannel+1));
626 ACFAIL(GetDescription() <<
": Failed to resume Ch" <<
DEC(inChannel+1));
636 autoCircData.
bVal1 = inClearDropCount;
640 const bool result(AutoCirculate(autoCircData));
642 ACINFO(GetDescription() <<
": Flushed Ch" <<
DEC(inChannel+1) <<
", " << (inClearDropCount?
"cleared":
"retained") <<
" drop count");
644 ACFAIL(GetDescription() <<
": Failed to flush Ch" <<
DEC(inChannel+1));
658 const bool result(AutoCirculate(autoCircData));
660 ACINFO(GetDescription() <<
": Prerolled " <<
DEC(inPreRollFrames) <<
" frame(s) on Ch" <<
DEC(inChannel+1));
662 ACFAIL(GetDescription() <<
": Failed to preroll " <<
DEC(inPreRollFrames) <<
" frame(s) on Ch" <<
DEC(inChannel+1));
677 outStatus = notRunningStatus;
681 const bool result(NTV2Message(outStatus));
683 ACFAIL(GetDescription() <<
": Failed to get status on Ch" <<
DEC(inChannel+1));
694 return NTV2Message(outFrameStamp);
707 const bool result(AutoCirculate(autoCircData));
709 ACINFO(GetDescription() <<
": Set active frame to " <<
DEC(inNewActiveFrame) <<
" on Ch" <<
DEC(inChannel+1));
711 ACFAIL(GetDescription() <<
": Failed to set active frame to " <<
DEC(inNewActiveFrame) <<
" on Ch" <<
DEC(inChannel+1));
722 NTV2_ASSERT (inOutXferInfo.NTV2_IS_STRUCT_VALID ());
731 GetEveryFrameServices(taskMode);
737 bool isProgressive (
false);
738 IsProgressiveStandard(isProgressive, inChannel);
747 bool tmpLocalF1AncBuffer(
false), tmpLocalF2AncBuffer(
false);
756 ULWord F1OffsetFromBottom(0), F2OffsetFromBottom(0);
757 size_t F1SizeInBytes(0), F2SizeInBytes(0);
761 F2SizeInBytes = size_t(F2OffsetFromBottom);
762 if (F2OffsetFromBottom < F1OffsetFromBottom)
763 F1SizeInBytes = size_t(F1OffsetFromBottom - F2OffsetFromBottom);
765 F1SizeInBytes = size_t(F2OffsetFromBottom - F1OffsetFromBottom);
769 ULWord F1MonOffsetFromBottom(0), F2MonOffsetFromBottom(0);
773 && F2MonOffsetFromBottom < F2OffsetFromBottom
774 && F2OffsetFromBottom < F1MonOffsetFromBottom
775 && F1MonOffsetFromBottom < F1OffsetFromBottom)
777 F1SizeInBytes = size_t(F1OffsetFromBottom - F2OffsetFromBottom);
778 F2SizeInBytes = size_t(F2OffsetFromBottom);
782 XMTWARN(GetDescription() <<
": IoIP 2110 playout anc rgns disordered (offsets from bottom): F2Mon=" <<
HEX0N(F2MonOffsetFromBottom,8)
783 <<
" F2=" <<
HEX0N(F2OffsetFromBottom,8) <<
" F1Mon=" <<
HEX0N(F1MonOffsetFromBottom,8)
784 <<
" F1=" <<
HEX0N(F1OffsetFromBottom,8));
785 F1SizeInBytes = F2SizeInBytes = 0;
813 S2110DeviceAncToXferBuffers(inChannel, inOutXferInfo);
826 bool result = NTV2Message(inOutXferInfo);
833 S2110DeviceAncFromXferBuffers(inChannel, inOutXferInfo);
853 switch (TimecodeSource)
869 if (tcValue.
fLo && tcValue.
fHi && tcValue.
fLo != 0xFFFFFFFF && tcValue.
fHi != 0xFFFFFFFF)
870 tcValue.
fDBB |= 0x00020000;
887 if (tmpLocalF1AncBuffer)
889 if (tmpLocalF2AncBuffer)
892 #if defined (AJA_NTV2_CLEAR_DEVICE_ANC_BUFFER_AFTER_CAPTURE_XFER)
905 GetFrameBufferSize(inChannel, fbSize);
907 const ULWord ancOffset (ancOffsetF2 > ancOffsetF1 ? ancOffsetF2 : ancOffsetF1);
909 if (gClearDeviceAncBuffer.
IsNULL() || (gClearDeviceAncBuffer.
GetByteCount() != ancOffset))
911 gClearDeviceAncBuffer.
Allocate(ancOffset);
914 if (xferFrame != -1 && fbByteCount && !gClearDeviceAncBuffer.
IsNULL())
915 DMAWriteSegments (
ULWord(xferFrame),
917 fbByteCount - ancOffset,
924 #endif // AJA_NTV2_CLEAR_DEVICE_ANC_BUFFER_AFTER_CAPTURE_XFER
926 #if defined (AJA_NTV2_CLEAR_HOST_ANC_BUFFER_TAIL_AFTER_CAPTURE_XFER)
936 void * pF1TailEnd (clientAncBufferF1.
GetHostAddress(ancF1ByteCount));
937 void * pF2TailEnd (clientAncBufferF2.
GetHostAddress(ancF2ByteCount));
938 if (pF1TailEnd && clientAncBufferF1.
GetByteCount() > ancF1ByteCount)
939 ::memset (pF1TailEnd, 0, clientAncBufferF1.
GetByteCount() - ancF1ByteCount);
940 if (pF2TailEnd && clientAncBufferF2.
GetByteCount() > ancF2ByteCount)
941 ::memset (pF2TailEnd, 0, clientAncBufferF2.
GetByteCount() - ancF2ByteCount);
944 #endif // AJA_NTV2_CLEAR_HOST_ANC_BUFFER_TAIL_AFTER_CAPTURE_XFER
947 ACDBG(GetDescription() <<
": Transfer successful for Ch" <<
DEC(inChannel+1));
949 ACFAIL(GetDescription() <<
": Transfer failed on Ch" <<
DEC(inChannel+1));
970 #if !defined(NTV2_DEPRECATE_16_0)
975 #endif // !defined(NTV2_DEPRECATE_16_0)
993 #if !defined(NTV2_DEPRECATE_16_0)
998 #endif // !defined(NTV2_DEPRECATE_16_0)
1002 static const uint16_t
sVPIDLineNumsF1[] = { 10, 10, 13, 9, 10, 10, 10, 10, 10, 10, 10, 10 };
1003 static const uint16_t
sVPIDLineNumsF2[] = { 572, 0, 276, 322, 0, 0, 0, 572, 0, 0, 0, 0 };
1014 bool result (GetFrameRate(ntv2Rate, inChannel));
1015 bool isProgressive (
false);
1021 uint32_t vpidA(0), vpidB(0);
1028 if (!GetStandard(standard, inChannel))
1038 const uint32_t F2StartLine (isProgressive ? 0 : smpteLineNumInfo.
GetLastLine());
1044 if (pPkt->GetDID() == 0x41 && pPkt->GetSID() == 0x01)
1046 if (pPkt->GetDC() != 4)
1048 const uint32_t* pULWord (
reinterpret_cast<const uint32_t*
>(pPkt->
GetPayloadData()));
1049 uint32_t vpidValue (pULWord ? *pULWord : 0);
1050 if (!pPkt->GetDataLocation().IsHanc())
1064 RCVWARN(GetDescription() <<
": Skipped Ch" << (inChannel+1) <<
" VITC packet: " << pPkt->
AsString(16));
1121 if (!timecodes.empty())
RCVDBG(
"Channel" <<
DEC(inChannel+1) <<
" timecodes: " << timecodes);
1126 RCVDBG(GetDescription() <<
": WriteSDIInVPID Ch" <<
DEC(inChannel+1) <<
" VPIDa=" <<
xHEX0N(vpidA,4) <<
" VPIDb=" <<
xHEX0N(vpidB,4));
1127 WriteSDIInVPID(inChannel, vpidA, vpidB);
1143 if (!S2110DeviceAncFromXferBuffers (inChannel, tmpXfer))
1144 {
RCVFAIL(GetDescription() <<
": Ch" << (inChannel+1) <<
": S2110DeviceAncFromXferBuffers failed");
return false;}
1148 {
RCVFAIL(GetDescription() <<
": Ch" << (inChannel+1) <<
": GetInputTimeCodes failed");
return false;}
1154 SetRP188Data (inChannel, ntv2rp188);
1170 bool result (GetFrameRate(ntv2Rate, inChannel));
1171 bool isProgressive (
false);
1172 bool generateRTP (
false);
1179 ULWord vpidA(0), vpidB(0);
1182 ULWord F1OffsetFromBottom(0), F2OffsetFromBottom(0), F1MonOffsetFromBottom(0), F2MonOffsetFromBottom(0);
1187 if (!GetStandard(standard, inChannel))
1193 const uint32_t F2StartLine (smpteLineNumInfo.
GetLastLine());
1202 F1MonOffsetFromBottom - F2OffsetFromBottom);
1204 F2MonOffsetFromBottom);
1217 if (isIoIP2110 && isF1RTP && isF2RTP)
1219 packetList.GetSDITransmitData(gumpF1, gumpF2, isProgressive, F2StartLine);
1230 packetList.GetSDITransmitData(gumpF1, skipF2Data, isProgressive, F2StartLine);
1238 const ULWord gumpLength (std::min(F1MonOffsetFromBottom - F2OffsetFromBottom, gumpF1.
GetByteCount()));
1239 gumpF1.
CopyFrom(ancF1, 0, 0, gumpLength);
1250 packetList.GetSDITransmitData(skipF1Data, gumpF2, isProgressive, F2StartLine);
1259 gumpF2.
CopyFrom(ancF2, 0, 0, gumpLength);
1267 if (isMonitoring)
XMTDBG(
"ORIG: " << packetList);
1272 if (GetSDIOutVPID(vpidA, vpidB,
UWord(SDISpigotChannel)))
1330 if (
size_t(tcNdx) >= maxNumTCs)
1343 atc.
SetDBB (uint8_t(regTC.
fDBB & 0x000000FF), uint8_t(regTC.
fDBB & 0x0000FF00 >> 8));
1362 else if (isMonitoring) {
XMTWARN(
"Cannot insert ATC/VITC -- Xfer struct has no acOutputTimeCodes array!");}
1364 else if (isMonitoring) {
XMTDBG(
"ATC and/or VITC packet(s) already provided, won't insert any here");}
1377 DMAWriteAnc(31, rtpF1, rtpF2, NTV2_CHANNEL_INVALID); // DEBUG: DMA RTP into frame 31
1384 string compRTP (compareRTP.
CompareWithInfo(packetList,
false,
false));
1385 if (!compRTP.empty())
1386 XMTWARN(
"MISCOMPARE: " << compRTP);
1397 string compGUMP (compareGUMP.
CompareWithInfo(packetList,
false,
false));
1398 if (!compGUMP.empty())
1399 XMTWARN(
"MISCOMPARE: " << compGUMP);
1413 bool result (GetFrameRate(ntv2Rate, inChannel));
1414 bool isProgressive (
false);
1415 bool changed (
false);
1419 ULWord vpidA(0), vpidB(0);
1426 if (!GetStandard(standard, inChannel))
1436 const uint32_t F2StartLine (smpteLineNumInfo.
GetLastLine());
1444 if (GetSDIOutVPID(vpidA, vpidB,
UWord(SDISpigotChannel)))
1498 GetRP188Data (inChannel, regTC);
1516 atc.AJAAncillaryData_Timecode_ATC::SetDBB (uint8_t(regTC.
fDBB & 0x000000FF), uint8_t(regTC.
fDBB & 0x0000FF00 >> 8));
1539 else if (isMonitoring) {
XMTDBG(
"ATC and/or VITC packet(s) already provided, won't insert any here");}
1553 if (!compareResult.empty())
1554 XMTWARN(
"MISCOMPARE: " << compareResult);
@ kRP188SourceEmbeddedLTC
virtual AJAStatus SetLocationHorizOffset(const uint16_t inOffset)
Sets my ancillary data "location" horizontal offset.
LWord GetTransferFrameNumber(void) const
@ kDeviceHasBiDirectionalSDI
True if device SDI connectors are bi-directional.
ULWord GetScaleFromFrameRate(const NTV2FrameRate inFrameRate)
enum NTV2EveryFrameTaskMode NTV2TaskMode
@ kDeviceCanDoStackedAudio
True if device uses a "stacked" arrangement of its audio buffers.
@ AJAAncillaryData_Timecode_ATC_DBB1PayloadType_VITC1
NTV2Crosspoint channelSpec
NTV2Crosspoint channelSpec
virtual void SetAllowMultiRTPTransmit(const bool inAllow)
Determines if multiple RTP packets will be encoded for playout (via GetIPTransmitData)....
#define NTV2_IS_SDI_TIMECODE_INDEX(__x__)
#define NTV2_IS_ATC_VITC1_TIMECODE_INDEX(__x__)
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).
NTV2Crosspoint acCrosspoint
The crosspoint (channel number with direction)
#define AUTOCIRCULATE_WITH_FIELDS
Use this to AutoCirculate with fields as frames for interlaced formats.
virtual bool AutoCirculateSetActiveFrame(const NTV2Channel inChannel, const ULWord inNewActiveFrame)
Immediately changes the Active Frame for the given channel.
AJAAncillaryData_Timecode_ATC_DBB1PayloadType
@ kRP188SourceEmbeddedVITC1
std::set< std::string > NTV2StringSet
virtual bool S2110DeviceAncFromXferBuffers(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &inOutXferInfo)
static bool QueryIsRP188DropFrame(const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi)
#define NTV2ChannelToOutputChannelSpec
@ NTV2_TCINDEX_SDI2_2
SDI 2 embedded VITC 2.
std::set< NTV2TCIndex > NTV2TCIndexes
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...
bool GetRP188Reg(RP188_STRUCT &outRP188) const
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.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Describes a user-space buffer on the host computer. I have an address and a length,...
ULWord GetLastLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
std::string join(const std::vector< std::string > &parts, const std::string &delim)
NTV2TCIndexes GetTCIndexesForSDIConnector(const NTV2Channel inSDIConnector)
static const TimecodeFormat sNTV2Rate2TCFormat[]
ULWord GetByteCount(void) const
#define NTV2_ASSERT(_expr_)
virtual bool IsValid(void) const
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 ....
virtual AJAStatus SetLocationDataStream(const AJAAncDataStream inStream)
Sets my ancillary data "location" data stream value (DS1,DS2...).
virtual bool AutoCirculatePreRoll(const NTV2Channel inChannel, const ULWord inPreRollFrames)
Tells AutoCirculate how many frames to skip before playout starts for the given channel.
virtual bool S2110DeviceAncFromBuffers(const NTV2Channel inChannel, NTV2Buffer &ancF1, NTV2Buffer &ancF2)
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
Declares the AJAAncillaryList class.
@ AJAAncDataLink_B
The ancillary data is associated with Link B of the video stream.
Declares the AJAAncillaryData_Timecode_ATC class.
#define NTV2_IS_VALID_TIMECODE_INDEX(__x__)
Defines a number of handy byte-swapping macros.
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
AJAAncDataType
Identifies the ancillary data types that are known to this module.
virtual uint32_t CountAncillaryDataWithType(const AJAAncDataType inMatchType) const
Answers with the number of AJAAncillaryData objects having the given type.
virtual AJAStatus GeneratePayloadData(void)
Generates the payload data from the "local" ancillary data.
@ AJAAncDataType_Timecode_VITC
SMPTE 12-M Vertical Interval Timecode (aka "VITC")
bool GetFreeRegions(ULWordSequence &outBlks) const
Answers with the list of free memory regions.
static uint32_t EndianSwap32NtoH(const uint32_t inValue)
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...
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 ...
#define DEC0N(__x__, __n__)
@ NTV2_AncRgn_MonField1
Identifies the "monitor" or "auxiliary" Field 1 ancillary data region.
@ NTV2_AncRgn_Field2
Identifies the "normal" Field 2 ancillary data region.
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO3
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 3.
Declares the AJATimeCode class.
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
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...
#define NTV2_IS_ATC_LTC_TIMECODE_INDEX(__x__)
virtual AJAStatus SetDID(const uint8_t inDataID)
Sets my Data ID (DID).
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
virtual AJAStatus GetDBB1PayloadType(AJAAncillaryData_Timecode_ATC_DBB1PayloadType &outType) const
Answers with my current payload type.
static AJAAncillaryData_Timecode_Format GetTimecodeFormatFromTimeBase(const AJATimeBase &inTimeBase)
Get the timecode format that matches the input timebase.
bool WithAudio(void) const
@ NTV2_FIELD0
Identifies the first field in time for an interlaced video frame, or the first and only field in a pr...
Audits an NTV2 device's SDRAM utilization, and can report contiguous regions of SDRAM,...
#define NTV2_IS_VALID_AUDIO_RATE(_x_)
virtual AJAStatus GetDropFrameFlag(bool &bFlag, AJAAncillaryData_Timecode_Format tcFmt=AJAAncillaryData_Timecode_Format_Unknown) const
virtual bool GetFrameStamp(NTV2Crosspoint channelSpec, ULWord frameNum, FRAME_STAMP_STRUCT *pFrameStamp)
static bool GetCurrentACChannelCrosspoint(CNTV2Card &inDevice, const NTV2Channel inChannel, NTV2Crosspoint &outCrosspoint)
@ AJAAncillaryData_Timecode_ATC_DBB1PayloadType_LTC
I am an ordered collection of AJAAncillaryData instances which represent one or more SMPTE 291 data p...
NTV2FrameRate
Identifies a particular video frame rate.
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
This class/object reports information about the current and/or requested AutoCirculate frame.
static const uint32_t gSDIInRxStatusRegs[]
@ kVRegAncField2Offset
Anc Field2 byte offset from end of frame buffer (GUMP on all boards except RTP for SMPTE2022/IP)
NTV2AutoCirculateState acState
Current AutoCirculate state.
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO1
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 1.
virtual bool IsEmpty(void) const
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....
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
@ NTV2_AUTOCIRCULATE_INVALID
NTV2Buffer acTimeCodes
Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCInde...
@ NTV2_TCINDEX_SDI2_LTC
SDI 2 embedded ATC LTC.
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
ULWord fLo
| BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
@ NTV2_TCINDEX_SDI1_LTC
SDI 1 embedded ATC LTC.
#define NTV2_IS_STANDARD_TASKS(__m__)
@ kDeviceGetNumAudioSystems
The number of independent Audio Systems on the device.
ULWord fHi
| BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
@ AJA_DebugUnit_Anc2110Xmit
@ kDeviceCanDo2110
True if device supports SMPTE ST2110.
@ NTV2_TCINDEX_SDI1
SDI 1 embedded VITC.
@ NTV2_TCINDEX_SDI2
SDI 2 embedded VITC.
NTV2Standard
Identifies a particular video standard.
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.
virtual AJAStatus SetLocationVideoLink(const AJAAncDataLink inLink)
Sets my ancillary data "location" within the video stream.
Declares the AJALock class.
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
@ kVRegAncField1Offset
Anc Field1 byte offset from end of frame buffer (GUMP on all boards except RTP for SMPTE2022/IP)
@ NTV2_AncRgn_Field1
Identifies the "normal" Field 1 ancillary data region.
@ AJAAncDataChannel_Y
The ancillary data is associated with the luminance (Y) channel of the video stream.
#define NTV2_IS_INPUT_CROSSPOINT(__x__)
virtual const uint8_t * GetPayloadData(void) const
static bool IsActive(int32_t index)
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...
static const uint16_t sVPIDLineNumsF2[]
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Returns all RP188 timecodes associated with the frame in NTV2TCIndex order.
AutoCirculate Frame Range.
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
#define NTV2_IS_VALID_STANDARD(__s__)
NTV2TCIndex NTV2ChannelToTimecodeIndex(const NTV2Channel inChannel, const bool inEmbeddedLTC=false, const bool inIsF2=false)
Converts the given NTV2Channel value into the equivalent NTV2TCIndex value.
void SetRP188(const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi, const AJATimeBase &inTimeBase)
Declares the CNTV2Card class.
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
NTV2Crosspoint acCrosspoint
Will be deprecated – used internally by the SDK. Will be removed when the driver changes to use NTV2C...
static const AJA_FrameRate sNTV2Rate2AJARate[]
ULWord GetCapturedAncByteCount(const bool inField2=false) const
@ NTV2_CHANNEL3
Specifies channel or FrameStore 3 (or the 3rd item).
bool CopyFrom(const void *pInSrcBuffer, const ULWord inByteCount)
Replaces my contents from the given memory buffer, resizing me to the new byte count.
std::string NTV2VANCModeToString(const NTV2VANCMode inValue, const bool inCompactDisplay=false)
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
#define NTV2_IS_VANCMODE_ON(__v__)
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
Declares numerous NTV2 utility functions.
NTV2Framesize
Kona2/Xena2 specific enums.
virtual bool S2110DeviceAncToBuffers(const NTV2Channel inChannel, NTV2Buffer &ancF1, NTV2Buffer &ancF2)
@ kDeviceCanDoMultiLinkAudio
True if device supports grouped audio system control.
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...
#define AUTOCIRCULATE_WITH_AUDIO_CONTROL
Use this to AutoCirculate with no audio but with audio control.
#define AJA_SUCCESS(_status_)
I interrogate and control an AJA video/audio capture/playout device.
virtual AJAAncillaryData * GetAncillaryDataAtIndex(const uint32_t inIndex) const
Answers with the AJAAncillaryData object at the given index.
virtual std::string AsString(const uint16_t inDumpMaxBytes=0) const
NTV2Crosspoint NTV2ChannelToInputCrosspoint(const NTV2Channel inChannel)
virtual AJAStatus GetTimecode(AJATimeCode &outTimecode, const AJATimeBase &inTimeBase) const
Answers with my timecode "time" as an AJATimeCode.
bool IsStopped(void) const
virtual AJAStatus AddAncillaryData(const AJAAncillaryList &inPackets)
Appends a copy of the given list's packets to me.
NTV2Crosspoint NTV2ChannelToOutputCrosspoint(const NTV2Channel inChannel)
virtual AJAStatus SetPayloadData(const uint8_t *pInData, const uint32_t inByteCount)
Copy data from external memory into my local payload memory.
virtual AJAStatus SetTimecode(const AJATimeCode &inTimecode, const AJATimeBase &inTimeBase, const bool inIsDropFrame)
Sets my timecode "time" from an AJATimeCode.
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
NTV2Buffer acANCField2Buffer
The host "Field 2" ancillary data buffer. This field is owned by the client application,...
virtual uint32_t CountAncillaryData(void) const
Answers with the number of AJAAncillaryData objects I contain (any/all types).
virtual AJAStatus SetDBB1PayloadType(const AJAAncillaryData_Timecode_ATC_DBB1PayloadType inType)
Sets my payload type.
virtual bool S2110DeviceAncToXferBuffers(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &inOutXferInfo)
@ NTV2_STANDARD_TASKS
1: Standard/Retail: device configured by AJA ControlPanel, service/daemon, and driver.
uint16_t GetEndFrame(void) const
@ AJAAncillaryData_Timecode_ATC_DBB1PayloadType_VITC2
static const char gFBAllocLockName[]
@ NTV2_AncRgn_MonField2
Identifies the "monitor" or "auxiliary" Field 2 ancillary data region.
NTV2VANCMode
These enum values identify the available VANC modes.
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
NTV2SmpteLineNumber GetSmpteLineNumber(const NTV2Standard inStandard)
For the given video standard, returns the SMPTE-designated line numbers for Field 1 and Field 2 that ...
AUTOCIRCULATE_TRANSFER_STATUS acTransferStatus
Contains status information that's valid after CNTV2Card::AutoCirculateTransfer returns,...
#define NTV2_IS_VALID_CHANNEL(__x__)
@ NTV2_VANCMODE_INVALID
This identifies the invalid (unspecified, uninitialized) VANC mode.
#define NTV2ChannelToInputChannelSpec
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...
#define AJAAncDataHorizOffset_AnyHanc
HANC – Packet placed/found in any legal area of raster line after EAV.
I am the ATC-specific (analog) subclass of the AJAAncillaryData_Timecode class.
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
void * GetHostPointer(void) const
@ DEVICE_ID_IOIP_2110
See Io IP.
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
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.
#define NTV2_IS_QUAD_QUAD_FORMAT(__f__)
#define AUTOCIRCULATE_WITH_FBOCHANGE
Use this to AutoCirculate with the possibility of frame buffer orientation changes.
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...
virtual AJAStatus SetDBB(uint8_t dbb1, uint8_t dbb2)
@ NTV2_TCINDEX_SDI1_2
SDI 1 embedded VITC 2.
Used to describe Start of Active Video (SAV) location and field dominance for a given NTV2Standard....
virtual AJAStatus SetLocationLineNumber(const uint16_t inLineNum)
Sets my ancillary data "location" frame line number.
@ AJAAncDataStream_1
The ancillary data is associated with DS1 of the video stream (Link A).
Private include file for all ajabase sources.
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO2
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 2.
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
@ kVRegZeroHostAncPostCapture
bool SetInputTimecode(const NTV2TCIndex inTCNdx, const NTV2_RP188 &inTimecode)
Sets one of my input timecodes.
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
#define HEX0N(__x__, __n__)
NTV2AutoCirculateState acState
Current AutoCirculate state after the transfer.
@ AJAAncillaryData_Timecode_ATC_DBB1PayloadType_Unknown
bool IsValid(void) const
Answers true if I'm valid, or false if I'm not valid.
void Clear(void)
Clears my data.
#define NTV2_IS_VALID_NTV2CROSSPOINT(__x__)
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
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 ...
This struct replaces the old RP188_STRUCT.
AJAAncillaryData_Timecode_Format
@ kRP188SourceEmbeddedVITC2
#define AUTOCIRCULATE_WITH_HDMIAUX
Use this to AutoCirculate with HDMI auxiliary data.
@ AJA_DebugUnit_Anc2110Rcv
@ NTV2_FRAMERATE_UNKNOWN
Represents an unknown or invalid frame rate.
#define NTV2EndianSwap32BtoH(__val__)
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 ...
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
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...
static AJALock gFBAllocLock(gFBAllocLockName)
uint16_t GetStartFrame(void) const
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...
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
@ NTV2_TCINDEX_DEFAULT
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel)
static const uint16_t sVPIDLineNumsF1[]
#define AUTOCIRCULATE_WITH_LTC
Use this to AutoCirculate with analog LTC.
Declares the CRP188 class. See SMPTE RP188 standard for details.
NTV2EveryFrameTaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
@ AJAAncDataStream_2
The ancillary data is associated with DS2 of the video stream (Link A).
void SetDropFrame(bool bDropFrameFlag)
#define NTV2_IS_QUAD_FRAME_FORMAT(__f__)
#define NTV2_IS_VALID_NTV2FrameRate(__r__)
virtual AJAStatus GeneratePayloadData(void)
Generate the payload data from the "local" ancillary data.
double GetAudioSamplesPerSecond(const NTV2AudioRate inAudioRate)
Returns the audio sample rate as a number of audio samples per second.
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device....
@ NTV2_MODE_INVALID
The invalid mode.
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
#define IS_LINKB_AJAAncDataStream(_x_)
void QueryString(std::string &str, const AJATimeBase &timeBase, bool bDropFrame, bool bStdTcForHfr, AJATimecodeNotation notation=AJA_TIMECODE_LEGACY)
bool Fill(const T &inValue)
Fills me with the given scalar value.
virtual bool AutoCirculateStart(const NTV2Channel inChannel, const ULWord64 inStartTime=0)
Starts AutoCirculating the specified channel that was previously initialized by CNTV2Card::AutoCircul...
#define NTV2_IS_OUTPUT_CROSSPOINT(__x__)
ULWord GetFrameCount(void) const
@ kVRegZeroDeviceAncPostCapture
#define AUTOCIRCULATE_WITH_COLORCORRECT
Use this to AutoCirculate with color correction.
LWord64 acFrameTime
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
#define NTV2_IS_INPUT_MODE(__mode__)
ULWord frame
The frame requested or -1 if not available.
bool GetBadRegions(ULWordSequence &outBlks) const
Answers with the list of colliding and illegal memory regions.
ULWord acRequestedFrame
On entry for NTV2_TYPE_ACFRAMESTAMP message, the requested frame. Upon exit, 0xFFFFFFFF means "not ...
#define xHEX0N(__x__, __n__)
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
#define AJA_FAILURE(_status_)
@ NTV2_AUDIO_RATE_INVALID
#define NTV2_IS_SUPPORTED_NTV2FrameRate(__r__)
@ DEVICE_ID_IOIP_2110_RGB12
See Io IP.
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
@ NTV2_TCINDEX_LTC1
Analog LTC 1.
@ NTV2_MODE_DISPLAY
Playout (output) mode, which reads from device SDRAM.
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
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...
const FRAME_STAMP & GetFrameStamp(void) const
#define NTV2_IS_OUTPUT_MODE(__mode__)
virtual bool AutoCirculateFlush(const NTV2Channel inChannel, const bool inClearDropCount=(0))
Flushes AutoCirculate for the given channel.
@ AJAAncDataLink_A
The ancillary data is associated with Link A of the video stream.
@ AJAAncDataType_Timecode_ATC
SMPTE 12-M Ancillary Timecode (formerly known as "RP-188")
Declares the AJADebug class.
#define NTV2_IS_PROGRESSIVE_STANDARD(__s__)
@ NTV2_OEM_TASKS
2: OEM (recommended): device configured by client application(s) with some driver involvement.
virtual bool GetAutoCirculate(NTV2Crosspoint channelSpec, AUTOCIRCULATE_STATUS_STRUCT *autoCirculateStatus)
virtual AJAStatus SetLocationDataChannel(const AJAAncDataChannel inChannel)
Sets my ancillary data "location" data channel value (Y or C).
NTV2AudioSystem GetAudioSystem(void) const
NTV2_RP188 acRP188
Will be deprecated – use AUTOCIRCULATE_TRANSFER::SetOutputTimeCode instead.
@ NTV2_AUTOCIRCULATE_DISABLED
The AutoCirculate channel is stopped.
Utility class for timecodes.
@ NTV2_AUDIOSYSTEM_INVALID