AJA NTV2 SDK  17.1.3.1410
NTV2 SDK 17.1.3.1410
FRAME_STAMP Class Reference

This is returned by the CNTV2Card::AutoCirculateGetFrameStamp function, and is also embedded in the AUTOCIRCULATE_TRANSFER struct returned from CNTV2Card::AutoCirculateTransfer. If used as its own CNTV2DriverInterface::NTV2Message (the new API version of the old CNTV2Card::GetFrameStamp call), pass the NTV2Channel in the least significant byte of FRAME_STAMP::acFrameTime, and the requested frame in FRAME_STAMP::acRequestedFrame. More...

#include <ntv2publicinterface.h>

Collaboration diagram for FRAME_STAMP:
[legend]

Public Member Functions

 FRAME_STAMP ()
 Constructs a default FRAME_STAMP structure. More...
 
 FRAME_STAMP (const FRAME_STAMP &inObj)
 Constructs me from another FRAME_STAMP. More...
 
 ~FRAME_STAMP ()
 My destructor. More...
 
bool SetFrom (const FRAME_STAMP_STRUCT &inOldStruct)
 Sets my fields from the given FRAME_STAMP_STRUCT. More...
 
bool CopyTo (FRAME_STAMP_STRUCT &outOldStruct) const
 Copies my fields into the given FRAME_STAMP_STRUCT. More...
 
bool GetInputTimeCodes (NTV2TimeCodeList &outValues) const
 Returns all RP188 timecodes associated with the frame in NTV2TCIndex order. More...
 
bool GetInputTimeCodes (NTV2TimeCodes &outTimeCodes, const NTV2Channel inSDIInput, const bool inValidOnly=true) const
 Returns only those timecodes from the frame that are associated with a given SDI input. More...
 
bool GetInputTimeCode (NTV2_RP188 &outTimeCode, const NTV2TCIndex inTCIndex=NTV2_TCINDEX_SDI1) const
 Answers with a specific timecode captured in my acTimeCodes member. More...
 
bool GetSDIInputStatus (NTV2SDIInputStatus &outStatus, const UWord inSDIInputIndex0=0) const
 Answers with the NTV2SDIInputStatus for the given SDI input spigot. More...
 
bool SetInputTimecode (const NTV2TCIndex inTCNdx, const NTV2_RP188 &inTimecode)
 Sets one of my input timecodes. More...
 
FRAME_STAMP & operator= (const FRAME_STAMP &inRHS)
 
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)
 

Public Attributes

NTV2_HEADER acHeader
 The common structure header – ALWAYS FIRST! More...
 
LWord64 acFrameTime
 On exit, contains host OS clock at time of capture/play. On entry, contains NTV2Channel of interest, but only for new API FRAME_STAMP message. More...
 
ULWord acRequestedFrame
 The frame requested (0xFFFFFFFF == "not available"), including for new API (FRAME_STAMP message). More...
 
ULWord64 acAudioClockTimeStamp
 Number of 10MHz ticks at moment of play or record, based on 48kHz clock (from register 28). More...
 
ULWord acAudioExpectedAddress
 The address that was used to transfer. More...
 
ULWord acAudioInStartAddress
 For record - first position in buffer of audio (includes base offset) – AudioInAddress at the time this Frame was stamped. More...
 
ULWord acAudioInStopAddress
 For record - end position (exclusive) in buffer of audio (includes base offset) – AudioInAddress at the Frame AFTER this Frame was stamped. More...
 
ULWord acAudioOutStopAddress
 For play - first position in buffer of audio – AudioOutAddress at the time this Frame was stamped. More...
 
ULWord acAudioOutStartAddress
 For play - end position (exclusive) in buffer of audio – AudioOutAddress at the Frame AFTER it was stamped. More...
 
ULWord acTotalBytesTransferred
 Total audio and video bytes transferred. More...
 
ULWord acStartSample
 The actual start sample when this frame was started in VBI, which may be used to check sync against acAudioInStartAddress (Play) or acAudioOutStartAddress (Record). In record it will always be equal, but in playback if the clocks drift or the user supplies non aligned audio sizes, then this will give the current difference from expected versus actual position. To be useful, playback audio must be clocked in at the correct rate. More...
 
NTV2_TRAILER acTrailer
 The common structure trailer – ALWAYS LAST! More...
 
Current (Active) Frame Information
NTV2Buffer acTimeCodes
 Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCIndex order). If empty, no timecodes will be transferred. This field is ignored if AUTOCIRCULATE_WITH_RP188 option is not set. More...
 
LWord64 acCurrentTime
 Current processor time, derived from the finest-grained counter available on the host OS. Granularity can vary depending on the HAL. FRAME_STAMP::acAudioClockCurrentTime is the recommended time-stamp to use instead of this. More...
 
