39 #define AsSCCSource(__x__) reinterpret_cast<SCCSource&>(__x__) 40 #define AsUBytePtr(__x__) reinterpret_cast<UByte*>(__x__) 50 "The unanimous Declaration of the thirteen united States of America.\n" 51 "When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, " 52 "and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature's God entitle them, a decent " 53 "respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.\n" 54 "We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, " 55 "that among these are Life, Liberty and the pursuit of Happiness. That to secure these rights, Governments are instituted among Men, deriving their " 56 "just powers from the consent of the governed, That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, " 57 "and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and " 58 "Happiness. Prudence, indeed, will dictate that Governments long established should not be changed for light and transient causes; and accordingly all experience hath shewn, " 59 "that mankind are more disposed to suffer, while evils are sufferable, than to right themselves by abolishing the forms to which they are accustomed. " 60 "But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, " 61 "it is their duty, to throw off such Government, and to provide new Guards for their future security. Such has been the patient sufferance of these Colonies; and such is now " 62 "the necessity which constrains them to alter their former Systems of Government. The history of the present King of Great Britain is a history of repeated injuries and " 63 "usurpations, all having in direct object the establishment of an absolute Tyranny over these States. To prove this, let Facts be submitted to a candid world.\n" 64 "He has refused his Assent to Laws, the most wholesome and necessary for the public good.\n" 65 "He has forbidden his Governors to pass Laws of immediate and pressing importance, unless suspended in their operation till his Assent should be obtained; " 66 "and when so suspended, he has utterly neglected to attend to them.\n" 67 "He has refused to pass other Laws for the accommodation of large districts of people, unless those people would relinquish the right of Representation in the Legislature, " 68 "a right inestimable to them and formidable to tyrants only.\n" 69 "He has called together legislative bodies at places unusual, uncomfortable, and distant from the depository of their public Records, for the sole purpose of fatiguing them " 70 "into compliance with his measures. \n" 71 "He has dissolved Representative Houses repeatedly, for opposing with manly firmness his invasions on the rights of the people.\n" 72 "He has refused for a long time, after such dissolutions, to cause others to be elected; whereby the Legislative powers, incapable of Annihilation, have returned to the People " 73 "at large for their exercise; the State remaining in the mean time exposed to all the dangers of invasion from without, and convulsions within.\n" 74 "He has endeavoured to prevent the population of these States; for that purpose obstructing the Laws for Naturalization of Foreigners; refusing to pass others to encourage " 75 "their migrations hither, and raising the conditions of new Appropriations of Lands.\n" 76 "He has obstructed the Administration of Justice, by refusing his Assent to Laws for establishing Judiciary powers.\n" 77 "He has made Judges dependent on his Will alone, for the tenure of their offices, and the amount and payment of their salaries.\n" 78 "He has erected a multitude of New Offices, and sent hither swarms of Officers to harrass our people, and eat out their substance.\n" 79 "He has kept among us, in times of peace, Standing Armies without the Consent of our legislatures.\n" 80 "He has affected to render the Military independent of and superior to the Civil power.\n" 81 "He has combined with others to subject us to a jurisdiction foreign to our constitution, and unacknowledged by our laws; " 82 "giving his Assent to their Acts of pretended Legislation:\n" 83 "For Quartering large bodies of armed troops among us:\n" 84 "For protecting them, by a mock Trial, from punishment for any Murders which they should commit on the Inhabitants of these States:\n" 85 "For cutting off our Trade with all parts of the world:\n" 86 "For imposing Taxes on us without our Consent:\n" 87 "For depriving us in many cases, of the benefits of Trial by Jury:\n" 88 "For transporting us beyond Seas to be tried for pretended offences.\n" 89 "For abolishing the free System of English Laws in a neighbouring Province, establishing therein an Arbitrary government, and enlarging its Boundaries so as to render it at " 90 "once an example and fit instrument for introducing the same absolute rule into these Colonies:\n" 91 "For taking away our Charters, abolishing our most valuable Laws, and altering fundamentally the Forms of our Governments:\n" 92 "For suspending our own Legislatures, and declaring themselves invested with power to legislate for us in all cases whatsoever.\n" 93 "He has abdicated Government here, by declaring us out of his Protection and waging War against us.\n" 94 "He has plundered our seas, ravaged our Coasts, burnt our towns, and destroyed the lives of our people.\n" 95 "He is at this time transporting large Armies of foreign Mercenaries to compleat the works of death, desolation and tyranny, already begun with circumstances of Cruelty & " 96 "perfidy scarcely paralleled in the most barbarous ages, and totally unworthy the Head of a civilized nation.\n" 97 "He has constrained our fellow Citizens taken Captive on the high Seas to bear Arms against their Country, to become the executioners of their friends and Brethren, " 98 "or to fall themselves by their Hands.\n" 99 "He has excited domestic insurrections amongst us, and has endeavoured to bring on the inhabitants of our frontiers, the merciless Indian Savages, whose known rule of warfare, " 100 "is an undistinguished destruction of all ages, sexes and conditions.\n" 101 "In every stage of these Oppressions We have Petitioned for Redress in the most humble terms: Our repeated Petitions have been answered only by repeated injury. " 102 "A Prince whose character is thus marked by every act which may define a Tyrant, is unfit to be the ruler of a free people.\n" 103 "Nor have We been wanting in attentions to our Brittish brethren. We have warned them from time to time of attempts by their legislature to extend an unwarrantable " 104 "jurisdiction over us. We have reminded them of the circumstances of our emigration and settlement here. We have appealed to their native justice and magnanimity, " 105 "and we have conjured them by the ties of our common kindred to disavow these usurpations, which, would inevitably interrupt our connections and correspondence. " 106 "They too have been deaf to the voice of justice and of consanguinity. We must, therefore, acquiesce in the necessity, which denounces our Separation, and hold them, " 107 "as we hold the rest of mankind, Enemies in War, in Peace Friends.\n" 108 "We, therefore, the Representatives of the united States of America, in General Congress, Assembled, appealing to the Supreme Judge of the world for the rectitude of " 109 "our intentions, do, in the Name, and by Authority of the good People of these Colonies, solemnly publish and declare, That these United Colonies are, and of Right ought " 110 "to be Free and Independent States; that they are Absolved from all Allegiance to the British Crown, and that all political connection between them and the State of Great " 111 "Britain, is and ought to be totally dissolved; and that as Free and Independent States, they have full Power to levy War, conclude Peace, contract Alliances, establish " 112 "Commerce, and to do all other Acts and Things which Independent States may of right do. And for the support of this Declaration, with a firm reliance on the protection of " 113 "divine Providence, we mutually pledge to each other our Lives, our Fortunes and our sacred Honor.");
120 #if defined (MEASURE_ACCURACY) 134 Speedometer (
const size_t inNumSamples = 20)
135 : mMaxNumSamples (inNumSamples),
138 mTimespanSamples.push_back (10);
146 virtual void Sample (
void)
148 if (mTimespanSamples.size () >= mMaxNumSamples)
149 mTimespanSamples.pop_front ();
151 mTimespanSamples.push_back (now - mWhenLastSampleCall);
152 mWhenLastSampleCall = now;
159 virtual double GetAvgMilliSecsBetweenSamples (
void)
const 162 for (SampleQueueConstIter iter (mTimespanSamples.begin ()); iter != mTimespanSamples.end (); ++iter)
164 return double (sum) / double (mTimespanSamples.size ());
170 virtual double GetAvgSamplesPerSecond (
void)
const 173 for (SampleQueueConstIter iter (mTimespanSamples.begin ()); iter != mTimespanSamples.end (); ++iter)
175 return double (mTimespanSamples.size ()) * 1000.0 /
double (sum);
178 virtual inline double GetAvgSamplesPerMinute (
void)
const {
return GetAvgSamplesPerSecond () * 60.0;}
179 virtual inline size_t GetSampleCount (
void)
const {
return mTimespanSamples.size ();}
180 virtual inline uint64_t GetSampleCountTally (
void)
const {
return mSampleCallTally;}
183 typedef std::deque <uint64_t> SampleQueue;
184 typedef SampleQueue::const_iterator SampleQueueConstIter;
186 SampleQueue mTimespanSamples;
187 const size_t mMaxNumSamples;
188 uint64_t mWhenLastSampleCall;
189 uint64_t mSampleCallTally;
200 static ostream &
operator << (ostream & inOutStr,
const Speedometer & inObj)
202 const double samplesPerSecond (inObj.GetAvgSamplesPerSecond ());
203 const double samplesPerMinute (samplesPerSecond * 60.0);
204 return inOutStr << samplesPerMinute <<
" per min";
207 static uint64_t gWhenLastDisplay (0);
209 #endif // MEASURE_ACCURACY 213 static const string EndActions[] = {
"Quit",
"Repeat",
"Idle",
""};
215 string filesToPlay(
aja::join(fFilesToPlay,
"\n"));
216 if (filesToPlay.empty()) filesToPlay =
"<default>";
232 AJASystemInfo::append(result,
"Force RTP", fForceRTP ? (fForceRTP&2 ?
"MultiPkt" :
"UniPkt") :
"Normal");
243 result.push_back(*iter);
289 explicit CaptionSource (
const double inCharsPerMinute, istream * pInInputStream,
const string & inFilePath,
const bool inDeleteInputStream =
false)
290 : mpInputStream (pInInputStream),
291 mInputFilePath (inFilePath),
292 mCharsPerMinute (inCharsPerMinute),
293 mMaxRowCharWidth (32),
295 mDeleteInputStream (inDeleteInputStream),
297 mMilliSecsPerChar (0.0),
302 *mpInputStream >> std::noskipws;
303 mMilliSecsPerChar = 60000.0 / mCharsPerMinute;
313 if (mDeleteInputStream && mpInputStream)
315 delete mpInputStream;
318 #if defined (MEASURE_ACCURACY) 320 #endif // MEASURE_ACCURACY 330 static double milliSecsPerChar(mMilliSecsPerChar);
332 unsigned char rawBytes[5] = {0, 0, 0, 0, 0};
335 if (mpInputStream->tellg() == 0 && !mInputFilePath.empty())
336 PLNOTE(
"Starting caption file '" << mInputFilePath <<
"'");
338 *mpInputStream >> rawBytes[0];
339 if (mpInputStream->eof())
342 if (rawBytes[0] < 0x80)
345 resultChar = string (1,
char(rawBytes[0]));
347 else if (rawBytes[0] < 0xC0)
349 else if (rawBytes[0] < 0xE0)
355 resultChar = char(rawBytes[0]);
356 *mpInputStream >> rawBytes[1];
357 if (mpInputStream->eof())
359 resultChar += char(rawBytes[1]);
363 else if (rawBytes[0] < 0xF0)
365 resultChar = char(rawBytes[0]);
366 for (
unsigned ndx(1); ndx <= 2; ndx++)
374 *mpInputStream >> rawBytes[ndx];
375 if (mpInputStream->eof())
377 resultChar += char(rawBytes[ndx]);
379 if (!IsFinished())
NTV2_ASSERT(resultChar.length() == 3);
381 else if (rawBytes[0] < 0xF8)
383 resultChar = char(rawBytes[0]);
384 for (
unsigned ndx(1); ndx <= 3; ndx++)
392 *mpInputStream >> rawBytes[ndx];
393 if (mpInputStream->eof())
395 resultChar += char(rawBytes[ndx]);
397 if (!IsFinished())
NTV2_ASSERT(resultChar.length() == 4);
402 #if defined (MEASURE_ACCURACY) 403 if (!resultChar.empty ())
404 mCharSpeed.Sample ();
409 const double avg (mCharSpeed.GetAvgMilliSecsBetweenSamples ());
410 const double diff (avg - mMilliSecsPerChar);
411 milliSecsPerChar = milliSecsPerChar - diff;
412 if (milliSecsPerChar < 0.0)
413 milliSecsPerChar = mMilliSecsPerChar;
415 <<
" chars: " << mCharSpeed <<
" " << milliSecsPerChar <<
"ms/Char " << avg <<
"avg - " 416 << mMilliSecsPerChar <<
" => " << diff <<
"diff");
419 #endif // MEASURE_ACCURACY 437 string nextChar (GetNextCaptionCharacter ());
439 outLineBreak =
false;
440 while (!nextChar.empty ())
442 if (IsSpaceChar (nextChar) || IsControlChar (nextChar))
444 outLineBreak = (nextChar.at (0) ==
'\n' || nextChar.at (0) ==
'\r');
448 resultWord += nextChar;
449 if (IsWordBreakCharacter (nextChar))
452 nextChar = GetNextCaptionCharacter ();
475 string nextChar (GetNextCaptionCharacter ());
476 while (!nextChar.empty ())
478 if (nextChar.at (0) ==
'\n' || nextChar.at (0) ==
'\r')
481 resultRow += nextChar;
482 nextChar = GetNextCaptionCharacter ();
489 if (!mLeftoverRowText.empty ())
492 if (mLeftoverRowText.length () > mMaxRowCharWidth)
495 resultRow = mLeftoverRowText.substr (0, mMaxRowCharWidth);
496 mLeftoverRowText.erase (0, mMaxRowCharWidth);
501 resultRow = mLeftoverRowText;
502 mLeftoverRowText.clear ();
506 if (resultRow.length () == mMaxRowCharWidth)
511 bool lineBreak (
false);
512 string nextWord (GetNextCaptionWord (lineBreak));
513 if (nextWord.empty () && IsFinished ())
516 if (nextWord.empty () && !lineBreak)
520 if (!resultRow.empty () && nextWord.length () >= mMaxRowCharWidth)
522 mLeftoverRowText = nextWord;
527 if (nextWord.length () >= mMaxRowCharWidth)
529 resultRow = nextWord.substr (0, mMaxRowCharWidth);
530 nextWord.erase (0, mMaxRowCharWidth);
531 mLeftoverRowText = nextWord;
536 const size_t newLength ((resultRow.length () ? resultRow.length () + 1 : 0) + nextWord.length ());
537 if (newLength > mMaxRowCharWidth)
540 mLeftoverRowText = nextWord;
544 if (resultRow.empty ())
545 resultRow = nextWord;
547 resultRow +=
" " + nextWord;
548 if (inBreakLinesOnNewLineChars && lineBreak)
558 virtual inline bool IsFinished (
void)
const {
return mFinished;}
570 virtual inline void SetTextMode (
const bool inIsTextMode) {mIsTextMode = inIsTextMode;}
580 istream * mpInputStream;
581 string mInputFilePath;
582 double mCharsPerMinute;
583 string mLeftoverRowText;
584 size_t mMaxRowCharWidth;
586 const bool mDeleteInputStream;
588 double mMilliSecsPerChar;
590 #if defined (MEASURE_ACCURACY) 591 Speedometer mCharSpeed;
592 #endif // MEASURE_ACCURACY 597 static bool IsWordBreakCharacter (
const string & inUTF8Char)
599 static const string wordBreakCharacters (
"!#$%&()*+,./:;<=>?@[\\]^_`{|}~. \t");
600 if (inUTF8Char.length () != 1)
602 return wordBreakCharacters.find (inUTF8Char) != string::npos;
605 static bool IsSpaceChar (
const string & inUTF8Char)
608 if (inUTF8Char.length () != 1)
610 const unsigned char c =
UByte(inUTF8Char[0]);
611 if (c == 0x09 || c == 0x0A || c == 0x0B || c == 0x0C || c == 0x0D || c == 0x20)
616 static bool IsControlChar (
const string & inUTF8Char)
619 if (inUTF8Char.length () != 1)
621 unsigned char c =
UByte(inUTF8Char[0]);
622 if ((c > 0x00 && c <
' ') || c == 0x7F)
633 explicit SCCSource (
const double inCharsPerMinute, istream * pInInputStream,
const string & inFilePath,
const bool inDeleteInputStream =
false);
644 virtual inline SCCSource & operator = (
const SCCSource & inCaptionSource) {(
void) inCaptionSource;
return *
this;}
647 typedef std::vector<uint16_t> UWords;
648 typedef UWords::const_iterator UWordsConstIter;
649 typedef std::map<uint32_t,UWords> CCDataMap;
650 typedef CCDataMap::const_iterator CCDataMapConstIter;
652 CCDataMap mCCDataMap;
653 CCDataMapConstIter mCCDataMapIter;
654 size_t mLastCCDataWordNdx;
655 uint32_t mMaxFrameNum;
660 SCCSource::SCCSource (
const double inCharsPerMinute, istream * pInInputStream,
const string & inFilePath,
const bool inDeleteInputStream)
661 :
CaptionSource(inCharsPerMinute, pInInputStream, inFilePath, inDeleteInputStream),
662 mLastCCDataWordNdx (0),
666 while (!pInInputStream->fail())
669 std::getline(*pInInputStream, line);
672 lines.push_back(line);
675 if (iter == lines.end())
676 {
PLFAIL(
"No lines!");
return;}
677 if (iter->find(
"Scenarist_SCC") == string::npos)
678 {
PLFAIL(
"No 'Scenarist_SCC' heading!");
return;}
682 const bool isDropFrame (
true);
683 while (++iter != lines.end())
685 const string & line(*iter);
688 const size_t tabPos(line.find(
'\t'));
689 if (tabPos == string::npos)
697 string timecodeChunk(tabChunks.at(0));
700 if (tcPieces.size() < 4)
701 {
PLWARN(tcPieces.size() <<
" timecode components separated by ':' fewer than 4");
continue;}
702 const uint32_t tcComponents[4] = { uint32_t(
aja::stoul(tcPieces[0])), uint32_t(
aja::stoul(tcPieces[1])),
704 tc.
SetHmsf(tcComponents[0], tcComponents[1], tcComponents[2], tcComponents[3], timeBase, isDropFrame);
708 string ccDataChunk(tabChunks.at(1));
713 string ccDataWord(*it);
715 if (ccDataWord.find(
"0x") == string::npos && ccDataWord.find(
"0X") == string::npos)
716 ccDataWord =
"0x" + ccDataWord;
718 ccWords.push_back(ccWord);
722 CCDataMapConstIter iter(mCCDataMap.find(mMaxFrameNum));
723 if (iter != mCCDataMap.end())
724 PLWARN(
"Frame " << mMaxFrameNum <<
" already present, has " << iter->second.size() <<
" byte pairs");
726 mCCDataMap[mMaxFrameNum] = ccWords;
727 PLDBG(
"Frame " << tc.
QueryFrame() <<
" has " << ccWords.size() <<
" CC byte pairs");
728 mCCDataMapIter = mCCDataMap.begin();
729 mLastCCDataWordNdx = 0;
731 if (!mCCDataMap.empty())
732 PLINFO(
"SCC data frames " << mCCDataMap.begin()->first <<
" thru " << mMaxFrameNum <<
", size=" << mCCDataMap.size());
738 uint32_t playFrame(mMaxFrameNum ? inPlayFrame % (mMaxFrameNum + 1) : inPlayFrame);
741 if (mCCDataMapIter != mCCDataMap.end() && mLastCCDataWordNdx < mCCDataMapIter->second.size())
743 uint32_t CCFrame(mCCDataMapIter->first);
744 if (CCFrame > playFrame)
746 if (CCFrame == mMaxFrameNum)
750 const uint32_t delayFrames(CCFrame - playFrame);
751 PLINFO(
"CCFrame " <<
DEC(CCFrame) <<
" > playFrame " <<
DEC(playFrame) <<
"|" <<
DEC(inPlayFrame) <<
", delaying " <<
DEC(delayFrames) <<
" frames");
754 playFrame += delayFrames;
757 if (CCFrame <= playFrame)
759 PLINFO(
"CCFrame " <<
DEC(CCFrame) <<
" <= playFrame " <<
DEC(playFrame) <<
"|" <<
DEC(inPlayFrame) <<
": " << mCCDataMapIter->second);
762 const uint16_t ccWord(mCCDataMapIter->second.at(mLastCCDataWordNdx));
770 if (++mLastCCDataWordNdx >= mCCDataMapIter->second.size())
772 mLastCCDataWordNdx = 0;
774 if (mCCDataMapIter == mCCDataMap.end())
777 PLINFO(
"Finished at playFrame " <<
DEC(playFrame) <<
"|" <<
DEC(inPlayFrame));
781 }
while (mCCDataMapIter->first == CCFrame);
798 static istream * pStdIn (&cin);
799 static size_t nFilesToPlay (9999);
801 if (nFilesToPlay == 9999)
802 nFilesToPlay = inFilesToPlay.size();
804 if (nFilesToPlay == 0)
817 for (
size_t ndx(0); ndx < inFilesToPlay.size(); ndx++)
819 const string filePath(inFilesToPlay.at(ndx));
828 cerr <<
"## WARNING: Standard input ('-') can only be specified once" << endl;
832 ifstream * pFileStream (
new ifstream(filePath.c_str()));
834 if (pFileStream->is_open())
836 static const string scc(
".scc");
837 const size_t pos (filePath.rfind(scc));
838 if (pos == (filePath.length()-scc.length()))
842 PLINFO(
"Caption file '" << filePath <<
"' opened");
846 PLWARN(
"Cannot open caption file '" << filePath <<
"'");
847 cerr <<
"## WARNING: Cannot play '" << filePath <<
"'" << endl;
860 : mConfig (inConfigData),
862 mGeneratorThreads (),
867 mCaptionGeneratorQuit (
false),
868 mActiveFrameStores (),
874 mGeneratorThreads.push_back(
AJAThread());
896 mCaptionGeneratorQuit =
true;
897 while (!mGeneratorThreads.empty())
899 while (mGeneratorThreads.back().Active())
901 mGeneratorThreads.pop_back();
906 if (inQuitImmediately)
908 PLDBG(
"Quit immediate -- flushing");
909 m608Encoder->
Flush();
913 PLDBG(
"Quit non-immediate -- waiting for queue to drain");
923 while (mPlayThread.
Active())
932 UWord majorVersion (0), minorVersion (0), pointVersion (0), buildNumber (0);
935 if ((majorVersion == 12 && minorVersion >= 3) || (majorVersion >= 13) || (majorVersion == 0 && minorVersion == 0 && pointVersion == 0 && buildNumber == 0))
963 cerr <<
"## ERROR: Cannot acquire '" << mDevice.
GetDisplayName() <<
"' because another app owns it" << endl;
975 for (
unsigned ndx(0); ndx < U32s.size(); ndx++)
976 if (U32s.at(ndx) ==
ULWord(mDeviceID))
979 U32s[ndx] =
ULWord(mDeviceID);
984 #endif // defined(_DEBUG) 1011 cerr << mConfig << endl;
1012 #endif // defined(_DEBUG) 1030 cerr <<
"## ERROR: DrawTestPattern failed, formatDesc: " << formatDesc << endl;
1036 { ostringstream oss;
1037 oss << setw(32) << left << string(
"CCPlayer ") + strVideoFormat + string(formatDesc.
IsVANC() ?
" VANC" :
"");
1040 { ostringstream oss;
1094 {cerr <<
"## ERROR: CCPlayer doesn't yet support UHD2/8K formats" << endl;
return AJA_STATUS_UNSUPPORTED;}
1096 cerr <<
"## WARNING: SD 625/PAL not supported -- but will insert CEA608 caption packets anyway" << endl;
1099 {cerr <<
"## ERROR: Cannot use VANC mode with UHD/4K/UHD2/8K formats" << endl;
return AJA_STATUS_UNSUPPORTED;}
1141 {cerr <<
"## ERROR: Routing thru CSC may corrupt VANC in frame buffer" << endl;
return AJA_STATUS_UNSUPPORTED;}
1148 <<
" -- Anc inserter requires both to match, output signal won't have captions" << endl;
1167 {cerr <<
"## ERROR: Cannot create 608 encoder" << endl;
return AJA_STATUS_MEMORY;}
1169 {cerr <<
"## ERROR: Cannot create 708 encoder" << endl;
return AJA_STATUS_MEMORY;}
1200 mConnections.clear();
1203 if (isRGBFBF != isRGBWire
1209 if (isRGBFBF && isRGBWire)
1212 for (
size_t ndx(0); ndx < sdiOutputs.size(); ndx++)
1213 {
NTV2Channel frmSt(frameStores.at(ndx)), sdiOut(sdiOutputs.at(ndx));
1228 for (
size_t ndx(0); ndx < sdiOutputs.size(); ndx++)
1229 {
NTV2Channel frmSt(frameStores.at(ndx/2)), tsiMux(tsiMuxes.at(ndx/2)), sdiOut(sdiOutputs.at(ndx));
1239 else if (isRGBFBF && !isRGBWire)
1242 for (
size_t ndx(0); ndx < sdiOutputs.size(); ndx++)
1243 {
NTV2Channel frmSt(frameStores.at(ndx)), sdiOut(sdiOutputs.at(ndx));
1262 for (
size_t ndx(0); ndx < cscs.size(); ndx++)
1263 {
NTV2Channel frmSt (frameStores.at(ndx/2)), tsiMux (tsiMuxes.at(ndx/2)),
1264 sdiOut (sdiOutputs.at(is4KHFR ? ndx : ndx/2)), csc (cscs.at(ndx));
1275 else if (!isRGBFBF && isRGBWire)
1278 for (
size_t ndx(0); ndx < sdiOutputs.size(); ndx++)
1279 {
NTV2Channel frmSt(frameStores.at(ndx)), sdiOut(sdiOutputs.at(ndx));
1295 for (
size_t ndx(0); ndx < sdiOutputs.size(); ndx++)
1296 {
NTV2Channel frmSt(frameStores.at(ndx/2)), tsiMux(tsiMuxes.at(ndx/2)), sdiOut(sdiOutputs.at(ndx));
1310 for (
size_t ndx(0); ndx < sdiOutputs.size(); ndx++)
1311 {
NTV2Channel frmSt(frameStores.at(ndx)), sdiOut(sdiOutputs.at(ndx));
1327 for (
size_t ndx(0); ndx < sdiOutputs.size(); ndx++)
1328 {
NTV2Channel frmSt(frameStores.at(is4KHFR ? ndx/2 : ndx)),
1329 tsiMux(tsiMuxes.at(is4KHFR ? ndx/2 : ndx)),
1330 sdiOut(sdiOutputs.at(ndx));
1393 const CapGenStartInfo * pStartInfo (reinterpret_cast<CapGenStartInfo*>(pContext));
1414 const double charsPerMinute (ccGenConfig.fCharsPerMinute);
1415 const bool newlinesMakeNewRows (ccGenConfig.fNewLinesAreNewRows);
1416 const AtEndAction endAction (ccGenConfig.fEndAction);
1418 UWord linesWanted (3);
1419 bool quitThisGenerator (
false);
1420 const UWord paintPopTopRow (9);
1421 const UWord paintPopMaxNumRows (15 - paintPopTopRow + 1);
1422 UWord lineTally (0);
1432 PLNOTE(
"Started " << ccChannelStr <<
" generator thread");
1435 while (!mCaptionGeneratorQuit)
1438 while (!mCaptionGeneratorQuit && !captionSources.empty())
1441 captionSources.pop_front();
1445 captionSource->SetCaptionChannel(inCCChannel);
1447 while (!mCaptionGeneratorQuit && !captionSource->IsFinished())
1453 if (captionSource->IsPlainTextSource())
1455 string str (captionSource->GetNextCaptionRow(newlinesMakeNewRows));
1458 for (
UWord lines(linesWanted - 1); lines; lines--)
1459 str +=
"\n" + captionSource->GetNextCaptionRow();
1462 cout << str << endl;
1463 PLDBG(ccChannelStr <<
" caption line " <<
DEC(lineTally+1) <<
": '" << str <<
"'");
1474 switch (captionMode)
1478 lineTally % paintPopMaxNumRows + paintPopTopRow,
1491 lineTally % paintPopMaxNumRows == 0,
1493 lineTally % paintPopMaxNumRows + paintPopTopRow,
1519 filesToPlay.clear();
1521 quitThisGenerator =
true;
1528 filesToPlay.clear();
1529 quitThisGenerator =
true;
1535 if (quitThisGenerator)
1541 m608Encoder->
Erase (inCCChannel);
1542 PLNOTE(ccChannelStr <<
" generator thread exit");
1557 mPlayThread.
Start();
1566 NTV2CCPlayer * pApp (reinterpret_cast<NTV2CCPlayer*>(pContext));
1576 static const double gAmplitudes [16] = { 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40,
1577 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75,
1579 static const double gFrequencies [16] = { 150.00000000, 200.00000000, 266.66666667, 355.55555556, 474.07407407, 632.09876543,
1580 842.79835391, 1123.73113855, 1498.30818473, 1997.74424630, 2663.65899507, 3551.54532676,
1581 4735.39376902, 6313.85835869, 8418.47781159, 11224.63708211};
1583 static const uint16_t gF2LineNums608[] = { 573, 0, 273, 323, 0, 1000, 0, 573, 0, 0, 0 };
1584 static const uint16_t kF1PktLineNumCEA708(9), kF1PktLineNumCEA608(10);
1586 const uint16_t kF2PktLineNumCEA608 (gF2LineNums608[mVideoStandard]);
1592 const bool isInterlaced (!isProgressive);
1595 ULWord acOptionFlags (0);
1596 ULWord currentSample (0);
1598 ULWord numAudioChannels (0);
1607 PLINFO(
"Anc buffer size is " <<
DEC(ANCKB) <<
"K");
1621 numAudioChannels = 8;
1648 PLNOTE(
"Playout thread started: 608F1PktLine=" <<
DEC(kF1PktLineNumCEA608) <<
" 608F2PktLine=" <<
DEC(kF2PktLineNumCEA608)
1649 <<
" 708F1PktLine=" <<
DEC(kF1PktLineNumCEA708) <<
" F2StartLine=" <<
DEC(F2StartLine));
1664 cerr <<
"## WARNING: SD video with '--noline21' option and '--no608' option won't produce captions" << endl;
1668 {cerr <<
"## ERROR: AutoCirculateInitForOutput failed" << endl; mPlayerQuit =
true;}
1671 while (!mPlayerQuit)
1706 ULWord line21RowOffset (0);
1716 ::memcpy (pLine21, pEncodedYUV8Line, bytesPerRow);
1720 else PLFAIL(
"GetWriteableRowAddress return NULL for SMPTE line 21, rowOffset=" <<
xHEX0N(line21RowOffset,8) <<
" " << formatDesc);
1729 ::memcpy (pLine21, pEncodedYUV8Line, bytesPerRow);
1733 else PLFAIL(
"GetWriteableRowAddress return NULL for SMPTE line 284, rowOffset=" <<
xHEX0N(line21RowOffset,8) <<
" " << formatDesc);
1751 AJAAncData pkt;
static const uint8_t sTmp[] = {
'T',
'M',
'P',
'0'};
1774 char tcString[] = {
" "};
1778 rp188.GetRP188Reg (tc);
1788 for (
int num (0); num < 4; num++)
1806 ::memcpy (tcString + colShift, rp188.GetRP188CString(), 11);
1823 PLFAIL(
"AutoCirculateTransfer failed");
1827 PLINFO(
"Anc buffer size changed from " <<
DEC(ANCKB) <<
"K to " <<
DEC(val) <<
"K");
1841 PLNOTE(
"Playout thread exit");
1847 size_t & outTotMsgsEnq,
size_t & outTotBytesEnq,
1848 size_t & outTotMsgsDeq,
size_t & outTotBytesDeq,
1849 size_t & outMaxQueDepth,
size_t & outDroppedFrames)
const 1863 outMessagesQueued = outBytesQueued = outTotMsgsEnq = outTotBytesEnq = outTotMsgsDeq = outTotBytesDeq = outMaxQueDepth = 0;
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
#define NTV2_IS_SD_VIDEO_FORMAT(__f__)
bool SetOutputTimeCodes(const NTV2TimeCodes &inValues)
Intended for playout, replaces the contents of my acOutputTimeCodes member.
AJALabelValuePairs Get(const bool inCompact=(0)) const
Renders a human-readable representation of me.
NTV2Buffer acOutputTimeCodes
Intended for playout, this is an ordered sequence of NTV2_RP188 values to send to the device...
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
#define IsLine21RollUpMode(_mode_)
virtual bool SetTaskMode(const NTV2TaskMode inMode)
Sets the device's task mode.
UByte f2_char1
Caption Byte 1 of Field 2.
virtual bool EnqueueCCDataToFrame(CNTV2CaptionEncoder608Ptr inEncoder, const uint32_t inFrameNum)
Enqueues next-available CC data into the given encoder for the given frame number.
virtual AJAStatus GetTransmitData(NTV2Buffer &F1Buffer, NTV2Buffer &F2Buffer, const bool inIsProgressive=true, const uint32_t inF2StartLine=0)
Encodes my AJAAncillaryData packets into the given buffers in the default SDI Anc Buffer Data Format ...
bool fSuppress608
If true, don't transmit CEA608 packets; otherwise include 608 packets.
static void PlayThreadStatic(AJAThread *pThread, void *pContext)
This is the playout thread's static callback function that gets called when the playout thread runs...
I am an object that can inject text captions into an SDI output of an AJA device in real time...
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
bool setVANCToLegalBlack(void) const
bool CanDo12gRouting(void)
Declares a number of pixel format transcoder functions.
bool fSuppressAudio
If true, suppress audio; otherwise generate & xfer audio tone.
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...
Declares common types used in the ajabase library.
virtual bool IsF1Channel(void) const
virtual bool SetAudioLoopBack(const NTV2AudioLoopBack inMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Enables or disables NTV2AudioLoopBack mode for the given NTV2AudioSystem.
bool firstFieldTop
True if the first field on the wire is the top-most field in the raster (field dominance) ...
UByte f1_char2
Caption Byte 2 of Field 1.
Specifies the device's internal clock.
virtual bool SetReference(const NTV2ReferenceSource inRefSource, const bool inKeepFramePulseSelect=(0))
Sets the device's clock reference source. See Video Output Clocking & Synchronization for more inform...
virtual bool ReleaseStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Releases exclusive use of the AJA device for the given process, permitting other processes to acquire...
bool Is8BitFrameBufferFormat(const NTV2FrameBufferFormat fbFormat)
CaptionChanGenMap::const_iterator CaptionChanGenMapCIter
virtual string GetNextCaptionWord(bool &outLineBreak)
The NTV2 test pattern generator.
virtual size_t GetEnqueueByteTally(void) const
Returns the total number of bytes (including command bytes) that have been enqueued onto me since I w...
static const double gAmplitudes[]
I interrogate and control an AJA video/audio capture/playout device.
virtual void Flush(const NTV2Line21Field inFieldNum=NTV2_CC608_Field1, const bool inAlsoInProgress=true)
Flushes all queued command bytes for the given CC608 field.
virtual bool SetVideoFormat(const NTV2VideoFormat inVideoFormat, const bool inIsAJARetail=(!(0)), const bool inKeepVancSettings=(0), const NTV2Channel inChannel=NTV2_CHANNEL1)
Configures the AJA device to handle a specific video format.
virtual bool Erase(const NTV2Line21Channel inChannel=NTV2_CC608_CC1)
Clears captions on the given channel by emitting ENM (Erase Non-displayed Memory) and EOC (End Of Cap...
enum _AtEndAction_ AtEndAction
These are the actions that can be taken after the last file is "played".
virtual bool Set4kSquaresEnable(const bool inIsEnabled, const NTV2Channel inChannel)
Enables or disables SMPTE 425 "2K quadrants" mode for the given FrameStore bank on the device...
Ancillary data found between SAV and EAV (.
virtual void Quit(const bool inQuitImmediately=(0))
Stops me.
NTV2VANCMode fVancMode
VANC mode to use.
virtual size_t GetQueuedByteCount(const NTV2Line21Field inFieldNum=NTV2_CC608_Field1) const
Answers with the total number of bytes (including command bytes) that are currently queued (for the g...
NTV2Line21Channel fCaptionChannel
The caption channel to use.
UByte f1_char1
Caption Byte 1 of Field 1.
std::string NTV2OutputDestinationToString(const NTV2OutputDestination inValue, const bool inForRetailDisplay=false)
virtual bool IsDeviceReady(const bool inCheckValid=(0))
2-row roll-up from bottom
virtual void SetCaptionChannel(const NTV2Line21Channel inCCChannel)
Sets my caption channel.
Used to describe Start of Active Video (SAV) location and field dominance for a given NTV2Standard...
bool ConvertLine_2vuy_to_v210(const UByte *pInSrcLine_2vuy, ULWord *pOutDstLine_v210, const ULWord inNumPixels)
Converts a single 8-bit YCbCr '2vuy' raster line to 10-bit YCbCr 'v210' (from NTV2_FBF_8BIT_YCBCR to ...
#define AJA_FAILURE(_status_)
Declares the NTV2TestPatternGen class.
static NTV2ChannelList GetTSIMuxesForFrameStore(CNTV2Card &inDevice, const NTV2Channel in1stFrameStore, const UWord inCount)
ULWord GetByteCount(void) const
UByte f2_char2
Caption Byte 2 of Field 2.
std::vector< AJALabelValuePair > AJALabelValuePairs
An ordered sequence of label/value pairs.
Configures an NTV2CCPlayer instance.
NTV2InputXptID GetDLOutInputXptFromChannel(const NTV2Channel inDLOutWidget)
#define NTV2_IS_4K_VIDEO_FORMAT(__f__)
Declares the AJATime class.
virtual AJAStatus SetPriority(AJAThreadPriority priority)
static uint64_t GetSystemMilliseconds(void)
Returns the current value of the host's high-resolution clock, in milliseconds.
NTV2OutputXptID GetTSIMuxOutputXptFromChannel(const NTV2Channel inTSIMuxer, const bool inLinkB=false, const bool inIsRGB=false)
virtual bool EnqueueTextMessage(const std::string &inMessageStr, const bool inEraseFirst=false, const NTV2Line21Channel inChannel=NTV2_CC608_Text1)
Enqueues the given message for eventual reception and possible display on a receiver capable of displ...
#define NTV2_FOURCC(_a_, _b_, _c_, _d_)
#define NTV2_IS_VANCMODE_OFF(__v__)
SCCSource(const double inCharsPerMinute, istream *pInInputStream, const string &inFilePath, const bool inDeleteInputStream=(0))
if(!(riid==IID_IUnknown) &&!(riid==IID_IClassFactory))
virtual AJAStatus GeneratePayloadData(void)
Generate the payload data from my "local" ancillary data.
static void SignalHandler(int inSignal)
I am a reference-counted pointer template class. I am intended to be a proxy for an underlying object...
Declares the AJAAncillaryData_Cea608_Vanc class.
bool CanAcceptMoreOutputFrames(void) const
virtual void StartCaptionGeneratorThreads(void)
Starts my caption generator threads.
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.
bool fSuppress708
If true, don't transmit CEA708 packets; otherwise include 708 packets.
This identifies the mode in which there are some + extra VANC lines in the frame buffer.
bool CanDoFrameStore1Display(void)
Defines the AJARefPtr template class.
virtual bool SetAudioRate(const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the NTV2AudioRate for the given Audio System.
virtual AJAStatus RouteOutputSignal(void)
Sets up signal routing for playout.
virtual AJAStatus Start()
CapGenStartInfo(NTV2CCPlayer *pPlayer, const NTV2Line21Channel inCapChan)
Fractional rate of 60,000 frames per 1,001 seconds.
AJALabelValuePairs::const_iterator AJALabelValuePairsConstIter
#define NTV2_IS_HFR_STANDARD(__s__)
std::string fDeviceSpec
The AJA device to use.
std::ostream & operator<<(std::ostream &ioStrm, const CCPlayerConfig &inObj)
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
virtual AJAStatus SetUpOutputVideo(void)
Sets up everything I need to play video.
virtual bool SetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat inNewFormat, bool inIsAJARetail=(!(0)), NTV2HDRXferChars inXferChars=NTV2_VPID_TC_SDR_TV, NTV2HDRColorimetry inColorimetry=NTV2_VPID_Color_Rec709, NTV2HDRLuminance inLuminance=NTV2_VPID_Luminance_YCbCr)
Sets the frame buffer format for the given FrameStore on the AJA device.
AJARefPtr< CaptionSource > CaptionSourcePtr
NTV2OutputXptID GetDLOutOutputXptFromChannel(const NTV2Channel inDLOutput, const bool inIsLinkB=false)
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
ULWord GetLastLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
#define AJAAncDataHorizOffset_AnyVanc
VANC – Packet placed/found in any legal area of raster line after SAV, but before EAV...
static bool Create(CNTV2CaptionEncoder708Ptr &outEncoder)
Creates a new CNTV2CaptionEncoder708 instance.
virtual class DeviceCapabilities & features(void)
virtual bool SetMultiFormatMode(const bool inEnable)
Enables or disables multi-format (per channel) device operation. If enabled, each device channel can ...
virtual bool SetHDMIOutAudioChannels(const NTV2HDMIAudioChannels inNewValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the audio channel count to use for the given HDMI output.
bool CanDoCustomAnc(void)
bool IsProgressivePicture(const NTV2VideoFormat format)
ULWord GetProcessedFrameCount(void) const
virtual AJAStatus SetLocationLineNumber(const uint16_t inLineNum)
Sets my ancillary data "location" frame line number.
#define NTV2_ASSERT(_expr_)
Defines where the ancillary data can be found within a video stream.
Represents an unknown or invalid frame rate.
NTV2AutoCirculateState acState
Current AutoCirculate state after the transfer.
This struct replaces the old RP188_STRUCT.
bool fSuppressLine21
SD output only: if true, do not encode Line 21 waveform; otherwise encode Line 21 waveform...
#define IsLine21CaptionChannel(_chan_)
A handy class that makes it easy to "bounce" an unsigned integer value between a minimum and maximum ...
NTV2TCIndex NTV2ChannelToTimecodeIndex(const NTV2Channel inChannel, const bool inEmbeddedLTC=false, const bool inIsF2=false)
Converts the given NTV2Channel value into the equivalent NTV2TCIndex value.
unsigned long stoul(const std::string &str, std::size_t *idx, int base)
UWord GetNumAudioSystems(void)
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
virtual size_t GetSMPTE334Size(void) const
bool Fill(const T &inValue)
Fills me with the given scalar value.
virtual bool GetTaskMode(NTV2TaskMode &outMode)
Retrieves the device's current task mode.
const std::string & NTV2Line21ModeToStr(const NTV2Line21Mode inLine21Mode)
Converts the given NTV2Line21Mode value into a human-readable string.
This selects audio channels 1 thru 8.
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
virtual const UWord * GetSMPTE334Data(void) const
Repeat the file list (must Ctrl-C to terminate)
NTV2FrameRate
Identifies a particular video frame rate.
static const string gBuiltInCaptions("IN CONGRESS, July 4, 1776.\ "The unanimous Declaration of the thirteen united States of America.\" "When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, " "and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature 's God entitle them, a decent " "respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.\" "We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, " "that among these are Life, Liberty and the pursuit of Happiness. That to secure these rights, Governments are instituted among Men, deriving their " "just powers from the consent of the governed, That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, " "and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and " "Happiness. Prudence, indeed, will dictate that Governments long established should not be changed for light and transient causes;and accordingly all experience hath shewn, " "that mankind are more disposed to suffer, while evils are sufferable, than to right themselves by abolishing the forms to which they are accustomed. " "But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, " "it is their duty, to throw off such Government, and to provide new Guards for their future security. Such has been the patient sufferance of these Colonies;and such is now " "the necessity which constrains them to alter their former Systems of Government. The history of the present King of Great Britain is a history of repeated injuries and " "usurpations, all having in direct object the establishment of an absolute Tyranny over these States. To prove this, let Facts be submitted to a candid world.\" "He has refused his Assent to Laws, the most wholesome and necessary for the public good.\" "He has forbidden his Governors to pass Laws of immediate and pressing importance, unless suspended in their operation till his Assent should be obtained;" "and when so suspended, he has utterly neglected to attend to them.\" "He has refused to pass other Laws for the accommodation of large districts of people, unless those people would relinquish the right of Representation in the Legislature, " "a right inestimable to them and formidable to tyrants only.\" "He has called together legislative bodies at places unusual, uncomfortable, and distant from the depository of their public Records, for the sole purpose of fatiguing them " "into compliance with his measures. \" "He has dissolved Representative Houses repeatedly, for opposing with manly firmness his invasions on the rights of the people.\" "He has refused for a long time, after such dissolutions, to cause others to be elected;whereby the Legislative powers, incapable of Annihilation, have returned to the People " "at large for their exercise;the State remaining in the mean time exposed to all the dangers of invasion from without, and convulsions within.\" "He has endeavoured to prevent the population of these States;for that purpose obstructing the Laws for Naturalization of Foreigners;refusing to pass others to encourage " "their migrations hither, and raising the conditions of new Appropriations of Lands.\" "He has obstructed the Administration of Justice, by refusing his Assent to Laws for establishing Judiciary powers.\" "He has made Judges dependent on his Will alone, for the tenure of their offices, and the amount and payment of their salaries.\" "He has erected a multitude of New Offices, and sent hither swarms of Officers to harrass our people, and eat out their substance.\" "He has kept among us, in times of peace, Standing Armies without the Consent of our legislatures.\" "He has affected to render the Military independent of and superior to the Civil power.\" "He has combined with others to subject us to a jurisdiction foreign to our constitution, and unacknowledged by our laws;" "giving his Assent to their Acts of pretended Legislation:\" "For Quartering large bodies of armed troops among us:\" "For protecting them, by a mock Trial, from punishment for any Murders which they should commit on the Inhabitants of these States:\" "For cutting off our Trade with all parts of the world:\" "For imposing Taxes on us without our Consent:\" "For depriving us in many cases, of the benefits of Trial by Jury:\" "For transporting us beyond Seas to be tried for pretended offences.\" "For abolishing the free System of English Laws in a neighbouring Province, establishing therein an Arbitrary government, and enlarging its Boundaries so as to render it at " "once an example and fit instrument for introducing the same absolute rule into these Colonies:\" "For taking away our Charters, abolishing our most valuable Laws, and altering fundamentally the Forms of our Governments:\" "For suspending our own Legislatures, and declaring themselves invested with power to legislate for us in all cases whatsoever.\" "He has abdicated Government here, by declaring us out of his Protection and waging War against us.\" "He has plundered our seas, ravaged our Coasts, burnt our towns, and destroyed the lives of our people.\" "He is at this time transporting large Armies of foreign Mercenaries to compleat the works of death, desolation and tyranny, already begun with circumstances of Cruelty &" "perfidy scarcely paralleled in the most barbarous ages, and totally unworthy the Head of a civilized nation.\" "He has constrained our fellow Citizens taken Captive on the high Seas to bear Arms against their Country, to become the executioners of their friends and Brethren, " "or to fall themselves by their Hands.\" "He has excited domestic insurrections amongst us, and has endeavoured to bring on the inhabitants of our frontiers, the merciless Indian Savages, whose known rule of warfare, " "is an undistinguished destruction of all ages, sexes and conditions.\" "In every stage of these Oppressions We have Petitioned for Redress in the most humble terms:Our repeated Petitions have been answered only by repeated injury. " "A Prince whose character is thus marked by every act which may define a Tyrant, is unfit to be the ruler of a free people.\" "Nor have We been wanting in attentions to our Brittish brethren. We have warned them from time to time of attempts by their legislature to extend an unwarrantable " "jurisdiction over us. We have reminded them of the circumstances of our emigration and settlement here. We have appealed to their native justice and magnanimity, " "and we have conjured them by the ties of our common kindred to disavow these usurpations, which, would inevitably interrupt our connections and correspondence. " "They too have been deaf to the voice of justice and of consanguinity. We must, therefore, acquiesce in the necessity, which denounces our Separation, and hold them, " "as we hold the rest of mankind, Enemies in War, in Peace Friends.\" "We, therefore, the Representatives of the united States of America, in General Congress, Assembled, appealing to the Supreme Judge of the world for the rectitude of " "our intentions, do, in the Name, and by Authority of the good People of these Colonies, solemnly publish and declare, That these United Colonies are, and of Right ought " "to be Free and Independent States;that they are Absolved from all Allegiance to the British Crown, and that all political connection between them and the State of Great " "Britain, is and ought to be totally dissolved;and that as Free and Independent States, they have full Power to levy War, conclude Peace, contract Alliances, establish " "Commerce, and to do all other Acts and Things which Independent States may of right do. And for the support of this Declaration, with a firm reliance on the protection of " "divine Providence, we mutually pledge to each other our Lives, our Fortunes and our sacred Honor.")
Some default text to use if standard input isn't used.
virtual bool DrawTestPattern(const std::string &inTPName, const NTV2FormatDescriptor &inFormatDesc, NTV2Buffer &inBuffer)
Renders the given test pattern or color into a host raster buffer.
virtual bool EnableChannels(const NTV2ChannelSet &inChannels, const bool inDisableOthers=(0))
Enables the given FrameStore(s).
0: Disabled (never recommended): device configured exclusively by client application(s).
virtual NTV2Line21Channel GetCaptionChannel(void) const
bool CanDoOutputDestination(const NTV2OutputDestination inDest)
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
virtual bool UnsubscribeOutputVerticalEvent(const NTV2Channel inChannel)
Unregisters me so I'm no longer notified when an output VBI is signaled on the given output channel...
std::string to_string(bool val)
static bool GetFirstDeviceFromArgument(const std::string &inArgument, CNTV2Card &outDevice)
Rescans the host, and returns an open CNTV2Card instance for the AJA device that matches a command li...
virtual string GetNextCaptionCharacter(void)
bool bGotField2Data
True if Field 2 bytes have been set; otherwise false.
virtual bool SetSDITransmitEnable(const NTV2Channel inChannel, const bool inEnable)
Sets the specified bidirectional SDI connector to act as an input or an output.
static bool BurnString(const std::string &inString, const NTV2Line21Attrs &inAttribs, NTV2Buffer &inFB, const NTV2FormatDesc &inFBDescriptor, const UWord inRowNum=15, const UWord inColumnNum=1)
Blits the contents of the given UTF-8 encoded string into the given host buffer using the given displ...
virtual bool AutoCirculateTransfer(const NTV2Channel inChannel, AUTOCIRCULATE_TRANSFER &transferInfo)
Transfers all or part of a frame as specified in the given AUTOCIRCULATE_TRANSFER object to/from the ...
virtual bool AcquireStreamForApplication(ULWord inApplicationType, int32_t inProcessID)
Reserves exclusive use of the AJA device for a given process, preventing other processes on the host ...
CEA-608 Character Attributes.
Utility class for timecodes.
Identifies the last (second) field in time for an interlaced video frame.
void SetHmsf(uint32_t h, uint32_t m, uint32_t s, uint32_t f, const AJATimeBase &timeBase, bool bDropFrame, bool bStdTcForHfr, uint32_t addFrame)
virtual std::string GetDisplayName(void)
Answers with this device's display name.
Instances of me can encode two ASCII characters into a "line 21" closed-captioning waveform...
Declares the CRP188 class. See SMPTE RP188 standard for details.
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
virtual AJAStatus Run(void)
Runs me.
virtual AJAStatus SetCEA608Bytes(const uint8_t inByte1, const uint8_t inByte2)
Set the CEA608 payload bytes.
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
void split(const std::string &str, const char delim, std::vector< std::string > &elems)
NTV2PixelFormat fPixelFormat
The pixel format to use.
NTV2Line21Channel fCapChannel
2: OEM (recommended): device configured by client application(s) with some driver involvement...
#define IsLine21TextChannel(_chan_)
virtual void GetStatus(size_t &outMessagesQueued, size_t &outBytesQueued, size_t &outTotMsgsEnq, size_t &outTotBytesEnq, size_t &outTotMsgsDeq, size_t &outTotBytesDeq, size_t &outMaxQueDepth, size_t &outDroppedFrames) const
Returns status information from my caption encoder.
The ancillary data is associated with the luminance (Y) channel of the video stream.
bool bGotField1Data
True if Field 1 bytes have been set; otherwise false.
std::vector< std::string > NTV2StringList
virtual bool IsPlainTextSource(void) const
static const uint32_t AUDIOBYTES_MAX_48K(201 *1024)
The maximum number of bytes of 48KHz audio that can be transferred for a single frame. Worst case, assuming 16 channels of audio (max), 4 bytes per sample, and 67 msec per frame (assuming the lowest possible frame rate of 14.98 fps)... 48,000 samples per second requires 3,204 samples x 4 bytes/sample x 16 = 205,056 bytes 201K will suffice, with 768 bytes to spare.
CaptionChanGenMap fCapChanGenConfigs
Caption channel generator configs.
This class handles CEA-708 SMPTE 334 packets.
virtual AJAStatus AddAncillaryData(const AJAAncillaryList &inPackets)
Appends a copy of the given list's packets to me.
virtual bool ApplySignalRoute(const CNTV2SignalRouter &inRouter, const bool inReplace=(0))
Applies the given routing table to the AJA device.
virtual bool SetSDIOutputAudioSystem(const NTV2Channel inSDIOutputConnector, const NTV2AudioSystem inAudioSystem)
Sets the device's NTV2AudioSystem that will provide audio for the given SDI output's audio embedder...
#define AsSCCSource(__x__)
NTV2VideoFormat fVideoFormat
The video format to use.
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
static const uint32_t kAppSignature(((((uint32_t)( 'C'))<< 24)|(((uint32_t)( 'C'))<< 16)|(((uint32_t)( 'P'))<< 8)|(((uint32_t)( 'L'))<< 0)))
static std::string Utf8ToCEA608String(const std::string &inUtf8Str, const NTV2Line21Channel inChannel=NTV2_CC608_CC1)
Converts the given UTF8-encoded string into a string that can be used in the CNTV2CaptionEncoder608's...
Embeds silence (zeroes) into the data stream.
virtual bool SetVANCShiftMode(NTV2Channel inChannel, NTV2VANCDataShiftMode inMode)
Enables or disables the "VANC Shift Mode" feature for the given channel.
Declares the CNTV2CaptionRenderer class.
virtual bool GetNextCaptionData(CaptionData &outCaptionData)
This high-level method is used to dequeue caption data for an entire frame.
ULWord GetDroppedFrameCount(void) const
virtual bool SetTsiFrameEnable(const bool inIsEnabled, const NTV2Channel inChannel)
Enables or disables SMPTE 425 two-sample interleave (Tsi) frame mode on the device.
virtual bool RemoveConnections(const NTV2XptConnections &inConnections)
Removes the given widget routing connections from the AJA device.
virtual void SetFinished(void)
Sets my "finished" flag.
virtual void StartPlayoutThread(void)
Starts my playout thread.
virtual bool EnqueueCaptionData(const CaptionData &inCaptionData)
This is a low-level method that enqueues the given CaptionData for eventual transmission.
Specifies the PTP source on SFP 1.
This class handles VANC-based CEA-608 caption data packets (not "analog" Line 21).
virtual AJAStatus GetVANCTransmitData(NTV2Buffer &inFrameBuffer, const NTV2FormatDescriptor &inFormatDesc)
Writes my AJAAncillaryData objects into the given tall/taller frame buffer having the given raster/fo...
bool fDoRGBOnWire
If true, produce RGB on the wire; otherwise output YUV.
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
virtual NTV2DeviceID GetDeviceID(void)
virtual string GetNextCaptionCharacter(void)
Returns the next character read from my input stream. If my text input stream has reached EOF...
virtual bool Set608CaptionData(const CaptionData &inCC608Data)
Sets the CEA-608 caption data in my private 608 data buffer.
NTV2OutputDest fOutputDest
The desired output connector to use.
virtual string GetNextCaptionRow(const bool inBreakLinesOnNewLineChars=(0))
Returns the next "sentence" read from my input stream. I build the "sentence" by reading "words" usin...
virtual size_t GetEnqueueMessageTally(void) const
Returns the total number of messages that have been enqueued onto me since I was instantiated.
3-row roll-up from bottom
virtual AJAStatus SetDIDSID(const AJAAncDIDSIDPair &inDIDSID)
Sets both my Data ID (DID) and Secondary Data ID (SID).
This class is used to configure a caption generator for a single caption channel. ...
UWord GetNumFrameStores(void)
#define NTV2_IS_VANCMODE_ON(__v__)
Declares the CNTV2DeviceScanner class.
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device...
#define NTV2_IS_625_FORMAT(__f__)
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
virtual size_t GetDequeueMessageTally(void) const
Returns the total number of messages that have been dequeued from me since I was instantiated.
virtual AJAStatus SetDataLocation(const AJAAncDataLoc &inLoc)
Sets my ancillary data "location" within the video stream.
virtual bool AutoCirculateStop(const NTV2Channel inChannel, const bool inAbort=(0))
Stops AutoCirculate for the given channel, and releases the on-device frame buffers that were allocat...
bool AddAudioTone(ULWord &outNumBytesWritten, NTV2Buffer &inAudioBuffer, ULWord &inOutCurrentSample, const ULWord inNumSamples, const double inSampleRate, const double inAmplitude, const double inFrequency, const ULWord inNumBits, const bool inByteSwap, const ULWord inNumChannels)
Fills the given buffer with 32-bit (ULWord) audio tone samples.
static CaptionSourceList GetCaptionSources(const NTV2StringList &inFilesToPlay, const double inCharsPerMinute)
Creates and returns a list of CaptionSource instances to play from a given list of paths to text file...
Declares the AJAProcess class.
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.).
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
bool fDoMultiFormat
If true, enable device-sharing; otherwise take exclusive control of device.
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 IsRGBFormat(const NTV2FrameBufferFormat format)
#define IsValidLine21Channel(_chan_)
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)
virtual bool SetAudioBufferSize(const NTV2AudioBufferSize inValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Changes the size of the audio buffer that is used for a given Audio System in the AJA device...
bool fEmitStats
If true, show stats while playing; otherwise echo caption text being played.
Declares the AJATimeCode class.
static AJALabelValuePairs & append(AJALabelValuePairs &inOutTable, const std::string &inLabel, const std::string &inValue=std::string())
A convenience function that appends the given label and value strings to the provided AJALabelValuePa...
NTV2InputXptID GetTSIMuxInputXptFromChannel(const NTV2Channel inTSIMuxer, const bool inLinkB=false)
virtual ~CaptionSource()
My destructor. If was told at construction time that I was to be responsible for deleting the input s...
bool fDoTsiRouting
If true, enable TSI routing; otherwise route for square division (4K/8K)
CaptionSourceList::const_iterator CaptionSourceListConstIter
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.
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
This identifies the first Audio System.
virtual bool EnqueuePaintOnMessage(const std::string &inMessageStr, const bool inEraseFirst=false, const NTV2Line21Channel inChannel=NTV2_CC608_CC1, const UWord inRowNumber=0, const UWord inColumnNumber=0, const NTV2Line21Attrs &inDisplayAttribs=NTV2Line21Attrs())
Enqueues the given message for eventual "paint-on" display.
#define AJA_RETAIL_DEFAULT
virtual bool WaitForOutputVerticalInterrupt(const NTV2Channel inChannel=NTV2_CHANNEL1, UWord inRepeatCount=1)
Efficiently sleeps the calling thread/process until the next one or more field (interlaced video) or ...
virtual size_t GetQueuedMessageCount(const NTV2Line21Field inFieldNum=NTV2_CC608_Field1) const
Answers with the current depth of my queue (for the given CC608 field).
virtual UByte * EncodeLine(const UByte inByte1, const UByte inByte2)
Encodes the two given characters as an EIA-608-compliant "line 21" waveform into my private line data...
NTV2SmpteLineNumber GetSmpteLineNumber(const NTV2Standard inStandard)
For the given video standard, returns the SMPTE-designated line numbers for Field 1 and Field 2 that ...
Declares the constants used for sharing debug messages. These structures are used to gather debug mes...
#define NTV2_IS_QUAD_FRAME_FORMAT(__f__)
NTV2Channel fOutputChannel
The device channel to use.
deque< CaptionSourcePtr > CaptionSourceList
I am an ordered sequence of CaptionSources.
Declares numerous NTV2 utility functions.
std::pair< uint8_t, uint8_t > AJAAncDIDSIDPair
static void CaptionGeneratorThreadStatic(AJAThread *pThread, void *pContext)
This is the caption generator thread's static callback function that gets called when the caption gen...
virtual AJAStatus Attach(AJAThreadFunction *pThreadFunction, void *pUserContext)
virtual bool DeviceAncExtractorIsAvailable(void)
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
virtual bool SetSDIOutRGBLevelAConversion(const UWord inOutputSpigot, const bool inEnable)
Enables or disables an RGB-over-3G-level-A conversion at the SDI output widget (assuming the AJA devi...
#define IsField1Line21CaptionChannel(_chan_)
The ancillary data is associated with Link A of the video stream.
static bool Create(CNTV2CaptionEncoder608Ptr &outEncoder)
Creates a new CNTV2CaptionEncoder608 instance.
This structure encapsulates all possible CEA-608 caption data bytes that may be associated with a giv...
#define NTV2_IS_QUAD_QUAD_FORMAT(__f__)
virtual bool SetSDIOutLevelAtoLevelBConversion(const UWord inOutputSpigot, const bool inEnable)
Enables or disables 3G level A to 3G level B conversion at the SDI output widget (assuming the AJA de...
virtual bool SetHDMIOutAudioSource8Channel(const NTV2Audio8ChannelSelect inNewValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Changes the HDMI output's 8-channel audio source.
NTV2OutputXptID GetFrameStoreOutputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsRGB=false, const bool inIs425=false)
ULWord GetAudioSamplesPerFrame(const NTV2FrameRate inFrameRate, const NTV2AudioRate inAudioRate, ULWord inCadenceFrame=0, bool inIsSMPTE372Enabled=false)
Returns the number of audio samples for a given video frame rate, audio sample rate, and frame number. This is useful since AJA devices use fixed audio sample rates (typically 48KHz), and some video frame rates will necessarily result in some frames having more audio samples than others.
virtual bool WriteRegister(const ULWord inRegNum, const ULWord inValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Updates or replaces all or part of the 32-bit contents of a specific register (real or virtual) on th...
virtual AJAStatus SetPayloadData(const uint8_t *pInData, const uint32_t inByteCount)
Copy data from external memory into my local payload memory.
Specifies channel or FrameStore 1 (or the first item).
virtual bool AutoCirculateStart(const NTV2Channel inChannel, const ULWord64 inStartTime=0)
Starts AutoCirculating the specified channel that was previously initialized by CNTV2Card::AutoCircul...
UWord GetNumHDMIAudioOutputChannels(void)
virtual AJAStatus GetIPTransmitData(NTV2Buffer &F1Buffer, NTV2Buffer &F2Buffer, const bool inIsProgressive=true, const uint32_t inF2StartLine=0)
Explicitly encodes my AJAAncillaryData packets into the given buffers in RTP Anc Buffer Data Format ...
4-row roll-up from bottom
virtual size_t GetDequeueByteTally(void) const
Returns the total number of bytes (including command bytes) that have been dequeued from me since I w...
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.
bool CanDoFrameBufferFormat(const NTV2PixelFormat inPF)
virtual bool SubscribeOutputVerticalEvent(const NTV2Channel inChannel)
Causes me to be notified when an output vertical blanking interrupt is generated for the given output...
virtual bool AutoCirculateInitForOutput(const NTV2Channel inChannel, const UWord inFrameCount=7, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_INVALID, const ULWord inOptionFlags=0, const UByte inNumChannels=1, const UWord inStartFrameNumber=0, const UWord inEndFrameNumber=0)
Prepares for subsequent AutoCirculate playout, designating a contiguous block of frame buffers on the...
#define xHEX0N(__x__, __n__)
const std::string & NTV2Line21ChannelToStr(const NTV2Line21Channel inLine21Channel, const bool inCompact=true)
Converts the given NTV2Line21Channel value into a human-readable string.
CaptionSource(const double inCharsPerMinute, istream *pInInputStream, const string &inFilePath, const bool inDeleteInputStream=(0))
My only constructor.
virtual bool GetFrameRate(NTV2FrameRate &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Returns the AJA device's currently configured frame rate via its "value" parameter.
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
virtual void PlayoutFrames(void)
Repeatedly plays frames (until time to quit).
static AJA_FrameRate GetAJAFrameRate(const NTV2FrameRate inFrameRate)
virtual size_t GetHighestQueueDepth(void) const
Returns the highest queue depth – i.e., the maximum number of messages I held in either of my queues...
virtual string GetNextCaptionWord(bool &outLineBreak)
Returns the next "word" read from my input stream. If my text input stream has reached EOF...
virtual ~NTV2CCPlayer(void)
bool fSuppressTimecode
If true, suppress timecode; otherwise embed VITC/LTC.
UWord GetNumLTCOutputs(void)
NTV2AudioSystem NTV2ChannelToAudioSystem(const NTV2Channel inChannel)
Converts the given NTV2Channel value into its equivalent NTV2AudioSystem.
Specifies channel or FrameStore 4 (or the 4th item).
std::string fTestPatternName
The test pattern to use.
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnection
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
This file contains some structures, constants, classes and functions that are used in some of the dem...
Specifies channel or FrameStore 5 (or the 5th item).
NTV2ACFrameRange fFrames
AutoCirculate frame count or range.
Private include file for all ajabase sources.
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
virtual bool SetSDIOutputDS2AudioSystem(const NTV2Channel inSDIOutputConnector, const NTV2AudioSystem inAudioSystem)
Sets the Audio System that will supply audio for the given SDI output's audio embedder for Data Strea...
struct NTV2Line21Attributes NTV2Line21Attrs
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
std::string join(const std::vector< std::string > &parts, const std::string &delim)
NTV2Line21Mode
The CEA-608 modes: pop-on, roll-up (2, 3 and 4-line), and paint-on.
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.
virtual bool IsFinished(void) const
void * GetHostPointer(void) const
Identifies the first field in time for an interlaced video frame, or the first and only field in a pr...
static std::string StripFormatString(const std::string &inStr)
uint32_t QueryFrame(void) const
static size_t SetDefaultPageSize(void)
AJALabelValuePairs Get(void) const
static istringstream gBuiltInStream(gBuiltInCaptions)
The global built-in caption data input stream.
virtual AJAStatus SetUpBackgroundPatternBuffer(void)
Sets up my gray background field.
virtual void GenerateCaptions(const NTV2Line21Channel inCCChannel)
This is the thread function that produces caption messages for a given caption channel.
UWord GetMaxAudioChannels(void)
bool CanDoVideoFormat(const NTV2VideoFormat inVF)
virtual bool MakeSMPTE334AncPacket(const NTV2FrameRate inFrameRate, const NTV2Line21Field inVideoField)
Generates a SMPTE-334 Ancillary data packet.
I am the principal class that stores a single SMPTE-291 SDI ancillary data packet OR the digitized co...
struct NTV2Line21Attributes NTV2Line21Attributes
CEA-608 Character Attributes.
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
virtual bool IsPlainTextSource(void) const
std::string NTV2ChannelToString(const NTV2Channel inValue, const bool inForRetailDisplay=false)
UWord GetNumVideoOutputs(void)
Declares the AJAAncillaryList class.
NTV2Line21Channel
The CEA-608 caption channels: CC1 thru CC4, TX1 thru TX4, plus XDS.
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
Declares the enumeration constants used in the ajabase library.
uint16_t fForceRTP
BIT(0):0=normal,1=forceRTP BIT(1):0=uniPkt,1=multiPkt BIT(2):0=normal,1=patchDeviceID.
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
virtual bool EnqueueRollUpMessage(const std::string &inMessageStr, const NTV2Line21Mode inRollMode=NTV2_CC608_CapModeRollUp4, const NTV2Line21Channel inChannel=NTV2_CC608_CC1, const UWord inRowNumber=NTV2_CC608_MaxRow, const UWord inColumnNumber=NTV2_CC608_MinCol, const NTV2Line21Attrs &inDisplayAttribs=NTV2Line21Attrs())
Enqueues the given message for eventual "roll up" display.
virtual void SetTextMode(const bool inIsTextMode)
Sets my text mode. If I'm in text mode, I don't do any word breaking or line/row truncation.
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inSDIOutput, const bool inIsDS2=false)
static const double gFrequencies[]
Declares the AJAAncillaryData_Cea708 class.
virtual bool SetVANCMode(const NTV2VANCMode inVancMode, const NTV2Channel inChannel=NTV2_CHANNEL1)
Sets the VANC mode for the given FrameStore.
NTV2CCPlayer(const CCPlayerConfig &inConfigData)
Constructs me using the given configuration settings.
virtual bool GetDriverVersionComponents(UWord &outMajor, UWord &outMinor, UWord &outPoint, UWord &outBuild)
Answers with the individual version components of this device's driver.
#define NTV2_IS_PROGRESSIVE_STANDARD(__s__)
virtual void SetAllowMultiRTPTransmit(const bool inAllow)
Determines if multiple RTP packets will be encoded for playout (via GetIPTransmitData). The default behavior is to transmit/encode a single RTP packet.
virtual bool SetNumberAudioChannels(const ULWord inNumChannels, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the number of audio channels to be concurrently captured or played for a given Audio System on t...
virtual void ToString(std::string &outAllLabelsAndValues) const
Answers with a multi-line string that contains the complete host system info table.
Declares device capability functions.
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inCSC, const bool inIsKey=false, const bool inIsRGB=false)
I am an ordered collection of AJAAncillaryData instances which represent one or more SMPTE 291 data p...
virtual bool EnqueuePopOnMessage(const std::string &inMessageStr, const NTV2Line21Channel inChannel=NTV2_CC608_CC1, const UWord inRowNumber=0, const UWord inColumnNumber=0, const NTV2Line21Attrs &inDisplayAttribs=NTV2Line21Attrs())
Enqueues the given message for eventual "pop-on" display.
bool CanDoMultiFormat(void)
virtual AJAStatus SetFromSMPTE334(const uint16_t *pInData, const uint32_t inNumWords, const AJAAncDataLoc &inLocInfo)
Copies payload data from an external 16-bit source into local payload memory.
#define AUTOCIRCULATE_WITH_LTC
Use this to AutoCirculate with analog LTC.
NTV2StringList::const_iterator NTV2StringListConstIter
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)
virtual string GetNextCaptionRow(const bool inBreakLines=(0))
#define NTV2_IS_4K_4096_VIDEO_FORMAT(__f__)
AJALabelValuePairs Get(const bool inCompact=(0)) const
std::string NTV2Line21AttributesToStr(const NTV2Line21Attributes inLine21Attributes)
Converts the given NTV2Line21Attributes value into a human-readable string.