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) <<
")");
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,
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,
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 GetTaskMode(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());
1046 if (pPkt->
GetDC() != 4)
1048 const uint32_t* pULWord (reinterpret_cast<const uint32_t*>(pPkt->
GetPayloadData()));
1049 uint32_t vpidValue (pULWord ? *pULWord : 0);
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)
1238 const ULWord gumpLength (std::min(F1MonOffsetFromBottom - F2OffsetFromBottom, gumpF1.GetByteCount()));
1239 gumpF1.CopyFrom(ancF1, 0, 0, gumpLength);
1258 const ULWord gumpLength (std::min(F2MonOffsetFromBottom, gumpF2.GetByteCount()));
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);
NTV2_RP188 acRP188
Will be deprecated – use AUTOCIRCULATE_TRANSFER::SetOutputTimeCode instead.
Anc Field2 byte offset from end of frame buffer (GUMP on all boards except RTP for SMPTE2022/IP) ...
#define IS_LINKB_AJAAncDataStream(_x_)
virtual bool AutoCirculateFlush(const NTV2Channel inChannel, const bool inClearDropCount=(0))
Flushes AutoCirculate for the given channel.
NTV2TCIndexes GetTCIndexesForSDIConnector(const NTV2Channel inSDIConnector)
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device...
virtual const uint8_t * GetPayloadData(void) const
virtual uint8_t GetDID(void) const
#define NTV2_IS_ATC_VITC1_TIMECODE_INDEX(__x__)
#define AJA_SUCCESS(_status_)
#define NTV2_IS_INPUT_MODE(__mode__)
ULWord frame
The frame requested or -1 if not available.
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 ...
virtual AJAStatus SetDBB(uint8_t dbb1, uint8_t dbb2)
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Declares the AJALock class.
bool GetBadRegions(ULWordSequence &outBlks) const
Answers with the list of colliding and illegal memory regions.
std::set< NTV2TCIndex > NTV2TCIndexes
virtual uint32_t CountAncillaryData(void) const
Answers with the number of AJAAncillaryData objects I contain (any/all types).
The ancillary data is associated with DS2 of the video stream (Link A).
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...
SMPTE 12-M Vertical Interval Timecode (aka "VITC")
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO3
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 3. ...
virtual AJAStatus SetDBB1PayloadType(const AJAAncillaryData_Timecode_ATC_DBB1PayloadType inType)
Sets my payload type.
virtual uint8_t GetSID(void) const
SMPTE 12-M Ancillary Timecode (formerly known as "RP-188")
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)...
This identifies the invalid (unspecified, uninitialized) VANC mode.
virtual AJAStatus GeneratePayloadData(void)
Generate the payload data from the "local" ancillary data.
#define NTV2_IS_SDI_TIMECODE_INDEX(__x__)
#define DEC0N(__x__, __n__)
I interrogate and control an AJA video/audio capture/playout device.
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
virtual AJAStatus SetDID(const uint8_t inDataID)
Sets my Data ID (DID).
#define NTV2_IS_ATC_LTC_TIMECODE_INDEX(__x__)
Declares the AJADebug class.
bool CopyFrom(const void *pInSrcBuffer, const ULWord inByteCount)
Replaces my contents from the given memory buffer, resizing me to the new byte count.
virtual AJAAncillaryData * GetAncillaryDataAtIndex(const uint32_t inIndex) const
Answers with the AJAAncillaryData object at the given index.
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
Audits an NTV2 device's SDRAM utilization, and can report contiguous regions of SDRAM, whether unused/free, those being read/written by AutoCirculate, those being read/written by non-AutoCirculating FrameStores, those that are in conflict (AutoCirculate, FrameStore and/or Audio collisions), plus invalid/out-of-bounds regions being accessed.
Used to describe Start of Active Video (SAV) location and field dominance for a given NTV2Standard...
static bool GetCurrentACChannelCrosspoint(CNTV2Card &inDevice, const NTV2Channel inChannel, NTV2Crosspoint &outCrosspoint)
virtual AJAStatus SetLocationHorizOffset(const uint16_t inOffset)
Sets my ancillary data "location" horizontal offset.
The number of independent Audio Systems on the device.
#define NTV2EndianSwap32BtoH(__val__)
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...
#define NTV2_IS_VALID_AUDIO_RATE(_x_)
#define AJA_FAILURE(_status_)
Identifies the "monitor" or "auxiliary" Field 2 ancillary data region.
virtual const AJAAncDataLoc & GetDataLocation(void) const
AJAAncDataType
Identifies the ancillary data types that are known to this module.
bool IsValid(void) const
Answers true if I'm valid, or false if I'm not valid.
ULWord GetByteCount(void) const
virtual bool GetFrameStamp(NTV2Crosspoint channelSpec, ULWord frameNum, FRAME_STAMP_STRUCT *pFrameStamp)
bool WithAudio(void) const
AJAAncDataStream GetDataStream(void) const
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
LWord64 acFrameTime
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
virtual std::string AsString(const uint16_t inDumpMaxBytes=0) const
Defines a number of handy byte-swapping macros.
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel) ...
#define NTV2_IS_STANDARD_TASKS(__m__)
static bool QueryIsRP188DropFrame(const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi)
UWord firstFrame(void) const
#define NTV2_IS_VALID_TIMECODE_INDEX(__x__)
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...
static bool IsActive(int32_t index)
#define NTV2ChannelToOutputChannelSpec
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
ULWord GetLastLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO1
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 1. ...
static uint32_t EndianSwap32NtoH(const uint32_t inValue)
static const uint32_t gSDIInRxStatusRegs[]
True if device supports grouped audio system control.
NTV2Crosspoint acCrosspoint
Will be deprecated – used internally by the SDK. Will be removed when the driver changes to use NTV2...
virtual AJAStatus SetLocationLineNumber(const uint16_t inLineNum)
Sets my ancillary data "location" frame line number.
#define NTV2_ASSERT(_expr_)
virtual AJAAncDataType GetAncillaryDataType(void) const
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Returns all RP188 timecodes associated with the frame in NTV2TCIndex order.
Represents an unknown or invalid frame rate.
NTV2AutoCirculateState acState
Current AutoCirculate state after the transfer.
This struct replaces the old RP188_STRUCT.
virtual AJAStatus GetSDITransmitData(NTV2Buffer &F1Buffer, NTV2Buffer &F2Buffer, const bool inIsProgressive=true, const uint32_t inF2StartLine=0)
Anc Field1 byte offset from end of frame buffer (GUMP on all boards except RTP for SMPTE2022/IP) ...
NTV2TCIndex NTV2ChannelToTimecodeIndex(const NTV2Channel inChannel, const bool inEmbeddedLTC=false, const bool inIsF2=false)
Converts the given NTV2Channel value into the equivalent NTV2TCIndex value.
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
bool Fill(const T &inValue)
Fills me with the given scalar value.
True if device SDI connectors are bi-directional.
AutoCirculate Frame Range.
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
static AJAAncillaryData_Timecode_Format GetTimecodeFormatFromTimeBase(const AJATimeBase &inTimeBase)
Get the timecode format that matches the input timebase.
NTV2FrameRate
Identifies a particular video frame rate.
NTV2Standard
Identifies a particular video standard.
Playout (output) mode, which reads from device SDRAM.
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.
virtual bool IsOpen(void) const
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
virtual bool S2110DeviceAncFromBuffers(const NTV2Channel inChannel, NTV2Buffer &ancF1, NTV2Buffer &ancF2)
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 ...
Utility class for timecodes.
static const uint16_t sVPIDLineNumsF2[]
virtual AJAStatus SetLocationDataStream(const AJAAncDataStream inStream)
Sets my ancillary data "location" data stream value (DS1,DS2...).
virtual AJAStatus SetLocationVideoLink(const AJAAncDataLink inLink)
Sets my ancillary data "location" within the video stream.
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...
bool GetFreeRegions(ULWordSequence &outBlks) const
Answers with the list of free memory regions.
Declares the CRP188 class. See SMPTE RP188 standard for details.
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
NTV2AutoCirculateState acState
Current AutoCirculate state.
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
bool IsStopped(void) const
True if device uses a "stacked" arrangement of its audio buffers.
2: OEM (recommended): device configured by client application(s) with some driver involvement...
The ancillary data is associated with the luminance (Y) channel of the video stream.
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.
ULWord acRequestedFrame
On entry for NTV2_TYPE_ACFRAMESTAMP message, the requested frame. Upon exit, 0xFFFFFFFF means "not ...
static const AJA_FrameRate sNTV2Rate2AJARate[]
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...
std::string NTV2VANCModeToString(const NTV2VANCMode inValue, const bool inCompactDisplay=false)
virtual AJAStatus AddAncillaryData(const AJAAncillaryList &inPackets)
Appends a copy of the given list's packets to me.
void SetDropFrame(bool bDropFrameFlag)
virtual AJAStatus GeneratePayloadData(void)
Generates the payload data from the "local" ancillary data.
#define NTV2_IS_INPUT_CROSSPOINT(__x__)
#define NTV2ChannelToInputChannelSpec
#define NTV2_IS_VALID_STANDARD(__s__)
The AutoCirculate channel is stopped.
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
static const char gFBAllocLockName[]
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...
NTV2Crosspoint channelSpec
#define NTV2_IS_VANCMODE_ON(__v__)
void Clear(void)
Clears my data.
NTV2Framesize
Kona2/Xena2 specific enums.
virtual bool S2110DeviceAncToXferBuffers(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &inOutXferInfo)
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...
#define NTV2_IS_VALID_CHANNEL(__x__)
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
uint16_t GetEndFrame(void) const
#define AUTOCIRCULATE_WITH_FBOCHANGE
Use this to AutoCirculate with the possibility of frame buffer orientation changes.
#define AUTOCIRCULATE_WITH_AUDIO_CONTROL
Use this to AutoCirculate with no audio but with audio control.
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
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 uint32_t CountAncillaryDataWithType(const AJAAncDataType inMatchType) const
Answers with the number of AJAAncillaryData objects having the given type.
static const uint16_t sVPIDLineNumsF1[]
Declares the AJATimeCode class.
const FRAME_STAMP & GetFrameStamp(void) const
LWord GetTransferFrameNumber(void) const
NTV2Buffer acANCField2Buffer
The host "Field 2" ancillary data buffer. This field is owned by the client application, and thus is responsible for allocating and/or freeing it. If the pointer is NULL or the size is zero, no "Field 2" ancillary data will be transferred. Use the AUTOCIRCULATE_TRANSFER::SetAncBuffers method to set or reset this field.
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Declares the AJAAncillaryData_Timecode_ATC class.
NTV2SmpteLineNumber GetSmpteLineNumber(const NTV2Standard inStandard)
For the given video standard, returns the SMPTE-designated line numbers for Field 1 and Field 2 that ...
#define NTV2_IS_QUAD_FRAME_FORMAT(__f__)
Declares numerous NTV2 utility functions.
double GetAudioSamplesPerSecond(const NTV2AudioRate inAudioRate)
Returns the audio sample rate as a number of audio samples per second.
#define AJAAncDataHorizOffset_AnyHanc
HANC – Packet placed/found in any legal area of raster line after EAV.
The ancillary data is associated with Link A of the video stream.
Identifies the "normal" Field 2 ancillary data region.
virtual AJAStatus SetTimecode(const AJATimeCode &inTimecode, const AJATimeBase &inTimeBase, const bool inIsDropFrame)
Sets my timecode "time" from an AJATimeCode.
True if device supports SMPTE ST2110.
NTV2Crosspoint NTV2ChannelToInputCrosspoint(const NTV2Channel inChannel)
static AJALock gFBAllocLock(gFBAllocLockName)
#define NTV2_IS_QUAD_QUAD_FORMAT(__f__)
bool SetInputTimecode(const NTV2TCIndex inTCNdx, const NTV2_RP188 &inTimecode)
Sets one of my input timecodes.
ULWord GetFrameCount(void) const
NTV2Crosspoint NTV2ChannelToOutputCrosspoint(const NTV2Channel inChannel)
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
#define AUTOCIRCULATE_WITH_COLORCORRECT
Use this to AutoCirculate with color correction.
#define NTV2_IS_OUTPUT_CROSSPOINT(__x__)
void QueryString(std::string &str, const AJATimeBase &timeBase, bool bDropFrame, bool bStdTcForHfr, AJATimecodeNotation notation=AJA_TIMECODE_LEGACY)
1: Standard/Retail: device configured by AJA ControlPanel, service/daemon, and driver.
virtual AJAStatus SetPayloadData(const uint8_t *pInData, const uint32_t inByteCount)
Copy data from external memory into my local payload memory.
virtual bool AutoCirculateStart(const NTV2Channel inChannel, const ULWord64 inStartTime=0)
Starts AutoCirculating the specified channel that was previously initialized by CNTV2Card::AutoCircul...
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 ...
NTV2Buffer acTimeCodes
Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCInde...
virtual bool IsEmpty(void) const
AUTOCIRCULATE_TRANSFER_STATUS acTransferStatus
Contains status information that's valid after CNTV2Card::AutoCirculateTransfer returns, including the driver buffer level, number of frames processed or dropped, audio and anc transfer byte counts, and a complete FRAME_STAMP that has even more detailed clocking information.
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
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...
#define xHEX0N(__x__, __n__)
NTV2VANCMode
These enum values identify the available VANC modes.
#define NTV2_IS_SUPPORTED_NTV2FrameRate(__r__)
virtual bool S2110DeviceAncFromXferBuffers(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &inOutXferInfo)
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
virtual AJAStatus SetLocationDataChannel(const AJAAncDataChannel inChannel)
Sets my ancillary data "location" data channel value (Y or C).
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
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 AJAStatus GetDBB1PayloadType(AJAAncillaryData_Timecode_ATC_DBB1PayloadType &outType) const
Answers with my current payload type.
Declares the CNTV2Card class.
Identifies the "monitor" or "auxiliary" Field 1 ancillary data region.
virtual bool S2110DeviceAncToBuffers(const NTV2Channel inChannel, NTV2Buffer &ancF1, NTV2Buffer &ancF2)
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 NTV2_IS_OUTPUT_MODE(__mode__)
I am the ATC-specific (analog) subclass of the AJAAncillaryData_Timecode class.
Private include file for all ajabase sources.
This class/object reports information about the current and/or requested AutoCirculate frame...
bool GetRP188Reg(RP188_STRUCT &outRP188) const
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
virtual AJAStatus GetTimecode(AJATimeCode &outTimecode, const AJATimeBase &inTimeBase) const
Answers with my timecode "time" as an AJATimeCode.
std::string join(const std::vector< std::string > &parts, const std::string &delim)
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
virtual uint32_t GetDC(void) const
ULWord fLo
| BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
void * GetHostPointer(void) const
#define AUTOCIRCULATE_WITH_MULTILINK_AUDIO2
Use this to AutoCirculate with base audiosystem controlling base AudioSystem + 2. ...
Identifies the first field in time for an interlaced video frame, or the first and only field in a pr...
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
ULWord GetCapturedAncByteCount(const bool inField2=false) const
UWord lastFrame(void) const
#define HEX0N(__x__, __n__)
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
#define NTV2_IS_VALID_NTV2CROSSPOINT(__x__)
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 AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
Declares the AJAAncillaryList class.
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
Identifies the "normal" Field 1 ancillary data region.
NTV2AudioSystem GetAudioSystem(void) const
virtual AJAStatus GetDropFrameFlag(bool &bFlag, AJAAncillaryData_Timecode_Format tcFmt=AJAAncillaryData_Timecode_Format_Unknown) const
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
virtual bool GetAutoCirculate(NTV2Crosspoint channelSpec, AUTOCIRCULATE_STATUS_STRUCT *autoCirculateStatus)
AJAAncillaryData_Timecode_Format
NTV2Crosspoint channelSpec
#define AUTOCIRCULATE_WITH_FIELDS
Use this to AutoCirculate with fields as frames for interlaced formats.
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...
#define AUTOCIRCULATE_WITH_HDMIAUX
Use this to AutoCirculate with HDMI auxiliary data.
AJAAncillaryData_Timecode_ATC_DBB1PayloadType
#define NTV2_IS_PROGRESSIVE_STANDARD(__s__)
virtual void SetAllowMultiRTPTransmit(const bool inAllow)
Determines if multiple RTP packets will be encoded for playout (via GetIPTransmitData). The default behavior is to transmit/encode a single RTP packet.
NTV2Crosspoint acCrosspoint
The crosspoint (channel number with direction)
ULWord fHi
| BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
The ancillary data is associated with Link B of the video stream.
uint16_t GetStartFrame(void) const
I am an ordered collection of AJAAncillaryData instances which represent one or more SMPTE 291 data p...
#define NTV2_IS_VALID_NTV2FrameRate(__r__)
The ancillary data is associated with DS1 of the video stream (Link A).
#define AUTOCIRCULATE_WITH_LTC
Use this to AutoCirculate with analog LTC.
virtual bool AutoCirculatePreRoll(const NTV2Channel inChannel, const ULWord inPreRollFrames)
Tells AutoCirculate how many frames to skip before playout starts for the given channel.
Specifies channel or FrameStore 3 (or the 3rd item).
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
std::set< std::string > NTV2StringSet
virtual bool AutoCirculateSetActiveFrame(const NTV2Channel inChannel, const ULWord inNewActiveFrame)
Immediately changes the Active Frame for the given channel.
static const TimecodeFormat sNTV2Rate2TCFormat[]
ULWord GetScaleFromFrameRate(const NTV2FrameRate inFrameRate)
void SetRP188(const uint32_t inDBB, const uint32_t inLo, const uint32_t inHi, const AJATimeBase &inTimeBase)
virtual bool IsValid(void) const