ULWord acCurrentFrame
 Last vertical blank frame for this autocirculate channel (when CNTV2Card::AutoCirculateGetFrameStamp was called) More...
 
LWord64 acCurrentFrameTime
 Vertical blank start of current frame. More...
 
ULWord64 acAudioClockCurrentTime
 Current time expressed as a count of 10MHz ticks, based on 48kHz clock (from register 28). More...
 
ULWord acCurrentAudioExpectedAddress
 
ULWord acCurrentAudioStartAddress
 As set by play. More...
 
ULWord acCurrentFieldCount
 As found by ISR at Call Field0 or Field1 currently being OUTPUT (when CNTV2Card::AutoCirculateGetFrameStamp was called) More...
 
ULWord acCurrentLineCount
 At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) More...
 
ULWord acCurrentReps
 Contains validCount (Playout: on repeated frames, number of reps remaining; Record: drops on frame) More...
 
ULWord64 acCurrentUserCookie
 The frame's AUTOCIRCULATE_TRANSFER::acInUserCookie value that was set when CNTV2Card::AutoCirculateTransfer was called. This can tell clients which frame was on-air at the last VBI. More...
 
ULWord acFrame
 Record/capture – current frame number. More...
 
NTV2_RP188 acRP188
 Deprecated – call FRAME_STAMP::GetInputTimeCode instead. More...
 

Detailed Description

This is returned by the CNTV2Card::AutoCirculateGetFrameStamp function, and is also embedded in the AUTOCIRCULATE_TRANSFER struct returned from CNTV2Card::AutoCirculateTransfer. If used as its own CNTV2DriverInterface::NTV2Message (the new API version of the old CNTV2Card::GetFrameStamp call), pass the NTV2Channel in the least significant byte of FRAME_STAMP::acFrameTime, and the requested frame in FRAME_STAMP::acRequestedFrame.

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

Definition at line 7729 of file ntv2publicinterface.h.

Constructor & Destructor Documentation

◆ FRAME_STAMP() [1/2]

FRAME_STAMP::FRAME_STAMP ( )
explicit

Constructs a default FRAME_STAMP structure.

Definition at line 2030 of file ntv2publicinterface.cpp.

◆ FRAME_STAMP() [2/2]

FRAME_STAMP::FRAME_STAMP ( const FRAME_STAMP &  inObj)

Constructs me from another FRAME_STAMP.

Parameters
[in]inObjSpecifies the FRAME_STAMP to be copied.

Definition at line 2060 of file ntv2publicinterface.cpp.

◆ ~FRAME_STAMP()

FRAME_STAMP::~FRAME_STAMP ( )

My destructor.

Definition at line 2090 of file ntv2publicinterface.cpp.

Member Function Documentation

◆ CopyTo()

bool FRAME_STAMP::CopyTo ( FRAME_STAMP_STRUCT &  outOldStruct) const

Copies my fields into the given FRAME_STAMP_STRUCT.

Parameters
[out]outOldStructSpecifies the FRAME_STAMP_STRUCT that is to be copied from me.

Definition at line 2254 of file ntv2publicinterface.cpp.

◆ GetInputTimeCode()

bool FRAME_STAMP::GetInputTimeCode ( NTV2_RP188 &  outTimeCode,
const NTV2TCIndex  inTCIndex = NTV2_TCINDEX_SDI1 
) const

Answers with a specific timecode captured in my acTimeCodes member.

Parameters
[out]outTimeCodeReceives the requested timecode value.
[in]inTCIndexSpecifies which NTV2TCIndex to use. Defaults to NTV2_TCINDEX_SDI1.
Note
Note that specifying an SDI input source that's not connected to the framestore associated with the channel being AutoCirculated will likely result in a timecode that's not frame-accurate.
Returns
True if successful; otherwise false.

Definition at line 2114 of file ntv2publicinterface.cpp.

◆ GetInputTimeCodes() [1/2]

bool FRAME_STAMP::GetInputTimeCodes ( NTV2TimeCodeList &  outValues) const

Returns all RP188 timecodes associated with the frame in NTV2TCIndex order.

Parameters
[out]outValuesReceives the NTV2TimeCodeList that was transferred from the device. An NTV2TCIndex enum value can be used to index into the list to fetch the desired timecode of interest.
Returns
True if successful; otherwise false.

Definition at line 2095 of file ntv2publicinterface.cpp.

◆ GetInputTimeCodes() [2/2]

bool FRAME_STAMP::GetInputTimeCodes ( NTV2TimeCodes &  outTimeCodes,
const NTV2Channel  inSDIInput,
const bool  inValidOnly = true 
) const

