24 #if !defined(MSWindows) 39 if (++it != inData.end())
50 if (++it != inData.end())
83 inOutStr << *iter << endl;
91 inOutStr <<
xHEX0N(uint16_t(*it),2);
92 if (++it != inDIDs.end())
100 inOutStream <<
DEC(inData.size()) <<
" UWords: ";
103 inOutStream <<
HEX0N(*iter,4);
104 if (++iter != inData.end())
112 inOutStream <<
DEC(inData.size()) <<
" ULWords: ";
115 inOutStream <<
HEX0N(*iter,8);
116 if (++iter != inData.end())
124 inOutStream <<
DEC(inData.size()) <<
" ULWord64s: ";
127 inOutStream <<
HEX0N(*iter,16);
128 if (++iter != inData.end())
146 mFrameRefClockCount = 0;
147 mGlobalClockCount = 0;
148 mFrameTRSError =
false;
157 inOutStream <<
"[CRCA=" <<
DEC(mCRCTallyA)
158 <<
" CRCB=" <<
DEC(mCRCTallyB)
159 <<
" unlk=" <<
xHEX0N(mUnlockTally,8)
160 <<
" frmRefClkCnt=" <<
xHEX0N(mFrameRefClockCount,16)
161 <<
" globalClkCnt=" <<
xHEX0N(mGlobalClockCount,16)
162 <<
" frmTRS=" <<
YesNo(mFrameTRSError)
163 <<
" locked=" <<
YesNo(mLocked)
164 <<
" VPIDA=" <<
YesNo(mVPIDValidA)
165 <<
" VPIDB=" <<
YesNo(mVPIDValidB)
207 inOutStream <<
"Enabled: " <<
YesNo(mEnabled);
210 <<
"Is 4:2:0: " <<
YesNo(mPixel420) << endl
231 transitionCoefficient (0),
232 transitionSoftness (0)
238 : eCommand (inCommand),
239 channelSpec (inCrosspoint),
263 static const string sCmds [] = {
"ACInit",
"ACStart",
"ACStop",
"ACPause",
"GetAC",
"ACFrmStmp",
264 "ACFlush",
"ACPreRoll",
"ACXfer",
"ACAbort",
"ACStartAt",
265 "ACXfer1",
"ACXfer2",
"ACFrmStmp2",
"ACTask",
"ACSetActFrm"};
266 if (
size_t(
eCommand) <
sizeof(sCmds))
276 if (
bVal2) oss <<
" +RP188";
277 if (
bVal3) oss <<
" +FBFChg";
278 if (
bVal4) oss <<
" +FBOChg";
279 if (
bVal5) oss <<
" +ColCorr";
280 if (
bVal6) oss <<
" +VidProc";
281 if (
bVal7) oss <<
" +Anc";
282 if (
bVal8) oss <<
" +LTC";
304 if (
bVal1) oss <<
" +resume";
305 if (
bVal1 &&
bVal2) oss <<
" +clearDropCount";
309 if (
bVal1) oss <<
" +clearDropCount";
331 fType (inStructureType),
334 fSizeInBytes (inStructSizeInBytes),
335 fPointerSize (sizeof(int*)),
344 return inObj.
Print (inOutStream);
352 inOutStream << NTV2_4CC_AS_STRING (fHeaderTag);
354 inOutStream <<
"BAD-" <<
HEX0N(fHeaderTag,8);
356 inOutStream << NTV2_4CC_AS_STRING (fType);
358 inOutStream <<
"|BAD-" <<
HEX0N(fType,8);
359 inOutStream <<
" v" << fHeaderVersion <<
" vers=" << fVersion <<
" sz=" << fSizeInBytes;
360 return inOutStream <<
"]";
365 const char * pU32 (reinterpret_cast<const char *>(&in4CC));
366 ostringstream result;
369 for (
size_t charPos(0); charPos < 4; charPos++)
371 #if AJATargetBigEndian 372 const char ch(pU32[charPos]);
373 #else // little-endian: 374 const char ch(pU32[3-charPos]);
376 if (ch < ' ' || ch > 126)
377 {result <<
'.'; badTally++;}
383 result <<
" (" <<
xHEX0N(in4CC,8) <<
")";
392 inOutStream << NTV2_4CC_AS_STRING(inObj.
fTrailerTag);
405 return inObj.
Print (inOutStream);
423 if (inDumpMaxBytes > 256)
424 inDumpMaxBytes = 256;
428 for (
UWord ndx(0); ndx < inDumpMaxBytes; ndx++)
429 oss <<
HEX0N(uint16_t(pBytes[ndx]),2);
434 string NTV2Buffer::AsCode (
const size_t inBytesPerWord,
const std::string & inVarName,
const bool inUseSTL,
const bool inByteSwap)
const 437 if (inBytesPerWord != 1 && inBytesPerWord != 2 && inBytesPerWord != 4 && inBytesPerWord != 8)
return string();
439 if (inBytesPerWord > 1)
445 const string cType (inBytesPerWord == 1 ?
"uint8_t" : (inBytesPerWord == 2 ?
"uint16_t" : (inBytesPerWord == 4 ?
"uint32_t" :
"uint64_t")));
446 const size_t numWords (
GetByteCount() / inBytesPerWord);
447 const string vecType =
"std::vector<" + cType +
">";
448 const string varName (inVarName.empty() ? (inUseSTL ?
"tmpVector" :
"tmpArray") : inVarName);
449 oss <<
"const " << (inUseSTL ? vecType : cType) <<
" " << varName << (inUseSTL ?
"" :
"[]") <<
" = {" << endl;
450 if (inByteSwap && inBytesPerWord > 1)
451 switch (inBytesPerWord)
457 for (
size_t ndx(0); ndx < numWords; )
459 switch (inBytesPerWord)
462 case 2: oss <<
xHEX0N(tmp.
U16(
int(ndx)),4);
break;
463 case 4: oss <<
xHEX0N(tmp.
U32(
int(ndx)),8);
break;
464 case 8: oss <<
xHEX0N(tmp.
U64(
int(ndx)),16);
break;
466 if (++ndx < numWords)
482 oss <<
HEX0N(uint16_t(
U8(ndx++)),2);
483 if (inLineBreakInterval && ndx <
int(
GetByteCount()) && ((
size_t(ndx) % inLineBreakInterval) == 0))
487 return !outStr.empty();
492 const streamsize maxAddrWidth (
sizeof(
ULWord64) * 2);
495 oss <<
OCT0N(inOffset,maxAddrWidth) <<
": ";
496 else if (inRadix == 10)
497 oss <<
DEC0N(inOffset,maxAddrWidth) <<
": ";
499 oss <<
xHEX0N(inOffset,maxAddrWidth) <<
": ";
504 const size_t inStartOffset,
505 const size_t inByteCount,
506 const size_t inRadix,
507 const size_t inBytesPerGroup,
508 const size_t inGroupsPerRow,
509 const size_t inAddressRadix,
510 const bool inShowAscii,
511 const size_t inAddrOffset)
const 515 if (inRadix != 8 && inRadix != 10 && inRadix != 16 && inRadix != 2)
517 if (inAddressRadix != 0 && inAddressRadix != 8 && inAddressRadix != 10 && inAddressRadix != 16)
519 if (inBytesPerGroup == 0)
524 size_t bytesRemaining (inByteCount ? inByteCount :
GetByteCount());
525 size_t bytesInThisGroup (0);
526 size_t groupsInThisRow (0);
527 const unsigned maxByteWidth (inRadix == 8 ? 4 : (inRadix == 10 ? 3 : (inRadix == 2 ? 8 : 2)));
528 const UByte * pBuffer (reinterpret_cast <const UByte *> (pInStartAddress));
529 const size_t asciiBufferSize (inShowAscii && inGroupsPerRow ? (inBytesPerGroup * inGroupsPerRow + 1) *
sizeof (
UByte) : 0);
531 if (!pInStartAddress)
536 ::memset (pAsciiBuffer, 0, asciiBufferSize);
538 if (inGroupsPerRow && inAddressRadix)
540 while (bytesRemaining)
543 inOStream <<
BIN08(*pBuffer);
544 else if (inRadix == 8)
545 inOStream <<
oOCT(uint16_t(*pBuffer));
546 else if (inRadix == 10)
547 inOStream <<
DEC0N(uint16_t(*pBuffer),maxByteWidth);
548 else if (inRadix == 16)
549 inOStream <<
HEX0N(uint16_t(*pBuffer),2);
552 pAsciiBuffer[groupsInThisRow * inBytesPerGroup + bytesInThisGroup] = isprint(*pBuffer) ? *pBuffer :
'.';
557 if (bytesInThisGroup >= inBytesPerGroup)
560 if (inGroupsPerRow && groupsInThisRow >= inGroupsPerRow)
564 inOStream <<
" " << pAsciiBuffer;
565 ::memset (pAsciiBuffer, 0, asciiBufferSize);
568 if (inAddressRadix && bytesRemaining)
569 inOStream << print_address_offset (inAddressRadix, reinterpret_cast <ULWord64> (pBuffer) - reinterpret_cast <ULWord64> (pInStartAddress) +
ULWord64 (inAddrOffset));
574 bytesInThisGroup = 0;
578 if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup && pAsciiBuffer)
581 inOStream <<
string ((inBytesPerGroup - bytesInThisGroup) * maxByteWidth + 1,
' ');
586 if (groupsInThisRow < inGroupsPerRow && pAsciiBuffer)
587 inOStream <<
string (((inGroupsPerRow - groupsInThisRow) * inBytesPerGroup * maxByteWidth + (inGroupsPerRow - groupsInThisRow)),
' ');
589 inOStream << pAsciiBuffer;
592 else if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup)
596 delete [] pAsciiBuffer;
603 const size_t inStartOffset,
604 const size_t inByteCount,
605 const size_t inRadix,
606 const size_t inBytesPerGroup,
607 const size_t inGroupsPerRow,
608 const size_t inAddressRadix,
609 const bool inShowAscii,
610 const size_t inAddrOffset)
const 613 Dump (oss, inStartOffset, inByteCount, inRadix, inBytesPerGroup, inGroupsPerRow, inAddressRadix, inShowAscii, inAddrOffset);
614 inOutputString = oss.str();
615 return inOutputString;
636 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint64_t));
637 if (maxSize < inU64Offset)
639 maxSize -= inU64Offset;
641 const uint64_t * pU64 (reinterpret_cast <const uint64_t *> (
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
645 if (inMaxSize && inMaxSize < maxSize)
650 outUint64s.reserve(maxSize);
651 for (
size_t ndx(0); ndx < maxSize; ndx++)
653 const uint64_t u64 (*pU64++);
660 outUint64s.reserve(0);
673 size_t maxNumU32s (
size_t(
GetByteCount()) /
sizeof(uint32_t));
674 if (maxNumU32s < inU32Offset)
676 maxNumU32s -= inU32Offset;
678 const uint32_t * pU32 (reinterpret_cast<const uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
682 if (inMaxSize && inMaxSize < maxNumU32s)
683 maxNumU32s = inMaxSize;
687 outUint32s.reserve(maxNumU32s);
688 for (
size_t ndx(0); ndx < maxNumU32s; ndx++)
690 const uint32_t u32 (*pU32++);
697 outUint32s.reserve(0);
710 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint16_t));
711 if (maxSize < inU16Offset)
713 maxSize -= inU16Offset;
715 const uint16_t * pU16 (reinterpret_cast <const uint16_t *> (
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
719 if (inMaxSize && inMaxSize < maxSize)
724 outUint16s.reserve(maxSize);
725 for (
size_t ndx(0); ndx < maxSize; ndx++)
727 const uint16_t u16 (*pU16++);
734 outUint16s.reserve(0);
748 if (maxSize < inU8Offset)
750 maxSize -= inU8Offset;
756 if (inMaxSize && inMaxSize < maxSize)
761 outUint8s.reserve(maxSize);
762 for (
size_t ndx(0); ndx < maxSize; ndx++)
763 outUint8s.push_back(*pU8++);
768 outUint8s.reserve(0);
776 const uint8_t * pU8 (reinterpret_cast<const uint8_t*> (
GetHostPointer()));
782 outU8s.reserve(outU8s.size() + maxSize);
783 outU8s.insert(outU8s.end(),pU8, pU8 + maxSize);
800 if (maxSize < inU8Offset)
802 maxSize -= inU8Offset;
808 if (inMaxSize && inMaxSize < maxSize)
813 outString.reserve(maxSize);
814 for (
size_t ndx(0); ndx < maxSize; ndx++)
816 const char c = *pU8++;
826 outString.reserve(0);
841 uint64_t * pU64 (reinterpret_cast<uint64_t*>(
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
844 if (maxU64s > inU64Offset)
845 maxU64s -= inU64Offset;
846 if (maxU64s > inU64s.size())
847 maxU64s = inU64s.size();
848 if (inU64s.size() > maxU64s)
851 for (
unsigned ndx(0); ndx < maxU64s; ndx++)
869 uint32_t * pU32 (reinterpret_cast<uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
872 if (maxU32s > inU32Offset)
873 maxU32s -= inU32Offset;
874 if (maxU32s > inU32s.size())
875 maxU32s = inU32s.size();
876 if (inU32s.size() > maxU32s)
879 for (
unsigned ndx(0); ndx < maxU32s; ndx++)
897 uint16_t * pU16 (reinterpret_cast<uint16_t*>(
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
900 if (maxU16s > inU16Offset)
901 maxU16s -= inU16Offset;
902 if (maxU16s > inU16s.size())
903 maxU16s = inU16s.size();
904 if (inU16s.size() > maxU16s)
907 for (
unsigned ndx(0); ndx < maxU16s; ndx++)
928 if (maxU8s > inU8Offset)
929 maxU8s -= inU8Offset;
930 if (maxU8s > inU8s.size())
931 maxU8s = inU8s.size();
932 if (inU8s.size() > maxU8s)
935 ::memcpy(pU8, &inU8s[0], maxU8s);
937 for (
unsigned ndx(0); ndx < maxU8s; ndx++)
939 *pU8++ = inU8s.at(ndx);
953 return inOutStream <<
"{invalid}";
959 inOutList.push_back (inRP188);
966 inOutStream << inObj.size () <<
":[";
969 inOutStream << *iter;
970 if (++iter != inObj.end ())
973 return inOutStream <<
"]";
979 inOutStream << inObj.size () <<
":[";
983 if (++iter != inObj.end ())
986 return inOutStream <<
"]";
995 if (++iter != inObj.end ())
1005 inOutSet.insert (*iter);
1012 return inOutStream << inObj.
acHeader 1033 <<
" acFrame=" << inObj.
acFrame 1034 <<
" acRP188=" << inObj.
acRP188 1045 inOutStream <<
"n/a";
1052 #if defined (_DEBUG) 1056 while (str.find (
' ') != string::npos)
1057 str.erase (str.find (
' '), 1);
1102 inOutStream <<
"RegValues:" << inObj.size () <<
"[";
1103 while (iter != inObj.end ())
1105 const NTV2RegisterNumber registerNumber (static_cast <NTV2RegisterNumber> (iter->first));
1106 const ULWord registerValue (iter->second);
1108 if (++iter != inObj.end ())
1111 return inOutStream <<
"]";
1138 if (inOutSet.find(*iter) == inOutSet.end())
1139 inOutSet.insert(*iter);
1147 NTV2VideoFormatSet::const_iterator iter (inFormats.begin ());
1149 inOStream << inFormats.size ()
1150 << (inFormats.size () == 1 ?
" video format: " :
" video format(s): ");
1152 while (iter != inFormats.end ())
1155 inOStream << (++iter == inFormats.end () ?
"" :
", ");
1167 inOStream << inFormats.size()
1168 << (inFormats.size() == 1 ?
" pixel format: " :
" pixel formats: ");
1170 while (iter != inFormats.end())
1173 inOStream << (++iter == inFormats.end() ?
"" :
", ");
1183 inOutSet.insert(*iter);
1193 inOStream << inStandards.size ()
1194 << (inStandards.size () == 1 ?
" standard: " :
" standards: ");
1196 while (iter != inStandards.end ())
1199 inOStream << (++iter == inStandards.end () ?
"" :
", ");
1209 inOutSet.insert(*iter);
1218 inOStream << inGeometries.size ()
1219 << (inGeometries.size () == 1 ?
" geometry: " :
" geometries: ");
1220 while (iter != inGeometries.end ())
1223 inOStream << (++iter == inGeometries.end () ?
"" :
", ");
1232 inOutSet.insert(*iter);
1241 inOStream << inSet.size()
1242 << (inSet.size() == 1 ?
" input: " :
" inputs: ");
1243 while (iter != inSet.end())
1246 inOStream << (++iter == inSet.end() ?
"" :
", ");
1255 inOutSet.insert (*iter);
1263 inOStream << inSet.size()
1264 << (inSet.size() == 1 ?
" output: " :
" outputs: ");
1265 while (iter != inSet.end())
1268 inOStream << (++iter == inSet.end() ?
"" :
", ");
1277 inOutSet.insert(*iter);
1290 if (outFormats.find(*fit) == outFormats.end())
1291 outFormats.insert(*fit);
1301 if (usedFormats.find(pf) == usedFormats.end())
1302 outFormats.insert(pf);
1308 outStandards.clear();
1315 if (outStandards.find(*sit) == outStandards.end())
1316 outStandards.insert(*sit);
1326 if (usedStandards.find(st) == usedStandards.end())
1327 outStandards.insert(st);
1346 outFormats.insert(vf);
1348 catch (
const std::bad_alloc &)
1356 NTV2_ASSERT ((isOkay && !outFormats.empty()) || (!isOkay && outFormats.empty()));
1371 outFormats.insert(pixelFormat);
1373 catch (
const std::bad_alloc &)
1381 if (supportedDevices.find(inDeviceID) != supportedDevices.end())
1383 return isOkay && !outFormats.empty();
1393 outStandards.clear();
1400 outStandards.insert(
std);
1409 outGeometries.clear();
1423 outInputSources.clear();
1432 outInputSources.insert(src);
1442 outOutputDests.clear();
1448 for (
size_t ndx(0); ndx < 10; ndx++)
1454 outOutputDests.insert(dst);
1463 << (inSet.size() == 1 ?
" rate: " :
" rates: ");
1464 while (it != inSet.end())
1467 oss << (++it == inSet.end() ?
"" :
", ");
1475 if (inOutSet.find(*it) == inOutSet.end())
1476 inOutSet.insert(*it);
1489 outRates.insert(fr);
1497 return inRun.
Print(inOutStrm);
1504 static const char * sStateStrings [] = {
"Disabled",
"Initializing",
"Starting",
"Paused",
"Stopping",
"Running",
"StartingAtTime",
AJA_NULL};
1506 return string (sStateStrings [inState]);
1548 return it != sFGWdths.end() ? it->second : 0;
1574 return it != sFGHghts.end() ? it->second : 0;
1578 static const string sSegXferUnits[] = {
"",
" U8",
" U16",
"",
" U32",
"",
"",
"",
" U64",
""};
1583 return inStrm <<
"(invalid)";
1607 static string var(
"segInfo");
1609 string units(
"\t// bytes");
1613 oss <<
"NTV2SegmentedXferInfo " << var <<
";" << endl;
1622 oss << var <<
".setSourceOffset(" <<
DEC(
getSourceOffset()) <<
");" << units << endl;
1623 oss << var <<
".setSourcePitch(" <<
DEC(
getSourcePitch()) <<
");" << units << endl;
1625 oss << var <<
".setSourceDirection(false);" << endl;
1627 oss << var <<
".setDestOffset(" <<
DEC(
getDestOffset()) <<
");" << units << endl;
1629 oss << var <<
".setDestPitch(" <<
DEC(
getDestPitch()) <<
");" << units << endl;
1631 oss << var <<
".setDestDirection(false);" << endl;
1649 if (inElementOffset < offset)
1682 mElementsPerSegment = 0;
1683 mInitialSrcOffset = 0;
1684 mInitialDstOffset = 0;
1685 mSrcElementsPerRow = 0;
1686 mDstElementsPerRow = 0;
1693 std::swap(mSrcElementsPerRow, mDstElementsPerRow);
1694 std::swap(mInitialSrcOffset, mInitialDstOffset);
1703 fByteCount (
ULWord(pInUserPointer ? inByteCount : 0)),
1705 #
if defined (AJAMac)
1706 fKernelSpacePtr (0),
1718 : fUserSpacePtr (0),
1721 #
if defined (AJAMac)
1722 fKernelSpacePtr (0),
1736 : fUserSpacePtr (0),
1739 #
if defined (AJAMac)
1740 fKernelSpacePtr (0),
1760 fByteCount =
ULWord(inNewByteCount);
1789 const size_t loopCount(
GetByteCount() /
sizeof(uint64_t));
1792 for (
size_t ndx(0); ndx < loopCount; ndx++)
1801 const size_t loopCount(
GetByteCount() /
sizeof(uint32_t));
1804 for (
size_t ndx(0); ndx < loopCount; ndx++)
1813 const size_t loopCount(
GetByteCount() /
sizeof(uint16_t));
1816 for (
size_t ndx(0); ndx < loopCount; ndx++)
1824 if (uint64_t(inByteCount) >= 0x0000000100000000)
1828 fByteCount =
ULWord(pInUserPointer ? inByteCount : 0);
1830 return (pInUserPointer && inByteCount) || (!pInUserPointer && !inByteCount);
1836 return Set(pInUserPointer, inByteCount) &&
Fill(inValue);
1842 if (uint64_t(inByteCount) >= 0x0000000100000000)
1860 {pBuffer =
new UByte[inByteCount];}
1861 catch (
const std::bad_alloc &)
1863 if (pBuffer &&
Set(pBuffer, inByteCount))
1908 pBytes += inByteOffset;
1944 const ULWord inSrcByteOffset,
const ULWord inDstByteOffset,
const ULWord inByteCount)
1948 if (inSrcByteOffset + inByteCount > inBuffer.
GetByteCount())
1953 const UByte * pSrc (inBuffer);
1954 pSrc += inSrcByteOffset;
1956 UByte * pDst (*
this);
1957 pDst += inDstByteOffset;
1959 ::memcpy (pDst, pSrc, inByteCount);
1976 srcPitch = 0 - srcPitch;
1978 dstPitch = 0 - dstPitch;
1983 if (!pSrc)
return false;
1984 if (!pDst)
return false;
1989 ::memcpy (pDst, pSrc,
size_t(bytesPerSeg));
1990 srcOffset += srcPitch;
1991 dstOffset += dstPitch;
2001 const string newline(
"\n"), tab(
"\t");
2007 for (
size_t ndx(0); ndx < str.size(); ndx++)
2017 for (
size_t srcNdx(0), dstNdx(0); srcNdx < str.size(); srcNdx += 2)
2031 if (fFlags != inBuffer.fFlags)
2037 fUserSpacePtr = inBuffer.fUserSpacePtr;
2038 inBuffer.fUserSpacePtr = tmp;
2054 const uint8_t * pSrchData (inValue);
2055 const uint8_t * pMyData (*
this);
2059 if (!::memcmp(pMyData, pSrchData, srchByteCount))
2061 outOffsets.insert(offset);
2062 if (inLimit && outOffsets.size() >= inLimit)
2067 }
while (offset < maxOffset);
2079 if (inByteOffset >= totalBytes)
2082 totalBytes -= inByteOffset;
2084 ULWord byteCount(inByteCount);
2085 if (byteCount > totalBytes)
2086 byteCount = totalBytes;
2091 const UByte * pByte1 (*
this);
2092 const UByte * pByte2 (inBuffer);
2093 pByte1 += inByteOffset;
2094 pByte2 += inByteOffset;
2095 #if !defined(NTV2BUFFER_NO_MEMCMP) 2096 return ::memcmp (pByte1, pByte2, byteCount) == 0;
2097 #else // NTV2BUFFER_NO_MEMCMP 2098 ULWord offset(inByteOffset);
2101 if (*pByte1 != *pByte2)
2103 cerr <<
"## ERROR: IsContentEqual: miscompare at offset " <<
xHEX0N(offset,8)
2104 <<
" (" <<
DEC(offset) <<
"): " <<
xHEX0N(
UWord(*pByte1),2) <<
" != " 2106 <<
DEC(byteCount) <<
") bytes left to compare" << endl;
2114 #endif // NTV2BUFFER_NO_MEMCMP 2119 if (byteOffset == 0xFFFFFFFF)
2126 {byteOffset = 0xFFFFFFFF;
return true;}
2129 if (byteOffset >= totalBytesToCompare)
2131 totalBytesToCompare -= byteOffset;
2133 const UByte * pByte1 (*
this);
2134 const UByte * pByte2 (inBuffer);
2135 while (totalBytesToCompare)
2137 if (pByte1[byteOffset] != pByte2[byteOffset])
2139 totalBytesToCompare--;
2142 byteOffset = 0xFFFFFFFF;
2148 outByteOffsetFirst = outByteOffsetLast =
GetByteCount ();
2161 outByteOffsetFirst = 0;
2164 if (*pByte1 != *pByte2)
2168 outByteOffsetFirst++;
2170 if (outByteOffsetFirst == 0)
2175 if (*pByte1 == *pByte2)
2179 outByteOffsetFirst++;
2182 outByteOffsetFirst--;
2192 while (--outByteOffsetLast)
2194 if (*pByte1 != *pByte2)
2202 while (outByteOffsetLast)
2204 if (*pByte1 == *pByte2)
2208 outByteOffsetLast--;
2211 outByteOffsetLast++;
2212 if (outByteOffsetLast <= outByteOffsetFirst)
2213 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" <= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2214 const ULWord tmp (outByteOffsetLast);
2215 outByteOffsetLast = outByteOffsetFirst;
2216 outByteOffsetFirst = tmp;
2217 if (outByteOffsetLast >= outByteOffsetFirst)
2218 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" >= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2234 const bool result (inNewSize && (!(inNewSize & (inNewSize - 1))));
2242 #if defined(MSWindows) || defined(AJABareMetal) 2243 return AJA_PAGE_SIZE;
2245 return size_t(::getpagesize());
2253 acRequestedFrame (0),
2254 acAudioClockTimeStamp (0),
2255 acAudioExpectedAddress (0),
2256 acAudioInStartAddress (0),
2257 acAudioInStopAddress (0),
2258 acAudioOutStopAddress (0),
2259 acAudioOutStartAddress (0),
2260 acTotalBytesTransferred (0),
2265 acCurrentFrameTime (0),
2266 acAudioClockCurrentTime (0),
2267 acCurrentAudioExpectedAddress (0),
2268 acCurrentAudioStartAddress (0),
2269 acCurrentFieldCount (0),
2270 acCurrentLineCount (0),
2272 acCurrentUserCookie (0),
2281 : acHeader (inObj.acHeader),
2282 acFrameTime (inObj.acFrameTime),
2283 acRequestedFrame (inObj.acRequestedFrame),
2284 acAudioClockTimeStamp (inObj.acAudioClockTimeStamp),
2285 acAudioExpectedAddress (inObj.acAudioExpectedAddress),
2286 acAudioInStartAddress (inObj.acAudioInStartAddress),
2287 acAudioInStopAddress (inObj.acAudioInStopAddress),
2288 acAudioOutStopAddress (inObj.acAudioOutStopAddress),
2289 acAudioOutStartAddress (inObj.acAudioOutStartAddress),
2290 acTotalBytesTransferred (inObj.acTotalBytesTransferred),
2291 acStartSample (inObj.acStartSample),
2292 acCurrentTime (inObj.acCurrentTime),
2293 acCurrentFrame (inObj.acCurrentFrame),
2294 acCurrentFrameTime (inObj.acCurrentFrameTime),
2295 acAudioClockCurrentTime (inObj.acAudioClockCurrentTime),
2296 acCurrentAudioExpectedAddress (inObj.acCurrentAudioExpectedAddress),
2297 acCurrentAudioStartAddress (inObj.acCurrentAudioStartAddress),
2298 acCurrentFieldCount (inObj.acCurrentFieldCount),
2299 acCurrentLineCount (inObj.acCurrentLineCount),
2300 acCurrentReps (inObj.acCurrentReps),
2301 acCurrentUserCookie (inObj.acCurrentUserCookie),
2302 acFrame (inObj.acFrame),
2303 acRP188 (inObj.acRP188),
2304 acTrailer (inObj.acTrailer)
2327 for (
ULWord ndx (0); ndx < numRP188s; ndx++)
2328 outValues << pArray [ndx];
2347 outTimeCode = pArray [inTCIndex];
2355 outTimeCodes.clear();
2371 outTimeCodes[tcIndex] = tc;
2372 else if (tc.IsValid())
2373 outTimeCodes[tcIndex] = tc;
2383 (
void)inSDIInputIndex0;
2391 if (!pArray || !numRP188s)
2396 if (
ULWord(inTCNdx) >= numRP188s)
2399 pArray[inTCNdx] = inTimecode;
2547 if (mInStatistics.
IsNULL())
2562 if (numElements != 8)
2564 if (inSDIInputIndex0 >= numElements)
2566 outStatus = pArray[inSDIInputIndex0];
2578 if (numElements != 8)
2580 if (inSDIInputIndex0 >= numElements)
2582 return pArray[inSDIInputIndex0];
2588 inOutStream << mHeader <<
", " << mInStatistics <<
", " << mTrailer;
return inOutStream;
2595 acTransferFrame (0),
2597 acFramesProcessed (0),
2598 acFramesDropped (0),
2600 acAudioTransferSize (0),
2601 acAudioStartSample (0),
2602 acAncTransferSize (0),
2603 acAncField2TransferSize (0)
2612 acCrosspoint (inCrosspoint),
2617 acRDTSCStartTime (0),
2618 acAudioClockStartTime (0),
2619 acRDTSCCurrentTime (0),
2620 acAudioClockCurrentTime (0),
2621 acFramesProcessed (0),
2622 acFramesDropped (0),
2729 if (inIndexNum == 0)
2746 case 13: oss << (
WithRP188() ?
"Yes" :
"No");
break;
2747 case 14: oss << (
WithLTC() ?
"Yes" :
"No");
break;
2751 case 18: oss << (
WithVidProc() ?
"Yes" :
"No");
break;
2754 case 21: oss << (
IsFieldMode() ?
"Yes" :
"No");
break;
2757 else if (inIndexNum < 22)
2767 << (inObj.
IsInput() ?
"Input " : (inObj.
IsOutput() ?
"Output" :
"*BAD* "))
2776 << setw(10) << (inObj.
WithRP188() ?
"+RP188" :
"-RP188")
2777 << setw(10) << (inObj.
WithLTC() ?
"+LTC" :
"-LTC")
2778 << setw(10) << (inObj.
WithFBFChange() ?
"+FBFchg" :
"-FBFchg")
2779 << setw(10) << (inObj.
WithFBOChange() ?
"+FBOchg" :
"-FBOchg")
2781 << setw(10) << (inObj.
WithVidProc() ?
"+VidProc" :
"-VidProc")
2782 << setw(10) << (inObj.
WithCustomAnc() ?
"+AncData" :
"-AncData")
2784 << setw(10) << (inObj.
IsFieldMode() ?
"+FldMode" :
"-FldMode");
2797 Set (inNumSegments, inNumActiveBytesPerRow, inHostBytesPerRow, inDeviceBytesPerRow);
2823 ccSaturationValue (0)
2860 acTransferStatus (),
2862 acInVideoDMAOffset (0),
2863 acInSegmentedDMAInfo (),
2864 acColorCorrection (),
2869 acPeerToPeerFlags (0),
2870 acFrameRepeatCount (1),
2871 acDesiredFrame (-1),
2883 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2885 acVideoBuffer (pInVideoBuffer, inVideoByteCount),
2886 acAudioBuffer (pInAudioBuffer, inAudioByteCount),
2887 acANCBuffer (pInANCBuffer, inANCByteCount),
2888 acANCField2Buffer (pInANCF2Buffer, inANCF2ByteCount),
2890 acTransferStatus (),
2892 acInVideoDMAOffset (0),
2893 acInSegmentedDMAInfo (),
2894 acColorCorrection (),
2899 acPeerToPeerFlags (0),
2900 acFrameRepeatCount (1),
2901 acDesiredFrame (-1),
2917 ULWord * pInAudioBuffer,
const ULWord inAudioByteCount,
2919 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2924 &&
SetAncBuffers (pInANCBuffer, inANCByteCount, pInANCF2Buffer, inANCF2ByteCount);
2965 for (
UWord ndx (0); ndx <
UWord(maxNumValues); ndx++)
2967 const NTV2TCIndex tcIndex (static_cast<NTV2TCIndex>(ndx));
2987 pArray[inTCIndex] = inTimeCode;
3001 for (
ULWord tcIndex(0); tcIndex < maxNumValues; tcIndex++)
3005 pArray[tcIndex] = inTimeCode;
3028 const ULWord inHostBytesPerRow,
const ULWord inDeviceBytesPerRow)
3216 mInNumRegisters (
ULWord (inRegisterNumbers.size ())),
3217 mOutNumRegisters (0)
3226 mInNumRegisters (
ULWord (inRegReads.size ())),
3227 mOutNumRegisters (0)
3237 mInNumRegisters =
ULWord(inRegisterNumbers.size());
3238 mOutNumRegisters = 0;
3239 bool result ( mInRegisters.
Allocate(mInNumRegisters *
sizeof(
ULWord))
3246 ULWord * pRegArray(mInRegisters);
3252 pRegArray[ndx++] = *iter;
3259 if (!mInNumRegisters)
3266 const ULWord * pRegNums(mInRegisters);
3267 for (
ULWord ndx(0); ndx < mInNumRegisters; ndx++)
3268 if (outRegNums.find(pRegNums[ndx]) == outRegNums.end())
3269 outRegNums.insert(pRegNums[ndx]);
3277 outGoodRegNums.clear();
3278 if (!mOutGoodRegisters)
3280 if (!mOutNumRegisters)
3282 if (mOutNumRegisters > mInNumRegisters)
3285 const ULWord * pRegArray (mOutGoodRegisters);
3286 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3287 outGoodRegNums.insert(pRegArray[ndx]);
3294 outBadRegNums.clear();
3300 if (reqRegNums == goodRegNums)
3304 std::set_difference (reqRegNums.begin(), reqRegNums.end(),
3305 goodRegNums.begin(), goodRegNums.end(),
3306 std::inserter(outBadRegNums, outBadRegNums.begin()));
3312 if (!mOutGoodRegisters)
3314 if (!mOutNumRegisters)
3316 if (mOutNumRegisters > mInNumRegisters)
3322 const ULWord * pRegArray (mOutGoodRegisters);
3323 ULWord * pValArray (mOutValues);
3324 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3325 if (pRegArray[ndx] == inRegNum)
3327 pValArray[ndx] = inValue;
3338 if (!mOutGoodRegisters)
3340 if (!mOutNumRegisters)
3342 if (mOutNumRegisters > mInNumRegisters)
3349 const ULWord * pRegArray (mOutGoodRegisters);
3350 const ULWord * pValArray (mOutValues);
3351 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3353 outValues [pRegArray[ndx]] = pValArray[ndx];
3354 #if defined(NTV2_PRETEND_DEVICE) 3355 if (pRegArray[ndx] ==
kRegBoardID && pValArray[ndx] == NTV2_PRETEND_DEVICE_FROM)
3356 outValues [pRegArray[ndx]] = NTV2_PRETEND_DEVICE_TO;
3359 #endif // NTV2_PRETEND_DEVICE 3371 if (outValues.empty())
3376 #if defined(NTV2_PRETEND_DEVICE) 3378 regInfo.
setValue(NTV2_PRETEND_DEVICE_TO);
3381 #endif // NTV2_PRETEND_DEVICE 3382 outValues.push_back(regInfo);
3388 uint32_t missingTally(0);
3392 if (mapIter != regValMap.end())
3393 it->registerValue = mapIter->second;
3397 #
if defined(NTV2_PRETEND_DEVICE)
3398 if (it->registerNumber ==
kRegBoardID && it->registerValue == NTV2_PRETEND_DEVICE_FROM)
3399 it->registerValue = NTV2_PRETEND_DEVICE_TO;
3402 #endif // NTV2_PRETEND_DEVICE 3404 return !missingTally;
3411 inOutStream << mHeader <<
", numRegs=" << mInNumRegisters <<
", inRegs=" << mInRegisters <<
", outNumGoodRegs=" << mOutNumRegisters
3412 <<
", outGoodRegs=" << mOutGoodRegisters <<
", outValues=" << mOutValues <<
", " << mTrailer;
3419 mInNumRegisters (
ULWord(inRegWrites.size())),
3443 pBadRegIndexes[ndx] = 0;
3445 pRegInfoArray[ndx++] = *it;
3456 outFailedRegWrites.clear();
3462 outRegWrites.clear();
3471 outRegWrites.push_back(pRegInfos[ndx]);
3484 if (pBadRegIndexes && maxNumBadRegIndexes && pRegInfoArray && maxNumRegInfos &&
mOutNumFailures)
3487 for (
UWord num(0); num < maxNumBadRegIndexes; num++)
3489 const UWord badRegIndex (pBadRegIndexes[num]);
3490 if (badRegIndex < maxNumRegInfos)
3492 const NTV2RegInfo & badRegInfo (pRegInfoArray[badRegIndex]);
3493 oss <<
"Failure " << num <<
": " << badRegInfo << endl;
3503 typedef std::pair <ULWord, ULWord> ULWordPair;
3504 typedef std::pair <ULWordPair, ULWordPair> ULWordPairs;
3527 const bool badName (regName.find(
' ') != string::npos);
3530 oss << sCard <<
".WriteRegister (";
3568 << name <<
" Number: " <<
regNum() << endl
3580 ULWord received(0), rcvdRegNum(0), rcvdRegVal(0);
3581 static const string sNumber (
" Number: "), sValue (
" Value: "), sHexPrefix(
" : 0x");
3582 for (
size_t ndx(0); ndx < inLogLines.size(); ndx++)
3584 string line (inLogLines.at(ndx));
3585 size_t posNumber (line.find(sNumber));
3586 if (posNumber != string::npos)
3588 if (received & 0x0001)
3590 line.erase(0, posNumber + sNumber.length());
3594 received |= 0x00000001;
3597 size_t posValue(inLogLines.at(ndx).find(sValue));
3598 if (posValue != string::npos)
3600 if (received & 0x0002)
3602 posValue += sValue.length();
3603 line.erase(0, posValue + sValue.length());
3606 size_t numHexDigits(0);
3607 for (
size_t ndx(0); ndx < line.size(); ndx++)
3610 if (numHexDigits != line.length())
3613 istringstream iss(line);
3614 iss >> std::hex >> rcvdRegVal;
3621 return received == 3;
3627 for (NTV2ULWordVector::const_iterator it(inObj.begin()); it != inObj.end(); ++it)
3628 inOutStream <<
" " <<
HEX0N(*it,8);
3635 inOutStream << (inCompact ?
"Ch[" :
"[");
3639 inOutStream <<
DEC(*it+1);
3642 if (++it != inObj.end())
3643 inOutStream << (inCompact ?
"|" :
",");
3645 return inOutStream <<
"]";
3649 { ostringstream oss;
3656 inOutStream << (inCompact ?
"Ch{" :
"{");
3660 inOutStream <<
DEC(*it+1);
3663 if (++it != inObj.end())
3664 inOutStream << (inCompact ?
"|" :
",");
3666 return inOutStream <<
"}";
3670 { ostringstream oss;
3697 result.push_back(ch);
3705 result.push_back(*it);
3711 inOutStream << (inCompact ?
"AudSys{" :
"{");
3715 inOutStream <<
DEC(*it+1);
3718 if (++it != inObj.end())
3719 inOutStream << (inCompact ?
"|" :
",");
3721 return inOutStream <<
"}";
3725 { ostringstream oss;
3735 result.insert(audSys);
3743 if (result.find(it->registerNumber) == result.end())
3744 result.insert(it->registerNumber);
3751 if (iter->registerNumber == inRegNum)
3753 return inRegInfos.end();
3759 return inObj.
Print(inOutStream);
3765 inOutStream << inObj.size () <<
" regs:" << endl;
3767 inOutStream << *iter << endl;
3774 mIsWriting (inDoWrite),
3780 *pRegInfo = inBankSelect;
3783 *pRegInfo = inOutRegInfo;
3796 if (
ULWord(inIndex0) < maxNum)
3797 result = pRegInfos[inIndex0];
3809 if (
mInBankInfos) oss << *pBankRegInfo;
else oss <<
"-";
3810 oss <<
" regInfos=";
3811 if (
mInRegInfos) oss << *pRegInfo;
else oss <<
"-";
3819 mIsWriting (inDoWrite),
3820 mVirtualData (inVirtualData, inVirtualDataSize)
3838 #define AsU8Ref(_x_) reinterpret_cast<uint8_t&>(_x_) 3839 #define AsU16Ref(_x_) reinterpret_cast<uint16_t&>(_x_) 3840 #define AsU32Ref(_x_) reinterpret_cast<uint32_t&>(_x_) 3841 #define AsU64Ref(_x_) reinterpret_cast<uint64_t&>(_x_) 3847 PUSHU32(fHeaderVersion, outBlob);
3849 PUSHU32(fSizeInBytes, outBlob);
3850 PUSHU32(fPointerSize, outBlob);
3852 PUSHU32(fResultStatus, outBlob);
3858 POPU32(fHeaderTag, inBlob, inOutIndex);
3859 POPU32(fType, inBlob, inOutIndex);
3860 POPU32(fHeaderVersion, inBlob, inOutIndex);
3861 POPU32(fVersion, inBlob, inOutIndex);
3863 POPU32(v32, inBlob, inOutIndex);
3864 POPU32(fPointerSize, inBlob, inOutIndex);
3865 POPU32(fOperation, inBlob, inOutIndex);
3866 POPU32(fResultStatus, inBlob, inOutIndex);
3872 PUSHU32(fTrailerVersion, outBlob);
3873 PUSHU32(fTrailerTag, outBlob);
3879 POPU32(fTrailerVersion, inBlob, inOutIndex);
3880 POPU32(fTrailerTag, inBlob, inOutIndex);
3889 if (!IsNULL() && fillBuffer)
3896 ULWord byteCount(0), flags(0);
3897 POPU32(byteCount, inBlob, inOutIndex);
3898 POPU32(flags, inBlob, inOutIndex);
3903 if ((inOutIndex + byteCount) > inBlob.size())
3905 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
3906 inOutIndex += byteCount;
3914 ULWord byteCount(0), flags(0);
3915 POPU32(byteCount, inBlob, inOutIndex);
3916 POPU32(flags, inBlob, inOutIndex);
3917 if ((inOutIndex + byteCount) > inBlob.size())
3920 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
3921 inOutIndex += byteCount;
3927 const size_t totBytes (mHeader.GetSizeInBytes()
3928 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
3929 if (outBlob.capacity() < totBytes)
3930 outBlob.reserve(totBytes);
3933 mInRegisters.ByteSwap32();
3935 bool ok = mHeader.RPCEncode(outBlob);
3936 PUSHU32(mInNumRegisters, outBlob);
3937 ok &= mInRegisters.RPCEncode(outBlob,
true);
3938 PUSHU32(mOutNumRegisters, outBlob);
3939 ok &= mOutGoodRegisters.RPCEncode(outBlob,
false)
3940 && mOutValues.RPCEncode(outBlob,
false)
3941 && mTrailer.RPCEncode(outBlob);
3944 mInRegisters.ByteSwap32();
3951 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
3952 if (!ok)
return false;
3953 POPU32(mInNumRegisters, inBlob, inOutIndex);
3954 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
true);
3955 POPU32(mOutNumRegisters, inBlob, inOutIndex);
3956 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
false);
3957 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
false);
3958 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
3961 mInRegisters.ByteSwap32();
3968 const size_t totBytes (mHeader.GetSizeInBytes()
3969 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
3970 if (outBlob.capacity() < totBytes)
3971 outBlob.reserve(totBytes);
3974 mOutGoodRegisters.ByteSwap32();
3975 mOutValues.ByteSwap32();
3977 bool ok = mHeader.RPCEncode(outBlob);
3978 PUSHU32(mInNumRegisters, outBlob);
3979 ok &= mInRegisters.RPCEncode(outBlob,
false);
3980 PUSHU32(mOutNumRegisters, outBlob);
3981 ok &= mOutGoodRegisters.RPCEncode(outBlob,
true)
3982 && mOutValues.RPCEncode(outBlob,
true)
3983 && mTrailer.RPCEncode(outBlob);
3986 mOutGoodRegisters.ByteSwap32();
3987 mOutValues.ByteSwap32();
3994 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
3995 if (!ok)
return false;
3996 POPU32(mInNumRegisters, inBlob, inOutIndex);
3997 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
false);
3998 POPU32(mOutNumRegisters, inBlob, inOutIndex);
3999 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
true);
4000 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
true);
4001 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4004 mOutGoodRegisters.ByteSwap32();
4005 mOutValues.ByteSwap32();
4012 const size_t totBytes (mHeader.GetSizeInBytes()
4013 + mInRegInfos.GetByteCount() + mOutBadRegIndexes.GetByteCount());
4014 if (outBlob.capacity() < totBytes)
4015 outBlob.reserve(totBytes);
4018 mInRegInfos.ByteSwap32();
4019 mOutBadRegIndexes.ByteSwap32();
4021 bool ok = mHeader.RPCEncode(outBlob);
4022 PUSHU32(mInNumRegisters, outBlob);
4023 ok &= mInRegInfos.RPCEncode(outBlob);
4024 PUSHU32(mOutNumFailures, outBlob);
4025 ok &= mOutBadRegIndexes.RPCEncode(outBlob)
4026 && mTrailer.RPCEncode(outBlob);
4029 mInRegInfos.ByteSwap32();
4030 mOutBadRegIndexes.ByteSwap16();
4037 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4038 POPU32(mInNumRegisters, inBlob, inOutIndex);
4039 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
4040 POPU32(mOutNumFailures, inBlob, inOutIndex);
4041 ok &= mOutBadRegIndexes.RPCDecode(inBlob, inOutIndex);
4042 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4045 mInRegInfos.ByteSwap32();
4046 mOutBadRegIndexes.ByteSwap16();
4053 const size_t totBytes (mHeader.GetSizeInBytes()
4054 + mInBankInfos.GetByteCount() + mInRegInfos.GetByteCount());
4055 if (outBlob.capacity() < totBytes)
4056 outBlob.reserve(totBytes);
4059 mInBankInfos.ByteSwap32();
4060 mInRegInfos.ByteSwap32();
4062 bool ok = mHeader.RPCEncode(outBlob);
4064 ok &= mInBankInfos.RPCEncode(outBlob);
4065 ok &= mInRegInfos.RPCEncode(outBlob)
4066 && mTrailer.RPCEncode(outBlob);
4069 mInBankInfos.ByteSwap32();
4070 mInRegInfos.ByteSwap32();
4077 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4078 POPU32(mIsWriting, inBlob, inOutIndex);
4079 ok &= mInBankInfos.RPCDecode(inBlob, inOutIndex);
4080 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
4081 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4084 mInBankInfos.ByteSwap32();
4085 mInRegInfos.ByteSwap32();
4092 const size_t totBytes (acHeader.GetSizeInBytes());
4093 if (outBlob.capacity() < totBytes)
4094 outBlob.reserve(totBytes);
4095 bool ok = acHeader.RPCEncode(outBlob);
4101 PUSHU64(acRDTSCStartTime, outBlob);
4102 PUSHU64(acAudioClockStartTime, outBlob);
4103 PUSHU64(acRDTSCCurrentTime, outBlob);
4104 PUSHU64(acAudioClockCurrentTime, outBlob);
4105 PUSHU32(acFramesProcessed, outBlob);
4106 PUSHU32(acFramesDropped, outBlob);
4107 PUSHU32(acBufferLevel, outBlob);
4108 PUSHU32(acOptionFlags, outBlob);
4110 ok &= acTrailer.RPCEncode(outBlob);
4115 { uint16_t v16(0); uint32_t v32(0);
4116 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4117 POPU16(v16, inBlob, inOutIndex);
4119 POPU16(v16, inBlob, inOutIndex);
4121 POPU32(v32, inBlob, inOutIndex);
4122 acStartFrame =
LWord(v32);
4123 POPU32(v32, inBlob, inOutIndex);
4124 acEndFrame =
LWord(v32);
4125 POPU32(v32, inBlob, inOutIndex);
4126 acActiveFrame =
LWord(v32);
4127 POPU64(acRDTSCStartTime, inBlob, inOutIndex);
4128 POPU64(acAudioClockStartTime, inBlob, inOutIndex);
4129 POPU64(acRDTSCCurrentTime, inBlob, inOutIndex);
4130 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4131 POPU32(acFramesProcessed, inBlob, inOutIndex);
4132 POPU32(acFramesDropped, inBlob, inOutIndex);
4133 POPU32(acBufferLevel, inBlob, inOutIndex);
4134 POPU32(acOptionFlags, inBlob, inOutIndex);
4135 POPU16(v16, inBlob, inOutIndex);
4137 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4143 const size_t totBytes (acHeader.GetSizeInBytes());
4144 if (outBlob.capacity() < totBytes)
4145 outBlob.reserve(totBytes);
4146 bool ok = acHeader.RPCEncode(outBlob);
4148 PUSHU32(acRequestedFrame, outBlob);
4149 PUSHU64(acAudioClockTimeStamp, outBlob);
4150 PUSHU32(acAudioExpectedAddress, outBlob);
4151 PUSHU32(acAudioInStartAddress, outBlob);
4152 PUSHU32(acAudioInStopAddress, outBlob);
4153 PUSHU32(acAudioOutStopAddress, outBlob);
4154 PUSHU32(acAudioOutStartAddress, outBlob);
4155 PUSHU32(acTotalBytesTransferred, outBlob);
4156 PUSHU32(acStartSample, outBlob);
4158 ok &= acTimeCodes.RPCEncode(outBlob);
4160 PUSHU32(acCurrentFrame, outBlob);
4162 PUSHU64(acAudioClockCurrentTime, outBlob);
4163 PUSHU32(acCurrentAudioExpectedAddress, outBlob);
4164 PUSHU32(acCurrentAudioStartAddress, outBlob);
4165 PUSHU32(acCurrentFieldCount, outBlob);
4166 PUSHU32(acCurrentLineCount, outBlob);
4167 PUSHU32(acCurrentReps, outBlob);
4168 PUSHU64(acCurrentUserCookie, outBlob);
4170 PUSHU32(acRP188.fDBB, outBlob);
4171 PUSHU32(acRP188.fLo, outBlob);
4172 PUSHU32(acRP188.fHi, outBlob);
4173 ok &= acTrailer.RPCEncode(outBlob);
4179 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4180 POPU64(v64, inBlob, inOutIndex);
4182 POPU32(acRequestedFrame, inBlob, inOutIndex);
4183 POPU64(acAudioClockTimeStamp, inBlob, inOutIndex);
4184 POPU32(acAudioExpectedAddress, inBlob, inOutIndex);
4185 POPU32(acAudioInStartAddress, inBlob, inOutIndex);
4186 POPU32(acAudioInStopAddress, inBlob, inOutIndex);
4187 POPU32(acAudioOutStopAddress, inBlob, inOutIndex);
4188 POPU32(acAudioOutStartAddress, inBlob, inOutIndex);
4189 POPU32(acTotalBytesTransferred, inBlob, inOutIndex);
4190 POPU32(acStartSample, inBlob, inOutIndex);
4192 ok &= acTimeCodes.RPCDecode(inBlob, inOutIndex);
4193 POPU64(v64, inBlob, inOutIndex);
4195 POPU32(acCurrentFrame, inBlob, inOutIndex);
4196 POPU64(v64, inBlob, inOutIndex);
4197 acCurrentFrameTime =
LWord64(v64);
4198 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4199 POPU32(acCurrentAudioExpectedAddress, inBlob, inOutIndex);
4200 POPU32(acCurrentAudioStartAddress, inBlob, inOutIndex);
4201 POPU32(acCurrentFieldCount, inBlob, inOutIndex);
4202 POPU32(acCurrentLineCount, inBlob, inOutIndex);
4203 POPU32(acCurrentReps, inBlob, inOutIndex);
4204 POPU64(acCurrentUserCookie, inBlob, inOutIndex);
4205 POPU32(acFrame, inBlob, inOutIndex);
4206 POPU32(acRP188.fDBB, inBlob, inOutIndex);
4207 POPU32(acRP188.fLo, inBlob, inOutIndex);
4208 POPU32(acRP188.fHi, inBlob, inOutIndex);
4209 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4215 const size_t totBytes (acHeader.GetSizeInBytes());
4216 if (outBlob.capacity() < totBytes)
4217 outBlob.reserve(totBytes);
4218 bool ok = acHeader.RPCEncode(outBlob);
4221 PUSHU32(acBufferLevel, outBlob);
4222 PUSHU32(acFramesProcessed, outBlob);
4223 PUSHU32(acFramesDropped, outBlob);
4224 ok &= acFrameStamp.RPCEncode(outBlob);
4225 PUSHU32(acAudioTransferSize, outBlob);
4226 PUSHU32(acAudioStartSample, outBlob);
4227 PUSHU32(acAncTransferSize, outBlob);
4228 PUSHU32(acAncField2TransferSize, outBlob);
4229 ok &= acTrailer.RPCEncode(outBlob);
4234 { uint16_t v16(0); uint32_t v32(0);
4235 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4236 POPU16(v16, inBlob, inOutIndex);
4238 POPU32(v32, inBlob, inOutIndex);
4239 acTransferFrame =
LWord(v32);
4240 POPU32(acBufferLevel, inBlob, inOutIndex);
4241 POPU32(acFramesProcessed, inBlob, inOutIndex);
4242 POPU32(acFramesDropped, inBlob, inOutIndex);
4243 ok &= acFrameStamp.RPCDecode(inBlob, inOutIndex);
4244 POPU32(acAudioTransferSize, inBlob, inOutIndex);
4245 POPU32(acAudioStartSample, inBlob, inOutIndex);
4246 POPU32(acAncTransferSize, inBlob, inOutIndex);
4247 POPU32(acAncField2TransferSize, inBlob, inOutIndex);
4248 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4254 PUSHU32(acNumSegments, outBlob);
4255 PUSHU32(acNumActiveBytesPerRow, outBlob);
4256 PUSHU32(acSegmentHostPitch, outBlob);
4257 PUSHU32(acSegmentDevicePitch, outBlob);
4263 POPU32(acNumSegments, inBlob, inOutIndex);
4264 POPU32(acNumActiveBytesPerRow, inBlob, inOutIndex);
4265 POPU32(acSegmentHostPitch, inBlob, inOutIndex);
4266 POPU32(acSegmentDevicePitch, inBlob, inOutIndex);
4273 PUSHU32(ccSaturationValue, outBlob);
4274 return ccLookupTables.RPCEncode(outBlob);
4279 POPU16(u16, inBlob, inOutIndex);
4281 POPU32(ccSaturationValue, inBlob, inOutIndex);
4282 return ccLookupTables.RPCDecode(inBlob, inOutIndex);
4288 PUSHU16(foregroundVideoCrosspoint, outBlob);
4289 PUSHU16(backgroundVideoCrosspoint, outBlob);
4290 PUSHU16(foregroundKeyCrosspoint, outBlob);
4291 PUSHU16(backgroundKeyCrosspoint, outBlob);
4298 { uint16_t v16(0); uint32_t v32(0);
4299 POPU16(v16, inBlob, inOutIndex);
4301 POPU16(v16, inBlob, inOutIndex);
4303 POPU16(v16, inBlob, inOutIndex);
4305 POPU16(v16, inBlob, inOutIndex);
4307 POPU16(v16, inBlob, inOutIndex);
4309 POPU32(v32, inBlob, inOutIndex);
4310 transitionCoefficient =
Fixed_(v32);
4311 POPU32(v32, inBlob, inOutIndex);
4312 transitionSoftness =
Fixed_(v32);
4326 POPU32(fDBB, inBlob, inOutIndex);
4327 POPU32(fLo, inBlob, inOutIndex);
4328 POPU32(fHi, inBlob, inOutIndex);
4335 const size_t totBytes (acHeader.GetSizeInBytes() + acVideoBuffer.GetByteCount() + acAudioBuffer.GetByteCount()
4336 + acANCBuffer.GetByteCount() + acANCField2Buffer.GetByteCount() + acOutputTimeCodes.GetByteCount()
4337 + acHDMIAuxData.GetByteCount() + 64);
4338 if (outBlob.capacity() < totBytes)
4339 outBlob.reserve(totBytes);
4340 bool ok = acHeader.RPCEncode(outBlob);
4341 ok &= acVideoBuffer.RPCEncode(outBlob);
4342 ok &= acAudioBuffer.RPCEncode(outBlob);
4343 ok &= acANCBuffer.RPCEncode(outBlob);
4344 ok &= acANCField2Buffer.RPCEncode(outBlob);
4345 ok &= acOutputTimeCodes.RPCEncode(outBlob);
4346 ok &= acTransferStatus.RPCEncode(outBlob);
4347 PUSHU64(acInUserCookie, outBlob);
4348 PUSHU32(acInVideoDMAOffset, outBlob);
4349 ok &= acInSegmentedDMAInfo.RPCEncode(outBlob);
4350 ok &= acColorCorrection.RPCEncode(outBlob);
4351 PUSHU16(acFrameBufferFormat, outBlob);
4352 PUSHU16(acFrameBufferOrientation, outBlob);
4353 ok &= acVidProcInfo.RPCEncode(outBlob);
4354 PUSHU16(acVideoQuarterSizeExpand, outBlob);
4355 ok &= acHDMIAuxData.RPCEncode(outBlob);
4356 PUSHU32(acPeerToPeerFlags, outBlob);
4357 PUSHU32(acFrameRepeatCount, outBlob);
4359 ok &= acRP188.RPCEncode(outBlob);
4360 PUSHU16(acCrosspoint, outBlob);
4361 ok &= acTrailer.RPCEncode(outBlob);
4367 { uint16_t v16(0); uint32_t v32(0);
4369 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4370 ok &= acVideoBuffer.RPCDecode(inBlob, inOutIndex);
4371 ok &= acAudioBuffer.RPCDecode(inBlob, inOutIndex);
4372 ok &= acANCBuffer.RPCDecode(inBlob, inOutIndex);
4373 ok &= acANCField2Buffer.RPCDecode(inBlob, inOutIndex);
4374 ok &= acOutputTimeCodes.RPCDecode(inBlob, inOutIndex);
4375 ok &= acTransferStatus.RPCDecode(inBlob, inOutIndex);
4376 POPU64(acInUserCookie, inBlob, inOutIndex);
4377 POPU32(acInVideoDMAOffset, inBlob, inOutIndex);
4378 ok &= acInSegmentedDMAInfo.RPCDecode(inBlob, inOutIndex);
4379 ok &= acColorCorrection.RPCDecode(inBlob, inOutIndex);
4380 POPU16(v16, inBlob, inOutIndex);
4382 POPU16(v16, inBlob, inOutIndex);
4384 ok &= acVidProcInfo.RPCDecode(inBlob, inOutIndex);
4385 POPU16(v16, inBlob, inOutIndex);
4387 ok &= acHDMIAuxData.RPCDecode(inBlob, inOutIndex);
4388 POPU32(acPeerToPeerFlags, inBlob, inOutIndex);
4389 POPU32(acFrameRepeatCount, inBlob, inOutIndex);
4390 POPU32(v32, inBlob, inOutIndex);
4391 acDesiredFrame =
LWord(v32);
4392 ok &= acRP188.RPCDecode(inBlob, inOutIndex);
4393 POPU16(v16, inBlob, inOutIndex);
4395 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4405 PUSHU32(videoBufferSize, outBlob);
4406 if (videoBuffer && videoBufferSize)
4407 { buff.
Set(videoBuffer, videoBufferSize);
4410 PUSHU32(videoDmaOffset, outBlob);
4412 PUSHU32(audioBufferSize, outBlob);
4413 if (audioBuffer && audioBufferSize)
4414 { buff.
Set(audioBuffer, audioBufferSize);
4417 PUSHU32(audioStartSample, outBlob);
4418 PUSHU32(audioNumChannels, outBlob);
4419 PUSHU32(frameRepeatCount, outBlob);
4420 rp188.RPCEncode(outBlob);
4423 PUSHU32(transferFlags, outBlob);
4424 PUSHU8(bDisableExtraAudioInfo, outBlob);
4428 vidProcInfo.RPCEncode(outBlob);
4429 PUSHU32(customAncInfo.Group1, outBlob);
4430 PUSHU32(customAncInfo.Group2, outBlob);
4431 PUSHU32(customAncInfo.Group3, outBlob);
4432 PUSHU32(customAncInfo.Group4, outBlob);
4433 PUSHU32(videoNumSegments, outBlob);
4434 PUSHU32(videoSegmentHostPitch, outBlob);
4435 PUSHU32(videoSegmentCardPitch, outBlob);
4442 POPU16(v16, inBlob, inOutIndex);
4446 POPU32(videoBufferSize, inBlob, inOutIndex);
4447 if (videoBufferSize && !videoBuffer)
4452 if ((inOutIndex + videoBufferSize) >= inBlob.size())
4454 UByte* pBuffer =
reinterpret_cast<UByte*
>(videoBuffer);
4455 for (
ULWord cnt(0); cnt < videoBufferSize; cnt++)
4456 pBuffer[cnt] = inBlob.at(inOutIndex++);
4458 POPU32(videoDmaOffset, inBlob, inOutIndex);
4461 POPU32(audioBufferSize, inBlob, inOutIndex);
4462 if (audioBufferSize && !audioBuffer)
4467 if ((inOutIndex + audioBufferSize) >= inBlob.size())
4469 UByte* pBuffer =
reinterpret_cast<UByte*
>(audioBuffer);
4470 for (
ULWord cnt(0); cnt < audioBufferSize; cnt++)
4471 pBuffer[cnt] = inBlob.at(inOutIndex++);
4473 POPU32(audioStartSample, inBlob, inOutIndex);
4474 POPU32(audioNumChannels, inBlob, inOutIndex);
4475 POPU32(frameRepeatCount, inBlob, inOutIndex);
4476 rp188.RPCDecode(inBlob, inOutIndex);
4477 POPU32(v32, inBlob, inOutIndex);
4478 desiredFrame =
LWord(v32);
4479 POPU32(hUser, inBlob, inOutIndex);
4480 POPU32(transferFlags, inBlob, inOutIndex);
4481 POPU8(
AsU8Ref(bDisableExtraAudioInfo), inBlob, inOutIndex);
4482 POPU16(v16, inBlob, inOutIndex);
4484 POPU16(v16, inBlob, inOutIndex);
4487 vidProcInfo.RPCDecode(inBlob, inOutIndex);
4488 POPU32(customAncInfo.Group1, inBlob, inOutIndex);
4489 POPU32(customAncInfo.Group2, inBlob, inOutIndex);
4490 POPU32(customAncInfo.Group3, inBlob, inOutIndex);
4491 POPU32(customAncInfo.Group4, inBlob, inOutIndex);
4492 POPU32(videoNumSegments, inBlob, inOutIndex);
4493 POPU32(videoSegmentHostPitch, inBlob, inOutIndex);
4494 POPU32(videoSegmentCardPitch, inBlob, inOutIndex);
4495 POPU16(v16, inBlob, inOutIndex);
4502 const size_t totBytes (mHeader.GetSizeInBytes());
4503 if (outBlob.capacity() < totBytes)
4504 outBlob.reserve(totBytes);
4505 bool ok = mHeader.RPCEncode(outBlob);
4506 ok &= mBuffer.RPCEncode(outBlob);
4509 for (
size_t ndx(0); ndx < 16; ndx++)
4510 PUSHU32(mRegisters[ndx], outBlob);
4511 for (
size_t ndx(0); ndx < 32; ndx++)
4512 PUSHU32(mReserved[ndx], outBlob);
4513 ok &= mTrailer.RPCEncode(outBlob);
4519 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4520 ok &= mBuffer.RPCDecode(inBlob, inOutIndex);
4521 POPU32(mFlags, inBlob, inOutIndex);
4522 POPU32(mStatus, inBlob, inOutIndex);
4523 for (
size_t ndx(0); ndx < 16; ndx++)
4524 POPU32(mRegisters[ndx], inBlob, inOutIndex);
4525 for (
size_t ndx(0); ndx < 16; ndx++)
4526 POPU32(mReserved[ndx], inBlob, inOutIndex);
4527 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4538 PUSHU64(rdtscStartTime, outBlob);
4539 PUSHU64(audioClockStartTime, outBlob);
4540 PUSHU64(rdtscCurrentTime, outBlob);
4541 PUSHU64(audioClockCurrentTime, outBlob);
4542 PUSHU32(framesProcessed, outBlob);
4543 PUSHU32(framesDropped, outBlob);
4544 PUSHU32(bufferLevel, outBlob);
4545 PUSHU8(bWithAudio, outBlob);
4546 PUSHU8(bWithRP188, outBlob);
4547 PUSHU8(bFbfChange, outBlob);
4548 PUSHU8(bFboChange, outBlob);
4549 PUSHU8(bWithColorCorrection, outBlob);
4550 PUSHU8(bWithVidProc, outBlob);
4551 PUSHU8(bWithCustomAncData, outBlob);
4556 { uint16_t v16(0); uint32_t v32(0);
4557 POPU16(v16, inBlob, inOutIndex);
4559 POPU16(v16, inBlob, inOutIndex);
4561 POPU32(v32, inBlob, inOutIndex);
4562 startFrame =
LWord(v32);
4563 POPU32(v32, inBlob, inOutIndex);
4564 endFrame =
LWord(v32);
4565 POPU32(v32, inBlob, inOutIndex);
4566 activeFrame =
LWord(v32);
4567 POPU64(rdtscStartTime, inBlob, inOutIndex);
4568 POPU64(audioClockStartTime, inBlob, inOutIndex);
4569 POPU64(rdtscCurrentTime, inBlob, inOutIndex);
4570 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4571 POPU32(framesProcessed, inBlob, inOutIndex);
4572 POPU32(framesDropped, inBlob, inOutIndex);
4573 POPU32(bufferLevel, inBlob, inOutIndex);
4578 POPU8(
AsU8Ref(bWithColorCorrection), inBlob, inOutIndex);
4580 POPU8(
AsU8Ref(bWithCustomAncData), inBlob, inOutIndex);
4594 POPU32(DBB, inBlob, inOutIndex);
4595 POPU32(Low, inBlob, inOutIndex);
4596 POPU32(High, inBlob, inOutIndex);
4603 PUSHU32(taskVersion, outBlob);
4608 if (taskArray && numTasks)
4609 for (
ULWord num(0); num < numTasks; num++)
4613 const ULWord * pULWords =
reinterpret_cast<const ULWord*
>(&task.
u);
4619 for (
ULWord word(0); word < numWords; word++)
4620 PUSHU32(pULWords[word], outBlob);
4627 POPU32(taskVersion, inBlob, inOutIndex);
4628 POPU32(taskSize, inBlob, inOutIndex);
4629 POPU32(numTasks, inBlob, inOutIndex);
4630 POPU32(maxTasks, inBlob, inOutIndex);
4631 POPU64(u64, inBlob, inOutIndex);
4633 if (taskArray && numTasks)
4634 for (
ULWord num(0); num < numTasks; num++)
4637 POPU32(u32, inBlob, inOutIndex);
4645 for (
ULWord word(0); word < numWords; word++)
4646 POPU32(pULWords[word], inBlob, inOutIndex);
4656 PUSHU64(audioClockTimeStamp, outBlob);
4657 PUSHU32(audioExpectedAddress, outBlob);
4658 PUSHU32(audioInStartAddress, outBlob);
4659 PUSHU32(audioInStopAddress, outBlob);
4660 PUSHU32(audioOutStopAddress, outBlob);
4661 PUSHU32(audioOutStartAddress, outBlob);
4663 PUSHU32(startSample, outBlob);
4665 PUSHU32(currentFrame, outBlob);
4666 currentRP188.RPCEncode(outBlob);
4668 PUSHU64(audioClockCurrentTime, outBlob);
4669 PUSHU32(currentAudioExpectedAddress, outBlob);
4670 PUSHU32(currentAudioStartAddress, outBlob);
4671 PUSHU32(currentFieldCount, outBlob);
4672 PUSHU32(currentLineCount, outBlob);
4673 PUSHU32(currentReps, outBlob);
4674 PUSHU32(currenthUser, outBlob);
4679 { uint16_t v16(0); uint64_t v64(0);
4680 POPU16(v16, inBlob, inOutIndex);
4682 POPU64(v64, inBlob, inOutIndex);
4684 POPU32(frame, inBlob, inOutIndex);
4685 POPU64(audioClockTimeStamp, inBlob, inOutIndex);
4686 POPU32(audioExpectedAddress, inBlob, inOutIndex);
4687 POPU32(audioInStartAddress, inBlob, inOutIndex);
4688 POPU32(audioInStopAddress, inBlob, inOutIndex);
4689 POPU32(audioOutStopAddress, inBlob, inOutIndex);
4690 POPU32(audioOutStartAddress, inBlob, inOutIndex);
4691 POPU32(bytesRead, inBlob, inOutIndex);
4692 POPU32(startSample, inBlob, inOutIndex);
4693 POPU64(v64, inBlob, inOutIndex);
4695 POPU32(currentFrame, inBlob, inOutIndex);
4696 currentRP188.RPCDecode(inBlob, inOutIndex);
4697 POPU64(v64, inBlob, inOutIndex);
4698 currentFrameTime =
LWord64(v64);
4699 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4700 POPU32(currentAudioExpectedAddress, inBlob, inOutIndex);
4701 POPU32(currentAudioStartAddress, inBlob, inOutIndex);
4702 POPU32(currentFieldCount, inBlob, inOutIndex);
4703 POPU32(currentLineCount, inBlob, inOutIndex);
4704 POPU32(currentReps, inBlob, inOutIndex);
4705 POPU32(currenthUser, inBlob, inOutIndex);
4734 reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->
RPCEncode(outBlob);
4744 #if defined(AJA_LINUX) 4745 #pragma GCC diagnostic push 4746 #pragma GCC diagnostic ignored "-Wstrict-aliasing" 4748 uint16_t v16(0); uint32_t v32(0);
4749 POPU16(v16, inBlob, inOutIndex);
4751 POPU16(v16, inBlob, inOutIndex);
4753 POPU32(v32, inBlob, inOutIndex); lVal1 =
LWord(v32);
4754 POPU32(v32, inBlob, inOutIndex); lVal2 =
LWord(v32);
4755 POPU32(v32, inBlob, inOutIndex); lVal3 =
LWord(v32);
4756 POPU32(v32, inBlob, inOutIndex); lVal4 =
LWord(v32);
4757 POPU32(v32, inBlob, inOutIndex); lVal5 =
LWord(v32);
4758 POPU32(v32, inBlob, inOutIndex); lVal6 =
LWord(v32);
4771 #if defined(AJA_LINUX) 4772 #pragma GCC diagnostic pop 4777 reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->
RPCDecode(inBlob, inOutIndex);
NTV2_RP188 acRP188
Will be deprecated – use AUTOCIRCULATE_TRANSFER::SetOutputTimeCode instead.
bool AppendU8s(UByteSequence &outU8s) const
Appends my contents to an existing UByteSequence.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2Channel mChannel
Stream channel.
bool SetOutputTimeCodes(const NTV2TimeCodes &inValues)
Intended for playout, replaces the contents of my acOutputTimeCodes member.
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
NTV2SegmentedXferInfo & setSourceDirection(const bool inTopDown)
Sets the scan direction for the source.
NTV2AutoCirculateState state
ULWord acCurrentAudioStartAddress
As set by play.
static std::string FourCCToString(const ULWord in4CC)
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device...
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
bool GetBadRegisters(NTV2RegNumSet &outBadRegNums) const
Returns the set of register numbers that were not read successfully.
NTV2StandardSet::const_iterator NTV2StandardSetConstIter
A handy const iterator for iterating over an NTV2StandardSet.
#define NTV2_TYPE_AJABITSTREAM
Identifies NTV2Bitstream struct.
ULWord mFlags
Action flags.
ULWord audioInStopAddress
For record - end position (exclusive) in buffer of audio (includes base offset)
std::string NTV2FrameGeometryToString(const NTV2FrameGeometry inValue, const bool inForRetailDisplay=false)
defined(NTV2_DEPRECATE_17_6)
bool GetRequestedRegisterNumbers(NTV2RegNumSet &outRegNums) const
Answers with the set of register numbers that were requested.
std::string NTV2AudioSystemToString(const NTV2AudioSystem inValue, const bool inCompactDisplay=false)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
ULWord frame
The frame requested or -1 if not available.
#define NTV2EndianSwap64(__val__)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
std::string NTV2HDMIBitDepthToString(const NTV2HDMIBitDepth inValue, const bool inCompactDisplay=false)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
std::string operator[](const unsigned inIndexNum) const
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
#define AJA_NTV2_SDK_BUILD_NUMBER
The SDK build number, an unsigned decimal integer.
bool IsOutput(void) const
#define NTV2_HEADER_TAG
Identifies the struct header.
ULWord acCurrentFrame
Last vertical blank frame for this autocirculate channel (when CNTV2Card::AutoCirculateGetFrameStamp ...
void POPU16(uint16_t &outVal, const RPCBlob &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
bool CopyTo(FRAME_STAMP_STRUCT &outOldStruct) const
Copies my fields into the given FRAME_STAMP_STRUCT.
bool PutU16s(const UWordSequence &inU16s, const size_t inU16Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 16-bit values into me.
void PUSHU16(const uint16_t inVal, RPCBlob &inArr, const bool dontSwap=false)
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.
bool is_legal_decimal_number(const std::string &inStr, const size_t inMaxLength)
NTV2Buffer & operator=(const NTV2Buffer &inRHS)
Assigns me from another NTV2Buffer instance.
LWord64 currentTime
Current processor time ... on Windows, this is derived from KeQueryPerformanceCounter.
NTV2SetRegisters(const NTV2RegWrites &inRegWrites=NTV2RegWrites())
Constructs an NTV2SetRegisters struct from the given NTV2RegisterWrites collection.
Declares the AJAMemory class.
std::set< NTV2FrameRate > NTV2FrameRateSet
A set of distinct NTV2FrameRate values. New in SDK 17.0.
NTV2StreamBuffer()
Constructs a default NTV2StreamBuffer struct.
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
mVideoBuffer Allocate(mFormatDesc.GetTotalRasterBytes())
std::ostream & Print(std::ostream &inStrm, const bool inDumpSegments=false) const
Writes a human-readable description of me into a given output stream.
bool CopyTo(AUTOCIRCULATE_STATUS_STRUCT &outOldStruct)
Copies my data into the given AUTOCIRCULATE_STATUS_STRUCT.
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)
#define NTV2_IS_VALID_TRAILER_TAG(_x_)
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.
size_t GetByteCount(void) const
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.
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.
bool ResetUsing(const NTV2RegNumSet &inRegisterNumbers)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
void PUSHU8(const uint8_t inVal, RPCBlob &inArr)
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.
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
#define NTV2_TYPE_AJAMAILBUFFER
Identifies NTV2MailBuffer struct.
ULWord audioExpectedAddress
The address that was used to transfer.
NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex, bool fillBuffer=true)
LWord acStartFrame
First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
#define NTV2SDKVersionDecode_Minor
std::map< ULWord, ULWord > NTV2RegisterValueMap
A mapping of distinct NTV2RegisterNumbers to their corresponding ULWord values.
ULWord getDestPitch(void) const
std::string NTV2RegisterNumberToString(const NTV2RegisterNumber inValue)
ULWordSetConstIter NTV2RegNumSetConstIter
A const iterator that iterates over a set of distinct NTV2RegisterNumbers.
bool PutU64s(const ULWord64Sequence &inU64s, const size_t inU64Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 64-bit values into me.
NTV2SegmentedDMAInfo()
Constructs a disabled NTV2SegmentedDMAInfo struct.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2Buffer acVideoBuffer
The host video buffer. This field is owned by the client application, and thus is responsible for all...
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
ULWord mIsWriting
If non-zero, virtual data will be written; otherwise, virtual data will be read.
Specifies HDMI input/output kinds.
LWord64 acFrameTime
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
NTV2AudioSystemSet NTV2MakeAudioSystemSet(const NTV2AudioSystem inFirstAudioSystem, const UWord inCount)
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)
void POPU8(uint8_t &outVal, const RPCBlob &inArr, std::size_t &inOutNdx)
NTV2RegisterReadsConstIter FindFirstMatchingRegisterNumber(const uint32_t inRegNum, const NTV2RegisterReads &inRegInfos)
Returns a const iterator to the first entry in the NTV2RegInfo collection with a matching register nu...
std::string NTV2ColorCorrectionModeToString(const NTV2ColorCorrectionMode inValue, const bool inCompactDisplay=false)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelQuad values.
bool containsElementAtOffset(const ULWord inElementOffset) const
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
bool DisableSegmentedDMAs(void)
Disables segmented DMAs, performing a Reset on my acInSegmentedDMAInfo.
LWord64 acCurrentTime
The absolute timestamp at the moment the CNTV2Card::AutoCirculateTransfer or CNTV2Card::AutoCirculate...
Defines a number of handy byte-swapping macros.
bool GetGoodRegisters(NTV2RegNumSet &outGoodRegNums) const
Returns an NTV2RegNumSet built from my mOutGoodRegisters field.
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel) ...
bool SetOutputTimeCode(const NTV2_RP188 &inTimecode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1)
Intended for playout, sets one element of my acOutputTimeCodes member.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool NTV2DeviceCanDoFrameBufferFormat(const NTV2DeviceID inDeviceID, const NTV2FrameBufferFormat inFBFormat)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
NTV2FrameBufferFormatSet NTV2PixelFormats
#define NTV2_IS_VALID_TIMECODE_INDEX(__x__)
ULWord currentFrame
Last vertical blank frame for this channel's auto-circulate. (at the time of the IOCTL_NTV2_GET_FRAME...
static string print_address_offset(const size_t inRadix, const ULWord64 inOffset)
2048x1080, for 2Kx1080p, NTV2_VANCMODE_TALL
FGSizesMap::const_iterator FGSizesMapCI
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
NTV2FBOrientation acFrameBufferOrientation
Specifies the frame buffer orientation to change to. Ignored if AUTOCIRCULATE_WITH_FBOCHANGE option i...
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
bool isSourceBottomUp(void) const
ULWord acInVideoDMAOffset
Optional byte offset into the device frame buffer. Defaults to zero. If non-zero, should be a multipl...
#define NTV2_TYPE_GETREGS
Identifies NTV2GetRegisters struct.
#define NTV2_COLORCORRECTOR_TABLESIZE
ULWord mTag
Tag for virtual data. This value is used to recal saved data by tag.
LWord acActiveFrame
Current frame actually being captured/played when CNTV2Card::AutoCirculateGetStatus called...
bool GetFailedRegisterWrites(NTV2RegWrites &outFailedRegWrites) const
Returns an NTV2RegisterWrites built from my mOutBadRegInfos field.
#define NTV2_TYPE_ACSTATUS
Identifies AUTOCIRCULATE_STATUS struct.
#define AJA_NTV2_SDK_VERSION_POINT
The SDK "point" release version, an unsigned decimal integer.
NTV2HDMIRange
Indicates or specifies the HDMI RGB range.
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
bool toHexString(std::string &outStr, const size_t inLineBreakInterval=0) const
Converts my contents into a hex-encoded string.
std::string NTV2AudioFormatToString(const NTV2AudioFormat inValue, const bool inCompactDisplay=false)
Describes a segmented data transfer (copy or move) from a source memory location to a destination loc...
#define NTV2_TYPE_BANKGETSET
Identifies NTV2BankSelGetSetRegs struct.
std::vector< NTV2RegInfo > NTV2RegWrites
An ordered sequence of zero or more NTV2RegInfo structs intended for WriteRegister.
virtual char do_thousands_sep() const
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
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_)
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!
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.
void POPU64(uint64_t &outVal, const RPCBlob &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
ULWord currentReps
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
std::string AutoCircVidProcModeToString(const AutoCircVidProcMode inValue, const bool inCompactDisplay=false)
UWord NTV2DeviceGetNumHDMIVideoOutputs(const NTV2DeviceID inDeviceID)
ULWord mInNumRegisters
The number of NTV2RegInfo's to be set.
static bool IsReadOnly(const uint32_t inRegNum)
NTV2FrameRate
Identifies a particular video frame rate.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2FrameBufferFormat acFrameBufferFormat
Specifies the frame buffer format to change to. Ignored if AUTOCIRCULATE_WITH_FBFCHANGE option is not...
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_TYPE_SDISTATS
Identifies NTV2SDIStatus struct.
std::string NTV2AudioChannelQuadToString(const NTV2Audio4ChannelSelect inValue, const bool inCompactDisplay=false)
2048x1080, NTV2_VANCMODE_TALLER
NTV2Standard
Identifies a particular video standard.
#define NTV2_TYPE_VIRTUAL_DATA_RW
Identifies NTV2VirtualData struct.
NTV2ColorCorrectionData acColorCorrection
Color correction data. This field is ignored if AUTOCIRCULATE_WITH_COLORCORRECT option is not set...
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
bool IsAllocatedBySDK(void) const
ULWord acOptionFlags
AutoCirculate options used when CNTV2Card::AutoCirculateInitForInput or CNTV2Card::AutoCirculateInitF...
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
NTV2Buffer mBuffer
Virtual address of a buffer to prelock, and its length.
bool NTV2DeviceCanDoVideoFormat(const NTV2DeviceID inDeviceID, const NTV2VideoFormat inVideoFormat)
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2OutputDest values supported on the given device.
ULWord acAncTransferSize
Total ancillary data bytes for field 1 transferred (capture only).
This is used to perform virtual data reads or writes.
enum NTV2QuarterSizeExpandMode NTV2QtrSizeExpandMode
1920x1080, for 1080i and 1080p, NTV2_VANCMODE_OFF
ULWord mStatus
Action status.
bool PatchRegister(const ULWord inRegNum, const ULWord inValue)
Patches the given register value.
ULWord64 acRDTSCCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using the host OS system clock...
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
#define NTV2_TYPE_ACXFERSTATUS
Identifies AUTOCIRCULATE_TRANSFER_STATUS struct.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define AJA_NTV2_SDK_VERSION_MAJOR
The SDK major version number, an unsigned decimal integer.
bool WithHDMIAuxData(void) const
NTV2DeviceIDSet::const_iterator NTV2DeviceIDSetConstIter
A convenient const iterator for NTV2DeviceIDSet.
std::set< std::string > NTV2StringSet
#define NTV2_TYPE_AJABUFFERLOCK
Identifies NTV2BufferLock struct.
std::ostream & Print(std::ostream &inOutStream) const
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Specifies analog input/output kinds.
NTV2Buffer & Segment(NTV2Buffer &outPtr, const ULWord inByteOffset, const ULWord inByteCount) const
Resets an NTV2Buffer instance to reference a contiguous segment (portion) of my memory buffer...
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
#define NTV2SDKVersionEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
1280x720, for 720p, NTV2_VANCMODE_TALL
NTV2Channel mChannel
Stream channel.
NTV2MailBuffer()
Constructs a default NTV2MailBuffer struct.
#define NTV2_IS_VALID_IOKINDS(_k_)
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels)
Declares the CRP188 class. See SMPTE RP188 standard for details.
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
NTV2AutoCirculateState acState
Current AutoCirculate state.
BOOL_ bWithColorCorrection
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
std::string NTV2HDMIProtocolToString(const NTV2HDMIProtocol inValue, const bool inCompactDisplay=false)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::LoadBitstream. ...
Defines for the NTV2 SDK version number, used by ajantv2/includes/ntv2enums.h. See the ajantv2/includ...
ULWord64 acAudioClockCurrentTime
The absolute timestamp at the moment the CNTV2Card::AutoCirculateTransfer or CNTV2Card::AutoCirculate...
bool SetFrom(const NTV2Buffer &inBuffer)
Replaces my contents from the given memory buffer without resizing me.
ULWord fTrailerVersion
Trailer version, set when created. Before SDK 15.1: always zero; 15.1 or later: set to calling SDK ve...
bool IsStopped(void) const
NTV2RegisterNumberSet NTV2RegNumSet
A set of distinct NTV2RegisterNumbers.
This is used to atomically perform bank-selected register reads or writes.
ULWord64 acRDTSCStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using host OS system ...
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 RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecodeServer(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
All new NTV2 structs start with this common header.
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
ULWord registerShift
My register shift value to use in a ReadRegister or WriteRegister call.
ULWord acSegmentDevicePitch
Offset, in bytes, between the start of one device segment and the start of the next device segment (i...
bool operator<(const NTV2RegInfo &inRHS) const
bool SetFromHexString(const std::string &inStr)
Replaces my contents from the given hex-encoded string, resizing me if necessary. ...
std::vector< uint16_t > UWordSequence
An ordered sequence of UWord (uint16_t) values.
NTV2Buffer mInRegInfos
NTV2RegInfo array of registers be read/written. The SDK owns this memory.
std::set< NTV2FrameGeometry > NTV2GeometrySet
A set of distinct NTV2FrameGeometry values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
ULWord acAncField2TransferSize
Total ancillary data bytes for field 2 transferred (capture only).
AUTOCIRCULATE_STATUS(const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_CHANNEL1)
Constructs a default AUTOCIRCULATE_STATUS struct for the given NTV2Crosspoint.
string NTV2AudioSystemSetToStr(const NTV2AudioSystemSet &inObj, const bool inCompact)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord64 acAudioClockCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using "64-bit clean" value of the device's 4...
UWordSequence::const_iterator UWordSequenceConstIter
A handy const iterator for iterating over a UWordSequence.
std::string NTV2HDMIAudioChannelsToString(const NTV2HDMIAudioChannels inValue, const bool inCompactDisplay=false)
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
~NTV2ColorCorrectionData()
My destructor, which frees my private color correction table buffer.
NTV2HDMIProtocol
Indicates or specifies the HDMI protocol.
The AutoCirculate channel is starting, waiting for the start time specified in the call to CNTV2Card:...
bool NTV2GetUnsupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of NTV2PixelFormat values not suported by any NTV2 device.
#define NTV2_IS_VALID_STANDARD(__s__)
#define NTV2_TYPE_ACFRAMESTAMP
Identifies FRAME_STAMP struct.
ULWord acFrameRepeatCount
Intended for playout. The number of times to repeat the frame being transferred.
ULWord GetDroppedFrameCount(void) const
Declares data types and structures used in NTV2 "nub" packets.
UWord NTV2DeviceGetNumAnalogVideoOutputs(const NTV2DeviceID inDeviceID)
LWord acTransferFrame
Frame buffer number the frame was transferred to/from. (-1 if failed)
std::string getSourceCode(const bool inInclDecl=true) const
bool SwapWith(NTV2Buffer &inBuffer)
Swaps my underlying buffer with another's.
bool RPCEncodeServer(NTV2_RPC_BLOB_TYPE &inBlob)
ULWord64 audioClockCurrentTime
48kHz clock in reg 28 extended to 64 bits
ULWord acCurrentFieldCount
As found by ISR at Call Field0 or Field1 currently being OUTPUT (when CNTV2Card::AutoCirculateGetFram...
The AutoCirculate channel is stopped.
ULWord64 acAudioClockStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using "64-bit clean" ...
bool WithRP188(void) const
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
LWord acEndFrame
Last frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2DIDSet::const_iterator NTV2DIDSetConstIter
Handy const iterator to iterate over an NTV2DIDSet.
LWord GetActiveFrame(void) const
std::string NTV2AudioChannelOctetToString(const NTV2Audio8ChannelSelect inValue, const bool inCompactDisplay=false)
ostream & NTV2PrintChannelSet(const NTV2ChannelSet &inObj, const bool inCompact, ostream &inOutStream)
ULWord getDestOffset(void) const
bool NTV2DeviceGetSupportedVideoFormats(const NTV2DeviceID inDeviceID, NTV2VideoFormatSet &outFormats)
Returns a set of distinct NTV2VideoFormat values supported on the given device.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_IS_VALID_STRUCT_TYPE(_x_)
NTV2Crosspoint channelSpec
bool IsPageAligned(void) const
This is used by the CNTV2Card::ReadRegisters function.
NTV2Buffer(const void *pInUserPointer, const size_t inByteCount)
Constructs me from a client-supplied address and size.
bool RPCDecodeClient(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
1920x1080, NTV2_VANCMODE_TALLER
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
720x486, for NTSC 525i, NTV2_VANCMODE_TALL
std::string NTV2AudioChannelPairToString(const NTV2AudioChannelPair inValue, const bool inCompactDisplay=false)
ULWord64 acCurrentUserCookie
The frame's AUTOCIRCULATE_TRANSFER::acInUserCookie value that was set when CNTV2Card::AutoCirculateTr...
ULWord acCurrentLineCount
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2Crosspoint backgroundVideoCrosspoint
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define NTV2_CURRENT_HEADER_VERSION
Current version of NTV2_HEADER struct, originally 0.
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__)
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)
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)
#define NTV2_IS_VALID_HEADER_TAG(_x_)
bool RPCEncodeClient(NTV2_RPC_BLOB_TYPE &inBlob)
ostream & NTV2PrintAudioSystemSet(const NTV2AudioSystemSet &inObj, const bool inCompact, std::ostream &inOutStream)
Streams a human-readable dump of the given NTV2AudioSystemSet into the specified output stream...
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
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.
ULWord64 audioClockCurrentTime
union AutoCircGenericTask::@39 u
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.
void PUSHU32(const uint32_t inVal, RPCBlob &inArr, const bool dontSwap=false)
NTV2FrameGeometry
Identifies a particular video frame geometry.
720x576, for PAL 625i, NTV2_VANCMODE_OFF
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
User cookie at last vblank.
NTV2Buffer acANCField2Buffer
The host "Field 2" ancillary data buffer. This field is owned by the client application, and thus is responsible for allocating and/or freeing it. If the pointer is NULL or the size is zero, no "Field 2" ancillary data will be transferred. Use the AUTOCIRCULATE_TRANSFER::SetAncBuffers method to set or reset this field.
FRAME_STAMP & operator=(const FRAME_STAMP &inRHS)
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelOctet values.
std::string NTV2HDMIColorSpaceToString(const NTV2HDMIColorSpace inValue, const bool inCompactDisplay=false)
ULWord mFlags
Action flags (lock, unlock, etc)
NTV2_TRAILER()
Constructs a default NTV2_TRAILER having the proper version and tag.
NTV2Crosspoint channelSpec
void PUSHU64(const uint64_t inVal, RPCBlob &inArr, const bool dontSwap=false)
#define NTV2_TYPE_AJASTREAMBUFFER
Identifies NTV2StreamBuffer struct.
void Set(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Sets my fields from the given DBB, low and high ULWord components.
Declares numerous NTV2 utility functions.
bool GetU16s(UWordSequence &outU16s, const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
NTV2Buffer mOutBadRegIndexes
Array of UWords containing index numbers of the register writes that failed. The SDK owns this memory...
#define NTV2Buffer_TO_ULWORD64(__p__)
bool NTV2DeviceGetSupportedGeometries(const NTV2DeviceID inDeviceID, NTV2GeometrySet &outGeometries)
Returns a set of distinct NTV2FrameGeometry values supported on the given device. ...
NTV2Crosspoint foregroundKeyCrosspoint
void swap(nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j1, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp) is_nothrow_move_constructible< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value &&//NOLINT(misc-redundant-expression, cppcoreguidelines-noexcept-swap, performance-noexcept-swap) is_nothrow_move_assignable< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value)
exchanges the values of two JSON objects
std::string NTV2CrosspointToString(const NTV2Crosspoint inChannel)
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
ULWord acBufferLevel
Number of buffered frames in driver ready to capture or play.
std::vector< uint64_t > ULWord64Sequence
An ordered sequence of ULWord64 (uint64_t) values.
#define NTV2Buffer_PAGE_ALIGNED
Allocated page-aligned?
NTV2GetRegisters(const NTV2RegNumSet &inRegisterNumbers=NTV2RegNumSet())
Constructs an NTV2GetRegisters struct from the given set of register numbers.
bool operator!=(const NTV2SegmentedXferInfo &inRHS) const
bool NTV2GetSupportedStandards(NTV2StandardSet &outStandards)
Returns a set of all NTV2Standard values supported (used) by any/all supported NTV2 devices...
std::string AsCode(const size_t inBytesPerWord=4, const std::string &inVarName="", const bool inUseSTL=false, const bool inByteSwap=false) const
string NTV2AutoCirculateStateToString(const NTV2AutoCirculateState inState)
NTV2RegInfo GetRegInfo(const UWord inIndex0=0) const
AUTO_CIRC_COMMAND eCommand
NTV2SDIInputStatus & operator[](const size_t inSDIInputIndex0)
This struct is used to augment the default full-frame AutoCirculate DMA transfer to accommodate multi...
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Intended for capture, answers with the timecodes captured in my acTransferStatus member's acFrameStam...
bool SetInputTimecode(const NTV2TCIndex inTCNdx, const NTV2_RP188 &inTimecode)
Sets one of my input timecodes.
ULWord acAudioOutStartAddress
(output/playback only) Audio play head position (exclusive) AFTER this frame was stamped.
720x486, for NTSC 525i and 525p60, NTV2_VANCMODE_OFF
ULWord GetFrameCount(void) const
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
NTV2SegmentedXferInfo & reset(void)
Resets me to an invalid (all zero) state.
ULWord mFlags
Action flags.
bool NextDifference(const NTV2Buffer &inBuffer, ULWord &byteOffset) const
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.
ULWord acAudioOutStopAddress
(output/playback only) Audio play head position when this frame was stamped.
void Clear(void)
Frees my private color correction table buffer and resets my mode to "invalid".
LWord64 acCurrentFrameTime
The VBI timestamp of the current/active frame currently being ingested on the device (capture)...
bool SetAndFill(const void *pInUserPointer, const size_t inByteCount, const UByte inValue)
Sets (or resets) me from a client-supplied address and size.
uint16_t U16(const int inIndex) const
Fixed_ transitionSoftness
NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter
Handy const iterator to iterate over an NTV2DoubleArray.
std::ostream & Dump(std::ostream &inOutputStream=std::cout, const size_t inStartByteOffset=0, const size_t inByteCount=0, const size_t inRadix=16, const size_t inBytesPerGroup=4, const size_t inGroupsPerLine=8, const size_t inAddressRadix=0, const bool inShowAscii=false, const size_t inAddrOffset=0) const
Dumps me in hex/octal/decimal, with/without Ascii, to the given output stream.
ULWord acFramesDropped
Total number of frames dropped since CNTV2Card::AutoCirculateStart called.
NTV2TCIndexes & operator+=(NTV2TCIndexes &inOutSet, const NTV2TCIndexes &inSet)
Appends the given NTV2TCIndexes contents into the given set.
static void FreeAligned(void *pMemory)
NTV2Buffer acTimeCodes
Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCInde...
std::ostream & Print(std::ostream &inOutStream) const
AUTOCIRCULATE_TRANSFER_STATUS acTransferStatus
Contains status information that's valid after CNTV2Card::AutoCirculateTransfer returns, including the driver buffer level, number of frames processed or dropped, audio and anc transfer byte counts, and a complete FRAME_STAMP that has even more detailed clocking information.
NTV2_HEADER(const ULWord inStructureType, const ULWord inSizeInBytes)
Constructs a default NTV2_HEADER having the proper tag, version, and the given type and size...
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
NTV2Channel GetChannel(void) const
#define NTV2_ASSERT_STRUCT_VALID
NTV2Buffer mBuffer
Virtual address of a bitstream buffer and its length.
#define xHEX0N(__x__, __n__)
AUTOCIRCULATE_TRANSFER()
Constructs a default AUTOCIRCULATE_TRANSFER struct.
Fixed_ transitionCoefficient
~NTV2Buffer()
My destructor. If I'm responsible for the memory, I free it here.
static std::string GetDisplayName(const uint32_t inRegNum)
~FRAME_STAMP()
My destructor.
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
ULWord currenthUser
Contains validCount (Play - reps remaining, Record - drops on frame)
bool SetAncBuffers(ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my ancillary data buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
ULWord getSourcePitch(void) const
NTV2_RP188 acRP188
Deprecated – call FRAME_STAMP::GetInputTimeCode instead.
NTV2GeometrySet GetRelatedGeometries(const NTV2FrameGeometry inFrameGeometry)
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
NTV2RegWritesIter NTV2RegisterReadsIter
NTV2RegInfo & setValue(const ULWord val)
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Intended for capture, answers with a specific timecode captured in my acTransferStatus member's acFra...
ULWord mIsWriting
If non-zero, register(s) will be written; otherwise, register(s) will be read.
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
NTV2Buffer mInBankInfos
Bank select NTV2RegInfo. The SDK owns this memory.
#define NTV2_TYPE_AJASTREAMCHANNEL
Identifies NTV2StreamChannel struct.
This object is embedded in the AUTOCIRCULATE_TRANSFER struct that's returned from the CNTV2Card::Auto...
bool SetFromRegValue(const ULWord inData)
Sets my fields from the given status register value.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
bool ResetUsing(const NTV2RegWrites &inRegWrites)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
ULWord acBufferLevel
The number of frames ready to record/play after the transfer.
ULWord mStatus
Action status.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
enum NTV2OutputDestination NTV2OutputDest
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
#define AUTOCIRCULATE_STRUCT_VERSION
Version number of AutoCirculate structures, originally 0.
ULWord getSegmentLength(void) const
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
NTV2QuarterSizeExpandMode acVideoQuarterSizeExpand
Turns on the "quarter-size expand" (2x H + 2x V) hardware. Defaults to off (1:1). ...
bool GetRequestedRegisterWrites(NTV2RegWrites &outRegWrites) const
bool isDestBottomUp(void) const
ULWord currentAudioExpectedAddress
As set by play.
Identifies the first analog video input.
Private include file for all ajabase sources.
This class/object reports information about the current and/or requested AutoCirculate frame...
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
std::map< NTV2FrameGeometry, ULWord > FGSizesMap
ULWord getSourceOffset(void) const
NTV2ChannelList::const_iterator NTV2ChannelListConstIter
A handy const iterator into an NTV2ChannelList.
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
RP188_STRUCT currentRP188
Last vertical blank timecode (RP-188)
static void * AllocateAligned(size_t size, size_t alignment)
ULWord acAudioInStartAddress
(input/ingest/capture only) Starting audio record head position when this frame was stamped...
#define NTV2_IS_VALID_VIDEO_FORMAT(__f__)
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
std::string & upper(std::string &str)
void POPU32(uint32_t &outVal, const RPCBlob &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
#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...
ULWord64 acAudioClockTimeStamp
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
This is used by the CNTV2Card::ReadSDIStatistics function.
string CommaStr(const T &inNum)
2048x1556, for 2Kx1556psf film format, NTV2_VANCMODE_TALL
NTV2Buffer acAudioBuffer
The host audio buffer. This field is owned by the client application, and thus is responsible for all...
static const NTV2_RP188 INVALID_TIMECODE_VALUE
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Color correction data used with AUTOCIRCULATE_WITH_COLORCORRECT option.
static const string sSegXferUnits[]
std::vector< std::string > NTV2StringList
bool SetFrom(const FRAME_STAMP_STRUCT &inOldStruct)
Sets my fields from the given FRAME_STAMP_STRUCT.
std::set< NTV2AudioChannelOctet > NTV2AudioChannelOctets
A set of distinct NTV2AudioChannelOctet values.
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Answers with a specific timecode captured in my acTimeCodes member.
#define HEX0N(__x__, __n__)
#define NTV2Buffer_ALLOCATED
Allocated using Allocate function?
std::ostream & Print(std::ostream &inOutStream) const
bool GetU64s(ULWord64Sequence &outU64s, const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
#define NTV2_IS_VALID_COLOR_CORRECTION_MODE(__x__)
#define NTV2SDKVersionDecode_Build
uint8_t U8(const int inIndex) const
ULWord audioOutStopAddress
For play - first position in buffer of audio.
std::vector< NTV2RegInfo > NTV2RegisterWrites
#define OCT0N(__x__, __n__)
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
LWord64 currentFrameTime
Vertical blank start of current frame.
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
bool ByteSwap64(void)
Byte-swaps my contents 64-bits at a time.
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
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
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.
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.
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)
ULWord64 audioClockTimeStamp
48kHz clock (in reg 28, extended to 64 bits) at time of play or record.
bool SegmentedDMAsEnabled(void) const
enum NTV2TCIndex NTV2TimecodeIndex
ULWord acTotalBytesTransferred
Total audio and video bytes transferred.
NTV2FrameBufferFormatSetConstIter NTV2PixelFormatsConstIter
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Declares the CNTV2RegisterExpert class.
bool isDestTopDown(void) const
All new NTV2 structs end with this common trailer.
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
ULWord acFrame
(input/ingest/capture only) Current/active frame number.
NTV2FrameGeometry GetNTV2FrameGeometryFromVideoFormat(const NTV2VideoFormat inVideoFormat)
ULWord currentFieldCount
At Call Field0 or Field1 currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2SegmentedDMAInfo acInSegmentedDMAInfo
Optional segmented DMA info, for use with specialized data transfers.