20 #define HasWidgetsAnyOf(_w1,_w2,_w3) (mDevice.features().CanDoWidget(_w1) || mDevice.features().CanDoWidget(_w2) || mDevice.features().CanDoWidget(_w3)) 57 while (mPlayThread.
Active())
60 while (mCaptureThread.
Active())
85 {cerr <<
"## ERROR: Device '" << mDeviceID <<
"' cannot capture" << endl;
return AJA_STATUS_FEATURE;}
87 {cerr <<
"## ERROR: Device '" << mDeviceID <<
"' cannot playout" << endl;
return AJA_STATUS_FEATURE;}
97 cerr <<
"## ERROR: Unable to acquire device because another app (pid " <<
appPID <<
") owns it" << endl;
150 cerr <<
"Device Description: " << mDevice.
GetDescription() << endl;
153 BURNINFO(
"Configuration: " << mConfig);
166 cout <<
"## NOTE: Input source was not specified, will use " << mConfig.
ISrcStr() << endl;
176 cout <<
"## NOTE: Input FrameStore chosen to be " << mConfig.
IChStr() << endl;
210 if (tcChannel >= endNum)
242 {cerr <<
"## ERROR: This demo doesn't work with planar pixel formats" << endl;
return AJA_STATUS_UNSUPPORTED;}
244 {cerr <<
"## ERROR: NTV2_VANCDATA_8BITSHIFT_ENABLE unsupported in firmware for SD video" << endl;
return AJA_STATUS_UNSUPPORTED;}
246 {cerr <<
"## ERROR: Tall-frame VANC requires NTV2_FBF_8BIT_YCBCR or NTV2_FBF_10BIT_YCBCR pixel format" << endl;
return AJA_STATUS_UNSUPPORTED;}
248 {cerr <<
"## ERROR: Tall-frame VANC unsupported for 4K or 8K video" << endl;
return AJA_STATUS_UNSUPPORTED;}
298 cout <<
"## NOTE: Output FrameStore chosen to be " << mConfig.
OChStr() << endl;
306 const string oldChStr(mConfig.
OChStr());
309 cout <<
"## NOTE: Output " << mConfig.
ODstStr() <<
" with Anc forced FrameStore change to " 310 << mConfig.
OChStr() <<
" from " << oldChStr << endl;
320 cout <<
"## NOTE: Output destination was not specified, will use " << mConfig.
ODstStr() << endl;
399 ULWord ancBuffSizeBytes (0);
412 if (!frameData.fVideoBuffer.Allocate (vidBuffSizeBytes,
true))
414 BURNFAIL(
"Failed to allocate " <<
xHEX0N(vidBuffSizeBytes,8) <<
"-byte video buffer");
417 #ifdef NTV2_BUFFER_LOCKING 418 if (frameData.fVideoBuffer)
429 if (frameData.AudioBuffer())
430 frameData.fAudioBuffer.Fill(
ULWord(0));
434 if (!frameData.fAncBuffer.Allocate (ancBuffSizeBytes,
true))
436 BURNFAIL(
"Failed to allocate " <<
xHEX0N(ancBuffSizeBytes,8) <<
"-byte anc buffer");
440 if (!frameData.fAncBuffer2.Allocate(ancBuffSizeBytes,
true))
442 BURNFAIL(
"Failed to allocate " <<
xHEX0N(ancBuffSizeBytes,8) <<
"-byte F2 anc buffer");
446 if (frameData.AncBuffer())
447 frameData.AncBuffer().Fill(
ULWord(0));
448 if (frameData.AncBuffer2())
449 frameData.AncBuffer2().Fill(
ULWord(0));
452 mFrameDataRing.
Add(&frameData);
474 mDevice.
Connect (cscVideoInputXpt, inputOutputXpt);
475 mDevice.
Connect (fbInputXpt, cscOutputXpt);
478 mDevice.
Connect (fbInputXpt, inputOutputXpt);
495 mDevice.
Connect (cscVidInputXpt, fbOutputXpt);
496 mDevice.
Connect (outputInputXpt, cscVidOutputXpt);
497 outputXpt = cscVidOutputXpt;
500 mDevice.
Connect (outputInputXpt, outputXpt);
541 PLDBG(mTCOutputs.size() <<
" timecode destination(s): " << mTCOutputs);
575 NTV2Burn * pApp (reinterpret_cast<NTV2Burn*>(pContext));
585 ULWord goodXfers(0), badXfers(0), starves(0), noRoomWaits(0);
596 {
BURNFAIL(
"AutoCirculateInitForOutput failed"); mGlobalQuit =
true;}
619 {starves++;
continue;}
623 if (pFrameData->VideoBuffer())
624 outputXferInfo.
SetVideoBuffer (pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
625 if (pFrameData->AudioBuffer())
626 outputXferInfo.
SetAudioBuffer (pFrameData->AudioBuffer(), pFrameData->NumCapturedAudioBytes());
627 if (pFrameData->AncBuffer() || pFrameData->AncBuffer2())
628 outputXferInfo.
SetAncBuffers (pFrameData->AncBuffer(), pFrameData->AncBufferSize(), pFrameData->AncBuffer2(), pFrameData->AncBuffer2Size());
632 PLDBG(pFrameData->fTimecodes);
655 BURNNOTE(
"Thread completed: " <<
DEC(goodXfers) <<
" xfers, " <<
DEC(badXfers) <<
" failed, " 656 <<
DEC(starves) <<
" ring starves, " <<
DEC(noRoomWaits) <<
" device starves");
673 mCaptureThread.
Start();
685 NTV2Burn * pApp (reinterpret_cast<NTV2Burn*>(pContext));
698 ULWord goodXfers(0), badXfers(0), ringFulls(0), devWaits(0);
710 {
BURNFAIL(
"AutoCirculateInitForInput failed"); mGlobalQuit =
true;}
730 {ringFulls++;
continue;}
732 if (pFrameData->VideoBuffer())
733 inputXferInfo.
SetVideoBuffer (pFrameData->VideoBuffer(), pFrameData->VideoBufferSize());
734 if (pFrameData->AudioBuffer())
735 inputXferInfo.
SetAudioBuffer (pFrameData->AudioBuffer(), pFrameData->AudioBufferSize());
736 if (pFrameData->AncBuffer() || pFrameData->AncBuffer2())
737 inputXferInfo.
SetAncBuffers (pFrameData->AncBuffer(), pFrameData->AncBufferSize(), pFrameData->AncBuffer2(), pFrameData->AncBuffer2Size());
747 if (pFrameData->AncBuffer())
749 NTV2Buffer stale (pFrameData->fAncBuffer.GetHostAddress(pFrameData->fNumAncBytes),
750 pFrameData->fAncBuffer.GetByteCount() - pFrameData->fNumAncBytes);
751 stale.
Fill(uint8_t(0));
753 if (pFrameData->AncBuffer2())
755 NTV2Buffer stale (pFrameData->AncBuffer2().GetHostAddress(pFrameData->fNumAnc2Bytes),
756 pFrameData->AncBuffer2().GetByteCount() - pFrameData->fNumAnc2Bytes);
757 stale.
Fill(uint8_t(0));
760 if (pFrameData->AncBuffer() && !mConfig.
WithHanc())
762 if (pFrameData->AncBuffer2() && !mConfig.
WithHanc())
766 string timeCodeString;
772 CRP188 inputRP188Info (timecodeValue);
779 CRP188 analogRP188Info (timecodeValue);
790 frameRP188Info.GetRP188Str(timeCodeString);
811 mTCBurner.
BurnTimeCode (visibleRgn, timeCodeString.c_str(), yPercent.
Next());
828 BURNNOTE(
"Thread completed: " <<
DEC(goodXfers) <<
" xfers, " <<
DEC(badXfers) <<
" failed, " 829 <<
DEC(ringFulls) <<
" ring full(s), " <<
DEC(devWaits) <<
" device waits");
847 switch (inInputSource)
869 return regNum && mDevice.
ReadRegister(regNum, regValue) && regValue &
BIT(16);
NTV2Channel NTV2InputSourceToChannel(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2Channel value.
bool SetOutputTimeCodes(const NTV2TimeCodes &inValues)
Intended for playout, replaces the contents of my acOutputTimeCodes member.
NTV2FrameRate GetNTV2FrameRateFromVideoFormat(const NTV2VideoFormat inVideoFormat)
#define HasWidgetsAnyOf(_w1, _w2, _w3)
virtual bool SetTaskMode(const NTV2TaskMode inMode)
Sets the device's task mode.
bool fWithAnc
If true, capture & play anc data (LLBurn). Defaults to false.
virtual bool WaitForInputFieldID(const NTV2FieldID inFieldID, const NTV2Channel inChannel=NTV2_CHANNEL1)
Efficiently sleeps the calling thread/process until the next input VBI for the given field and input ...
Identifies the 4th HDMI video input.
#define NTV2_IS_VALID_TASK_MODE(__m__)
Identifies the 5th SDI video input.
virtual bool GetSDITransmitEnable(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the specified SDI connector is currently acting as a transmitter (i...
bool CanDoLTCInOnRefPort(void)
virtual AJAStatus SetupAudio(void)
Sets up everything I need for capturing and playing audio.
virtual bool SetSDIWatchdogEnable(const bool inEnable, const UWord inIndex0)
Sets the connector pair relays to be under watchdog timer control or manual control.
virtual bool SetHDMIOutAudioSource2Channel(const NTV2AudioChannelPair inNewValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the HDMI output's 2-channel audio source.
Specifies SDI input/output kinds.
static void CaptureThreadStatic(AJAThread *pThread, void *pContext)
This is the capture thread's static callback function that gets called when the capture thread runs...
Declares common types used in the ajabase library.
NTV2Channel NTV2TimecodeIndexToChannel(const NTV2TCIndex inTCIndex)
Converts the given NTV2TCIndex value into the appropriate NTV2Channel value.
virtual bool SetAudioLoopBack(const NTV2AudioLoopBack inMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Enables or disables NTV2AudioLoopBack mode for the given NTV2AudioSystem.
virtual void StartCaptureThread(void)
Starts my capture thread.
std::string ODstStr(void) const
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)
AJAStatus Add(FrameDataPtr pInFrameData)
Appends a new frame buffer to me, increasing my frame storage capacity by one frame.
The NTV2 test pattern generator.
Identifies the 2nd HDMI video input.
#define NTV2_IS_SDI_TIMECODE_INDEX(__x__)
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.
ULWord GetCapturedAudioByteCount(void) const
virtual bool IsDeviceReady(const bool inCheckValid=(0))
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
Identifies the 1st HDMI video input.
NTV2OutputDestination NTV2ChannelToOutputDestination(const NTV2Channel inChannel, const NTV2IOKinds inKinds=NTV2_IOKINDS_SDI)
Converts the given NTV2Channel value into its ordinary equivalent NTV2OutputDestination.
#define AJA_FAILURE(_status_)
virtual void StartPlayThread(void)
Starts my playout thread.
Declares the NTV2TestPatternGen class.
NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value.
NTV2InputSource NTV2ChannelToInputSource(const NTV2Channel inChannel, const NTV2IOKinds inKinds=NTV2_IOKINDS_SDI)
std::string IChStr(void) const
NTV2Burn(const BurnConfig &inConfig)
Constructs me using the given configuration settings.
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)
NTV2AudioSystem NTV2InputSourceToAudioSystem(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2AudioSystem value.
Declares the AJATime class.
virtual AJAStatus SetPriority(AJAThreadPriority priority)
Specifies HDMI input/output kinds.
FrameDataPtr StartConsumeNextBuffer(void)
The thread that's responsible for processing incoming frames – the consumer – calls this function t...
#define NTV2_FOURCC(_a_, _b_, _c_, _d_)
static const bool sShowConfig((0))
bool CanAcceptMoreOutputFrames(void) const
#define NTV2_IS_VALID_OUTPUT_DEST(_dest_)
This identifies the mode in which there are some + extra VANC lines in the frame buffer.
virtual bool SetAudioRate(const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the NTV2AudioRate for the given Audio System.
virtual AJAStatus Start()
virtual bool EnableInputInterrupt(const NTV2Channel channel=NTV2_CHANNEL1)
Allows the CNTV2Card instance to wait for and respond to input vertical blanking interrupts originati...
virtual bool SubscribeInputVerticalEvent(const NTV2Channel inChannel=NTV2_CHANNEL1)
Causes me to be notified when an input vertical blanking interrupt occurs on the given input channel...
void EndConsumeNextBuffer(void)
The consumer thread calls this function to signal that it has finished processing the frame it obtain...
bool WithTimecode(void) const
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
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.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Identifies the 8th SDI video input.
virtual class DeviceCapabilities & features(void)
bool CanDoInputSource(const NTV2InputSource inSrc)
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 EnableOutputInterrupt(const NTV2Channel channel=NTV2_CHANNEL1)
Allows the CNTV2Card instance to wait for and respond to output vertical blanking interrupts originat...
virtual bool SetMultiFormatMode(const bool inEnable)
Enables or disables multi-format (per channel) device operation. If enabled, each device channel can ...
static bool StripNativeInserterGUMPPackets(const NTV2Buffer &inSrc, NTV2Buffer &outDst)
Copies GUMP from inSrc to outDst buffers, but removes ATC, VPID, VITC, EDH & raw/analog 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...
bool CanDoCustomAnc(void)
Identifies the 2nd SDI video input.
bool IsProgressivePicture(const NTV2VideoFormat format)
virtual bool ClearRouting(void)
Removes all existing signal path connections between any and all widgets on the AJA device...
NTV2ACFrameRange fOutputFrames
Playout frame count or range.
virtual bool GetRP188Data(const NTV2Channel inSDIInput, NTV2_RP188 &outRP188Data)
Reads the raw RP188 data from the DBB/Low/Hi registers for the given SDI input. On newer devices with...
This struct replaces the old RP188_STRUCT.
ULWord GetNumVideoChannels(void)
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.
#define NTV2_IS_ANALOG_TIMECODE_INDEX(__x__)
#define NTV2_AUDIOSIZE_MAX
UWord GetNumAudioSystems(void)
virtual bool IsRemote(void) const
NTV2OutputDest fOutputDest
The device output connector to use (NTV2_OUTPUTDESTINATION_INVALID means unspecified) ...
NTV2Channel ISrcCh(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.
virtual bool SetAudioSystemInputSource(const NTV2AudioSystem inAudioSystem, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedInput)
Sets the audio source for the given NTV2AudioSystem on the device.
virtual bool KickSDIWatchdog(void)
Restarts the countdown timer to prevent the watchdog timer from timing out.
NTV2OutputXptID GetInputSourceOutputXpt(const NTV2InputSource inInputSource, const bool inIsSDI_DS2=false, const bool inIsHDMI_RGB=false, const UWord inHDMI_Quadrant=0)
NTV2PixelFormat fPixelFormat
The pixel format to use.
static AJA_PixelFormat GetAJAPixelFormat(const NTV2PixelFormat inFormat)
NTV2Channel fOutputChannel
The output channel to use.
NTV2FrameRate
Identifies a particular video frame rate.
virtual bool SetLTCInputEnable(const bool inEnable)
Enables or disables the ability for the device to read analog LTC on the reference input connector...
virtual CNTV2DriverInterface & driverInterface(void)
virtual bool DrawTestPattern(const std::string &inTPName, const NTV2FormatDescriptor &inFormatDesc, NTV2Buffer &inBuffer)
Renders the given test pattern or color into a host raster buffer.
0: Disabled (never recommended): device configured exclusively by client application(s).
virtual std::string GetDescription(void) const
virtual bool InputSignalHasTimecode(void)
Returns true if the current input signal has timecode embedded in it; otherwise returns false...
static const uint32_t kAppSignature(((((uint32_t)( 'B'))<< 24)|(((uint32_t)( 'u'))<< 16)|(((uint32_t)( 'r'))<< 8)|(((uint32_t)( 'n'))<< 0)))
static TimecodeFormat NTV2FrameRate2TimecodeFormat(const NTV2FrameRate inFrameRate)
bool WithTallVANC(void) const
NTV2InputXptID GetOutputDestInputXpt(const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2=false, const UWord inHDMI_Quadrant=99)
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)
const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus(void) const
Returns a constant reference to my AUTOCIRCULATE_TRANSFER_STATUS.
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 SetRP188SourceFilter(const NTV2Channel inSDIInput, const UWord inFilterValue)
Sets the RP188 DBB filter for the given SDI input.
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 ...
ULWord GetProcessedFrameCount(void) const
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.
Header file for the NTV2Burn demonstration class.
virtual void Quit(void)
Gracefully stops me from running.
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 bool ReadAnalogLTCInput(const UWord inLTCInput, RP188_STRUCT &outRP188Data)
Reads the current contents of the device's analog LTC input registers.
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...
Identifies the 3rd SDI video input.
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inCSC, const bool inIsKeyInput=false)
bool WithHanc(void) const
virtual NTV2VideoFormat GetInputVideoFormat(const NTV2InputSource inVideoSource=NTV2_INPUTSOURCE_SDI1, const bool inIsProgressive=(0))
Returns the video format of the signal that is present on the given input source. ...
static void Sleep(const int32_t inMilliseconds)
Suspends execution of the current thread for a given number of milliseconds.
This selects audio channels 1 and 2 (Group 1 channels 1 and 2)
static ULWord GetRP188RegisterForInput(const NTV2InputSource inInputSource)
2: OEM (recommended): device configured by client application(s) with some driver involvement...
NTV2InputXptID GetFrameStoreInputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsBInput=false)
static size_t DefaultPageSize(void)
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...
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
virtual void CaptureFrames(void)
Repeatedly captures frames using AutoCirculate (until global quit flag set).
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.
Configures an NTV2Burn or NTV2FieldBurn instance.
Specifies channel or FrameStore 8 (or the 8th item).
AJA_EXPORT bool RenderTimeCodeFont(AJA_PixelFormat pixelFormat, uint32_t numPixels, uint32_t numLines)
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
Specifies channel or FrameStore 2 (or the 2nd item).
virtual NTV2DeviceID GetDeviceID(void)
std::string NTV2TCIndexToString(const NTV2TCIndex inValue, const bool inCompactDisplay=false)
bool ISrcIsSDI(void) const
virtual void GetStatus(AUTOCIRCULATE_STATUS &outInputStatus, AUTOCIRCULATE_STATUS &outOutputStatus)
Provides status information about my input (capture) and output (playout) processes.
UWord GetNumFrameStores(void)
Declares the CNTV2DeviceScanner class.
bool IsVerbose(void) const
Identifies the 4th SDI video input.
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...
std::string fDeviceSpec
The AJA device to use.
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
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...
#define NTV2_IS_VALID_CHANNEL(__x__)
Declares the AJAProcess class.
virtual void RouteInputSignal(void)
Sets up board routing for capture.
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).
virtual bool UnsubscribeInputVerticalEvent(const NTV2Channel inChannel=NTV2_CHANNEL1)
Unregisters me so I'm no longer notified when an input VBI is signaled on the given input channel...
std::string OChStr(void) const
uint16_t GetEndFrame(void) const
NTV2InputSource
Identifies a specific video input source.
bool IsRGBFormat(const NTV2FrameBufferFormat format)
Identifies the 6th SDI video input.
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
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...
static bool GetWidgetForInput(const NTV2InputXptID inInputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified input crosspoint.
I capture frames from a video signal provided to an AJA device's video input. I burn timecode into th...
void EndProduceNextBuffer(void)
The producer thread calls this function to signal that it has finished populating the frame it obtain...
virtual AJAStatus Run(void)
Runs me.
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 ...
bool WithAudio(void) const
#define NTV2_IS_VALID_INPUT_SOURCE(_inpSrc_)
Identifies the 7th SDI video input.
static const size_t CIRCULAR_BUFFER_SIZE(10)
Number of NTV2FrameData's in our ring.
virtual bool SetSDIWatchdogTimeout(const ULWord inValue)
Specifies the amount of time that must elapse before the watchdog timer times out.
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...
NTV2OutputCrosspointID
Identifies a widget output, a signal source, that potentially can drive another widget's input (ident...
NTV2InputCrosspointID
Identifies a widget input that potentially can accept a signal emitted from another widget's output (...
Identifies the "normal" Field 2 ancillary data region.
bool fDoMultiFormat
If true, enables device-sharing; otherwise takes exclusive control of the device. ...
bool GetInputTimeCodes(NTV2TimeCodeList &outValues) const
Intended for capture, answers with the timecodes captured in my acTransferStatus member's acFrameStam...
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
NTV2OutputXptID GetFrameStoreOutputXptFromChannel(const NTV2Channel inFrameStore, const bool inIsRGB=false, const bool inIs425=false)
NTV2ACFrameRange fInputFrames
Ingest frame count or range.
bool fSuppressVideo
If true, suppress video; otherwise include video.
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...
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__)
bool CanDoWidget(const NTV2WidgetID inWgtID)
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
Identifies the 3rd HDMI video input.
bool SetAncBuffers(ULWord *pInANCBuffer, const ULWord inANCByteCount, ULWord *pInANCF2Buffer=NULL, const ULWord inANCF2ByteCount=0)
Sets my ancillary data buffers for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
NTV2Channel ODstCh(void) const
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.
bool HasAvailableInputFrame(void) const
Specifies channel or FrameStore 4 (or the 4th item).
NTV2InputSource NTV2TimecodeIndexToInputSource(const NTV2TCIndex inTCIndex)
Converts the given NTV2TCIndex value into the appropriate NTV2InputSource value.
NTV2Channel fInputChannel
The input channel to use.
enum NTV2InputCrosspointID NTV2InputXptID
Specifies channel or FrameStore 5 (or the 5th item).
Identifies the first analog video input.
NTV2TCIndex fTimecodeSource
Timecode source to use.
bool GetRP188Reg(RP188_STRUCT &outRP188) const
bool IsRunning(void) const
std::string ISrcStr(void) const
NTV2AudioSource NTV2InputSourceToAudioSource(const NTV2InputSource inInputSource)
virtual AJAStatus SetupVideo(void)
Sets up everything I need for capturing and playing video.
Identifies the first field in time for an interlaced video frame, or the first and only field in a pr...
static size_t SetDefaultPageSize(void)
virtual bool DisableRP188Bypass(const NTV2Channel inSDIOutput)
Configures the SDI output's embedder to embed SMPTE 12M timecode specified in calls to CNTV2Card::Set...
This identifies the 2nd Audio System.
ULWord GetCapturedAncByteCount(const bool inField2=false) const
Specifies channel or FrameStore 6 (or the 6th item).
UWord GetMaxAudioChannels(void)
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
virtual bool AutoCirculateInitForInput(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 ingest, designating a contiguous block of frame buffers on the ...
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
UWord GetNumVideoOutputs(void)
Specifies channel or FrameStore 7 (or the 7th item).
bool GetRP188Str(std::string &sRP188) const
Declares the AJAAncillaryList class.
bool SetAudioBuffer(ULWord *pInAudioBuffer, const ULWord inAudioByteCount)
Sets my audio buffer for use in a subsequent call to CNTV2Card::AutoCirculateTransfer.
virtual void PlayFrames(void)
Repeatedly plays out frames using AutoCirculate (until global quit flag set).
virtual bool AnalogLTCInputHasTimecode(void)
Returns true if there is a valid LTC signal on my device's primary analog LTC input port; otherwise r...
Identifies the 1st SDI video input.
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inSDIOutput, const bool inIsDS2=false)
virtual bool SetVANCMode(const NTV2VANCMode inVancMode, const NTV2Channel inChannel=NTV2_CHANNEL1)
Sets the VANC mode for the given FrameStore.
virtual bool GetStreamingApplication(ULWord &outAppType, int32_t &outProcessID)
Answers with the four-CC type and process ID of the application that currently "owns" the AJA device ...
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 RouteOutputSignal(void)
Sets up board routing for playout.
enum NTV2OutputCrosspointID NTV2OutputXptID
uint16_t GetStartFrame(void) const
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inCSC, const bool inIsKey=false, const bool inIsRGB=false)
virtual bool WaitForInputVerticalInterrupt(const NTV2Channel inChannel=NTV2_CHANNEL1, UWord inRepeatCount=1)
Efficiently sleeps the calling thread/process until the next one or more field (interlaced video) or ...
bool WithVideo(void) const
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.
Specifies channel or FrameStore 3 (or the 3rd item).
bool ODstIsSDI(void) const
virtual AJAStatus SetupHostBuffers(void)
Sets up my circular buffers.
NTV2InputSource fInputSource
The device input connector to use.
virtual bool EnableChannel(const NTV2Channel inChannel)
Enables the given FrameStore.