Returns only those timecodes from the frame that are associated with a given SDI input.

Parameters
[out]outTimeCodesReceives the timecode values.
[in]inSDIInputSpecifies the SDI input of interest, expressed as an NTV2Channel.
[in]inValidOnlyOptionally specifies if only valid timecodes should be returned. Defaults to true. Specify false to return all timecode values associated with the channel of interest, even if they're not valid.
Returns
True if successful; otherwise false.

Definition at line 2132 of file ntv2publicinterface.cpp.

◆ GetSDIInputStatus()

bool FRAME_STAMP::GetSDIInputStatus ( NTV2SDIInputStatus &  outStatus,
const UWord  inSDIInputIndex0 = 0 
) const

Answers with the NTV2SDIInputStatus for the given SDI input spigot.

Parameters
[out]outStatusReceives the NTV2SDIInputStatus for the given SDI input.
[in]inSDIInputIndex0Specifies the zero-based index of the SDI input of interest.
Returns
True if successful; otherwise false.

Definition at line 2159 of file ntv2publicinterface.cpp.

◆ operator NTV2_HEADER *()

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

Definition at line 7866 of file ntv2publicinterface.h.

◆ operator=()

FRAME_STAMP & FRAME_STAMP::operator= ( const FRAME_STAMP &  inRHS)
Parameters
[in]inRHSThe FRAME_STAMP to be assigned (copied) into me.
Returns
A reference to me.

Definition at line 2184 of file ntv2publicinterface.cpp.

◆ operator[]()

string FRAME_STAMP::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 2296 of file ntv2publicinterface.cpp.

◆ RPCDecode()

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

Definition at line 3803 of file ntv2publicinterface.cpp.

◆ RPCEncode()

bool FRAME_STAMP::RPCEncode ( NTV2_RPC_BLOB_TYPE &  outBlob)

Definition at line 3767 of file ntv2publicinterface.cpp.

◆ SetFrom()

bool FRAME_STAMP::SetFrom ( const FRAME_STAMP_STRUCT &  inOldStruct)

Sets my fields from the given FRAME_STAMP_STRUCT.

Parameters
[in]inOldStructSpecifies the FRAME_STAMP_STRUCT that is to be copied into me.

Definition at line 2218 of file ntv2publicinterface.cpp.

◆ SetInputTimecode()

bool FRAME_STAMP::SetInputTimecode ( const NTV2TCIndex  inTCNdx,
const NTV2_RP188 &  inTimecode 
)

Sets one of my input timecodes.

Parameters
[in]inTCNdxSpecifies which timecode (slot) to set.
[in]inTimecodeSpecifies the timecode data to write.
Returns
True if successful; otherwise false.
Note
This function is provided for internal SDK use only.

Definition at line 2167 of file ntv2publicinterface.cpp.

Member Data Documentation

◆ acAudioClockCurrentTime

ULWord64 FRAME_STAMP::acAudioClockCurrentTime

Current time expressed as a count of 10MHz ticks, based on 48kHz clock (from register 28).

Definition at line 7762 of file ntv2publicinterface.h.

◆ acAudioClockTimeStamp

ULWord64 FRAME_STAMP::acAudioClockTimeStamp

Number of 10MHz ticks at moment of play or record, based on 48kHz clock (from register 28).

Definition at line 7734 of file ntv2publicinterface.h.

◆ acAudioExpectedAddress

ULWord FRAME_STAMP::acAudioExpectedAddress

The address that was used to transfer.

Definition at line 7735 of file ntv2publicinterface.h.

◆ acAudioInStartAddress

ULWord FRAME_STAMP::acAudioInStartAddress

For record - first position in buffer of audio (includes base offset) – AudioInAddress at the time this Frame was stamped.

Definition at line 7736 of file ntv2publicinterface.h.

◆ acAudioInStopAddress

ULWord FRAME_STAMP::acAudioInStopAddress

For record - end position (exclusive) in buffer of audio (includes base offset) – AudioInAddress at the Frame AFTER this Frame was stamped.

Definition at line 7737 of file ntv2publicinterface.h.

◆ acAudioOutStartAddress

ULWord FRAME_STAMP::acAudioOutStartAddress

For play - end position (exclusive) in buffer of audio – AudioOutAddress at the Frame AFTER it was stamped.

Definition at line 7739 of file ntv2publicinterface.h.

◆ acAudioOutStopAddress

ULWord FRAME_STAMP::acAudioOutStopAddress

For play - first position in buffer of audio – AudioOutAddress at the time this Frame was stamped.

Definition at line 7738 of file ntv2publicinterface.h.

◆ acCurrentAudioExpectedAddress

ULWord FRAME_STAMP::acCurrentAudioExpectedAddress

