26 #if !defined(MSWindows) 41 if (++it != inData.end())
52 if (++it != inData.end())
85 inOutStr << *iter << endl;
93 inOutStr <<
xHEX0N(uint16_t(*it),2);
94 if (++it != inDIDs.end())
102 inOutStream <<
DEC(inData.size()) <<
" UWords: ";
105 inOutStream <<
HEX0N(*iter,4);
106 if (++iter != inData.end())
114 inOutStream <<
DEC(inData.size()) <<
" ULWords: ";
117 inOutStream <<
HEX0N(*iter,8);
118 if (++iter != inData.end())
126 inOutStream <<
DEC(inData.size()) <<
" ULWord64s: ";
129 inOutStream <<
HEX0N(*iter,16);
130 if (++iter != inData.end())
148 mFrameRefClockCount = 0;
149 mGlobalClockCount = 0;
150 mFrameTRSError =
false;
159 inOutStream <<
"[CRCA=" <<
DEC(mCRCTallyA)
160 <<
" CRCB=" <<
DEC(mCRCTallyB)
161 <<
" unlk=" <<
xHEX0N(mUnlockTally,8)
162 <<
" frmRefClkCnt=" <<
xHEX0N(mFrameRefClockCount,16)
163 <<
" globalClkCnt=" <<
xHEX0N(mGlobalClockCount,16)
164 <<
" frmTRS=" <<
YesNo(mFrameTRSError)
165 <<
" locked=" <<
YesNo(mLocked)
166 <<
" VPIDA=" <<
YesNo(mVPIDValidA)
167 <<
" VPIDB=" <<
YesNo(mVPIDValidB)
209 inOutStream <<
"Enabled: " <<
YesNo(mEnabled);
212 <<
"Is 4:2:0: " <<
YesNo(mPixel420) << endl
233 transitionCoefficient (0),
234 transitionSoftness (0)
240 : eCommand (inCommand),
241 channelSpec (inCrosspoint),
265 static const string sCmds [] = {
"ACInit",
"ACStart",
"ACStop",
"ACPause",
"GetAC",
"ACFrmStmp",
266 "ACFlush",
"ACPreRoll",
"ACXfer",
"ACAbort",
"ACStartAt",
267 "ACXfer1",
"ACXfer2",
"ACFrmStmp2",
"ACTask",
"ACSetActFrm"};
268 if (
size_t(
eCommand) <
sizeof(sCmds))
278 if (
bVal2) oss <<
" +RP188";
279 if (
bVal3) oss <<
" +FBFChg";
280 if (
bVal4) oss <<
" +FBOChg";
281 if (
bVal5) oss <<
" +ColCorr";
282 if (
bVal6) oss <<
" +VidProc";
283 if (
bVal7) oss <<
" +Anc";
284 if (
bVal8) oss <<
" +LTC";
306 if (
bVal1) oss <<
" +resume";
307 if (
bVal1 &&
bVal2) oss <<
" +clearDropCount";
311 if (
bVal1) oss <<
" +clearDropCount";
333 fType (inStructureType),
336 fSizeInBytes (inStructSizeInBytes),
337 fPointerSize (sizeof(int*)),
348 return pTrailer->
IsValid() ? pTrailer :
nullptr;
353 return inObj.
Print (inOutStream);
360 <<
" vers=" << fVersion <<
" sz=" << fSizeInBytes <<
"]";
365 const char * pU32 (reinterpret_cast<const char *>(&in4CC));
366 ostringstream result, fourCC;
368 if (nonPrintable && (nonPrintable < 32 || nonPrintable > 126))
370 for (
size_t charPos(0); charPos < 4; charPos++)
372 #if AJATargetBigEndian 373 const char ch (pU32[charPos]);
374 #else // little-endian: 375 const char ch (pU32[3 - charPos]);
377 if (ch > 31 && ch < 127)
382 fourCC << nonPrintable;
387 result <<
xHEX0N(in4CC,8);
389 result <<
"'" << fourCC.str() <<
"' (" <<
xHEX0N(in4CC,8) <<
")";
391 result <<
"'" << fourCC.str() <<
"'";
399 const uint8_t * pU32 (reinterpret_cast<const uint8_t *>(&in4CC));
400 const uint8_t ch0(pU32[0] >> 5), ch1(pU32[1] >> 5), ch2(pU32[2] >> 5), ch3(pU32[3] >> 5);
402 return ch0 && ch0 < 4 && ch1 && ch1 < 4 && ch2 && ch2 < 4 && ch3 && ch3 < 4;
460 outMajor = outMinor = outPoint = outBuild = 0;
467 return inObj.
Print(oss);
473 return inObj.
Print (inOutStream);
495 if (inDumpMaxBytes > 256)
496 inDumpMaxBytes = 256;
500 for (
UWord ndx(0); ndx < inDumpMaxBytes; ndx++)
501 oss <<
HEX0N(uint16_t(pBytes[ndx]),2);
506 string NTV2Buffer::AsCode (
const size_t inBytesPerWord,
const std::string & inVarName,
const bool inUseSTL,
const bool inByteSwap)
const 509 if (inBytesPerWord != 1 && inBytesPerWord != 2 && inBytesPerWord != 4 && inBytesPerWord != 8)
return string();
511 if (inBytesPerWord > 1)
517 const string cType (inBytesPerWord == 1 ?
"uint8_t" : (inBytesPerWord == 2 ?
"uint16_t" : (inBytesPerWord == 4 ?
"uint32_t" :
"uint64_t")));
518 const size_t numWords (
GetByteCount() / inBytesPerWord);
519 const string vecType =
"std::vector<" + cType +
">";
520 const string varName (inVarName.empty() ? (inUseSTL ?
"tmpVector" :
"tmpArray") : inVarName);
521 oss <<
"const " << (inUseSTL ? vecType : cType) <<
" " << varName << (inUseSTL ?
"" :
"[]") <<
" = {" << endl;
522 if (inByteSwap && inBytesPerWord > 1)
523 switch (inBytesPerWord)
529 for (
size_t ndx(0); ndx < numWords; )
531 switch (inBytesPerWord)
534 case 2: oss <<
xHEX0N(tmp.
U16(
int(ndx)),4);
break;
535 case 4: oss <<
xHEX0N(tmp.
U32(
int(ndx)),8);
break;
536 case 8: oss <<
xHEX0N(tmp.
U64(
int(ndx)),16);
break;
538 if (++ndx < numWords)
554 oss <<
HEX0N(uint16_t(
U8(ndx++)),2);
555 if (inLineBreakInterval && ndx <
int(
GetByteCount()) && ((
size_t(ndx) % inLineBreakInterval) == 0))
559 return !outStr.empty();
564 const streamsize maxAddrWidth (
sizeof(
ULWord64) * 2);
567 oss <<
OCT0N(inOffset,maxAddrWidth) <<
": ";
568 else if (inRadix == 10)
569 oss <<
DEC0N(inOffset,maxAddrWidth) <<
": ";
571 oss <<
xHEX0N(inOffset,maxAddrWidth) <<
": ";
576 const size_t inStartOffset,
577 const size_t inByteCount,
578 const size_t inRadix,
579 const size_t inBytesPerGroup,
580 const size_t inGroupsPerRow,
581 const size_t inAddressRadix,
582 const bool inShowAscii,
583 const size_t inAddrOffset)
const 587 if (inRadix != 8 && inRadix != 10 && inRadix != 16 && inRadix != 2)
589 if (inAddressRadix != 0 && inAddressRadix != 8 && inAddressRadix != 10 && inAddressRadix != 16)
591 if (inBytesPerGroup == 0)
596 size_t bytesRemaining (inByteCount ? inByteCount :
GetByteCount());
597 size_t bytesInThisGroup (0);
598 size_t groupsInThisRow (0);
599 const unsigned maxByteWidth (inRadix == 8 ? 4 : (inRadix == 10 ? 3 : (inRadix == 2 ? 8 : 2)));
600 const UByte * pBuffer (reinterpret_cast <const UByte *> (pInStartAddress));
601 const size_t asciiBufferSize (inShowAscii && inGroupsPerRow ? (inBytesPerGroup * inGroupsPerRow + 1) *
sizeof (
UByte) : 0);
603 if (!pInStartAddress)
608 ::memset (pAsciiBuffer, 0, asciiBufferSize);
610 if (inGroupsPerRow && inAddressRadix)
612 while (bytesRemaining)
615 inOStream <<
BIN08(*pBuffer);
616 else if (inRadix == 8)
617 inOStream <<
oOCT(uint16_t(*pBuffer));
618 else if (inRadix == 10)
619 inOStream <<
DEC0N(uint16_t(*pBuffer),maxByteWidth);
620 else if (inRadix == 16)
621 inOStream <<
HEX0N(uint16_t(*pBuffer),2);
624 pAsciiBuffer[groupsInThisRow * inBytesPerGroup + bytesInThisGroup] = isprint(*pBuffer) ? *pBuffer :
'.';
629 if (bytesInThisGroup >= inBytesPerGroup)
632 if (inGroupsPerRow && groupsInThisRow >= inGroupsPerRow)
636 inOStream <<
" " << pAsciiBuffer;
637 ::memset (pAsciiBuffer, 0, asciiBufferSize);
640 if (inAddressRadix && bytesRemaining)
641 inOStream << print_address_offset (inAddressRadix, reinterpret_cast <ULWord64> (pBuffer) - reinterpret_cast <ULWord64> (pInStartAddress) +
ULWord64 (inAddrOffset));
646 bytesInThisGroup = 0;
650 if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup && pAsciiBuffer)
653 inOStream <<
string ((inBytesPerGroup - bytesInThisGroup) * maxByteWidth + 1,
' ');
658 if (groupsInThisRow < inGroupsPerRow && pAsciiBuffer)
659 inOStream <<
string (((inGroupsPerRow - groupsInThisRow) * inBytesPerGroup * maxByteWidth + (inGroupsPerRow - groupsInThisRow)),
' ');
661 inOStream << pAsciiBuffer;
664 else if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup)
668 delete [] pAsciiBuffer;
675 const size_t inStartOffset,
676 const size_t inByteCount,
677 const size_t inRadix,
678 const size_t inBytesPerGroup,
679 const size_t inGroupsPerRow,
680 const size_t inAddressRadix,
681 const bool inShowAscii,
682 const size_t inAddrOffset)
const 685 Dump (oss, inStartOffset, inByteCount, inRadix, inBytesPerGroup, inGroupsPerRow, inAddressRadix, inShowAscii, inAddrOffset);
686 inOutputString = oss.str();
687 return inOutputString;
708 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint64_t));
709 if (maxSize < inU64Offset)
711 maxSize -= inU64Offset;
713 const uint64_t * pU64 (reinterpret_cast <const uint64_t *> (
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
717 if (inMaxSize && inMaxSize < maxSize)
722 outUint64s.reserve(maxSize);
723 for (
size_t ndx(0); ndx < maxSize; ndx++)
725 const uint64_t u64 (*pU64++);
732 outUint64s.reserve(0);
745 size_t maxNumU32s (
size_t(
GetByteCount()) /
sizeof(uint32_t));
746 if (maxNumU32s < inU32Offset)
748 maxNumU32s -= inU32Offset;
750 const uint32_t * pU32 (reinterpret_cast<const uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
754 if (inMaxSize && inMaxSize < maxNumU32s)
755 maxNumU32s = inMaxSize;
759 outUint32s.reserve(maxNumU32s);
760 for (
size_t ndx(0); ndx < maxNumU32s; ndx++)
762 const uint32_t u32 (*pU32++);
769 outUint32s.reserve(0);
782 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint16_t));
783 if (maxSize < inU16Offset)
785 maxSize -= inU16Offset;
787 const uint16_t * pU16 (reinterpret_cast <const uint16_t *> (
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
791 if (inMaxSize && inMaxSize < maxSize)
796 outUint16s.reserve(maxSize);
797 for (
size_t ndx(0); ndx < maxSize; ndx++)
799 const uint16_t u16 (*pU16++);
806 outUint16s.reserve(0);
820 if (maxSize < inU8Offset)
822 maxSize -= inU8Offset;
828 if (inMaxSize && inMaxSize < maxSize)
833 outUint8s.reserve(maxSize);
834 for (
size_t ndx(0); ndx < maxSize; ndx++)
835 outUint8s.push_back(*pU8++);
840 outUint8s.reserve(0);
848 const uint8_t * pU8 (reinterpret_cast<const uint8_t*> (
GetHostPointer()));
854 outU8s.reserve(outU8s.size() + maxSize);
855 outU8s.insert(outU8s.end(),pU8, pU8 + maxSize);
872 if (maxSize < inU8Offset)
874 maxSize -= inU8Offset;
880 if (inMaxSize && inMaxSize < maxSize)
885 outString.reserve(maxSize);
886 for (
size_t ndx(0); ndx < maxSize; ndx++)
888 const char c = *pU8++;
898 outString.reserve(0);
913 uint64_t * pU64 (reinterpret_cast<uint64_t*>(
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
916 if (maxU64s > inU64Offset)
917 maxU64s -= inU64Offset;
918 if (maxU64s > inU64s.size())
919 maxU64s = inU64s.size();
920 if (inU64s.size() > maxU64s)
923 for (
unsigned ndx(0); ndx < maxU64s; ndx++)
941 uint32_t * pU32 (reinterpret_cast<uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
944 if (maxU32s > inU32Offset)
945 maxU32s -= inU32Offset;
946 if (maxU32s > inU32s.size())
947 maxU32s = inU32s.size();
948 if (inU32s.size() > maxU32s)
951 for (
unsigned ndx(0); ndx < maxU32s; ndx++)
969 uint16_t * pU16 (reinterpret_cast<uint16_t*>(
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
972 if (maxU16s > inU16Offset)
973 maxU16s -= inU16Offset;
974 if (maxU16s > inU16s.size())
975 maxU16s = inU16s.size();
976 if (inU16s.size() > maxU16s)
979 for (
unsigned ndx(0); ndx < maxU16s; ndx++)
1000 if (maxU8s > inU8Offset)
1001 maxU8s -= inU8Offset;
1002 if (maxU8s > inU8s.size())
1003 maxU8s = inU8s.size();
1004 if (inU8s.size() > maxU8s)
1007 ::memcpy(pU8, &inU8s[0], maxU8s);
1009 for (
unsigned ndx(0); ndx < maxU8s; ndx++)
1011 *pU8++ = inU8s.at(ndx);
1013 *pU8++ = inU8s[ndx];
1023 return inOutStream <<
"{Dx" <<
HEX0N(inObj.
fDBB,8) <<
"|Lx" <<
HEX0N(inObj.
fLo,8) <<
"|Hx" <<
HEX0N(inObj.
fHi,8) <<
"}";
1025 return inOutStream <<
"{invalid}";
1031 inOutList.push_back (inRP188);
1038 inOutStream << inObj.size () <<
":[";
1041 inOutStream << *iter;
1042 if (++iter != inObj.end ())
1043 inOutStream <<
", ";
1045 return inOutStream <<
"]";
1051 inOutStream << inObj.size () <<
":[";
1055 if (++iter != inObj.end ())
1056 inOutStream <<
", ";
1058 return inOutStream <<
"]";
1067 if (++iter != inObj.end ())
1068 inOutStream <<
", ";
1077 inOutSet.insert (*iter);
1084 return inOutStream << inObj.
acHeader 1105 <<
" acFrame=" << inObj.
acFrame 1106 <<
" acRP188=" << inObj.
acRP188 1117 inOutStream <<
"n/a";
1124 #if defined (_DEBUG) 1128 while (str.find (
' ') != string::npos)
1129 str.erase (str.find (
' '), 1);
1174 inOutStream <<
"RegValues:" << inObj.size () <<
"[";
1175 while (iter != inObj.end ())
1177 const NTV2RegisterNumber registerNumber (static_cast <NTV2RegisterNumber> (iter->first));
1178 const ULWord registerValue (iter->second);
1180 if (++iter != inObj.end ())
1183 return inOutStream <<
"]";
1210 if (inOutSet.find(*iter) == inOutSet.end())
1211 inOutSet.insert(*iter);
1219 NTV2VideoFormatSet::const_iterator iter (inFormats.begin ());
1221 inOStream << inFormats.size ()
1222 << (inFormats.size () == 1 ?
" video format: " :
" video format(s): ");
1224 while (iter != inFormats.end ())
1227 inOStream << (++iter == inFormats.end () ?
"" :
", ");
1239 inOStream << inFormats.size()
1240 << (inFormats.size() == 1 ?
" pixel format: " :
" pixel formats: ");
1242 while (iter != inFormats.end())
1245 inOStream << (++iter == inFormats.end() ?
"" :
", ");
1255 inOutSet.insert(*iter);
1265 inOStream << inStandards.size ()
1266 << (inStandards.size () == 1 ?
" standard: " :
" standards: ");
1268 while (iter != inStandards.end ())
1271 inOStream << (++iter == inStandards.end () ?
"" :
", ");
1281 inOutSet.insert(*iter);
1290 inOStream << inGeometries.size ()
1291 << (inGeometries.size () == 1 ?
" geometry: " :
" geometries: ");
1292 while (iter != inGeometries.end ())
1295 inOStream << (++iter == inGeometries.end () ?
"" :
", ");
1304 inOutSet.insert(*iter);
1313 inOStream << inSet.size()
1314 << (inSet.size() == 1 ?
" input: " :
" inputs: ");
1315 while (iter != inSet.end())
1318 inOStream << (++iter == inSet.end() ?
"" :
", ");
1327 inOutSet.insert (*iter);
1335 inOStream << inSet.size()
1336 << (inSet.size() == 1 ?
" output: " :
" outputs: ");
1337 while (iter != inSet.end())
1340 inOStream << (++iter == inSet.end() ?
"" :
", ");
1349 inOutSet.insert(*iter);
1362 if (outFormats.find(*fit) == outFormats.end())
1363 outFormats.insert(*fit);
1373 if (usedFormats.find(pf) == usedFormats.end())
1374 outFormats.insert(pf);
1380 outStandards.clear();
1387 if (outStandards.find(*sit) == outStandards.end())
1388 outStandards.insert(*sit);
1398 if (usedStandards.find(st) == usedStandards.end())
1399 outStandards.insert(st);
1418 outFormats.insert(vf);
1420 catch (
const std::bad_alloc &)
1428 NTV2_ASSERT ((isOkay && !outFormats.empty()) || (!isOkay && outFormats.empty()));
1443 outFormats.insert(pixelFormat);
1445 catch (
const std::bad_alloc &)
1453 if (supportedDevices.find(inDeviceID) != supportedDevices.end())
1455 return isOkay && !outFormats.empty();
1465 outStandards.clear();
1472 outStandards.insert(
std);
1481 outGeometries.clear();
1495 outInputSources.clear();
1504 outInputSources.insert(src);
1514 outOutputDests.clear();
1520 for (
size_t ndx(0); ndx < 10; ndx++)
1526 outOutputDests.insert(dst);
1535 << (inSet.size() == 1 ?
" rate: " :
" rates: ");
1536 while (it != inSet.end())
1539 oss << (++it == inSet.end() ?
"" :
", ");
1547 if (inOutSet.find(*it) == inOutSet.end())
1548 inOutSet.insert(*it);
1561 outRates.insert(fr);
1569 return inRun.
Print(inOutStrm);
1576 static const char * sStateStrings [] = {
"Disabled",
"Initializing",
"Starting",
"Paused",
"Stopping",
"Running",
"StartingAtTime",
AJA_NULL};
1578 return string (sStateStrings [inState]);
1612 return it != sFGWdths.end() ? it->second : 0;
1638 return it != sFGHghts.end() ? it->second : 0;
1642 static const string sSegXferUnits[] = {
"",
" U8",
" U16",
"",
" U32",
"",
"",
"",
" U64",
""};
1647 return inStrm <<
"(invalid)";
1671 static string var(
"segInfo");
1673 string units(
"\t// bytes");
1677 oss <<
"NTV2SegmentedXferInfo " << var <<
";" << endl;
1686 oss << var <<
".setSourceOffset(" <<
DEC(
getSourceOffset()) <<
");" << units << endl;
1687 oss << var <<
".setSourcePitch(" <<
DEC(
getSourcePitch()) <<
");" << units << endl;
1689 oss << var <<
".setSourceDirection(false);" << endl;
1691 oss << var <<
".setDestOffset(" <<
DEC(
getDestOffset()) <<
");" << units << endl;
1693 oss << var <<
".setDestPitch(" <<
DEC(
getDestPitch()) <<
");" << units << endl;
1695 oss << var <<
".setDestDirection(false);" << endl;
1713 if (inElementOffset < offset)
1746 mElementsPerSegment = 0;
1747 mInitialSrcOffset = 0;
1748 mInitialDstOffset = 0;
1749 mSrcElementsPerRow = 0;
1750 mDstElementsPerRow = 0;
1757 std::swap(mSrcElementsPerRow, mDstElementsPerRow);
1758 std::swap(mInitialSrcOffset, mInitialDstOffset);
1767 fByteCount (
ULWord(pInUserPointer ? inByteCount : 0)),
1769 #
if defined (AJAMac)
1770 fKernelSpacePtr (0),
1782 : fUserSpacePtr (0),
1785 #
if defined (AJAMac)
1786 fKernelSpacePtr (0),
1800 : fUserSpacePtr (0),
1803 #
if defined (AJAMac)
1804 fKernelSpacePtr (0),
1824 fByteCount =
ULWord(inNewByteCount);
1853 const size_t loopCount(
GetByteCount() /
sizeof(uint64_t));
1856 for (
size_t ndx(0); ndx < loopCount; ndx++)
1865 const size_t loopCount(
GetByteCount() /
sizeof(uint32_t));
1868 for (
size_t ndx(0); ndx < loopCount; ndx++)
1877 const size_t loopCount(
GetByteCount() /
sizeof(uint16_t));
1880 for (
size_t ndx(0); ndx < loopCount; ndx++)
1888 if (uint64_t(inByteCount) >= 0x0000000100000000)
1892 fByteCount =
ULWord(pInUserPointer ? inByteCount : 0);
1894 return (pInUserPointer && inByteCount) || (!pInUserPointer && !inByteCount);
1900 return Set(pInUserPointer, inByteCount) &&
Fill(inValue);
1906 if (uint64_t(inByteCount) >= 0x0000000100000000)
1924 {pBuffer =
new UByte[inByteCount];}
1925 catch (
const std::bad_alloc &)
1927 if (pBuffer &&
Set(pBuffer, inByteCount))
1972 pBytes += inByteOffset;
2008 const ULWord inSrcByteOffset,
const ULWord inDstByteOffset,
const ULWord inByteCount)
2012 if (inSrcByteOffset + inByteCount > inBuffer.
GetByteCount())
2017 const UByte * pSrc (inBuffer);
2018 pSrc += inSrcByteOffset;
2020 UByte * pDst (*
this);
2021 pDst += inDstByteOffset;
2023 ::memcpy (pDst, pSrc, inByteCount);
2040 srcPitch = 0 - srcPitch;
2042 dstPitch = 0 - dstPitch;
2047 if (!pSrc)
return false;
2048 if (!pDst)
return false;
2053 ::memcpy (pDst, pSrc,
size_t(bytesPerSeg));
2054 srcOffset += srcPitch;
2055 dstOffset += dstPitch;
2065 const string newline(
"\n"), tab(
"\t");
2071 for (
size_t ndx(0); ndx < str.size(); ndx++)
2081 for (
size_t srcNdx(0), dstNdx(0); srcNdx < str.size(); srcNdx += 2)
2095 if (fFlags != inBuffer.fFlags)
2101 fUserSpacePtr = inBuffer.fUserSpacePtr;
2102 inBuffer.fUserSpacePtr = tmp;
2118 const uint8_t * pSrchData (inValue);
2119 const uint8_t * pMyData (*
this);
2123 if (!::memcmp(pMyData, pSrchData, srchByteCount))
2125 outOffsets.insert(offset);
2126 if (inLimit && outOffsets.size() >= inLimit)
2131 }
while (offset < maxOffset);
2143 if (inByteOffset >= totalBytes)
2146 totalBytes -= inByteOffset;
2148 ULWord byteCount(inByteCount);
2149 if (byteCount > totalBytes)
2150 byteCount = totalBytes;
2155 const UByte * pByte1 (*
this);
2156 const UByte * pByte2 (inBuffer);
2157 pByte1 += inByteOffset;
2158 pByte2 += inByteOffset;
2159 #if !defined(NTV2BUFFER_NO_MEMCMP) 2160 return ::memcmp (pByte1, pByte2, byteCount) == 0;
2161 #else // NTV2BUFFER_NO_MEMCMP 2162 ULWord offset(inByteOffset);
2165 if (*pByte1 != *pByte2)
2167 cerr <<
"## ERROR: IsContentEqual: miscompare at offset " <<
xHEX0N(offset,8)
2168 <<
" (" <<
DEC(offset) <<
"): " <<
xHEX0N(
UWord(*pByte1),2) <<
" != " 2170 <<
DEC(byteCount) <<
") bytes left to compare" << endl;
2178 #endif // NTV2BUFFER_NO_MEMCMP 2183 if (byteOffset == 0xFFFFFFFF)
2190 {byteOffset = 0xFFFFFFFF;
return true;}
2193 if (byteOffset >= totalBytesToCompare)
2195 totalBytesToCompare -= byteOffset;
2197 const UByte * pByte1 (*
this);
2198 const UByte * pByte2 (inBuffer);
2199 while (totalBytesToCompare)
2201 if (pByte1[byteOffset] != pByte2[byteOffset])
2203 totalBytesToCompare--;
2206 byteOffset = 0xFFFFFFFF;
2212 outByteOffsetFirst = outByteOffsetLast =
GetByteCount ();
2225 outByteOffsetFirst = 0;
2228 if (*pByte1 != *pByte2)
2232 outByteOffsetFirst++;
2234 if (outByteOffsetFirst == 0)
2239 if (*pByte1 == *pByte2)
2243 outByteOffsetFirst++;
2246 outByteOffsetFirst--;
2256 while (--outByteOffsetLast)
2258 if (*pByte1 != *pByte2)
2266 while (outByteOffsetLast)
2268 if (*pByte1 == *pByte2)
2272 outByteOffsetLast--;
2275 outByteOffsetLast++;
2276 if (outByteOffsetLast <= outByteOffsetFirst)
2277 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" <= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2278 const ULWord tmp (outByteOffsetLast);
2279 outByteOffsetLast = outByteOffsetFirst;
2280 outByteOffsetFirst = tmp;
2281 if (outByteOffsetLast >= outByteOffsetFirst)
2282 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" >= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2298 const bool result (inNewSize && (!(inNewSize & (inNewSize - 1))));
2306 #if defined(MSWindows) || defined(AJABareMetal) 2307 return AJA_PAGE_SIZE;
2309 return size_t(::getpagesize());
2317 acRequestedFrame (0),
2318 acAudioClockTimeStamp (0),
2319 acAudioExpectedAddress (0),
2320 acAudioInStartAddress (0),
2321 acAudioInStopAddress (0),
2322 acAudioOutStopAddress (0),
2323 acAudioOutStartAddress (0),
2324 acTotalBytesTransferred (0),
2329 acCurrentFrameTime (0),
2330 acAudioClockCurrentTime (0),
2331 acCurrentAudioExpectedAddress (0),
2332 acCurrentAudioStartAddress (0),
2333 acCurrentFieldCount (0),
2334 acCurrentLineCount (0),
2336 acCurrentUserCookie (0),
2345 : acHeader (inObj.acHeader),
2346 acFrameTime (inObj.acFrameTime),
2347 acRequestedFrame (inObj.acRequestedFrame),
2348 acAudioClockTimeStamp (inObj.acAudioClockTimeStamp),
2349 acAudioExpectedAddress (inObj.acAudioExpectedAddress),
2350 acAudioInStartAddress (inObj.acAudioInStartAddress),
2351 acAudioInStopAddress (inObj.acAudioInStopAddress),
2352 acAudioOutStopAddress (inObj.acAudioOutStopAddress),
2353 acAudioOutStartAddress (inObj.acAudioOutStartAddress),
2354 acTotalBytesTransferred (inObj.acTotalBytesTransferred),
2355 acStartSample (inObj.acStartSample),
2356 acCurrentTime (inObj.acCurrentTime),
2357 acCurrentFrame (inObj.acCurrentFrame),
2358 acCurrentFrameTime (inObj.acCurrentFrameTime),
2359 acAudioClockCurrentTime (inObj.acAudioClockCurrentTime),
2360 acCurrentAudioExpectedAddress (inObj.acCurrentAudioExpectedAddress),
2361 acCurrentAudioStartAddress (inObj.acCurrentAudioStartAddress),
2362 acCurrentFieldCount (inObj.acCurrentFieldCount),
2363 acCurrentLineCount (inObj.acCurrentLineCount),
2364 acCurrentReps (inObj.acCurrentReps),
2365 acCurrentUserCookie (inObj.acCurrentUserCookie),
2366 acFrame (inObj.acFrame),
2367 acRP188 (inObj.acRP188),
2368 acTrailer (inObj.acTrailer)
2391 for (
ULWord ndx (0); ndx < numRP188s; ndx++)
2392 outValues << pArray [ndx];
2411 outTimeCode = pArray [inTCIndex];
2419 outTimeCodes.clear();
2435 outTimeCodes[tcIndex] = tc;
2436 else if (tc.IsValid())
2437 outTimeCodes[tcIndex] = tc;
2447 (
void)inSDIInputIndex0;
2455 if (!pArray || !numRP188s)
2460 if (
ULWord(inTCNdx) >= numRP188s)
2463 pArray[inTCNdx] = inTimecode;
2611 if (mInStatistics.
IsNULL())
2615 for (
ULWord i = 0; i < numElements; i++)
2627 if (numElements != 8)
2629 if (inSDIInputIndex0 >= numElements)
2631 outStatus = pArray[inSDIInputIndex0];
2643 if (numElements != 8)
2645 if (inSDIInputIndex0 >= numElements)
2647 return pArray[inSDIInputIndex0];
2653 inOutStream << mHeader <<
", " << mInStatistics <<
", " << mTrailer;
return inOutStream;
2660 acTransferFrame (0),
2662 acFramesProcessed (0),
2663 acFramesDropped (0),
2665 acAudioTransferSize (0),
2666 acAudioStartSample (0),
2667 acAncTransferSize (0),
2668 acAncField2TransferSize (0)
2677 acCrosspoint (inCrosspoint),
2682 acRDTSCStartTime (0),
2683 acAudioClockStartTime (0),
2684 acRDTSCCurrentTime (0),
2685 acAudioClockCurrentTime (0),
2686 acFramesProcessed (0),
2687 acFramesDropped (0),
2794 if (inIndexNum == 0)
2811 case 13: oss << (
WithRP188() ?
"Yes" :
"No");
break;
2812 case 14: oss << (
WithLTC() ?
"Yes" :
"No");
break;
2816 case 18: oss << (
WithVidProc() ?
"Yes" :
"No");
break;
2819 case 21: oss << (
IsFieldMode() ?
"Yes" :
"No");
break;
2822 else if (inIndexNum < 22)
2832 << (inObj.
IsInput() ?
"Input " : (inObj.
IsOutput() ?
"Output" :
"*BAD* "))
2841 << setw(10) << (inObj.
WithRP188() ?
"+RP188" :
"-RP188")
2842 << setw(10) << (inObj.
WithLTC() ?
"+LTC" :
"-LTC")
2843 << setw(10) << (inObj.
WithFBFChange() ?
"+FBFchg" :
"-FBFchg")
2844 << setw(10) << (inObj.
WithFBOChange() ?
"+FBOchg" :
"-FBOchg")
2846 << setw(10) << (inObj.
WithVidProc() ?
"+VidProc" :
"-VidProc")
2847 << setw(10) << (inObj.
WithCustomAnc() ?
"+AncData" :
"-AncData")
2849 << setw(10) << (inObj.
IsFieldMode() ?
"+FldMode" :
"-FldMode");
2862 Set (inNumSegments, inNumActiveBytesPerRow, inHostBytesPerRow, inDeviceBytesPerRow);
2888 ccSaturationValue (0)
2925 acTransferStatus (),
2927 acInVideoDMAOffset (0),
2928 acInSegmentedDMAInfo (),
2929 acColorCorrection (),
2934 acPeerToPeerFlags (0),
2935 acFrameRepeatCount (1),
2936 acDesiredFrame (-1),
2948 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2950 acVideoBuffer (pInVideoBuffer, inVideoByteCount),
2951 acAudioBuffer (pInAudioBuffer, inAudioByteCount),
2952 acANCBuffer (pInANCBuffer, inANCByteCount),
2953 acANCField2Buffer (pInANCF2Buffer, inANCF2ByteCount),
2955 acTransferStatus (),
2957 acInVideoDMAOffset (0),
2958 acInSegmentedDMAInfo (),
2959 acColorCorrection (),
2964 acPeerToPeerFlags (0),
2965 acFrameRepeatCount (1),
2966 acDesiredFrame (-1),
2982 ULWord * pInAudioBuffer,
const ULWord inAudioByteCount,
2984 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2989 &&
SetAncBuffers (pInANCBuffer, inANCByteCount, pInANCF2Buffer, inANCF2ByteCount);
3030 for (
UWord ndx (0); ndx <
UWord(maxNumValues); ndx++)
3032 const NTV2TCIndex tcIndex (static_cast<NTV2TCIndex>(ndx));
3052 pArray[inTCIndex] = inTimeCode;
3066 for (
ULWord tcIndex(0); tcIndex < maxNumValues; tcIndex++)
3070 pArray[tcIndex] = inTimeCode;
3093 const ULWord inHostBytesPerRow,
const ULWord inDeviceBytesPerRow)
3281 mInNumRegisters (
ULWord (inRegisterNumbers.size ())),
3282 mOutNumRegisters (0)
3291 mInNumRegisters (
ULWord (inRegReads.size ())),
3292 mOutNumRegisters (0)
3302 mInNumRegisters =
ULWord(inRegisterNumbers.size());
3303 mOutNumRegisters = 0;
3304 bool result ( mInRegisters.
Allocate(mInNumRegisters *
sizeof(
ULWord))
3311 ULWord * pRegArray(mInRegisters);
3317 pRegArray[ndx++] = *iter;
3324 if (!mInNumRegisters)
3331 const ULWord * pRegNums(mInRegisters);
3332 for (
ULWord ndx(0); ndx < mInNumRegisters; ndx++)
3333 if (outRegNums.find(pRegNums[ndx]) == outRegNums.end())
3334 outRegNums.insert(pRegNums[ndx]);
3342 outGoodRegNums.clear();
3343 if (!mOutGoodRegisters)
3345 if (!mOutNumRegisters)
3347 if (mOutNumRegisters > mInNumRegisters)
3350 const ULWord * pRegArray (mOutGoodRegisters);
3351 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3352 outGoodRegNums.insert(pRegArray[ndx]);
3359 outBadRegNums.clear();
3365 if (reqRegNums == goodRegNums)
3369 std::set_difference (reqRegNums.begin(), reqRegNums.end(),
3370 goodRegNums.begin(), goodRegNums.end(),
3371 std::inserter(outBadRegNums, outBadRegNums.begin()));
3377 if (!mOutGoodRegisters)
3379 if (!mOutNumRegisters)
3381 if (mOutNumRegisters > mInNumRegisters)
3387 const ULWord * pRegArray (mOutGoodRegisters);
3388 ULWord * pValArray (mOutValues);
3389 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3390 if (pRegArray[ndx] == inRegNum)
3392 pValArray[ndx] = inValue;
3403 if (!mOutGoodRegisters)
3405 if (!mOutNumRegisters)
3407 if (mOutNumRegisters > mInNumRegisters)
3414 const ULWord * pRegArray (mOutGoodRegisters);
3415 const ULWord * pValArray (mOutValues);
3416 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3418 outValues [pRegArray[ndx]] = pValArray[ndx];
3419 #if defined(NTV2_PRETEND_DEVICE) 3420 if (pRegArray[ndx] ==
kRegBoardID && pValArray[ndx] == NTV2_PRETEND_DEVICE_FROM)
3421 outValues [pRegArray[ndx]] = NTV2_PRETEND_DEVICE_TO;
3424 #endif // NTV2_PRETEND_DEVICE 3436 if (outValues.empty())
3441 #if defined(NTV2_PRETEND_DEVICE) 3443 regInfo.
setValue(NTV2_PRETEND_DEVICE_TO);
3446 #endif // NTV2_PRETEND_DEVICE 3447 outValues.push_back(regInfo);
3453 uint32_t missingTally(0);
3457 if (mapIter != regValMap.end())
3458 it->registerValue = mapIter->second;
3462 #
if defined(NTV2_PRETEND_DEVICE)
3463 if (it->registerNumber ==
kRegBoardID && it->registerValue == NTV2_PRETEND_DEVICE_FROM)
3464 it->registerValue = NTV2_PRETEND_DEVICE_TO;
3467 #endif // NTV2_PRETEND_DEVICE 3469 return !missingTally;
3476 inOutStream << mHeader <<
", numRegs=" << mInNumRegisters <<
", inRegs=" << mInRegisters <<
", outNumGoodRegs=" << mOutNumRegisters
3477 <<
", outGoodRegs=" << mOutGoodRegisters <<
", outValues=" << mOutValues <<
", " << mTrailer;
3484 mInNumRegisters (
ULWord(inRegWrites.size())),
3508 pBadRegIndexes[ndx] = 0;
3510 pRegInfoArray[ndx++] = *it;
3521 outFailedRegWrites.clear();
3527 outRegWrites.clear();
3536 outRegWrites.push_back(pRegInfos[ndx]);
3549 if (pBadRegIndexes && maxNumBadRegIndexes && pRegInfoArray && maxNumRegInfos &&
mOutNumFailures)
3552 for (
UWord num(0); num < maxNumBadRegIndexes; num++)
3554 const UWord badRegIndex (pBadRegIndexes[num]);
3555 if (badRegIndex < maxNumRegInfos)
3557 const NTV2RegInfo & badRegInfo (pRegInfoArray[badRegIndex]);
3558 oss <<
"Failure " << num <<
": " << badRegInfo << endl;
3568 typedef std::pair <ULWord, ULWord> ULWordPair;
3569 typedef std::pair <ULWordPair, ULWordPair> ULWordPairs;
3592 const bool badName (regName.find(
' ') != string::npos);
3595 oss << sCard <<
".WriteRegister (";
3633 << name <<
" Number: " <<
regNum() << endl
3645 ULWord received(0), rcvdRegNum(0), rcvdRegVal(0);
3646 static const string sNumber (
" Number: "), sValue (
" Value: "), sHexPrefix(
" : 0x");
3647 for (
size_t ndx(0); ndx < inLogLines.size(); ndx++)
3649 string line (inLogLines.at(ndx));
3650 size_t posNumber (line.find(sNumber));
3651 if (posNumber != string::npos)
3653 if (received & 0x0001)
3655 line.erase(0, posNumber + sNumber.length());
3659 received |= 0x00000001;
3662 size_t posValue(inLogLines.at(ndx).find(sValue));
3663 if (posValue != string::npos)
3665 if (received & 0x0002)
3667 posValue += sValue.length();
3668 line.erase(0, posValue + sValue.length());
3671 size_t numHexDigits(0);
3672 for (
size_t ndx(0); ndx < line.size(); ndx++)
3675 if (numHexDigits != line.length())
3678 istringstream iss(line);
3679 iss >> std::hex >> rcvdRegVal;
3686 return received == 3;
3692 for (NTV2ULWordVector::const_iterator it(inObj.begin()); it != inObj.end(); ++it)
3693 inOutStream <<
" " <<
HEX0N(*it,8);
3700 inOutStream << (inCompact ?
"Ch[" :
"[");
3704 inOutStream <<
DEC(*it+1);
3707 if (++it != inObj.end())
3708 inOutStream << (inCompact ?
"|" :
",");
3710 return inOutStream <<
"]";
3714 { ostringstream oss;
3721 inOutStream << (inCompact ?
"Ch{" :
"{");
3725 inOutStream <<
DEC(*it+1);
3728 if (++it != inObj.end())
3729 inOutStream << (inCompact ?
"|" :
",");
3731 return inOutStream <<
"}";
3735 { ostringstream oss;
3770 result.push_back(*it);
3776 inOutStream << (inCompact ?
"AudSys{" :
"{");
3780 inOutStream <<
DEC(*it+1);
3783 if (++it != inObj.end())
3784 inOutStream << (inCompact ?
"|" :
",");
3786 return inOutStream <<
"}";
3790 { ostringstream oss;
3800 result.insert(audSys);
3808 if (result.find(it->registerNumber) == result.end())
3809 result.insert(it->registerNumber);
3816 if (iter->registerNumber == inRegNum)
3818 return inRegInfos.end();
3824 return inObj.
Print(inOutStream);
3830 inOutStream << inObj.size () <<
" regs:" << endl;
3832 inOutStream << *iter << endl;
3839 mIsWriting (inDoWrite),
3845 *pRegInfo = inBankSelect;
3848 *pRegInfo = inOutRegInfo;
3861 if (
ULWord(inIndex0) < maxNum)
3862 result = pRegInfos[inIndex0];
3874 if (
mInBankInfos) oss << *pBankRegInfo;
else oss <<
"-";
3875 oss <<
" regInfos=";
3876 if (
mInRegInfos) oss << *pRegInfo;
else oss <<
"-";
3883 static NTV2StringList sOpStrs = {
"(invalid)",
"Subscribe",
"Unsubscribe",
"Enable",
"Disable",
3884 "GetSubscribed",
"GetEnabledIDs",
"GetIntCount",
"SetIntCount"};
3885 return op < sOpStrs.size() ? sOpStrs.at(op) :
aja::to_string(op);
3895 return string(
pName);
3902 if (mask & uint64_t(1ULL <<
id))
3909 mOperation (kOpINVALID),
3915 mClientID (uint64_t(pClient)),
3919 mHandles (nullptr,0)
3962 return msg.
print(oss);
3969 mIsWriting (inDoWrite),
3970 mVirtualData (inVirtualData, inVirtualDataSize)
3985 mMessage (inMessage, inMessageSize),
4024 #define AsU8Ref(_x_) reinterpret_cast<uint8_t&>(_x_) 4025 #define AsU16Ref(_x_) reinterpret_cast<uint16_t&>(_x_) 4026 #define AsU32Ref(_x_) reinterpret_cast<uint32_t&>(_x_) 4027 #define AsU64Ref(_x_) reinterpret_cast<uint64_t&>(_x_) 4033 PUSHU32(fHeaderVersion, outBlob);
4035 PUSHU32(fSizeInBytes, outBlob);
4036 PUSHU32(fPointerSize, outBlob);
4038 PUSHU32(fResultStatus, outBlob);
4044 POPU32(fHeaderTag, inBlob, inOutIndex);
4045 POPU32(fType, inBlob, inOutIndex);
4046 POPU32(fHeaderVersion, inBlob, inOutIndex);
4047 POPU32(fVersion, inBlob, inOutIndex);
4049 POPU32(v32, inBlob, inOutIndex);
4050 POPU32(fPointerSize, inBlob, inOutIndex);
4051 POPU32(fOperation, inBlob, inOutIndex);
4052 POPU32(fResultStatus, inBlob, inOutIndex);
4058 PUSHU32(fTrailerVersion, outBlob);
4059 PUSHU32(fTrailerTag, outBlob);
4065 POPU32(fTrailerVersion, inBlob, inOutIndex);
4066 POPU32(fTrailerTag, inBlob, inOutIndex);
4075 if (!IsNULL() && fillBuffer)
4082 ULWord byteCount(0), flags(0);
4083 POPU32(byteCount, inBlob, inOutIndex);
4084 POPU32(flags, inBlob, inOutIndex);
4089 if ((inOutIndex + byteCount) > inBlob.size())
4091 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
4092 inOutIndex += byteCount;
4100 ULWord byteCount(0), flags(0);
4101 POPU32(byteCount, inBlob, inOutIndex);
4102 POPU32(flags, inBlob, inOutIndex);
4103 if ((inOutIndex + byteCount) > inBlob.size())
4106 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
4107 inOutIndex += byteCount;
4113 const size_t totBytes (mHeader.GetSizeInBytes()
4114 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
4115 if (outBlob.capacity() < totBytes)
4116 outBlob.reserve(totBytes);
4119 mInRegisters.ByteSwap32();
4121 bool ok = mHeader.RPCEncode(outBlob);
4122 PUSHU32(mInNumRegisters, outBlob);
4123 ok &= mInRegisters.RPCEncode(outBlob,
true);
4124 PUSHU32(mOutNumRegisters, outBlob);
4125 ok &= mOutGoodRegisters.RPCEncode(outBlob,
false)
4126 && mOutValues.RPCEncode(outBlob,
false)
4127 && mTrailer.RPCEncode(outBlob);
4130 mInRegisters.ByteSwap32();
4137 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4138 if (!ok)
return false;
4139 POPU32(mInNumRegisters, inBlob, inOutIndex);
4140 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
true);
4141 POPU32(mOutNumRegisters, inBlob, inOutIndex);
4142 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
false);
4143 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
false);
4144 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4147 mInRegisters.ByteSwap32();
4154 const size_t totBytes (mHeader.GetSizeInBytes()
4155 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
4156 if (outBlob.capacity() < totBytes)
4157 outBlob.reserve(totBytes);
4160 mOutGoodRegisters.ByteSwap32();
4161 mOutValues.ByteSwap32();
4163 bool ok = mHeader.RPCEncode(outBlob);
4164 PUSHU32(mInNumRegisters, outBlob);
4165 ok &= mInRegisters.RPCEncode(outBlob,
false);
4166 PUSHU32(mOutNumRegisters, outBlob);
4167 ok &= mOutGoodRegisters.RPCEncode(outBlob,
true)
4168 && mOutValues.RPCEncode(outBlob,
true)
4169 && mTrailer.RPCEncode(outBlob);
4172 mOutGoodRegisters.ByteSwap32();
4173 mOutValues.ByteSwap32();
4180 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4181 if (!ok)
return false;
4182 POPU32(mInNumRegisters, inBlob, inOutIndex);
4183 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
false);
4184 POPU32(mOutNumRegisters, inBlob, inOutIndex);
4185 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
true);
4186 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
true);
4187 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4190 mOutGoodRegisters.ByteSwap32();
4191 mOutValues.ByteSwap32();
4198 const size_t totBytes (mHeader.GetSizeInBytes()
4199 + mInRegInfos.GetByteCount() + mOutBadRegIndexes.GetByteCount());
4200 if (outBlob.capacity() < totBytes)
4201 outBlob.reserve(totBytes);
4204 mInRegInfos.ByteSwap32();
4205 mOutBadRegIndexes.ByteSwap32();
4207 bool ok = mHeader.RPCEncode(outBlob);
4208 PUSHU32(mInNumRegisters, outBlob);
4209 ok &= mInRegInfos.RPCEncode(outBlob);
4210 PUSHU32(mOutNumFailures, outBlob);
4211 ok &= mOutBadRegIndexes.RPCEncode(outBlob)
4212 && mTrailer.RPCEncode(outBlob);
4215 mInRegInfos.ByteSwap32();
4216 mOutBadRegIndexes.ByteSwap16();
4223 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4224 POPU32(mInNumRegisters, inBlob, inOutIndex);
4225 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
4226 POPU32(mOutNumFailures, inBlob, inOutIndex);
4227 ok &= mOutBadRegIndexes.RPCDecode(inBlob, inOutIndex);
4228 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4231 mInRegInfos.ByteSwap32();
4232 mOutBadRegIndexes.ByteSwap16();
4239 const size_t totBytes (mHeader.GetSizeInBytes()
4240 + mInBankInfos.GetByteCount() + mInRegInfos.GetByteCount());
4241 if (outBlob.capacity() < totBytes)
4242 outBlob.reserve(totBytes);
4245 mInBankInfos.ByteSwap32();
4246 mInRegInfos.ByteSwap32();
4248 bool ok = mHeader.RPCEncode(outBlob);
4250 ok &= mInBankInfos.RPCEncode(outBlob);
4251 ok &= mInRegInfos.RPCEncode(outBlob)
4252 && mTrailer.RPCEncode(outBlob);
4255 mInBankInfos.ByteSwap32();
4256 mInRegInfos.ByteSwap32();
4263 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4264 POPU32(mIsWriting, inBlob, inOutIndex);
4265 ok &= mInBankInfos.RPCDecode(inBlob, inOutIndex);
4266 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
4267 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4270 mInBankInfos.ByteSwap32();
4271 mInRegInfos.ByteSwap32();
4278 const size_t totBytes (mHeader.GetSizeInBytes()
4279 + mHandles.GetByteCount());
4280 if (outBlob.capacity() < totBytes)
4281 outBlob.reserve(totBytes);
4284 ok &= mHandles.ByteSwap64();
4285 ok &= mHeader.RPCEncode(outBlob);
4288 PUSHU32(mInterruptID, outBlob);
4290 PUSHU64(mInterruptIDs, outBlob);
4291 PUSHU64(mEventHandle, outBlob);
4296 ok &= mHandles.RPCEncode(outBlob);
4297 ok &= mTrailer.RPCEncode(outBlob);
4299 ok &= mHandles.ByteSwap64();
4305 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4306 ok &=
POPU32(mOperation, inBlob, inOutIndex);
4307 ok &=
POPU32(mFlags, inBlob, inOutIndex);
4308 ok &=
POPU32(mInterruptID, inBlob, inOutIndex);
4309 ok &=
POPU32(mResult, inBlob, inOutIndex);
4310 ok &=
POPU64(mInterruptIDs, inBlob, inOutIndex);
4311 ok &=
POPU64(mEventHandle, inBlob, inOutIndex);
4312 ok &=
POPU64(mClientID, inBlob, inOutIndex);
4313 ok &=
POPU64(mClientPID, inBlob, inOutIndex);
4314 ok &=
POPU64(mClientTID, inBlob, inOutIndex);
4315 ok &=
POPU32(mCount, inBlob, inOutIndex);
4316 ok &= mHandles.RPCDecode(inBlob, inOutIndex);
4317 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4319 mHandles.ByteSwap64();
4325 const size_t totBytes (acHeader.GetSizeInBytes());
4326 if (outBlob.capacity() < totBytes)
4327 outBlob.reserve(totBytes);
4328 bool ok = acHeader.RPCEncode(outBlob);
4334 PUSHU64(acRDTSCStartTime, outBlob);
4335 PUSHU64(acAudioClockStartTime, outBlob);
4336 PUSHU64(acRDTSCCurrentTime, outBlob);
4337 PUSHU64(acAudioClockCurrentTime, outBlob);
4338 PUSHU32(acFramesProcessed, outBlob);
4339 PUSHU32(acFramesDropped, outBlob);
4340 PUSHU32(acBufferLevel, outBlob);
4341 PUSHU32(acOptionFlags, outBlob);
4343 ok &= acTrailer.RPCEncode(outBlob);
4348 { uint16_t v16(0); uint32_t v32(0);
4349 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4350 POPU16(v16, inBlob, inOutIndex);
4352 POPU16(v16, inBlob, inOutIndex);
4354 POPU32(v32, inBlob, inOutIndex);
4355 acStartFrame =
LWord(v32);
4356 POPU32(v32, inBlob, inOutIndex);
4357 acEndFrame =
LWord(v32);
4358 POPU32(v32, inBlob, inOutIndex);
4359 acActiveFrame =
LWord(v32);
4360 POPU64(acRDTSCStartTime, inBlob, inOutIndex);
4361 POPU64(acAudioClockStartTime, inBlob, inOutIndex);
4362 POPU64(acRDTSCCurrentTime, inBlob, inOutIndex);
4363 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4364 POPU32(acFramesProcessed, inBlob, inOutIndex);
4365 POPU32(acFramesDropped, inBlob, inOutIndex);
4366 POPU32(acBufferLevel, inBlob, inOutIndex);
4367 POPU32(acOptionFlags, inBlob, inOutIndex);
4368 POPU16(v16, inBlob, inOutIndex);
4370 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4376 const size_t totBytes (acHeader.GetSizeInBytes());
4377 if (outBlob.capacity() < totBytes)
4378 outBlob.reserve(totBytes);
4379 bool ok = acHeader.RPCEncode(outBlob);
4381 PUSHU32(acRequestedFrame, outBlob);
4382 PUSHU64(acAudioClockTimeStamp, outBlob);
4383 PUSHU32(acAudioExpectedAddress, outBlob);
4384 PUSHU32(acAudioInStartAddress, outBlob);
4385 PUSHU32(acAudioInStopAddress, outBlob);
4386 PUSHU32(acAudioOutStopAddress, outBlob);
4387 PUSHU32(acAudioOutStartAddress, outBlob);
4388 PUSHU32(acTotalBytesTransferred, outBlob);
4389 PUSHU32(acStartSample, outBlob);
4391 ok &= acTimeCodes.RPCEncode(outBlob);
4393 PUSHU32(acCurrentFrame, outBlob);
4395 PUSHU64(acAudioClockCurrentTime, outBlob);
4396 PUSHU32(acCurrentAudioExpectedAddress, outBlob);
4397 PUSHU32(acCurrentAudioStartAddress, outBlob);
4398 PUSHU32(acCurrentFieldCount, outBlob);
4399 PUSHU32(acCurrentLineCount, outBlob);
4400 PUSHU32(acCurrentReps, outBlob);
4401 PUSHU64(acCurrentUserCookie, outBlob);
4403 PUSHU32(acRP188.fDBB, outBlob);
4404 PUSHU32(acRP188.fLo, outBlob);
4405 PUSHU32(acRP188.fHi, outBlob);
4406 ok &= acTrailer.RPCEncode(outBlob);
4412 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4413 POPU64(v64, inBlob, inOutIndex);
4415 POPU32(acRequestedFrame, inBlob, inOutIndex);
4416 POPU64(acAudioClockTimeStamp, inBlob, inOutIndex);
4417 POPU32(acAudioExpectedAddress, inBlob, inOutIndex);
4418 POPU32(acAudioInStartAddress, inBlob, inOutIndex);
4419 POPU32(acAudioInStopAddress, inBlob, inOutIndex);
4420 POPU32(acAudioOutStopAddress, inBlob, inOutIndex);
4421 POPU32(acAudioOutStartAddress, inBlob, inOutIndex);
4422 POPU32(acTotalBytesTransferred, inBlob, inOutIndex);
4423 POPU32(acStartSample, inBlob, inOutIndex);
4425 ok &= acTimeCodes.RPCDecode(inBlob, inOutIndex);
4426 POPU64(v64, inBlob, inOutIndex);
4428 POPU32(acCurrentFrame, inBlob, inOutIndex);
4429 POPU64(v64, inBlob, inOutIndex);
4430 acCurrentFrameTime =
LWord64(v64);
4431 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4432 POPU32(acCurrentAudioExpectedAddress, inBlob, inOutIndex);
4433 POPU32(acCurrentAudioStartAddress, inBlob, inOutIndex);
4434 POPU32(acCurrentFieldCount, inBlob, inOutIndex);
4435 POPU32(acCurrentLineCount, inBlob, inOutIndex);
4436 POPU32(acCurrentReps, inBlob, inOutIndex);
4437 POPU64(acCurrentUserCookie, inBlob, inOutIndex);
4438 POPU32(acFrame, inBlob, inOutIndex);
4439 POPU32(acRP188.fDBB, inBlob, inOutIndex);
4440 POPU32(acRP188.fLo, inBlob, inOutIndex);
4441 POPU32(acRP188.fHi, inBlob, inOutIndex);
4442 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4448 const size_t totBytes (acHeader.GetSizeInBytes());
4449 if (outBlob.capacity() < totBytes)
4450 outBlob.reserve(totBytes);
4451 bool ok = acHeader.RPCEncode(outBlob);
4454 PUSHU32(acBufferLevel, outBlob);
4455 PUSHU32(acFramesProcessed, outBlob);
4456 PUSHU32(acFramesDropped, outBlob);
4457 ok &= acFrameStamp.RPCEncode(outBlob);
4458 PUSHU32(acAudioTransferSize, outBlob);
4459 PUSHU32(acAudioStartSample, outBlob);
4460 PUSHU32(acAncTransferSize, outBlob);
4461 PUSHU32(acAncField2TransferSize, outBlob);
4462 ok &= acTrailer.RPCEncode(outBlob);
4467 { uint16_t v16(0); uint32_t v32(0);
4468 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4469 POPU16(v16, inBlob, inOutIndex);
4471 POPU32(v32, inBlob, inOutIndex);
4472 acTransferFrame =
LWord(v32);
4473 POPU32(acBufferLevel, inBlob, inOutIndex);
4474 POPU32(acFramesProcessed, inBlob, inOutIndex);
4475 POPU32(acFramesDropped, inBlob, inOutIndex);
4476 ok &= acFrameStamp.RPCDecode(inBlob, inOutIndex);
4477 POPU32(acAudioTransferSize, inBlob, inOutIndex);
4478 POPU32(acAudioStartSample, inBlob, inOutIndex);
4479 POPU32(acAncTransferSize, inBlob, inOutIndex);
4480 POPU32(acAncField2TransferSize, inBlob, inOutIndex);
4481 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4487 PUSHU32(acNumSegments, outBlob);
4488 PUSHU32(acNumActiveBytesPerRow, outBlob);
4489 PUSHU32(acSegmentHostPitch, outBlob);
4490 PUSHU32(acSegmentDevicePitch, outBlob);
4496 POPU32(acNumSegments, inBlob, inOutIndex);
4497 POPU32(acNumActiveBytesPerRow, inBlob, inOutIndex);
4498 POPU32(acSegmentHostPitch, inBlob, inOutIndex);
4499 POPU32(acSegmentDevicePitch, inBlob, inOutIndex);
4506 PUSHU32(ccSaturationValue, outBlob);
4507 return ccLookupTables.RPCEncode(outBlob);
4512 POPU16(u16, inBlob, inOutIndex);
4514 POPU32(ccSaturationValue, inBlob, inOutIndex);
4515 return ccLookupTables.RPCDecode(inBlob, inOutIndex);
4521 PUSHU16(foregroundVideoCrosspoint, outBlob);
4522 PUSHU16(backgroundVideoCrosspoint, outBlob);
4523 PUSHU16(foregroundKeyCrosspoint, outBlob);
4524 PUSHU16(backgroundKeyCrosspoint, outBlob);
4531 { uint16_t v16(0); uint32_t v32(0);
4532 POPU16(v16, inBlob, inOutIndex);
4534 POPU16(v16, inBlob, inOutIndex);
4536 POPU16(v16, inBlob, inOutIndex);
4538 POPU16(v16, inBlob, inOutIndex);
4540 POPU16(v16, inBlob, inOutIndex);
4542 POPU32(v32, inBlob, inOutIndex);
4543 transitionCoefficient =
Fixed_(v32);
4544 POPU32(v32, inBlob, inOutIndex);
4545 transitionSoftness =
Fixed_(v32);
4559 POPU32(fDBB, inBlob, inOutIndex);
4560 POPU32(fLo, inBlob, inOutIndex);
4561 POPU32(fHi, inBlob, inOutIndex);
4568 const size_t totBytes (acHeader.GetSizeInBytes() + acVideoBuffer.GetByteCount() + acAudioBuffer.GetByteCount()
4569 + acANCBuffer.GetByteCount() + acANCField2Buffer.GetByteCount() + acOutputTimeCodes.GetByteCount()
4570 + acHDMIAuxData.GetByteCount() + 64);
4571 if (outBlob.capacity() < totBytes)
4572 outBlob.reserve(totBytes);
4573 bool ok = acHeader.RPCEncode(outBlob);
4574 ok &= acVideoBuffer.RPCEncode(outBlob);
4575 ok &= acAudioBuffer.RPCEncode(outBlob);
4576 ok &= acANCBuffer.RPCEncode(outBlob);
4577 ok &= acANCField2Buffer.RPCEncode(outBlob);
4578 ok &= acOutputTimeCodes.RPCEncode(outBlob);
4579 ok &= acTransferStatus.RPCEncode(outBlob);
4580 PUSHU64(acInUserCookie, outBlob);
4581 PUSHU32(acInVideoDMAOffset, outBlob);
4582 ok &= acInSegmentedDMAInfo.RPCEncode(outBlob);
4583 ok &= acColorCorrection.RPCEncode(outBlob);
4584 PUSHU16(acFrameBufferFormat, outBlob);
4585 PUSHU16(acFrameBufferOrientation, outBlob);
4586 ok &= acVidProcInfo.RPCEncode(outBlob);
4587 PUSHU16(acVideoQuarterSizeExpand, outBlob);
4588 ok &= acHDMIAuxData.RPCEncode(outBlob);
4589 PUSHU32(acPeerToPeerFlags, outBlob);
4590 PUSHU32(acFrameRepeatCount, outBlob);
4592 ok &= acRP188.RPCEncode(outBlob);
4593 PUSHU16(acCrosspoint, outBlob);
4594 ok &= acTrailer.RPCEncode(outBlob);
4600 { uint16_t v16(0); uint32_t v32(0);
4602 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4603 ok &= acVideoBuffer.RPCDecode(inBlob, inOutIndex);
4604 ok &= acAudioBuffer.RPCDecode(inBlob, inOutIndex);
4605 ok &= acANCBuffer.RPCDecode(inBlob, inOutIndex);
4606 ok &= acANCField2Buffer.RPCDecode(inBlob, inOutIndex);
4607 ok &= acOutputTimeCodes.RPCDecode(inBlob, inOutIndex);
4608 ok &= acTransferStatus.RPCDecode(inBlob, inOutIndex);
4609 POPU64(acInUserCookie, inBlob, inOutIndex);
4610 POPU32(acInVideoDMAOffset, inBlob, inOutIndex);
4611 ok &= acInSegmentedDMAInfo.RPCDecode(inBlob, inOutIndex);
4612 ok &= acColorCorrection.RPCDecode(inBlob, inOutIndex);
4613 POPU16(v16, inBlob, inOutIndex);
4615 POPU16(v16, inBlob, inOutIndex);
4617 ok &= acVidProcInfo.RPCDecode(inBlob, inOutIndex);
4618 POPU16(v16, inBlob, inOutIndex);
4620 ok &= acHDMIAuxData.RPCDecode(inBlob, inOutIndex);
4621 POPU32(acPeerToPeerFlags, inBlob, inOutIndex);
4622 POPU32(acFrameRepeatCount, inBlob, inOutIndex);
4623 POPU32(v32, inBlob, inOutIndex);
4624 acDesiredFrame =
LWord(v32);
4625 ok &= acRP188.RPCDecode(inBlob, inOutIndex);
4626 POPU16(v16, inBlob, inOutIndex);
4628 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4638 PUSHU32(videoBufferSize, outBlob);
4639 if (videoBuffer && videoBufferSize)
4640 { buff.
Set(videoBuffer, videoBufferSize);
4643 PUSHU32(videoDmaOffset, outBlob);
4645 PUSHU32(audioBufferSize, outBlob);
4646 if (audioBuffer && audioBufferSize)
4647 { buff.
Set(audioBuffer, audioBufferSize);
4650 PUSHU32(audioStartSample, outBlob);
4651 PUSHU32(audioNumChannels, outBlob);
4652 PUSHU32(frameRepeatCount, outBlob);
4653 rp188.RPCEncode(outBlob);
4656 PUSHU32(transferFlags, outBlob);
4657 PUSHU8(bDisableExtraAudioInfo, outBlob);
4661 vidProcInfo.RPCEncode(outBlob);
4662 PUSHU32(customAncInfo.Group1, outBlob);
4663 PUSHU32(customAncInfo.Group2, outBlob);
4664 PUSHU32(customAncInfo.Group3, outBlob);
4665 PUSHU32(customAncInfo.Group4, outBlob);
4666 PUSHU32(videoNumSegments, outBlob);
4667 PUSHU32(videoSegmentHostPitch, outBlob);
4668 PUSHU32(videoSegmentCardPitch, outBlob);
4675 POPU16(v16, inBlob, inOutIndex);
4679 POPU32(videoBufferSize, inBlob, inOutIndex);
4680 if (videoBufferSize && !videoBuffer)
4685 if ((inOutIndex + videoBufferSize) >= inBlob.size())
4687 UByte* pBuffer =
reinterpret_cast<UByte*
>(videoBuffer);
4688 for (
ULWord cnt(0); cnt < videoBufferSize; cnt++)
4689 pBuffer[cnt] = inBlob.at(inOutIndex++);
4691 POPU32(videoDmaOffset, inBlob, inOutIndex);
4694 POPU32(audioBufferSize, inBlob, inOutIndex);
4695 if (audioBufferSize && !audioBuffer)
4700 if ((inOutIndex + audioBufferSize) >= inBlob.size())
4702 UByte* pBuffer =
reinterpret_cast<UByte*
>(audioBuffer);
4703 for (
ULWord cnt(0); cnt < audioBufferSize; cnt++)
4704 pBuffer[cnt] = inBlob.at(inOutIndex++);
4706 POPU32(audioStartSample, inBlob, inOutIndex);
4707 POPU32(audioNumChannels, inBlob, inOutIndex);
4708 POPU32(frameRepeatCount, inBlob, inOutIndex);
4709 rp188.RPCDecode(inBlob, inOutIndex);
4710 POPU32(v32, inBlob, inOutIndex);
4711 desiredFrame =
LWord(v32);
4712 POPU32(hUser, inBlob, inOutIndex);
4713 POPU32(transferFlags, inBlob, inOutIndex);
4714 POPU8(
AsU8Ref(bDisableExtraAudioInfo), inBlob, inOutIndex);
4715 POPU16(v16, inBlob, inOutIndex);
4717 POPU16(v16, inBlob, inOutIndex);
4720 vidProcInfo.RPCDecode(inBlob, inOutIndex);
4721 POPU32(customAncInfo.Group1, inBlob, inOutIndex);
4722 POPU32(customAncInfo.Group2, inBlob, inOutIndex);
4723 POPU32(customAncInfo.Group3, inBlob, inOutIndex);
4724 POPU32(customAncInfo.Group4, inBlob, inOutIndex);
4725 POPU32(videoNumSegments, inBlob, inOutIndex);
4726 POPU32(videoSegmentHostPitch, inBlob, inOutIndex);
4727 POPU32(videoSegmentCardPitch, inBlob, inOutIndex);
4728 POPU16(v16, inBlob, inOutIndex);
4735 const size_t totBytes (mHeader.GetSizeInBytes());
4736 if (outBlob.capacity() < totBytes)
4737 outBlob.reserve(totBytes);
4738 bool ok = mHeader.RPCEncode(outBlob);
4739 ok &= mBuffer.RPCEncode(outBlob);
4742 for (
size_t ndx(0); ndx < 16; ndx++)
4743 PUSHU32(mRegisters[ndx], outBlob);
4744 for (
size_t ndx(0); ndx < 32; ndx++)
4745 PUSHU32(mReserved[ndx], outBlob);
4746 ok &= mTrailer.RPCEncode(outBlob);
4752 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4753 ok &= mBuffer.RPCDecode(inBlob, inOutIndex);
4754 POPU32(mFlags, inBlob, inOutIndex);
4755 POPU32(mStatus, inBlob, inOutIndex);
4756 for (
size_t ndx(0); ndx < 16; ndx++)
4757 POPU32(mRegisters[ndx], inBlob, inOutIndex);
4758 for (
size_t ndx(0); ndx < 16; ndx++)
4759 POPU32(mReserved[ndx], inBlob, inOutIndex);
4760 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4771 PUSHU64(rdtscStartTime, outBlob);
4772 PUSHU64(audioClockStartTime, outBlob);
4773 PUSHU64(rdtscCurrentTime, outBlob);
4774 PUSHU64(audioClockCurrentTime, outBlob);
4775 PUSHU32(framesProcessed, outBlob);
4776 PUSHU32(framesDropped, outBlob);
4777 PUSHU32(bufferLevel, outBlob);
4778 PUSHU8(bWithAudio, outBlob);
4779 PUSHU8(bWithRP188, outBlob);
4780 PUSHU8(bFbfChange, outBlob);
4781 PUSHU8(bFboChange, outBlob);
4782 PUSHU8(bWithColorCorrection, outBlob);
4783 PUSHU8(bWithVidProc, outBlob);
4784 PUSHU8(bWithCustomAncData, outBlob);
4789 { uint16_t v16(0); uint32_t v32(0);
4790 POPU16(v16, inBlob, inOutIndex);
4792 POPU16(v16, inBlob, inOutIndex);
4794 POPU32(v32, inBlob, inOutIndex);
4795 startFrame =
LWord(v32);
4796 POPU32(v32, inBlob, inOutIndex);
4797 endFrame =
LWord(v32);
4798 POPU32(v32, inBlob, inOutIndex);
4799 activeFrame =
LWord(v32);
4800 POPU64(rdtscStartTime, inBlob, inOutIndex);
4801 POPU64(audioClockStartTime, inBlob, inOutIndex);
4802 POPU64(rdtscCurrentTime, inBlob, inOutIndex);
4803 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4804 POPU32(framesProcessed, inBlob, inOutIndex);
4805 POPU32(framesDropped, inBlob, inOutIndex);
4806 POPU32(bufferLevel, inBlob, inOutIndex);
4811 POPU8(
AsU8Ref(bWithColorCorrection), inBlob, inOutIndex);
4813 POPU8(
AsU8Ref(bWithCustomAncData), inBlob, inOutIndex);
4827 POPU32(DBB, inBlob, inOutIndex);
4828 POPU32(Low, inBlob, inOutIndex);
4829 POPU32(High, inBlob, inOutIndex);
4836 PUSHU32(taskVersion, outBlob);
4841 if (taskArray && numTasks)
4842 for (
ULWord num(0); num < numTasks; num++)
4846 const ULWord * pULWords =
reinterpret_cast<const ULWord*
>(&task.
u);
4852 for (
ULWord word(0); word < numWords; word++)
4853 PUSHU32(pULWords[word], outBlob);
4860 POPU32(taskVersion, inBlob, inOutIndex);
4861 POPU32(taskSize, inBlob, inOutIndex);
4862 POPU32(numTasks, inBlob, inOutIndex);
4863 POPU32(maxTasks, inBlob, inOutIndex);
4864 POPU64(u64, inBlob, inOutIndex);
4866 if (taskArray && numTasks)
4867 for (
ULWord num(0); num < numTasks; num++)
4870 POPU32(u32, inBlob, inOutIndex);
4878 for (
ULWord word(0); word < numWords; word++)
4879 POPU32(pULWords[word], inBlob, inOutIndex);
4889 PUSHU64(audioClockTimeStamp, outBlob);
4890 PUSHU32(audioExpectedAddress, outBlob);
4891 PUSHU32(audioInStartAddress, outBlob);
4892 PUSHU32(audioInStopAddress, outBlob);
4893 PUSHU32(audioOutStopAddress, outBlob);
4894 PUSHU32(audioOutStartAddress, outBlob);
4896 PUSHU32(startSample, outBlob);
4898 PUSHU32(currentFrame, outBlob);
4899 currentRP188.RPCEncode(outBlob);
4901 PUSHU64(audioClockCurrentTime, outBlob);
4902 PUSHU32(currentAudioExpectedAddress, outBlob);
4903 PUSHU32(currentAudioStartAddress, outBlob);
4904 PUSHU32(currentFieldCount, outBlob);
4905 PUSHU32(currentLineCount, outBlob);
4906 PUSHU32(currentReps, outBlob);
4907 PUSHU32(currenthUser, outBlob);
4912 { uint16_t v16(0); uint64_t v64(0);
4913 POPU16(v16, inBlob, inOutIndex);
4915 POPU64(v64, inBlob, inOutIndex);
4917 POPU32(frame, inBlob, inOutIndex);
4918 POPU64(audioClockTimeStamp, inBlob, inOutIndex);
4919 POPU32(audioExpectedAddress, inBlob, inOutIndex);
4920 POPU32(audioInStartAddress, inBlob, inOutIndex);
4921 POPU32(audioInStopAddress, inBlob, inOutIndex);
4922 POPU32(audioOutStopAddress, inBlob, inOutIndex);
4923 POPU32(audioOutStartAddress, inBlob, inOutIndex);
4924 POPU32(bytesRead, inBlob, inOutIndex);
4925 POPU32(startSample, inBlob, inOutIndex);
4926 POPU64(v64, inBlob, inOutIndex);
4928 POPU32(currentFrame, inBlob, inOutIndex);
4929 currentRP188.RPCDecode(inBlob, inOutIndex);
4930 POPU64(v64, inBlob, inOutIndex);
4931 currentFrameTime =
LWord64(v64);
4932 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4933 POPU32(currentAudioExpectedAddress, inBlob, inOutIndex);
4934 POPU32(currentAudioStartAddress, inBlob, inOutIndex);
4935 POPU32(currentFieldCount, inBlob, inOutIndex);
4936 POPU32(currentLineCount, inBlob, inOutIndex);
4937 POPU32(currentReps, inBlob, inOutIndex);
4938 POPU32(currenthUser, inBlob, inOutIndex);
4967 reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->
RPCEncode(outBlob);
4977 #if defined(AJA_LINUX) 4978 #pragma GCC diagnostic push 4979 #pragma GCC diagnostic ignored "-Wstrict-aliasing" 4981 uint16_t v16(0); uint32_t v32(0);
4982 POPU16(v16, inBlob, inOutIndex);
4984 POPU16(v16, inBlob, inOutIndex);
4986 POPU32(v32, inBlob, inOutIndex); lVal1 =
LWord(v32);
4987 POPU32(v32, inBlob, inOutIndex); lVal2 =
LWord(v32);
4988 POPU32(v32, inBlob, inOutIndex); lVal3 =
LWord(v32);
4989 POPU32(v32, inBlob, inOutIndex); lVal4 =
LWord(v32);
4990 POPU32(v32, inBlob, inOutIndex); lVal5 =
LWord(v32);
4991 POPU32(v32, inBlob, inOutIndex); lVal6 =
LWord(v32);
5004 #if defined(AJA_LINUX) 5005 #pragma GCC diagnostic pop 5010 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.
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device...
#define NTV2_TYPE_MESSAGE_DATA
Identifies NTV2MessageData struct.
const char * NTV2InterruptEnumString(const unsigned inInterruptEnum)
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)
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.
NTV2Buffer mHandles
Optional buffer to store subscribed HANDLEs.
#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 IsValid(const bool chkTrailer=false) const
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.
void PUSHU32(const uint32_t val, RPCBlob &blob, const bool dontSwap=false)
Pushes a 32-bit value onto the given byte sequence.
bool CopyTo(AUTOCIRCULATE_STATUS_STRUCT &outOldStruct)
Copies my data into the given AUTOCIRCULATE_STATUS_STRUCT.
unsigned long long stoull(const std::string &str, std::size_t *idx, int base)
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
NTV2RegInfo & setMask(const ULWord val)
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)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2StringSet::const_iterator NTV2StringSetConstIter
~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.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
static std::string OpName(const ULWord op)
ULWord GetBufferLevel(void) const
NTV2StringList::const_iterator NTV2StringListConstIter
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.
NTV2ConfigInterrupt & setOperation(const ULWord op)
Sets my operation; also stores caller's PID & TID.
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.
Configure interrupt (subscribe/unsubscribe, enable/disable, query subscribed interrupts, query enabled interrupts, etc.).
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
std::map< ULWord, ULWord > NTV2RegisterValueMap
A mapping of distinct NTV2RegisterNumbers to their corresponding ULWord values.
ULWord getDestPitch(void) const
ULWord mSpares[32]
Reserved for future use.
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.
NTV2ConfigInterrupt(const void *pClient=nullptr)
Default ctor, optionally set clientID if needed.
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)
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...
ULWord mResult
Out: 0=false (fail), 1 or non-zero == true (success)
static string print_address_offset(const size_t inRadix, const ULWord64 inOffset)
bool POPU8(uint8_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx)
Pops an 8-bit value off the given byte sequence at the given zero-based index position.
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 recall 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!
Specifies devices that internally use NTV2.
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_)
void PUSHU8(const uint8_t val, RPCBlob &blob)
Pushes an 8-bit value onto the given byte sequence.
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)
Last virtual register slot.
NTV2_TRAILER acTrailer
The common message trailer – ALWAYS LAST!
static bool IsFourCC(const ULWord in4CC)
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
NTV2RegInfo & setRegNum(const ULWord val)
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 Find(const T &inValue, int &inOutIndex) const
Searches me for the given scalar value of type T starting at a given index position.
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.
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.
ULWord operation(void) const
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...
ULWord GetSizeInBytes(void) const
My total size, in bytes, including header, body and trailer (but excluding embedded NTV2Buffer data) ...
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).
ULWord64 mClientTID
In: client thread identifier.
This is used to perform virtual data reads or writes.
enum NTV2QuarterSizeExpandMode NTV2QtrSizeExpandMode
1920x1080, for 1080i and 1080p, NTV2_VANCMODE_OFF
Declares the AJAThread class.
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_TYPE_CONFIGINTERRUPT
Identifies NTV2ConfigInterrupt struct.
std::string to_string(bool val)
#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.
std::set< std::string > NTV2StringSet
#define NTV2_TYPE_AJABUFFERLOCK
Identifies NTV2BufferLock struct.
std::ostream & Print(std::ostream &inOutStream) const
std::string VersionString(void) 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...
enum _INTERRUPT_ENUMS_ INTERRUPT_ENUMS
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 ...
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
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.
bool ImportFromLog(const NTV2StringList &inLogLines)
Resets me using the given "Number:" and "Value:" lines from the support log.
Specifies any/all devices.
ULWord acAudioTransferSize
Number of bytes captured into the audio buffer.
#define NTV2_TYPE_AJADEBUGLOGGING
Identifies NTV2DebugLogging struct.
bool VersionComponents(ULWord &outMajor, ULWord &outMinor, ULWord &outPoint, ULWord &outBuild) const
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecodeServer(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
All NTV2 messages start with this common header.
std::ostream & PrintLog(std::ostream &outputStream, const NTV2DeviceID inDeviceID=DEVICE_ID_INVALID) const
Renders me to the given output stream in "supportlog" format.
static size_t DefaultPageSize(void)
NTV2RegWrites NTV2RegisterReads
static std::string FourCCToString(const ULWord in4CC, const char nonPrintable='?')
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.
bool IsValidVersion(void) const
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.
size_t maxHandleCapacity(void) const
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...
void PUSHU16(const uint16_t val, RPCBlob &blob, const bool dontSwap=false)
Pushes a 16-bit value onto the given byte sequence.
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
static NTV2StringList IntNames(const uint64_t mask)
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)
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.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
const NTV2_TRAILER * GetTrailer(void) const
std::ostream & PrintCode(std::ostream &outputStream, const int inRadix=16, const NTV2DeviceID inDeviceID=DEVICE_ID_INVALID, const std::string &sCard="card") const
Renders me to the given output stream as source code using a "WriteRegister" function call...
ostream & operator<<(ostream &inOutStream, const NTV2StringList &inData)
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__)
Declares the AJAProcess class.
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)
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)
NTV2MessageData(const void *inMessage, const size_t inMessageSize, const ULWord inFlags)
Constructs an NTV2VirtualData struct for reading or writing virtual data.
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)
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...
std::string & strip(std::string &str, const std::string &ws)
bool GetSDIInputStatus(NTV2SDIInputStatus &outStatus, const UWord inSDIInputIndex0=0)
Answers with the NTV2SDIInputStatus for the given SDI input spigot.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord64 audioClockCurrentTime
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)
uint64_t clientPID(void) const
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)
uint64_t interruptIDs(void) const
NTV2_TRAILER()
Constructs a default NTV2_TRAILER having the proper version and tag.
uint64_t clientID(void) const
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.
std::ostream & Print(std::ostream &oss) const
Prints a human-readable representation of me into the given output stream.
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.
union AutoCircGenericTask::@15 u
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
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
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
Iterates over each byte that differs between myself and the given buffer.
#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.
bool is_legal_decimal_number(const std::string &inStr, size_t inMaxLength)
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)
std::vector< uint8_t > RPCBlob
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
uint64_t clientTID(void) const
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)
bool POPU32(uint32_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
Pops a 32-bit value off the given byte sequence at the given zero-based index position.
#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)
ULWord mFlags
In: option flags.
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)
std::string join(const std::vector< std::string > &parts, const std::string &delim)
#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.
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...
bool POPU64(uint64_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
Pops a 64-bit value off the given byte sequence at the given zero-based index position.
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
static std::string IntName(const INTERRUPT_ENUMS id)
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Color correction data used with AUTOCIRCULATE_WITH_COLORCORRECT option.
static const string sSegXferUnits[]
std::vector< std::string > NTV2StringList
ULWord64 mClientPID
In: client process identifier.
bool SetFrom(const FRAME_STAMP_STRUCT &inOldStruct)
Sets my fields from the given FRAME_STAMP_STRUCT.
std::ostream & print(std::ostream &oss) const
prints a human-readable representation of me to the given output stream
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_)
std::string & lower(std::string &str)
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
ULWord mOperation
In: requested operation.
NTV2AudioSystem acAudioSystem
The audio system being used for this channel (NTV2_AUDIOSYSTEM_INVALID if none)
#define NTV2SDKVersionDecode_Major
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.
bool MatchesThisSDK(void) const
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 POPU16(uint16_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
Pops a 16-bit value off the given byte sequence at the given zero-based index position.
NTV2RegInfo & setShift(const ULWord val)
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.
#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
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)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
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.
INTERRUPT_ENUMS interruptID(void) const
bool isDestTopDown(void) const
All NTV2 messages end with this common trailer.
static uint64_t GetThreadId()
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) ...
void PUSHU64(const uint64_t val, RPCBlob &blob, const bool dontSwap=false)
Pushes a 64-bit value onto the given byte sequence.
NTV2SegmentedDMAInfo acInSegmentedDMAInfo
Optional segmented DMA info, for use with specialized data transfers.