24 #if !defined(MSWindows) 39 if (++it != inData.end())
50 if (++it != inData.end())
83 inOutStr << *iter << endl;
91 inOutStr <<
xHEX0N(uint16_t(*it),2);
92 if (++it != inDIDs.end())
100 inOutStream <<
DEC(inData.size()) <<
" UWords: ";
103 inOutStream <<
HEX0N(*iter,4);
104 if (++iter != inData.end())
112 inOutStream <<
DEC(inData.size()) <<
" ULWords: ";
115 inOutStream <<
HEX0N(*iter,8);
116 if (++iter != inData.end())
124 inOutStream <<
DEC(inData.size()) <<
" ULWord64s: ";
127 inOutStream <<
HEX0N(*iter,16);
128 if (++iter != inData.end())
146 mFrameRefClockCount = 0;
147 mGlobalClockCount = 0;
148 mFrameTRSError =
false;
157 inOutStream <<
"[CRCA=" <<
DEC(mCRCTallyA)
158 <<
" CRCB=" <<
DEC(mCRCTallyB)
159 <<
" unlk=" <<
xHEX0N(mUnlockTally,8)
160 <<
" frmRefClkCnt=" <<
xHEX0N(mFrameRefClockCount,16)
161 <<
" globalClkCnt=" <<
xHEX0N(mGlobalClockCount,16)
162 <<
" frmTRS=" <<
YesNo(mFrameTRSError)
163 <<
" locked=" <<
YesNo(mLocked)
164 <<
" VPIDA=" <<
YesNo(mVPIDValidA)
165 <<
" VPIDB=" <<
YesNo(mVPIDValidB)
207 inOutStream <<
"Enabled: " <<
YesNo(mEnabled);
210 <<
"Is 4:2:0: " <<
YesNo(mPixel420) << endl
231 transitionCoefficient (0),
232 transitionSoftness (0)
238 : eCommand (inCommand),
239 channelSpec (inCrosspoint),
263 static const string sCmds [] = {
"ACInit",
"ACStart",
"ACStop",
"ACPause",
"GetAC",
"ACFrmStmp",
264 "ACFlush",
"ACPreRoll",
"ACXfer",
"ACAbort",
"ACStartAt",
265 "ACXfer1",
"ACXfer2",
"ACFrmStmp2",
"ACTask",
"ACSetActFrm"};
266 if (
size_t(
eCommand) <
sizeof(sCmds))
276 if (
bVal2) oss <<
" +RP188";
277 if (
bVal3) oss <<
" +FBFChg";
278 if (
bVal4) oss <<
" +FBOChg";
279 if (
bVal5) oss <<
" +ColCorr";
280 if (
bVal6) oss <<
" +VidProc";
281 if (
bVal7) oss <<
" +Anc";
282 if (
bVal8) oss <<
" +LTC";
304 if (
bVal1) oss <<
" +resume";
305 if (
bVal1 &&
bVal2) oss <<
" +clearDropCount";
309 if (
bVal1) oss <<
" +clearDropCount";
331 fType (inStructureType),
334 fSizeInBytes (inStructSizeInBytes),
335 fPointerSize (sizeof(int*)),
344 return inObj.
Print (inOutStream);
352 inOutStream << NTV2_4CC_AS_STRING (fHeaderTag);
354 inOutStream <<
"BAD-" <<
HEX0N(fHeaderTag,8);
356 inOutStream << NTV2_4CC_AS_STRING (fType);
358 inOutStream <<
"|BAD-" <<
HEX0N(fType,8);
359 inOutStream <<
" v" << fHeaderVersion <<
" vers=" << fVersion <<
" sz=" << fSizeInBytes;
360 return inOutStream <<
"]";
365 const char * pU32 (reinterpret_cast<const char *>(&in4CC));
366 ostringstream result, fourCC;
368 if (nonPrintable && !::isprint(nonPrintable))
370 for (
size_t charPos(0); charPos < 4; charPos++)
372 #if AJATargetBigEndian 373 const char ch (pU32[charPos]);
374 #else // little-endian: 375 const char ch (pU32[3 - charPos]);
382 fourCC << nonPrintable;
387 result <<
xHEX0N(in4CC,8);
389 result <<
"'" << fourCC.str() <<
"' (" <<
xHEX0N(in4CC,8) <<
")";
391 result <<
"'" << fourCC.str() <<
"'";
400 inOutStream << NTV2_4CC_AS_STRING(inObj.
fTrailerTag);
413 return inObj.
Print (inOutStream);
431 if (inDumpMaxBytes > 256)
432 inDumpMaxBytes = 256;
436 for (
UWord ndx(0); ndx < inDumpMaxBytes; ndx++)
437 oss <<
HEX0N(uint16_t(pBytes[ndx]),2);
442 string NTV2Buffer::AsCode (
const size_t inBytesPerWord,
const std::string & inVarName,
const bool inUseSTL,
const bool inByteSwap)
const 445 if (inBytesPerWord != 1 && inBytesPerWord != 2 && inBytesPerWord != 4 && inBytesPerWord != 8)
return string();
447 if (inBytesPerWord > 1)
453 const string cType (inBytesPerWord == 1 ?
"uint8_t" : (inBytesPerWord == 2 ?
"uint16_t" : (inBytesPerWord == 4 ?
"uint32_t" :
"uint64_t")));
454 const size_t numWords (
GetByteCount() / inBytesPerWord);
455 const string vecType =
"std::vector<" + cType +
">";
456 const string varName (inVarName.empty() ? (inUseSTL ?
"tmpVector" :
"tmpArray") : inVarName);
457 oss <<
"const " << (inUseSTL ? vecType : cType) <<
" " << varName << (inUseSTL ?
"" :
"[]") <<
" = {" << endl;
458 if (inByteSwap && inBytesPerWord > 1)
459 switch (inBytesPerWord)
465 for (
size_t ndx(0); ndx < numWords; )
467 switch (inBytesPerWord)
470 case 2: oss <<
xHEX0N(tmp.
U16(
int(ndx)),4);
break;
471 case 4: oss <<
xHEX0N(tmp.
U32(
int(ndx)),8);
break;
472 case 8: oss <<
xHEX0N(tmp.
U64(
int(ndx)),16);
break;
474 if (++ndx < numWords)
490 oss <<
HEX0N(uint16_t(
U8(ndx++)),2);
491 if (inLineBreakInterval && ndx <
int(
GetByteCount()) && ((
size_t(ndx) % inLineBreakInterval) == 0))
495 return !outStr.empty();
500 const streamsize maxAddrWidth (
sizeof(
ULWord64) * 2);
503 oss <<
OCT0N(inOffset,maxAddrWidth) <<
": ";
504 else if (inRadix == 10)
505 oss <<
DEC0N(inOffset,maxAddrWidth) <<
": ";
507 oss <<
xHEX0N(inOffset,maxAddrWidth) <<
": ";
512 const size_t inStartOffset,
513 const size_t inByteCount,
514 const size_t inRadix,
515 const size_t inBytesPerGroup,
516 const size_t inGroupsPerRow,
517 const size_t inAddressRadix,
518 const bool inShowAscii,
519 const size_t inAddrOffset)
const 523 if (inRadix != 8 && inRadix != 10 && inRadix != 16 && inRadix != 2)
525 if (inAddressRadix != 0 && inAddressRadix != 8 && inAddressRadix != 10 && inAddressRadix != 16)
527 if (inBytesPerGroup == 0)
532 size_t bytesRemaining (inByteCount ? inByteCount :
GetByteCount());
533 size_t bytesInThisGroup (0);
534 size_t groupsInThisRow (0);
535 const unsigned maxByteWidth (inRadix == 8 ? 4 : (inRadix == 10 ? 3 : (inRadix == 2 ? 8 : 2)));
536 const UByte * pBuffer (reinterpret_cast <const UByte *> (pInStartAddress));
537 const size_t asciiBufferSize (inShowAscii && inGroupsPerRow ? (inBytesPerGroup * inGroupsPerRow + 1) *
sizeof (
UByte) : 0);
539 if (!pInStartAddress)
544 ::memset (pAsciiBuffer, 0, asciiBufferSize);
546 if (inGroupsPerRow && inAddressRadix)
548 while (bytesRemaining)
551 inOStream <<
BIN08(*pBuffer);
552 else if (inRadix == 8)
553 inOStream <<
oOCT(uint16_t(*pBuffer));
554 else if (inRadix == 10)
555 inOStream <<
DEC0N(uint16_t(*pBuffer),maxByteWidth);
556 else if (inRadix == 16)
557 inOStream <<
HEX0N(uint16_t(*pBuffer),2);
560 pAsciiBuffer[groupsInThisRow * inBytesPerGroup + bytesInThisGroup] = isprint(*pBuffer) ? *pBuffer :
'.';
565 if (bytesInThisGroup >= inBytesPerGroup)
568 if (inGroupsPerRow && groupsInThisRow >= inGroupsPerRow)
572 inOStream <<
" " << pAsciiBuffer;
573 ::memset (pAsciiBuffer, 0, asciiBufferSize);
576 if (inAddressRadix && bytesRemaining)
577 inOStream << print_address_offset (inAddressRadix, reinterpret_cast <ULWord64> (pBuffer) - reinterpret_cast <ULWord64> (pInStartAddress) +
ULWord64 (inAddrOffset));
582 bytesInThisGroup = 0;
586 if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup && pAsciiBuffer)
589 inOStream <<
string ((inBytesPerGroup - bytesInThisGroup) * maxByteWidth + 1,
' ');
594 if (groupsInThisRow < inGroupsPerRow && pAsciiBuffer)
595 inOStream <<
string (((inGroupsPerRow - groupsInThisRow) * inBytesPerGroup * maxByteWidth + (inGroupsPerRow - groupsInThisRow)),
' ');
597 inOStream << pAsciiBuffer;
600 else if (bytesInThisGroup && bytesInThisGroup < inBytesPerGroup)
604 delete [] pAsciiBuffer;
611 const size_t inStartOffset,
612 const size_t inByteCount,
613 const size_t inRadix,
614 const size_t inBytesPerGroup,
615 const size_t inGroupsPerRow,
616 const size_t inAddressRadix,
617 const bool inShowAscii,
618 const size_t inAddrOffset)
const 621 Dump (oss, inStartOffset, inByteCount, inRadix, inBytesPerGroup, inGroupsPerRow, inAddressRadix, inShowAscii, inAddrOffset);
622 inOutputString = oss.str();
623 return inOutputString;
644 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint64_t));
645 if (maxSize < inU64Offset)
647 maxSize -= inU64Offset;
649 const uint64_t * pU64 (reinterpret_cast <const uint64_t *> (
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
653 if (inMaxSize && inMaxSize < maxSize)
658 outUint64s.reserve(maxSize);
659 for (
size_t ndx(0); ndx < maxSize; ndx++)
661 const uint64_t u64 (*pU64++);
668 outUint64s.reserve(0);
681 size_t maxNumU32s (
size_t(
GetByteCount()) /
sizeof(uint32_t));
682 if (maxNumU32s < inU32Offset)
684 maxNumU32s -= inU32Offset;
686 const uint32_t * pU32 (reinterpret_cast<const uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
690 if (inMaxSize && inMaxSize < maxNumU32s)
691 maxNumU32s = inMaxSize;
695 outUint32s.reserve(maxNumU32s);
696 for (
size_t ndx(0); ndx < maxNumU32s; ndx++)
698 const uint32_t u32 (*pU32++);
705 outUint32s.reserve(0);
718 size_t maxSize (
size_t(
GetByteCount()) /
sizeof(uint16_t));
719 if (maxSize < inU16Offset)
721 maxSize -= inU16Offset;
723 const uint16_t * pU16 (reinterpret_cast <const uint16_t *> (
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
727 if (inMaxSize && inMaxSize < maxSize)
732 outUint16s.reserve(maxSize);
733 for (
size_t ndx(0); ndx < maxSize; ndx++)
735 const uint16_t u16 (*pU16++);
742 outUint16s.reserve(0);
756 if (maxSize < inU8Offset)
758 maxSize -= inU8Offset;
764 if (inMaxSize && inMaxSize < maxSize)
769 outUint8s.reserve(maxSize);
770 for (
size_t ndx(0); ndx < maxSize; ndx++)
771 outUint8s.push_back(*pU8++);
776 outUint8s.reserve(0);
784 const uint8_t * pU8 (reinterpret_cast<const uint8_t*> (
GetHostPointer()));
790 outU8s.reserve(outU8s.size() + maxSize);
791 outU8s.insert(outU8s.end(),pU8, pU8 + maxSize);
808 if (maxSize < inU8Offset)
810 maxSize -= inU8Offset;
816 if (inMaxSize && inMaxSize < maxSize)
821 outString.reserve(maxSize);
822 for (
size_t ndx(0); ndx < maxSize; ndx++)
824 const char c = *pU8++;
834 outString.reserve(0);
849 uint64_t * pU64 (reinterpret_cast<uint64_t*>(
GetHostAddress(
ULWord(inU64Offset *
sizeof(uint64_t)))));
852 if (maxU64s > inU64Offset)
853 maxU64s -= inU64Offset;
854 if (maxU64s > inU64s.size())
855 maxU64s = inU64s.size();
856 if (inU64s.size() > maxU64s)
859 for (
unsigned ndx(0); ndx < maxU64s; ndx++)
877 uint32_t * pU32 (reinterpret_cast<uint32_t*>(
GetHostAddress(
ULWord(inU32Offset *
sizeof(uint32_t)))));
880 if (maxU32s > inU32Offset)
881 maxU32s -= inU32Offset;
882 if (maxU32s > inU32s.size())
883 maxU32s = inU32s.size();
884 if (inU32s.size() > maxU32s)
887 for (
unsigned ndx(0); ndx < maxU32s; ndx++)
905 uint16_t * pU16 (reinterpret_cast<uint16_t*>(
GetHostAddress(
ULWord(inU16Offset *
sizeof(uint16_t)))));
908 if (maxU16s > inU16Offset)
909 maxU16s -= inU16Offset;
910 if (maxU16s > inU16s.size())
911 maxU16s = inU16s.size();
912 if (inU16s.size() > maxU16s)
915 for (
unsigned ndx(0); ndx < maxU16s; ndx++)
936 if (maxU8s > inU8Offset)
937 maxU8s -= inU8Offset;
938 if (maxU8s > inU8s.size())
939 maxU8s = inU8s.size();
940 if (inU8s.size() > maxU8s)
943 ::memcpy(pU8, &inU8s[0], maxU8s);
945 for (
unsigned ndx(0); ndx < maxU8s; ndx++)
947 *pU8++ = inU8s.at(ndx);
961 return inOutStream <<
"{invalid}";
967 inOutList.push_back (inRP188);
974 inOutStream << inObj.size () <<
":[";
977 inOutStream << *iter;
978 if (++iter != inObj.end ())
981 return inOutStream <<
"]";
987 inOutStream << inObj.size () <<
":[";
991 if (++iter != inObj.end ())
994 return inOutStream <<
"]";
1003 if (++iter != inObj.end ())
1004 inOutStream <<
", ";
1013 inOutSet.insert (*iter);
1020 return inOutStream << inObj.
acHeader 1041 <<
" acFrame=" << inObj.
acFrame 1042 <<
" acRP188=" << inObj.
acRP188 1053 inOutStream <<
"n/a";
1060 #if defined (_DEBUG) 1064 while (str.find (
' ') != string::npos)
1065 str.erase (str.find (
' '), 1);
1110 inOutStream <<
"RegValues:" << inObj.size () <<
"[";
1111 while (iter != inObj.end ())
1113 const NTV2RegisterNumber registerNumber (static_cast <NTV2RegisterNumber> (iter->first));
1114 const ULWord registerValue (iter->second);
1116 if (++iter != inObj.end ())
1119 return inOutStream <<
"]";
1146 if (inOutSet.find(*iter) == inOutSet.end())
1147 inOutSet.insert(*iter);
1155 NTV2VideoFormatSet::const_iterator iter (inFormats.begin ());
1157 inOStream << inFormats.size ()
1158 << (inFormats.size () == 1 ?
" video format: " :
" video format(s): ");
1160 while (iter != inFormats.end ())
1163 inOStream << (++iter == inFormats.end () ?
"" :
", ");
1175 inOStream << inFormats.size()
1176 << (inFormats.size() == 1 ?
" pixel format: " :
" pixel formats: ");
1178 while (iter != inFormats.end())
1181 inOStream << (++iter == inFormats.end() ?
"" :
", ");
1191 inOutSet.insert(*iter);
1201 inOStream << inStandards.size ()
1202 << (inStandards.size () == 1 ?
" standard: " :
" standards: ");
1204 while (iter != inStandards.end ())
1207 inOStream << (++iter == inStandards.end () ?
"" :
", ");
1217 inOutSet.insert(*iter);
1226 inOStream << inGeometries.size ()
1227 << (inGeometries.size () == 1 ?
" geometry: " :
" geometries: ");
1228 while (iter != inGeometries.end ())
1231 inOStream << (++iter == inGeometries.end () ?
"" :
", ");
1240 inOutSet.insert(*iter);
1249 inOStream << inSet.size()
1250 << (inSet.size() == 1 ?
" input: " :
" inputs: ");
1251 while (iter != inSet.end())
1254 inOStream << (++iter == inSet.end() ?
"" :
", ");
1263 inOutSet.insert (*iter);
1271 inOStream << inSet.size()
1272 << (inSet.size() == 1 ?
" output: " :
" outputs: ");
1273 while (iter != inSet.end())
1276 inOStream << (++iter == inSet.end() ?
"" :
", ");
1285 inOutSet.insert(*iter);
1298 if (outFormats.find(*fit) == outFormats.end())
1299 outFormats.insert(*fit);
1309 if (usedFormats.find(pf) == usedFormats.end())
1310 outFormats.insert(pf);
1316 outStandards.clear();
1323 if (outStandards.find(*sit) == outStandards.end())
1324 outStandards.insert(*sit);
1334 if (usedStandards.find(st) == usedStandards.end())
1335 outStandards.insert(st);
1354 outFormats.insert(vf);
1356 catch (
const std::bad_alloc &)
1364 NTV2_ASSERT ((isOkay && !outFormats.empty()) || (!isOkay && outFormats.empty()));
1379 outFormats.insert(pixelFormat);
1381 catch (
const std::bad_alloc &)
1389 if (supportedDevices.find(inDeviceID) != supportedDevices.end())
1391 return isOkay && !outFormats.empty();
1401 outStandards.clear();
1408 outStandards.insert(
std);
1417 outGeometries.clear();
1431 outInputSources.clear();
1440 outInputSources.insert(src);
1450 outOutputDests.clear();
1456 for (
size_t ndx(0); ndx < 10; ndx++)
1462 outOutputDests.insert(dst);
1471 << (inSet.size() == 1 ?
" rate: " :
" rates: ");
1472 while (it != inSet.end())
1475 oss << (++it == inSet.end() ?
"" :
", ");
1483 if (inOutSet.find(*it) == inOutSet.end())
1484 inOutSet.insert(*it);
1497 outRates.insert(fr);
1505 return inRun.
Print(inOutStrm);
1512 static const char * sStateStrings [] = {
"Disabled",
"Initializing",
"Starting",
"Paused",
"Stopping",
"Running",
"StartingAtTime",
AJA_NULL};
1514 return string (sStateStrings [inState]);
1556 return it != sFGWdths.end() ? it->second : 0;
1582 return it != sFGHghts.end() ? it->second : 0;
1586 static const string sSegXferUnits[] = {
"",
" U8",
" U16",
"",
" U32",
"",
"",
"",
" U64",
""};
1591 return inStrm <<
"(invalid)";
1615 static string var(
"segInfo");
1617 string units(
"\t// bytes");
1621 oss <<
"NTV2SegmentedXferInfo " << var <<
";" << endl;
1630 oss << var <<
".setSourceOffset(" <<
DEC(
getSourceOffset()) <<
");" << units << endl;
1631 oss << var <<
".setSourcePitch(" <<
DEC(
getSourcePitch()) <<
");" << units << endl;
1633 oss << var <<
".setSourceDirection(false);" << endl;
1635 oss << var <<
".setDestOffset(" <<
DEC(
getDestOffset()) <<
");" << units << endl;
1637 oss << var <<
".setDestPitch(" <<
DEC(
getDestPitch()) <<
");" << units << endl;
1639 oss << var <<
".setDestDirection(false);" << endl;
1657 if (inElementOffset < offset)
1690 mElementsPerSegment = 0;
1691 mInitialSrcOffset = 0;
1692 mInitialDstOffset = 0;
1693 mSrcElementsPerRow = 0;
1694 mDstElementsPerRow = 0;
1701 std::swap(mSrcElementsPerRow, mDstElementsPerRow);
1702 std::swap(mInitialSrcOffset, mInitialDstOffset);
1711 fByteCount (
ULWord(pInUserPointer ? inByteCount : 0)),
1713 #
if defined (AJAMac)
1714 fKernelSpacePtr (0),
1726 : fUserSpacePtr (0),
1729 #
if defined (AJAMac)
1730 fKernelSpacePtr (0),
1744 : fUserSpacePtr (0),
1747 #
if defined (AJAMac)
1748 fKernelSpacePtr (0),
1768 fByteCount =
ULWord(inNewByteCount);
1797 const size_t loopCount(
GetByteCount() /
sizeof(uint64_t));
1800 for (
size_t ndx(0); ndx < loopCount; ndx++)
1809 const size_t loopCount(
GetByteCount() /
sizeof(uint32_t));
1812 for (
size_t ndx(0); ndx < loopCount; ndx++)
1821 const size_t loopCount(
GetByteCount() /
sizeof(uint16_t));
1824 for (
size_t ndx(0); ndx < loopCount; ndx++)
1832 if (uint64_t(inByteCount) >= 0x0000000100000000)
1836 fByteCount =
ULWord(pInUserPointer ? inByteCount : 0);
1838 return (pInUserPointer && inByteCount) || (!pInUserPointer && !inByteCount);
1844 return Set(pInUserPointer, inByteCount) &&
Fill(inValue);
1850 if (uint64_t(inByteCount) >= 0x0000000100000000)
1868 {pBuffer =
new UByte[inByteCount];}
1869 catch (
const std::bad_alloc &)
1871 if (pBuffer &&
Set(pBuffer, inByteCount))
1916 pBytes += inByteOffset;
1952 const ULWord inSrcByteOffset,
const ULWord inDstByteOffset,
const ULWord inByteCount)
1956 if (inSrcByteOffset + inByteCount > inBuffer.
GetByteCount())
1961 const UByte * pSrc (inBuffer);
1962 pSrc += inSrcByteOffset;
1964 UByte * pDst (*
this);
1965 pDst += inDstByteOffset;
1967 ::memcpy (pDst, pSrc, inByteCount);
1984 srcPitch = 0 - srcPitch;
1986 dstPitch = 0 - dstPitch;
1991 if (!pSrc)
return false;
1992 if (!pDst)
return false;
1997 ::memcpy (pDst, pSrc,
size_t(bytesPerSeg));
1998 srcOffset += srcPitch;
1999 dstOffset += dstPitch;
2009 const string newline(
"\n"), tab(
"\t");
2015 for (
size_t ndx(0); ndx < str.size(); ndx++)
2025 for (
size_t srcNdx(0), dstNdx(0); srcNdx < str.size(); srcNdx += 2)
2039 if (fFlags != inBuffer.fFlags)
2045 fUserSpacePtr = inBuffer.fUserSpacePtr;
2046 inBuffer.fUserSpacePtr = tmp;
2062 const uint8_t * pSrchData (inValue);
2063 const uint8_t * pMyData (*
this);
2067 if (!::memcmp(pMyData, pSrchData, srchByteCount))
2069 outOffsets.insert(offset);
2070 if (inLimit && outOffsets.size() >= inLimit)
2075 }
while (offset < maxOffset);
2087 if (inByteOffset >= totalBytes)
2090 totalBytes -= inByteOffset;
2092 ULWord byteCount(inByteCount);
2093 if (byteCount > totalBytes)
2094 byteCount = totalBytes;
2099 const UByte * pByte1 (*
this);
2100 const UByte * pByte2 (inBuffer);
2101 pByte1 += inByteOffset;
2102 pByte2 += inByteOffset;
2103 #if !defined(NTV2BUFFER_NO_MEMCMP) 2104 return ::memcmp (pByte1, pByte2, byteCount) == 0;
2105 #else // NTV2BUFFER_NO_MEMCMP 2106 ULWord offset(inByteOffset);
2109 if (*pByte1 != *pByte2)
2111 cerr <<
"## ERROR: IsContentEqual: miscompare at offset " <<
xHEX0N(offset,8)
2112 <<
" (" <<
DEC(offset) <<
"): " <<
xHEX0N(
UWord(*pByte1),2) <<
" != " 2114 <<
DEC(byteCount) <<
") bytes left to compare" << endl;
2122 #endif // NTV2BUFFER_NO_MEMCMP 2127 if (byteOffset == 0xFFFFFFFF)
2134 {byteOffset = 0xFFFFFFFF;
return true;}
2137 if (byteOffset >= totalBytesToCompare)
2139 totalBytesToCompare -= byteOffset;
2141 const UByte * pByte1 (*
this);
2142 const UByte * pByte2 (inBuffer);
2143 while (totalBytesToCompare)
2145 if (pByte1[byteOffset] != pByte2[byteOffset])
2147 totalBytesToCompare--;
2150 byteOffset = 0xFFFFFFFF;
2156 outByteOffsetFirst = outByteOffsetLast =
GetByteCount ();
2169 outByteOffsetFirst = 0;
2172 if (*pByte1 != *pByte2)
2176 outByteOffsetFirst++;
2178 if (outByteOffsetFirst == 0)
2183 if (*pByte1 == *pByte2)
2187 outByteOffsetFirst++;
2190 outByteOffsetFirst--;
2200 while (--outByteOffsetLast)
2202 if (*pByte1 != *pByte2)
2210 while (outByteOffsetLast)
2212 if (*pByte1 == *pByte2)
2216 outByteOffsetLast--;
2219 outByteOffsetLast++;
2220 if (outByteOffsetLast <= outByteOffsetFirst)
2221 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" <= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2222 const ULWord tmp (outByteOffsetLast);
2223 outByteOffsetLast = outByteOffsetFirst;
2224 outByteOffsetFirst = tmp;
2225 if (outByteOffsetLast >= outByteOffsetFirst)
2226 cerr <<
"## WARNING: GetRingChangedByteRange: last " << outByteOffsetLast <<
" >= first " << outByteOffsetFirst <<
" in wrap condition" << endl;
2242 const bool result (inNewSize && (!(inNewSize & (inNewSize - 1))));
2250 #if defined(MSWindows) || defined(AJABareMetal) 2251 return AJA_PAGE_SIZE;
2253 return size_t(::getpagesize());
2261 acRequestedFrame (0),
2262 acAudioClockTimeStamp (0),
2263 acAudioExpectedAddress (0),
2264 acAudioInStartAddress (0),
2265 acAudioInStopAddress (0),
2266 acAudioOutStopAddress (0),
2267 acAudioOutStartAddress (0),
2268 acTotalBytesTransferred (0),
2273 acCurrentFrameTime (0),
2274 acAudioClockCurrentTime (0),
2275 acCurrentAudioExpectedAddress (0),
2276 acCurrentAudioStartAddress (0),
2277 acCurrentFieldCount (0),
2278 acCurrentLineCount (0),
2280 acCurrentUserCookie (0),
2289 : acHeader (inObj.acHeader),
2290 acFrameTime (inObj.acFrameTime),
2291 acRequestedFrame (inObj.acRequestedFrame),
2292 acAudioClockTimeStamp (inObj.acAudioClockTimeStamp),
2293 acAudioExpectedAddress (inObj.acAudioExpectedAddress),
2294 acAudioInStartAddress (inObj.acAudioInStartAddress),
2295 acAudioInStopAddress (inObj.acAudioInStopAddress),
2296 acAudioOutStopAddress (inObj.acAudioOutStopAddress),
2297 acAudioOutStartAddress (inObj.acAudioOutStartAddress),
2298 acTotalBytesTransferred (inObj.acTotalBytesTransferred),
2299 acStartSample (inObj.acStartSample),
2300 acCurrentTime (inObj.acCurrentTime),
2301 acCurrentFrame (inObj.acCurrentFrame),
2302 acCurrentFrameTime (inObj.acCurrentFrameTime),
2303 acAudioClockCurrentTime (inObj.acAudioClockCurrentTime),
2304 acCurrentAudioExpectedAddress (inObj.acCurrentAudioExpectedAddress),
2305 acCurrentAudioStartAddress (inObj.acCurrentAudioStartAddress),
2306 acCurrentFieldCount (inObj.acCurrentFieldCount),
2307 acCurrentLineCount (inObj.acCurrentLineCount),
2308 acCurrentReps (inObj.acCurrentReps),
2309 acCurrentUserCookie (inObj.acCurrentUserCookie),
2310 acFrame (inObj.acFrame),
2311 acRP188 (inObj.acRP188),
2312 acTrailer (inObj.acTrailer)
2335 for (
ULWord ndx (0); ndx < numRP188s; ndx++)
2336 outValues << pArray [ndx];
2355 outTimeCode = pArray [inTCIndex];
2363 outTimeCodes.clear();
2379 outTimeCodes[tcIndex] = tc;
2380 else if (tc.IsValid())
2381 outTimeCodes[tcIndex] = tc;
2391 (
void)inSDIInputIndex0;
2399 if (!pArray || !numRP188s)
2404 if (
ULWord(inTCNdx) >= numRP188s)
2407 pArray[inTCNdx] = inTimecode;
2555 if (mInStatistics.
IsNULL())
2570 if (numElements != 8)
2572 if (inSDIInputIndex0 >= numElements)
2574 outStatus = pArray[inSDIInputIndex0];
2586 if (numElements != 8)
2588 if (inSDIInputIndex0 >= numElements)
2590 return pArray[inSDIInputIndex0];
2596 inOutStream << mHeader <<
", " << mInStatistics <<
", " << mTrailer;
return inOutStream;
2603 acTransferFrame (0),
2605 acFramesProcessed (0),
2606 acFramesDropped (0),
2608 acAudioTransferSize (0),
2609 acAudioStartSample (0),
2610 acAncTransferSize (0),
2611 acAncField2TransferSize (0)
2620 acCrosspoint (inCrosspoint),
2625 acRDTSCStartTime (0),
2626 acAudioClockStartTime (0),
2627 acRDTSCCurrentTime (0),
2628 acAudioClockCurrentTime (0),
2629 acFramesProcessed (0),
2630 acFramesDropped (0),
2737 if (inIndexNum == 0)
2754 case 13: oss << (
WithRP188() ?
"Yes" :
"No");
break;
2755 case 14: oss << (
WithLTC() ?
"Yes" :
"No");
break;
2759 case 18: oss << (
WithVidProc() ?
"Yes" :
"No");
break;
2762 case 21: oss << (
IsFieldMode() ?
"Yes" :
"No");
break;
2765 else if (inIndexNum < 22)
2775 << (inObj.
IsInput() ?
"Input " : (inObj.
IsOutput() ?
"Output" :
"*BAD* "))
2784 << setw(10) << (inObj.
WithRP188() ?
"+RP188" :
"-RP188")
2785 << setw(10) << (inObj.
WithLTC() ?
"+LTC" :
"-LTC")
2786 << setw(10) << (inObj.
WithFBFChange() ?
"+FBFchg" :
"-FBFchg")
2787 << setw(10) << (inObj.
WithFBOChange() ?
"+FBOchg" :
"-FBOchg")
2789 << setw(10) << (inObj.
WithVidProc() ?
"+VidProc" :
"-VidProc")
2790 << setw(10) << (inObj.
WithCustomAnc() ?
"+AncData" :
"-AncData")
2792 << setw(10) << (inObj.
IsFieldMode() ?
"+FldMode" :
"-FldMode");
2805 Set (inNumSegments, inNumActiveBytesPerRow, inHostBytesPerRow, inDeviceBytesPerRow);
2831 ccSaturationValue (0)
2868 acTransferStatus (),
2870 acInVideoDMAOffset (0),
2871 acInSegmentedDMAInfo (),
2872 acColorCorrection (),
2877 acPeerToPeerFlags (0),
2878 acFrameRepeatCount (1),
2879 acDesiredFrame (-1),
2891 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2893 acVideoBuffer (pInVideoBuffer, inVideoByteCount),
2894 acAudioBuffer (pInAudioBuffer, inAudioByteCount),
2895 acANCBuffer (pInANCBuffer, inANCByteCount),
2896 acANCField2Buffer (pInANCF2Buffer, inANCF2ByteCount),
2898 acTransferStatus (),
2900 acInVideoDMAOffset (0),
2901 acInSegmentedDMAInfo (),
2902 acColorCorrection (),
2907 acPeerToPeerFlags (0),
2908 acFrameRepeatCount (1),
2909 acDesiredFrame (-1),
2925 ULWord * pInAudioBuffer,
const ULWord inAudioByteCount,
2927 ULWord * pInANCF2Buffer,
const ULWord inANCF2ByteCount)
2932 &&
SetAncBuffers (pInANCBuffer, inANCByteCount, pInANCF2Buffer, inANCF2ByteCount);
2973 for (
UWord ndx (0); ndx <
UWord(maxNumValues); ndx++)
2975 const NTV2TCIndex tcIndex (static_cast<NTV2TCIndex>(ndx));
2995 pArray[inTCIndex] = inTimeCode;
3009 for (
ULWord tcIndex(0); tcIndex < maxNumValues; tcIndex++)
3013 pArray[tcIndex] = inTimeCode;
3036 const ULWord inHostBytesPerRow,
const ULWord inDeviceBytesPerRow)
3224 mInNumRegisters (
ULWord (inRegisterNumbers.size ())),
3225 mOutNumRegisters (0)
3234 mInNumRegisters (
ULWord (inRegReads.size ())),
3235 mOutNumRegisters (0)
3245 mInNumRegisters =
ULWord(inRegisterNumbers.size());
3246 mOutNumRegisters = 0;
3247 bool result ( mInRegisters.
Allocate(mInNumRegisters *
sizeof(
ULWord))
3254 ULWord * pRegArray(mInRegisters);
3260 pRegArray[ndx++] = *iter;
3267 if (!mInNumRegisters)
3274 const ULWord * pRegNums(mInRegisters);
3275 for (
ULWord ndx(0); ndx < mInNumRegisters; ndx++)
3276 if (outRegNums.find(pRegNums[ndx]) == outRegNums.end())
3277 outRegNums.insert(pRegNums[ndx]);
3285 outGoodRegNums.clear();
3286 if (!mOutGoodRegisters)
3288 if (!mOutNumRegisters)
3290 if (mOutNumRegisters > mInNumRegisters)
3293 const ULWord * pRegArray (mOutGoodRegisters);
3294 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3295 outGoodRegNums.insert(pRegArray[ndx]);
3302 outBadRegNums.clear();
3308 if (reqRegNums == goodRegNums)
3312 std::set_difference (reqRegNums.begin(), reqRegNums.end(),
3313 goodRegNums.begin(), goodRegNums.end(),
3314 std::inserter(outBadRegNums, outBadRegNums.begin()));
3320 if (!mOutGoodRegisters)
3322 if (!mOutNumRegisters)
3324 if (mOutNumRegisters > mInNumRegisters)
3330 const ULWord * pRegArray (mOutGoodRegisters);
3331 ULWord * pValArray (mOutValues);
3332 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3333 if (pRegArray[ndx] == inRegNum)
3335 pValArray[ndx] = inValue;
3346 if (!mOutGoodRegisters)
3348 if (!mOutNumRegisters)
3350 if (mOutNumRegisters > mInNumRegisters)
3357 const ULWord * pRegArray (mOutGoodRegisters);
3358 const ULWord * pValArray (mOutValues);
3359 for (
ULWord ndx(0); ndx < mOutNumRegisters; ndx++)
3361 outValues [pRegArray[ndx]] = pValArray[ndx];
3362 #if defined(NTV2_PRETEND_DEVICE) 3363 if (pRegArray[ndx] ==
kRegBoardID && pValArray[ndx] == NTV2_PRETEND_DEVICE_FROM)
3364 outValues [pRegArray[ndx]] = NTV2_PRETEND_DEVICE_TO;
3367 #endif // NTV2_PRETEND_DEVICE 3379 if (outValues.empty())
3384 #if defined(NTV2_PRETEND_DEVICE) 3386 regInfo.
setValue(NTV2_PRETEND_DEVICE_TO);
3389 #endif // NTV2_PRETEND_DEVICE 3390 outValues.push_back(regInfo);
3396 uint32_t missingTally(0);
3400 if (mapIter != regValMap.end())
3401 it->registerValue = mapIter->second;
3405 #
if defined(NTV2_PRETEND_DEVICE)
3406 if (it->registerNumber ==
kRegBoardID && it->registerValue == NTV2_PRETEND_DEVICE_FROM)
3407 it->registerValue = NTV2_PRETEND_DEVICE_TO;
3410 #endif // NTV2_PRETEND_DEVICE 3412 return !missingTally;
3419 inOutStream << mHeader <<
", numRegs=" << mInNumRegisters <<
", inRegs=" << mInRegisters <<
", outNumGoodRegs=" << mOutNumRegisters
3420 <<
", outGoodRegs=" << mOutGoodRegisters <<
", outValues=" << mOutValues <<
", " << mTrailer;
3427 mInNumRegisters (
ULWord(inRegWrites.size())),
3451 pBadRegIndexes[ndx] = 0;
3453 pRegInfoArray[ndx++] = *it;
3464 outFailedRegWrites.clear();
3470 outRegWrites.clear();
3479 outRegWrites.push_back(pRegInfos[ndx]);
3492 if (pBadRegIndexes && maxNumBadRegIndexes && pRegInfoArray && maxNumRegInfos &&
mOutNumFailures)
3495 for (
UWord num(0); num < maxNumBadRegIndexes; num++)
3497 const UWord badRegIndex (pBadRegIndexes[num]);
3498 if (badRegIndex < maxNumRegInfos)
3500 const NTV2RegInfo & badRegInfo (pRegInfoArray[badRegIndex]);
3501 oss <<
"Failure " << num <<
": " << badRegInfo << endl;
3511 typedef std::pair <ULWord, ULWord> ULWordPair;
3512 typedef std::pair <ULWordPair, ULWordPair> ULWordPairs;
3535 const bool badName (regName.find(
' ') != string::npos);
3538 oss << sCard <<
".WriteRegister (";
3576 << name <<
" Number: " <<
regNum() << endl
3588 ULWord received(0), rcvdRegNum(0), rcvdRegVal(0);
3589 static const string sNumber (
" Number: "), sValue (
" Value: "), sHexPrefix(
" : 0x");
3590 for (
size_t ndx(0); ndx < inLogLines.size(); ndx++)
3592 string line (inLogLines.at(ndx));
3593 size_t posNumber (line.find(sNumber));
3594 if (posNumber != string::npos)
3596 if (received & 0x0001)
3598 line.erase(0, posNumber + sNumber.length());
3602 received |= 0x00000001;
3605 size_t posValue(inLogLines.at(ndx).find(sValue));
3606 if (posValue != string::npos)
3608 if (received & 0x0002)
3610 posValue += sValue.length();
3611 line.erase(0, posValue + sValue.length());
3614 size_t numHexDigits(0);
3615 for (
size_t ndx(0); ndx < line.size(); ndx++)
3618 if (numHexDigits != line.length())
3621 istringstream iss(line);
3622 iss >> std::hex >> rcvdRegVal;
3629 return received == 3;
3635 for (NTV2ULWordVector::const_iterator it(inObj.begin()); it != inObj.end(); ++it)
3636 inOutStream <<
" " <<
HEX0N(*it,8);
3643 inOutStream << (inCompact ?
"Ch[" :
"[");
3647 inOutStream <<
DEC(*it+1);
3650 if (++it != inObj.end())
3651 inOutStream << (inCompact ?
"|" :
",");
3653 return inOutStream <<
"]";
3657 { ostringstream oss;
3664 inOutStream << (inCompact ?
"Ch{" :
"{");
3668 inOutStream <<
DEC(*it+1);
3671 if (++it != inObj.end())
3672 inOutStream << (inCompact ?
"|" :
",");
3674 return inOutStream <<
"}";
3678 { ostringstream oss;
3705 result.push_back(ch);
3713 result.push_back(*it);
3719 inOutStream << (inCompact ?
"AudSys{" :
"{");
3723 inOutStream <<
DEC(*it+1);
3726 if (++it != inObj.end())
3727 inOutStream << (inCompact ?
"|" :
",");
3729 return inOutStream <<
"}";
3733 { ostringstream oss;
3743 result.insert(audSys);
3751 if (result.find(it->registerNumber) == result.end())
3752 result.insert(it->registerNumber);
3759 if (iter->registerNumber == inRegNum)
3761 return inRegInfos.end();
3767 return inObj.
Print(inOutStream);
3773 inOutStream << inObj.size () <<
" regs:" << endl;
3775 inOutStream << *iter << endl;
3782 mIsWriting (inDoWrite),
3788 *pRegInfo = inBankSelect;
3791 *pRegInfo = inOutRegInfo;
3804 if (
ULWord(inIndex0) < maxNum)
3805 result = pRegInfos[inIndex0];
3817 if (
mInBankInfos) oss << *pBankRegInfo;
else oss <<
"-";
3818 oss <<
" regInfos=";
3819 if (
mInRegInfos) oss << *pRegInfo;
else oss <<
"-";
3827 mIsWriting (inDoWrite),
3828 mVirtualData (inVirtualData, inVirtualDataSize)
3843 mMessage (inMessage, inMessageSize),
3863 #define AsU8Ref(_x_) reinterpret_cast<uint8_t&>(_x_) 3864 #define AsU16Ref(_x_) reinterpret_cast<uint16_t&>(_x_) 3865 #define AsU32Ref(_x_) reinterpret_cast<uint32_t&>(_x_) 3866 #define AsU64Ref(_x_) reinterpret_cast<uint64_t&>(_x_) 3872 PUSHU32(fHeaderVersion, outBlob);
3874 PUSHU32(fSizeInBytes, outBlob);
3875 PUSHU32(fPointerSize, outBlob);
3877 PUSHU32(fResultStatus, outBlob);
3883 POPU32(fHeaderTag, inBlob, inOutIndex);
3884 POPU32(fType, inBlob, inOutIndex);
3885 POPU32(fHeaderVersion, inBlob, inOutIndex);
3886 POPU32(fVersion, inBlob, inOutIndex);
3888 POPU32(v32, inBlob, inOutIndex);
3889 POPU32(fPointerSize, inBlob, inOutIndex);
3890 POPU32(fOperation, inBlob, inOutIndex);
3891 POPU32(fResultStatus, inBlob, inOutIndex);
3897 PUSHU32(fTrailerVersion, outBlob);
3898 PUSHU32(fTrailerTag, outBlob);
3904 POPU32(fTrailerVersion, inBlob, inOutIndex);
3905 POPU32(fTrailerTag, inBlob, inOutIndex);
3914 if (!IsNULL() && fillBuffer)
3921 ULWord byteCount(0), flags(0);
3922 POPU32(byteCount, inBlob, inOutIndex);
3923 POPU32(flags, inBlob, inOutIndex);
3928 if ((inOutIndex + byteCount) > inBlob.size())
3930 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
3931 inOutIndex += byteCount;
3939 ULWord byteCount(0), flags(0);
3940 POPU32(byteCount, inBlob, inOutIndex);
3941 POPU32(flags, inBlob, inOutIndex);
3942 if ((inOutIndex + byteCount) > inBlob.size())
3945 ::memcpy(GetHostPointer(), inBlob.data() + inOutIndex, byteCount);
3946 inOutIndex += byteCount;
3952 const size_t totBytes (mHeader.GetSizeInBytes()
3953 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
3954 if (outBlob.capacity() < totBytes)
3955 outBlob.reserve(totBytes);
3958 mInRegisters.ByteSwap32();
3960 bool ok = mHeader.RPCEncode(outBlob);
3961 PUSHU32(mInNumRegisters, outBlob);
3962 ok &= mInRegisters.RPCEncode(outBlob,
true);
3963 PUSHU32(mOutNumRegisters, outBlob);
3964 ok &= mOutGoodRegisters.RPCEncode(outBlob,
false)
3965 && mOutValues.RPCEncode(outBlob,
false)
3966 && mTrailer.RPCEncode(outBlob);
3969 mInRegisters.ByteSwap32();
3976 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
3977 if (!ok)
return false;
3978 POPU32(mInNumRegisters, inBlob, inOutIndex);
3979 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
true);
3980 POPU32(mOutNumRegisters, inBlob, inOutIndex);
3981 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
false);
3982 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
false);
3983 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
3986 mInRegisters.ByteSwap32();
3993 const size_t totBytes (mHeader.GetSizeInBytes()
3994 + mInRegisters.GetByteCount() + mOutGoodRegisters.GetByteCount() + mOutValues.GetByteCount());
3995 if (outBlob.capacity() < totBytes)
3996 outBlob.reserve(totBytes);
3999 mOutGoodRegisters.ByteSwap32();
4000 mOutValues.ByteSwap32();
4002 bool ok = mHeader.RPCEncode(outBlob);
4003 PUSHU32(mInNumRegisters, outBlob);
4004 ok &= mInRegisters.RPCEncode(outBlob,
false);
4005 PUSHU32(mOutNumRegisters, outBlob);
4006 ok &= mOutGoodRegisters.RPCEncode(outBlob,
true)
4007 && mOutValues.RPCEncode(outBlob,
true)
4008 && mTrailer.RPCEncode(outBlob);
4011 mOutGoodRegisters.ByteSwap32();
4012 mOutValues.ByteSwap32();
4019 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4020 if (!ok)
return false;
4021 POPU32(mInNumRegisters, inBlob, inOutIndex);
4022 ok &= mInRegisters.RPCDecode(inBlob, inOutIndex,
false);
4023 POPU32(mOutNumRegisters, inBlob, inOutIndex);
4024 ok &= mOutGoodRegisters.RPCDecode(inBlob, inOutIndex,
true);
4025 ok &= mOutValues.RPCDecode(inBlob, inOutIndex,
true);
4026 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4029 mOutGoodRegisters.ByteSwap32();
4030 mOutValues.ByteSwap32();
4037 const size_t totBytes (mHeader.GetSizeInBytes()
4038 + mInRegInfos.GetByteCount() + mOutBadRegIndexes.GetByteCount());
4039 if (outBlob.capacity() < totBytes)
4040 outBlob.reserve(totBytes);
4043 mInRegInfos.ByteSwap32();
4044 mOutBadRegIndexes.ByteSwap32();
4046 bool ok = mHeader.RPCEncode(outBlob);
4047 PUSHU32(mInNumRegisters, outBlob);
4048 ok &= mInRegInfos.RPCEncode(outBlob);
4049 PUSHU32(mOutNumFailures, outBlob);
4050 ok &= mOutBadRegIndexes.RPCEncode(outBlob)
4051 && mTrailer.RPCEncode(outBlob);
4054 mInRegInfos.ByteSwap32();
4055 mOutBadRegIndexes.ByteSwap16();
4062 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4063 POPU32(mInNumRegisters, inBlob, inOutIndex);
4064 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
4065 POPU32(mOutNumFailures, inBlob, inOutIndex);
4066 ok &= mOutBadRegIndexes.RPCDecode(inBlob, inOutIndex);
4067 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4070 mInRegInfos.ByteSwap32();
4071 mOutBadRegIndexes.ByteSwap16();
4078 const size_t totBytes (mHeader.GetSizeInBytes()
4079 + mInBankInfos.GetByteCount() + mInRegInfos.GetByteCount());
4080 if (outBlob.capacity() < totBytes)
4081 outBlob.reserve(totBytes);
4084 mInBankInfos.ByteSwap32();
4085 mInRegInfos.ByteSwap32();
4087 bool ok = mHeader.RPCEncode(outBlob);
4089 ok &= mInBankInfos.RPCEncode(outBlob);
4090 ok &= mInRegInfos.RPCEncode(outBlob)
4091 && mTrailer.RPCEncode(outBlob);
4094 mInBankInfos.ByteSwap32();
4095 mInRegInfos.ByteSwap32();
4102 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4103 POPU32(mIsWriting, inBlob, inOutIndex);
4104 ok &= mInBankInfos.RPCDecode(inBlob, inOutIndex);
4105 ok &= mInRegInfos.RPCDecode(inBlob, inOutIndex);
4106 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4109 mInBankInfos.ByteSwap32();
4110 mInRegInfos.ByteSwap32();
4117 const size_t totBytes (acHeader.GetSizeInBytes());
4118 if (outBlob.capacity() < totBytes)
4119 outBlob.reserve(totBytes);
4120 bool ok = acHeader.RPCEncode(outBlob);
4126 PUSHU64(acRDTSCStartTime, outBlob);
4127 PUSHU64(acAudioClockStartTime, outBlob);
4128 PUSHU64(acRDTSCCurrentTime, outBlob);
4129 PUSHU64(acAudioClockCurrentTime, outBlob);
4130 PUSHU32(acFramesProcessed, outBlob);
4131 PUSHU32(acFramesDropped, outBlob);
4132 PUSHU32(acBufferLevel, outBlob);
4133 PUSHU32(acOptionFlags, outBlob);
4135 ok &= acTrailer.RPCEncode(outBlob);
4140 { uint16_t v16(0); uint32_t v32(0);
4141 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4142 POPU16(v16, inBlob, inOutIndex);
4144 POPU16(v16, inBlob, inOutIndex);
4146 POPU32(v32, inBlob, inOutIndex);
4147 acStartFrame =
LWord(v32);
4148 POPU32(v32, inBlob, inOutIndex);
4149 acEndFrame =
LWord(v32);
4150 POPU32(v32, inBlob, inOutIndex);
4151 acActiveFrame =
LWord(v32);
4152 POPU64(acRDTSCStartTime, inBlob, inOutIndex);
4153 POPU64(acAudioClockStartTime, inBlob, inOutIndex);
4154 POPU64(acRDTSCCurrentTime, inBlob, inOutIndex);
4155 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4156 POPU32(acFramesProcessed, inBlob, inOutIndex);
4157 POPU32(acFramesDropped, inBlob, inOutIndex);
4158 POPU32(acBufferLevel, inBlob, inOutIndex);
4159 POPU32(acOptionFlags, inBlob, inOutIndex);
4160 POPU16(v16, inBlob, inOutIndex);
4162 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4168 const size_t totBytes (acHeader.GetSizeInBytes());
4169 if (outBlob.capacity() < totBytes)
4170 outBlob.reserve(totBytes);
4171 bool ok = acHeader.RPCEncode(outBlob);
4173 PUSHU32(acRequestedFrame, outBlob);
4174 PUSHU64(acAudioClockTimeStamp, outBlob);
4175 PUSHU32(acAudioExpectedAddress, outBlob);
4176 PUSHU32(acAudioInStartAddress, outBlob);
4177 PUSHU32(acAudioInStopAddress, outBlob);
4178 PUSHU32(acAudioOutStopAddress, outBlob);
4179 PUSHU32(acAudioOutStartAddress, outBlob);
4180 PUSHU32(acTotalBytesTransferred, outBlob);
4181 PUSHU32(acStartSample, outBlob);
4183 ok &= acTimeCodes.RPCEncode(outBlob);
4185 PUSHU32(acCurrentFrame, outBlob);
4187 PUSHU64(acAudioClockCurrentTime, outBlob);
4188 PUSHU32(acCurrentAudioExpectedAddress, outBlob);
4189 PUSHU32(acCurrentAudioStartAddress, outBlob);
4190 PUSHU32(acCurrentFieldCount, outBlob);
4191 PUSHU32(acCurrentLineCount, outBlob);
4192 PUSHU32(acCurrentReps, outBlob);
4193 PUSHU64(acCurrentUserCookie, outBlob);
4195 PUSHU32(acRP188.fDBB, outBlob);
4196 PUSHU32(acRP188.fLo, outBlob);
4197 PUSHU32(acRP188.fHi, outBlob);
4198 ok &= acTrailer.RPCEncode(outBlob);
4204 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4205 POPU64(v64, inBlob, inOutIndex);
4207 POPU32(acRequestedFrame, inBlob, inOutIndex);
4208 POPU64(acAudioClockTimeStamp, inBlob, inOutIndex);
4209 POPU32(acAudioExpectedAddress, inBlob, inOutIndex);
4210 POPU32(acAudioInStartAddress, inBlob, inOutIndex);
4211 POPU32(acAudioInStopAddress, inBlob, inOutIndex);
4212 POPU32(acAudioOutStopAddress, inBlob, inOutIndex);
4213 POPU32(acAudioOutStartAddress, inBlob, inOutIndex);
4214 POPU32(acTotalBytesTransferred, inBlob, inOutIndex);
4215 POPU32(acStartSample, inBlob, inOutIndex);
4217 ok &= acTimeCodes.RPCDecode(inBlob, inOutIndex);
4218 POPU64(v64, inBlob, inOutIndex);
4220 POPU32(acCurrentFrame, inBlob, inOutIndex);
4221 POPU64(v64, inBlob, inOutIndex);
4222 acCurrentFrameTime =
LWord64(v64);
4223 POPU64(acAudioClockCurrentTime, inBlob, inOutIndex);
4224 POPU32(acCurrentAudioExpectedAddress, inBlob, inOutIndex);
4225 POPU32(acCurrentAudioStartAddress, inBlob, inOutIndex);
4226 POPU32(acCurrentFieldCount, inBlob, inOutIndex);
4227 POPU32(acCurrentLineCount, inBlob, inOutIndex);
4228 POPU32(acCurrentReps, inBlob, inOutIndex);
4229 POPU64(acCurrentUserCookie, inBlob, inOutIndex);
4230 POPU32(acFrame, inBlob, inOutIndex);
4231 POPU32(acRP188.fDBB, inBlob, inOutIndex);
4232 POPU32(acRP188.fLo, inBlob, inOutIndex);
4233 POPU32(acRP188.fHi, inBlob, inOutIndex);
4234 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4240 const size_t totBytes (acHeader.GetSizeInBytes());
4241 if (outBlob.capacity() < totBytes)
4242 outBlob.reserve(totBytes);
4243 bool ok = acHeader.RPCEncode(outBlob);
4246 PUSHU32(acBufferLevel, outBlob);
4247 PUSHU32(acFramesProcessed, outBlob);
4248 PUSHU32(acFramesDropped, outBlob);
4249 ok &= acFrameStamp.RPCEncode(outBlob);
4250 PUSHU32(acAudioTransferSize, outBlob);
4251 PUSHU32(acAudioStartSample, outBlob);
4252 PUSHU32(acAncTransferSize, outBlob);
4253 PUSHU32(acAncField2TransferSize, outBlob);
4254 ok &= acTrailer.RPCEncode(outBlob);
4259 { uint16_t v16(0); uint32_t v32(0);
4260 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4261 POPU16(v16, inBlob, inOutIndex);
4263 POPU32(v32, inBlob, inOutIndex);
4264 acTransferFrame =
LWord(v32);
4265 POPU32(acBufferLevel, inBlob, inOutIndex);
4266 POPU32(acFramesProcessed, inBlob, inOutIndex);
4267 POPU32(acFramesDropped, inBlob, inOutIndex);
4268 ok &= acFrameStamp.RPCDecode(inBlob, inOutIndex);
4269 POPU32(acAudioTransferSize, inBlob, inOutIndex);
4270 POPU32(acAudioStartSample, inBlob, inOutIndex);
4271 POPU32(acAncTransferSize, inBlob, inOutIndex);
4272 POPU32(acAncField2TransferSize, inBlob, inOutIndex);
4273 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4279 PUSHU32(acNumSegments, outBlob);
4280 PUSHU32(acNumActiveBytesPerRow, outBlob);
4281 PUSHU32(acSegmentHostPitch, outBlob);
4282 PUSHU32(acSegmentDevicePitch, outBlob);
4288 POPU32(acNumSegments, inBlob, inOutIndex);
4289 POPU32(acNumActiveBytesPerRow, inBlob, inOutIndex);
4290 POPU32(acSegmentHostPitch, inBlob, inOutIndex);
4291 POPU32(acSegmentDevicePitch, inBlob, inOutIndex);
4298 PUSHU32(ccSaturationValue, outBlob);
4299 return ccLookupTables.RPCEncode(outBlob);
4304 POPU16(u16, inBlob, inOutIndex);
4306 POPU32(ccSaturationValue, inBlob, inOutIndex);
4307 return ccLookupTables.RPCDecode(inBlob, inOutIndex);
4313 PUSHU16(foregroundVideoCrosspoint, outBlob);
4314 PUSHU16(backgroundVideoCrosspoint, outBlob);
4315 PUSHU16(foregroundKeyCrosspoint, outBlob);
4316 PUSHU16(backgroundKeyCrosspoint, outBlob);
4323 { uint16_t v16(0); uint32_t v32(0);
4324 POPU16(v16, inBlob, inOutIndex);
4326 POPU16(v16, inBlob, inOutIndex);
4328 POPU16(v16, inBlob, inOutIndex);
4330 POPU16(v16, inBlob, inOutIndex);
4332 POPU16(v16, inBlob, inOutIndex);
4334 POPU32(v32, inBlob, inOutIndex);
4335 transitionCoefficient =
Fixed_(v32);
4336 POPU32(v32, inBlob, inOutIndex);
4337 transitionSoftness =
Fixed_(v32);
4351 POPU32(fDBB, inBlob, inOutIndex);
4352 POPU32(fLo, inBlob, inOutIndex);
4353 POPU32(fHi, inBlob, inOutIndex);
4360 const size_t totBytes (acHeader.GetSizeInBytes() + acVideoBuffer.GetByteCount() + acAudioBuffer.GetByteCount()
4361 + acANCBuffer.GetByteCount() + acANCField2Buffer.GetByteCount() + acOutputTimeCodes.GetByteCount()
4362 + acHDMIAuxData.GetByteCount() + 64);
4363 if (outBlob.capacity() < totBytes)
4364 outBlob.reserve(totBytes);
4365 bool ok = acHeader.RPCEncode(outBlob);
4366 ok &= acVideoBuffer.RPCEncode(outBlob);
4367 ok &= acAudioBuffer.RPCEncode(outBlob);
4368 ok &= acANCBuffer.RPCEncode(outBlob);
4369 ok &= acANCField2Buffer.RPCEncode(outBlob);
4370 ok &= acOutputTimeCodes.RPCEncode(outBlob);
4371 ok &= acTransferStatus.RPCEncode(outBlob);
4372 PUSHU64(acInUserCookie, outBlob);
4373 PUSHU32(acInVideoDMAOffset, outBlob);
4374 ok &= acInSegmentedDMAInfo.RPCEncode(outBlob);
4375 ok &= acColorCorrection.RPCEncode(outBlob);
4376 PUSHU16(acFrameBufferFormat, outBlob);
4377 PUSHU16(acFrameBufferOrientation, outBlob);
4378 ok &= acVidProcInfo.RPCEncode(outBlob);
4379 PUSHU16(acVideoQuarterSizeExpand, outBlob);
4380 ok &= acHDMIAuxData.RPCEncode(outBlob);
4381 PUSHU32(acPeerToPeerFlags, outBlob);
4382 PUSHU32(acFrameRepeatCount, outBlob);
4384 ok &= acRP188.RPCEncode(outBlob);
4385 PUSHU16(acCrosspoint, outBlob);
4386 ok &= acTrailer.RPCEncode(outBlob);
4392 { uint16_t v16(0); uint32_t v32(0);
4394 bool ok = acHeader.RPCDecode(inBlob, inOutIndex);
4395 ok &= acVideoBuffer.RPCDecode(inBlob, inOutIndex);
4396 ok &= acAudioBuffer.RPCDecode(inBlob, inOutIndex);
4397 ok &= acANCBuffer.RPCDecode(inBlob, inOutIndex);
4398 ok &= acANCField2Buffer.RPCDecode(inBlob, inOutIndex);
4399 ok &= acOutputTimeCodes.RPCDecode(inBlob, inOutIndex);
4400 ok &= acTransferStatus.RPCDecode(inBlob, inOutIndex);
4401 POPU64(acInUserCookie, inBlob, inOutIndex);
4402 POPU32(acInVideoDMAOffset, inBlob, inOutIndex);
4403 ok &= acInSegmentedDMAInfo.RPCDecode(inBlob, inOutIndex);
4404 ok &= acColorCorrection.RPCDecode(inBlob, inOutIndex);
4405 POPU16(v16, inBlob, inOutIndex);
4407 POPU16(v16, inBlob, inOutIndex);
4409 ok &= acVidProcInfo.RPCDecode(inBlob, inOutIndex);
4410 POPU16(v16, inBlob, inOutIndex);
4412 ok &= acHDMIAuxData.RPCDecode(inBlob, inOutIndex);
4413 POPU32(acPeerToPeerFlags, inBlob, inOutIndex);
4414 POPU32(acFrameRepeatCount, inBlob, inOutIndex);
4415 POPU32(v32, inBlob, inOutIndex);
4416 acDesiredFrame =
LWord(v32);
4417 ok &= acRP188.RPCDecode(inBlob, inOutIndex);
4418 POPU16(v16, inBlob, inOutIndex);
4420 ok &= acTrailer.RPCDecode(inBlob, inOutIndex);
4430 PUSHU32(videoBufferSize, outBlob);
4431 if (videoBuffer && videoBufferSize)
4432 { buff.
Set(videoBuffer, videoBufferSize);
4435 PUSHU32(videoDmaOffset, outBlob);
4437 PUSHU32(audioBufferSize, outBlob);
4438 if (audioBuffer && audioBufferSize)
4439 { buff.
Set(audioBuffer, audioBufferSize);
4442 PUSHU32(audioStartSample, outBlob);
4443 PUSHU32(audioNumChannels, outBlob);
4444 PUSHU32(frameRepeatCount, outBlob);
4445 rp188.RPCEncode(outBlob);
4448 PUSHU32(transferFlags, outBlob);
4449 PUSHU8(bDisableExtraAudioInfo, outBlob);
4453 vidProcInfo.RPCEncode(outBlob);
4454 PUSHU32(customAncInfo.Group1, outBlob);
4455 PUSHU32(customAncInfo.Group2, outBlob);
4456 PUSHU32(customAncInfo.Group3, outBlob);
4457 PUSHU32(customAncInfo.Group4, outBlob);
4458 PUSHU32(videoNumSegments, outBlob);
4459 PUSHU32(videoSegmentHostPitch, outBlob);
4460 PUSHU32(videoSegmentCardPitch, outBlob);
4467 POPU16(v16, inBlob, inOutIndex);
4471 POPU32(videoBufferSize, inBlob, inOutIndex);
4472 if (videoBufferSize && !videoBuffer)
4477 if ((inOutIndex + videoBufferSize) >= inBlob.size())
4479 UByte* pBuffer =
reinterpret_cast<UByte*
>(videoBuffer);
4480 for (
ULWord cnt(0); cnt < videoBufferSize; cnt++)
4481 pBuffer[cnt] = inBlob.at(inOutIndex++);
4483 POPU32(videoDmaOffset, inBlob, inOutIndex);
4486 POPU32(audioBufferSize, inBlob, inOutIndex);
4487 if (audioBufferSize && !audioBuffer)
4492 if ((inOutIndex + audioBufferSize) >= inBlob.size())
4494 UByte* pBuffer =
reinterpret_cast<UByte*
>(audioBuffer);
4495 for (
ULWord cnt(0); cnt < audioBufferSize; cnt++)
4496 pBuffer[cnt] = inBlob.at(inOutIndex++);
4498 POPU32(audioStartSample, inBlob, inOutIndex);
4499 POPU32(audioNumChannels, inBlob, inOutIndex);
4500 POPU32(frameRepeatCount, inBlob, inOutIndex);
4501 rp188.RPCDecode(inBlob, inOutIndex);
4502 POPU32(v32, inBlob, inOutIndex);
4503 desiredFrame =
LWord(v32);
4504 POPU32(hUser, inBlob, inOutIndex);
4505 POPU32(transferFlags, inBlob, inOutIndex);
4506 POPU8(
AsU8Ref(bDisableExtraAudioInfo), inBlob, inOutIndex);
4507 POPU16(v16, inBlob, inOutIndex);
4509 POPU16(v16, inBlob, inOutIndex);
4512 vidProcInfo.RPCDecode(inBlob, inOutIndex);
4513 POPU32(customAncInfo.Group1, inBlob, inOutIndex);
4514 POPU32(customAncInfo.Group2, inBlob, inOutIndex);
4515 POPU32(customAncInfo.Group3, inBlob, inOutIndex);
4516 POPU32(customAncInfo.Group4, inBlob, inOutIndex);
4517 POPU32(videoNumSegments, inBlob, inOutIndex);
4518 POPU32(videoSegmentHostPitch, inBlob, inOutIndex);
4519 POPU32(videoSegmentCardPitch, inBlob, inOutIndex);
4520 POPU16(v16, inBlob, inOutIndex);
4527 const size_t totBytes (mHeader.GetSizeInBytes());
4528 if (outBlob.capacity() < totBytes)
4529 outBlob.reserve(totBytes);
4530 bool ok = mHeader.RPCEncode(outBlob);
4531 ok &= mBuffer.RPCEncode(outBlob);
4534 for (
size_t ndx(0); ndx < 16; ndx++)
4535 PUSHU32(mRegisters[ndx], outBlob);
4536 for (
size_t ndx(0); ndx < 32; ndx++)
4537 PUSHU32(mReserved[ndx], outBlob);
4538 ok &= mTrailer.RPCEncode(outBlob);
4544 bool ok = mHeader.RPCDecode(inBlob, inOutIndex);
4545 ok &= mBuffer.RPCDecode(inBlob, inOutIndex);
4546 POPU32(mFlags, inBlob, inOutIndex);
4547 POPU32(mStatus, inBlob, inOutIndex);
4548 for (
size_t ndx(0); ndx < 16; ndx++)
4549 POPU32(mRegisters[ndx], inBlob, inOutIndex);
4550 for (
size_t ndx(0); ndx < 16; ndx++)
4551 POPU32(mReserved[ndx], inBlob, inOutIndex);
4552 ok &= mTrailer.RPCDecode(inBlob, inOutIndex);
4563 PUSHU64(rdtscStartTime, outBlob);
4564 PUSHU64(audioClockStartTime, outBlob);
4565 PUSHU64(rdtscCurrentTime, outBlob);
4566 PUSHU64(audioClockCurrentTime, outBlob);
4567 PUSHU32(framesProcessed, outBlob);
4568 PUSHU32(framesDropped, outBlob);
4569 PUSHU32(bufferLevel, outBlob);
4570 PUSHU8(bWithAudio, outBlob);
4571 PUSHU8(bWithRP188, outBlob);
4572 PUSHU8(bFbfChange, outBlob);
4573 PUSHU8(bFboChange, outBlob);
4574 PUSHU8(bWithColorCorrection, outBlob);
4575 PUSHU8(bWithVidProc, outBlob);
4576 PUSHU8(bWithCustomAncData, outBlob);
4581 { uint16_t v16(0); uint32_t v32(0);
4582 POPU16(v16, inBlob, inOutIndex);
4584 POPU16(v16, inBlob, inOutIndex);
4586 POPU32(v32, inBlob, inOutIndex);
4587 startFrame =
LWord(v32);
4588 POPU32(v32, inBlob, inOutIndex);
4589 endFrame =
LWord(v32);
4590 POPU32(v32, inBlob, inOutIndex);
4591 activeFrame =
LWord(v32);
4592 POPU64(rdtscStartTime, inBlob, inOutIndex);
4593 POPU64(audioClockStartTime, inBlob, inOutIndex);
4594 POPU64(rdtscCurrentTime, inBlob, inOutIndex);
4595 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4596 POPU32(framesProcessed, inBlob, inOutIndex);
4597 POPU32(framesDropped, inBlob, inOutIndex);
4598 POPU32(bufferLevel, inBlob, inOutIndex);
4603 POPU8(
AsU8Ref(bWithColorCorrection), inBlob, inOutIndex);
4605 POPU8(
AsU8Ref(bWithCustomAncData), inBlob, inOutIndex);
4619 POPU32(DBB, inBlob, inOutIndex);
4620 POPU32(Low, inBlob, inOutIndex);
4621 POPU32(High, inBlob, inOutIndex);
4628 PUSHU32(taskVersion, outBlob);
4633 if (taskArray && numTasks)
4634 for (
ULWord num(0); num < numTasks; num++)
4638 const ULWord * pULWords =
reinterpret_cast<const ULWord*
>(&task.
u);
4644 for (
ULWord word(0); word < numWords; word++)
4645 PUSHU32(pULWords[word], outBlob);
4652 POPU32(taskVersion, inBlob, inOutIndex);
4653 POPU32(taskSize, inBlob, inOutIndex);
4654 POPU32(numTasks, inBlob, inOutIndex);
4655 POPU32(maxTasks, inBlob, inOutIndex);
4656 POPU64(u64, inBlob, inOutIndex);
4658 if (taskArray && numTasks)
4659 for (
ULWord num(0); num < numTasks; num++)
4662 POPU32(u32, inBlob, inOutIndex);
4670 for (
ULWord word(0); word < numWords; word++)
4671 POPU32(pULWords[word], inBlob, inOutIndex);
4681 PUSHU64(audioClockTimeStamp, outBlob);
4682 PUSHU32(audioExpectedAddress, outBlob);
4683 PUSHU32(audioInStartAddress, outBlob);
4684 PUSHU32(audioInStopAddress, outBlob);
4685 PUSHU32(audioOutStopAddress, outBlob);
4686 PUSHU32(audioOutStartAddress, outBlob);
4688 PUSHU32(startSample, outBlob);
4690 PUSHU32(currentFrame, outBlob);
4691 currentRP188.RPCEncode(outBlob);
4693 PUSHU64(audioClockCurrentTime, outBlob);
4694 PUSHU32(currentAudioExpectedAddress, outBlob);
4695 PUSHU32(currentAudioStartAddress, outBlob);
4696 PUSHU32(currentFieldCount, outBlob);
4697 PUSHU32(currentLineCount, outBlob);
4698 PUSHU32(currentReps, outBlob);
4699 PUSHU32(currenthUser, outBlob);
4704 { uint16_t v16(0); uint64_t v64(0);
4705 POPU16(v16, inBlob, inOutIndex);
4707 POPU64(v64, inBlob, inOutIndex);
4709 POPU32(frame, inBlob, inOutIndex);
4710 POPU64(audioClockTimeStamp, inBlob, inOutIndex);
4711 POPU32(audioExpectedAddress, inBlob, inOutIndex);
4712 POPU32(audioInStartAddress, inBlob, inOutIndex);
4713 POPU32(audioInStopAddress, inBlob, inOutIndex);
4714 POPU32(audioOutStopAddress, inBlob, inOutIndex);
4715 POPU32(audioOutStartAddress, inBlob, inOutIndex);
4716 POPU32(bytesRead, inBlob, inOutIndex);
4717 POPU32(startSample, inBlob, inOutIndex);
4718 POPU64(v64, inBlob, inOutIndex);
4720 POPU32(currentFrame, inBlob, inOutIndex);
4721 currentRP188.RPCDecode(inBlob, inOutIndex);
4722 POPU64(v64, inBlob, inOutIndex);
4723 currentFrameTime =
LWord64(v64);
4724 POPU64(audioClockCurrentTime, inBlob, inOutIndex);
4725 POPU32(currentAudioExpectedAddress, inBlob, inOutIndex);
4726 POPU32(currentAudioStartAddress, inBlob, inOutIndex);
4727 POPU32(currentFieldCount, inBlob, inOutIndex);
4728 POPU32(currentLineCount, inBlob, inOutIndex);
4729 POPU32(currentReps, inBlob, inOutIndex);
4730 POPU32(currenthUser, inBlob, inOutIndex);
4759 reinterpret_cast<FRAME_STAMP_STRUCT*>(pvVal1)->
RPCEncode(outBlob);
4769 #if defined(AJA_LINUX) 4770 #pragma GCC diagnostic push 4771 #pragma GCC diagnostic ignored "-Wstrict-aliasing" 4773 uint16_t v16(0); uint32_t v32(0);
4774 POPU16(v16, inBlob, inOutIndex);
4776 POPU16(v16, inBlob, inOutIndex);
4778 POPU32(v32, inBlob, inOutIndex); lVal1 =
LWord(v32);
4779 POPU32(v32, inBlob, inOutIndex); lVal2 =
LWord(v32);
4780 POPU32(v32, inBlob, inOutIndex); lVal3 =
LWord(v32);
4781 POPU32(v32, inBlob, inOutIndex); lVal4 =
LWord(v32);
4782 POPU32(v32, inBlob, inOutIndex); lVal5 =
LWord(v32);
4783 POPU32(v32, inBlob, inOutIndex); lVal6 =
LWord(v32);
4796 #if defined(AJA_LINUX) 4797 #pragma GCC diagnostic pop 4802 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.
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.
#define NTV2EndianSwap64(__val__)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
std::string NTV2HDMIBitDepthToString(const NTV2HDMIBitDepth inValue, const bool inCompactDisplay=false)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
std::string operator[](const unsigned inIndexNum) const
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
#define AJA_NTV2_SDK_BUILD_NUMBER
The SDK build number, an unsigned decimal integer.
bool IsOutput(void) const
#define NTV2_HEADER_TAG
Identifies the struct header.
ULWord acCurrentFrame
Last vertical blank frame for this autocirculate channel (when CNTV2Card::AutoCirculateGetFrameStamp ...
void POPU16(uint16_t &outVal, const RPCBlob &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
bool CopyTo(FRAME_STAMP_STRUCT &outOldStruct) const
Copies my fields into the given FRAME_STAMP_STRUCT.
bool PutU16s(const UWordSequence &inU16s, const size_t inU16Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 16-bit values into me.
void PUSHU16(const uint16_t inVal, RPCBlob &inArr, const bool dontSwap=false)
Specifies SDI input/output kinds.
std::set< NTV2TCIndex > NTV2TCIndexes
ULWord currentAudioStartAddress
As found by isr.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
FRAME_STAMP()
Constructs a default FRAME_STAMP structure.
bool Allocate(const size_t inByteCount, const bool inPageAligned=false)
Allocates (or re-allocates) my user-space storage using the given byte count. I assume full responsib...
ULWord64 acInUserCookie
Intended for playout, an optional app-specific cookie value that tags this frame, such that if this s...
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::LoadBitstream.
#define NTV2HostIsBigEndian
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool GetSDIInputStatus(NTV2SDIInputStatus &outStatus, const UWord inSDIInputIndex0=0) const
Answers with the NTV2SDIInputStatus for the given SDI input spigot.
NTV2Buffer & operator=(const NTV2Buffer &inRHS)
Assigns me from another NTV2Buffer instance.
LWord64 currentTime
Current processor time ... on Windows, this is derived from KeQueryPerformanceCounter.
NTV2SetRegisters(const NTV2RegWrites &inRegWrites=NTV2RegWrites())
Constructs an NTV2SetRegisters struct from the given NTV2RegisterWrites collection.
Declares the AJAMemory class.
std::set< NTV2FrameRate > NTV2FrameRateSet
A set of distinct NTV2FrameRate values. New in SDK 17.0.
NTV2StreamBuffer()
Constructs a default NTV2StreamBuffer struct.
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
mVideoBuffer Allocate(mFormatDesc.GetTotalRasterBytes())
std::ostream & Print(std::ostream &inStrm, const bool inDumpSegments=false) const
Writes a human-readable description of me into a given output stream.
bool CopyTo(AUTOCIRCULATE_STATUS_STRUCT &outOldStruct)
Copies my data into the given AUTOCIRCULATE_STATUS_STRUCT.
unsigned long long stoull(const std::string &str, std::size_t *idx, int base)
ULWord registerMask
My register mask value to use in a ReadRegister or WriteRegister call.
bool SetFrameBufferFormat(const NTV2FrameBufferFormat inNewFormat)
Sets my acFrameBufferFormat value to the given new value (if valid and circulating with AUTOCIRCULATE...
NTV2DeviceIDSet NTV2GetSupportedDevices(const NTV2DeviceKinds inKinds=NTV2_DEVICEKIND_ALL)
Returns an NTV2DeviceIDSet of devices supported by the SDK.
std::vector< double > NTV2DoubleArray
An array of double-precision floating-point values.
NTV2HDMIColorSpace
Indicates or specifies HDMI Color Space.
#define NTV2_IS_TIMECODE_TASK(_x_)
void Clear(void)
Resets the struct to its initialized state, with timecode capture disabled, freeing all buffers that ...
bool WithCustomAnc(void) const
NTV2Buffer mSharedMemory
Virtual address of AJADebug shared memory in calling process' context,.
ULWord audioOutStartAddress
For play - end position (exclusive) in buffer of audio.
NTV2RegNumSet GetRegisterNumbers(const NTV2RegReads &inRegInfos)
std::ostream & Print(std::ostream &outputStream, const bool inAsCode=false) const
Renders me to the given output stream in a human-readable format.
#define DEC0N(__x__, __n__)
ULWord getElementLength(void) const
NTV2RegInfo & setMask(const ULWord val)
string NTV2ChannelSetToStr(const NTV2ChannelSet &inObj, const bool inCompact)
1920x1080, for 1080i and 1080p, NTV2_VANCMODE_TALL
ULWord mFlags
Action flags.
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool EnableSegmentedDMAs(const ULWord inNumSegments, const ULWord inNumActiveBytesPerLine, const ULWord inHostBytesPerLine, const ULWord inDeviceBytesPerLine)
Enables segmented DMAs given a segment count, a host pitch, and device pitch value.
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
ULWord getTotalBytes(void) const
bool SetBuffers(ULWord *pInVideoBuffer, const ULWord inVideoByteCount, ULWord *pInAudioBuffer, const ULWord inAudioByteCount, ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer. ...
NTV2_HEADER acHeader
The common message header – ALWAYS FIRST!
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_IS_VALID_TRAILER_TAG(_x_)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2StringSet::const_iterator NTV2StringSetConstIter
~AUTOCIRCULATE_TRANSFER()
My default destructor, which frees all allocatable fields that I own.
Declares the AJADebug class.
bool CopyFrom(const void *pInSrcBuffer, const ULWord inByteCount)
Replaces my contents from the given memory buffer, resizing me to the new byte count.
720x576, for PAL 625i, NTV2_VANCMODE_TALL
#define GetTCIndexesForSDIInput
bool Set(const NTV2ColorCorrectionMode inMode, const ULWord inSaturation, const void *pInTableData)
Sets this struct from the given mode, saturation and table data, replacing any existing mode...
static ULWord FGWidth(const NTV2FrameGeometry fg)
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
ULWord acCurrentReps
Contains validCount (Playout: on repeated frames, number of reps remaining; Record: drops on frame) ...
bool NTV2GetUnsupportedStandards(NTV2StandardSet &outStandards)
Returns a set of NTV2Standard values not suported by any NTV2 device.
ULWord acAudioInStopAddress
(input/ingest/capture only) Ending audio record head position (exclusive) AFTER this frame was stampe...
1280x720, for 720p, NTV2_VANCMODE_OFF
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
size_t GetByteCount(void) const
static bool SetDefaultPageSize(const size_t inNewSize)
Changes the default page size for use in future page-aligned allocations.
bool ByteSwap32(void)
Byte-swaps my contents 32-bits at a time.
ULWord GetBufferLevel(void) const
NTV2StringList::const_iterator NTV2StringListConstIter
enum NTV2VideoFrameBufferOrientation NTV2FBOrientation
bool WithFBOChange(void) const
bool IsContentEqual(const NTV2Buffer &inBuffer, const ULWord inByteOffset=0, const ULWord inByteCount=0xFFFFFFFF) const
AutoCircVidProcInfo acVidProcInfo
Specifies the mixer/keyer transition to make. Ignored if AUTOCIRCULATE_WITH_VIDPROC option is not set...
bool isSourceTopDown(void) const
NTV2SDIInStatistics()
Constructs an NTV2GetSDIStatistics struct and initializes it to its default state.
void SetMaxLockSize(const ULWord64 inNumBytes)
Sets the maximum lock size for use in a subsequent call to CNTV2Card::DMABufferLock.
bool ResetUsing(const NTV2RegNumSet &inRegisterNumbers)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
void PUSHU8(const uint8_t inVal, RPCBlob &inArr)
NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter
A handy const interator for iterating over an NTV2TimeCodeList.
AutoCircTaskType
These are the available AutoCirculate task types.
uint32_t U32(const int inIndex) const
ULWord acAudioStartSample
Starting audio sample (valid for capture only).
ULWordSequence::const_iterator ULWordSequenceConstIter
A handy const iterator for iterating over a ULWordSequence.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
AUTOCIRCULATE_TRANSFER_STATUS()
Constructs a default AUTOCIRCULATE_TRANSFER_STATUS structure.
ULWord bytesRead
Total audio and video bytes transfered.
bool IsValid(void) const
Answers true if I'm valid, or false if I'm not valid.
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
#define NTV2_TYPE_AJAMAILBUFFER
Identifies NTV2MailBuffer struct.
ULWord audioExpectedAddress
The address that was used to transfer.
NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex, bool fillBuffer=true)
LWord acStartFrame
First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
#define NTV2SDKVersionDecode_Minor
std::map< ULWord, ULWord > NTV2RegisterValueMap
A mapping of distinct NTV2RegisterNumbers to their corresponding ULWord values.
ULWord getDestPitch(void) const
std::string NTV2RegisterNumberToString(const NTV2RegisterNumber inValue)
ULWordSetConstIter NTV2RegNumSetConstIter
A const iterator that iterates over a set of distinct NTV2RegisterNumbers.
bool PutU64s(const ULWord64Sequence &inU64s, const size_t inU64Offset=0, const bool inByteSwap=false)
Copies a vector of unsigned 64-bit values into me.
NTV2SegmentedDMAInfo()
Constructs a disabled NTV2SegmentedDMAInfo struct.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2Buffer acVideoBuffer
The host video buffer. This field is owned by the client application, and thus is responsible for all...
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
ULWord mIsWriting
If non-zero, virtual data will be written; otherwise, virtual data will be read.
Specifies HDMI input/output kinds.
LWord64 acFrameTime
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
NTV2AudioSystemSet NTV2MakeAudioSystemSet(const NTV2AudioSystem inFirstAudioSystem, const UWord inCount)
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels)
ULWord ccSaturationValue
My saturation value, used only in 3-way color correction mode.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
if(!(riid==IID_IUnknown) &&!(riid==IID_IClassFactory))
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
AUTOCIRCULATE_DATA(const AUTO_CIRC_COMMAND inCommand=AUTO_CIRC_COMMAND_INVALID, const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_INVALID)
void POPU8(uint8_t &outVal, const RPCBlob &inArr, std::size_t &inOutNdx)
NTV2RegisterReadsConstIter FindFirstMatchingRegisterNumber(const uint32_t inRegNum, const NTV2RegisterReads &inRegInfos)
Returns a const iterator to the first entry in the NTV2RegInfo collection with a matching register nu...
std::string NTV2ColorCorrectionModeToString(const NTV2ColorCorrectionMode inValue, const bool inCompactDisplay=false)
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelQuad values.
bool containsElementAtOffset(const ULWord inElementOffset) const
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
bool DisableSegmentedDMAs(void)
Disables segmented DMAs, performing a Reset on my acInSegmentedDMAInfo.
LWord64 acCurrentTime
The absolute timestamp at the moment the CNTV2Card::AutoCirculateTransfer or CNTV2Card::AutoCirculate...
Defines a number of handy byte-swapping macros.
bool GetGoodRegisters(NTV2RegNumSet &outGoodRegNums) const
Returns an NTV2RegNumSet built from my mOutGoodRegisters field.
The "default" timecode (mostly used by the AJA "Retail" service and Control Panel) ...
bool SetOutputTimeCode(const NTV2_RP188 &inTimecode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1)
Intended for playout, sets one element of my acOutputTimeCodes member.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool NTV2DeviceCanDoFrameBufferFormat(const NTV2DeviceID inDeviceID, const NTV2FrameBufferFormat inFBFormat)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
NTV2FrameBufferFormatSet NTV2PixelFormats
#define NTV2_IS_VALID_TIMECODE_INDEX(__x__)
ULWord currentFrame
Last vertical blank frame for this channel's auto-circulate. (at the time of the IOCTL_NTV2_GET_FRAME...
static string print_address_offset(const size_t inRadix, const ULWord64 inOffset)
2048x1080, for 2Kx1080p, NTV2_VANCMODE_TALL
FGSizesMap::const_iterator FGSizesMapCI
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
NTV2FBOrientation acFrameBufferOrientation
Specifies the frame buffer orientation to change to. Ignored if AUTOCIRCULATE_WITH_FBOCHANGE option i...
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
bool isSourceBottomUp(void) const
ULWord acInVideoDMAOffset
Optional byte offset into the device frame buffer. Defaults to zero. If non-zero, should be a multipl...
#define NTV2_TYPE_GETREGS
Identifies NTV2GetRegisters struct.
#define NTV2_COLORCORRECTOR_TABLESIZE
ULWord mTag
Tag for virtual data. This value is used to recal saved data by tag.
LWord acActiveFrame
Current frame actually being captured/played when CNTV2Card::AutoCirculateGetStatus called...
bool GetFailedRegisterWrites(NTV2RegWrites &outFailedRegWrites) const
Returns an NTV2RegisterWrites built from my mOutBadRegInfos field.
#define NTV2_TYPE_ACSTATUS
Identifies AUTOCIRCULATE_STATUS struct.
#define AJA_NTV2_SDK_VERSION_POINT
The SDK "point" release version, an unsigned decimal integer.
NTV2HDMIRange
Indicates or specifies the HDMI RGB range.
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
bool toHexString(std::string &outStr, const size_t inLineBreakInterval=0) const
Converts my contents into a hex-encoded string.
std::string NTV2AudioFormatToString(const NTV2AudioFormat inValue, const bool inCompactDisplay=false)
Describes a segmented data transfer (copy or move) from a source memory location to a destination loc...
#define NTV2_TYPE_BANKGETSET
Identifies NTV2BankSelGetSetRegs struct.
std::vector< NTV2RegInfo > NTV2RegWrites
An ordered sequence of zero or more NTV2RegInfo structs intended for WriteRegister.
virtual char do_thousands_sep() const
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
Specifies devices that internally use NTV2.
NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter
A handy const iterator for iterating over an NTV2FrameRateSet.
NTV2FrameGeometry GetGeometryFromFrameDimensions(const NTV2FrameSize &inFD)
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
NTV2SegmentedXferInfo & swapSourceAndDestination(void)
Swaps my source and destination offsets, pitches and scan directions.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define NTV2_TYPE_ACXFER
Identifies AUTOCIRCULATE_TRANSFER struct.
std::set< NTV2AudioChannelQuad > NTV2AudioChannelQuads
A set of distinct NTV2AudioChannelQuad values.
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
string NTV2ChannelListToStr(const NTV2ChannelList &inObj, const bool inCompact)
std::set< NTV2Standard > NTV2StandardSet
A set of distinct NTV2Standard values.
NTV2Crosspoint acCrosspoint
Will be deprecated – used internally by the SDK. Will be removed when the driver changes to use NTV2...
bool CopyFrom(const AUTOCIRCULATE_STATUS_STRUCT &inOldStruct)
Copies the given AUTOCIRCULATE_STATUS_STRUCT into me.
ULWord GetProcessedFrameCount(void) const
#define NTV2_ASSERT(_expr_)
std::string AsString(UWord inDumpMaxBytes=0) const
ULWord mFlags
Action flags (lock, unlock, etc)
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Returns all RP188 timecodes associated with the frame in NTV2TCIndex order.
Represents an unknown or invalid frame rate.
std::string operator[](const unsigned inIndexNum) const
std::vector< uint8_t > UByteSequence
An ordered sequence of UByte (uint8_t) values.
NTV2AutoCirculateState acState
Current AutoCirculate state after the transfer.
static AJAStatus StatTimerStop(const uint32_t inKey)
bool NTV2DeviceGetSupportedStandards(const NTV2DeviceID inDeviceID, NTV2StandardSet &outStandards)
Returns a set of distinct NTV2Standard values supported on the given device.
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
bool Truncate(const size_t inByteCount)
Truncates me to the given length. No reallocation takes place.
This struct replaces the old RP188_STRUCT.
NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter
A handy const iterator for iterating over an NTV2GeometrySet.
NTV2FrameBufferFormat NTV2PixelFormat
An alias for NTV2FrameBufferFormat.
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
NTV2ColorCorrectionMode ccMode
My mode (off, RGB, YCbCr, or 3-way)
Last virtual register slot.
NTV2_TRAILER acTrailer
The common message trailer – ALWAYS LAST!
NTV2BankSelGetSetRegs(const NTV2RegInfo &inBankSelect, const NTV2RegInfo &inRegInfo, const bool inDoWrite=false)
Constructs an NTV2BankSelGetSetRegs struct for atomically reading or writing the given bank-selected ...
ULWord regNum(void) const
unsigned long stoul(const std::string &str, std::size_t *idx, int base)
ULWord64 rdtscCurrentTime
NTV2RegInfo & setRegNum(const ULWord val)
2048x1556, for 2Kx1556psf film format, NTV2_VANCMODE_OFF
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
bool Fill(const T &inValue)
Fills me with the given scalar value.
bool Find(const T &inValue, int &inOutIndex) const
Searches me for the given scalar value of type T starting at a given index position.
bool GetString(std::string &outString, const size_t inU8Offset=0, const size_t inMaxSize=128) const
Answers with my contents as a character string.
bool GetRegisterValues(NTV2RegisterValueMap &outValues) const
Returns an NTV2RegisterValueMap built from my mOutGoodRegisters and mOutValues fields.
std::string NTV2InputSourceToString(const NTV2InputSource inValue, const bool inForRetailDisplay=false)
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
void Clear(void)
Resets me to an invalid state.
void POPU64(uint64_t &outVal, const RPCBlob &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
ULWord currentReps
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
std::string AutoCircVidProcModeToString(const AutoCircVidProcMode inValue, const bool inCompactDisplay=false)
UWord NTV2DeviceGetNumHDMIVideoOutputs(const NTV2DeviceID inDeviceID)
ULWord mInNumRegisters
The number of NTV2RegInfo's to be set.
static bool IsReadOnly(const uint32_t inRegNum)
NTV2FrameRate
Identifies a particular video frame rate.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2FrameBufferFormat acFrameBufferFormat
Specifies the frame buffer format to change to. Ignored if AUTOCIRCULATE_WITH_FBFCHANGE option is not...
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_TYPE_SDISTATS
Identifies NTV2SDIStatus struct.
std::string NTV2AudioChannelQuadToString(const NTV2Audio4ChannelSelect inValue, const bool inCompactDisplay=false)
2048x1080, NTV2_VANCMODE_TALLER
NTV2Standard
Identifies a particular video standard.
#define NTV2_TYPE_VIRTUAL_DATA_RW
Identifies NTV2VirtualData struct.
NTV2ColorCorrectionData acColorCorrection
Color correction data. This field is ignored if AUTOCIRCULATE_WITH_COLORCORRECT option is not set...
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
bool IsAllocatedBySDK(void) const
ULWord acOptionFlags
AutoCirculate options used when CNTV2Card::AutoCirculateInitForInput or CNTV2Card::AutoCirculateInitF...
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
NTV2Buffer mBuffer
Virtual address of a buffer to prelock, and its length.
bool NTV2DeviceCanDoVideoFormat(const NTV2DeviceID inDeviceID, const NTV2VideoFormat inVideoFormat)
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2OutputDest values supported on the given device.
ULWord acAncTransferSize
Total ancillary data bytes for field 1 transferred (capture only).
This is used to perform virtual data reads or writes.
enum NTV2QuarterSizeExpandMode NTV2QtrSizeExpandMode
1920x1080, for 1080i and 1080p, NTV2_VANCMODE_OFF
ULWord mStatus
Action status.
bool PatchRegister(const ULWord inRegNum, const ULWord inValue)
Patches the given register value.
ULWord64 acRDTSCCurrentTime
Timestamp when CNTV2Card::AutoCirculateGetStatus called, using the host OS system clock...
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
#define NTV2_TYPE_ACXFERSTATUS
Identifies AUTOCIRCULATE_TRANSFER_STATUS struct.
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define AJA_NTV2_SDK_VERSION_MAJOR
The SDK major version number, an unsigned decimal integer.
bool WithHDMIAuxData(void) const
NTV2DeviceIDSet::const_iterator NTV2DeviceIDSetConstIter
A convenient const iterator for NTV2DeviceIDSet.
std::set< std::string > NTV2StringSet
#define NTV2_TYPE_AJABUFFERLOCK
Identifies NTV2BufferLock struct.
std::ostream & Print(std::ostream &inOutStream) const
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
Specifies analog input/output kinds.
NTV2Buffer & Segment(NTV2Buffer &outPtr, const ULWord inByteOffset, const ULWord inByteCount) const
Resets an NTV2Buffer instance to reference a contiguous segment (portion) of my memory buffer...
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
#define NTV2SDKVersionEncode
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
1280x720, for 720p, NTV2_VANCMODE_TALL
NTV2Channel mChannel
Stream channel.
NTV2MailBuffer()
Constructs a default NTV2MailBuffer struct.
#define NTV2_IS_VALID_IOKINDS(_k_)
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels)
Declares the CRP188 class. See SMPTE RP188 standard for details.
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
NTV2AutoCirculateState acState
Current AutoCirculate state.
BOOL_ bWithColorCorrection
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
std::string NTV2HDMIProtocolToString(const NTV2HDMIProtocol inValue, const bool inCompactDisplay=false)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::LoadBitstream. ...
Defines for the NTV2 SDK version number, used by ajantv2/includes/ntv2enums.h. See the ajantv2/includ...
ULWord64 acAudioClockCurrentTime
The absolute timestamp at the moment the CNTV2Card::AutoCirculateTransfer or CNTV2Card::AutoCirculate...
bool SetFrom(const NTV2Buffer &inBuffer)
Replaces my contents from the given memory buffer without resizing me.
ULWord fTrailerVersion
Trailer version, set when created. Before SDK 15.1: always zero; 15.1 or later: set to calling SDK ve...
bool IsStopped(void) const
NTV2RegisterNumberSet NTV2RegNumSet
A set of distinct NTV2RegisterNumbers.
This is used to atomically perform bank-selected register reads or writes.
ULWord64 acRDTSCStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using host OS system ...
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
ULWord acRequestedFrame
On entry for NTV2_TYPE_ACFRAMESTAMP message, the requested frame. Upon exit, 0xFFFFFFFF means "not ...
ULWord acFramesDropped
Total number of frames dropped since AutoCirculateStart.
bool ImportFromLog(const NTV2StringList &inLogLines)
Resets me using the given "Number:" and "Value:" lines from the support log.
Specifies any/all devices.
ULWord acAudioTransferSize
Number of bytes captured into the audio buffer.
#define NTV2_TYPE_AJADEBUGLOGGING
Identifies NTV2DebugLogging struct.
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
bool RPCDecodeServer(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
All new NTV2 structs start with this common header.
std::ostream & PrintLog(std::ostream &outputStream, const NTV2DeviceID inDeviceID=DEVICE_ID_INVALID) const
Renders me to the given output stream in "supportlog" format.
static size_t DefaultPageSize(void)
NTV2RegWrites NTV2RegisterReads
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.
ULWord GetDroppedFrameCount(void) const
Declares data types and structures used in NTV2 "nub" packets.
UWord NTV2DeviceGetNumAnalogVideoOutputs(const NTV2DeviceID inDeviceID)
LWord acTransferFrame
Frame buffer number the frame was transferred to/from. (-1 if failed)
std::string getSourceCode(const bool inInclDecl=true) const
bool SwapWith(NTV2Buffer &inBuffer)
Swaps my underlying buffer with another's.
bool RPCEncodeServer(NTV2_RPC_BLOB_TYPE &inBlob)
ULWord64 audioClockCurrentTime
48kHz clock in reg 28 extended to 64 bits
ULWord acCurrentFieldCount
As found by ISR at Call Field0 or Field1 currently being OUTPUT (when CNTV2Card::AutoCirculateGetFram...
The AutoCirculate channel is stopped.
ULWord64 acAudioClockStartTime
Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using "64-bit clean" ...
bool WithRP188(void) const
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
LWord acEndFrame
Last frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
NTV2DIDSet::const_iterator NTV2DIDSetConstIter
Handy const iterator to iterate over an NTV2DIDSet.
LWord GetActiveFrame(void) const
std::string NTV2AudioChannelOctetToString(const NTV2Audio8ChannelSelect inValue, const bool inCompactDisplay=false)
ostream & NTV2PrintChannelSet(const NTV2ChannelSet &inObj, const bool inCompact, ostream &inOutStream)
ULWord getDestOffset(void) const
bool NTV2DeviceGetSupportedVideoFormats(const NTV2DeviceID inDeviceID, NTV2VideoFormatSet &outFormats)
Returns a set of distinct NTV2VideoFormat values supported on the given device.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
#define NTV2_IS_VALID_STRUCT_TYPE(_x_)
NTV2Crosspoint channelSpec
bool IsPageAligned(void) const
This is used by the CNTV2Card::ReadRegisters function.
NTV2Buffer(const void *pInUserPointer, const size_t inByteCount)
Constructs me from a client-supplied address and size.
bool RPCDecodeClient(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
1920x1080, NTV2_VANCMODE_TALLER
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
720x486, for NTSC 525i, NTV2_VANCMODE_TALL
std::string NTV2AudioChannelPairToString(const NTV2AudioChannelPair inValue, const bool inCompactDisplay=false)
ULWord64 acCurrentUserCookie
The frame's AUTOCIRCULATE_TRANSFER::acInUserCookie value that was set when CNTV2Card::AutoCirculateTr...
ULWord acCurrentLineCount
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2Crosspoint backgroundVideoCrosspoint
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
#define NTV2_CURRENT_HEADER_VERSION
Current version of NTV2_HEADER struct, originally 0.
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__)
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.
ULWord64 audioClockCurrentTime
union AutoCircGenericTask::@39 u
2048x1080, for 2Kx1080p, NTV2_VANCMODE_OFF
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
ULWord acFramesProcessed
Total number of frames successfully processed since AutoCirculateStart.
ULWord acStartSample
The actual audio start sample when this frame was started at the VBI, which may be used to check sync...
bool is_hex_digit(const char inChr)
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
void Clear(void)
Resets the struct to its initialized state.
static std::string GetDisplayValue(const uint32_t inRegNum, const uint32_t inRegValue, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
static size_t HostPageSize(void)
#define NTV2SDKVersionDecode_Point
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
void PUSHU32(const uint32_t inVal, RPCBlob &inArr, const bool dontSwap=false)
NTV2FrameGeometry
Identifies a particular video frame geometry.
720x576, for PAL 625i, NTV2_VANCMODE_OFF
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
User cookie at last vblank.
NTV2Buffer acANCField2Buffer
The host "Field 2" ancillary data buffer. This field is owned by the client application, and thus is responsible for allocating and/or freeing it. If the pointer is NULL or the size is zero, no "Field 2" ancillary data will be transferred. Use the AUTOCIRCULATE_TRANSFER::SetAncBuffers method to set or reset this field.
FRAME_STAMP & operator=(const FRAME_STAMP &inRHS)
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelOctet values.
std::string NTV2HDMIColorSpaceToString(const NTV2HDMIColorSpace inValue, const bool inCompactDisplay=false)
ULWord mFlags
Action flags (lock, unlock, etc)
NTV2_TRAILER()
Constructs a default NTV2_TRAILER having the proper version and tag.
NTV2Crosspoint channelSpec
void PUSHU64(const uint64_t inVal, RPCBlob &inArr, const bool dontSwap=false)
#define NTV2_TYPE_AJASTREAMBUFFER
Identifies NTV2StreamBuffer struct.
void Set(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Sets my fields from the given DBB, low and high ULWord components.
Declares numerous NTV2 utility functions.
bool GetU16s(UWordSequence &outU16s, const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
NTV2Buffer mOutBadRegIndexes
Array of UWords containing index numbers of the register writes that failed. The SDK owns this memory...
#define NTV2Buffer_TO_ULWORD64(__p__)
bool NTV2DeviceGetSupportedGeometries(const NTV2DeviceID inDeviceID, NTV2GeometrySet &outGeometries)
Returns a set of distinct NTV2FrameGeometry values supported on the given device. ...
NTV2Crosspoint foregroundKeyCrosspoint
void swap(nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j1, nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp) is_nothrow_move_constructible< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value &&//NOLINT(misc-redundant-expression, cppcoreguidelines-noexcept-swap, performance-noexcept-swap) is_nothrow_move_assignable< nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass > >::value)
exchanges the values of two JSON objects
std::string NTV2CrosspointToString(const NTV2Crosspoint inChannel)
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
ULWord acBufferLevel
Number of buffered frames in driver ready to capture or play.
std::vector< uint64_t > ULWord64Sequence
An ordered sequence of ULWord64 (uint64_t) values.
#define NTV2Buffer_PAGE_ALIGNED
Allocated page-aligned?
NTV2GetRegisters(const NTV2RegNumSet &inRegisterNumbers=NTV2RegNumSet())
Constructs an NTV2GetRegisters struct from the given set of register numbers.
bool operator!=(const NTV2SegmentedXferInfo &inRHS) const
bool NTV2GetSupportedStandards(NTV2StandardSet &outStandards)
Returns a set of all NTV2Standard values supported (used) by any/all supported NTV2 devices...
std::string AsCode(const size_t inBytesPerWord=4, const std::string &inVarName="", const bool inUseSTL=false, const bool inByteSwap=false) const
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)
ULWord getSourcePitch(void) const
NTV2_RP188 acRP188
Deprecated – call FRAME_STAMP::GetInputTimeCode instead.
NTV2GeometrySet GetRelatedGeometries(const NTV2FrameGeometry inFrameGeometry)
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
NTV2RegWritesIter NTV2RegisterReadsIter
NTV2RegInfo & setValue(const ULWord val)
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Intended for capture, answers with a specific timecode captured in my acTransferStatus member's acFra...
ULWord mIsWriting
If non-zero, register(s) will be written; otherwise, register(s) will be read.
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
NTV2Buffer mInBankInfos
Bank select NTV2RegInfo. The SDK owns this memory.
#define NTV2_TYPE_AJASTREAMCHANNEL
Identifies NTV2StreamChannel struct.
This object is embedded in the AUTOCIRCULATE_TRANSFER struct that's returned from the CNTV2Card::Auto...
bool SetFromRegValue(const ULWord inData)
Sets my fields from the given status register value.
NTV2_TRAILER mTrailer
The common structure trailer – ALWAYS LAST!
bool ResetUsing(const NTV2RegWrites &inRegWrites)
Resets me, starting over, now using the given NTV2RegisterNumberSet.
ULWord acBufferLevel
The number of frames ready to record/play after the transfer.
ULWord mStatus
Action status.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
enum NTV2OutputDestination NTV2OutputDest
bool RPCDecode(const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
#define AUTOCIRCULATE_STRUCT_VERSION
Version number of AutoCirculate structures, originally 0.
ULWord getSegmentLength(void) const
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
NTV2QuarterSizeExpandMode acVideoQuarterSizeExpand
Turns on the "quarter-size expand" (2x H + 2x V) hardware. Defaults to off (1:1). ...
bool GetRequestedRegisterWrites(NTV2RegWrites &outRegWrites) const
bool isDestBottomUp(void) const
ULWord currentAudioExpectedAddress
As set by play.
Identifies the first analog video input.
Private include file for all ajabase sources.
This class/object reports information about the current and/or requested AutoCirculate frame...
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
std::map< NTV2FrameGeometry, ULWord > FGSizesMap
ULWord getSourceOffset(void) const
NTV2ChannelList::const_iterator NTV2ChannelListConstIter
A handy const iterator into an NTV2ChannelList.
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
RP188_STRUCT currentRP188
Last vertical blank timecode (RP-188)
static void * AllocateAligned(size_t size, size_t alignment)
ULWord acAudioInStartAddress
(input/ingest/capture only) Starting audio record head position when this frame was stamped...
#define NTV2_IS_VALID_VIDEO_FORMAT(__f__)
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
std::string & upper(std::string &str)
void POPU32(uint32_t &outVal, const RPCBlob &inArr, std::size_t &inOutNdx, const bool dontSwap=false)
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
NTV2_HEADER acHeader
The common structure header – ALWAYS FIRST!
#define NTV2_TYPE_SETREGS
Identifies NTV2SetRegisters struct.
bool GetU32s(ULWordSequence &outU32s, const size_t inU32Offset=0, const size_t inMaxSize=32, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 32-bit values.
ULWord64Sequence::const_iterator ULWord64SequenceConstIter
A handy const iterator for iterating over a ULWord64Sequence.
static ULWord FGHeight(const NTV2FrameGeometry fg)
ULWord acSegmentHostPitch
Offset, in bytes, between the start of one host segment and the start of the next host segment (i...
ULWord fLo
| BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
std::set< NTV2DeviceID > NTV2DeviceIDSet
A set of NTV2DeviceIDs.
uint64_t U64(const int inIndex) const
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
void * GetHostPointer(void) const
NTV2ColorCorrectionData()
Constructs a default NTV2ColorCorrectionData struct.
bool WithColorCorrect(void) const
NTV2SegmentedXferInfo & setDestDirection(const bool inTopDown)
Sets the scan direction for the destination.
NTV2Bitstream()
Constructs a default NTV2Bitstream struct.
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
void Reset(void)
Resets the NTV2SegmentedDMAInfo struct members to their default values (normal, non-segmented AutoCir...
bool GetRingChangedByteRange(const NTV2Buffer &inBuffer, ULWord &outByteOffsetFirst, ULWord &outByteOffsetLast) const
Assuming my contents and the contents of the given buffer comprise ring buffers that periodically get...
ULWord64 acAudioClockTimeStamp
(input/ingest/capture only) The absolute timestamp at the VBI when the frame started recording into d...
This is used by the CNTV2Card::ReadSDIStatistics function.
string CommaStr(const T &inNum)
2048x1556, for 2Kx1556psf film format, NTV2_VANCMODE_TALL
NTV2Buffer acAudioBuffer
The host audio buffer. This field is owned by the client application, and thus is responsible for all...
static const NTV2_RP188 INVALID_TIMECODE_VALUE
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Color correction data used with AUTOCIRCULATE_WITH_COLORCORRECT option.
static const string sSegXferUnits[]
std::vector< std::string > NTV2StringList
bool SetFrom(const FRAME_STAMP_STRUCT &inOldStruct)
Sets my fields from the given FRAME_STAMP_STRUCT.
std::set< NTV2AudioChannelOctet > NTV2AudioChannelOctets
A set of distinct NTV2AudioChannelOctet values.
bool GetInputTimeCode(NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
Answers with a specific timecode captured in my acTimeCodes member.
#define HEX0N(__x__, __n__)
#define NTV2Buffer_ALLOCATED
Allocated using Allocate function?
std::ostream & Print(std::ostream &inOutStream) const
bool GetU64s(ULWord64Sequence &outU64s, const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const
Answers with my contents as a vector of unsigned 16-bit values.
#define NTV2_IS_VALID_COLOR_CORRECTION_MODE(__x__)
#define NTV2SDKVersionDecode_Build
uint8_t U8(const int inIndex) const
ULWord audioOutStopAddress
For play - first position in buffer of audio.
std::vector< NTV2RegInfo > NTV2RegisterWrites
#define OCT0N(__x__, __n__)
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
LWord64 currentFrameTime
Vertical blank start of current frame.
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
bool ByteSwap64(void)
Byte-swaps my contents 64-bits at a time.
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
std::string & lower(std::string &str)
NTV2StreamChannel()
Constructs a default NTV2StreamChannel struct.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
ULWord acNumSegments
Number of segments of size ::AUTOCIRCULATE_TRANSFER::acVideoBuffer.fByteCount to transfer. Zero or 1 means normal (unsegmented) transfer.
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
#define NTV2EndianSwap16(__val__)
bool NTV2DeviceGetSupportedFrameRates(const NTV2DeviceID inDeviceID, NTV2FrameRateSet &outRates)
Returns a set of distinct NTV2FrameRate values supported on the given device.
NTV2Channel mChannel
Mail buffer channel.
ostream & NTV2PrintChannelList(const NTV2ChannelList &inObj, const bool inCompact, ostream &inOutStream)
720x576, for PAL 625i, NTV2_VANCMODE_TALLER
Declares enums and structs used by all platform drivers and the SDK.
NTV2Crosspoint backgroundKeyCrosspoint
NTV2AudioSystem acAudioSystem
The audio system being used for this channel (NTV2_AUDIOSYSTEM_INVALID if none)
#define NTV2SDKVersionDecode_Major
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
#define DECN(__x__, __n__)
AutoCircTaskType taskType
#define AUTOCIRCULATE_WITH_FIELDS
Use this to AutoCirculate with fields as frames for interlaced formats.
NTV2Buffer mInRegInfos
Read-only array of NTV2RegInfo structs to be set. The SDK owns this memory.
NTV2Buffer ccLookupTables
RGB lookup tables pre-formatted for AJA hardware as a contiguous block of NTV2_COLORCORRECTOR_TABLESI...
ULWord mStatus
Action status.
bool NTV2DeviceGetSupportedInputSources(const NTV2DeviceID inDeviceID, NTV2InputSourceSet &outInputSources, const NTV2IOKinds inKinds)
Returns a set of distinct NTV2InputSource values supported on the given device.
bool SetAllOutputTimeCodes(const NTV2_RP188 &inTimecode, const bool inIncludeF2=true)
Intended for playout, replaces all elements of my acOutputTimeCodes member with the given timecode va...
std::string & replace(std::string &str, const std::string &from, const std::string &to)
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
#define AUTOCIRCULATE_WITH_HDMIAUX
Use this to AutoCirculate with HDMI auxiliary data.
bool IsFieldMode(void) const
#define NTV2_TRAILER_TAG
Identifies the struct trailer.
bool WithFBFChange(void) const
#define NTV2_IS_VALID_NTV2FrameGeometry(__s__)
NTV2Crosspoint acCrosspoint
The crosspoint (channel number with direction)
ULWord fTrailerTag
A special FourCC to identify the tail end of an NTV2 structure.
This is used to enable or disable AJADebug logging in the driver.
ULWord mOutNumFailures
The number of registers unsuccessfully written.
NTV2Crosspoint foregroundVideoCrosspoint
ULWord fHi
| BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
bool PutU8s(const UByteSequence &inU8s, const size_t inU8Offset=0)
Copies a vector of unsigned 8-bit values into me.
NTV2HDMIBitDepth
Indicates or specifies the HDMI video bit depth.
#define NTV2_IS_REGISTER_TASK(_x_)
#define NTV2EndianSwap32(__val__)
ULWord acNumActiveBytesPerRow
Number of active bytes in a row of video.
NTV2RegInfo & setShift(const ULWord val)
bool SetBuffer(const NTV2Buffer &inBuffer)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock. ...
#define AJA_NTV2_SDK_VERSION_MINOR
The SDK minor version number, an unsigned decimal integer.
uint16_t GetStartFrame(void) const
Declares device capability functions.
#define NTV2_IS_VALID_NTV2FrameRate(__r__)
bool WithVidProc(void) const
NTV2Channel NTV2CrosspointToNTV2Channel(const NTV2Crosspoint inCrosspointChannel)
ULWord acFramesProcessed
Total number of frames successfully processed since CNTV2Card::AutoCirculateStart called...
ULWord getSegmentCount(void) const
NTV2_HEADER mHeader
The common structure header – ALWAYS FIRST!
ULWord64 audioClockStartTime
ULWord64 GetRawHostPointer(void) const
720x486, for NTSC 525i and 525p60, NTV2_VANCMODE_TALLER
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2DebugLogging(const bool inEnable=false)
Constructs an NTV2DebugLogging struct.
This is used by the CNTV2Card::WriteRegisters function.
bool SetVideoBuffer(ULWord *pInVideoBuffer, const ULWord inVideoByteCount)
Sets my video buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
std::string NTV2FrameRateToString(const NTV2FrameRate inValue, const bool inForRetailDisplay=false)
ULWord64 audioClockTimeStamp
48kHz clock (in reg 28, extended to 64 bits) at time of play or record.
bool SegmentedDMAsEnabled(void) const
enum NTV2TCIndex NTV2TimecodeIndex
ULWord acTotalBytesTransferred
Total audio and video bytes transferred.
NTV2FrameBufferFormatSetConstIter NTV2PixelFormatsConstIter
bool RPCEncode(NTV2_RPC_BLOB_TYPE &outBlob)
Declares the CNTV2RegisterExpert class.
bool isDestTopDown(void) const
All new NTV2 structs end with this common trailer.
NTV2_TRAILER acTrailer
The common structure trailer – ALWAYS LAST!
ULWord acFrame
(input/ingest/capture only) Current/active frame number.
NTV2FrameGeometry GetNTV2FrameGeometryFromVideoFormat(const NTV2VideoFormat inVideoFormat)
ULWord currentFieldCount
At Call Field0 or Field1 currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
NTV2SegmentedDMAInfo acInSegmentedDMAInfo
Optional segmented DMA info, for use with specialized data transfers.