24 #if !defined(MSWindows) 61 inOutStr << *iter << endl;
69 inOutStr <<
xHEX0N(uint16_t(*it),2);
70 if (++it != inDIDs.end())
78 inOutStream <<
DEC(inData.size()) <<
" UWords: ";
81 inOutStream <<
HEX0N(*iter,4);
82 if (++iter != inData.end())
90 inOutStream <<
DEC(inData.size()) <<
" ULWords: ";
93 inOutStream <<
HEX0N(*iter,8);
94 if (++iter != inData.end())
102 inOutStream <<
DEC(inData.size()) <<
" ULWord64s: ";
105 inOutStream <<
HEX0N(*iter,16);
106 if (++iter != inData.end())
124 mFrameRefClockCount = 0;
125 mGlobalClockCount = 0;
126 mFrameTRSError =
false;
135 inOutStream <<
"[CRCA=" <<
DEC(mCRCTallyA)
136 <<
" CRCB=" <<
DEC(mCRCTallyB)
137 <<
" unlk=" <<
xHEX0N(mUnlockTally,8)
138 <<
" frmRefClkCnt=" <<
xHEX0N(mFrameRefClockCount,16)
139 <<
" globalClkCnt=" <<
xHEX0N(mGlobalClockCount,16)
140 <<
" frmTRS=" <<
YesNo(mFrameTRSError)
141 <<
" locked=" <<
YesNo(mLocked)
142 <<
" VPIDA=" <<
YesNo(mVPIDValidA)
143 <<
" VPIDB=" <<
YesNo(mVPIDValidB)
185 inOutStream <<
"Enabled: " <<
YesNo(mEnabled);
188 <<
"Is 4:2:0: " <<
YesNo(mPixel420) << endl
209 transitionCoefficient (0),
210 transitionSoftness (0)
216 : eCommand (inCommand),
217 channelSpec (inCrosspoint),
241 static const string sCmds [] = {
"ACInit",
"ACStart",
"ACStop",
"ACPause",
"GetAC",
"ACFrmStmp",
242 "ACFlush",
"ACPreRoll",
"ACXfer",
"ACAbort",
"ACStartAt",
243 "ACXfer1",
"ACXfer2",
"ACFrmStmp2",
"ACTask",
"ACSetActFrm"};
244 if (
size_t(
eCommand) <
sizeof(sCmds))
254 if (
bVal2) oss <<
" +RP188";
255 if (
bVal3) oss <<
" +FBFChg";
256 if (
bVal4) oss <<
" +FBOChg";
257 if (
bVal5) oss <<
" +ColCorr";
258 if (
bVal6) oss <<
" +VidProc";
259 if (
bVal7) oss <<
" +Anc";
260 if (
bVal8) oss <<
" +LTC";
282 if (
bVal1) oss <<
" +resume";
283 if (
bVal1 &&
bVal2) oss <<
" +clearDropCount";
287 if (
bVal1) oss <<
" +clearDropCount";
309 fType (inStructureType),
312 fSizeInBytes (inStructSizeInBytes),
313 fPointerSize (sizeof(int*)),
322 return inObj.
Print (inOutStream);
330 inOutStream << NTV2_4CC_AS_STRING (fHeaderTag);
332 inOutStream <<
"BAD-" <<
HEX0N(fHeaderTag,8);
334 inOutStream << NTV2_4CC_AS_STRING (fType);
336 inOutStream <<
"|BAD-" <<
HEX0N(fType,8);
337 inOutStream <<
" v" << fHeaderVersion <<
" vers=" << fVersion <<
" sz=" << fSizeInBytes;
338 return inOutStream <<
"]";
343 const char * pU32 (reinterpret_cast<const char *>(&in4CC));
344 ostringstream result;
347 for (
size_t charPos(0); charPos < 4; charPos++)
349 #if AJATargetBigEndian 350 const char ch(pU32[charPos]);
351 #else // little-endian: 352 const char ch(pU32[3-charPos]);
354 if (ch < ' ' || ch > 126)
355 {result <<
'.'; badTally++;}
361 result <<
" (" <<
xHEX0N(in4CC,8) <<
")";
370 inOutStream << NTV2_4CC_AS_STRING(inObj.
fTrailerTag);
383 return inObj.
Print (inOutStream);
401 if (inDumpMaxBytes > 256)
402 inDumpMaxBytes = 256;
406 for (
UWord ndx(0); ndx < inDumpMaxBytes; ndx++)
407 oss <<
HEX0N(uint16_t(pBytes[ndx]),2);
412 string NTV2Buffer::AsCode (
const size_t inBytesPerWord,
const std::string & inVarName,
const bool inUseSTL,
const bool inByteSwap)
const 415 if (inBytesPerWord != 1 && inBytesPerWord != 2 && inBytesPerWord != 4 && inBytesPerWord != 8)
return string();
417 if (inBytesPerWord > 1)
423 const string cType (inBytesPerWord == 1 ?
"uint8_t" : (inBytesPerWord == 2 ?
"uint16_t" : (inBytesPerWord == 4 ?
"uint32_t" :
"uint64_t")));
424 const size_t numWords (
GetByteCount() / inBytesPerWord);
425 const string vecType =
"std::vector<" + cType +
">";
426 const string varName (inVarName.empty() ? (inUseSTL ?
"tmpVector" :
"tmpArray") : inVarName);
427 oss <<
"const " << (inUseSTL ? vecType : cType) <<
" " << varName << (inUseSTL ?
"" :
"[]") <<
" = {" << endl;
428 if (inByteSwap && inBytesPerWord > 1)
429 switch (inBytesPerWord)
435 for (
size_t ndx(0); ndx < numWords; )
437 switch (inBytesPerWord)
440 case 2: oss <<
xHEX0N(tmp.
U16(
int(ndx)),4);
break;
441 case 4: oss <<
xHEX0N(tmp.
U32(
int(ndx)),8);
break;
442 case 8: oss <<
xHEX0N(tmp.
U64(
int(ndx)),16);
break;
444 if (++ndx < numWords)
460 oss <<
HEX0N(uint16_t(
U8(ndx++)),2);
461 if (inLineBreakInterval && ndx <
int(
GetByteCount()) && ((
size_t(ndx) % inLineBreakInterval) == 0))
465 return !outStr.empty();
470 const streamsize maxAddrWidth (
sizeof(
ULWord64) * 2);
473 oss <<
OCT0N(inOffset,maxAddrWidth) <<
": ";
474 else if (inRadix == 10)
475 oss <<
DEC0N(inOffset,maxAddrWidth) <<
": ";
477 oss <<
xHEX0N(inOffset,maxAddrWidth) <<
": ";
482 const size_t inStartOffset,
483 const size_t inByteCount,
484 const size_t inRadix,
485 const size_t inBytesPerGroup,
486 const size_t inGroupsPerRow,
487 const size_t inAddressRadix,
488 const bool inShowAscii,
489 const size_t inAddrOffset)
const 493 if (inRadix != 8 && inRadix != 10 && inRadix != 16 && inRadix != 2)
495 if (inAddressRadix != 0 && inAddressRadix != 8 && inAddressRadix != 10 && inAddressRadix != 16)
497 if (inBytesPerGroup == 0)
502 size_t bytesRemaining (inByteCount ? inByteCount :
GetByteCount());
503 size_t bytesInThisGroup (0);
504 size_t groupsInThisRow (0);
505 const unsigned maxByteWidth (inRadix == 8 ? 4 : (inRadix == 10 ? 3 : (inRadix == 2 ? 8 : 2)));
506 const UByte * pBuffer (reinterpret_cast <const UByte *> (pInStartAddress));
507 const size_t asciiBufferSize (inShowAscii && inGroupsPerRow ? (inBytesPerGroup * inGroupsPerRow + 1) *
sizeof (
UByte) : 0);
510 if (!pInStartAddress)
514 ::memset (pAsciiBuffer, 0, asciiBufferSize);
516 if (inGroupsPerRow && inAddressRadix)
518 while (bytesRemaining)
521 inOStream <<
BIN08(*pBuffer);
522 else if (inRadix == 8)
523 inOStream <<
oOCT(uint16_t(*pBuffer));
524 else if (inRadix == 10)
525 inOStream <<
DEC0N(uint16_t(*pBuffer),maxByteWidth);
526 else if (inRadix == 16)
527 inOStream <<
HEX0N(uint16_t(*pBuffer),2);
530 pAsciiBuffer[groupsInThisRow * inBytesPerGroup + bytesInThisGroup] = isprint(*pBuffer) ? *pBuffer :
'.';
535 if (bytesInThisGroup >= inBytesPerGroup)
538 if (inGroupsPerRow && groupsInThisRow >= inGroupsPerRow)
542 inOStream <<
" " << pAsciiBuffer;
543 ::memset (pAsciiBuffer, 0, asciiBufferSize);
546 if (inAddressRadix && bytesRemaining)
547 inOStream << print_address_offset (inAddressRadix, reinterpret_cast <ULWord64> (pBuffer) - reinterpret_cast <ULWord64> (pInStartAddress) +
ULWord64 (inAddrOffset));
552 bytesInThisGroup = 0;
556 if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup && pAsciiBuffer)
559 inOStream <<
string ((inBytesPerGroup - bytesInThisGroup) * maxByteWidth + 1,
' ');
564 if (groupsInThisRow < inGroupsPerRow && pAsciiBuffer)
565 inOStream <<
string (((inGroupsPerRow - groupsInThisRow) * inBytesPerGroup * maxByteWidth + (inGroupsPerRow - groupsInThisRow)),
' ');
567 inOStream << pAsciiBuffer;
570 else if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup)
574 delete [] pAsciiBuffer;
581 const size_t inStartOffset,
582 const size_t inByteCount,
583 const size_t inRadix,
584 const size_t inBytesPerGroup,
585 const size_t inGroupsPerRow,
586 const size_t inAddressRadix,
587 const bool inShowAscii,
588 const size_t inAddrOffset)
const 591 Dump (oss, inStartOffset, inByteCount, inRadix, inBytesPerGroup, inGroupsPerRow, inAddressRadix, inShowAscii, inAddrOffset);
592 inOutputString = oss.str();
593 return inOutputString;
614 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint64_t));
615 if (maxSize < inU64Offset)
617 maxSize -= inU64Offset;
619 const uint64_t * pU64 (reinterpret_cast <const uint64_t *> (
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
623 if (inMaxSize && inMaxSize < maxSize)
628 outUint64s.reserve(maxSize);
629 for (
size_t ndx(0); ndx < maxSize; ndx++)
631 const uint64_t u64 (*pU64++);
638 outUint64s.reserve(0);
651 size_t maxNumU32s (
size_t(
GetByteCount()) /
sizeof(uint32_t));
652 if (maxNumU32s < inU32Offset)
654 maxNumU32s -= inU32Offset;
656 const uint32_t * pU32 (reinterpret_cast<const uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
660 if (inMaxSize && inMaxSize < maxNumU32s)
661 maxNumU32s = inMaxSize;
665 outUint32s.reserve(maxNumU32s);
666 for (
size_t ndx(0); ndx < maxNumU32s; ndx++)
668 const uint32_t u32 (*pU32++);
675 outUint32s.reserve(0);
688 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint16_t));
689 if (maxSize < inU16Offset)
691 maxSize -= inU16Offset;
693 const uint16_t * pU16 (reinterpret_cast <const uint16_t *> (
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
697 if (inMaxSize && inMaxSize < maxSize)
702 outUint16s.reserve(maxSize);
703 for (
size_t ndx(0); ndx < maxSize; ndx++)
705 const uint16_t u16 (*pU16++);
712 outUint16s.reserve(0);
726 if (maxSize < inU8Offset)
728 maxSize -= inU8Offset;
734 if (inMaxSize && inMaxSize < maxSize)
739 outUint8s.reserve(maxSize);
740 for (
size_t ndx(0); ndx < maxSize; ndx++)
741 outUint8s.push_back(*pU8++);
746 outUint8s.reserve(0);
754 const uint8_t * pU8 (reinterpret_cast<const uint8_t*> (
GetHostPointer()));
760 outU8s.reserve(outU8s.size() + maxSize);
761 outU8s.insert(outU8s.end(),pU8, pU8 + maxSize);
778 if (maxSize < inU8Offset)
780 maxSize -= inU8Offset;
786 if (inMaxSize && inMaxSize < maxSize)
791 outString.reserve(maxSize);
792 for (
size_t ndx(0); ndx < maxSize; ndx++)
794 const char c = *pU8++;
804 outString.reserve(0);
819 uint64_t * pU64 (reinterpret_cast<uint64_t*>(
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
822 if (maxU64s > inU64Offset)
823 maxU64s -= inU64Offset;
824 if (maxU64s > inU64s.size())
825 maxU64s = inU64s.size();
826 if (inU64s.size() > maxU64s)
829 for (
unsigned ndx(0); ndx < maxU64s; ndx++)
847 uint32_t * pU32 (reinterpret_cast<uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
850 if (maxU32s > inU32Offset)
851 maxU32s -= inU32Offset;
852 if (maxU32s > inU32s.size())
853 maxU32s = inU32s.size();
854 if (inU32s.size() > maxU32s)
857 for (
unsigned ndx(0); ndx < maxU32s; ndx++)
875 uint16_t * pU16 (reinterpret_cast<uint16_t*>(
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
878 if (maxU16s > inU16Offset)
879 maxU16s -= inU16Offset;
880 if (maxU16s > inU16s.size())
881 maxU16s = inU16s.size();
882 if (inU16s.size() > maxU16s)
885 for (
unsigned ndx(0); ndx < maxU16s; ndx++)
906 if (maxU8s > inU8Offset)
907 maxU8s -= inU8Offset;
908 if (maxU8s > inU8s.size())
909 maxU8s = inU8s.size();
910 if (inU8s.size() > maxU8s)
913 ::memcpy(pU8, &inU8s[0], maxU8s);
915 for (
unsigned ndx(0); ndx < maxU8s; ndx++)
917 *pU8++ = inU8s.at(ndx);
931 return inOutStream <<
"{invalid}";
937 inOutList.push_back (inRP188);
944 inOutStream << inObj.size () <<
":[";
947 inOutStream << *iter;
948 if (++iter != inObj.end ())
951 return inOutStream <<
"]";
957 inOutStream << inObj.size () <<
":[";
961 if (++iter != inObj.end ())
964 return inOutStream <<
"]";
973 if (++iter != inObj.end ())
983 inOutSet.insert (*iter);
990 return inOutStream << inObj.
acHeader 1011 <<
" acFrame=" << inObj.
acFrame 1012 <<
" acRP188=" << inObj.
acRP188 1023 inOutStream <<
"n/a";
1030 #if defined (_DEBUG) 1034 while (str.find (
' ') != string::npos)
1035 str.erase (str.find (
' '), 1);
1080 inOutStream <<
"RegValues:" << inObj.size () <<
"[";
1081 while (iter != inObj.end ())
1083 const NTV2RegisterNumber registerNumber (static_cast <NTV2RegisterNumber> (iter->first));
1084 const ULWord registerValue (iter->second);
1086 if (++iter != inObj.end ())
1089 return inOutStream <<
"]";
1116 if (inOutSet.find(*iter) == inOutSet.end())
1117 inOutSet.insert(*iter);
1125 NTV2VideoFormatSet::const_iterator iter (inFormats.begin ());
1127 inOStream << inFormats.size ()
1128 << (inFormats.size () == 1 ?
" video format: " :
" video format(s): ");
1130 while (iter != inFormats.end ())
1133 inOStream << (++iter == inFormats.end () ?
"" :
", ");
1145 inOStream << inFormats.size()
1146 << (inFormats.size() == 1 ?
" pixel format: " :
" pixel formats: ");
1148 while (iter != inFormats.end())
1151 inOStream << (++iter == inFormats.end() ?
"" :
", ");
1161 inOutSet.insert(*iter);
1171 inOStream << inStandards.size ()
1172 << (inStandards.size () == 1 ?
" standard: " :
" standards: ");
1174 while (iter != inStandards.end ())
1177 inOStream << (++iter == inStandards.end () ?
"" :
", ");
1187 inOutSet.insert(*iter);
1196 inOStream << inGeometries.size ()
1197 << (inGeometries.size () == 1 ?
" geometry: " :
" geometries: ");
1198 while (iter != inGeometries.end ())
1201 inOStream << (++iter == inGeometries.end () ?
"" :
", ");
1210 inOutSet.insert(*iter);
1219 inOStream << inSet.size()
1220 << (inSet.size() == 1 ?
" input: " :
" inputs: ");
1221 while (iter != inSet.end())
1224 inOStream << (++iter == inSet.end() ?
"" :
", ");
1233 inOutSet.insert (*iter);
1241 inOStream << inSet.size()
1242 << (inSet.size() == 1 ?
" output: " :
" outputs: ");
1243 while (iter != inSet.end())
1246 inOStream << (++iter == inSet.end() ?
"" :
", ");
1255 inOutSet.insert(*iter);
1268 if (outFormats.find(*fit) == outFormats.end())
1269 outFormats.insert(*fit);
1279 if (usedFormats.find(pf) == usedFormats.end())
1280 outFormats.insert(pf);
1286 outStandards.clear();
1293 if (outStandards.find(*sit) == outStandards.end())
1294 outStandards.insert(*sit);
1304 if (usedStandards.find(st) == usedStandards.end())
1305 outStandards.insert(st);
1324 outFormats.insert(vf);
1326 catch (
const std::bad_alloc &)
1334 NTV2_ASSERT ((isOkay && !outFormats.empty()) || (!isOkay && outFormats.empty()));
1349 outFormats.insert(pixelFormat);
1351 catch (
const std::bad_alloc &)
1358 NTV2_ASSERT ((isOkay && !outFormats.empty() ) || (!isOkay && outFormats.empty() ));
1367 outStandards.clear();
1374 outStandards.insert(
std);
1383 outGeometries.clear();
1397 outInputSources.clear();
1406 outInputSources.insert(src);
1416 outOutputDests.clear();
1422 for (
size_t ndx(0); ndx < 10; ndx++)
1428 outOutputDests.insert(dst);
1437 << (inSet.size() == 1 ?
" rate: " :
" rates: ");
1438 while (it != inSet.end())
1441 oss << (++it == inSet.end() ?
"" :
", ");
1449 if (inOutSet.find(*it) == inOutSet.end())
1450 inOutSet.insert(*it);
1463 outRates.insert(fr);
1471 return inRun.
Print(inOutStrm);
1478 static const char * sStateStrings [] = {
"Disabled",
"Initializing",
"Starting",
"Paused",
"Stopping",
"Running",
"StartingAtTime",
AJA_NULL};
1480 return string (sStateStrings [inState]);
1522 return it != sFGWdths.end() ? it->second : 0;
1548 return it != sFGHghts.end() ? it->second : 0;
1552 static const string sSegXferUnits[] = {
"",
" U8",
" U16",
"",
" U32",
"",
"",
"",
" U64",
""};
1557 return inStrm <<
"(invalid)";
1581 static string var(
"segInfo");
1583 string units(
"\t// bytes");
1587 oss <<
"NTV2SegmentedXferInfo " << var <<
";" << endl;
1596 oss << var <<
".setSourceOffset(" <<
DEC(
getSourceOffset()) <<
");" << units << endl;
1597 oss << var <<
".setSourcePitch(" <<
DEC(
getSourcePitch()) <<
");" << units << endl;
1599 oss << var <<
".setSourceDirection(false);" << endl;
1601 oss << var <<
".setDestOffset(" <<
DEC(
getDestOffset()) <<
");" << units << endl;
1603 oss << var <<
".setDestPitch(" <<
DEC(
getDestPitch()) <<
");" << units << endl;
1605 oss << var <<
".setDestDirection(false);" << endl;
1623 if (inElementOffset < offset)
1656 mElementsPerSegment = 0;
1657 mInitialSrcOffset = 0;
1658 mInitialDstOffset = 0;
1659 mSrcElementsPerRow = 0;
1660 mDstElementsPerRow = 0;
1667 std::swap(mSrcElementsPerRow, mDstElementsPerRow);
1668 std::swap(mInitialSrcOffset, mInitialDstOffset);
1677 fByteCount (
ULWord(pInUserPointer ? inByteCount : 0)),
1679 #
if defined (AJAMac)
1680 fKernelSpacePtr (0),
1692 : fUserSpacePtr (0),
1695 #
if defined (AJAMac)
1696 fKernelSpacePtr (0),
1710 : fUserSpacePtr (0),
1713 #
if defined (AJAMac)
1714 fKernelSpacePtr (0),
1734 fByteCount =
ULWord(inNewByteCount);
1763 const size_t loopCount(
GetByteCount() /
sizeof(uint64_t));
1766 for (
size_t ndx(0); ndx < loopCount; ndx++)
1775 const size_t loopCount(
GetByteCount() /
sizeof(uint32_t));
1778 for (
size_t ndx(0); ndx < loopCount; ndx++)
1787 const size_t loopCount(
GetByteCount() /
sizeof(uint16_t));
1790 for (
size_t ndx(0); ndx < loopCount; ndx++)
1800 fByteCount =
ULWord(pInUserPointer ? inByteCount : 0);
1802 return (pInUserPointer && inByteCount) || (!pInUserPointer && !inByteCount);
1808 return Set(pInUserPointer, inByteCount) &&
Fill(inValue);
1830 {pBuffer =
new UByte[inByteCount];}
1831 catch (
const std::bad_alloc &)
1833 if (pBuffer &&
Set(pBuffer, inByteCount))
1878 pBytes += inByteOffset;
1914 const ULWord inSrcByteOffset,
const ULWord inDstByteOffset,
const ULWord inByteCount)
1918 if (inSrcByteOffset + inByteCount > inBuffer.
GetByteCount())
1923 const UByte * pSrc (inBuffer);
1924 pSrc += inSrcByteOffset;
1926 UByte * pDst (*
this);
1927 pDst += inDstByteOffset;
1929 ::memcpy (pDst, pSrc, inByteCount);
1946 srcPitch = 0 - srcPitch;
1948 dstPitch = 0 - dstPitch;
1953 if (!pSrc)
return false;
1954 if (!pDst)
return false;
1959 ::memcpy (pDst, pSrc,
size_t(bytesPerSeg));
1960 srcOffset += srcPitch;
1961 dstOffset += dstPitch;
1971 const string newline(
"\n"), tab(
"\t");
1977 for (
size_t ndx(0); ndx < str.size(); ndx++)
1987 for (
size_t srcNdx(0), dstNdx(0); srcNdx < str.size(); srcNdx += 2)
2001 if (fFlags != inBuffer.fFlags)
2007 fUserSpacePtr = inBuffer.fUserSpacePtr;
2008 inBuffer.fUserSpacePtr = tmp;
2024 const uint8_t * pSrchData (inValue);
2025 const uint8_t * pMyData (*
this);
2029 if (!::memcmp(pMyData, pSrchData, srchByteCount))
2030 outOffsets.insert(offset);
2033 }
while (offset < maxOffset);
2045 if (inByteOffset >= totalBytes)
2048 totalBytes -= inByteOffset;
2050 ULWord byteCount(inByteCount);
2051 if (byteCount > totalBytes)
2052 byteCount = totalBytes;
2057 const UByte * pByte1 (*
this);
2058 const UByte * pByte2 (inBuffer);
2059 pByte1 += inByteOffset;
2060 pByte2 += inByteOffset;
2061 #if !defined(NTV2BUFFER_NO_MEMCMP) 2062 return ::memcmp (pByte1, pByte2, byteCount) == 0;
2063 #else // NTV2BUFFER_NO_MEMCMP 2064 ULWord offset(inByteOffset);
2067 if (*pByte1 != *pByte2)
2069 cerr <<
"## ERROR: IsContentEqual: miscompare at offset " <<
xHEX0N(offset,8)
2070 <<
" (" <<
DEC(offset) <<
"): " <<
xHEX0N(
UWord(*pByte1),2) <<
" != " 2072 <<
DEC(byteCount) <<
") bytes left to compare" << endl;
2080 #endif // NTV2BUFFER_NO_MEMCMP 2085 if (byteOffset == 0xFFFFFFFF)
2092 {byteOffset = 0xFFFFFFFF;
return true;}
2095 if (byteOffset >= totalBytesToCompare)
2097 totalBytesToCompare -= byteOffset;
2099 const UByte * pByte1 (*
this);
2100 const UByte * pByte2 (inBuffer);
2101 while (totalBytesToCompare)
2103 if (pByte1[byteOffset] != pByte2[byteOffset])
2105 totalBytesToCompare--;
2108 byteOffset = 0xFFFFFFFF;
2114 outByteOffsetFirst = outByteOffsetLast =
GetByteCount ();
2127 outByteOffsetFirst = 0;
2130 if (*pByte1 != *pByte2)
2134 outByteOffsetFirst++;
2136 if (outByteOffsetFirst == 0)
2141 if (*pByte1 == *pByte2)
2145 outByteOffsetFirst++;
2148 outByteOffsetFirst--;
2158 while (--outByteOffsetLast)
2160 if (*pByte1 != *pByte2)
2168 while (outByteOffsetLast)
2170 if (*pByte1 == *pByte2)
2174 outByteOffsetLast--;
2177 outByteOffsetLast++;
2178 if (outByteOffsetLast <= outByteOffsetFirst)
2179 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" <= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2180 const ULWord tmp (outByteOffsetLast);
2181 outByteOffsetLast = outByteOffsetFirst;
2182 outByteOffsetFirst = tmp;
2183 if (outByteOffsetLast >= outByteOffsetFirst)
2184 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" >= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2200 const bool result (inNewSize && (!(inNewSize & (inNewSize - 1))));
2208 #if defined(MSWindows) || defined(AJABareMetal) 2209 return AJA_PAGE_SIZE;
2211 return size_t(::getpagesize());
2219 acRequestedFrame (0),
2220 acAudioClockTimeStamp (0),
2221 acAudioExpectedAddress (0),
2222 acAudioInStartAddress (0),
2223 acAudioInStopAddress (0),
2224 acAudioOutStopAddress (0),
2225 acAudioOutStartAddress (0),
2226 acTotalBytesTransferred (0),
2231 acCurrentFrameTime (0),
2232 acAudioClockCurrentTime (0),
2233 acCurrentAudioExpectedAddress (0),
2234 acCurrentAudioStartAddress (0),
2235 acCurrentFieldCount (0),
2236 acCurrentLineCount (0),
2238 acCurrentUserCookie (0),
2247 : acHeader (inObj.acHeader),
2248 acFrameTime (inObj.acFrameTime),
2249 acRequestedFrame (inObj.acRequestedFrame),
2250 acAudioClockTimeStamp (inObj.acAudioClockTimeStamp),
2251 acAudioExpectedAddress (inObj.acAudioExpectedAddress),
2252 acAudioInStartAddress (inObj.acAudioInStartAddress),
2253 acAudioInStopAddress (inObj.acAudioInStopAddress),
2254 acAudioOutStopAddress (inObj.acAudioOutStopAddress),
2255 acAudioOutStartAddress (inObj.acAudioOutStartAddress),
2256 acTotalBytesTransferred (inObj.acTotalBytesTransferred),
2257 acStartSample (inObj.acStartSample),
2258 acCurrentTime (inObj.acCurrentTime),
2259 acCurrentFrame (inObj.acCurrentFrame),
2260 acCurrentFrameTime (inObj.acCurrentFrameTime),
2261 acAudioClockCurrentTime (inObj.acAudioClockCurrentTime),
2262 acCurrentAudioExpectedAddress (inObj.acCurrentAudioExpectedAddress),
2263 acCurrentAudioStartAddress (inObj.acCurrentAudioStartAddress),
2264 acCurrentFieldCount (inObj.acCurrentFieldCount),
2265 acCurrentLineCount (inObj.acCurrentLineCount),
2266 acCurrentReps (inObj.acCurrentReps),
2267 acCurrentUserCookie (inObj.acCurrentUserCookie),
2268 acFrame (inObj.acFrame),
2269 acRP188 (inObj.acRP188),
2270 acTrailer (inObj.acTrailer)
2293 for (
ULWord ndx (0); ndx < numRP188s; ndx++)
2294 outValues << pArray [ndx];
2313 outTimeCode = pArray [inTCIndex];
2321 outTimeCodes.clear();
2337 outTimeCodes[tcIndex] = tc;
2338 else if (tc.IsValid())
2339 outTimeCodes[tcIndex] = tc;
2349 (
void)inSDIInputIndex0;
2357 if (!pArray || !numRP188s)
2362 if (
ULWord(inTCNdx) >= numRP188s)
2365 pArray[inTCNdx] = inTimecode;
2513 if (mInStatistics.
IsNULL())
2528 if (numElements != 8)
2530 if (inSDIInputIndex0 >= numElements)
2532 outStatus = pArray[inSDIInputIndex0];
2544 if (numElements != 8)
2546 if (inSDIInputIndex0 >= numElements)
2548 return pArray[inSDIInputIndex0];
2554 inOutStream << mHeader <<
", " << mInStatistics <<
", " << mTrailer;
return inOutStream;
2561 acTransferFrame (0),
2563 acFramesProcessed (0),
2564 acFramesDropped (0),
2566 acAudioTransferSize (0),
2567 acAudioStartSample (0),
2568 acAncTransferSize (0),
2569 acAncField2TransferSize (0)
2578 acCrosspoint (inCrosspoint),
2583 acRDTSCStartTime (0),
2584 acAudioClockStartTime (0),
2585 acRDTSCCurrentTime (0),
2586 acAudioClockCurrentTime (0),
2587 acFramesProcessed (0),
2588 acFramesDropped (0),
2695 if (inIndexNum == 0)
2712 case 13: oss << (
WithRP188() ?
"Yes" :
"No");
break;
2713 case 14: oss << (
WithLTC() ?
"Yes" :
"No");
break;
2717 case 18: oss << (
WithVidProc() ?
"Yes" :
"No");
break;
2720 case 21: oss << (
IsFieldMode() ?
"Yes" :
"No");
break;
2723 else if (inIndexNum < 22)
2733 << (inObj.
IsInput() ?
"Input " : (inObj.
IsOutput() ?
"Output" :
"*BAD* "))
2742 << setw(10) << (inObj.
WithRP188() ?
"+RP188" :
"-RP188")
2743 << setw(10) << (inObj.
WithLTC() ?
"+LTC" :
"-LTC")
2744 << setw(10) << (inObj.
WithFBFChange() ?
"+FBFchg" :
"-FBFchg")
2745 << setw(10) << (inObj.
WithFBOChange() ?
"+FBOchg" :
"-FBOchg")
2747 << setw(10) << (inObj.
WithVidProc() ?
"+VidProc" :
"-VidProc")
2748 << setw(10) << (inObj.
WithCustomAnc() ?
"+AncData" :
"-AncData")
2750 << setw(10) << (inObj.
IsFieldMode() ?
"+FldMode" :
"-FldMode");
2763 Set (inNumSegments, inNumActiveBytesPerRow, inHostBytesPerRow, inDeviceBytesPerRow);
2789 ccSaturationValue (0)
2826 acTransferStatus (),
2828 acInVideoDMAOffset (0),
2829 acInSegmentedDMAInfo (),
2830 acColorCorrection (),
2835 acPeerToPeerFlags (0),
2836 acFrameRepeatCount (1),
2837 acDesiredFrame (-1),
2849 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2851 acVideoBuffer (pInVideoBuffer, inVideoByteCount),
2852 acAudioBuffer (pInAudioBuffer, inAudioByteCount),
2853 acANCBuffer (pInANCBuffer, inANCByteCount),
2854 acANCField2Buffer (pInANCF2Buffer, inANCF2ByteCount),
2856 acTransferStatus (),
2858 acInVideoDMAOffset (0),
2859 acInSegmentedDMAInfo (),
2860 acColorCorrection (),
2865 acPeerToPeerFlags (0),
2866 acFrameRepeatCount (1),
2867 acDesiredFrame (-1),
2883 ULWord * pInAudioBuffer,
const ULWord inAudioByteCount,
2885 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2890 &&
SetAncBuffers (pInANCBuffer, inANCByteCount, pInANCF2Buffer, inANCF2ByteCount);
2931 for (
UWord ndx (0); ndx <
UWord(maxNumValues); ndx++)
2933 const NTV2TCIndex tcIndex (static_cast<NTV2TCIndex>(ndx));
2953 pArray[inTCIndex] = inTimeCode;
2967 for (
ULWord tcIndex(0); tcIndex < maxNumValues; tcIndex++)
2971 pArray[tcIndex] = inTimeCode;
2994 const ULWord inHostBytesPerRow,
const ULWord inDeviceBytesPerRow)
3182 mInNumRegisters (
ULWord (inRegisterNumbers.size ())),
3183 mOutNumRegisters (0)
3192 mInNumRegisters (
ULWord (inRegReads.size ())),
3193 mOutNumRegisters (0)
3203 mInNumRegisters =
ULWord(inRegisterNumbers.size());
3204 mOutNumRegisters = 0;
3205 bool result ( mInRegisters.
Allocate(mInNumRegisters *
sizeof(
ULWord))
3212 ULWord * pRegArray(mInRegisters);
3218 pRegArray[ndx++] = *iter;
3225 if (!mInNumRegisters)
3232 const ULWord * pRegNums(mInRegisters);
3233 for (
ULWord ndx(0); ndx < mInNumRegisters; ndx++)
3234 if (outRegNums.find(pRegNums[ndx]) == outRegNums.end())
3235 outRegNums.insert(pRegNums[ndx]);
3243 outGoodRegNums.clear();
3244 if (!mOutGoodRegisters)
3246 if (!mOutNumRegisters)
3248 if (mOutNumRegisters > mInNumRegisters)
3251 const ULWord * pRegArray (mOutGoodRegisters);
3252 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3253 outGoodRegNums.insert(pRegArray[ndx]);
3260 outBadRegNums.clear();
3266 if (reqRegNums == goodRegNums)
3270 std::set_difference (reqRegNums.begin(), reqRegNums.end(),
3271 goodRegNums.begin(), goodRegNums.end(),
3272 std::inserter(outBadRegNums, outBadRegNums.begin()));
3278 if (!mOutGoodRegisters)
3280 if (!mOutNumRegisters)
3282 if (mOutNumRegisters > mInNumRegisters)
3288 const ULWord * pRegArray (mOutGoodRegisters);
3289 ULWord * pValArray (mOutValues);
3290 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3291 if (pRegArray[ndx] == inRegNum)
3293 pValArray[ndx] = inValue;
3304 if (!mOutGoodRegisters)
3306 if (!mOutNumRegisters)
3308 if (mOutNumRegisters > mInNumRegisters)
3315 const ULWord * pRegArray (mOutGoodRegisters);
3316 const ULWord * pValArray (mOutValues);
3317 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3319 outValues [pRegArray[ndx]] = pValArray[ndx];
3320 #if defined(NTV2_PRETEND_DEVICE) 3321 if (pRegArray[ndx] ==
kRegBoardID && pValArray[ndx] == NTV2_PRETEND_DEVICE_FROM)
3322 outValues [pRegArray[ndx]] = NTV2_PRETEND_DEVICE_TO;
3325 #endif // NTV2_PRETEND_DEVICE 3337 if (outValues.empty())
3342 #if defined(NTV2_PRETEND_DEVICE) 3344 regInfo.
setValue(NTV2_PRETEND_DEVICE_TO);
3347 #endif // NTV2_PRETEND_DEVICE 3348 outValues.push_back(regInfo);
3354 uint32_t missingTally(0);
3358 if (mapIter != regValMap.end())
3359 it->registerValue = mapIter->second;
3363 #
if defined(NTV2_PRETEND_DEVICE)
3364 if (it->registerNumber ==
kRegBoardID && it->registerValue == NTV2_PRETEND_DEVICE_FROM)
3365 it->registerValue = NTV2_PRETEND_DEVICE_TO;
3368 #endif // NTV2_PRETEND_DEVICE 3370 return !missingTally;
3377 inOutStream << mHeader <<
", numRegs=" << mInNumRegisters <<
", inRegs=" << mInRegisters <<
", outNumGoodRegs=" << mOutNumRegisters
3378 <<
", outGoodRegs=" << mOutGoodRegisters <<
", outValues=" << mOutValues <<
", " << mTrailer;
3385 mInNumRegisters (
ULWord(inRegWrites.size())),
3409 pBadRegIndexes[ndx] = 0;
3411 pRegInfoArray[ndx++] = *it;
3422 outFailedRegWrites.clear();
3428 outRegWrites.clear();
3437 outRegWrites.push_back(pRegInfos[ndx]);
3450 if (pBadRegIndexes && maxNumBadRegIndexes && pRegInfoArray && maxNumRegInfos &&
mOutNumFailures)
3453 for (
UWord num(0); num < maxNumBadRegIndexes; num++)
3455 const UWord badRegIndex (pBadRegIndexes[num]);
3456 if (badRegIndex < maxNumRegInfos)
3458 const NTV2RegInfo & badRegInfo (pRegInfoArray[badRegIndex]);
3459 oss <<
"Failure " << num <<
": " << badRegInfo << endl;
3469 typedef std::pair <ULWord, ULWord> ULWordPair;
3470 typedef std::pair <ULWordPair, ULWordPair> ULWordPairs;
3493 const bool badName (regName.find(
' ') != string::npos);
3496 oss <<
"theDevice.WriteRegister (";
3533 for (NTV2ULWordVector::const_iterator it(inObj.begin()); it != inObj.end(); ++it)
3534 inOutStream <<
" " <<
HEX0N(*it,8);
3541 inOutStream << (inCompact ?
"Ch[" :
"[");
3545 inOutStream <<
DEC(*it+1);
3548 if (++it != inObj.end())
3549 inOutStream << (inCompact ?
"|" :
",");
3551 return inOutStream <<
"]";
3555 { ostringstream oss;
3562 inOutStream << (inCompact ?
"Ch{" :
"{");
3566 inOutStream <<
DEC(*it+1);
3569 if (++it != inObj.end())
3570 inOutStream << (inCompact ?
"|" :
",");
3572 return inOutStream <<
"}";
3576 { ostringstream oss;
3603 result.push_back(ch);
3611 result.push_back(*it);
3617 inOutStream << (inCompact ?
"AudSys{" :
"{");
3621 inOutStream <<
DEC(*it+1);
3624 if (++it != inObj.end())
3625 inOutStream << (inCompact ?
"|" :
",");
3627 return inOutStream <<
"}";
3631 { ostringstream oss;
3641 result.insert(audSys);
3649 if (result.find(it->registerNumber) == result.end())
3650 result.insert(it->registerNumber);
3657 if (iter->registerNumber == inRegNum)
3659 return inRegInfos.end();
3665 return inObj.
Print(inOutStream);
3671 inOutStream << inObj.size () <<
" regs:" << endl;
3673 inOutStream << *iter << endl;
3680 mIsWriting (inDoWrite),
3686 *pRegInfo = inBankSelect;
3689 *pRegInfo = inOutRegInfo;
3702 if (
ULWord(inIndex0) < maxNum)
3703 result = pRegInfos[inIndex0];
3715 if (
mInBankInfos) oss << *pBankRegInfo;
else oss <<
"-";
3716 oss <<
" regInfos=";
3717 if (
mInRegInfos) oss << *pRegInfo;
else oss <<
"-";
3725 mIsWriting (inDoWrite),
3726 mVirtualData (inVirtualData, inVirtualDataSize)
3744 #define AsU8Ref(_x_) reinterpret_cast<uint8_t&>(_x_) 3745 #define AsU16Ref(_x_) reinterpret_cast<uint16_t&>(_x_) 3746 #define AsU32Ref(_x_) reinterpret_cast<uint32_t&>(_x_) 3747 #define AsU64Ref(_x_) reinterpret_cast<uint64_t&>(_x_) 3753 PUSHU32(fHeaderVersion, outBlob);
3755 PUSHU32(fSizeInBytes, outBlob);
3756 PUSHU32(fPointerSize, outBlob);
3758 PUSHU32(fResultStatus, outBlob);
3764 POPU32(fHeaderTag, inBlob, inOutIndex);
3765 POPU32(fType, inBlob, inOutIndex);
3766 POPU32(fHeaderVersion, inBlob, inOutIndex);
3767 POPU32(fVersion, inBlob, inOutIndex);
3769 POPU32(v32, inBlob, inOutIndex);
3770 POPU32(fPointerSize, inBlob, inOutIndex);
3771 POPU32(fOperation, inBlob, inOutIndex);
3772 POPU32(fResultStatus, inBlob, inOutIndex);
3778 PUSHU32(fTrailerVersion, outBlob);
3779 PUSHU32(fTrailerTag, outBlob);
3785 POPU32(fTrailerVersion, inBlob, inOutIndex);
3786 POPU32(fTrailerTag, inBlob, inOutIndex);
3795 if (!IsNULL() && fillBuffer)
3802 ULWord byteCount(0), flags(0);
3803 POPU32(byteCount, inBlob, inOutIndex);
3804 POPU32(flags, inBlob, inOutIndex);
3809 if ((inOutIndex + byteCount) > inBlob.size())
3811 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
3812 inOutIndex += byteCount;
3820 ULWord byteCount(0), flags(0);
3821 POPU32(byteCount, inBlob, inOutIndex);
3822 POPU32(flags, inBlob, inOutIndex);
3823 if ((inOutIndex + byteCount) > inBlob.size())
3826 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
3827 inOutIndex += byteCount;
3833 const size_t totBytes (mHeader.GetSizeInBytes()
3834 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
3835 if (outBlob.capacity() < totBytes)
3836 outBlob.reserve(totBytes);
3839 mInRegisters.ByteSwap32();
3841 bool ok = mHeader.RPCEncode(outBlob);
3842 PUSHU32(mInNumRegisters, outBlob);
3843 ok &= mInRegisters.RPCEncode(outBlob,
true);
3844 PUSHU32(mOutNumRegisters, outBlob);
3845 ok &= mOutGoodRegisters.RPCEncode(outBlob,
false)
3846 && mOutValues.RPCEncode(outBlob,
false)
3847 && mTrailer.RPCEncode(outBlob);
3850 mInRegisters.ByteSwap32();
3857 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
3858 if (!ok)
return false;
3859 POPU32(mInNumRegisters, inBlob, inOutIndex);
3860 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
true);
3861 POPU32(mOutNumRegisters, inBlob, inOutIndex);
3862 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
false);
3863 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
false);
3864 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
3867 mInRegisters.ByteSwap32();
3874 const size_t totBytes (mHeader.GetSizeInBytes()
3875 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
3876 if (outBlob.capacity() < totBytes)
3877 outBlob.reserve(totBytes);
3880 mOutGoodRegisters.ByteSwap32();
3881 mOutValues.ByteSwap32();
3883 bool ok = mHeader.RPCEncode(outBlob);
3884 PUSHU32(mInNumRegisters, outBlob);
3885 ok &= mInRegisters.RPCEncode(outBlob,
false);
3886 PUSHU32(mOutNumRegisters, outBlob);
3887 ok &= mOutGoodRegisters.RPCEncode(outBlob,
true)
3888 && mOutValues.RPCEncode(outBlob,
true)
3889 && mTrailer.RPCEncode(outBlob);
3892 mOutGoodRegisters.ByteSwap32();
3893 mOutValues.ByteSwap32();
3900 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
3901 if (!ok)
return false;
3902 POPU32(mInNumRegisters, inBlob, inOutIndex);
3903 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
false);
3904 POPU32(mOutNumRegisters, inBlob, inOutIndex);
3905 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
true);
3906 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
true);
3907 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
3910 mOutGoodRegisters.ByteSwap32();
3911 mOutValues.ByteSwap32();
3918 const size_t totBytes (mHeader.GetSizeInBytes()
3919 + mInRegInfos.GetByteCount() + mOutBadRegIndexes.GetByteCount());
3920 if (outBlob.capacity() < totBytes)
3921 outBlob.reserve(totBytes);
3924 mInRegInfos.ByteSwap32();
3925 mOutBadRegIndexes.ByteSwap32();
3927 bool ok = mHeader.RPCEncode(outBlob);
3928 PUSHU32(mInNumRegisters, outBlob);
3929 ok &= mInRegInfos.RPCEncode(outBlob);
3930 PUSHU32(mOutNumFailures, outBlob);
3931 ok &= mOutBadRegIndexes.RPCEncode(outBlob)
3932 && mTrailer.RPCEncode(outBlob);
3935 mInRegInfos.ByteSwap32();
3936 mOutBadRegIndexes.ByteSwap16();
3943 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
3944 POPU32(mInNumRegisters, inBlob, inOutIndex);
3945 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
3946 POPU32(mOutNumFailures, inBlob, inOutIndex);
3947 ok &= mOutBadRegIndexes.RPCDecode(inBlob, inOutIndex);
3948 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
3951 mInRegInfos.ByteSwap32();
3952 mOutBadRegIndexes.ByteSwap16();
3959 const size_t totBytes (mHeader.GetSizeInBytes()
3960 + mInBankInfos.GetByteCount() + mInRegInfos.GetByteCount());
3961 if (outBlob.capacity() < totBytes)
3962 outBlob.reserve(totBytes);
3965 mInBankInfos.ByteSwap32();
3966 mInRegInfos.ByteSwap32();
3968 bool ok = mHeader.RPCEncode(outBlob);
3970 ok &= mInBankInfos.RPCEncode(outBlob);
3971 ok &= mInRegInfos.RPCEncode(outBlob)
3972 && mTrailer.RPCEncode(outBlob);
3975 mInBankInfos.ByteSwap32();
3976 mInRegInfos.ByteSwap32();
3983 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
3984 POPU32(mIsWriting, inBlob, inOutIndex);
3985 ok &= mInBankInfos.RPCDecode(inBlob, inOutIndex);
3986 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
3987 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
3990 mInBankInfos.ByteSwap32();
3991 mInRegInfos.ByteSwap32();
3998 const size_t totBytes (acHeader.GetSizeInBytes());
3999 if (outBlob.capacity() < totBytes)
4000 outBlob.reserve(totBytes);
4001 bool ok = acHeader.RPCEncode(outBlob);
4007 PUSHU64(acRDTSCStartTime, outBlob);
4008 PUSHU64(acAudioClockStartTime, outBlob);
4009 PUSHU64(acRDTSCCurrentTime, outBlob);
4010 PUSHU64(acAudioClockCurrentTime, outBlob);
4011 PUSHU32(acFramesProcessed, outBlob);
4012 PUSHU32(acFramesDropped, outBlob);
4013 PUSHU32(acBufferLevel, outBlob);
4014 PUSHU32(acOptionFlags, outBlob);
4016 ok &= acTrailer.RPCEncode(outBlob);
4021 { uint16_t v16(0); uint32_t v32(0);
4022 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4023 POPU16(v16, inBlob, inOutIndex);
4025 POPU16(v16, inBlob, inOutIndex);
4027 POPU32(v32, inBlob, inOutIndex);
4028 acStartFrame =
LWord(v32);
4029 POPU32(v32, inBlob, inOutIndex);
4030 acEndFrame =
LWord(v32);
4031 POPU32(v32, inBlob, inOutIndex);
4032 acActiveFrame =
LWord(v32);
4033 POPU64(acRDTSCStartTime, inBlob, inOutIndex);
4034 POPU64(acAudioClockStartTime, inBlob, inOutIndex);
4035 POPU64(acRDTSCCurrentTime, inBlob, inOutIndex);
4036 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4037 POPU32(acFramesProcessed, inBlob, inOutIndex);
4038 POPU32(acFramesDropped, inBlob, inOutIndex);
4039 POPU32(acBufferLevel, inBlob, inOutIndex);
4040 POPU32(acOptionFlags, inBlob, inOutIndex);
4041 POPU16(v16, inBlob, inOutIndex);
4043 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4049 const size_t totBytes (acHeader.GetSizeInBytes());
4050 if (outBlob.capacity() < totBytes)
4051 outBlob.reserve(totBytes);
4052 bool ok = acHeader.RPCEncode(outBlob);
4054 PUSHU32(acRequestedFrame, outBlob);
4055 PUSHU64(acAudioClockTimeStamp, outBlob);
4056 PUSHU32(acAudioExpectedAddress, outBlob);
4057 PUSHU32(acAudioInStartAddress, outBlob);
4058 PUSHU32(acAudioInStopAddress, outBlob);
4059 PUSHU32(acAudioOutStopAddress, outBlob);
4060 PUSHU32(acAudioOutStartAddress, outBlob);
4061 PUSHU32(acTotalBytesTransferred, outBlob);
4062 PUSHU32(acStartSample, outBlob);
4064 ok &= acTimeCodes.RPCEncode(outBlob);
4066 PUSHU32(acCurrentFrame, outBlob);
4068 PUSHU64(acAudioClockCurrentTime, outBlob);
4069 PUSHU32(acCurrentAudioExpectedAddress, outBlob);
4070 PUSHU32(acCurrentAudioStartAddress, outBlob);
4071 PUSHU32(acCurrentFieldCount, outBlob);
4072 PUSHU32(acCurrentLineCount, outBlob);
4073 PUSHU32(acCurrentReps, outBlob);
4074 PUSHU64(acCurrentUserCookie, outBlob);
4076 PUSHU32(acRP188.fDBB, outBlob);
4077 PUSHU32(acRP188.fLo, outBlob);
4078 PUSHU32(acRP188.fHi, outBlob);
4079 ok &= acTrailer.RPCEncode(outBlob);
4085 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4086 POPU64(v64, inBlob, inOutIndex);
4088 POPU32(acRequestedFrame, inBlob, inOutIndex);
4089 POPU64(acAudioClockTimeStamp, inBlob, inOutIndex);
4090 POPU32(acAudioExpectedAddress, inBlob, inOutIndex);
4091 POPU32(acAudioInStartAddress, inBlob, inOutIndex);
4092 POPU32(acAudioInStopAddress, inBlob, inOutIndex);
4093 POPU32(acAudioOutStopAddress, inBlob, inOutIndex);
4094 POPU32(acAudioOutStartAddress, inBlob, inOutIndex);
4095 POPU32(acTotalBytesTransferred, inBlob, inOutIndex);
4096 POPU32(acStartSample, inBlob, inOutIndex);
4098 ok &= acTimeCodes.RPCDecode(inBlob, inOutIndex);
4099 POPU64(v64, inBlob, inOutIndex);
4101 POPU32(acCurrentFrame, inBlob, inOutIndex);
4102 POPU64(v64, inBlob, inOutIndex);
4103 acCurrentFrameTime =
LWord64(v64);
4104 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4105 POPU32(acCurrentAudioExpectedAddress, inBlob, inOutIndex);
4106 POPU32(acCurrentAudioStartAddress, inBlob, inOutIndex);
4107 POPU32(acCurrentFieldCount, inBlob, inOutIndex);
4108 POPU32(acCurrentLineCount, inBlob, inOutIndex);
4109 POPU32(acCurrentReps, inBlob, inOutIndex);
4110 POPU64(acCurrentUserCookie, inBlob, inOutIndex);
4111 POPU32(acFrame, inBlob, inOutIndex);
4112 POPU32(acRP188.fDBB, inBlob, inOutIndex);
4113 POPU32(acRP188.fLo, inBlob, inOutIndex);
4114 POPU32(acRP188.fHi, inBlob, inOutIndex);
4115 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4121 const size_t totBytes (acHeader.GetSizeInBytes());
4122 if (outBlob.capacity() < totBytes)
4123 outBlob.reserve(totBytes);
4124 bool ok = acHeader.RPCEncode(outBlob);
4127 PUSHU32(acBufferLevel, outBlob);
4128 PUSHU32(acFramesProcessed, outBlob);
4129 PUSHU32(acFramesDropped, outBlob);
4130 ok &= acFrameStamp.RPCEncode(outBlob);
4131 PUSHU32(acAudioTransferSize, outBlob);
4132 PUSHU32(acAudioStartSample, outBlob);
4133 PUSHU32(acAncTransferSize, outBlob);
4134 PUSHU32(acAncField2TransferSize, outBlob);
4135 ok &= acTrailer.RPCEncode(outBlob);
4140 { uint16_t v16(0); uint32_t v32(0);
4141 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4142 POPU16(v16, inBlob, inOutIndex);
4144 POPU32(v32, inBlob, inOutIndex);
4145 acTransferFrame =
LWord(v32);
4146 POPU32(acBufferLevel, inBlob, inOutIndex);
4147 POPU32(acFramesProcessed, inBlob, inOutIndex);
4148 POPU32(acFramesDropped, inBlob, inOutIndex);
4149 ok &= acFrameStamp.RPCDecode(inBlob, inOutIndex);
4150 POPU32(acAudioTransferSize, inBlob, inOutIndex);
4151 POPU32(acAudioStartSample, inBlob, inOutIndex);
4152 POPU32(acAncTransferSize, inBlob, inOutIndex);
4153 POPU32(acAncField2TransferSize, inBlob, inOutIndex);
4154 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4160 PUSHU32(acNumSegments, outBlob);
4161 PUSHU32(acNumActiveBytesPerRow, outBlob);
4162 PUSHU32(acSegmentHostPitch, outBlob);
4163 PUSHU32(acSegmentDevicePitch, outBlob);
4169 POPU32(acNumSegments, inBlob, inOutIndex);
4170 POPU32(acNumActiveBytesPerRow, inBlob, inOutIndex);
4171 POPU32(acSegmentHostPitch, inBlob, inOutIndex);
4172 POPU32(acSegmentDevicePitch, inBlob, inOutIndex);
4179 PUSHU32(ccSaturationValue, outBlob);
4180 return ccLookupTables.RPCEncode(outBlob);
4185 POPU16(u16, inBlob, inOutIndex);
4187 POPU32(ccSaturationValue, inBlob, inOutIndex);
4188 return ccLookupTables.RPCDecode(inBlob, inOutIndex);
4194 PUSHU16(foregroundVideoCrosspoint, outBlob);
4195 PUSHU16(backgroundVideoCrosspoint, outBlob);
4196 PUSHU16(foregroundKeyCrosspoint, outBlob);
4197 PUSHU16(backgroundKeyCrosspoint, outBlob);
4204 { uint16_t v16(0); uint32_t v32(0);
4205 POPU16(v16, inBlob, inOutIndex);
4207 POPU16(v16, inBlob, inOutIndex);
4209 POPU16(v16, inBlob, inOutIndex);
4211 POPU16(v16, inBlob, inOutIndex);
4213 POPU16(v16, inBlob, inOutIndex);
4215 POPU32(v32, inBlob, inOutIndex);
4216 transitionCoefficient =
Fixed_(v32);
4217 POPU32(v32, inBlob, inOutIndex);
4218 transitionSoftness =
Fixed_(v32);
4232 POPU32(fDBB, inBlob, inOutIndex);
4233 POPU32(fLo, inBlob, inOutIndex);
4234 POPU32(fHi, inBlob, inOutIndex);
4241 const size_t totBytes (acHeader.GetSizeInBytes() + acVideoBuffer.GetByteCount() + acAudioBuffer.GetByteCount()
4242 + acANCBuffer.GetByteCount() + acANCField2Buffer.GetByteCount() + acOutputTimeCodes.GetByteCount()
4243 + acHDMIAuxData.GetByteCount() + 64);
4244 if (outBlob.capacity() < totBytes)
4245 outBlob.reserve(totBytes);
4246 bool ok = acHeader.RPCEncode(outBlob);
4247 ok &= acVideoBuffer.RPCEncode(outBlob);
4248 ok &= acAudioBuffer.RPCEncode(outBlob);
4249 ok &= acANCBuffer.RPCEncode(outBlob);
4250 ok &= acANCField2Buffer.RPCEncode(outBlob);
4251 ok &= acOutputTimeCodes.RPCEncode(outBlob);
4252 ok &= acTransferStatus.RPCEncode(outBlob);
4253 PUSHU64(acInUserCookie, outBlob);
4254 PUSHU32(acInVideoDMAOffset, outBlob);
4255 ok &= acInSegmentedDMAInfo.RPCEncode(outBlob);
4256 ok &= acColorCorrection.RPCEncode(outBlob);
4257 PUSHU16(acFrameBufferFormat, outBlob);
4258 PUSHU16(acFrameBufferOrientation, outBlob);
4259 ok &= acVidProcInfo.RPCEncode(outBlob);
4260 PUSHU16(acVideoQuarterSizeExpand, outBlob);
4261 ok &= acHDMIAuxData.RPCEncode(outBlob);
4262 PUSHU32(acPeerToPeerFlags, outBlob);
4263 PUSHU32(acFrameRepeatCount, outBlob);
4265 ok &= acRP188.RPCEncode(outBlob);
4266 PUSHU16(acCrosspoint, outBlob);
4267 ok &= acTrailer.RPCEncode(outBlob);
4273 { uint16_t v16(0); uint32_t v32(0);
4275 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4276 ok &= acVideoBuffer.RPCDecode(inBlob, inOutIndex);
4277 ok &= acAudioBuffer.RPCDecode(inBlob, inOutIndex);
4278 ok &= acANCBuffer.RPCDecode(inBlob, inOutIndex);
4279 ok &= acANCField2Buffer.RPCDecode(inBlob, inOutIndex);
4280 ok &= acOutputTimeCodes.RPCDecode(inBlob, inOutIndex);
4281 ok &= acTransferStatus.RPCDecode(inBlob, inOutIndex);
4282 POPU64(acInUserCookie, inBlob, inOutIndex);
4283 POPU32(acInVideoDMAOffset, inBlob, inOutIndex);
4284 ok &= acInSegmentedDMAInfo.RPCDecode(inBlob, inOutIndex);
4285 ok &= acColorCorrection.RPCDecode(inBlob, inOutIndex);
4286 POPU16(v16, inBlob, inOutIndex);
4288 POPU16(v16, inBlob, inOutIndex);
4290 ok &= acVidProcInfo.RPCDecode(inBlob, inOutIndex);
4291 POPU16(v16, inBlob, inOutIndex);
4293 ok &= acHDMIAuxData.RPCDecode(inBlob, inOutIndex);
4294 POPU32(acPeerToPeerFlags, inBlob, inOutIndex);
4295 POPU32(acFrameRepeatCount, inBlob, inOutIndex);
4296 POPU32(v32, inBlob, inOutIndex);
4297 acDesiredFrame =
LWord(v32);
4298 ok &= acRP188.RPCDecode(inBlob, inOutIndex);
4299 POPU16(v16, inBlob, inOutIndex);
4301 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4311 PUSHU32(videoBufferSize, outBlob);
4312 if (videoBuffer && videoBufferSize)
4313 { buff.
Set(videoBuffer, videoBufferSize);
4316 PUSHU32(videoDmaOffset, outBlob);
4318 PUSHU32(audioBufferSize, outBlob);
4319 if (audioBuffer && audioBufferSize)
4320 { buff.
Set(audioBuffer, audioBufferSize);
4323 PUSHU32(audioStartSample, outBlob);
4324 PUSHU32(audioNumChannels, outBlob);
4325 PUSHU32(frameRepeatCount, outBlob);
4326 rp188.RPCEncode(outBlob);
4329 PUSHU32(transferFlags, outBlob);
4330 PUSHU8(bDisableExtraAudioInfo, outBlob);
4334 vidProcInfo.RPCEncode(outBlob);
4335 PUSHU32(customAncInfo.Group1, outBlob);
4336 PUSHU32(customAncInfo.Group2, outBlob);
4337 PUSHU32(customAncInfo.Group3, outBlob);
4338 PUSHU32(customAncInfo.Group4, outBlob);
4339 PUSHU32(videoNumSegments, outBlob);
4340 PUSHU32(videoSegmentHostPitch, outBlob);
4341 PUSHU32(videoSegmentCardPitch, outBlob);
4348 POPU16(v16, inBlob, inOutIndex);
4352 POPU32(videoBufferSize, inBlob, inOutIndex);
4353 if (videoBufferSize && !videoBuffer)
4358 if ((inOutIndex + videoBufferSize) >= inBlob.size())
4360 UByte* pBuffer =
reinterpret_cast<UByte*
>(videoBuffer);
4361 for (
ULWord cnt(0); cnt < videoBufferSize; cnt++)
4362 pBuffer[cnt] = inBlob.at(inOutIndex++);
4364 POPU32(videoDmaOffset, inBlob, inOutIndex);
4367 POPU32(audioBufferSize, inBlob, inOutIndex);
4368 if (audioBufferSize && !audioBuffer)
4373 if ((inOutIndex + audioBufferSize) >= inBlob.size())
4375 UByte* pBuffer =
reinterpret_cast<UByte*
>(audioBuffer);
4376 for (
ULWord cnt(0); cnt < audioBufferSize; cnt++)
4377 pBuffer[cnt] = inBlob.at(inOutIndex++);
4379 POPU32(audioStartSample, inBlob, inOutIndex);
4380 POPU32(audioNumChannels, inBlob, inOutIndex);
4381 POPU32(frameRepeatCount, inBlob, inOutIndex);
4382 rp188.RPCDecode(inBlob, inOutIndex);
4383 POPU32(v32, inBlob, inOutIndex);
4384 desiredFrame =
LWord(v32);
4385 POPU32(hUser, inBlob, inOutIndex);
4386 POPU32(transferFlags, inBlob, inOutIndex);
4387 POPU8(
AsU8Ref(bDisableExtraAudioInfo), inBlob, inOutIndex);
4388 POPU16(v16, inBlob, inOutIndex);
4390 POPU16(v16, inBlob, inOutIndex);
4393 vidProcInfo.RPCDecode(inBlob, inOutIndex);
4394 POPU32(customAncInfo.Group1, inBlob, inOutIndex);
4395 POPU32(customAncInfo.Group2, inBlob, inOutIndex);
4396 POPU32(customAncInfo.Group3, inBlob, inOutIndex);
4397 POPU32(customAncInfo.Group4, inBlob, inOutIndex);
4398 POPU32(videoNumSegments, inBlob, inOutIndex);
4399 POPU32(videoSegmentHostPitch, inBlob, inOutIndex);
4400 POPU32(videoSegmentCardPitch, inBlob, inOutIndex);
4401 POPU16(v16, inBlob, inOutIndex);
4408 const size_t totBytes (mHeader.GetSizeInBytes());
4409 if (outBlob.capacity() < totBytes)
4410 outBlob.reserve(totBytes);
4411 bool ok = mHeader.RPCEncode(outBlob);
4412 ok &= mBuffer.RPCEncode(outBlob);
4415 for (
size_t ndx(0); ndx < 16; ndx++)
4416 PUSHU32(mRegisters[ndx], outBlob);
4417 for (
size_t ndx(0); ndx < 32; ndx++)
4418 PUSHU32(mReserved[ndx], outBlob);
4419 ok &= mTrailer.RPCEncode(outBlob);
4425 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4426 ok &= mBuffer.RPCDecode(inBlob, inOutIndex);
4427 POPU32(mFlags, inBlob, inOutIndex);
4428 POPU32(mStatus, inBlob, inOutIndex);
4429 for (
size_t ndx(0); ndx < 16; ndx++)
4430 POPU32(mRegisters[ndx], inBlob, inOutIndex);
4431 for (
size_t ndx(0); ndx < 16; ndx++)
4432 POPU32(mReserved[ndx], inBlob, inOutIndex);
4433 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4444 PUSHU64(rdtscStartTime, outBlob);
4445 PUSHU64(audioClockStartTime, outBlob);
4446 PUSHU64(rdtscCurrentTime, outBlob);
4447 PUSHU64(audioClockCurrentTime, outBlob);
4448 PUSHU32(framesProcessed, outBlob);
4449 PUSHU32(framesDropped, outBlob);
4450 PUSHU32(bufferLevel, outBlob);
4451 PUSHU8(bWithAudio, outBlob);
4452 PUSHU8(bWithRP188, outBlob);
4453 PUSHU8(bFbfChange, outBlob);
4454 PUSHU8(bFboChange, outBlob);
4455 PUSHU8(bWithColorCorrection, outBlob);
4456 PUSHU8(bWithVidProc, outBlob);
4457 PUSHU8(bWithCustomAncData, outBlob);
4462 { uint16_t v16(0); uint32_t v32(0);
4463 POPU16(v16, inBlob, inOutIndex);
4465 POPU16(v16, inBlob, inOutIndex);
4467 POPU32(v32, inBlob, inOutIndex);
4468 startFrame =
LWord(v32);
4469 POPU32(v32, inBlob, inOutIndex);
4470 endFrame =
LWord(v32);
4471 POPU32(v32, inBlob, inOutIndex);
4472 activeFrame =
LWord(v32);
4473 POPU64(rdtscStartTime, inBlob, inOutIndex);
4474 POPU64(audioClockStartTime, inBlob, inOutIndex);
4475 POPU64(rdtscCurrentTime, inBlob, inOutIndex);
4476 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4477 POPU32(framesProcessed, inBlob, inOutIndex);
4478 POPU32(framesDropped, inBlob, inOutIndex);
4479 POPU32(bufferLevel, inBlob, inOutIndex);
4484 POPU8(
AsU8Ref(bWithColorCorrection), inBlob, inOutIndex);
4486 POPU8(
AsU8Ref(bWithCustomAncData), inBlob, inOutIndex);
4500 POPU32(DBB, inBlob, inOutIndex);
4501 POPU32(Low, inBlob, inOutIndex);
4502 POPU32(High, inBlob, inOutIndex);
4509 PUSHU32(taskVersion, outBlob);
4514 if (taskArray && numTasks)
4515 for (
ULWord num(0); num < numTasks; num++)
4519 const ULWord * pULWords =
reinterpret_cast<const ULWord*
>(&task.
u);
4525 for (
ULWord word(0); word < numWords; word++)
4526 PUSHU32(pULWords[word], outBlob);
4533 POPU32(taskVersion, inBlob, inOutIndex);
4534 POPU32(taskSize, inBlob, inOutIndex);
4535 POPU32(numTasks, inBlob, inOutIndex);
4536 POPU32(maxTasks, inBlob, inOutIndex);
4537 POPU64(u64, inBlob, inOutIndex);
4539 if (taskArray && numTasks)
4540 for (
ULWord num(0); num < numTasks; num++)
4543 POPU32(u32, inBlob, inOutIndex);
4551 for (
ULWord word(0); word < numWords; word++)
4552 POPU32(pULWords[word], inBlob, inOutIndex);
4562 PUSHU64(audioClockTimeStamp, outBlob);
4563 PUSHU32(audioExpectedAddress, outBlob);
4564 PUSHU32(audioInStartAddress, outBlob);
4565 PUSHU32(audioInStopAddress, outBlob);
4566 PUSHU32(audioOutStopAddress, outBlob);
4567 PUSHU32(audioOutStartAddress, outBlob);
4569 PUSHU32(startSample, outBlob);
4571 PUSHU32(currentFrame, outBlob);
4572 currentRP188.RPCEncode(outBlob);
4574 PUSHU64(audioClockCurrentTime, outBlob);
4575 PUSHU32(currentAudioExpectedAddress, outBlob);
4576 PUSHU32(currentAudioStartAddress, outBlob);
4577 PUSHU32(currentFieldCount, outBlob);
4578 PUSHU32(currentLineCount, outBlob);
4579 PUSHU32(currentReps, outBlob);
4580 PUSHU32(currenthUser, outBlob);
4585 { uint16_t v16(0); uint64_t v64(0);
4586 POPU16(v16, inBlob, inOutIndex);
4588 POPU64(v64, inBlob, inOutIndex);
4590 POPU32(frame, inBlob, inOutIndex);
4591 POPU64(audioClockTimeStamp, inBlob, inOutIndex);
4592 POPU32(audioExpectedAddress, inBlob, inOutIndex);
4593 POPU32(audioInStartAddress, inBlob, inOutIndex);
4594 POPU32(audioInStopAddress, inBlob, inOutIndex);
4595 POPU32(audioOutStopAddress, inBlob, inOutIndex);
4596 POPU32(audioOutStartAddress, inBlob, inOutIndex);
4597 POPU32(bytesRead, inBlob, inOutIndex);
4598 POPU32(startSample, inBlob, inOutIndex);
4599 POPU64(v64, inBlob, inOutIndex);
4601 POPU32(currentFrame, inBlob, inOutIndex);
4602 currentRP188.RPCDecode(inBlob, inOutIndex);
4603 POPU64(v64, inBlob, inOutIndex);
4604 currentFrameTime =
LWord64(v64);
4605 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4606 POPU32(currentAudioExpectedAddress, inBlob, inOutIndex);
4607 POPU32(currentAudioStartAddress, inBlob, inOutIndex);
4608 POPU32(currentFieldCount, inBlob, inOutIndex);
4609 POPU32(currentLineCount, inBlob, inOutIndex);
4610 POPU32(currentReps, inBlob, inOutIndex);
4611 POPU32(currenthUser, inBlob, inOutIndex);
4640 reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->
RPCEncode(outBlob);
4650 #if defined(AJA_LINUX) 4651 #pragma GCC diagnostic push 4652 #pragma GCC diagnostic ignored "-Wstrict-aliasing" 4654 uint16_t v16(0); uint32_t v32(0);
4655 POPU16(v16, inBlob, inOutIndex);
4657 POPU16(v16, inBlob, inOutIndex);
4659 POPU32(v32, inBlob, inOutIndex); lVal1 =
LWord(v32);
4660 POPU32(v32, inBlob, inOutIndex); lVal2 =
LWord(v32);
4661 POPU32(v32, inBlob, inOutIndex); lVal3 =
LWord(v32);
4662 POPU32(v32, inBlob, inOutIndex); lVal4 =
LWord(v32);
4663 POPU32(v32, inBlob, inOutIndex); lVal5 =
LWord(v32);
4664 POPU32(v32, inBlob, inOutIndex); lVal6 =
LWord(v32);
4677 #if defined(AJA_LINUX) 4678 #pragma GCC diagnostic pop 4683 reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->
RPCDecode(inBlob, inOutIndex);
NTV2_RP188 acRP188
Will be deprecated – use AUTOCIRCULATE_TRANSFER::SetOutputTimeCode instead.
bool AppendU8s(UByteSequence &outU8s) const
Appends my contents to an existing UByteSequence.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2Channel mChannel
Stream channel.
bool SetOutputTimeCodes(const NTV2TimeCodes &inValues)
Intended for playout, replaces the contents of my acOutputTimeCodes member.
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
NTV2SegmentedXferInfo & setSourceDirection(const bool inTopDown)
Sets the scan direction for the source.
NTV2AutoCirculateState state
ULWord acCurrentAudioStartAddress
As set by play.
static std::string FourCCToString(const ULWord in4CC)
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device...
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
bool GetBadRegisters(NTV2RegNumSet &outBadRegNums) const
Returns the set of register numbers that were not read successfully.
NTV2StandardSet::const_iterator NTV2StandardSetConstIter
A handy const iterator for iterating over an NTV2StandardSet.
#define NTV2_TYPE_AJABITSTREAM
Identifies NTV2Bitstream struct.
ULWord mFlags
Action flags.
ULWord audioInStopAddress
For record - end position (exclusive) in buffer of audio (includes base offset)
std::string NTV2FrameGeometryToString(const NTV2FrameGeometry inValue, const bool inForRetailDisplay=false)
defined(NTV2_DEPRECATE_17_6)
bool GetRequestedRegisterNumbers(NTV2RegNumSet &outRegNums) const
Answers with the set of register numbers that were requested.
std::string NTV2AudioSystemToString(const NTV2AudioSystem inValue, const bool inCompactDisplay=false)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
ULWord frame
The frame requested or -1 if not available.
#define NTV2EndianSwap64(__val__)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
std::string NTV2HDMIBitDepthToString(const NTV2HDMIBitDepth inValue, const bool inCompactDisplay=false)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
std::string operator[](const unsigned inIndexNum) const
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
#define AJA_NTV2_SDK_BUILD_NUMBER
The SDK build number, an unsigned decimal integer.
bool IsOutput(void) const
#define NTV2_HEADER_TAG
Identifies the struct header.
ULWord acCurrentFrame
Last vertical blank frame for this autocirculate channel (when CNTV2Card::AutoCirculateGetFrameStamp ...
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
bool CopyTo(FRAME_STAMP_STRUCT &outOldStruct) const
Copies my fields into the given FRAME_STAMP_STRUCT.
bool PutU16s(const UWordSequence &inU16s, const size_t inU16Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 16-bit values into me.
Specifies SDI input/output kinds.
std::set< NTV2TCIndex > NTV2TCIndexes
ULWord currentAudioStartAddress
As found by isr.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
FRAME_STAMP()
Constructs a default FRAME_STAMP structure.
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...
ULWord64 acInUserCookie
Intended for playout, an optional app-specific cookie value that tags this frame, such that if this s...
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::LoadBitstream.
#define NTV2HostIsBigEndian
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool GetSDIInputStatus(NTV2SDIInputStatus &outStatus, const UWord inSDIInputIndex0=0) const
Answers with the NTV2SDIInputStatus for the given SDI input spigot.
NTV2Buffer & operator=(const NTV2Buffer &inRHS)
Assigns me from another NTV2Buffer instance.
LWord64 currentTime
Current processor time ... on Windows, this is derived from KeQueryPerformanceCounter.
NTV2SetRegisters(const NTV2RegWrites &inRegWrites=NTV2RegWrites())
Constructs an NTV2SetRegisters struct from the given NTV2RegisterWrites collection.
Declares the AJAMemory class.
std::set< NTV2FrameRate > NTV2FrameRateSet
A set of distinct NTV2FrameRate values. New in SDK 17.0.
NTV2StreamBuffer()
Constructs a default NTV2StreamBuffer struct.
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
mVideoBuffer Allocate(mFormatDesc.GetTotalRasterBytes())
std::ostream & Print(std::ostream &inStrm, const bool inDumpSegments=false) const
Writes a human-readable description of me into a given output stream.
bool CopyTo(AUTOCIRCULATE_STATUS_STRUCT &outOldStruct)
Copies my data into the given AUTOCIRCULATE_STATUS_STRUCT.
ULWord registerMask
My register mask value to use in a ReadRegister or WriteRegister call.
bool SetFrameBufferFormat(const NTV2FrameBufferFormat inNewFormat)
Sets my acFrameBufferFormat value to the given new value (if valid and circulating with AUTOCIRCULATE...
NTV2DeviceIDSet NTV2GetSupportedDevices(const NTV2DeviceKinds inKinds=NTV2_DEVICEKIND_ALL)
Returns an NTV2DeviceIDSet of devices supported by the SDK.
std::vector< double > NTV2DoubleArray
An array of double-precision floating-point values.
NTV2HDMIColorSpace
Indicates or specifies HDMI Color Space.
#define NTV2_IS_TIMECODE_TASK(_x_)
void Clear(void)
Resets the struct to its initialized state, with timecode capture disabled, freeing all buffers that ...
bool WithCustomAnc(void) const
NTV2Buffer mSharedMemory
Virtual address of AJADebug shared memory in calling process' context,.
ULWord audioOutStartAddress
For play - end position (exclusive) in buffer of audio.
NTV2RegNumSet GetRegisterNumbers(const NTV2RegReads &inRegInfos)
std::ostream & Print(std::ostream &outputStream, const bool inAsCode=false) const
Renders me to the given output stream in a human-readable format.
#define DEC0N(__x__, __n__)
ULWord getElementLength(void) const
string NTV2ChannelSetToStr(const NTV2ChannelSet &inObj, const bool inCompact)
1920x1080, for 1080i and 1080p, NTV2_VANCMODE_TALL
ULWord mFlags
Action flags.
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool EnableSegmentedDMAs(const ULWord inNumSegments, const ULWord inNumActiveBytesPerLine, const ULWord inHostBytesPerLine, const ULWord inDeviceBytesPerLine)
Enables segmented DMAs given a segment count, a host pitch, and device pitch value.
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
ULWord getTotalBytes(void) const
bool SetBuffers(ULWord *pInVideoBuffer, const ULWord inVideoByteCount, ULWord *pInAudioBuffer, const ULWord inAudioByteCount, ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer. ...
NTV2_HEADER acHeader
The common message header – ALWAYS FIRST!
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_IS_VALID_TRAILER_TAG(_x_)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
~AUTOCIRCULATE_TRANSFER()
My default destructor, which frees all allocatable fields that I own.
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.
720x576, for PAL 625i, NTV2_VANCMODE_TALL
#define GetTCIndexesForSDIInput
bool Set(const NTV2ColorCorrectionMode inMode, const ULWord inSaturation, const void *pInTableData)
Sets this struct from the given mode, saturation and table data, replacing any existing mode...
static ULWord FGWidth(const NTV2FrameGeometry fg)
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
ULWord acCurrentReps
Contains validCount (Playout: on repeated frames, number of reps remaining; Record: drops on frame) ...
bool NTV2GetUnsupportedStandards(NTV2StandardSet &outStandards)
Returns a set of NTV2Standard values not suported by any NTV2 device.
ULWord acAudioInStopAddress
(input/ingest/capture only) Ending audio record head position (exclusive) AFTER this frame was stampe...
1280x720, for 720p, NTV2_VANCMODE_OFF
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
static bool SetDefaultPageSize(const size_t inNewSize)
Changes the default page size for use in future page-aligned allocations.
bool ByteSwap32(void)
Byte-swaps my contents 32-bits at a time.
ostream & operator<<(ostream &inOutStr, const NTV2AudioChannelPairs &inSet)
ULWord GetBufferLevel(void) const
enum NTV2VideoFrameBufferOrientation NTV2FBOrientation
bool WithFBOChange(void) const
bool IsContentEqual(const NTV2Buffer &inBuffer, const ULWord inByteOffset=0, const ULWord inByteCount=0xFFFFFFFF) const
AutoCircVidProcInfo acVidProcInfo
Specifies the mixer/keyer transition to make. Ignored if AUTOCIRCULATE_WITH_VIDPROC option is not set...
bool isSourceTopDown(void) const
NTV2SDIInStatistics()
Constructs an NTV2GetSDIStatistics struct and initializes it to its default state.
void SetMaxLockSize(const ULWord64 inNumBytes)
Sets the maximum lock size for use in a subsequent call to CNTV2Card::DMABufferLock.
bool ResetUsing(const NTV2RegNumSet &inRegisterNumbers)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter
A handy const interator for iterating over an NTV2TimeCodeList.
AutoCircTaskType
These are the available AutoCirculate task types.
uint32_t U32(const int inIndex) const
ULWord acAudioStartSample
Starting audio sample (valid for capture only).
ULWordSequence::const_iterator ULWordSequenceConstIter
A handy const iterator for iterating over a ULWordSequence.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
AUTOCIRCULATE_TRANSFER_STATUS()
Constructs a default AUTOCIRCULATE_TRANSFER_STATUS structure.
ULWord bytesRead
Total audio and video bytes transfered.
bool IsValid(void) const
Answers true if I'm valid, or false if I'm not valid.
ULWord GetByteCount(void) const
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
#define NTV2_TYPE_AJAMAILBUFFER
Identifies NTV2MailBuffer struct.
ULWord audioExpectedAddress
The address that was used to transfer.
NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex, bool fillBuffer=true)
LWord acStartFrame
First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
#define NTV2SDKVersionDecode_Minor
ULWordSet & FindAll(ULWordSet &outOffsets, const NTV2Buffer &inValue) const
std::map< ULWord, ULWord > NTV2RegisterValueMap
A mapping of distinct NTV2RegisterNumbers to their corresponding ULWord values.
ULWord getDestPitch(void) const
std::string NTV2RegisterNumberToString(const NTV2RegisterNumber inValue)
ULWordSetConstIter NTV2RegNumSetConstIter
A const iterator that iterates over a set of distinct NTV2RegisterNumbers.
bool PutU64s(const ULWord64Sequence &inU64s, const size_t inU64Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 64-bit values into me.
NTV2SegmentedDMAInfo()
Constructs a disabled NTV2SegmentedDMAInfo struct.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2Buffer acVideoBuffer
The host video buffer. This field is owned by the client application, and thus is responsible for all...
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
ULWord mIsWriting
If non-zero, virtual data will be written; otherwise, virtual data will be read.
Specifies HDMI input/output kinds.
LWord64 acFrameTime
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
NTV2AudioSystemSet NTV2MakeAudioSystemSet(const NTV2AudioSystem inFirstAudioSystem, const UWord inCount)
void PUSHU64(const uint64_t inVal, std::vector< uint8_t > &inArr, const bool dontSwap=false)
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels)
ULWord ccSaturationValue
My saturation value, used only in 3-way color correction mode.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
if(!(riid==IID_IUnknown) &&!(riid==IID_IClassFactory))
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
AUTOCIRCULATE_DATA(const AUTO_CIRC_COMMAND inCommand=AUTO_CIRC_COMMAND_INVALID, const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_INVALID)
NTV2RegisterReadsConstIter FindFirstMatchingRegisterNumber(const uint32_t inRegNum, const NTV2RegisterReads &inRegInfos)
Returns a const iterator to the first entry in the NTV2RegInfo collection with a matching register nu...
std::string NTV2ColorCorrectionModeToString(const NTV2ColorCorrectionMode inValue, const bool inCompactDisplay=false)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelQuad values.
bool containsElementAtOffset(const ULWord inElementOffset) const
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
bool DisableSegmentedDMAs(void)
Disables segmented DMAs, performing a Reset on my acInSegmentedDMAInfo.
LWord64 acCurrentTime
The absolute timestamp at the moment the CNTV2Card::AutoCirculateTransfer or CNTV2Card::AutoCirculate...
Defines a number of handy byte-swapping macros.
bool GetGoodRegisters(NTV2RegNumSet &outGoodRegNums) const
Returns an NTV2RegNumSet built from my mOutGoodRegisters field.
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel) ...
bool SetOutputTimeCode(const NTV2_RP188 &inTimecode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1)
Intended for playout, sets one element of my acOutputTimeCodes member.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool NTV2DeviceCanDoFrameBufferFormat(const NTV2DeviceID inDeviceID, const NTV2FrameBufferFormat inFBFormat)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
NTV2FrameBufferFormatSet NTV2PixelFormats
#define NTV2_IS_VALID_TIMECODE_INDEX(__x__)
ULWord currentFrame
Last vertical blank frame for this channel's auto-circulate. (at the time of the IOCTL_NTV2_GET_FRAME...
static string print_address_offset(const size_t inRadix, const ULWord64 inOffset)
2048x1080, for 2Kx1080p, NTV2_VANCMODE_TALL
FGSizesMap::const_iterator FGSizesMapCI
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
NTV2FBOrientation acFrameBufferOrientation
Specifies the frame buffer orientation to change to. Ignored if AUTOCIRCULATE_WITH_FBOCHANGE option i...
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
bool isSourceBottomUp(void) const
ULWord acInVideoDMAOffset
Optional byte offset into the device frame buffer. Defaults to zero. If non-zero, should be a multipl...
#define NTV2_TYPE_GETREGS
Identifies NTV2GetRegisters struct.
#define NTV2_COLORCORRECTOR_TABLESIZE
ULWord mTag
Tag for virtual data. This value is used to recal saved data by tag.
LWord acActiveFrame
Current frame actually being captured/played when CNTV2Card::AutoCirculateGetStatus called...
bool GetFailedRegisterWrites(NTV2RegWrites &outFailedRegWrites) const
Returns an NTV2RegisterWrites built from my mOutBadRegInfos field.
#define NTV2_TYPE_ACSTATUS
Identifies AUTOCIRCULATE_STATUS struct.
#define AJA_NTV2_SDK_VERSION_POINT
The SDK "point" release version, an unsigned decimal integer.
NTV2HDMIRange
Indicates or specifies the HDMI RGB range.
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
bool toHexString(std::string &outStr, const size_t inLineBreakInterval=0) const
Converts my contents into a hex-encoded string.
std::string NTV2AudioFormatToString(const NTV2AudioFormat inValue, const bool inCompactDisplay=false)
Describes a segmented data transfer (copy or move) from a source memory location to a destination loc...
#define NTV2_TYPE_BANKGETSET
Identifies NTV2BankSelGetSetRegs struct.
std::vector< NTV2RegInfo > NTV2RegWrites
An ordered sequence of zero or more NTV2RegInfo structs intended for WriteRegister.
virtual char do_thousands_sep() const
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter
A handy const iterator for iterating over an NTV2FrameRateSet.
NTV2FrameGeometry GetGeometryFromFrameDimensions(const NTV2FrameSize &inFD)
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
NTV2SegmentedXferInfo & swapSourceAndDestination(void)
Swaps my source and destination offsets, pitches and scan directions.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define NTV2_TYPE_ACXFER
Identifies AUTOCIRCULATE_TRANSFER struct.
std::set< NTV2AudioChannelQuad > NTV2AudioChannelQuads
A set of distinct NTV2AudioChannelQuad values.
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
string NTV2ChannelListToStr(const NTV2ChannelList &inObj, const bool inCompact)
std::set< NTV2Standard > NTV2StandardSet
A set of distinct NTV2Standard values.
NTV2Crosspoint acCrosspoint
Will be deprecated – used internally by the SDK. Will be removed when the driver changes to use NTV2...
bool CopyFrom(const AUTOCIRCULATE_STATUS_STRUCT &inOldStruct)
Copies the given AUTOCIRCULATE_STATUS_STRUCT into me.
ULWord GetProcessedFrameCount(void) const
#define NTV2_ASSERT(_expr_)
std::string AsString(UWord inDumpMaxBytes=0) const
ULWord mFlags
Action flags (lock, unlock, etc)
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Returns all RP188 timecodes associated with the frame in NTV2TCIndex order.
Represents an unknown or invalid frame rate.
std::string operator[](const unsigned inIndexNum) const
std::vector< uint8_t > UByteSequence
An ordered sequence of UByte (uint8_t) values.
NTV2AutoCirculateState acState
Current AutoCirculate state after the transfer.
static AJAStatus StatTimerStop(const uint32_t inKey)
bool NTV2DeviceGetSupportedStandards(const NTV2DeviceID inDeviceID, NTV2StandardSet &outStandards)
Returns a set of distinct NTV2Standard values supported on the given device.
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
bool Truncate(const size_t inByteCount)
Truncates me to the given length. No reallocation takes place.
This struct replaces the old RP188_STRUCT.
NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter
A handy const iterator for iterating over an NTV2GeometrySet.
NTV2FrameBufferFormat NTV2PixelFormat
An alias for NTV2FrameBufferFormat.
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
NTV2ColorCorrectionMode ccMode
My mode (off, RGB, YCbCr, or 3-way)
NTV2_TRAILER acTrailer
The common message trailer – ALWAYS LAST!
NTV2BankSelGetSetRegs(const NTV2RegInfo &inBankSelect, const NTV2RegInfo &inRegInfo, const bool inDoWrite=false)
Constructs an NTV2BankSelGetSetRegs struct for atomically reading or writing the given bank-selected ...
ULWord regNum(void) const
unsigned long stoul(const std::string &str, std::size_t *idx, int base)
ULWord64 rdtscCurrentTime
2048x1556, for 2Kx1556psf film format, NTV2_VANCMODE_OFF
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.
bool GetString(std::string &outString, const size_t inU8Offset=0, const size_t inMaxSize=128) const
Answers with my contents as a character string.
bool GetRegisterValues(NTV2RegisterValueMap &outValues) const
Returns an NTV2RegisterValueMap built from my mOutGoodRegisters and mOutValues fields.
void POPU64(uint64_t &outVal, const std::vector< uint8_t > &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
std::string NTV2InputSourceToString(const NTV2InputSource inValue, const bool inForRetailDisplay=false)
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
void Clear(void)
Resets me to an invalid state.
ULWord currentReps
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
std::string AutoCircVidProcModeToString(const AutoCircVidProcMode inValue, const bool inCompactDisplay=false)
UWord NTV2DeviceGetNumHDMIVideoOutputs(const NTV2DeviceID inDeviceID)
ULWord mInNumRegisters
The number of NTV2RegInfo's to be set.
static bool IsReadOnly(const uint32_t inRegNum)
NTV2FrameRate
Identifies a particular video frame rate.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2FrameBufferFormat acFrameBufferFormat
Specifies the frame buffer format to change to. Ignored if AUTOCIRCULATE_WITH_FBFCHANGE option is not...
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_TYPE_SDISTATS
Identifies NTV2SDIStatus struct.
std::string NTV2AudioChannelQuadToString(const NTV2Audio4ChannelSelect inValue, const bool inCompactDisplay=false)
2048x1080, NTV2_VANCMODE_TALLER
NTV2Standard
Identifies a particular video standard.
#define NTV2_TYPE_VIRTUAL_DATA_RW
Identifies NTV2VirtualData struct.
NTV2ColorCorrectionData acColorCorrection
Color correction data. This field is ignored if AUTOCIRCULATE_WITH_COLORCORRECT option is not set...
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
bool IsAllocatedBySDK(void) const
ULWord acOptionFlags
AutoCirculate options used when CNTV2Card::AutoCirculateInitForInput or CNTV2Card::AutoCirculateInitF...
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
NTV2Buffer mBuffer
Virtual address of a buffer to prelock, and its length.
bool NTV2DeviceCanDoVideoFormat(const NTV2DeviceID inDeviceID, const NTV2VideoFormat inVideoFormat)
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2OutputDest values supported on the given device.
ULWord acAncTransferSize
Total ancillary data bytes for field 1 transferred (capture only).
This is used to perform virtual data reads or writes.
enum NTV2QuarterSizeExpandMode NTV2QtrSizeExpandMode
1920x1080, for 1080i and 1080p, NTV2_VANCMODE_OFF
ULWord mStatus
Action status.
bool PatchRegister(const ULWord inRegNum, const ULWord inValue)
Patches the given register value.
ULWord64 acRDTSCCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using the host OS system clock...
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
#define NTV2_TYPE_ACXFERSTATUS
Identifies AUTOCIRCULATE_TRANSFER_STATUS struct.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define AJA_NTV2_SDK_VERSION_MAJOR
The SDK major version number, an unsigned decimal integer.
bool WithHDMIAuxData(void) const
NTV2DeviceIDSet::const_iterator NTV2DeviceIDSetConstIter
A convenient const iterator for NTV2DeviceIDSet.
#define NTV2_TYPE_AJABUFFERLOCK
Identifies NTV2BufferLock struct.
std::ostream & Print(std::ostream &inOutStream) const
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Specifies analog input/output kinds.
NTV2Buffer & Segment(NTV2Buffer &outPtr, const ULWord inByteOffset, const ULWord inByteCount) const
Resets an NTV2Buffer instance to reference a contiguous segment (portion) of my memory buffer...
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
#define NTV2SDKVersionEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
1280x720, for 720p, NTV2_VANCMODE_TALL
NTV2Channel mChannel
Stream channel.
NTV2MailBuffer()
Constructs a default NTV2MailBuffer struct.
#define NTV2_IS_VALID_IOKINDS(_k_)
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels)
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.
BOOL_ bWithColorCorrection
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
std::string NTV2HDMIProtocolToString(const NTV2HDMIProtocol inValue, const bool inCompactDisplay=false)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::LoadBitstream. ...
Defines for the NTV2 SDK version number, used by ajantv2/includes/ntv2enums.h. See the ajantv2/includ...
ULWord64 acAudioClockCurrentTime
The absolute timestamp at the moment the CNTV2Card::AutoCirculateTransfer or CNTV2Card::AutoCirculate...
bool SetFrom(const NTV2Buffer &inBuffer)
Replaces my contents from the given memory buffer without resizing me.
ULWord fTrailerVersion
Trailer version, set when created. Before SDK 15.1: always zero; 15.1 or later: set to calling SDK ve...
bool IsStopped(void) const
NTV2RegisterNumberSet NTV2RegNumSet
A set of distinct NTV2RegisterNumbers.
This is used to atomically perform bank-selected register reads or writes.
ULWord64 acRDTSCStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using host OS system ...
ULWord acRequestedFrame
On entry for NTV2_TYPE_ACFRAMESTAMP message, the requested frame. Upon exit, 0xFFFFFFFF means "not ...
ULWord acFramesDropped
Total number of frames dropped since AutoCirculateStart.
ULWord acAudioTransferSize
Number of bytes captured into the audio buffer.
#define NTV2_TYPE_AJADEBUGLOGGING
Identifies NTV2DebugLogging struct.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecodeServer(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
All new NTV2 structs start with this common header.
static size_t DefaultPageSize(void)
NTV2RegWrites NTV2RegisterReads
ULWord registerShift
My register shift value to use in a ReadRegister or WriteRegister call.
ULWord acSegmentDevicePitch
Offset, in bytes, between the start of one device segment and the start of the next device segment (i...
bool operator<(const NTV2RegInfo &inRHS) const
bool SetFromHexString(const std::string &inStr)
Replaces my contents from the given hex-encoded string, resizing me if necessary. ...
std::vector< uint16_t > UWordSequence
An ordered sequence of UWord (uint16_t) values.
NTV2Buffer mInRegInfos
NTV2RegInfo array of registers be read/written. The SDK owns this memory.
std::set< NTV2FrameGeometry > NTV2GeometrySet
A set of distinct NTV2FrameGeometry values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
ULWord acAncField2TransferSize
Total ancillary data bytes for field 2 transferred (capture only).
AUTOCIRCULATE_STATUS(const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_CHANNEL1)
Constructs a default AUTOCIRCULATE_STATUS struct for the given NTV2Crosspoint.
string NTV2AudioSystemSetToStr(const NTV2AudioSystemSet &inObj, const bool inCompact)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord64 acAudioClockCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using "64-bit clean" value of the device's 4...
UWordSequence::const_iterator UWordSequenceConstIter
A handy const iterator for iterating over a UWordSequence.
std::string NTV2HDMIAudioChannelsToString(const NTV2HDMIAudioChannels inValue, const bool inCompactDisplay=false)
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
~NTV2ColorCorrectionData()
My destructor, which frees my private color correction table buffer.
NTV2HDMIProtocol
Indicates or specifies the HDMI protocol.
The AutoCirculate channel is starting, waiting for the start time specified in the call to CNTV2Card:...
bool NTV2GetUnsupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of NTV2PixelFormat values not suported by any NTV2 device.
#define NTV2_IS_VALID_STANDARD(__s__)
#define NTV2_TYPE_ACFRAMESTAMP
Identifies FRAME_STAMP struct.
ULWord acFrameRepeatCount
Intended for playout. The number of times to repeat the frame being transferred.
ULWord GetDroppedFrameCount(void) const
Declares data types and structures used in NTV2 "nub" packets.
UWord NTV2DeviceGetNumAnalogVideoOutputs(const NTV2DeviceID inDeviceID)
LWord acTransferFrame
Frame buffer number the frame was transferred to/from. (-1 if failed)
std::string getSourceCode(const bool inInclDecl=true) const
bool SwapWith(NTV2Buffer &inBuffer)
Swaps my underlying buffer with another's.
bool RPCEncodeServer(NTV2_RPC_BLOB_TYPE &inBlob)
ULWord64 audioClockCurrentTime
48kHz clock in reg 28 extended to 64 bits
ULWord acCurrentFieldCount
As found by ISR at Call Field0 or Field1 currently being OUTPUT (when CNTV2Card::AutoCirculateGetFram...
The AutoCirculate channel is stopped.
ULWord64 acAudioClockStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using "64-bit clean" ...
bool WithRP188(void) const
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
LWord acEndFrame
Last frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2DIDSet::const_iterator NTV2DIDSetConstIter
Handy const iterator to iterate over an NTV2DIDSet.
LWord GetActiveFrame(void) const
std::string NTV2AudioChannelOctetToString(const NTV2Audio8ChannelSelect inValue, const bool inCompactDisplay=false)
ostream & NTV2PrintChannelSet(const NTV2ChannelSet &inObj, const bool inCompact, ostream &inOutStream)
ULWord getDestOffset(void) const
bool NTV2DeviceGetSupportedVideoFormats(const NTV2DeviceID inDeviceID, NTV2VideoFormatSet &outFormats)
Returns a set of distinct NTV2VideoFormat values supported on the given device.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_IS_VALID_STRUCT_TYPE(_x_)
NTV2Crosspoint channelSpec
bool IsPageAligned(void) const
This is used by the CNTV2Card::ReadRegisters function.
NTV2Buffer(const void *pInUserPointer, const size_t inByteCount)
Constructs me from a client-supplied address and size.
bool RPCDecodeClient(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
1920x1080, NTV2_VANCMODE_TALLER
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
720x486, for NTSC 525i, NTV2_VANCMODE_TALL
std::string NTV2AudioChannelPairToString(const NTV2AudioChannelPair inValue, const bool inCompactDisplay=false)
ULWord64 acCurrentUserCookie
The frame's AUTOCIRCULATE_TRANSFER::acInUserCookie value that was set when CNTV2Card::AutoCirculateTr...
ULWord acCurrentLineCount
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2Crosspoint backgroundVideoCrosspoint
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define NTV2_CURRENT_HEADER_VERSION
Current version of NTV2_HEADER struct, originally 0.
void Clear(void)
Clears my data.
LWord acDesiredFrame
Used to specify a different frame in the circulate ring to transfer to/from.
bool NTV2GetSupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of all NTV2PixelFormat values supported (used) by any/all supported NTV2 devices...
void Set(const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow)
Sets the NTV2SegmentedDMAInfo struct members.
This is used to prelock a video/audio/anc buffer used as the source or target of DMA transfers...
bool NTV2DeviceCanDoInputSource(const NTV2DeviceID inDeviceID, const NTV2InputSource inInputSource)
bool ByteSwap16(void)
Byte-swaps my contents 16-bits at a time.
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
NTV2AutoCirculateState
Describes the state of an AutoCirculate channel. See AUTOCIRCULATE_STATUS.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord getTotalElements(void) const
std::ostream & Print(std::ostream &oss) const
#define NTV2_IS_VALID_CHANNEL(__x__)
This is used for bitstream maintainance. (New in SDK 16.0)
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.).
ULWord audioInStartAddress
For record - first position in buffer of audio (includes base offset)
ostream & NTV2PrintULWordVector(const NTV2ULWordVector &inObj, ostream &inOutStream)
NTV2BufferLock()
Constructs a default NTV2BufferLock struct.
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
std::ostream & PrintCode(std::ostream &outputStream, const int inRadix=16, const NTV2DeviceID inDeviceID=DEVICE_ID_INVALID) const
Renders me to the given output stream as source code using a "WriteRegister" function call...
Identifies SMPTE HD 1080i or 1080psf.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
std::string NTV2HDMIRangeToString(const NTV2HDMIRange inValue, const bool inCompactDisplay=false)
bool NTV2DeviceGetSupportedPixelFormats(const NTV2DeviceID inDeviceID, NTV2PixelFormats &outFormats)
Returns a set of distinct NTV2FrameBufferFormat values supported on the given device.
static AJAStatus StatTimerStart(const uint32_t inKey)
static size_t gDefaultPageSize(AJA_PAGE_SIZE)
uint16_t GetEndFrame(void) const
ULWord acAudioExpectedAddress
Audio transfer address.
NTV2InputSource
Identifies a specific video input source.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob, bool fillBuffer=true)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter
A handy const iterator for iterating over an NTV2InputSourceSet.
ULWord acCurrentAudioExpectedAddress
bool PutU32s(const ULWordSequence &inU32s, const size_t inU32Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 32-bit values into me.
bool GetU8s(UByteSequence &outU8s, const size_t inU8Offset=0, const size_t inMaxSize=128) const
Answers with my contents as a vector of unsigned 8-bit values.
#define AUTOCIRCULATE_WITH_FBOCHANGE
Use this to AutoCirculate with the possibility of frame buffer orientation changes.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecodeNoAllocate(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
void PUSHU32(const uint32_t inVal, std::vector< uint8_t > &inArr, const bool dontSwap=false)
#define NTV2_IS_VALID_HEADER_TAG(_x_)
bool RPCEncodeClient(NTV2_RPC_BLOB_TYPE &inBlob)
ostream & NTV2PrintAudioSystemSet(const NTV2AudioSystemSet &inObj, const bool inCompact, std::ostream &inOutStream)
Streams a human-readable dump of the given NTV2AudioSystemSet into the specified output stream...
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
bool GetSDIInputStatus(NTV2SDIInputStatus &outStatus, const UWord inSDIInputIndex0=0)
Answers with the NTV2SDIInputStatus for the given SDI input spigot.
ULWord64 audioClockCurrentTime
union AutoCircGenericTask::@39 u
void POPU8(uint8_t &outVal, const std::vector< uint8_t > &inArr, std::size_t &inOutNdx)
2048x1080, for 2Kx1080p, NTV2_VANCMODE_OFF
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord acFramesProcessed
Total number of frames successfully processed since AutoCirculateStart.
ULWord acStartSample
The actual audio start sample when this frame was started at the VBI, which may be used to check sync...
bool is_hex_digit(const char inChr)
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
void Clear(void)
Resets the struct to its initialized state.
static std::string GetDisplayValue(const uint32_t inRegNum, const uint32_t inRegValue, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
static size_t HostPageSize(void)
#define NTV2SDKVersionDecode_Point
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2FrameGeometry
Identifies a particular video frame geometry.
720x576, for PAL 625i, NTV2_VANCMODE_OFF
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
User cookie at last vblank.
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.
FRAME_STAMP & operator=(const FRAME_STAMP &inRHS)
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelOctet values.
std::string NTV2HDMIColorSpaceToString(const NTV2HDMIColorSpace inValue, const bool inCompactDisplay=false)
ULWord mFlags
Action flags (lock, unlock, etc)
NTV2_TRAILER()
Constructs a default NTV2_TRAILER having the proper version and tag.
NTV2Crosspoint channelSpec
#define NTV2_TYPE_AJASTREAMBUFFER
Identifies NTV2StreamBuffer struct.
void Set(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Sets my fields from the given DBB, low and high ULWord components.
Declares numerous NTV2 utility functions.
bool GetU16s(UWordSequence &outU16s, const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
NTV2Buffer mOutBadRegIndexes
Array of UWords containing index numbers of the register writes that failed. The SDK owns this memory...
#define NTV2Buffer_TO_ULWORD64(__p__)
bool NTV2DeviceGetSupportedGeometries(const NTV2DeviceID inDeviceID, NTV2GeometrySet &outGeometries)
Returns a set of distinct NTV2FrameGeometry values supported on the given device. ...
NTV2Crosspoint foregroundKeyCrosspoint
void swap(nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j1, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp) is_nothrow_move_constructible< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value &&//NOLINT(misc-redundant-expression, cppcoreguidelines-noexcept-swap, performance-noexcept-swap) is_nothrow_move_assignable< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value)
exchanges the values of two JSON objects
std::string NTV2CrosspointToString(const NTV2Crosspoint inChannel)
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
ULWord acBufferLevel
Number of buffered frames in driver ready to capture or play.
std::vector< uint64_t > ULWord64Sequence
An ordered sequence of ULWord64 (uint64_t) values.
#define NTV2Buffer_PAGE_ALIGNED
Allocated page-aligned?
NTV2GetRegisters(const NTV2RegNumSet &inRegisterNumbers=NTV2RegNumSet())
Constructs an NTV2GetRegisters struct from the given set of register numbers.
bool operator!=(const NTV2SegmentedXferInfo &inRHS) const
bool NTV2GetSupportedStandards(NTV2StandardSet &outStandards)
Returns a set of all NTV2Standard values supported (used) by any/all supported NTV2 devices...
std::string AsCode(const size_t inBytesPerWord=4, const std::string &inVarName="", const bool inUseSTL=false, const bool inByteSwap=false) const
string NTV2AutoCirculateStateToString(const NTV2AutoCirculateState inState)
NTV2RegInfo GetRegInfo(const UWord inIndex0=0) const
AUTO_CIRC_COMMAND eCommand
NTV2SDIInputStatus & operator[](const size_t inSDIInputIndex0)
This struct is used to augment the default full-frame AutoCirculate DMA transfer to accommodate multi...
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Intended for capture, answers with the timecodes captured in my acTransferStatus member's acFrameStam...
bool SetInputTimecode(const NTV2TCIndex inTCNdx, const NTV2_RP188 &inTimecode)
Sets one of my input timecodes.
ULWord acAudioOutStartAddress
(output/playback only) Audio play head position (exclusive) AFTER this frame was stamped.
720x486, for NTSC 525i and 525p60, NTV2_VANCMODE_OFF
ULWord GetFrameCount(void) const
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
NTV2SegmentedXferInfo & reset(void)
Resets me to an invalid (all zero) state.
ULWord mFlags
Action flags.
bool NextDifference(const NTV2Buffer &inBuffer, ULWord &byteOffset) const
Answers with the byte offset to the first or next difference.
#define AUTOCIRCULATE_WITH_COLORCORRECT
Use this to AutoCirculate with color correction.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
std::vector< NTV2_RP188 > NTV2TimeCodeList
An ordered sequence of zero or more NTV2_RP188 structures. An NTV2TCIndex enum value can be used as a...
virtual std::string do_grouping() const
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
NTV2VirtualData(const ULWord inTag, const void *inVirtualData, const size_t inVirtualDataSize, const bool inDoWrite=false)
Constructs an NTV2VirtualData struct for reading or writing virtual data.
std::string NTV2AudioRateToString(const NTV2AudioRate inValue, const bool inForRetailDisplay=false)
NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter
A const iterator that iterates over NTV2RegisterValueMap entries.
ULWord acAudioOutStopAddress
(output/playback only) Audio play head position when this frame was stamped.
void Clear(void)
Frees my private color correction table buffer and resets my mode to "invalid".
LWord64 acCurrentFrameTime
The VBI timestamp of the current/active frame currently being ingested on the device (capture)...
bool SetAndFill(const void *pInUserPointer, const size_t inByteCount, const UByte inValue)
Sets (or resets) me from a client-supplied address and size.
uint16_t U16(const int inIndex) const
Fixed_ transitionSoftness
NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter
Handy const iterator to iterate over an NTV2DoubleArray.
std::ostream & Dump(std::ostream &inOutputStream=std::cout, const size_t inStartByteOffset=0, const size_t inByteCount=0, const size_t inRadix=16, const size_t inBytesPerGroup=4, const size_t inGroupsPerLine=8, const size_t inAddressRadix=0, const bool inShowAscii=false, const size_t inAddrOffset=0) const
Dumps me in hex/octal/decimal, with/without Ascii, to the given output stream.
ULWord acFramesDropped
Total number of frames dropped since CNTV2Card::AutoCirculateStart called.
NTV2TCIndexes & operator+=(NTV2TCIndexes &inOutSet, const NTV2TCIndexes &inSet)
Appends the given NTV2TCIndexes contents into the given set.
static void FreeAligned(void *pMemory)
NTV2Buffer acTimeCodes
Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCInde...
std::ostream & Print(std::ostream &inOutStream) 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.
NTV2_HEADER(const ULWord inStructureType, const ULWord inSizeInBytes)
Constructs a default NTV2_HEADER having the proper tag, version, and the given type and size...
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
NTV2Channel GetChannel(void) const
#define NTV2_ASSERT_STRUCT_VALID
NTV2Buffer mBuffer
Virtual address of a bitstream buffer and its length.
#define xHEX0N(__x__, __n__)
AUTOCIRCULATE_TRANSFER()
Constructs a default AUTOCIRCULATE_TRANSFER struct.
Fixed_ transitionCoefficient
~NTV2Buffer()
My destructor. If I'm responsible for the memory, I free it here.
static std::string GetDisplayName(const uint32_t inRegNum)
~FRAME_STAMP()
My destructor.
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
ULWord currenthUser
Contains validCount (Play - reps remaining, Record - drops on frame)
bool SetAncBuffers(ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my ancillary data buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
ULWord getSourcePitch(void) const
NTV2_RP188 acRP188
Deprecated – call FRAME_STAMP::GetInputTimeCode instead.
NTV2GeometrySet GetRelatedGeometries(const NTV2FrameGeometry inFrameGeometry)
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
NTV2RegWritesIter NTV2RegisterReadsIter
NTV2RegInfo & setValue(const ULWord val)
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...
ULWord mIsWriting
If non-zero, register(s) will be written; otherwise, register(s) will be read.
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
NTV2Buffer mInBankInfos
Bank select NTV2RegInfo. The SDK owns this memory.
#define NTV2_TYPE_AJASTREAMCHANNEL
Identifies NTV2StreamChannel struct.
This object is embedded in the AUTOCIRCULATE_TRANSFER struct that's returned from the CNTV2Card::Auto...
bool SetFromRegValue(const ULWord inData)
Sets my fields from the given status register value.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
bool ResetUsing(const NTV2RegWrites &inRegWrites)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
ULWord acBufferLevel
The number of frames ready to record/play after the transfer.
ULWord mStatus
Action status.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
enum NTV2OutputDestination NTV2OutputDest
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
#define AUTOCIRCULATE_STRUCT_VERSION
Version number of AutoCirculate structures, originally 0.
ULWord getSegmentLength(void) const
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
NTV2QuarterSizeExpandMode acVideoQuarterSizeExpand
Turns on the "quarter-size expand" (2x H + 2x V) hardware. Defaults to off (1:1). ...
bool GetRequestedRegisterWrites(NTV2RegWrites &outRegWrites) const
bool isDestBottomUp(void) const
ULWord currentAudioExpectedAddress
As set by play.
Identifies the first analog video input.
Private include file for all ajabase sources.
This class/object reports information about the current and/or requested AutoCirculate frame...
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
std::map< NTV2FrameGeometry, ULWord > FGSizesMap
ULWord getSourceOffset(void) const
NTV2ChannelList::const_iterator NTV2ChannelListConstIter
A handy const iterator into an NTV2ChannelList.
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
RP188_STRUCT currentRP188
Last vertical blank timecode (RP-188)
static void * AllocateAligned(size_t size, size_t alignment)
ULWord acAudioInStartAddress
(input/ingest/capture only) Starting audio record head position when this frame was stamped...
#define NTV2_IS_VALID_VIDEO_FORMAT(__f__)
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
std::string & upper(std::string &str)
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
#define NTV2_TYPE_SETREGS
Identifies NTV2SetRegisters struct.
void PUSHU8(const uint8_t inVal, std::vector< uint8_t > &inArr)
bool GetU32s(ULWordSequence &outU32s, const size_t inU32Offset=0, const size_t inMaxSize=32, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 32-bit values.
ULWord64Sequence::const_iterator ULWord64SequenceConstIter
A handy const iterator for iterating over a ULWord64Sequence.
static ULWord FGHeight(const NTV2FrameGeometry fg)
ULWord acSegmentHostPitch
Offset, in bytes, between the start of one host segment and the start of the next host segment (i...
ULWord fLo
| BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
std::set< NTV2DeviceID > NTV2DeviceIDSet
A set of NTV2DeviceIDs.
uint64_t U64(const int inIndex) const
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
void * GetHostPointer(void) const
NTV2ColorCorrectionData()
Constructs a default NTV2ColorCorrectionData struct.
bool WithColorCorrect(void) const
NTV2SegmentedXferInfo & setDestDirection(const bool inTopDown)
Sets the scan direction for the destination.
NTV2Bitstream()
Constructs a default NTV2Bitstream struct.
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
void Reset(void)
Resets the NTV2SegmentedDMAInfo struct members to their default values (normal, non-segmented AutoCir...
bool GetRingChangedByteRange(const NTV2Buffer &inBuffer, ULWord &outByteOffsetFirst, ULWord &outByteOffsetLast) const
Assuming my contents and the contents of the given buffer comprise ring buffers that periodically get...
ULWord64 acAudioClockTimeStamp
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
This is used by the CNTV2Card::ReadSDIStatistics function.
string CommaStr(const T &inNum)
2048x1556, for 2Kx1556psf film format, NTV2_VANCMODE_TALL
NTV2Buffer acAudioBuffer
The host audio buffer. This field is owned by the client application, and thus is responsible for all...
static const NTV2_RP188 INVALID_TIMECODE_VALUE
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Color correction data used with AUTOCIRCULATE_WITH_COLORCORRECT option.
static const string sSegXferUnits[]
bool SetFrom(const FRAME_STAMP_STRUCT &inOldStruct)
Sets my fields from the given FRAME_STAMP_STRUCT.
std::set< NTV2AudioChannelOctet > NTV2AudioChannelOctets
A set of distinct NTV2AudioChannelOctet values.
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Answers with a specific timecode captured in my acTimeCodes member.
#define HEX0N(__x__, __n__)
#define NTV2Buffer_ALLOCATED
Allocated using Allocate function?
std::ostream & Print(std::ostream &inOutStream) const
bool GetU64s(ULWord64Sequence &outU64s, const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
#define NTV2_IS_VALID_COLOR_CORRECTION_MODE(__x__)
#define NTV2SDKVersionDecode_Build
uint8_t U8(const int inIndex) const
ULWord audioOutStopAddress
For play - first position in buffer of audio.
std::vector< NTV2RegInfo > NTV2RegisterWrites
#define OCT0N(__x__, __n__)
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
LWord64 currentFrameTime
Vertical blank start of current frame.
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
bool ByteSwap64(void)
Byte-swaps my contents 64-bits at a time.
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
NTV2StreamChannel()
Constructs a default NTV2StreamChannel struct.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
ULWord acNumSegments
Number of segments of size ::AUTOCIRCULATE_TRANSFER::acVideoBuffer.fByteCount to transfer. Zero or 1 means normal (unsegmented) transfer.
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
#define NTV2EndianSwap16(__val__)
bool NTV2DeviceGetSupportedFrameRates(const NTV2DeviceID inDeviceID, NTV2FrameRateSet &outRates)
Returns a set of distinct NTV2FrameRate values supported on the given device.
NTV2Channel mChannel
Mail buffer channel.
ostream & NTV2PrintChannelList(const NTV2ChannelList &inObj, const bool inCompact, ostream &inOutStream)
720x576, for PAL 625i, NTV2_VANCMODE_TALLER
Declares enums and structs used by all platform drivers and the SDK.
NTV2Crosspoint backgroundKeyCrosspoint
NTV2AudioSystem acAudioSystem
The audio system being used for this channel (NTV2_AUDIOSYSTEM_INVALID if none)
#define NTV2SDKVersionDecode_Major
void POPU16(uint16_t &outVal, const std::vector< uint8_t > &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
#define DECN(__x__, __n__)
AutoCircTaskType taskType
#define AUTOCIRCULATE_WITH_FIELDS
Use this to AutoCirculate with fields as frames for interlaced formats.
NTV2Buffer mInRegInfos
Read-only array of NTV2RegInfo structs to be set. The SDK owns this memory.
NTV2Buffer ccLookupTables
RGB lookup tables pre-formatted for AJA hardware as a contiguous block of NTV2_COLORCORRECTOR_TABLESI...
ULWord mStatus
Action status.
bool NTV2DeviceGetSupportedInputSources(const NTV2DeviceID inDeviceID, NTV2InputSourceSet &outInputSources, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2InputSource values supported on the given device.
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...
std::string & replace(std::string &str, const std::string &from, const std::string &to)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
#define AUTOCIRCULATE_WITH_HDMIAUX
Use this to AutoCirculate with HDMI auxiliary data.
bool IsFieldMode(void) const
#define NTV2_TRAILER_TAG
Identifies the struct trailer.
bool WithFBFChange(void) const
#define NTV2_IS_VALID_NTV2FrameGeometry(__s__)
NTV2Crosspoint acCrosspoint
The crosspoint (channel number with direction)
ULWord fTrailerTag
A special FourCC to identify the tail end of an NTV2 structure.
This is used to enable or disable AJADebug logging in the driver.
ULWord mOutNumFailures
The number of registers unsuccessfully written.
NTV2Crosspoint foregroundVideoCrosspoint
ULWord fHi
| BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
bool PutU8s(const UByteSequence &inU8s, const size_t inU8Offset=0)
Copies a vector of unsigned 8-bit values into me.
NTV2HDMIBitDepth
Indicates or specifies the HDMI video bit depth.
#define NTV2_IS_REGISTER_TASK(_x_)
#define NTV2EndianSwap32(__val__)
ULWord acNumActiveBytesPerRow
Number of active bytes in a row of video.
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock. ...
#define AJA_NTV2_SDK_VERSION_MINOR
The SDK minor version number, an unsigned decimal integer.
uint16_t GetStartFrame(void) const
Declares device capability functions.
void POPU32(uint32_t &outVal, const std::vector< uint8_t > &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
#define NTV2_IS_VALID_NTV2FrameRate(__r__)
bool WithVidProc(void) const
NTV2Channel NTV2CrosspointToNTV2Channel(const NTV2Crosspoint inCrosspointChannel)
ULWord acFramesProcessed
Total number of frames successfully processed since CNTV2Card::AutoCirculateStart called...
ULWord getSegmentCount(void) const
void PUSHU16(const uint16_t inVal, std::vector< uint8_t > &inArr, const bool dontSwap=false)
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
ULWord64 audioClockStartTime
ULWord64 GetRawHostPointer(void) const
720x486, for NTSC 525i and 525p60, NTV2_VANCMODE_TALLER
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2DebugLogging(const bool inEnable=false)
Constructs an NTV2DebugLogging struct.
This is used by the CNTV2Card::WriteRegisters function.
bool SetVideoBuffer(ULWord *pInVideoBuffer, const ULWord inVideoByteCount)
Sets my video buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
std::string NTV2FrameRateToString(const NTV2FrameRate inValue, const bool inForRetailDisplay=false)
ULWord64 audioClockTimeStamp
48kHz clock (in reg 28, extended to 64 bits) at time of play or record.
bool SegmentedDMAsEnabled(void) const
enum NTV2TCIndex NTV2TimecodeIndex
ULWord acTotalBytesTransferred
Total audio and video bytes transferred.
NTV2FrameBufferFormatSetConstIter NTV2PixelFormatsConstIter
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Declares the CNTV2RegisterExpert class.
bool isDestTopDown(void) const
All new NTV2 structs end with this common trailer.
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
ULWord acFrame
(input/ingest/capture only) Current/active frame number.
NTV2FrameGeometry GetNTV2FrameGeometryFromVideoFormat(const NTV2VideoFormat inVideoFormat)
ULWord currentFieldCount
At Call Field0 or Field1 currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2SegmentedDMAInfo acInSegmentedDMAInfo
Optional segmented DMA info, for use with specialized data transfers.