AJA NTV2 SDK  18.1.0.2505
NTV2 SDK 18.1.0.2505
AUTOCIRCULATE_STATUS Class Reference

This is returned from the CNTV2Card::AutoCirculateGetStatus function. More...

#include <ntv2publicinterface.h>

Collaboration diagram for AUTOCIRCULATE_STATUS:
[legend]

Public Member Functions

 AUTOCIRCULATE_STATUS (const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_CHANNEL1)
 Constructs a default AUTOCIRCULATE_STATUS struct for the given NTV2Crosspoint. More...
 
bool CopyTo (AUTOCIRCULATE_STATUS_STRUCT &outOldStruct)
 Copies my data into the given AUTOCIRCULATE_STATUS_STRUCT. More...
 
bool CopyFrom (const AUTOCIRCULATE_STATUS_STRUCT &inOldStruct)
 Copies the given AUTOCIRCULATE_STATUS_STRUCT into me. More...
 
void Clear (void)
 Clears my data. More...
 
ULWord GetFrameCount (void) const
 
ULWord GetDroppedFrameCount (void) const
 
ULWord GetProcessedFrameCount (void) const
 
ULWord GetBufferLevel (void) const
 
ULWord GetNumAvailableOutputFrames (void) const
 
bool CanAcceptMoreOutputFrames (void) const
 
bool HasAvailableInputFrame (void) const
 
LWord GetActiveFrame (void) const
 
uint16_t GetStartFrame (void) const
 
uint16_t GetEndFrame (void) const
 
NTV2AutoCirculateState GetState (void) const
 
NTV2AudioSystem GetAudioSystem (void) const
 
bool IsRunning (void) const
 
bool IsStarting (void) const
 
bool IsStopped (void) const
 
bool IsStopping (void) const
 
bool IsPaused (void) const
 
bool WithAudio (void) const
 
ULWord OptionFlags (void) const
 
bool WithCustomAnc (void) const
 
bool WithRP188 (void) const
 
bool WithLTC (void) const
 
bool WithFBFChange (void) const
 
bool WithFBOChange (void) const
 
bool WithColorCorrect (void) const
 
bool WithVidProc (void) const
 
bool IsFieldMode (void) const
 
bool WithHDMIAuxData (void) const
 
bool IsInput (void) const
 
bool IsOutput (void) const
 
NTV2Mode GetMode (void) const
 
NTV2Channel GetChannel (void) const
 
std::string operator[] (const unsigned inIndexNum) const
 
 operator NTV2_HEADER * ()
 
bool RPCEncode (NTV2_RPC_BLOB_TYPE &outBlob)
 
