26 #if !defined(MSWindows) 41 if (++it != inData.end())
52 if (++it != inData.end())
85 inOutStr << *iter << endl;
93 inOutStr <<
xHEX0N(uint16_t(*it),2);
94 if (++it != inDIDs.end())
102 inOutStream <<
DEC(inData.size()) <<
" UWords: ";
105 inOutStream <<
HEX0N(*iter,4);
106 if (++iter != inData.end())
114 inOutStream <<
DEC(inData.size()) <<
" ULWords: ";
117 inOutStream <<
HEX0N(*iter,8);
118 if (++iter != inData.end())
126 inOutStream <<
DEC(inData.size()) <<
" ULWord64s: ";
129 inOutStream <<
HEX0N(*iter,16);
130 if (++iter != inData.end())
148 mFrameRefClockCount = 0;
149 mGlobalClockCount = 0;
150 mFrameTRSError =
false;
159 inOutStream <<
"[CRCA=" <<
DEC(mCRCTallyA)
160 <<
" CRCB=" <<
DEC(mCRCTallyB)
161 <<
" unlk=" <<
xHEX0N(mUnlockTally,8)
162 <<
" frmRefClkCnt=" <<
xHEX0N(mFrameRefClockCount,16)
163 <<
" globalClkCnt=" <<
xHEX0N(mGlobalClockCount,16)
164 <<
" frmTRS=" <<
YesNo(mFrameTRSError)
165 <<
" locked=" <<
YesNo(mLocked)
166 <<
" VPIDA=" <<
YesNo(mVPIDValidA)
167 <<
" VPIDB=" <<
YesNo(mVPIDValidB)
209 inOutStream <<
"Enabled: " <<
YesNo(mEnabled);
212 <<
"Is 4:2:0: " <<
YesNo(mPixel420) << endl
233 transitionCoefficient (0),
234 transitionSoftness (0)
240 : eCommand (inCommand),
241 channelSpec (inCrosspoint),
265 static const string sCmds [] = {
"ACInit",
"ACStart",
"ACStop",
"ACPause",
"GetAC",
"ACFrmStmp",
266 "ACFlush",
"ACPreRoll",
"ACXfer",
"ACAbort",
"ACStartAt",
267 "ACXfer1",
"ACXfer2",
"ACFrmStmp2",
"ACTask",
"ACSetActFrm"};
268 if (
size_t(
eCommand) <
sizeof(sCmds))
278 if (
bVal2) oss <<
" +RP188";
279 if (
bVal3) oss <<
" +FBFChg";
280 if (
bVal4) oss <<
" +FBOChg";
281 if (
bVal5) oss <<
" +ColCorr";
282 if (
bVal6) oss <<
" +VidProc";
283 if (
bVal7) oss <<
" +Anc";
284 if (
bVal8) oss <<
" +LTC";
306 if (
bVal1) oss <<
" +resume";
307 if (
bVal1 &&
bVal2) oss <<
" +clearDropCount";
311 if (
bVal1) oss <<
" +clearDropCount";
333 fType (inStructureType),
336 fSizeInBytes (inStructSizeInBytes),
337 fPointerSize (sizeof(int*)),
346 return inObj.
Print (inOutStream);
354 inOutStream << NTV2_4CC_AS_STRING (fHeaderTag);
356 inOutStream <<
"BAD-" <<
HEX0N(fHeaderTag,8);
358 inOutStream << NTV2_4CC_AS_STRING (fType);
360 inOutStream <<
"|BAD-" <<
HEX0N(fType,8);
361 inOutStream <<
" v" << fHeaderVersion <<
" vers=" << fVersion <<
" sz=" << fSizeInBytes;
362 return inOutStream <<
"]";
367 const char * pU32 (reinterpret_cast<const char *>(&in4CC));
368 ostringstream result, fourCC;
370 if (nonPrintable && !::isprint(nonPrintable))
372 for (
size_t charPos(0); charPos < 4; charPos++)
374 #if AJATargetBigEndian 375 const char ch (pU32[charPos]);
376 #else // little-endian: 377 const char ch (pU32[3 - charPos]);
384 fourCC << nonPrintable;
389 result <<
xHEX0N(in4CC,8);
391 result <<
"'" << fourCC.str() <<
"' (" <<
xHEX0N(in4CC,8) <<
")";
393 result <<
"'" << fourCC.str() <<
"'";
402 inOutStream << NTV2_4CC_AS_STRING(inObj.
fTrailerTag);
415 return inObj.
Print (inOutStream);
433 if (inDumpMaxBytes > 256)
434 inDumpMaxBytes = 256;
438 for (
UWord ndx(0); ndx < inDumpMaxBytes; ndx++)
439 oss <<
HEX0N(uint16_t(pBytes[ndx]),2);
444 string NTV2Buffer::AsCode (
const size_t inBytesPerWord,
const std::string & inVarName,
const bool inUseSTL,
const bool inByteSwap)
const 447 if (inBytesPerWord != 1 && inBytesPerWord != 2 && inBytesPerWord != 4 && inBytesPerWord != 8)
return string();
449 if (inBytesPerWord > 1)
455 const string cType (inBytesPerWord == 1 ?
"uint8_t" : (inBytesPerWord == 2 ?
"uint16_t" : (inBytesPerWord == 4 ?
"uint32_t" :
"uint64_t")));
456 const size_t numWords (
GetByteCount() / inBytesPerWord);
457 const string vecType =
"std::vector<" + cType +
">";
458 const string varName (inVarName.empty() ? (inUseSTL ?
"tmpVector" :
"tmpArray") : inVarName);
459 oss <<
"const " << (inUseSTL ? vecType : cType) <<
" " << varName << (inUseSTL ?
"" :
"[]") <<
" = {" << endl;
460 if (inByteSwap && inBytesPerWord > 1)
461 switch (inBytesPerWord)
467 for (
size_t ndx(0); ndx < numWords; )
469 switch (inBytesPerWord)
472 case 2: oss <<
xHEX0N(tmp.
U16(
int(ndx)),4);
break;
473 case 4: oss <<
xHEX0N(tmp.
U32(
int(ndx)),8);
break;
474 case 8: oss <<
xHEX0N(tmp.
U64(
int(ndx)),16);
break;
476 if (++ndx < numWords)
492 oss <<
HEX0N(uint16_t(
U8(ndx++)),2);
493 if (inLineBreakInterval && ndx <
int(
GetByteCount()) && ((
size_t(ndx) % inLineBreakInterval) == 0))
497 return !outStr.empty();
502 const streamsize maxAddrWidth (
sizeof(
ULWord64) * 2);
505 oss <<
OCT0N(inOffset,maxAddrWidth) <<
": ";
506 else if (inRadix == 10)
507 oss <<
DEC0N(inOffset,maxAddrWidth) <<
": ";
509 oss <<
xHEX0N(inOffset,maxAddrWidth) <<
": ";
514 const size_t inStartOffset,
515 const size_t inByteCount,
516 const size_t inRadix,
517 const size_t inBytesPerGroup,
518 const size_t inGroupsPerRow,
519 const size_t inAddressRadix,
520 const bool inShowAscii,
521 const size_t inAddrOffset)
const 525 if (inRadix != 8 && inRadix != 10 && inRadix != 16 && inRadix != 2)
527 if (inAddressRadix != 0 && inAddressRadix != 8 && inAddressRadix != 10 && inAddressRadix != 16)
529 if (inBytesPerGroup == 0)
534 size_t bytesRemaining (inByteCount ? inByteCount :
GetByteCount());
535 size_t bytesInThisGroup (0);
536 size_t groupsInThisRow (0);
537 const unsigned maxByteWidth (inRadix == 8 ? 4 : (inRadix == 10 ? 3 : (inRadix == 2 ? 8 : 2)));
538 const UByte * pBuffer (reinterpret_cast <const UByte *> (pInStartAddress));
539 const size_t asciiBufferSize (inShowAscii && inGroupsPerRow ? (inBytesPerGroup * inGroupsPerRow + 1) *
sizeof (
UByte) : 0);
541 if (!pInStartAddress)
546 ::memset (pAsciiBuffer, 0, asciiBufferSize);
548 if (inGroupsPerRow && inAddressRadix)
550 while (bytesRemaining)
553 inOStream <<
BIN08(*pBuffer);
554 else if (inRadix == 8)
555 inOStream <<
oOCT(uint16_t(*pBuffer));
556 else if (inRadix == 10)
557 inOStream <<
DEC0N(uint16_t(*pBuffer),maxByteWidth);
558 else if (inRadix == 16)
559 inOStream <<
HEX0N(uint16_t(*pBuffer),2);
562 pAsciiBuffer[groupsInThisRow * inBytesPerGroup + bytesInThisGroup] = isprint(*pBuffer) ? *pBuffer :
'.';
567 if (bytesInThisGroup >= inBytesPerGroup)
570 if (inGroupsPerRow && groupsInThisRow >= inGroupsPerRow)
574 inOStream <<
" " << pAsciiBuffer;
575 ::memset (pAsciiBuffer, 0, asciiBufferSize);
578 if (inAddressRadix && bytesRemaining)
579 inOStream << print_address_offset (inAddressRadix, reinterpret_cast <ULWord64> (pBuffer) - reinterpret_cast <ULWord64> (pInStartAddress) +
ULWord64 (inAddrOffset));
584 bytesInThisGroup = 0;
588 if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup && pAsciiBuffer)
591 inOStream <<
string ((inBytesPerGroup - bytesInThisGroup) * maxByteWidth + 1,
' ');
596 if (groupsInThisRow < inGroupsPerRow && pAsciiBuffer)
597 inOStream <<
string (((inGroupsPerRow - groupsInThisRow) * inBytesPerGroup * maxByteWidth + (inGroupsPerRow - groupsInThisRow)),
' ');
599 inOStream << pAsciiBuffer;
602 else if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup)
606 delete [] pAsciiBuffer;
613 const size_t inStartOffset,
614 const size_t inByteCount,
615 const size_t inRadix,
616 const size_t inBytesPerGroup,
617 const size_t inGroupsPerRow,
618 const size_t inAddressRadix,
619 const bool inShowAscii,
620 const size_t inAddrOffset)
const 623 Dump (oss, inStartOffset, inByteCount, inRadix, inBytesPerGroup, inGroupsPerRow, inAddressRadix, inShowAscii, inAddrOffset);
624 inOutputString = oss.str();
625 return inOutputString;
646 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint64_t));
647 if (maxSize < inU64Offset)
649 maxSize -= inU64Offset;
651 const uint64_t * pU64 (reinterpret_cast <const uint64_t *> (
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
655 if (inMaxSize && inMaxSize < maxSize)
660 outUint64s.reserve(maxSize);
661 for (
size_t ndx(0); ndx < maxSize; ndx++)
663 const uint64_t u64 (*pU64++);
670 outUint64s.reserve(0);
683 size_t maxNumU32s (
size_t(
GetByteCount()) /
sizeof(uint32_t));
684 if (maxNumU32s < inU32Offset)
686 maxNumU32s -= inU32Offset;
688 const uint32_t * pU32 (reinterpret_cast<const uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
692 if (inMaxSize && inMaxSize < maxNumU32s)
693 maxNumU32s = inMaxSize;
697 outUint32s.reserve(maxNumU32s);
698 for (
size_t ndx(0); ndx < maxNumU32s; ndx++)
700 const uint32_t u32 (*pU32++);
707 outUint32s.reserve(0);
720 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint16_t));
721 if (maxSize < inU16Offset)
723 maxSize -= inU16Offset;
725 const uint16_t * pU16 (reinterpret_cast <const uint16_t *> (
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
729 if (inMaxSize && inMaxSize < maxSize)
734 outUint16s.reserve(maxSize);
735 for (
size_t ndx(0); ndx < maxSize; ndx++)
737 const uint16_t u16 (*pU16++);
744 outUint16s.reserve(0);
758 if (maxSize < inU8Offset)
760 maxSize -= inU8Offset;
766 if (inMaxSize && inMaxSize < maxSize)
771 outUint8s.reserve(maxSize);
772 for (
size_t ndx(0); ndx < maxSize; ndx++)
773 outUint8s.push_back(*pU8++);
778 outUint8s.reserve(0);
786 const uint8_t * pU8 (reinterpret_cast<const uint8_t*> (
GetHostPointer()));
792 outU8s.reserve(outU8s.size() + maxSize);
793 outU8s.insert(outU8s.end(),pU8, pU8 + maxSize);
810 if (maxSize < inU8Offset)
812 maxSize -= inU8Offset;
818 if (inMaxSize && inMaxSize < maxSize)
823 outString.reserve(maxSize);
824 for (
size_t ndx(0); ndx < maxSize; ndx++)
826 const char c = *pU8++;
836 outString.reserve(0);
851 uint64_t * pU64 (reinterpret_cast<uint64_t*>(
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
854 if (maxU64s > inU64Offset)
855 maxU64s -= inU64Offset;
856 if (maxU64s > inU64s.size())
857 maxU64s = inU64s.size();
858 if (inU64s.size() > maxU64s)
861 for (
unsigned ndx(0); ndx < maxU64s; ndx++)
879 uint32_t * pU32 (reinterpret_cast<uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
882 if (maxU32s > inU32Offset)
883 maxU32s -= inU32Offset;
884 if (maxU32s > inU32s.size())
885 maxU32s = inU32s.size();
886 if (inU32s.size() > maxU32s)
889 for (
unsigned ndx(0); ndx < maxU32s; ndx++)
907 uint16_t * pU16 (reinterpret_cast<uint16_t*>(
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
910 if (maxU16s > inU16Offset)
911 maxU16s -= inU16Offset;
912 if (maxU16s > inU16s.size())
913 maxU16s = inU16s.size();
914 if (inU16s.size() > maxU16s)
917 for (
unsigned ndx(0); ndx < maxU16s; ndx++)
938 if (maxU8s > inU8Offset)
939 maxU8s -= inU8Offset;
940 if (maxU8s > inU8s.size())
941 maxU8s = inU8s.size();
942 if (inU8s.size() > maxU8s)
945 ::memcpy(pU8, &inU8s[0], maxU8s);
947 for (
unsigned ndx(0); ndx < maxU8s; ndx++)
949 *pU8++ = inU8s.at(ndx);
963 return inOutStream <<
"{invalid}";
969 inOutList.push_back (inRP188);
976 inOutStream << inObj.size () <<
":[";
979 inOutStream << *iter;
980 if (++iter != inObj.end ())
983 return inOutStream <<
"]";
989 inOutStream << inObj.size () <<
":[";
993 if (++iter != inObj.end ())
996 return inOutStream <<
"]";
1005 if (++iter != inObj.end ())
1006 inOutStream <<
", ";
1015 inOutSet.insert (*iter);
1022 return inOutStream << inObj.
acHeader 1043 <<
" acFrame=" << inObj.
acFrame 1044 <<
" acRP188=" << inObj.
acRP188 1055 inOutStream <<
"n/a";
1062 #if defined (_DEBUG) 1066 while (str.find (
' ') != string::npos)
1067 str.erase (str.find (
' '), 1);
1112 inOutStream <<
"RegValues:" << inObj.size () <<
"[";
1113 while (iter != inObj.end ())
1115 const NTV2RegisterNumber registerNumber (static_cast <NTV2RegisterNumber> (iter->first));
1116 const ULWord registerValue (iter->second);
1118 if (++iter != inObj.end ())
1121 return inOutStream <<
"]";
1148 if (inOutSet.find(*iter) == inOutSet.end())
1149 inOutSet.insert(*iter);
1157 NTV2VideoFormatSet::const_iterator iter (inFormats.begin ());
1159 inOStream << inFormats.size ()
1160 << (inFormats.size () == 1 ?
" video format: " :
" video format(s): ");
1162 while (iter != inFormats.end ())
1165 inOStream << (++iter == inFormats.end () ?
"" :
", ");
1177 inOStream << inFormats.size()
1178 << (inFormats.size() == 1 ?
" pixel format: " :
" pixel formats: ");
1180 while (iter != inFormats.end())
1183 inOStream << (++iter == inFormats.end() ?
"" :
", ");
1193 inOutSet.insert(*iter);
1203 inOStream << inStandards.size ()
1204 << (inStandards.size () == 1 ?
" standard: " :
" standards: ");
1206 while (iter != inStandards.end ())
1209 inOStream << (++iter == inStandards.end () ?
"" :
", ");
1219 inOutSet.insert(*iter);
1228 inOStream << inGeometries.size ()
1229 << (inGeometries.size () == 1 ?
" geometry: " :
" geometries: ");
1230 while (iter != inGeometries.end ())
1233 inOStream << (++iter == inGeometries.end () ?
"" :
", ");
1242 inOutSet.insert(*iter);
1251 inOStream << inSet.size()
1252 << (inSet.size() == 1 ?
" input: " :
" inputs: ");
1253 while (iter != inSet.end())
1256 inOStream << (++iter == inSet.end() ?
"" :
", ");
1265 inOutSet.insert (*iter);
1273 inOStream << inSet.size()
1274 << (inSet.size() == 1 ?
" output: " :
" outputs: ");
1275 while (iter != inSet.end())
1278 inOStream << (++iter == inSet.end() ?
"" :
", ");
1287 inOutSet.insert(*iter);
1300 if (outFormats.find(*fit) == outFormats.end())
1301 outFormats.insert(*fit);
1311 if (usedFormats.find(pf) == usedFormats.end())
1312 outFormats.insert(pf);
1318 outStandards.clear();
1325 if (outStandards.find(*sit) == outStandards.end())
1326 outStandards.insert(*sit);
1336 if (usedStandards.find(st) == usedStandards.end())
1337 outStandards.insert(st);
1356 outFormats.insert(vf);
1358 catch (
const std::bad_alloc &)
1366 NTV2_ASSERT ((isOkay && !outFormats.empty()) || (!isOkay && outFormats.empty()));
1381 outFormats.insert(pixelFormat);
1383 catch (
const std::bad_alloc &)
1391 if (supportedDevices.find(inDeviceID) != supportedDevices.end())
1393 return isOkay && !outFormats.empty();
1403 outStandards.clear();
1410 outStandards.insert(
std);
1419 outGeometries.clear();
1433 outInputSources.clear();
1442 outInputSources.insert(src);
1452 outOutputDests.clear();
1458 for (
size_t ndx(0); ndx < 10; ndx++)
1464 outOutputDests.insert(dst);
1473 << (inSet.size() == 1 ?
" rate: " :
" rates: ");
1474 while (it != inSet.end())
1477 oss << (++it == inSet.end() ?
"" :
", ");
1485 if (inOutSet.find(*it) == inOutSet.end())
1486 inOutSet.insert(*it);
1499 outRates.insert(fr);
1507 return inRun.
Print(inOutStrm);
1514 static const char * sStateStrings [] = {
"Disabled",
"Initializing",
"Starting",
"Paused",
"Stopping",
"Running",
"StartingAtTime",
AJA_NULL};
1516 return string (sStateStrings [inState]);
1558 return it != sFGWdths.end() ? it->second : 0;
1584 return it != sFGHghts.end() ? it->second : 0;
1588 static const string sSegXferUnits[] = {
"",
" U8",
" U16",
"",
" U32",
"",
"",
"",
" U64",
""};
1593 return inStrm <<
"(invalid)";
1617 static string var(
"segInfo");
1619 string units(
"\t// bytes");
1623 oss <<
"NTV2SegmentedXferInfo " << var <<
";" << endl;
1632 oss << var <<
".setSourceOffset(" <<
DEC(
getSourceOffset()) <<
");" << units << endl;
1633 oss << var <<
".setSourcePitch(" <<
DEC(
getSourcePitch()) <<
");" << units << endl;
1635 oss << var <<
".setSourceDirection(false);" << endl;
1637 oss << var <<
".setDestOffset(" <<
DEC(
getDestOffset()) <<
");" << units << endl;
1639 oss << var <<
".setDestPitch(" <<
DEC(
getDestPitch()) <<
");" << units << endl;
1641 oss << var <<
".setDestDirection(false);" << endl;
1659 if (inElementOffset < offset)
1692 mElementsPerSegment = 0;
1693 mInitialSrcOffset = 0;
1694 mInitialDstOffset = 0;
1695 mSrcElementsPerRow = 0;
1696 mDstElementsPerRow = 0;
1703 std::swap(mSrcElementsPerRow, mDstElementsPerRow);
1704 std::swap(mInitialSrcOffset, mInitialDstOffset);
1713 fByteCount (
ULWord(pInUserPointer ? inByteCount : 0)),
1715 #
if defined (AJAMac)
1716 fKernelSpacePtr (0),
1728 : fUserSpacePtr (0),
1731 #
if defined (AJAMac)
1732 fKernelSpacePtr (0),
1746 : fUserSpacePtr (0),
1749 #
if defined (AJAMac)
1750 fKernelSpacePtr (0),
1770 fByteCount =
ULWord(inNewByteCount);
1799 const size_t loopCount(
GetByteCount() /
sizeof(uint64_t));
1802 for (
size_t ndx(0); ndx < loopCount; ndx++)
1811 const size_t loopCount(
GetByteCount() /
sizeof(uint32_t));
1814 for (
size_t ndx(0); ndx < loopCount; ndx++)
1823 const size_t loopCount(
GetByteCount() /
sizeof(uint16_t));
1826 for (
size_t ndx(0); ndx < loopCount; ndx++)
1834 if (uint64_t(inByteCount) >= 0x0000000100000000)
1838 fByteCount =
ULWord(pInUserPointer ? inByteCount : 0);
1840 return (pInUserPointer && inByteCount) || (!pInUserPointer && !inByteCount);
1846 return Set(pInUserPointer, inByteCount) &&
Fill(inValue);
1852 if (uint64_t(inByteCount) >= 0x0000000100000000)
1870 {pBuffer =
new UByte[inByteCount];}
1871 catch (
const std::bad_alloc &)
1873 if (pBuffer &&
Set(pBuffer, inByteCount))
1918 pBytes += inByteOffset;
1954 const ULWord inSrcByteOffset,
const ULWord inDstByteOffset,
const ULWord inByteCount)
1958 if (inSrcByteOffset + inByteCount > inBuffer.
GetByteCount())
1963 const UByte * pSrc (inBuffer);
1964 pSrc += inSrcByteOffset;
1966 UByte * pDst (*
this);
1967 pDst += inDstByteOffset;
1969 ::memcpy (pDst, pSrc, inByteCount);
1986 srcPitch = 0 - srcPitch;
1988 dstPitch = 0 - dstPitch;
1993 if (!pSrc)
return false;
1994 if (!pDst)
return false;
1999 ::memcpy (pDst, pSrc,
size_t(bytesPerSeg));
2000 srcOffset += srcPitch;
2001 dstOffset += dstPitch;
2011 const string newline(
"\n"), tab(
"\t");
2017 for (
size_t ndx(0); ndx < str.size(); ndx++)
2027 for (
size_t srcNdx(0), dstNdx(0); srcNdx < str.size(); srcNdx += 2)
2041 if (fFlags != inBuffer.fFlags)
2047 fUserSpacePtr = inBuffer.fUserSpacePtr;
2048 inBuffer.fUserSpacePtr = tmp;
2064 const uint8_t * pSrchData (inValue);
2065 const uint8_t * pMyData (*
this);
2069 if (!::memcmp(pMyData, pSrchData, srchByteCount))
2071 outOffsets.insert(offset);
2072 if (inLimit && outOffsets.size() >= inLimit)
2077 }
while (offset < maxOffset);
2089 if (inByteOffset >= totalBytes)
2092 totalBytes -= inByteOffset;
2094 ULWord byteCount(inByteCount);
2095 if (byteCount > totalBytes)
2096 byteCount = totalBytes;
2101 const UByte * pByte1 (*
this);
2102 const UByte * pByte2 (inBuffer);
2103 pByte1 += inByteOffset;
2104 pByte2 += inByteOffset;
2105 #if !defined(NTV2BUFFER_NO_MEMCMP) 2106 return ::memcmp (pByte1, pByte2, byteCount) == 0;
2107 #else // NTV2BUFFER_NO_MEMCMP 2108 ULWord offset(inByteOffset);
2111 if (*pByte1 != *pByte2)
2113 cerr <<
"## ERROR: IsContentEqual: miscompare at offset " <<
xHEX0N(offset,8)
2114 <<
" (" <<
DEC(offset) <<
"): " <<
xHEX0N(
UWord(*pByte1),2) <<
" != " 2116 <<
DEC(byteCount) <<
") bytes left to compare" << endl;
2124 #endif // NTV2BUFFER_NO_MEMCMP 2129 if (byteOffset == 0xFFFFFFFF)
2136 {byteOffset = 0xFFFFFFFF;
return true;}
2139 if (byteOffset >= totalBytesToCompare)
2141 totalBytesToCompare -= byteOffset;
2143 const UByte * pByte1 (*
this);
2144 const UByte * pByte2 (inBuffer);
2145 while (totalBytesToCompare)
2147 if (pByte1[byteOffset] != pByte2[byteOffset])
2149 totalBytesToCompare--;
2152 byteOffset = 0xFFFFFFFF;
2158 outByteOffsetFirst = outByteOffsetLast =
GetByteCount ();
2171 outByteOffsetFirst = 0;
2174 if (*pByte1 != *pByte2)
2178 outByteOffsetFirst++;
2180 if (outByteOffsetFirst == 0)
2185 if (*pByte1 == *pByte2)
2189 outByteOffsetFirst++;
2192 outByteOffsetFirst--;
2202 while (--outByteOffsetLast)
2204 if (*pByte1 != *pByte2)
2212 while (outByteOffsetLast)
2214 if (*pByte1 == *pByte2)
2218 outByteOffsetLast--;
2221 outByteOffsetLast++;
2222 if (outByteOffsetLast <= outByteOffsetFirst)
2223 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" <= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2224 const ULWord tmp (outByteOffsetLast);
2225 outByteOffsetLast = outByteOffsetFirst;
2226 outByteOffsetFirst = tmp;
2227 if (outByteOffsetLast >= outByteOffsetFirst)
2228 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" >= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2244 const bool result (inNewSize && (!(inNewSize & (inNewSize - 1))));
2252 #if defined(MSWindows) || defined(AJABareMetal) 2253 return AJA_PAGE_SIZE;
2255 return size_t(::getpagesize());
2263 acRequestedFrame (0),
2264 acAudioClockTimeStamp (0),
2265 acAudioExpectedAddress (0),
2266 acAudioInStartAddress (0),
2267 acAudioInStopAddress (0),
2268 acAudioOutStopAddress (0),
2269 acAudioOutStartAddress (0),
2270 acTotalBytesTransferred (0),
2275 acCurrentFrameTime (0),
2276 acAudioClockCurrentTime (0),
2277 acCurrentAudioExpectedAddress (0),
2278 acCurrentAudioStartAddress (0),
2279 acCurrentFieldCount (0),
2280 acCurrentLineCount (0),
2282 acCurrentUserCookie (0),
2291 : acHeader (inObj.acHeader),
2292 acFrameTime (inObj.acFrameTime),
2293 acRequestedFrame (inObj.acRequestedFrame),
2294 acAudioClockTimeStamp (inObj.acAudioClockTimeStamp),
2295 acAudioExpectedAddress (inObj.acAudioExpectedAddress),
2296 acAudioInStartAddress (inObj.acAudioInStartAddress),
2297 acAudioInStopAddress (inObj.acAudioInStopAddress),
2298 acAudioOutStopAddress (inObj.acAudioOutStopAddress),
2299 acAudioOutStartAddress (inObj.acAudioOutStartAddress),
2300 acTotalBytesTransferred (inObj.acTotalBytesTransferred),
2301 acStartSample (inObj.acStartSample),
2302 acCurrentTime (inObj.acCurrentTime),
2303 acCurrentFrame (inObj.acCurrentFrame),
2304 acCurrentFrameTime (inObj.acCurrentFrameTime),
2305 acAudioClockCurrentTime (inObj.acAudioClockCurrentTime),
2306 acCurrentAudioExpectedAddress (inObj.acCurrentAudioExpectedAddress),
2307 acCurrentAudioStartAddress (inObj.acCurrentAudioStartAddress),
2308 acCurrentFieldCount (inObj.acCurrentFieldCount),
2309 acCurrentLineCount (inObj.acCurrentLineCount),
2310 acCurrentReps (inObj.acCurrentReps),
2311 acCurrentUserCookie (inObj.acCurrentUserCookie),
2312 acFrame (inObj.acFrame),
2313 acRP188 (inObj.acRP188),
2314 acTrailer (inObj.acTrailer)
2337 for (
ULWord ndx (0); ndx < numRP188s; ndx++)
2338 outValues << pArray [ndx];
2357 outTimeCode = pArray [inTCIndex];
2365 outTimeCodes.clear();
2381 outTimeCodes[tcIndex] = tc;
2382 else if (tc.IsValid())
2383 outTimeCodes[tcIndex] = tc;
2393 (
void)inSDIInputIndex0;
2401 if (!pArray || !numRP188s)
2406 if (
ULWord(inTCNdx) >= numRP188s)
2409 pArray[inTCNdx] = inTimecode;
2557 if (mInStatistics.
IsNULL())
2561 for (
ULWord i = 0; i < numElements; i++)
2573 if (numElements != 8)
2575 if (inSDIInputIndex0 >= numElements)
2577 outStatus = pArray[inSDIInputIndex0];
2589 if (numElements != 8)
2591 if (inSDIInputIndex0 >= numElements)
2593 return pArray[inSDIInputIndex0];
2599 inOutStream << mHeader <<
", " << mInStatistics <<
", " << mTrailer;
return inOutStream;
2606 acTransferFrame (0),
2608 acFramesProcessed (0),
2609 acFramesDropped (0),
2611 acAudioTransferSize (0),
2612 acAudioStartSample (0),
2613 acAncTransferSize (0),
2614 acAncField2TransferSize (0)
2623 acCrosspoint (inCrosspoint),
2628 acRDTSCStartTime (0),
2629 acAudioClockStartTime (0),
2630 acRDTSCCurrentTime (0),
2631 acAudioClockCurrentTime (0),
2632 acFramesProcessed (0),
2633 acFramesDropped (0),
2740 if (inIndexNum == 0)
2757 case 13: oss << (
WithRP188() ?
"Yes" :
"No");
break;
2758 case 14: oss << (
WithLTC() ?
"Yes" :
"No");
break;
2762 case 18: oss << (
WithVidProc() ?
"Yes" :
"No");
break;
2765 case 21: oss << (
IsFieldMode() ?
"Yes" :
"No");
break;
2768 else if (inIndexNum < 22)
2778 << (inObj.
IsInput() ?
"Input " : (inObj.
IsOutput() ?
"Output" :
"*BAD* "))
2787 << setw(10) << (inObj.
WithRP188() ?
"+RP188" :
"-RP188")
2788 << setw(10) << (inObj.
WithLTC() ?
"+LTC" :
"-LTC")
2789 << setw(10) << (inObj.
WithFBFChange() ?
"+FBFchg" :
"-FBFchg")
2790 << setw(10) << (inObj.
WithFBOChange() ?
"+FBOchg" :
"-FBOchg")
2792 << setw(10) << (inObj.
WithVidProc() ?
"+VidProc" :
"-VidProc")
2793 << setw(10) << (inObj.
WithCustomAnc() ?
"+AncData" :
"-AncData")
2795 << setw(10) << (inObj.
IsFieldMode() ?
"+FldMode" :
"-FldMode");
2808 Set (inNumSegments, inNumActiveBytesPerRow, inHostBytesPerRow, inDeviceBytesPerRow);
2834 ccSaturationValue (0)
2871 acTransferStatus (),
2873 acInVideoDMAOffset (0),
2874 acInSegmentedDMAInfo (),
2875 acColorCorrection (),
2880 acPeerToPeerFlags (0),
2881 acFrameRepeatCount (1),
2882 acDesiredFrame (-1),
2894 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2896 acVideoBuffer (pInVideoBuffer, inVideoByteCount),
2897 acAudioBuffer (pInAudioBuffer, inAudioByteCount),
2898 acANCBuffer (pInANCBuffer, inANCByteCount),
2899 acANCField2Buffer (pInANCF2Buffer, inANCF2ByteCount),
2901 acTransferStatus (),
2903 acInVideoDMAOffset (0),
2904 acInSegmentedDMAInfo (),
2905 acColorCorrection (),
2910 acPeerToPeerFlags (0),
2911 acFrameRepeatCount (1),
2912 acDesiredFrame (-1),
2928 ULWord * pInAudioBuffer,
const ULWord inAudioByteCount,
2930 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2935 &&
SetAncBuffers (pInANCBuffer, inANCByteCount, pInANCF2Buffer, inANCF2ByteCount);
2976 for (
UWord ndx (0); ndx <
UWord(maxNumValues); ndx++)
2978 const NTV2TCIndex tcIndex (static_cast<NTV2TCIndex>(ndx));
2998 pArray[inTCIndex] = inTimeCode;
3012 for (
ULWord tcIndex(0); tcIndex < maxNumValues; tcIndex++)
3016 pArray[tcIndex] = inTimeCode;
3039 const ULWord inHostBytesPerRow,
const ULWord inDeviceBytesPerRow)
3227 mInNumRegisters (
ULWord (inRegisterNumbers.size ())),
3228 mOutNumRegisters (0)
3237 mInNumRegisters (
ULWord (inRegReads.size ())),
3238 mOutNumRegisters (0)
3248 mInNumRegisters =
ULWord(inRegisterNumbers.size());
3249 mOutNumRegisters = 0;
3250 bool result ( mInRegisters.
Allocate(mInNumRegisters *
sizeof(
ULWord))
3257 ULWord * pRegArray(mInRegisters);
3263 pRegArray[ndx++] = *iter;
3270 if (!mInNumRegisters)
3277 const ULWord * pRegNums(mInRegisters);
3278 for (
ULWord ndx(0); ndx < mInNumRegisters; ndx++)
3279 if (outRegNums.find(pRegNums[ndx]) == outRegNums.end())
3280 outRegNums.insert(pRegNums[ndx]);
3288 outGoodRegNums.clear();
3289 if (!mOutGoodRegisters)
3291 if (!mOutNumRegisters)
3293 if (mOutNumRegisters > mInNumRegisters)
3296 const ULWord * pRegArray (mOutGoodRegisters);
3297 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3298 outGoodRegNums.insert(pRegArray[ndx]);
3305 outBadRegNums.clear();
3311 if (reqRegNums == goodRegNums)
3315 std::set_difference (reqRegNums.begin(), reqRegNums.end(),
3316 goodRegNums.begin(), goodRegNums.end(),
3317 std::inserter(outBadRegNums, outBadRegNums.begin()));
3323 if (!mOutGoodRegisters)
3325 if (!mOutNumRegisters)
3327 if (mOutNumRegisters > mInNumRegisters)
3333 const ULWord * pRegArray (mOutGoodRegisters);
3334 ULWord * pValArray (mOutValues);
3335 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3336 if (pRegArray[ndx] == inRegNum)
3338 pValArray[ndx] = inValue;
3349 if (!mOutGoodRegisters)
3351 if (!mOutNumRegisters)
3353 if (mOutNumRegisters > mInNumRegisters)
3360 const ULWord * pRegArray (mOutGoodRegisters);
3361 const ULWord * pValArray (mOutValues);
3362 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3364 outValues [pRegArray[ndx]] = pValArray[ndx];
3365 #if defined(NTV2_PRETEND_DEVICE) 3366 if (pRegArray[ndx] ==
kRegBoardID && pValArray[ndx] == NTV2_PRETEND_DEVICE_FROM)
3367 outValues [pRegArray[ndx]] = NTV2_PRETEND_DEVICE_TO;
3370 #endif // NTV2_PRETEND_DEVICE 3382 if (outValues.empty())
3387 #if defined(NTV2_PRETEND_DEVICE) 3389 regInfo.
setValue(NTV2_PRETEND_DEVICE_TO);
3392 #endif // NTV2_PRETEND_DEVICE 3393 outValues.push_back(regInfo);
3399 uint32_t missingTally(0);
3403 if (mapIter != regValMap.end())
3404 it->registerValue = mapIter->second;
3408 #
if defined(NTV2_PRETEND_DEVICE)
3409 if (it->registerNumber ==
kRegBoardID && it->registerValue == NTV2_PRETEND_DEVICE_FROM)
3410 it->registerValue = NTV2_PRETEND_DEVICE_TO;
3413 #endif // NTV2_PRETEND_DEVICE 3415 return !missingTally;
3422 inOutStream << mHeader <<
", numRegs=" << mInNumRegisters <<
", inRegs=" << mInRegisters <<
", outNumGoodRegs=" << mOutNumRegisters
3423 <<
", outGoodRegs=" << mOutGoodRegisters <<
", outValues=" << mOutValues <<
", " << mTrailer;
3430 mInNumRegisters (
ULWord(inRegWrites.size())),
3454 pBadRegIndexes[ndx] = 0;
3456 pRegInfoArray[ndx++] = *it;
3467 outFailedRegWrites.clear();
3473 outRegWrites.clear();
3482 outRegWrites.push_back(pRegInfos[ndx]);
3495 if (pBadRegIndexes && maxNumBadRegIndexes && pRegInfoArray && maxNumRegInfos &&
mOutNumFailures)
3498 for (
UWord num(0); num < maxNumBadRegIndexes; num++)
3500 const UWord badRegIndex (pBadRegIndexes[num]);
3501 if (badRegIndex < maxNumRegInfos)
3503 const NTV2RegInfo & badRegInfo (pRegInfoArray[badRegIndex]);
3504 oss <<
"Failure " << num <<
": " << badRegInfo << endl;
3514 typedef std::pair <ULWord, ULWord> ULWordPair;
3515 typedef std::pair <ULWordPair, ULWordPair> ULWordPairs;
3538 const bool badName (regName.find(
' ') != string::npos);
3541 oss << sCard <<
".WriteRegister (";
3579 << name <<
" Number: " <<
regNum() << endl
3591 ULWord received(0), rcvdRegNum(0), rcvdRegVal(0);
3592 static const string sNumber (
" Number: "), sValue (
" Value: "), sHexPrefix(
" : 0x");
3593 for (
size_t ndx(0); ndx < inLogLines.size(); ndx++)
3595 string line (inLogLines.at(ndx));
3596 size_t posNumber (line.find(sNumber));
3597 if (posNumber != string::npos)
3599 if (received & 0x0001)
3601 line.erase(0, posNumber + sNumber.length());
3605 received |= 0x00000001;
3608 size_t posValue(inLogLines.at(ndx).find(sValue));
3609 if (posValue != string::npos)
3611 if (received & 0x0002)
3613 posValue += sValue.length();
3614 line.erase(0, posValue + sValue.length());
3617 size_t numHexDigits(0);
3618 for (
size_t ndx(0); ndx < line.size(); ndx++)
3621 if (numHexDigits != line.length())
3624 istringstream iss(line);
3625 iss >> std::hex >> rcvdRegVal;
3632 return received == 3;
3638 for (NTV2ULWordVector::const_iterator it(inObj.begin()); it != inObj.end(); ++it)
3639 inOutStream <<
" " <<
HEX0N(*it,8);
3646 inOutStream << (inCompact ?
"Ch[" :
"[");
3650 inOutStream <<
DEC(*it+1);
3653 if (++it != inObj.end())
3654 inOutStream << (inCompact ?
"|" :
",");
3656 return inOutStream <<
"]";
3660 { ostringstream oss;
3667 inOutStream << (inCompact ?
"Ch{" :
"{");
3671 inOutStream <<
DEC(*it+1);
3674 if (++it != inObj.end())
3675 inOutStream << (inCompact ?
"|" :
",");
3677 return inOutStream <<
"}";
3681 { ostringstream oss;
3708 result.push_back(ch);
3716 result.push_back(*it);
3722 inOutStream << (inCompact ?
"AudSys{" :
"{");
3726 inOutStream <<
DEC(*it+1);
3729 if (++it != inObj.end())
3730 inOutStream << (inCompact ?
"|" :
",");
3732 return inOutStream <<
"}";
3736 { ostringstream oss;
3746 result.insert(audSys);
3754 if (result.find(it->registerNumber) == result.end())
3755 result.insert(it->registerNumber);
3762 if (iter->registerNumber == inRegNum)
3764 return inRegInfos.end();
3770 return inObj.
Print(inOutStream);
3776 inOutStream << inObj.size () <<
" regs:" << endl;
3778 inOutStream << *iter << endl;
3785 mIsWriting (inDoWrite),
3791 *pRegInfo = inBankSelect;
3794 *pRegInfo = inOutRegInfo;
3807 if (
ULWord(inIndex0) < maxNum)
3808 result = pRegInfos[inIndex0];
3820 if (
mInBankInfos) oss << *pBankRegInfo;
else oss <<
"-";
3821 oss <<
" regInfos=";
3822 if (
mInRegInfos) oss << *pRegInfo;
else oss <<
"-";
3829 static NTV2StringList sOpStrs = {
"(invalid)",
"Subscribe",
"Unsubscribe",
"Enable",
"Disable",
3830 "GetSubscribed",
"GetEnabledIDs",
"GetIntCount",
"SetIntCount"};
3831 return op < sOpStrs.size() ? sOpStrs.at(op) :
aja::to_string(op);
3841 return string(
pName);
3848 if (mask & uint64_t(1ULL <<
id))
3855 mOperation (kOpINVALID),
3861 mClientID (uint64_t(pClient)),
3865 mHandles (nullptr,0)
3908 return msg.
print(oss);
3915 mIsWriting (inDoWrite),
3916 mVirtualData (inVirtualData, inVirtualDataSize)
3931 mMessage (inMessage, inMessageSize),
3970 #define AsU8Ref(_x_) reinterpret_cast<uint8_t&>(_x_) 3971 #define AsU16Ref(_x_) reinterpret_cast<uint16_t&>(_x_) 3972 #define AsU32Ref(_x_) reinterpret_cast<uint32_t&>(_x_) 3973 #define AsU64Ref(_x_) reinterpret_cast<uint64_t&>(_x_) 3979 PUSHU32(fHeaderVersion, outBlob);
3981 PUSHU32(fSizeInBytes, outBlob);
3982 PUSHU32(fPointerSize, outBlob);
3984 PUSHU32(fResultStatus, outBlob);
3990 POPU32(fHeaderTag, inBlob, inOutIndex);
3991 POPU32(fType, inBlob, inOutIndex);
3992 POPU32(fHeaderVersion, inBlob, inOutIndex);
3993 POPU32(fVersion, inBlob, inOutIndex);
3995 POPU32(v32, inBlob, inOutIndex);
3996 POPU32(fPointerSize, inBlob, inOutIndex);
3997 POPU32(fOperation, inBlob, inOutIndex);
3998 POPU32(fResultStatus, inBlob, inOutIndex);
4004 PUSHU32(fTrailerVersion, outBlob);
4005 PUSHU32(fTrailerTag, outBlob);
4011 POPU32(fTrailerVersion, inBlob, inOutIndex);
4012 POPU32(fTrailerTag, inBlob, inOutIndex);
4021 if (!IsNULL() && fillBuffer)
4028 ULWord byteCount(0), flags(0);
4029 POPU32(byteCount, inBlob, inOutIndex);
4030 POPU32(flags, inBlob, inOutIndex);
4035 if ((inOutIndex + byteCount) > inBlob.size())
4037 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
4038 inOutIndex += byteCount;
4046 ULWord byteCount(0), flags(0);
4047 POPU32(byteCount, inBlob, inOutIndex);
4048 POPU32(flags, inBlob, inOutIndex);
4049 if ((inOutIndex + byteCount) > inBlob.size())
4052 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
4053 inOutIndex += byteCount;
4059 const size_t totBytes (mHeader.GetSizeInBytes()
4060 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
4061 if (outBlob.capacity() < totBytes)
4062 outBlob.reserve(totBytes);
4065 mInRegisters.ByteSwap32();
4067 bool ok = mHeader.RPCEncode(outBlob);
4068 PUSHU32(mInNumRegisters, outBlob);
4069 ok &= mInRegisters.RPCEncode(outBlob,
true);
4070 PUSHU32(mOutNumRegisters, outBlob);
4071 ok &= mOutGoodRegisters.RPCEncode(outBlob,
false)
4072 && mOutValues.RPCEncode(outBlob,
false)
4073 && mTrailer.RPCEncode(outBlob);
4076 mInRegisters.ByteSwap32();
4083 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4084 if (!ok)
return false;
4085 POPU32(mInNumRegisters, inBlob, inOutIndex);
4086 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
true);
4087 POPU32(mOutNumRegisters, inBlob, inOutIndex);
4088 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
false);
4089 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
false);
4090 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4093 mInRegisters.ByteSwap32();
4100 const size_t totBytes (mHeader.GetSizeInBytes()
4101 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
4102 if (outBlob.capacity() < totBytes)
4103 outBlob.reserve(totBytes);
4106 mOutGoodRegisters.ByteSwap32();
4107 mOutValues.ByteSwap32();
4109 bool ok = mHeader.RPCEncode(outBlob);
4110 PUSHU32(mInNumRegisters, outBlob);
4111 ok &= mInRegisters.RPCEncode(outBlob,
false);
4112 PUSHU32(mOutNumRegisters, outBlob);
4113 ok &= mOutGoodRegisters.RPCEncode(outBlob,
true)
4114 && mOutValues.RPCEncode(outBlob,
true)
4115 && mTrailer.RPCEncode(outBlob);
4118 mOutGoodRegisters.ByteSwap32();
4119 mOutValues.ByteSwap32();
4126 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4127 if (!ok)
return false;
4128 POPU32(mInNumRegisters, inBlob, inOutIndex);
4129 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
false);
4130 POPU32(mOutNumRegisters, inBlob, inOutIndex);
4131 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
true);
4132 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
true);
4133 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4136 mOutGoodRegisters.ByteSwap32();
4137 mOutValues.ByteSwap32();
4144 const size_t totBytes (mHeader.GetSizeInBytes()
4145 + mInRegInfos.GetByteCount() + mOutBadRegIndexes.GetByteCount());
4146 if (outBlob.capacity() < totBytes)
4147 outBlob.reserve(totBytes);
4150 mInRegInfos.ByteSwap32();
4151 mOutBadRegIndexes.ByteSwap32();
4153 bool ok = mHeader.RPCEncode(outBlob);
4154 PUSHU32(mInNumRegisters, outBlob);
4155 ok &= mInRegInfos.RPCEncode(outBlob);
4156 PUSHU32(mOutNumFailures, outBlob);
4157 ok &= mOutBadRegIndexes.RPCEncode(outBlob)
4158 && mTrailer.RPCEncode(outBlob);
4161 mInRegInfos.ByteSwap32();
4162 mOutBadRegIndexes.ByteSwap16();
4169 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4170 POPU32(mInNumRegisters, inBlob, inOutIndex);
4171 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
4172 POPU32(mOutNumFailures, inBlob, inOutIndex);
4173 ok &= mOutBadRegIndexes.RPCDecode(inBlob, inOutIndex);
4174 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4177 mInRegInfos.ByteSwap32();
4178 mOutBadRegIndexes.ByteSwap16();
4185 const size_t totBytes (mHeader.GetSizeInBytes()
4186 + mInBankInfos.GetByteCount() + mInRegInfos.GetByteCount());
4187 if (outBlob.capacity() < totBytes)
4188 outBlob.reserve(totBytes);
4191 mInBankInfos.ByteSwap32();
4192 mInRegInfos.ByteSwap32();
4194 bool ok = mHeader.RPCEncode(outBlob);
4196 ok &= mInBankInfos.RPCEncode(outBlob);
4197 ok &= mInRegInfos.RPCEncode(outBlob)
4198 && mTrailer.RPCEncode(outBlob);
4201 mInBankInfos.ByteSwap32();
4202 mInRegInfos.ByteSwap32();
4209 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4210 POPU32(mIsWriting, inBlob, inOutIndex);
4211 ok &= mInBankInfos.RPCDecode(inBlob, inOutIndex);
4212 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
4213 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4216 mInBankInfos.ByteSwap32();
4217 mInRegInfos.ByteSwap32();
4224 const size_t totBytes (mHeader.GetSizeInBytes()
4225 + mHandles.GetByteCount());
4226 if (outBlob.capacity() < totBytes)
4227 outBlob.reserve(totBytes);
4230 ok &= mHandles.ByteSwap64();
4231 ok &= mHeader.RPCEncode(outBlob);
4234 PUSHU32(mInterruptID, outBlob);
4236 PUSHU64(mInterruptIDs, outBlob);
4237 PUSHU64(mEventHandle, outBlob);
4242 ok &= mHandles.RPCEncode(outBlob);
4243 ok &= mTrailer.RPCEncode(outBlob);
4245 ok &= mHandles.ByteSwap64();
4251 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4252 ok &=
POPU32(mOperation, inBlob, inOutIndex);
4253 ok &=
POPU32(mFlags, inBlob, inOutIndex);
4254 ok &=
POPU32(mInterruptID, inBlob, inOutIndex);
4255 ok &=
POPU32(mResult, inBlob, inOutIndex);
4256 ok &=
POPU64(mInterruptIDs, inBlob, inOutIndex);
4257 ok &=
POPU64(mEventHandle, inBlob, inOutIndex);
4258 ok &=
POPU64(mClientID, inBlob, inOutIndex);
4259 ok &=
POPU64(mClientPID, inBlob, inOutIndex);
4260 ok &=
POPU64(mClientTID, inBlob, inOutIndex);
4261 ok &=
POPU32(mCount, inBlob, inOutIndex);
4262 ok &= mHandles.RPCDecode(inBlob, inOutIndex);
4263 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4265 mHandles.ByteSwap64();
4271 const size_t totBytes (acHeader.GetSizeInBytes());
4272 if (outBlob.capacity() < totBytes)
4273 outBlob.reserve(totBytes);
4274 bool ok = acHeader.RPCEncode(outBlob);
4280 PUSHU64(acRDTSCStartTime, outBlob);
4281 PUSHU64(acAudioClockStartTime, outBlob);
4282 PUSHU64(acRDTSCCurrentTime, outBlob);
4283 PUSHU64(acAudioClockCurrentTime, outBlob);
4284 PUSHU32(acFramesProcessed, outBlob);
4285 PUSHU32(acFramesDropped, outBlob);
4286 PUSHU32(acBufferLevel, outBlob);
4287 PUSHU32(acOptionFlags, outBlob);
4289 ok &= acTrailer.RPCEncode(outBlob);
4294 { uint16_t v16(0); uint32_t v32(0);
4295 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4296 POPU16(v16, inBlob, inOutIndex);
4298 POPU16(v16, inBlob, inOutIndex);
4300 POPU32(v32, inBlob, inOutIndex);
4301 acStartFrame =
LWord(v32);
4302 POPU32(v32, inBlob, inOutIndex);
4303 acEndFrame =
LWord(v32);
4304 POPU32(v32, inBlob, inOutIndex);
4305 acActiveFrame =
LWord(v32);
4306 POPU64(acRDTSCStartTime, inBlob, inOutIndex);
4307 POPU64(acAudioClockStartTime, inBlob, inOutIndex);
4308 POPU64(acRDTSCCurrentTime, inBlob, inOutIndex);
4309 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4310 POPU32(acFramesProcessed, inBlob, inOutIndex);
4311 POPU32(acFramesDropped, inBlob, inOutIndex);
4312 POPU32(acBufferLevel, inBlob, inOutIndex);
4313 POPU32(acOptionFlags, inBlob, inOutIndex);
4314 POPU16(v16, inBlob, inOutIndex);
4316 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4322 const size_t totBytes (acHeader.GetSizeInBytes());
4323 if (outBlob.capacity() < totBytes)
4324 outBlob.reserve(totBytes);
4325 bool ok = acHeader.RPCEncode(outBlob);
4327 PUSHU32(acRequestedFrame, outBlob);
4328 PUSHU64(acAudioClockTimeStamp, outBlob);
4329 PUSHU32(acAudioExpectedAddress, outBlob);
4330 PUSHU32(acAudioInStartAddress, outBlob);
4331 PUSHU32(acAudioInStopAddress, outBlob);
4332 PUSHU32(acAudioOutStopAddress, outBlob);
4333 PUSHU32(acAudioOutStartAddress, outBlob);
4334 PUSHU32(acTotalBytesTransferred, outBlob);
4335 PUSHU32(acStartSample, outBlob);
4337 ok &= acTimeCodes.RPCEncode(outBlob);
4339 PUSHU32(acCurrentFrame, outBlob);
4341 PUSHU64(acAudioClockCurrentTime, outBlob);
4342 PUSHU32(acCurrentAudioExpectedAddress, outBlob);
4343 PUSHU32(acCurrentAudioStartAddress, outBlob);
4344 PUSHU32(acCurrentFieldCount, outBlob);
4345 PUSHU32(acCurrentLineCount, outBlob);
4346 PUSHU32(acCurrentReps, outBlob);
4347 PUSHU64(acCurrentUserCookie, outBlob);
4349 PUSHU32(acRP188.fDBB, outBlob);
4350 PUSHU32(acRP188.fLo, outBlob);
4351 PUSHU32(acRP188.fHi, outBlob);
4352 ok &= acTrailer.RPCEncode(outBlob);
4358 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4359 POPU64(v64, inBlob, inOutIndex);
4361 POPU32(acRequestedFrame, inBlob, inOutIndex);
4362 POPU64(acAudioClockTimeStamp, inBlob, inOutIndex);
4363 POPU32(acAudioExpectedAddress, inBlob, inOutIndex);
4364 POPU32(acAudioInStartAddress, inBlob, inOutIndex);
4365 POPU32(acAudioInStopAddress, inBlob, inOutIndex);
4366 POPU32(acAudioOutStopAddress, inBlob, inOutIndex);
4367 POPU32(acAudioOutStartAddress, inBlob, inOutIndex);
4368 POPU32(acTotalBytesTransferred, inBlob, inOutIndex);
4369 POPU32(acStartSample, inBlob, inOutIndex);
4371 ok &= acTimeCodes.RPCDecode(inBlob, inOutIndex);
4372 POPU64(v64, inBlob, inOutIndex);
4374 POPU32(acCurrentFrame, inBlob, inOutIndex);
4375 POPU64(v64, inBlob, inOutIndex);
4376 acCurrentFrameTime =
LWord64(v64);
4377 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4378 POPU32(acCurrentAudioExpectedAddress, inBlob, inOutIndex);
4379 POPU32(acCurrentAudioStartAddress, inBlob, inOutIndex);
4380 POPU32(acCurrentFieldCount, inBlob, inOutIndex);
4381 POPU32(acCurrentLineCount, inBlob, inOutIndex);
4382 POPU32(acCurrentReps, inBlob, inOutIndex);
4383 POPU64(acCurrentUserCookie, inBlob, inOutIndex);
4384 POPU32(acFrame, inBlob, inOutIndex);
4385 POPU32(acRP188.fDBB, inBlob, inOutIndex);
4386 POPU32(acRP188.fLo, inBlob, inOutIndex);
4387 POPU32(acRP188.fHi, inBlob, inOutIndex);
4388 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4394 const size_t totBytes (acHeader.GetSizeInBytes());
4395 if (outBlob.capacity() < totBytes)
4396 outBlob.reserve(totBytes);
4397 bool ok = acHeader.RPCEncode(outBlob);
4400 PUSHU32(acBufferLevel, outBlob);
4401 PUSHU32(acFramesProcessed, outBlob);
4402 PUSHU32(acFramesDropped, outBlob);
4403 ok &= acFrameStamp.RPCEncode(outBlob);
4404 PUSHU32(acAudioTransferSize, outBlob);
4405 PUSHU32(acAudioStartSample, outBlob);
4406 PUSHU32(acAncTransferSize, outBlob);
4407 PUSHU32(acAncField2TransferSize, outBlob);
4408 ok &= acTrailer.RPCEncode(outBlob);
4413 { uint16_t v16(0); uint32_t v32(0);
4414 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4415 POPU16(v16, inBlob, inOutIndex);
4417 POPU32(v32, inBlob, inOutIndex);
4418 acTransferFrame =
LWord(v32);
4419 POPU32(acBufferLevel, inBlob, inOutIndex);
4420 POPU32(acFramesProcessed, inBlob, inOutIndex);
4421 POPU32(acFramesDropped, inBlob, inOutIndex);
4422 ok &= acFrameStamp.RPCDecode(inBlob, inOutIndex);
4423 POPU32(acAudioTransferSize, inBlob, inOutIndex);
4424 POPU32(acAudioStartSample, inBlob, inOutIndex);
4425 POPU32(acAncTransferSize, inBlob, inOutIndex);
4426 POPU32(acAncField2TransferSize, inBlob, inOutIndex);
4427 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4433 PUSHU32(acNumSegments, outBlob);
4434 PUSHU32(acNumActiveBytesPerRow, outBlob);
4435 PUSHU32(acSegmentHostPitch, outBlob);
4436 PUSHU32(acSegmentDevicePitch, outBlob);
4442 POPU32(acNumSegments, inBlob, inOutIndex);
4443 POPU32(acNumActiveBytesPerRow, inBlob, inOutIndex);
4444 POPU32(acSegmentHostPitch, inBlob, inOutIndex);
4445 POPU32(acSegmentDevicePitch, inBlob, inOutIndex);
4452 PUSHU32(ccSaturationValue, outBlob);
4453 return ccLookupTables.RPCEncode(outBlob);
4458 POPU16(u16, inBlob, inOutIndex);
4460 POPU32(ccSaturationValue, inBlob, inOutIndex);
4461 return ccLookupTables.RPCDecode(inBlob, inOutIndex);
4467 PUSHU16(foregroundVideoCrosspoint, outBlob);
4468 PUSHU16(backgroundVideoCrosspoint, outBlob);
4469 PUSHU16(foregroundKeyCrosspoint, outBlob);
4470 PUSHU16(backgroundKeyCrosspoint, outBlob);
4477 { uint16_t v16(0); uint32_t v32(0);
4478 POPU16(v16, inBlob, inOutIndex);
4480 POPU16(v16, inBlob, inOutIndex);
4482 POPU16(v16, inBlob, inOutIndex);
4484 POPU16(v16, inBlob, inOutIndex);
4486 POPU16(v16, inBlob, inOutIndex);
4488 POPU32(v32, inBlob, inOutIndex);
4489 transitionCoefficient =
Fixed_(v32);
4490 POPU32(v32, inBlob, inOutIndex);
4491 transitionSoftness =
Fixed_(v32);
4505 POPU32(fDBB, inBlob, inOutIndex);
4506 POPU32(fLo, inBlob, inOutIndex);
4507 POPU32(fHi, inBlob, inOutIndex);
4514 const size_t totBytes (acHeader.GetSizeInBytes() + acVideoBuffer.GetByteCount() + acAudioBuffer.GetByteCount()
4515 + acANCBuffer.GetByteCount() + acANCField2Buffer.GetByteCount() + acOutputTimeCodes.GetByteCount()
4516 + acHDMIAuxData.GetByteCount() + 64);
4517 if (outBlob.capacity() < totBytes)
4518 outBlob.reserve(totBytes);
4519 bool ok = acHeader.RPCEncode(outBlob);
4520 ok &= acVideoBuffer.RPCEncode(outBlob);
4521 ok &= acAudioBuffer.RPCEncode(outBlob);
4522 ok &= acANCBuffer.RPCEncode(outBlob);
4523 ok &= acANCField2Buffer.RPCEncode(outBlob);
4524 ok &= acOutputTimeCodes.RPCEncode(outBlob);
4525 ok &= acTransferStatus.RPCEncode(outBlob);
4526 PUSHU64(acInUserCookie, outBlob);
4527 PUSHU32(acInVideoDMAOffset, outBlob);
4528 ok &= acInSegmentedDMAInfo.RPCEncode(outBlob);
4529 ok &= acColorCorrection.RPCEncode(outBlob);
4530 PUSHU16(acFrameBufferFormat, outBlob);
4531 PUSHU16(acFrameBufferOrientation, outBlob);
4532 ok &= acVidProcInfo.RPCEncode(outBlob);
4533 PUSHU16(acVideoQuarterSizeExpand, outBlob);
4534 ok &= acHDMIAuxData.RPCEncode(outBlob);
4535 PUSHU32(acPeerToPeerFlags, outBlob);
4536 PUSHU32(acFrameRepeatCount, outBlob);
4538 ok &= acRP188.RPCEncode(outBlob);
4539 PUSHU16(acCrosspoint, outBlob);
4540 ok &= acTrailer.RPCEncode(outBlob);
4546 { uint16_t v16(0); uint32_t v32(0);
4548 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4549 ok &= acVideoBuffer.RPCDecode(inBlob, inOutIndex);
4550 ok &= acAudioBuffer.RPCDecode(inBlob, inOutIndex);
4551 ok &= acANCBuffer.RPCDecode(inBlob, inOutIndex);
4552 ok &= acANCField2Buffer.RPCDecode(inBlob, inOutIndex);
4553 ok &= acOutputTimeCodes.RPCDecode(inBlob, inOutIndex);
4554 ok &= acTransferStatus.RPCDecode(inBlob, inOutIndex);
4555 POPU64(acInUserCookie, inBlob, inOutIndex);
4556 POPU32(acInVideoDMAOffset, inBlob, inOutIndex);
4557 ok &= acInSegmentedDMAInfo.RPCDecode(inBlob, inOutIndex);
4558 ok &= acColorCorrection.RPCDecode(inBlob, inOutIndex);
4559 POPU16(v16, inBlob, inOutIndex);
4561 POPU16(v16, inBlob, inOutIndex);
4563 ok &= acVidProcInfo.RPCDecode(inBlob, inOutIndex);
4564 POPU16(v16, inBlob, inOutIndex);
4566 ok &= acHDMIAuxData.RPCDecode(inBlob, inOutIndex);
4567 POPU32(acPeerToPeerFlags, inBlob, inOutIndex);
4568 POPU32(acFrameRepeatCount, inBlob, inOutIndex);
4569 POPU32(v32, inBlob, inOutIndex);
4570 acDesiredFrame =
LWord(v32);
4571 ok &= acRP188.RPCDecode(inBlob, inOutIndex);
4572 POPU16(v16, inBlob, inOutIndex);
4574 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4584 PUSHU32(videoBufferSize, outBlob);
4585 if (videoBuffer && videoBufferSize)
4586 { buff.
Set(videoBuffer, videoBufferSize);
4589 PUSHU32(videoDmaOffset, outBlob);
4591 PUSHU32(audioBufferSize, outBlob);
4592 if (audioBuffer && audioBufferSize)
4593 { buff.
Set(audioBuffer, audioBufferSize);
4596 PUSHU32(audioStartSample, outBlob);
4597 PUSHU32(audioNumChannels, outBlob);
4598 PUSHU32(frameRepeatCount, outBlob);
4599 rp188.RPCEncode(outBlob);
4602 PUSHU32(transferFlags, outBlob);
4603 PUSHU8(bDisableExtraAudioInfo, outBlob);
4607 vidProcInfo.RPCEncode(outBlob);
4608 PUSHU32(customAncInfo.Group1, outBlob);
4609 PUSHU32(customAncInfo.Group2, outBlob);
4610 PUSHU32(customAncInfo.Group3, outBlob);
4611 PUSHU32(customAncInfo.Group4, outBlob);
4612 PUSHU32(videoNumSegments, outBlob);
4613 PUSHU32(videoSegmentHostPitch, outBlob);
4614 PUSHU32(videoSegmentCardPitch, outBlob);
4621 POPU16(v16, inBlob, inOutIndex);
4625 POPU32(videoBufferSize, inBlob, inOutIndex);
4626 if (videoBufferSize && !videoBuffer)
4631 if ((inOutIndex + videoBufferSize) >= inBlob.size())
4633 UByte* pBuffer =
reinterpret_cast<UByte*
>(videoBuffer);
4634 for (
ULWord cnt(0); cnt < videoBufferSize; cnt++)
4635 pBuffer[cnt] = inBlob.at(inOutIndex++);
4637 POPU32(videoDmaOffset, inBlob, inOutIndex);
4640 POPU32(audioBufferSize, inBlob, inOutIndex);
4641 if (audioBufferSize && !audioBuffer)
4646 if ((inOutIndex + audioBufferSize) >= inBlob.size())
4648 UByte* pBuffer =
reinterpret_cast<UByte*
>(audioBuffer);
4649 for (
ULWord cnt(0); cnt < audioBufferSize; cnt++)
4650 pBuffer[cnt] = inBlob.at(inOutIndex++);
4652 POPU32(audioStartSample, inBlob, inOutIndex);
4653 POPU32(audioNumChannels, inBlob, inOutIndex);
4654 POPU32(frameRepeatCount, inBlob, inOutIndex);
4655 rp188.RPCDecode(inBlob, inOutIndex);
4656 POPU32(v32, inBlob, inOutIndex);
4657 desiredFrame =
LWord(v32);
4658 POPU32(hUser, inBlob, inOutIndex);
4659 POPU32(transferFlags, inBlob, inOutIndex);
4660 POPU8(
AsU8Ref(bDisableExtraAudioInfo), inBlob, inOutIndex);
4661 POPU16(v16, inBlob, inOutIndex);
4663 POPU16(v16, inBlob, inOutIndex);
4666 vidProcInfo.RPCDecode(inBlob, inOutIndex);
4667 POPU32(customAncInfo.Group1, inBlob, inOutIndex);
4668 POPU32(customAncInfo.Group2, inBlob, inOutIndex);
4669 POPU32(customAncInfo.Group3, inBlob, inOutIndex);
4670 POPU32(customAncInfo.Group4, inBlob, inOutIndex);
4671 POPU32(videoNumSegments, inBlob, inOutIndex);
4672 POPU32(videoSegmentHostPitch, inBlob, inOutIndex);
4673 POPU32(videoSegmentCardPitch, inBlob, inOutIndex);
4674 POPU16(v16, inBlob, inOutIndex);
4681 const size_t totBytes (mHeader.GetSizeInBytes());
4682 if (outBlob.capacity() < totBytes)
4683 outBlob.reserve(totBytes);
4684 bool ok = mHeader.RPCEncode(outBlob);
4685 ok &= mBuffer.RPCEncode(outBlob);
4688 for (
size_t ndx(0); ndx < 16; ndx++)
4689 PUSHU32(mRegisters[ndx], outBlob);
4690 for (
size_t ndx(0); ndx < 32; ndx++)
4691 PUSHU32(mReserved[ndx], outBlob);
4692 ok &= mTrailer.RPCEncode(outBlob);
4698 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4699 ok &= mBuffer.RPCDecode(inBlob, inOutIndex);
4700 POPU32(mFlags, inBlob, inOutIndex);
4701 POPU32(mStatus, inBlob, inOutIndex);
4702 for (
size_t ndx(0); ndx < 16; ndx++)
4703 POPU32(mRegisters[ndx], inBlob, inOutIndex);
4704 for (
size_t ndx(0); ndx < 16; ndx++)
4705 POPU32(mReserved[ndx], inBlob, inOutIndex);
4706 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4717 PUSHU64(rdtscStartTime, outBlob);
4718 PUSHU64(audioClockStartTime, outBlob);
4719 PUSHU64(rdtscCurrentTime, outBlob);
4720 PUSHU64(audioClockCurrentTime, outBlob);
4721 PUSHU32(framesProcessed, outBlob);
4722 PUSHU32(framesDropped, outBlob);
4723 PUSHU32(bufferLevel, outBlob);
4724 PUSHU8(bWithAudio, outBlob);
4725 PUSHU8(bWithRP188, outBlob);
4726 PUSHU8(bFbfChange, outBlob);
4727 PUSHU8(bFboChange, outBlob);
4728 PUSHU8(bWithColorCorrection, outBlob);
4729 PUSHU8(bWithVidProc, outBlob);
4730 PUSHU8(bWithCustomAncData, outBlob);
4735 { uint16_t v16(0); uint32_t v32(0);
4736 POPU16(v16, inBlob, inOutIndex);
4738 POPU16(v16, inBlob, inOutIndex);
4740 POPU32(v32, inBlob, inOutIndex);
4741 startFrame =
LWord(v32);
4742 POPU32(v32, inBlob, inOutIndex);
4743 endFrame =
LWord(v32);
4744 POPU32(v32, inBlob, inOutIndex);
4745 activeFrame =
LWord(v32);
4746 POPU64(rdtscStartTime, inBlob, inOutIndex);
4747 POPU64(audioClockStartTime, inBlob, inOutIndex);
4748 POPU64(rdtscCurrentTime, inBlob, inOutIndex);
4749 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4750 POPU32(framesProcessed, inBlob, inOutIndex);
4751 POPU32(framesDropped, inBlob, inOutIndex);
4752 POPU32(bufferLevel, inBlob, inOutIndex);
4757 POPU8(
AsU8Ref(bWithColorCorrection), inBlob, inOutIndex);
4759 POPU8(
AsU8Ref(bWithCustomAncData), inBlob, inOutIndex);
4773 POPU32(DBB, inBlob, inOutIndex);
4774 POPU32(Low, inBlob, inOutIndex);
4775 POPU32(High, inBlob, inOutIndex);
4782 PUSHU32(taskVersion, outBlob);
4787 if (taskArray && numTasks)
4788 for (
ULWord num(0); num < numTasks; num++)
4792 const ULWord * pULWords =
reinterpret_cast<const ULWord*
>(&task.
u);
4798 for (
ULWord word(0); word < numWords; word++)
4799 PUSHU32(pULWords[word], outBlob);
4806 POPU32(taskVersion, inBlob, inOutIndex);
4807 POPU32(taskSize, inBlob, inOutIndex);
4808 POPU32(numTasks, inBlob, inOutIndex);
4809 POPU32(maxTasks, inBlob, inOutIndex);
4810 POPU64(u64, inBlob, inOutIndex);
4812 if (taskArray && numTasks)
4813 for (
ULWord num(0); num < numTasks; num++)
4816 POPU32(u32, inBlob, inOutIndex);
4824 for (
ULWord word(0); word < numWords; word++)
4825 POPU32(pULWords[word], inBlob, inOutIndex);
4835 PUSHU64(audioClockTimeStamp, outBlob);
4836 PUSHU32(audioExpectedAddress, outBlob);
4837 PUSHU32(audioInStartAddress, outBlob);
4838 PUSHU32(audioInStopAddress, outBlob);
4839 PUSHU32(audioOutStopAddress, outBlob);
4840 PUSHU32(audioOutStartAddress, outBlob);
4842 PUSHU32(startSample, outBlob);
4844 PUSHU32(currentFrame, outBlob);
4845 currentRP188.RPCEncode(outBlob);
4847 PUSHU64(audioClockCurrentTime, outBlob);
4848 PUSHU32(currentAudioExpectedAddress, outBlob);
4849 PUSHU32(currentAudioStartAddress, outBlob);
4850 PUSHU32(currentFieldCount, outBlob);
4851 PUSHU32(currentLineCount, outBlob);
4852 PUSHU32(currentReps, outBlob);
4853 PUSHU32(currenthUser, outBlob);
4858 { uint16_t v16(0); uint64_t v64(0);
4859 POPU16(v16, inBlob, inOutIndex);
4861 POPU64(v64, inBlob, inOutIndex);
4863 POPU32(frame, inBlob, inOutIndex);
4864 POPU64(audioClockTimeStamp, inBlob, inOutIndex);
4865 POPU32(audioExpectedAddress, inBlob, inOutIndex);
4866 POPU32(audioInStartAddress, inBlob, inOutIndex);
4867 POPU32(audioInStopAddress, inBlob, inOutIndex);
4868 POPU32(audioOutStopAddress, inBlob, inOutIndex);
4869 POPU32(audioOutStartAddress, inBlob, inOutIndex);
4870 POPU32(bytesRead, inBlob, inOutIndex);
4871 POPU32(startSample, inBlob, inOutIndex);
4872 POPU64(v64, inBlob, inOutIndex);
4874 POPU32(currentFrame, inBlob, inOutIndex);
4875 currentRP188.RPCDecode(inBlob, inOutIndex);
4876 POPU64(v64, inBlob, inOutIndex);
4877 currentFrameTime =
LWord64(v64);
4878 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4879 POPU32(currentAudioExpectedAddress, inBlob, inOutIndex);
4880 POPU32(currentAudioStartAddress, inBlob, inOutIndex);
4881 POPU32(currentFieldCount, inBlob, inOutIndex);
4882 POPU32(currentLineCount, inBlob, inOutIndex);
4883 POPU32(currentReps, inBlob, inOutIndex);
4884 POPU32(currenthUser, inBlob, inOutIndex);
4913 reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->
RPCEncode(outBlob);
4923 #if defined(AJA_LINUX) 4924 #pragma GCC diagnostic push 4925 #pragma GCC diagnostic ignored "-Wstrict-aliasing" 4927 uint16_t v16(0); uint32_t v32(0);
4928 POPU16(v16, inBlob, inOutIndex);
4930 POPU16(v16, inBlob, inOutIndex);
4932 POPU32(v32, inBlob, inOutIndex); lVal1 =
LWord(v32);
4933 POPU32(v32, inBlob, inOutIndex); lVal2 =
LWord(v32);
4934 POPU32(v32, inBlob, inOutIndex); lVal3 =
LWord(v32);
4935 POPU32(v32, inBlob, inOutIndex); lVal4 =
LWord(v32);
4936 POPU32(v32, inBlob, inOutIndex); lVal5 =
LWord(v32);
4937 POPU32(v32, inBlob, inOutIndex); lVal6 =
LWord(v32);
4950 #if defined(AJA_LINUX) 4951 #pragma GCC diagnostic pop 4956 reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->
RPCDecode(inBlob, inOutIndex);
NTV2_RP188 acRP188
Will be deprecated – use AUTOCIRCULATE_TRANSFER::SetOutputTimeCode instead.
bool AppendU8s(UByteSequence &outU8s) const
Appends my contents to an existing UByteSequence.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2Channel mChannel
Stream channel.
bool SetOutputTimeCodes(const NTV2TimeCodes &inValues)
Intended for playout, replaces the contents of my acOutputTimeCodes member.
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
NTV2SegmentedXferInfo & setSourceDirection(const bool inTopDown)
Sets the scan direction for the source.
NTV2AutoCirculateState state
ULWord acCurrentAudioStartAddress
As set by play.
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device...
#define NTV2_TYPE_MESSAGE_DATA
Identifies NTV2MessageData struct.
const char * NTV2InterruptEnumString(const unsigned inInterruptEnum)
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
bool GetBadRegisters(NTV2RegNumSet &outBadRegNums) const
Returns the set of register numbers that were not read successfully.
NTV2StandardSet::const_iterator NTV2StandardSetConstIter
A handy const iterator for iterating over an NTV2StandardSet.
#define NTV2_TYPE_AJABITSTREAM
Identifies NTV2Bitstream struct.
ULWord mFlags
Action flags.
ULWord audioInStopAddress
For record - end position (exclusive) in buffer of audio (includes base offset)
std::string NTV2FrameGeometryToString(const NTV2FrameGeometry inValue, const bool inForRetailDisplay=false)
bool GetRequestedRegisterNumbers(NTV2RegNumSet &outRegNums) const
Answers with the set of register numbers that were requested.
std::string NTV2AudioSystemToString(const NTV2AudioSystem inValue, const bool inCompactDisplay=false)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
ULWord frame
The frame requested or -1 if not available.
NTV2Buffer mHandles
Optional buffer to store subscribed HANDLEs.
#define NTV2EndianSwap64(__val__)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
std::string NTV2HDMIBitDepthToString(const NTV2HDMIBitDepth inValue, const bool inCompactDisplay=false)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
std::string operator[](const unsigned inIndexNum) const
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
#define AJA_NTV2_SDK_BUILD_NUMBER
The SDK build number, an unsigned decimal integer.
bool IsOutput(void) const
#define NTV2_HEADER_TAG
Identifies the struct header.
ULWord acCurrentFrame
Last vertical blank frame for this autocirculate channel (when CNTV2Card::AutoCirculateGetFrameStamp ...
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
bool CopyTo(FRAME_STAMP_STRUCT &outOldStruct) const
Copies my fields into the given FRAME_STAMP_STRUCT.
bool PutU16s(const UWordSequence &inU16s, const size_t inU16Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 16-bit values into me.
Specifies SDI input/output kinds.
std::set< NTV2TCIndex > NTV2TCIndexes
ULWord currentAudioStartAddress
As found by isr.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
FRAME_STAMP()
Constructs a default FRAME_STAMP structure.
bool Allocate(const size_t inByteCount, const bool inPageAligned=false)
Allocates (or re-allocates) my user-space storage using the given byte count. I assume full responsib...
ULWord64 acInUserCookie
Intended for playout, an optional app-specific cookie value that tags this frame, such that if this s...
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::LoadBitstream.
#define NTV2HostIsBigEndian
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool GetSDIInputStatus(NTV2SDIInputStatus &outStatus, const UWord inSDIInputIndex0=0) const
Answers with the NTV2SDIInputStatus for the given SDI input spigot.
NTV2Buffer & operator=(const NTV2Buffer &inRHS)
Assigns me from another NTV2Buffer instance.
LWord64 currentTime
Current processor time ... on Windows, this is derived from KeQueryPerformanceCounter.
NTV2SetRegisters(const NTV2RegWrites &inRegWrites=NTV2RegWrites())
Constructs an NTV2SetRegisters struct from the given NTV2RegisterWrites collection.
Declares the AJAMemory class.
std::set< NTV2FrameRate > NTV2FrameRateSet
A set of distinct NTV2FrameRate values. New in SDK 17.0.
NTV2StreamBuffer()
Constructs a default NTV2StreamBuffer struct.
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
mVideoBuffer Allocate(mFormatDesc.GetTotalRasterBytes())
std::ostream & Print(std::ostream &inStrm, const bool inDumpSegments=false) const
Writes a human-readable description of me into a given output stream.
void PUSHU32(const uint32_t val, RPCBlob &blob, const bool dontSwap=false)
Pushes a 32-bit value onto the given byte sequence.
bool CopyTo(AUTOCIRCULATE_STATUS_STRUCT &outOldStruct)
Copies my data into the given AUTOCIRCULATE_STATUS_STRUCT.
unsigned long long stoull(const std::string &str, std::size_t *idx, int base)
ULWord registerMask
My register mask value to use in a ReadRegister or WriteRegister call.
bool SetFrameBufferFormat(const NTV2FrameBufferFormat inNewFormat)
Sets my acFrameBufferFormat value to the given new value (if valid and circulating with AUTOCIRCULATE...
NTV2DeviceIDSet NTV2GetSupportedDevices(const NTV2DeviceKinds inKinds=NTV2_DEVICEKIND_ALL)
Returns an NTV2DeviceIDSet of devices supported by the SDK.
std::vector< double > NTV2DoubleArray
An array of double-precision floating-point values.
NTV2HDMIColorSpace
Indicates or specifies HDMI Color Space.
#define NTV2_IS_TIMECODE_TASK(_x_)
void Clear(void)
Resets the struct to its initialized state, with timecode capture disabled, freeing all buffers that ...
bool WithCustomAnc(void) const
NTV2Buffer mSharedMemory
Virtual address of AJADebug shared memory in calling process' context,.
ULWord audioOutStartAddress
For play - end position (exclusive) in buffer of audio.
NTV2RegNumSet GetRegisterNumbers(const NTV2RegReads &inRegInfos)
std::ostream & Print(std::ostream &outputStream, const bool inAsCode=false) const
Renders me to the given output stream in a human-readable format.
#define DEC0N(__x__, __n__)
ULWord getElementLength(void) const
NTV2RegInfo & setMask(const ULWord val)
string NTV2ChannelSetToStr(const NTV2ChannelSet &inObj, const bool inCompact)
1920x1080, for 1080i and 1080p, NTV2_VANCMODE_TALL
ULWord mFlags
Action flags.
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool EnableSegmentedDMAs(const ULWord inNumSegments, const ULWord inNumActiveBytesPerLine, const ULWord inHostBytesPerLine, const ULWord inDeviceBytesPerLine)
Enables segmented DMAs given a segment count, a host pitch, and device pitch value.
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
ULWord getTotalBytes(void) const
bool SetBuffers(ULWord *pInVideoBuffer, const ULWord inVideoByteCount, ULWord *pInAudioBuffer, const ULWord inAudioByteCount, ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer. ...
NTV2_HEADER acHeader
The common message header – ALWAYS FIRST!
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#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.
static bool SetDefaultPageSize(const size_t inNewSize)
Changes the default page size for use in future page-aligned allocations.
bool ByteSwap32(void)
Byte-swaps my contents 32-bits at a time.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
static std::string OpName(const ULWord op)
ULWord GetBufferLevel(void) const
NTV2StringList::const_iterator NTV2StringListConstIter
enum NTV2VideoFrameBufferOrientation NTV2FBOrientation
bool WithFBOChange(void) const
bool IsContentEqual(const NTV2Buffer &inBuffer, const ULWord inByteOffset=0, const ULWord inByteCount=0xFFFFFFFF) const
AutoCircVidProcInfo acVidProcInfo
Specifies the mixer/keyer transition to make. Ignored if AUTOCIRCULATE_WITH_VIDPROC option is not set...
bool isSourceTopDown(void) const
NTV2SDIInStatistics()
Constructs an NTV2GetSDIStatistics struct and initializes it to its default state.
void SetMaxLockSize(const ULWord64 inNumBytes)
Sets the maximum lock size for use in a subsequent call to CNTV2Card::DMABufferLock.
NTV2ConfigInterrupt & setOperation(const ULWord op)
Sets my operation; also stores caller's PID & TID.
bool ResetUsing(const NTV2RegNumSet &inRegisterNumbers)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter
A handy const interator for iterating over an NTV2TimeCodeList.
AutoCircTaskType
These are the available AutoCirculate task types.
uint32_t U32(const int inIndex) const
ULWord acAudioStartSample
Starting audio sample (valid for capture only).
ULWordSequence::const_iterator ULWordSequenceConstIter
A handy const iterator for iterating over a ULWordSequence.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
AUTOCIRCULATE_TRANSFER_STATUS()
Constructs a default AUTOCIRCULATE_TRANSFER_STATUS structure.
ULWord bytesRead
Total audio and video bytes transfered.
bool IsValid(void) const
Answers true if I'm valid, or false if I'm not valid.
ULWord GetByteCount(void) const
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
#define NTV2_TYPE_AJAMAILBUFFER
Identifies NTV2MailBuffer struct.
ULWord audioExpectedAddress
The address that was used to transfer.
Configure interrupt (subscribe/unsubscribe, enable/disable, query subscribed interrupts, query enabled interrupts, etc.).
NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex, bool fillBuffer=true)
LWord acStartFrame
First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
#define NTV2SDKVersionDecode_Minor
std::map< ULWord, ULWord > NTV2RegisterValueMap
A mapping of distinct NTV2RegisterNumbers to their corresponding ULWord values.
ULWord getDestPitch(void) const
ULWord mSpares[32]
Reserved for future use.
std::string NTV2RegisterNumberToString(const NTV2RegisterNumber inValue)
ULWordSetConstIter NTV2RegNumSetConstIter
A const iterator that iterates over a set of distinct NTV2RegisterNumbers.
bool PutU64s(const ULWord64Sequence &inU64s, const size_t inU64Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 64-bit values into me.
NTV2SegmentedDMAInfo()
Constructs a disabled NTV2SegmentedDMAInfo struct.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2Buffer acVideoBuffer
The host video buffer. This field is owned by the client application, and thus is responsible for all...
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
ULWord mIsWriting
If non-zero, virtual data will be written; otherwise, virtual data will be read.
Specifies HDMI input/output kinds.
NTV2ConfigInterrupt(const void *pClient=nullptr)
Default ctor, optionally set clientID if needed.
LWord64 acFrameTime
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
NTV2AudioSystemSet NTV2MakeAudioSystemSet(const NTV2AudioSystem inFirstAudioSystem, const UWord inCount)
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels)
ULWord ccSaturationValue
My saturation value, used only in 3-way color correction mode.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
if(!(riid==IID_IUnknown) &&!(riid==IID_IClassFactory))
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
AUTOCIRCULATE_DATA(const AUTO_CIRC_COMMAND inCommand=AUTO_CIRC_COMMAND_INVALID, const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_INVALID)
NTV2RegisterReadsConstIter FindFirstMatchingRegisterNumber(const uint32_t inRegNum, const NTV2RegisterReads &inRegInfos)
Returns a const iterator to the first entry in the NTV2RegInfo collection with a matching register nu...
std::string NTV2ColorCorrectionModeToString(const NTV2ColorCorrectionMode inValue, const bool inCompactDisplay=false)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelQuad values.
bool containsElementAtOffset(const ULWord inElementOffset) const
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
bool DisableSegmentedDMAs(void)
Disables segmented DMAs, performing a Reset on my acInSegmentedDMAInfo.
LWord64 acCurrentTime
The absolute timestamp at the moment the CNTV2Card::AutoCirculateTransfer or CNTV2Card::AutoCirculate...
Defines a number of handy byte-swapping macros.
bool GetGoodRegisters(NTV2RegNumSet &outGoodRegNums) const
Returns an NTV2RegNumSet built from my mOutGoodRegisters field.
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel) ...
bool SetOutputTimeCode(const NTV2_RP188 &inTimecode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1)
Intended for playout, sets one element of my acOutputTimeCodes member.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool NTV2DeviceCanDoFrameBufferFormat(const NTV2DeviceID inDeviceID, const NTV2FrameBufferFormat inFBFormat)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
NTV2FrameBufferFormatSet NTV2PixelFormats
#define NTV2_IS_VALID_TIMECODE_INDEX(__x__)
ULWord currentFrame
Last vertical blank frame for this channel's auto-circulate. (at the time of the IOCTL_NTV2_GET_FRAME...
ULWord mResult
Out: 0=false (fail), 1 or non-zero == true (success)
static string print_address_offset(const size_t inRadix, const ULWord64 inOffset)
bool POPU8(uint8_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx)
Pops an 8-bit value off the given byte sequence at the given zero-based index position.
2048x1080, for 2Kx1080p, NTV2_VANCMODE_TALL
FGSizesMap::const_iterator FGSizesMapCI
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
NTV2FBOrientation acFrameBufferOrientation
Specifies the frame buffer orientation to change to. Ignored if AUTOCIRCULATE_WITH_FBOCHANGE option i...
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
bool isSourceBottomUp(void) const
ULWord acInVideoDMAOffset
Optional byte offset into the device frame buffer. Defaults to zero. If non-zero, should be a multipl...
#define NTV2_TYPE_GETREGS
Identifies NTV2GetRegisters struct.
#define NTV2_COLORCORRECTOR_TABLESIZE
ULWord mTag
Tag for virtual data. This value is used to recall saved data by tag.
LWord acActiveFrame
Current frame actually being captured/played when CNTV2Card::AutoCirculateGetStatus called...
bool GetFailedRegisterWrites(NTV2RegWrites &outFailedRegWrites) const
Returns an NTV2RegisterWrites built from my mOutBadRegInfos field.
#define NTV2_TYPE_ACSTATUS
Identifies AUTOCIRCULATE_STATUS struct.
#define AJA_NTV2_SDK_VERSION_POINT
The SDK "point" release version, an unsigned decimal integer.
NTV2HDMIRange
Indicates or specifies the HDMI RGB range.
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
bool toHexString(std::string &outStr, const size_t inLineBreakInterval=0) const
Converts my contents into a hex-encoded string.
std::string NTV2AudioFormatToString(const NTV2AudioFormat inValue, const bool inCompactDisplay=false)
Describes a segmented data transfer (copy or move) from a source memory location to a destination loc...
#define NTV2_TYPE_BANKGETSET
Identifies NTV2BankSelGetSetRegs struct.
std::vector< NTV2RegInfo > NTV2RegWrites
An ordered sequence of zero or more NTV2RegInfo structs intended for WriteRegister.
virtual char do_thousands_sep() const
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Specifies devices that internally use NTV2.
NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter
A handy const iterator for iterating over an NTV2FrameRateSet.
NTV2FrameGeometry GetGeometryFromFrameDimensions(const NTV2FrameSize &inFD)
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
NTV2SegmentedXferInfo & swapSourceAndDestination(void)
Swaps my source and destination offsets, pitches and scan directions.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define NTV2_TYPE_ACXFER
Identifies AUTOCIRCULATE_TRANSFER struct.
std::set< NTV2AudioChannelQuad > NTV2AudioChannelQuads
A set of distinct NTV2AudioChannelQuad values.
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
string NTV2ChannelListToStr(const NTV2ChannelList &inObj, const bool inCompact)
std::set< NTV2Standard > NTV2StandardSet
A set of distinct NTV2Standard values.
NTV2Crosspoint acCrosspoint
Will be deprecated – used internally by the SDK. Will be removed when the driver changes to use NTV2...
bool CopyFrom(const AUTOCIRCULATE_STATUS_STRUCT &inOldStruct)
Copies the given AUTOCIRCULATE_STATUS_STRUCT into me.
ULWord GetProcessedFrameCount(void) const
#define NTV2_ASSERT(_expr_)
void PUSHU8(const uint8_t val, RPCBlob &blob)
Pushes an 8-bit value onto the given byte sequence.
std::string AsString(UWord inDumpMaxBytes=0) const
ULWord mFlags
Action flags (lock, unlock, etc)
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Returns all RP188 timecodes associated with the frame in NTV2TCIndex order.
Represents an unknown or invalid frame rate.
std::string operator[](const unsigned inIndexNum) const
std::vector< uint8_t > UByteSequence
An ordered sequence of UByte (uint8_t) values.
NTV2AutoCirculateState acState
Current AutoCirculate state after the transfer.
static AJAStatus StatTimerStop(const uint32_t inKey)
bool NTV2DeviceGetSupportedStandards(const NTV2DeviceID inDeviceID, NTV2StandardSet &outStandards)
Returns a set of distinct NTV2Standard values supported on the given device.
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
bool Truncate(const size_t inByteCount)
Truncates me to the given length. No reallocation takes place.
This struct replaces the old RP188_STRUCT.
NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter
A handy const iterator for iterating over an NTV2GeometrySet.
NTV2FrameBufferFormat NTV2PixelFormat
An alias for NTV2FrameBufferFormat.
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
NTV2ColorCorrectionMode ccMode
My mode (off, RGB, YCbCr, or 3-way)
Last virtual register slot.
NTV2_TRAILER acTrailer
The common message trailer – ALWAYS LAST!
NTV2BankSelGetSetRegs(const NTV2RegInfo &inBankSelect, const NTV2RegInfo &inRegInfo, const bool inDoWrite=false)
Constructs an NTV2BankSelGetSetRegs struct for atomically reading or writing the given bank-selected ...
ULWord regNum(void) const
unsigned long stoul(const std::string &str, std::size_t *idx, int base)
ULWord64 rdtscCurrentTime
NTV2RegInfo & setRegNum(const ULWord val)
2048x1556, for 2Kx1556psf film format, NTV2_VANCMODE_OFF
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
bool Fill(const T &inValue)
Fills me with the given scalar value.
bool Find(const T &inValue, int &inOutIndex) const
Searches me for the given scalar value of type T starting at a given index position.
bool GetString(std::string &outString, const size_t inU8Offset=0, const size_t inMaxSize=128) const
Answers with my contents as a character string.
bool GetRegisterValues(NTV2RegisterValueMap &outValues) const
Returns an NTV2RegisterValueMap built from my mOutGoodRegisters and mOutValues fields.
std::string NTV2InputSourceToString(const NTV2InputSource inValue, const bool inForRetailDisplay=false)
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
void Clear(void)
Resets me to an invalid state.
ULWord currentReps
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
std::string AutoCircVidProcModeToString(const AutoCircVidProcMode inValue, const bool inCompactDisplay=false)
UWord NTV2DeviceGetNumHDMIVideoOutputs(const NTV2DeviceID inDeviceID)
ULWord mInNumRegisters
The number of NTV2RegInfo's to be set.
ULWord operation(void) const
static bool IsReadOnly(const uint32_t inRegNum)
NTV2FrameRate
Identifies a particular video frame rate.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2FrameBufferFormat acFrameBufferFormat
Specifies the frame buffer format to change to. Ignored if AUTOCIRCULATE_WITH_FBFCHANGE option is not...
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_TYPE_SDISTATS
Identifies NTV2SDIStatus struct.
std::string NTV2AudioChannelQuadToString(const NTV2Audio4ChannelSelect inValue, const bool inCompactDisplay=false)
2048x1080, NTV2_VANCMODE_TALLER
NTV2Standard
Identifies a particular video standard.
#define NTV2_TYPE_VIRTUAL_DATA_RW
Identifies NTV2VirtualData struct.
NTV2ColorCorrectionData acColorCorrection
Color correction data. This field is ignored if AUTOCIRCULATE_WITH_COLORCORRECT option is not set...
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
bool IsAllocatedBySDK(void) const
ULWord acOptionFlags
AutoCirculate options used when CNTV2Card::AutoCirculateInitForInput or CNTV2Card::AutoCirculateInitF...
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
NTV2Buffer mBuffer
Virtual address of a buffer to prelock, and its length.
bool NTV2DeviceCanDoVideoFormat(const NTV2DeviceID inDeviceID, const NTV2VideoFormat inVideoFormat)
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2OutputDest values supported on the given device.
ULWord acAncTransferSize
Total ancillary data bytes for field 1 transferred (capture only).
ULWord64 mClientTID
In: client thread identifier.
This is used to perform virtual data reads or writes.
enum NTV2QuarterSizeExpandMode NTV2QtrSizeExpandMode
1920x1080, for 1080i and 1080p, NTV2_VANCMODE_OFF
Declares the AJAThread class.
ULWord mStatus
Action status.
bool PatchRegister(const ULWord inRegNum, const ULWord inValue)
Patches the given register value.
ULWord64 acRDTSCCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using the host OS system clock...
#define NTV2_TYPE_CONFIGINTERRUPT
Identifies NTV2ConfigInterrupt struct.
std::string to_string(bool val)
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
#define NTV2_TYPE_ACXFERSTATUS
Identifies AUTOCIRCULATE_TRANSFER_STATUS struct.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define AJA_NTV2_SDK_VERSION_MAJOR
The SDK major version number, an unsigned decimal integer.
bool WithHDMIAuxData(void) const
NTV2DeviceIDSet::const_iterator NTV2DeviceIDSetConstIter
A convenient const iterator for NTV2DeviceIDSet.
std::set< std::string > NTV2StringSet
#define NTV2_TYPE_AJABUFFERLOCK
Identifies NTV2BufferLock struct.
std::ostream & Print(std::ostream &inOutStream) const
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Specifies analog input/output kinds.
NTV2Buffer & Segment(NTV2Buffer &outPtr, const ULWord inByteOffset, const ULWord inByteCount) const
Resets an NTV2Buffer instance to reference a contiguous segment (portion) of my memory buffer...
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
#define NTV2SDKVersionEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
1280x720, for 720p, NTV2_VANCMODE_TALL
NTV2Channel mChannel
Stream channel.
NTV2MailBuffer()
Constructs a default NTV2MailBuffer struct.
#define NTV2_IS_VALID_IOKINDS(_k_)
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels)
Declares the CRP188 class. See SMPTE RP188 standard for details.
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
NTV2AutoCirculateState acState
Current AutoCirculate state.
BOOL_ bWithColorCorrection
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
std::string NTV2HDMIProtocolToString(const NTV2HDMIProtocol inValue, const bool inCompactDisplay=false)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::LoadBitstream. ...
Defines for the NTV2 SDK version number, used by ajantv2/includes/ntv2enums.h. See the ajantv2/includ...
enum _INTERRUPT_ENUMS_ INTERRUPT_ENUMS
ULWord64 acAudioClockCurrentTime
The absolute timestamp at the moment the CNTV2Card::AutoCirculateTransfer or CNTV2Card::AutoCirculate...
bool SetFrom(const NTV2Buffer &inBuffer)
Replaces my contents from the given memory buffer without resizing me.
ULWord fTrailerVersion
Trailer version, set when created. Before SDK 15.1: always zero; 15.1 or later: set to calling SDK ve...
bool IsStopped(void) const
NTV2RegisterNumberSet NTV2RegNumSet
A set of distinct NTV2RegisterNumbers.
This is used to atomically perform bank-selected register reads or writes.
ULWord64 acRDTSCStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using host OS system ...
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
ULWord acRequestedFrame
On entry for NTV2_TYPE_ACFRAMESTAMP message, the requested frame. Upon exit, 0xFFFFFFFF means "not ...
ULWord acFramesDropped
Total number of frames dropped since AutoCirculateStart.
bool ImportFromLog(const NTV2StringList &inLogLines)
Resets me using the given "Number:" and "Value:" lines from the support log.
Specifies any/all devices.
ULWord acAudioTransferSize
Number of bytes captured into the audio buffer.
#define NTV2_TYPE_AJADEBUGLOGGING
Identifies NTV2DebugLogging struct.
bool 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
static std::string FourCCToString(const ULWord in4CC, const char nonPrintable='?')
ULWord registerShift
My register shift value to use in a ReadRegister or WriteRegister call.
ULWord acSegmentDevicePitch
Offset, in bytes, between the start of one device segment and the start of the next device segment (i...
bool operator<(const NTV2RegInfo &inRHS) const
bool SetFromHexString(const std::string &inStr)
Replaces my contents from the given hex-encoded string, resizing me if necessary. ...
std::vector< uint16_t > UWordSequence
An ordered sequence of UWord (uint16_t) values.
NTV2Buffer mInRegInfos
NTV2RegInfo array of registers be read/written. The SDK owns this memory.
std::set< NTV2FrameGeometry > NTV2GeometrySet
A set of distinct NTV2FrameGeometry values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
ULWord acAncField2TransferSize
Total ancillary data bytes for field 2 transferred (capture only).
AUTOCIRCULATE_STATUS(const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_CHANNEL1)
Constructs a default AUTOCIRCULATE_STATUS struct for the given NTV2Crosspoint.
string NTV2AudioSystemSetToStr(const NTV2AudioSystemSet &inObj, const bool inCompact)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord64 acAudioClockCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using "64-bit clean" value of the device's 4...
UWordSequence::const_iterator UWordSequenceConstIter
A handy const iterator for iterating over a UWordSequence.
std::string NTV2HDMIAudioChannelsToString(const NTV2HDMIAudioChannels inValue, const bool inCompactDisplay=false)
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
~NTV2ColorCorrectionData()
My destructor, which frees my private color correction table buffer.
NTV2HDMIProtocol
Indicates or specifies the HDMI protocol.
The AutoCirculate channel is starting, waiting for the start time specified in the call to CNTV2Card:...
bool NTV2GetUnsupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of NTV2PixelFormat values not suported by any NTV2 device.
#define NTV2_IS_VALID_STANDARD(__s__)
#define NTV2_TYPE_ACFRAMESTAMP
Identifies FRAME_STAMP struct.
ULWord acFrameRepeatCount
Intended for playout. The number of times to repeat the frame being transferred.
size_t maxHandleCapacity(void) const
ULWord GetDroppedFrameCount(void) const
Declares data types and structures used in NTV2 "nub" packets.
UWord NTV2DeviceGetNumAnalogVideoOutputs(const NTV2DeviceID inDeviceID)
LWord acTransferFrame
Frame buffer number the frame was transferred to/from. (-1 if failed)
std::string getSourceCode(const bool inInclDecl=true) const
bool SwapWith(NTV2Buffer &inBuffer)
Swaps my underlying buffer with another's.
bool RPCEncodeServer(NTV2_RPC_BLOB_TYPE &inBlob)
ULWord64 audioClockCurrentTime
48kHz clock in reg 28 extended to 64 bits
ULWord acCurrentFieldCount
As found by ISR at Call Field0 or Field1 currently being OUTPUT (when CNTV2Card::AutoCirculateGetFram...
void PUSHU16(const uint16_t val, RPCBlob &blob, const bool dontSwap=false)
Pushes a 16-bit value onto the given byte sequence.
The AutoCirculate channel is stopped.
ULWord64 acAudioClockStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using "64-bit clean" ...
bool WithRP188(void) const
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
LWord acEndFrame
Last frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2DIDSet::const_iterator NTV2DIDSetConstIter
Handy const iterator to iterate over an NTV2DIDSet.
LWord GetActiveFrame(void) const
std::string NTV2AudioChannelOctetToString(const NTV2Audio8ChannelSelect inValue, const bool inCompactDisplay=false)
ostream & NTV2PrintChannelSet(const NTV2ChannelSet &inObj, const bool inCompact, ostream &inOutStream)
ULWord getDestOffset(void) const
static NTV2StringList IntNames(const uint64_t mask)
bool NTV2DeviceGetSupportedVideoFormats(const NTV2DeviceID inDeviceID, NTV2VideoFormatSet &outFormats)
Returns a set of distinct NTV2VideoFormat values supported on the given device.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#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.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
std::ostream & PrintCode(std::ostream &outputStream, const int inRadix=16, const NTV2DeviceID inDeviceID=DEVICE_ID_INVALID, const std::string &sCard="card") const
Renders me to the given output stream as source code using a "WriteRegister" function call...
ostream & operator<<(ostream &inOutStream, const NTV2StringList &inData)
void Clear(void)
Clears my data.
LWord acDesiredFrame
Used to specify a different frame in the circulate ring to transfer to/from.
bool NTV2GetSupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of all NTV2PixelFormat values supported (used) by any/all supported NTV2 devices...
void Set(const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow)
Sets the NTV2SegmentedDMAInfo struct members.
This is used to prelock a video/audio/anc buffer used as the source or target of DMA transfers...
bool NTV2DeviceCanDoInputSource(const NTV2DeviceID inDeviceID, const NTV2InputSource inInputSource)
bool ByteSwap16(void)
Byte-swaps my contents 16-bits at a time.
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
NTV2AutoCirculateState
Describes the state of an AutoCirculate channel. See AUTOCIRCULATE_STATUS.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord getTotalElements(void) const
std::ostream & Print(std::ostream &oss) const
#define NTV2_IS_VALID_CHANNEL(__x__)
Declares the AJAProcess class.
This is used for bitstream maintainance. (New in SDK 16.0)
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
ULWord audioInStartAddress
For record - first position in buffer of audio (includes base offset)
ostream & NTV2PrintULWordVector(const NTV2ULWordVector &inObj, ostream &inOutStream)
NTV2BufferLock()
Constructs a default NTV2BufferLock struct.
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Identifies SMPTE HD 1080i or 1080psf.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
std::string NTV2HDMIRangeToString(const NTV2HDMIRange inValue, const bool inCompactDisplay=false)
bool NTV2DeviceGetSupportedPixelFormats(const NTV2DeviceID inDeviceID, NTV2PixelFormats &outFormats)
Returns a set of distinct NTV2FrameBufferFormat values supported on the given device.
static AJAStatus StatTimerStart(const uint32_t inKey)
static size_t gDefaultPageSize(AJA_PAGE_SIZE)
uint16_t GetEndFrame(void) const
ULWord acAudioExpectedAddress
Audio transfer address.
NTV2InputSource
Identifies a specific video input source.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob, bool fillBuffer=true)
NTV2MessageData(const void *inMessage, const size_t inMessageSize, const ULWord inFlags)
Constructs an NTV2VirtualData struct for reading or writing virtual data.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter
A handy const iterator for iterating over an NTV2InputSourceSet.
ULWord acCurrentAudioExpectedAddress
bool PutU32s(const ULWordSequence &inU32s, const size_t inU32Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 32-bit values into me.
bool GetU8s(UByteSequence &outU8s, const size_t inU8Offset=0, const size_t inMaxSize=128) const
Answers with my contents as a vector of unsigned 8-bit values.
#define AUTOCIRCULATE_WITH_FBOCHANGE
Use this to AutoCirculate with the possibility of frame buffer orientation changes.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecodeNoAllocate(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
#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.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord64 audioClockCurrentTime
2048x1080, for 2Kx1080p, NTV2_VANCMODE_OFF
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord acFramesProcessed
Total number of frames successfully processed since AutoCirculateStart.
ULWord acStartSample
The actual audio start sample when this frame was started at the VBI, which may be used to check sync...
bool is_hex_digit(const char inChr)
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
void Clear(void)
Resets the struct to its initialized state.
static std::string GetDisplayValue(const uint32_t inRegNum, const uint32_t inRegValue, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
static size_t HostPageSize(void)
#define NTV2SDKVersionDecode_Point
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2FrameGeometry
Identifies a particular video frame geometry.
720x576, for PAL 625i, NTV2_VANCMODE_OFF
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
User cookie at last vblank.
NTV2Buffer acANCField2Buffer
The host "Field 2" ancillary data buffer. This field is owned by the client application, and thus is responsible for allocating and/or freeing it. If the pointer is NULL or the size is zero, no "Field 2" ancillary data will be transferred. Use the AUTOCIRCULATE_TRANSFER::SetAncBuffers method to set or reset this field.
FRAME_STAMP & operator=(const FRAME_STAMP &inRHS)
uint64_t clientPID(void) const
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelOctet values.
std::string NTV2HDMIColorSpaceToString(const NTV2HDMIColorSpace inValue, const bool inCompactDisplay=false)
ULWord mFlags
Action flags (lock, unlock, etc)
uint64_t interruptIDs(void) const
NTV2_TRAILER()
Constructs a default NTV2_TRAILER having the proper version and tag.
uint64_t clientID(void) const
NTV2Crosspoint channelSpec
#define NTV2_TYPE_AJASTREAMBUFFER
Identifies NTV2StreamBuffer struct.
void Set(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Sets my fields from the given DBB, low and high ULWord components.
Declares numerous NTV2 utility functions.
bool GetU16s(UWordSequence &outU16s, const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
NTV2Buffer mOutBadRegIndexes
Array of UWords containing index numbers of the register writes that failed. The SDK owns this memory...
#define NTV2Buffer_TO_ULWORD64(__p__)
bool NTV2DeviceGetSupportedGeometries(const NTV2DeviceID inDeviceID, NTV2GeometrySet &outGeometries)
Returns a set of distinct NTV2FrameGeometry values supported on the given device. ...
NTV2Crosspoint foregroundKeyCrosspoint
void swap(nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j1, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp) is_nothrow_move_constructible< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value &&//NOLINT(misc-redundant-expression, cppcoreguidelines-noexcept-swap, performance-noexcept-swap) is_nothrow_move_assignable< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value)
exchanges the values of two JSON objects
std::string NTV2CrosspointToString(const NTV2Crosspoint inChannel)
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
union AutoCircGenericTask::@15 u
ULWord acBufferLevel
Number of buffered frames in driver ready to capture or play.
std::vector< uint64_t > ULWord64Sequence
An ordered sequence of ULWord64 (uint64_t) values.
#define NTV2Buffer_PAGE_ALIGNED
Allocated page-aligned?
NTV2GetRegisters(const NTV2RegNumSet &inRegisterNumbers=NTV2RegNumSet())
Constructs an NTV2GetRegisters struct from the given set of register numbers.
bool operator!=(const NTV2SegmentedXferInfo &inRHS) const
bool NTV2GetSupportedStandards(NTV2StandardSet &outStandards)
Returns a set of all NTV2Standard values supported (used) by any/all supported NTV2 devices...
std::string AsCode(const size_t inBytesPerWord=4, const std::string &inVarName="", const bool inUseSTL=false, const bool inByteSwap=false) const
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
string NTV2AutoCirculateStateToString(const NTV2AutoCirculateState inState)
NTV2RegInfo GetRegInfo(const UWord inIndex0=0) const
AUTO_CIRC_COMMAND eCommand
NTV2SDIInputStatus & operator[](const size_t inSDIInputIndex0)
This struct is used to augment the default full-frame AutoCirculate DMA transfer to accommodate multi...
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Intended for capture, answers with the timecodes captured in my acTransferStatus member's acFrameStam...
bool SetInputTimecode(const NTV2TCIndex inTCNdx, const NTV2_RP188 &inTimecode)
Sets one of my input timecodes.
ULWord acAudioOutStartAddress
(output/playback only) Audio play head position (exclusive) AFTER this frame was stamped.
720x486, for NTSC 525i and 525p60, NTV2_VANCMODE_OFF
ULWord GetFrameCount(void) const
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
NTV2SegmentedXferInfo & reset(void)
Resets me to an invalid (all zero) state.
ULWord mFlags
Action flags.
bool NextDifference(const NTV2Buffer &inBuffer, ULWord &byteOffset) const
Iterates over each byte that differs between myself and the given buffer.
#define AUTOCIRCULATE_WITH_COLORCORRECT
Use this to AutoCirculate with color correction.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
std::vector< NTV2_RP188 > NTV2TimeCodeList
An ordered sequence of zero or more NTV2_RP188 structures. An NTV2TCIndex enum value can be used as a...
virtual std::string do_grouping() const
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
NTV2VirtualData(const ULWord inTag, const void *inVirtualData, const size_t inVirtualDataSize, const bool inDoWrite=false)
Constructs an NTV2VirtualData struct for reading or writing virtual data.
std::string NTV2AudioRateToString(const NTV2AudioRate inValue, const bool inForRetailDisplay=false)
NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter
A const iterator that iterates over NTV2RegisterValueMap entries.
bool is_legal_decimal_number(const std::string &inStr, size_t inMaxLength)
ULWord acAudioOutStopAddress
(output/playback only) Audio play head position when this frame was stamped.
void Clear(void)
Frees my private color correction table buffer and resets my mode to "invalid".
LWord64 acCurrentFrameTime
The VBI timestamp of the current/active frame currently being ingested on the device (capture)...
bool SetAndFill(const void *pInUserPointer, const size_t inByteCount, const UByte inValue)
Sets (or resets) me from a client-supplied address and size.
uint16_t U16(const int inIndex) const
Fixed_ transitionSoftness
NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter
Handy const iterator to iterate over an NTV2DoubleArray.
std::ostream & Dump(std::ostream &inOutputStream=std::cout, const size_t inStartByteOffset=0, const size_t inByteCount=0, const size_t inRadix=16, const size_t inBytesPerGroup=4, const size_t inGroupsPerLine=8, const size_t inAddressRadix=0, const bool inShowAscii=false, const size_t inAddrOffset=0) const
Dumps me in hex/octal/decimal, with/without Ascii, to the given output stream.
ULWord acFramesDropped
Total number of frames dropped since CNTV2Card::AutoCirculateStart called.
NTV2TCIndexes & operator+=(NTV2TCIndexes &inOutSet, const NTV2TCIndexes &inSet)
Appends the given NTV2TCIndexes contents into the given set.
static void FreeAligned(void *pMemory)
NTV2Buffer acTimeCodes
Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCInde...
std::ostream & Print(std::ostream &inOutStream) const
AUTOCIRCULATE_TRANSFER_STATUS acTransferStatus
Contains status information that's valid after CNTV2Card::AutoCirculateTransfer returns, including the driver buffer level, number of frames processed or dropped, audio and anc transfer byte counts, and a complete FRAME_STAMP that has even more detailed clocking information.
NTV2_HEADER(const ULWord inStructureType, const ULWord inSizeInBytes)
Constructs a default NTV2_HEADER having the proper tag, version, and the given type and size...
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
NTV2Channel GetChannel(void) const
#define NTV2_ASSERT_STRUCT_VALID
NTV2Buffer mBuffer
Virtual address of a bitstream buffer and its length.
#define xHEX0N(__x__, __n__)
AUTOCIRCULATE_TRANSFER()
Constructs a default AUTOCIRCULATE_TRANSFER struct.
Fixed_ transitionCoefficient
~NTV2Buffer()
My destructor. If I'm responsible for the memory, I free it here.
static std::string GetDisplayName(const uint32_t inRegNum)
~FRAME_STAMP()
My destructor.
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
ULWord currenthUser
Contains validCount (Play - reps remaining, Record - drops on frame)
bool SetAncBuffers(ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my ancillary data buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
std::vector< uint8_t > RPCBlob
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
uint64_t clientTID(void) const
ULWord getSourcePitch(void) const
NTV2_RP188 acRP188
Deprecated – call FRAME_STAMP::GetInputTimeCode instead.
NTV2GeometrySet GetRelatedGeometries(const NTV2FrameGeometry inFrameGeometry)
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
NTV2RegWritesIter NTV2RegisterReadsIter
NTV2RegInfo & setValue(const ULWord val)
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Intended for capture, answers with a specific timecode captured in my acTransferStatus member's acFra...
ULWord mIsWriting
If non-zero, register(s) will be written; otherwise, register(s) will be read.
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
NTV2Buffer mInBankInfos
Bank select NTV2RegInfo. The SDK owns this memory.
#define NTV2_TYPE_AJASTREAMCHANNEL
Identifies NTV2StreamChannel struct.
This object is embedded in the AUTOCIRCULATE_TRANSFER struct that's returned from the CNTV2Card::Auto...
bool SetFromRegValue(const ULWord inData)
Sets my fields from the given status register value.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
bool ResetUsing(const NTV2RegWrites &inRegWrites)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
ULWord acBufferLevel
The number of frames ready to record/play after the transfer.
ULWord mStatus
Action status.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
enum NTV2OutputDestination NTV2OutputDest
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool POPU32(uint32_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
Pops a 32-bit value off the given byte sequence at the given zero-based index position.
#define AUTOCIRCULATE_STRUCT_VERSION
Version number of AutoCirculate structures, originally 0.
ULWord getSegmentLength(void) const
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
NTV2QuarterSizeExpandMode acVideoQuarterSizeExpand
Turns on the "quarter-size expand" (2x H + 2x V) hardware. Defaults to off (1:1). ...
bool GetRequestedRegisterWrites(NTV2RegWrites &outRegWrites) const
bool isDestBottomUp(void) const
ULWord currentAudioExpectedAddress
As set by play.
Identifies the first analog video input.
Private include file for all ajabase sources.
This class/object reports information about the current and/or requested AutoCirculate frame...
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
std::map< NTV2FrameGeometry, ULWord > FGSizesMap
ULWord getSourceOffset(void) const
NTV2ChannelList::const_iterator NTV2ChannelListConstIter
A handy const iterator into an NTV2ChannelList.
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
RP188_STRUCT currentRP188
Last vertical blank timecode (RP-188)
ULWord mFlags
In: option flags.
static void * AllocateAligned(size_t size, size_t alignment)
ULWord acAudioInStartAddress
(input/ingest/capture only) Starting audio record head position when this frame was stamped...
#define NTV2_IS_VALID_VIDEO_FORMAT(__f__)
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
std::string & upper(std::string &str)
std::string join(const std::vector< std::string > &parts, const std::string &delim)
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
#define NTV2_TYPE_SETREGS
Identifies NTV2SetRegisters struct.
bool GetU32s(ULWordSequence &outU32s, const size_t inU32Offset=0, const size_t inMaxSize=32, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 32-bit values.
ULWord64Sequence::const_iterator ULWord64SequenceConstIter
A handy const iterator for iterating over a ULWord64Sequence.
static ULWord FGHeight(const NTV2FrameGeometry fg)
ULWord acSegmentHostPitch
Offset, in bytes, between the start of one host segment and the start of the next host segment (i...
ULWord fLo
| BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
std::set< NTV2DeviceID > NTV2DeviceIDSet
A set of NTV2DeviceIDs.
uint64_t U64(const int inIndex) const
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
void * GetHostPointer(void) const
NTV2ColorCorrectionData()
Constructs a default NTV2ColorCorrectionData struct.
bool WithColorCorrect(void) const
NTV2SegmentedXferInfo & setDestDirection(const bool inTopDown)
Sets the scan direction for the destination.
NTV2Bitstream()
Constructs a default NTV2Bitstream struct.
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
void Reset(void)
Resets the NTV2SegmentedDMAInfo struct members to their default values (normal, non-segmented AutoCir...
bool GetRingChangedByteRange(const NTV2Buffer &inBuffer, ULWord &outByteOffsetFirst, ULWord &outByteOffsetLast) const
Assuming my contents and the contents of the given buffer comprise ring buffers that periodically get...
bool POPU64(uint64_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
Pops a 64-bit value off the given byte sequence at the given zero-based index position.
ULWord64 acAudioClockTimeStamp
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
This is used by the CNTV2Card::ReadSDIStatistics function.
string CommaStr(const T &inNum)
2048x1556, for 2Kx1556psf film format, NTV2_VANCMODE_TALL
NTV2Buffer acAudioBuffer
The host audio buffer. This field is owned by the client application, and thus is responsible for all...
static const NTV2_RP188 INVALID_TIMECODE_VALUE
static std::string IntName(const INTERRUPT_ENUMS id)
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Color correction data used with AUTOCIRCULATE_WITH_COLORCORRECT option.
static const string sSegXferUnits[]
std::vector< std::string > NTV2StringList
ULWord64 mClientPID
In: client process identifier.
bool SetFrom(const FRAME_STAMP_STRUCT &inOldStruct)
Sets my fields from the given FRAME_STAMP_STRUCT.
std::ostream & print(std::ostream &oss) const
prints a human-readable representation of me to the given output stream
std::set< NTV2AudioChannelOctet > NTV2AudioChannelOctets
A set of distinct NTV2AudioChannelOctet values.
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Answers with a specific timecode captured in my acTimeCodes member.
#define HEX0N(__x__, __n__)
#define NTV2Buffer_ALLOCATED
Allocated using Allocate function?
std::ostream & Print(std::ostream &inOutStream) const
bool GetU64s(ULWord64Sequence &outU64s, const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
#define NTV2_IS_VALID_COLOR_CORRECTION_MODE(__x__)
#define NTV2SDKVersionDecode_Build
uint8_t U8(const int inIndex) const
ULWord audioOutStopAddress
For play - first position in buffer of audio.
std::vector< NTV2RegInfo > NTV2RegisterWrites
#define OCT0N(__x__, __n__)
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
LWord64 currentFrameTime
Vertical blank start of current frame.
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
bool ByteSwap64(void)
Byte-swaps my contents 64-bits at a time.
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
std::string & lower(std::string &str)
NTV2StreamChannel()
Constructs a default NTV2StreamChannel struct.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
ULWord acNumSegments
Number of segments of size ::AUTOCIRCULATE_TRANSFER::acVideoBuffer.fByteCount to transfer. Zero or 1 means normal (unsegmented) transfer.
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
#define NTV2EndianSwap16(__val__)
bool NTV2DeviceGetSupportedFrameRates(const NTV2DeviceID inDeviceID, NTV2FrameRateSet &outRates)
Returns a set of distinct NTV2FrameRate values supported on the given device.
NTV2Channel mChannel
Mail buffer channel.
ostream & NTV2PrintChannelList(const NTV2ChannelList &inObj, const bool inCompact, ostream &inOutStream)
720x576, for PAL 625i, NTV2_VANCMODE_TALLER
Declares enums and structs used by all platform drivers and the SDK.
NTV2Crosspoint backgroundKeyCrosspoint
ULWord mOperation
In: requested operation.
NTV2AudioSystem acAudioSystem
The audio system being used for this channel (NTV2_AUDIOSYSTEM_INVALID if none)
#define NTV2SDKVersionDecode_Major
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
#define DECN(__x__, __n__)
AutoCircTaskType taskType
#define AUTOCIRCULATE_WITH_FIELDS
Use this to AutoCirculate with fields as frames for interlaced formats.
NTV2Buffer mInRegInfos
Read-only array of NTV2RegInfo structs to be set. The SDK owns this memory.
NTV2Buffer ccLookupTables
RGB lookup tables pre-formatted for AJA hardware as a contiguous block of NTV2_COLORCORRECTOR_TABLESI...
ULWord mStatus
Action status.
bool NTV2DeviceGetSupportedInputSources(const NTV2DeviceID inDeviceID, NTV2InputSourceSet &outInputSources, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2InputSource values supported on the given device.
bool SetAllOutputTimeCodes(const NTV2_RP188 &inTimecode, const bool inIncludeF2=true)
Intended for playout, replaces all elements of my acOutputTimeCodes member with the given timecode va...
std::string & replace(std::string &str, const std::string &from, const std::string &to)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
#define AUTOCIRCULATE_WITH_HDMIAUX
Use this to AutoCirculate with HDMI auxiliary data.
bool IsFieldMode(void) const
#define NTV2_TRAILER_TAG
Identifies the struct trailer.
bool WithFBFChange(void) const
#define NTV2_IS_VALID_NTV2FrameGeometry(__s__)
NTV2Crosspoint acCrosspoint
The crosspoint (channel number with direction)
ULWord fTrailerTag
A special FourCC to identify the tail end of an NTV2 structure.
This is used to enable or disable AJADebug logging in the driver.
ULWord mOutNumFailures
The number of registers unsuccessfully written.
NTV2Crosspoint foregroundVideoCrosspoint
ULWord fHi
| BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
bool PutU8s(const UByteSequence &inU8s, const size_t inU8Offset=0)
Copies a vector of unsigned 8-bit values into me.
NTV2HDMIBitDepth
Indicates or specifies the HDMI video bit depth.
#define NTV2_IS_REGISTER_TASK(_x_)
#define NTV2EndianSwap32(__val__)
ULWord acNumActiveBytesPerRow
Number of active bytes in a row of video.
bool POPU16(uint16_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
Pops a 16-bit value off the given byte sequence at the given zero-based index position.
NTV2RegInfo & setShift(const ULWord val)
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock. ...
#define AJA_NTV2_SDK_VERSION_MINOR
The SDK minor version number, an unsigned decimal integer.
uint16_t GetStartFrame(void) const
Declares device capability functions.
#define NTV2_IS_VALID_NTV2FrameRate(__r__)
bool WithVidProc(void) const
NTV2Channel NTV2CrosspointToNTV2Channel(const NTV2Crosspoint inCrosspointChannel)
ULWord acFramesProcessed
Total number of frames successfully processed since CNTV2Card::AutoCirculateStart called...
ULWord getSegmentCount(void) const
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
ULWord64 audioClockStartTime
ULWord64 GetRawHostPointer(void) const
720x486, for NTSC 525i and 525p60, NTV2_VANCMODE_TALLER
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2DebugLogging(const bool inEnable=false)
Constructs an NTV2DebugLogging struct.
This is used by the CNTV2Card::WriteRegisters function.
bool SetVideoBuffer(ULWord *pInVideoBuffer, const ULWord inVideoByteCount)
Sets my video buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
std::string NTV2FrameRateToString(const NTV2FrameRate inValue, const bool inForRetailDisplay=false)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
ULWord64 audioClockTimeStamp
48kHz clock (in reg 28, extended to 64 bits) at time of play or record.
bool SegmentedDMAsEnabled(void) const
enum NTV2TCIndex NTV2TimecodeIndex
ULWord acTotalBytesTransferred
Total audio and video bytes transferred.
NTV2FrameBufferFormatSetConstIter NTV2PixelFormatsConstIter
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Declares the CNTV2RegisterExpert class.
INTERRUPT_ENUMS interruptID(void) const
bool isDestTopDown(void) const
All new NTV2 structs end with this common trailer.
static uint64_t GetThreadId()
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
ULWord acFrame
(input/ingest/capture only) Current/active frame number.
NTV2FrameGeometry GetNTV2FrameGeometryFromVideoFormat(const NTV2VideoFormat inVideoFormat)
ULWord currentFieldCount
At Call Field0 or Field1 currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
void PUSHU64(const uint64_t val, RPCBlob &blob, const bool dontSwap=false)
Pushes a 64-bit value onto the given byte sequence.
NTV2SegmentedDMAInfo acInSegmentedDMAInfo
Optional segmented DMA info, for use with specialized data transfers.