Definition at line 7763 of file ntv2publicinterface.h.

◆ acCurrentAudioStartAddress

ULWord FRAME_STAMP::acCurrentAudioStartAddress

As set by play.

Definition at line 7764 of file ntv2publicinterface.h.

◆ acCurrentFieldCount

ULWord FRAME_STAMP::acCurrentFieldCount

As found by ISR at Call Field0 or Field1 currently being OUTPUT (when CNTV2Card::AutoCirculateGetFrameStamp was called)

Definition at line 7765 of file ntv2publicinterface.h.

◆ acCurrentFrame

ULWord FRAME_STAMP::acCurrentFrame

Last vertical blank frame for this autocirculate channel (when CNTV2Card::AutoCirculateGetFrameStamp was called)

Definition at line 7760 of file ntv2publicinterface.h.

◆ acCurrentFrameTime

LWord64 FRAME_STAMP::acCurrentFrameTime

Vertical blank start of current frame.

Definition at line 7761 of file ntv2publicinterface.h.

◆ acCurrentLineCount

ULWord FRAME_STAMP::acCurrentLineCount

At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP)

Definition at line 7766 of file ntv2publicinterface.h.

◆ acCurrentReps

ULWord FRAME_STAMP::acCurrentReps

Contains validCount (Playout: on repeated frames, number of reps remaining; Record: drops on frame)

Definition at line 7767 of file ntv2publicinterface.h.

◆ acCurrentTime

LWord64 FRAME_STAMP::acCurrentTime

Current processor time, derived from the finest-grained counter available on the host OS. Granularity can vary depending on the HAL. FRAME_STAMP::acAudioClockCurrentTime is the recommended time-stamp to use instead of this.

Definition at line 7758 of file ntv2publicinterface.h.

◆ acCurrentUserCookie

ULWord64 FRAME_STAMP::acCurrentUserCookie

The frame's AUTOCIRCULATE_TRANSFER::acInUserCookie value that was set when CNTV2Card::AutoCirculateTransfer was called. This can tell clients which frame was on-air at the last VBI.

Definition at line 7768 of file ntv2publicinterface.h.

◆ acFrame

ULWord FRAME_STAMP::acFrame

Record/capture – current frame number.

Definition at line 7770 of file ntv2publicinterface.h.

◆ acFrameTime

LWord64 FRAME_STAMP::acFrameTime

On exit, contains host OS clock at time of capture/play. On entry, contains NTV2Channel of interest, but only for new API FRAME_STAMP message.

Definition at line 7731 of file ntv2publicinterface.h.

◆ acHeader

NTV2_HEADER FRAME_STAMP::acHeader

The common structure header – ALWAYS FIRST!

Definition at line 7730 of file ntv2publicinterface.h.

◆ acRequestedFrame

ULWord FRAME_STAMP::acRequestedFrame

The frame requested (0xFFFFFFFF == "not available"), including for new API (FRAME_STAMP message).

Definition at line 7733 of file ntv2publicinterface.h.

◆ acRP188

NTV2_RP188 FRAME_STAMP::acRP188

Deprecated – call FRAME_STAMP::GetInputTimeCode instead.

Definition at line 7771 of file ntv2publicinterface.h.

◆ acStartSample

ULWord FRAME_STAMP::acStartSample

The actual start sample when this frame was started in VBI, which may be used to check sync against acAudioInStartAddress (Play) or acAudioOutStartAddress (Record). In record it will always be equal, but in playback if the clocks drift or the user supplies non aligned audio sizes, then this will give the current difference from expected versus actual position. To be useful, playback audio must be clocked in at the correct rate.

Definition at line 7741 of file ntv2publicinterface.h.

◆ acTimeCodes

NTV2Buffer FRAME_STAMP::acTimeCodes

Intended for capture, this is a sequence of NTV2_RP188 values received from the device (in NTV2TCIndex order). If empty, no timecodes will be transferred. This field is ignored if AUTOCIRCULATE_WITH_RP188 option is not set.

Note
This field is owned by the SDK, which is responsible for allocating and/or freeing it. Call FRAME_STAMP::GetInputTimeCodes or FRAME_STAMP::GetInputTimeCode to retrieve the timecodes stored in this field.

Definition at line 7757 of file ntv2publicinterface.h.

◆ acTotalBytesTransferred

ULWord FRAME_STAMP::acTotalBytesTransferred

Total audio and video bytes transferred.

Definition at line 7740 of file ntv2publicinterface.h.

◆ acTrailer

NTV2_TRAILER FRAME_STAMP::acTrailer

The common structure trailer – ALWAYS LAST!

Definition at line 7774 of file ntv2publicinterface.h.


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