bool RPCDecode (const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
 
bool RPCDecodeClient (const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
 
bool RPCEncodeClient (NTV2_RPC_BLOB_TYPE &inBlob)
 
bool RPCDecodeServer (const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
 
bool RPCEncodeServer (NTV2_RPC_BLOB_TYPE &inBlob)
 

Public Attributes

NTV2_HEADER acHeader
 The common structure header – ALWAYS FIRST! More...
 
NTV2Crosspoint acCrosspoint
 The crosspoint (channel number with direction) More...
 
NTV2AutoCirculateState acState
 Current AutoCirculate state. More...
 
LWord acStartFrame
 First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord?? More...
 
LWord acEndFrame
 Last frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord?? More...
 
LWord acActiveFrame
 Current frame actually being captured/played when CNTV2Card::AutoCirculateGetStatus called. FIXFIXFIX CHANGE TO ULWord?? More...
 
ULWord64 acRDTSCStartTime
 Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using host OS system clock. More...
 
ULWord64 acAudioClockStartTime
 Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using "64-bit clean" value of the device's 48kHz audio clock (kRegAud1Counter register). More...
 
ULWord64 acRDTSCCurrentTime
 Timestamp when CNTV2Card::AutoCirculateGetStatus called, using the host OS system clock. More...
 
ULWord64 acAudioClockCurrentTime
 Timestamp when CNTV2Card::AutoCirculateGetStatus called, using "64-bit clean" value of the device's 48kHz audio clock (kRegAud1Counter register). More...
 
ULWord acFramesProcessed
 Total number of frames successfully processed since CNTV2Card::AutoCirculateStart called. More...
 
ULWord acFramesDropped
 Total number of frames dropped since CNTV2Card::AutoCirculateStart called. More...
 
ULWord acBufferLevel
 Number of buffered frames in driver ready to capture or play. More...
 
ULWord acOptionFlags
 AutoCirculate options used when CNTV2Card::AutoCirculateInitForInput or CNTV2Card::AutoCirculateInitForOutput called (e.g., AUTOCIRCULATE_WITH_RP188, etc.). More...
 
NTV2AudioSystem acAudioSystem
 The audio system being used for this channel (NTV2_AUDIOSYSTEM_INVALID if none) More...
 
NTV2_TRAILER acTrailer
 The common structure trailer – ALWAYS LAST! More...
 

Detailed Description

This is returned from the CNTV2Card::AutoCirculateGetStatus function.

Note
This struct uses a constructor to properly initialize itself. Do not use memset or bzero to initialize or "clear" it.

Definition at line 7522 of file ntv2publicinterface.h.

Constructor & Destructor Documentation

◆ AUTOCIRCULATE_STATUS()

AUTOCIRCULATE_STATUS::AUTOCIRCULATE_STATUS ( const NTV2Crosspoint  inCrosspoint = NTV2CROSSPOINT_CHANNEL1)
explicit

Constructs a default AUTOCIRCULATE_STATUS struct for the given NTV2Crosspoint.

Definition at line 2675 of file ntv2publicinterface.cpp.

Member Function Documentation

◆ CanAcceptMoreOutputFrames()

bool AUTOCIRCULATE_STATUS::CanAcceptMoreOutputFrames ( void  ) const
inline
Returns
True if the device's AutoCirculate channel is ready to accept at least one more output frame.

Definition at line 7593 of file ntv2publicinterface.h.

◆ Clear()

void AUTOCIRCULATE_STATUS::Clear ( void  )

Clears my data.

Definition at line 2748 of file ntv2publicinterface.cpp.

◆ CopyFrom()

bool AUTOCIRCULATE_STATUS::CopyFrom ( const AUTOCIRCULATE_STATUS_STRUCT &  inOldStruct)

Copies the given AUTOCIRCULATE_STATUS_STRUCT into me.

Parameters
[in]inOldStructSpecifies the old AUTOCIRCULATE_STATUS_STRUCT that is to supply the copied data.
Returns
True if successful; otherwise false.

Definition at line 2722 of file ntv2publicinterface.cpp.

◆ CopyTo()

bool AUTOCIRCULATE_STATUS::CopyTo ( AUTOCIRCULATE_STATUS_STRUCT &  outOldStruct)

Copies my data into the given AUTOCIRCULATE_STATUS_STRUCT.

Parameters
[out]outOldStructSpecifies the old AUTOCIRCULATE_STATUS_STRUCT that is to receive the copied data.
Returns
True if successful; otherwise false.

Definition at line 2696 of file ntv2publicinterface.cpp.

◆ GetActiveFrame()

LWord AUTOCIRCULATE_STATUS::GetActiveFrame ( void  ) const
inline
Returns
The current active frame number.

Definition at line 7637 of file ntv2publicinterface.h.

◆ GetAudioSystem()

NTV2AudioSystem AUTOCIRCULATE_STATUS::GetAudioSystem ( void  ) const
inline
Returns
My audio system. If NTV2_AUDIOSYSTEM_INVALID, then no audio is being captured/played.

Definition at line 7657 of file ntv2publicinterface.h.

◆ GetBufferLevel()

ULWord AUTOCIRCULATE_STATUS::GetBufferLevel ( void  ) const
inline
Returns
The number of buffered frames in the driver ready to capture or play.

Definition at line 7583 of file ntv2publicinterface.h.

◆ GetChannel()

NTV2Channel AUTOCIRCULATE_STATUS::GetChannel ( void  ) const
Returns
My channel.

Definition at line 2768 of file ntv2publicinterface.cpp.

◆ GetDroppedFrameCount()

ULWord AUTOCIRCULATE_STATUS::GetDroppedFrameCount ( void  ) const
inline
Returns
The total number of frames dropped since AutoCirculateStart called.

Definition at line 7573 of file ntv2publicinterface.h.

◆ GetEndFrame()

uint16_t AUTOCIRCULATE_STATUS::GetEndFrame ( void  ) const
inline
Returns
The last frame number.

Definition at line 7647 of file ntv2publicinterface.h.

◆ GetFrameCount()

ULWord AUTOCIRCULATE_STATUS::GetFrameCount ( void  ) const
inline
Returns
The number of frames being auto-circulated.

Definition at line 7568 of file ntv2publicinterface.h.

◆ GetMode()

NTV2Mode AUTOCIRCULATE_STATUS::GetMode ( void  ) const
inline
Returns
The NTV2Mode, whether NTV2_MODE_OUTPUT, NTV2_MODE_INPUT or NTV2_MODE_INVALID (if stopped).

Definition at line 7752 of file ntv2publicinterface.h.

◆ GetNumAvailableOutputFrames()

ULWord AUTOCIRCULATE_STATUS::GetNumAvailableOutputFrames ( void  ) const
inline
Returns
The number of "unoccupied" output (playout) frames the device's AutoCirculate channel can currently accommodate.

Definition at line 7588 of file ntv2publicinterface.h.

◆ GetProcessedFrameCount()

ULWord AUTOCIRCULATE_STATUS::GetProcessedFrameCount ( void  ) const
inline
Returns
The total number of frames successfully processed (not dropped) since AutoCirculateStart called.

Definition at line 7578 of file ntv2publicinterface.h.

◆ GetStartFrame()

uint16_t AUTOCIRCULATE_STATUS::GetStartFrame ( void  ) const
inline
Returns
The first frame number.

Definition at line 7642 of file ntv2publicinterface.h.

◆ GetState()

NTV2AutoCirculateState AUTOCIRCULATE_STATUS::GetState ( void  ) const
inline
Returns
My current state.

Definition at line 7652 of file ntv2publicinterface.h.

◆ HasAvailableInputFrame()

bool AUTOCIRCULATE_STATUS::HasAvailableInputFrame ( void  ) const
inline
Returns
True if there's 2 or more captured frames that are ready to transfer from the device to the host; otherwise false.

This function returns true only when the buffer level exceeds one. Developers who want to reduce latency sometimes ask why this function doesn't return true when the capture buffer level is at least one – i.e. acBufferLevel >= 1. The reason it doesn't is to prevent the possibility of reading past the audio system's write head (see Audio Capture).

Normally CNTV2Card::AutoCirculateTransfer is called from inside the frame processing loop like this:

if (acStatus.IsRunning() && acStatus.HasAvailableInputFrame())
{
mDev.AutoCirculateTransfer (mInputChannel, inputXfer);
...
}

But if CNTV2Card::AutoCirculateTransfer is called when the capture buffer level is at least 1:

if (acStatus.IsRunning() && acStatus.GetBufferLevel() >= 1)
{
mDev.AutoCirculateTransfer (mInputChannel, inputXfer);
...
}

The problem is not with VANC data (which has been recorded in device SDRAM well ahead of the next VBI). The problem is that the firmware audio system writes audio samples into the capture audio buffer in device SDRAM in 512-byte chunks, and it's possible audio samples near the tail end of a progressive frame (or last field of an interlaced frame) will be missed by the transfer (resulting in some stale audio samples being transferred into the host audio buffer). It's possible to work around this problem by reducing the initial number of requested audio samples for the first transfer (to stay about a millisecond or two behind the write head), but then the audio would remain slightly out of sync with the video.

Normal (default) AutoCirculate operation as shown in the Demonstration Applications guarantees Audio/Video/Anc alignment.

Definition at line 7632 of file ntv2publicinterface.h.

◆ IsFieldMode()

bool AUTOCIRCULATE_STATUS::IsFieldMode ( void  ) const
inline
Returns
True if running in field mode; otherwise false.

Definition at line 7732 of file ntv2publicinterface.h.

◆ IsInput()

bool AUTOCIRCULATE_STATUS::IsInput ( void  ) const
inline
Returns
True if capturing; otherwise false.

Definition at line 7742 of file ntv2publicinterface.h.

◆ IsOutput()

bool AUTOCIRCULATE_STATUS::IsOutput ( void  ) const
inline
Returns
True if playing out; otherwise false.

Definition at line 7747 of file ntv2publicinterface.h.

◆ IsPaused()

bool AUTOCIRCULATE_STATUS::IsPaused ( void  ) const
inline
Returns
True if my state is currently NTV2_AUTOCIRCULATE_PAUSED; otherwise false.

Definition at line 7682 of file ntv2publicinterface.h.

◆ IsRunning()

bool AUTOCIRCULATE_STATUS::IsRunning ( void  ) const
inline
Returns
True if my state is currently NTV2_AUTOCIRCULATE_RUNNING; otherwise false.

Definition at line 7662 of file ntv2publicinterface.h.

◆ IsStarting()

bool AUTOCIRCULATE_STATUS::IsStarting ( void  ) const
inline
Returns
True if my state is currently NTV2_AUTOCIRCULATE_STARTING or NTV2_AUTOCIRCULATE_STARTING_AT_TIME; otherwise false.

Definition at line 7667 of file ntv2publicinterface.h.

◆ IsStopped()

bool AUTOCIRCULATE_STATUS::IsStopped ( void  ) const
inline
Returns
True if my state is currently NTV2_AUTOCIRCULATE_DISABLED; otherwise false.

Definition at line 7672 of file ntv2publicinterface.h.

◆ IsStopping()

bool AUTOCIRCULATE_STATUS::IsStopping ( void  ) const
inline
Returns
True if my state is currently NTV2_AUTOCIRCULATE_STOPPING; otherwise false.

Definition at line 7677 of file ntv2publicinterface.h.

◆ operator NTV2_HEADER *()

AUTOCIRCULATE_STATUS::operator NTV2_HEADER * ( )
inline
Returns
My address casted to an NTV2_HEADER pointer.

Definition at line 7768 of file ntv2publicinterface.h.

◆ operator[]()

string AUTOCIRCULATE_STATUS::operator[] ( const unsigned  inIndexNum) const
Returns
A string containing the human-readable data for the given zero-based index value.
Parameters
[in]inIndexNumA zero-based index number that specifies which member data value to return.

Definition at line 2791 of file ntv2publicinterface.cpp.

◆ OptionFlags()

ULWord AUTOCIRCULATE_STATUS::OptionFlags ( void  ) const
inline
Returns
The option flags.

Definition at line 7692 of file ntv2publicinterface.h.

◆ RPCDecode()

bool AUTOCIRCULATE_STATUS::RPCDecode ( const NTV2_RPC_BLOB_TYPE &  inBlob,
size_t &  inOutIndex 
)

Definition at line 4347 of file ntv2publicinterface.cpp.

◆ RPCDecodeClient()

bool AUTOCIRCULATE_STATUS::RPCDecodeClient ( const NTV2_RPC_BLOB_TYPE &  inBlob,
size_t &  inOutIndex 
)

◆ RPCDecodeServer()

bool AUTOCIRCULATE_STATUS::RPCDecodeServer ( const NTV2_RPC_BLOB_TYPE &  inBlob,
size_t &  inOutIndex 
)

◆ RPCEncode()

bool AUTOCIRCULATE_STATUS::RPCEncode ( NTV2_RPC_BLOB_TYPE &  outBlob)

Definition at line 4323 of file ntv2publicinterface.cpp.

◆ RPCEncodeClient()

bool AUTOCIRCULATE_STATUS::RPCEncodeClient ( NTV2_RPC_BLOB_TYPE &  inBlob)

◆ RPCEncodeServer()

bool AUTOCIRCULATE_STATUS::RPCEncodeServer ( NTV2_RPC_BLOB_TYPE &  inBlob)

◆ WithAudio()

bool AUTOCIRCULATE_STATUS::WithAudio ( void  ) const
inline
Returns
True if circulating with audio; otherwise false.

Definition at line 7687 of file ntv2publicinterface.h.

◆ WithColorCorrect()

bool AUTOCIRCULATE_STATUS::WithColorCorrect ( void  ) const
inline
Returns
True if AUTOCIRCULATE_WITH_COLORCORRECT enabled; otherwise false.

Definition at line 7722 of file ntv2publicinterface.h.

◆ WithCustomAnc()

bool AUTOCIRCULATE_STATUS::WithCustomAnc ( void  ) const
inline
Returns
True if operating the custom Anc inserter/extractor; otherwise false.

Definition at line 7697 of file ntv2publicinterface.h.

◆ WithFBFChange()

bool AUTOCIRCULATE_STATUS::WithFBFChange ( void  ) const
inline
Returns
True if AUTOCIRCULATE_WITH_FBFCHANGE enabled; otherwise false.

Definition at line 7712 of file ntv2publicinterface.h.

◆ WithFBOChange()

bool AUTOCIRCULATE_STATUS::WithFBOChange ( void  ) const
inline
Returns
True if AUTOCIRCULATE_WITH_FBOCHANGE enabled; otherwise false.

Definition at line 7717 of file ntv2publicinterface.h.

◆ WithHDMIAuxData()

bool AUTOCIRCULATE_STATUS::WithHDMIAuxData ( void  ) const
inline
Returns
True if capturing/playing with HDMI auxiliary data; otherwise false.

Definition at line 7737 of file ntv2publicinterface.h.

◆ WithLTC()

bool AUTOCIRCULATE_STATUS::WithLTC ( void  ) const
inline
Returns
True if capturing/playing analog LTC timecode; otherwise false.

Definition at line 7707 of file ntv2publicinterface.h.

◆ WithRP188()

bool AUTOCIRCULATE_STATUS::WithRP188 ( void  ) const
inline
Returns
True if capturing/playing RP188 timecode; otherwise false.

Definition at line 7702 of file ntv2publicinterface.h.

◆ WithVidProc()

bool AUTOCIRCULATE_STATUS::WithVidProc ( void  ) const
inline
Returns
True if AUTOCIRCULATE_WITH_VIDPROC enabled; otherwise false.

Definition at line 7727 of file ntv2publicinterface.h.

Member Data Documentation

◆ acActiveFrame

LWord AUTOCIRCULATE_STATUS::acActiveFrame

Current frame actually being captured/played when CNTV2Card::AutoCirculateGetStatus called. FIXFIXFIX CHANGE TO ULWord??

Definition at line 7528 of file ntv2publicinterface.h.

◆ acAudioClockCurrentTime

ULWord64 AUTOCIRCULATE_STATUS::acAudioClockCurrentTime

Timestamp when CNTV2Card::AutoCirculateGetStatus called, using "64-bit clean" value of the device's 48kHz audio clock (kRegAud1Counter register).

Definition at line 7532 of file ntv2publicinterface.h.

◆ acAudioClockStartTime

ULWord64 AUTOCIRCULATE_STATUS::acAudioClockStartTime

Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using "64-bit clean" value of the device's 48kHz audio clock (kRegAud1Counter register).

Definition at line 7530 of file ntv2publicinterface.h.

◆ acAudioSystem

NTV2AudioSystem AUTOCIRCULATE_STATUS::acAudioSystem

The audio system being used for this channel (NTV2_AUDIOSYSTEM_INVALID if none)

Definition at line 7537 of file ntv2publicinterface.h.

◆ acBufferLevel

ULWord AUTOCIRCULATE_STATUS::acBufferLevel

Number of buffered frames in driver ready to capture or play.

Definition at line 7535 of file ntv2publicinterface.h.

◆ acCrosspoint

NTV2Crosspoint AUTOCIRCULATE_STATUS::acCrosspoint

The crosspoint (channel number with direction)

Definition at line 7524 of file ntv2publicinterface.h.

◆ acEndFrame

LWord AUTOCIRCULATE_STATUS::acEndFrame

Last frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??

Definition at line 7527 of file ntv2publicinterface.h.

◆ acFramesDropped

ULWord AUTOCIRCULATE_STATUS::acFramesDropped

Total number of frames dropped since CNTV2Card::AutoCirculateStart called.

Definition at line 7534 of file ntv2publicinterface.h.

◆ acFramesProcessed

ULWord AUTOCIRCULATE_STATUS::acFramesProcessed

Total number of frames successfully processed since CNTV2Card::AutoCirculateStart called.

Definition at line 7533 of file ntv2publicinterface.h.

◆ acHeader

NTV2_HEADER AUTOCIRCULATE_STATUS::acHeader

The common structure header – ALWAYS FIRST!

Definition at line 7523 of file ntv2publicinterface.h.

◆ acOptionFlags

ULWord AUTOCIRCULATE_STATUS::acOptionFlags

AutoCirculate options used when CNTV2Card::AutoCirculateInitForInput or CNTV2Card::AutoCirculateInitForOutput called (e.g., AUTOCIRCULATE_WITH_RP188, etc.).

Definition at line 7536 of file ntv2publicinterface.h.

◆ acRDTSCCurrentTime

ULWord64 AUTOCIRCULATE_STATUS::acRDTSCCurrentTime

Timestamp when CNTV2Card::AutoCirculateGetStatus called, using the host OS system clock.

Definition at line 7531 of file ntv2publicinterface.h.

◆ acRDTSCStartTime

ULWord64 AUTOCIRCULATE_STATUS::acRDTSCStartTime

Timestamp of the first VBI received after CNTV2Card::AutoCirculateStart called, using host OS system clock.

Definition at line 7529 of file ntv2publicinterface.h.

◆ acStartFrame

LWord AUTOCIRCULATE_STATUS::acStartFrame

First frame to circulate. FIXFIXFIX Why is this signed? CHANGE TO ULWord??

Definition at line 7526 of file ntv2publicinterface.h.

◆ acState

NTV2AutoCirculateState AUTOCIRCULATE_STATUS::acState

Current AutoCirculate state.

Definition at line 7525 of file ntv2publicinterface.h.

◆ acTrailer

NTV2_TRAILER AUTOCIRCULATE_STATUS::acTrailer

The common structure trailer – ALWAYS LAST!

Definition at line 7538 of file ntv2publicinterface.h.


The documentation for this class was generated from the following files: