23 #define TCFAIL(_expr_) AJA_sERROR (AJA_DebugUnit_TimecodeGeneric, AJAFUNC << ": " << _expr_) 24 #define TCWARN(_expr_) AJA_sWARNING(AJA_DebugUnit_TimecodeGeneric, AJAFUNC << ": " << _expr_) 25 #define TCNOTE(_expr_) AJA_sNOTICE (AJA_DebugUnit_TimecodeGeneric, AJAFUNC << ": " << _expr_) 26 #define TCINFO(_expr_) AJA_sINFO (AJA_DebugUnit_TimecodeGeneric, AJAFUNC << ": " << _expr_) 27 #define TCDBG(_expr_) AJA_sDEBUG (AJA_DebugUnit_TimecodeGeneric, AJAFUNC << ": " << _expr_) 49 static const double gFrequencies [] = {250.0, 500.0, 1000.0, 2000.0};
51 static const double gAmplitudes [] = { 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85,
52 0.85, 0.80, 0.75, 0.70, 0.65, 0.60, 0.55, 0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.20, 0.15, 0.10};
63 mToneFrequency (440.0),
90 while (mProducerThread.
Active())
93 while (mConsumerThread.
Active())
96 #if defined(NTV2_BUFFER_LOCKING) 98 #endif // NTV2_BUFFER_LOCKING 129 <<
" -- only supports Ch1" << (maxNumChannels > 1 ? string(
"-Ch") + string(1,
char(maxNumChannels+
'0')) :
"") << endl;
136 cerr <<
"## ERROR: Anc data file '" << mConfig.
fAncDataFilePath <<
"' not found" << endl;
175 {cerr <<
"## ERROR: RenderTimeCodeFont failed for: " << mFormatDesc << endl;
return AJA_STATUS_UNSUPPORTED;}
181 cerr <<
"Device Description: " << mDevice.
GetDescription() << endl;
183 #endif // defined(_DEBUG) 195 { cerr <<
"## ERROR: '" << mDevice.
GetDisplayName() <<
"' doesn't support " 200 { cerr <<
"## ERROR: '" << mDevice.
GetDisplayName() <<
"' doesn't support " 209 {cerr <<
"## ERROR: No CSC for channel " <<
DEC(mConfig.
fOutputChannel+1) <<
" to convert RGB pixel format" << endl;
263 if (numAudioChannels > 8)
266 numAudioChannels = 8;
324 #ifdef NTV2_BUFFER_LOCKING 325 if (frameData.fVideoBuffer)
336 #ifdef NTV2_BUFFER_LOCKING 337 if (frameData.fAudioBuffer)
340 mFrameDataRing.
Add (&frameData);
350 vector<NTV2TestPatternSelect> testPatIDs;
360 mTestPatRasters.clear();
361 for (
size_t tpNdx(0); tpNdx < testPatIDs.size(); tpNdx++)
370 for (
size_t tpNdx(0); tpNdx < testPatIDs.size(); tpNdx++)
374 {
PLFAIL(
"Test pattern buffer " <<
DEC(tpNdx+1) <<
" of " <<
DEC(testPatIDs.size()) <<
": " 381 if (!testPatternGen.
DrawTestPattern (testPatIDs.at(tpNdx), mFormatDesc, mTestPatRasters.at(tpNdx)))
383 cerr <<
"## ERROR: DrawTestPattern " <<
DEC(tpNdx) <<
" failed: " << mFormatDesc << endl;
387 #ifdef NTV2_BUFFER_LOCKING 390 PLWARN(
"Test pattern buffer " <<
DEC(tpNdx+1) <<
" of " <<
DEC(testPatIDs.size()) <<
": failed to pre-lock");
404 UWord connectFailures (0);
421 if (!mDevice.
Connect (cscInputXpt, fsVidOutXpt, canVerify))
451 PLWARN(
DEC(connectFailures) <<
" 'Connect' call(s) failed");
452 return connectFailures == 0;
476 mConsumerThread.
Start();
486 NTV2Player * pApp (reinterpret_cast<NTV2Player*>(pContext));
501 ULWord goodXfers(0), badXfers(0), starves(0), noRoomWaits(0);
514 if (!pAncStrm->good())
516 delete pAncStrm; pAncStrm =
AJA_NULL;
520 if (pAncStrm->tellg() == -1)
521 {
PLFAIL(
"Cannot determine anc file size -- anc insertion disabled");
522 delete pAncStrm; pAncStrm =
AJA_NULL;
529 <<
" -- anc insertion disabled");
530 delete pAncStrm; pAncStrm =
AJA_NULL;
540 " allocation failed -- anc insertion disabled");
551 #ifdef NTV2_BUFFER_LOCKING 552 if (outputXferInfo.acANCBuffer)
554 if (outputXferInfo.acANCField2Buffer)
561 {
PLFAIL(
"AutoCirculateInitForOutput failed"); mGlobalQuit =
true;}
584 {starves++;
continue;}
588 if (pFrameData->VideoBuffer())
589 outputXfer.
SetVideoBuffer (pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
590 if (pFrameData->AudioBuffer())
591 outputXfer.
SetAudioBuffer (pFrameData->AudioBuffer(), pFrameData->fNumAudioBytes);
593 if (pAncStrm && pAncStrm->good() && outputXfer.
acANCBuffer)
606 PLDBG(
"Anc file rewound: " <<
DEC(goodXfers) <<
" goodXfers, " <<
DEC(badXfers) <<
" badXfers");
631 PLNOTE(
"Thread completed: " <<
DEC(goodXfers) <<
" xfers, " <<
DEC(badXfers) <<
" failed, " 632 <<
DEC(starves) <<
" starves, " <<
DEC(noRoomWaits) <<
" VBI waits");
648 mProducerThread.
Start();
655 NTV2Player * pApp (reinterpret_cast<NTV2Player*>(pContext));
664 ULWord freqNdx(0), testPatNdx(0), badTally(0);
665 double timeOfLastSwitch (0.0);
684 if (pFrameData->VideoBuffer())
685 pFrameData->fVideoBuffer.CopyFrom (mTestPatRasters.at(testPatNdx),
688 pFrameData->fVideoBuffer.GetByteCount());
690 const CRP188 rp188Info (mCurrentFrame++, 0, 0, 10, tcFormat);
701 if (isPAL) tcF2.
fHi |=
BIT(27);
else tcF2.
fLo |=
BIT(27);
708 if (pFrameData->VideoBuffer())
709 mTCBurner.
BurnTimeCode (pFrameData->VideoBuffer(), tcString.c_str(), 80);
710 TCDBG(
"F" <<
DEC0N(mCurrentFrame-1,6) <<
": " << tcF1 <<
": " << tcString);
713 if (pFrameData->AudioBuffer())
714 pFrameData->fNumAudioBytes =
AddTone(*pFrameData);
718 if (currentTime > timeOfLastSwitch + 4.0)
721 testPatNdx = (testPatNdx + 1) %
ULWord(mTestPatRasters.size());
723 timeOfLastSwitch = currentTime;
725 PLDBG(
"F" <<
DEC0N(mCurrentFrame,6) <<
": " << tcString <<
": tone=" << mToneFrequency <<
"Hz, pattern='" 728 PLDBG(
"F" <<
DEC0N(mCurrentFrame,6) <<
": " << tcString <<
": tone=" << mToneFrequency <<
"Hz, pattern='" 729 << tpNames.at(testPatNdx) <<
"'");
736 PLNOTE(
"Thread completed: " <<
DEC(mCurrentFrame) <<
" frame(s) produced, " <<
DEC(badTally) <<
" failed");
753 pFrequencies[0] = (mToneFrequency / 2.0);
754 for (
ULWord chan(1); chan < numChannels; chan++)
757 pFrequencies[chan] = pFrequencies[chan-1] * 1.154782;
bool SetOutputTimeCodes(const NTV2TimeCodes &inValues)
Intended for playout, replaces the contents of my acOutputTimeCodes member.
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
virtual void StartProducerThread(void)
Starts my producer thread.
double FramesToSeconds(int64_t frames) const
virtual bool SetTaskMode(const NTV2TaskMode inMode)
Sets the device's task mode.
#define NTV2_IS_VALID_TASK_MODE(__m__)
static const uint32_t gAudMaxSizeBytes(256 *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 min will suffice, with 768 bytes to spare But it could be more efficient for page-aligned (and page-locked) memory to round to 256K.
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...
virtual bool SetAudioLoopBack(const NTV2AudioLoopBack inMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Enables or disables NTV2AudioLoopBack mode for the given NTV2AudioSystem.
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...
virtual AJAStatus SetUpTestPatternBuffers(void)
Creates my test pattern buffers.
AJAStatus Add(FrameDataPtr pInFrameData)
Appends a new frame buffer to me, increasing my frame storage capacity by one frame.
The NTV2 test pattern generator.
#define DEC0N(__x__, __n__)
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 IsDeviceReady(const bool inCheckValid=(0))
#define AJA_FAILURE(_status_)
Declares the NTV2TestPatternGen class.
#define NTV2_VIDEO_FORMAT_HAS_PROGRESSIVE_PICTURE(__f__)
virtual bool GetAudioRate(NTV2AudioRate &outRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Returns the current NTV2AudioRate for the given Audio System.
ULWord GetByteCount(void) const
virtual bool DMAWriteFrame(const ULWord inFrameNumber, const ULWord *pInFrameBuffer, const ULWord inByteCount)
Transfers a single frame from the host to the AJA device.
UWord GetNumHDMIVideoOutputs(void)
virtual AJAStatus SetPriority(AJAThreadPriority priority)
FrameDataPtr StartConsumeNextBuffer(void)
The thread that's responsible for processing incoming frames – the consumer – calls this function t...
if(!(riid==IID_IUnknown) &&!(riid==IID_IClassFactory))
bool CanAcceptMoreOutputFrames(void) const
#define NTV2_IS_2K_1080_VIDEO_FORMAT(__f__)
bool CanDoFrameStore1Display(void)
bool fDoABConversion
If true, do level-A/B conversion; otherwise don't.
virtual bool SetAudioRate(const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the NTV2AudioRate for the given Audio System.
virtual AJAStatus Start()
void EndConsumeNextBuffer(void)
The consumer thread calls this function to signal that it has finished processing the frame it obtain...
Declares common audio macros and structs used in the SDK.
std::string fDeviceSpec
The AJA device to use.
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
static void ProducerThreadStatic(AJAThread *pThread, void *pContext)
This is the producer thread's static callback function that gets called when the producer thread star...
virtual bool GetEnabledChannels(NTV2ChannelSet &outChannels)
Answers with the set of channels that are currently enabled.
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.
virtual class DeviceCapabilities & features(void)
virtual bool GetAncRegionOffsetFromBottom(ULWord &outByteOffsetFromBottom, const NTV2AncillaryDataRegion inAncRegion=NTV2_AncRgn_All)
Answers with the byte offset to the start of an ancillary data region within a device frame buffer...
virtual bool SetMultiFormatMode(const bool inEnable)
Enables or disables multi-format (per channel) device operation. If enabled, each device channel can ...
virtual bool ClearRouting(void)
Removes all existing signal path connections between any and all widgets on the AJA device...
Declares the AJATimeBase class.
This struct replaces the old RP188_STRUCT.
static const double gFrequencies[]
NTV2TCIndex NTV2ChannelToTimecodeIndex(const NTV2Channel inChannel, const bool inEmbeddedLTC=false, const bool inIsF2=false)
Converts the given NTV2Channel value into the equivalent NTV2TCIndex value.
UWord GetNumAudioSystems(void)
virtual bool IsRemote(void) const
virtual bool GetTaskMode(NTV2TaskMode &outMode)
Retrieves the device's current task mode.
bool WithAudio(void) const
virtual bool SetHDMIOutAudioRate(const NTV2AudioRate inNewValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the HDMI output's audio rate.
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
static AJA_PixelFormat GetAJAPixelFormat(const NTV2PixelFormat inFormat)
This selects audio channels 1 thru 8.
NTV2FrameRate
Identifies a particular video frame rate.
bool fTransmitLTC
If true, embed LTC; otherwise embed VITC.
virtual bool DrawTestPattern(const std::string &inTPName, const NTV2FormatDescriptor &inFormatDesc, NTV2Buffer &inBuffer)
Renders the given test pattern or color into a host raster buffer.
NTV2Standard
Identifies a particular video standard.
virtual std::string GetDescription(void) const
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
static const ULWord gNumFrequencies(sizeof(gFrequencies)/sizeof(double))
#define NTV2_IS_PAL_VIDEO_FORMAT(__f__)
NTV2InputXptID GetOutputDestInputXpt(const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2=false, const UWord inHDMI_Quadrant=99)
virtual bool IsOpen(void) const
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...
#define NTV2_IS_ATC_VITC2_TIMECODE_INDEX(__x__)
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 bool SetSDITransmitEnable(const NTV2Channel inChannel, const bool inEnable)
Sets the specified bidirectional SDI connector to act as an input or an output.
bool HasBiDirectionalSDI(void)
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 ...
virtual bool DMABufferLock(const NTV2Buffer &inBuffer, bool inMap=(0), bool inRDMA=(0))
Page-locks the given host buffer to reduce transfer time and CPU usage of DMA transfers.
Declares the AJAFileIO class.
void SetAbortFlag(const bool *pAbortFlag)
Tells me the boolean variable I should monitor such that when it gets set to "true" will cause any th...
virtual std::string GetDisplayName(void)
Answers with this device's display name.
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
NTV2PixelFormat fPixelFormat
The pixel format to use.
virtual void ProduceFrames(void)
My producer thread that repeatedly produces video frames.
2: OEM (recommended): device configured by client application(s) with some driver involvement...
std::vector< std::string > NTV2StringList
static const double gAmplitudes[]
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...
virtual uint32_t AddTone(NTV2FrameData &inFrameData)
Inserts audio tone (based on my current tone frequency) into the given NTV2FrameData's audio buffer...
virtual AJAStatus SetUpAudio(void)
Performs all audio setup.
NTV2VideoFormat fVideoFormat
The video format to use.
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
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.
static ULWord gAncMaxSizeBytes(NTV2_ANCSIZE_MAX)
The maximum number of bytes of ancillary data that can be transferred for a single field...
AJA_EXPORT bool RenderTimeCodeFont(AJA_PixelFormat pixelFormat, uint32_t numPixels, uint32_t numLines)
virtual bool DMABufferUnlockAll()
Unlocks all previously-locked buffers used for DMA transfers.
Specifies the PTP source on SFP 1.
bool IsVideoFormatA(const NTV2VideoFormat format)
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
Specifies channel or FrameStore 2 (or the 2nd item).
virtual AJAStatus SetUpVideo(void)
Performs all video setup.
virtual void ConsumeFrames(void)
My consumer thread that repeatedly plays frames using AutoCirculate (until quit). ...
UWord GetNumFrameStores(void)
Declares the CNTV2DeviceScanner class.
bool CanDo3GLevelConversion(void)
NTV2Player(const PlayerConfig &inConfig)
Constructs me using the given configuration settings.
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.
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.).
virtual bool Connect(const NTV2InputCrosspointID inInputXpt, const NTV2OutputCrosspointID inOutputXpt, const bool inValidate=(0))
Connects the given widget signal input (sink) to the given widget signal output (source).
bool fDoMultiFormat
If true, enable device-sharing; otherwise take exclusive control of device.
static NTV2TestPatternNames getTestPatternNames(void)
uint16_t GetEndFrame(void) const
NTV2Buffer & AudioBuffer(void)
bool IsRGBFormat(const NTV2FrameBufferFormat format)
virtual AJAStatus SetUpHostBuffers(void)
Sets up my host video & audio buffers.
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
static const bool BUFFER_PAGE_ALIGNED((!(0)))
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...
virtual bool GetNumberAudioChannels(ULWord &outNumChannels, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Returns the current number of audio channels being captured or played by a given Audio System on the ...
I play out SD or HD test pattern (with timecode) to an output of an AJA device with or without audio ...
virtual ~NTV2Player(void)
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.
void EndProduceNextBuffer(void)
The producer thread calls this function to signal that it has finished populating the frame it obtain...
This identifies the first Audio System.
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 ...
NTV2Channel fOutputChannel
The device channel to use.
static const size_t CIRCULAR_BUFFER_SIZE(10)
Number of NTV2FrameData's in our ring.
static const ULWord kDemoAppSignature((((uint32_t)( 'D'))<< 24)|(((uint32_t)( 'E'))<< 16)|(((uint32_t)( 'M'))<< 8)|(((uint32_t)( 'O'))<< 0))
virtual bool DisableChannels(const NTV2ChannelSet &inChannels)
Disables the given FrameStore(s).
virtual AJAStatus Attach(AJAThreadFunction *pThreadFunction, void *pUserContext)
FrameDataPtr StartProduceNextBuffer(void)
The thread that's responsible for providing frames – the producer – calls this function to populate...
double GetAudioSamplesPerSecond(const NTV2AudioRate inAudioRate)
Returns the audio sample rate as a number of audio samples per second.
Identifies the "normal" Field 2 ancillary data region.
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.
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
NTV2OutputXptID GetFrameStoreOutputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsRGB=false, const bool inIs425=false)
virtual bool SetHDMIOutAudioFormat(const NTV2AudioFormat inNewValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the HDMI output's audio format.
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.
Specifies channel or FrameStore 1 (or the first item).
static bool FileExists(const std::wstring &fileName)
virtual bool AutoCirculateStart(const NTV2Channel inChannel, const ULWord64 inStartTime=0)
Starts AutoCirculating the specified channel that was previously initialized by CNTV2Card::AutoCircul...
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 AJAStatus Run(void)
Runs me.
virtual void Quit(void)
Gracefully stops me from running.
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__)
UWord GetNumAnalogVideoOutputs(void)
virtual bool GetFrameRate(NTV2FrameRate &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Returns the AJA device's currently configured frame rate via its "value" parameter.
static AJA_FrameRate GetAJAFrameRate(const NTV2FrameRate inFrameRate)
static uint64_t sTotalAncFileBytes(0)
AJA_EXPORT bool BurnTimeCode(void *pBaseVideoAddress, const std::string &inTimeCodeStr, const uint32_t inYPercent)
I encapsulate the video, audio and anc host buffers used in the AutoCirculate demos. I'm a more modern version of the AVDataBuffer.
NTV2AudioSystem NTV2ChannelToAudioSystem(const NTV2Channel inChannel)
Converts the given NTV2Channel value into its equivalent NTV2AudioSystem.
enum NTV2InputCrosspointID NTV2InputXptID
NTV2ACFrameRange fFrames
AutoCirculate frame count or range.
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...
Configures an NTV2Player instance.
bool GetRP188Reg(RP188_STRUCT &outRP188) const
ULWord fLo
| BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
virtual bool RouteOutputSignal(void)
Performs all widget/signal routing for playout.
static uint64_t sCurrentAncFileBytes(0)
static size_t SetDefaultPageSize(void)
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
UWord GetMaxAudioChannels(void)
bool CanDoVideoFormat(const NTV2VideoFormat inVF)
bool HasCrosspointConnectROM(void)
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
virtual void StartConsumerThread(void)
Starts my consumer thread.
const char * NTV2FrameBufferFormatString(NTV2FrameBufferFormat fmt)
bool GetRP188Str(std::string &sRP188) const
bool WithVideo(void) const
virtual void GetACStatus(AUTOCIRCULATE_STATUS &outStatus)
Provides status information about my output (playout) process.
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
virtual bool SetSDIOutputStandard(const UWord inOutputSpigot, const NTV2Standard inValue)
Sets the SDI output spigot's video standard.
NTV2Buffer acANCBuffer
The host ancillary data buffer. This field is owned by the client application, and thus is responsibl...
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inSDIOutput, const bool inIsDS2=false)
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
virtual bool SetVANCMode(const NTV2VANCMode inVancMode, const NTV2Channel inChannel=NTV2_CHANNEL1)
Sets the VANC mode for the given FrameStore.
static void ConsumerThreadStatic(AJAThread *pThread, void *pContext)
This is the consumer thread's static callback function that gets called when the consumer thread star...
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...
ULWord fHi
| BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
enum NTV2OutputCrosspointID NTV2OutputXptID
uint16_t GetStartFrame(void) const
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inCSC, const bool inIsKey=false, const bool inIsRGB=false)
bool CanDoMultiFormat(void)
This identifies the mode in which there are no VANC lines in the frame buffer.
bool SetVideoBuffer(ULWord *pInVideoBuffer, const ULWord inVideoByteCount)
Sets my video buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
std::string fAncDataFilePath
Optional path to Anc binary data file to playout.
virtual bool EnableChannel(const NTV2Channel inChannel)
Enables the given FrameStore.