AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
NTV2BufferLock Class Reference

This is used to prelock a video/audio/anc buffer used as the source or target of DMA transfers. The driver will page-lock the buffer immediately, so it won't have to be done for each DMA transfer. This will reduce transfer time and CPU overhead at the cost of locking physical memory. More...

#include <ntv2publicinterface.h>

Collaboration diagram for NTV2BufferLock:
[legend]

Public Member Functions

std::ostream & Print (std::ostream &inOutStream) const
 Prints a human-readable representation of me to the given output stream. More...
 
Construction & Destruction
 NTV2BufferLock ()
 Constructs a default NTV2BufferLock struct. More...
 
 NTV2BufferLock (const NTV2Buffer &inBuffer, const ULWord inFlags)
 Constructs an NTV2BufferLock object to use in a CNTV2Card::DMABufferLock call. More...
 
 NTV2BufferLock (const ULWord *pInBuffer, const ULWord inByteCount, const ULWord inFlags)
 Constructs an NTV2BufferLock object to use in a CNTV2Card::DMABufferLock call. More...
 
 NTV2BufferLock (const ULWord64 inMaxLockSize, const ULWord inFlags)
 Constructs an NTV2BufferLock object to use in a CNTV2Card::DMABufferLock call. More...
 
Changing
bool SetBuffer (const NTV2Buffer &inBuffer)
 Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock. More...
 
bool SetBuffer (const ULWord *pInBuffer, const ULWord inByteCount)
 Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock. More...
 
void SetFlags (const ULWord inFlags)
 Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock. More...
 
void SetMaxLockSize (const ULWord64 inNumBytes)
 Sets the maximum lock size for use in a subsequent call to CNTV2Card::DMABufferLock. More...
 
void Clear (void)
 Resets the struct to its initialized state. More...
 

Public Attributes

NTV2_HEADER mHeader
 The common structure header – ALWAYS FIRST! More...
 
NTV2Buffer mBuffer
 Virtual address of a buffer to prelock, and its length. More...
 
ULWord mFlags
 Action flags (lock, unlock, etc) More...
 
ULWord64 mMaxLockSize
 Max locked bytes. More...
 
ULWord mReserved [30]
 Reserved for future expansion. More...
 
NTV2_TRAILER mTrailer
 The common structure trailer – ALWAYS LAST! More...
 

Detailed Description

This is used to prelock a video/audio/anc buffer used as the source or target of DMA transfers. The driver will page-lock the buffer immediately, so it won't have to be done for each DMA transfer. This will reduce transfer time and CPU overhead at the cost of locking physical memory.

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

Definition at line 8376 of file ntv2publicinterface.h.

Constructor & Destructor Documentation

◆ NTV2BufferLock() [1/4]

NTV2BufferLock::NTV2BufferLock ( )
explicit

Constructs a default NTV2BufferLock struct.

Definition at line 2769 of file ntv2publicinterface.cpp.

◆ NTV2BufferLock() [2/4]

NTV2BufferLock::NTV2BufferLock ( const NTV2Buffer inBuffer,
const ULWord  inFlags 
)
explicit

Constructs an NTV2BufferLock object to use in a CNTV2Card::DMABufferLock call.

Parameters
inBufferSpecifies the memory to be locked for DMA operations.
inFlagsSpecifies action flags (e.g. DMABUFFERLOCK_LOCK, etc.).

Definition at line 2777 of file ntv2publicinterface.cpp.

◆ NTV2BufferLock() [3/4]

NTV2BufferLock::NTV2BufferLock ( const ULWord pInBuffer,
const ULWord  inByteCount,
const ULWord  inFlags 
)
explicit

Constructs an NTV2BufferLock object to use in a CNTV2Card::DMABufferLock call.

Parameters
pInBufferSpecifies a pointer to the host buffer. This buffer will be locked for DMA operations.
inByteCountSpecifies a the length of the buffer to lock in bytes.
inFlagsSpecifies action flags (lock, unlock, etc)

Definition at line 2786 of file ntv2publicinterface.cpp.

◆ NTV2BufferLock() [4/4]

NTV2BufferLock::NTV2BufferLock ( const ULWord64  inMaxLockSize,
const ULWord  inFlags 
)
explicit

Constructs an NTV2BufferLock object to use in a CNTV2Card::DMABufferLock call.

Parameters
inMaxLockSizeSpecifies the maximum lock size in bytes
inFlagsSpecifies action flags (lock, unlock, etc)

Definition at line 2795 of file ntv2publicinterface.cpp.

Member Function Documentation

◆ Clear()

void NTV2BufferLock::Clear ( void  )
inline

Resets the struct to its initialized state.

Note
This does not release locked buffers.

Definition at line 8454 of file ntv2publicinterface.h.

◆ Print()

ostream & NTV2BufferLock::Print ( std::ostream &  inOutStream) const

Prints a human-readable representation of me to the given output stream.

Parameters
inOutStreamSpecifies the output stream to use.
Returns
A reference to the output stream.

Definition at line 2810 of file ntv2publicinterface.cpp.

◆ SetBuffer() [1/2]

bool NTV2BufferLock::SetBuffer ( const NTV2Buffer inBuffer)

Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock.

Parameters
inBufferSpecifies the memory to be locked for DMA operations.
Returns
True if successful; otherwise false.

Definition at line 2804 of file ntv2publicinterface.cpp.

◆ SetBuffer() [2/2]

bool NTV2BufferLock::SetBuffer ( const ULWord pInBuffer,
const ULWord  inByteCount 
)
inline

Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock.

Parameters
pInBufferSpecifies a pointer to the host buffer. This buffer will be locked for DMA operations.
inByteCountSpecifies a the length of the buffer to lock in bytes.
Returns
True if successful; otherwise false.

Definition at line 8433 of file ntv2publicinterface.h.

◆ SetFlags()

void NTV2BufferLock::SetFlags ( const ULWord  inFlags)
inline

Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock.

Parameters
inFlagsSpecifies action flags (lock, unlock, etc)

Definition at line 8442 of file ntv2publicinterface.h.

◆ SetMaxLockSize()

void NTV2BufferLock::SetMaxLockSize ( const ULWord64  inNumBytes)
inline

Sets the maximum lock size for use in a subsequent call to CNTV2Card::DMABufferLock.

Parameters
inNumBytesSpecifies maximum lock size, in bytes.

Definition at line 8448 of file ntv2publicinterface.h.

Member Data Documentation

◆ mBuffer

NTV2Buffer NTV2BufferLock::mBuffer

Virtual address of a buffer to prelock, and its length.

Definition at line 8378 of file ntv2publicinterface.h.

◆ mFlags

ULWord NTV2BufferLock::mFlags

Action flags (lock, unlock, etc)

Definition at line 8380 of file ntv2publicinterface.h.

◆ mHeader

NTV2_HEADER NTV2BufferLock::mHeader

The common structure header – ALWAYS FIRST!

Definition at line 8377 of file ntv2publicinterface.h.

◆ mMaxLockSize

ULWord64 NTV2BufferLock::mMaxLockSize

Max locked bytes.

Definition at line 8381 of file ntv2publicinterface.h.

◆ mReserved

ULWord NTV2BufferLock::mReserved[30]

Reserved for future expansion.

Definition at line 8382 of file ntv2publicinterface.h.

◆ mTrailer

NTV2_TRAILER NTV2BufferLock::mTrailer

The common structure trailer – ALWAYS LAST!

Definition at line 8383 of file ntv2publicinterface.h.


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