NVIDIA DeepStream SDK API Reference

8.0 Release
nvdsinferserver::SurfaceBuffer Class Reference

Detailed Description

Inheritance diagram for nvdsinferserver::SurfaceBuffer:
Collaboration diagram for nvdsinferserver::SurfaceBuffer:

Public Member Functions

 ~SurfaceBuffer () override
 
void * getBufPtr (uint32_t batchIdx) const override
 
size_t getBufOffset (uint32_t batchIdx) const override
 Get the offset from start of the memory allocation to the buffer pointer. More...
 
uint32_t getReservedSize ()
 
NvBufSurfacegetBufSurface ()
 
InferMediaFormat getColorFormat () const override
 
const BatchSurfaceInfogetSurfaceAlignInfo () const override
 
void reuse ()
 
 ~SurfaceBuffer () override
 
void * getBufPtr (uint32_t batchIdx) const override
 
size_t getBufOffset (uint32_t batchIdx) const override
 Get the offset from start of the memory allocation to the buffer pointer. More...
 
uint32_t getReservedSize ()
 
NvBufSurfacegetBufSurface ()
 
InferMediaFormat getColorFormat () const override
 
const BatchSurfaceInfogetSurfaceAlignInfo () const override
 
void reuse ()
 
const InferBufferDescriptiongetBufDesc () const final
 
const InferBufferDescriptiongetBufDesc () const final
 
uint32_t getBatchSize () const final
 
uint32_t getBatchSize () const final
 
uint64_t getTotalBytes () const override
 
uint64_t getTotalBytes () const override
 
void setBufDesc (const InferBufferDescription &desc)
 
void setBufDesc (const InferBufferDescription &desc)
 
InferBufferDescriptionmutableBufDesc ()
 
InferBufferDescriptionmutableBufDesc ()
 
virtual void setBatchSize (uint32_t size)
 
virtual void setBatchSize (uint32_t size)
 
const SharedCuEventcuEvent () const
 
const SharedCuEventcuEvent () const
 
void setCuEvent (SharedCuEvent e)
 
void setCuEvent (SharedCuEvent e)
 
void setSyncObj (NvBufSurfTransformSyncObj_t SyncObj)
 
void setSyncObj (NvBufSurfTransformSyncObj_t SyncObj)
 
NvBufSurfTransformSyncObj_tgetSyncObj ()
 
NvBufSurfTransformSyncObj_tgetSyncObj ()
 
void waitForSyncObj ()
 
void waitForSyncObj ()
 
void attach (SharedBatchBuf buf)
 
void attach (SharedBatchBuf buf)
 
void detach ()
 
void detach ()
 
bool hasAttachedBufs () const
 
bool hasAttachedBufs () const
 
const std::vector< SharedBatchBuf > & attachedBufs () const
 
const std::vector< SharedBatchBuf > & attachedBufs () const
 
std::vector< SharedBatchBuf > & mutableAttachedBufs ()
 
std::vector< SharedBatchBuf > & mutableAttachedBufs ()
 
bool hasAttachLoop () const
 
bool hasAttachLoop () const
 
void setBufId (uint64_t id)
 
void setBufId (uint64_t id)
 
uint64_t bufId () const
 
uint64_t bufId () const
 

Protected Member Functions

 SurfaceBuffer (int batchSize)
 
bool init (int width, int height, InferMediaFormat format, int gpuId)
 
 SurfaceBuffer (int batchSize)
 
bool init (int width, int height, InferMediaFormat format, int gpuId)
 

Friends

UniqSurfaceBuf createNvBufSurface (int width, int height, InferMediaFormat format, int batchSize, int gpuId)
 
UniqSurfaceBuf createNvBufSurface (int width, int height, InferMediaFormat format, int batchSize, int gpuId)
 

Constructor & Destructor Documentation

◆ SurfaceBuffer() [1/2]

nvdsinferserver::SurfaceBuffer::SurfaceBuffer ( int  batchSize)
explicitprotected

◆ ~SurfaceBuffer() [1/2]

nvdsinferserver::SurfaceBuffer::~SurfaceBuffer ( )
override

◆ SurfaceBuffer() [2/2]

nvdsinferserver::SurfaceBuffer::SurfaceBuffer ( int  batchSize)
explicitprotected

◆ ~SurfaceBuffer() [2/2]

nvdsinferserver::SurfaceBuffer::~SurfaceBuffer ( )
override

Member Function Documentation

◆ attach() [1/2]

void nvdsinferserver::BaseBatchBuffer::attach ( SharedBatchBuf  buf)
inlineinherited

◆ attach() [2/2]

void nvdsinferserver::BaseBatchBuffer::attach ( SharedBatchBuf  buf)
inlineinherited

◆ attachedBufs() [1/2]

const std::vector<SharedBatchBuf>& nvdsinferserver::BaseBatchBuffer::attachedBufs ( ) const
inlineinherited

◆ attachedBufs() [2/2]

const std::vector<SharedBatchBuf>& nvdsinferserver::BaseBatchBuffer::attachedBufs ( ) const
inlineinherited

◆ bufId() [1/2]

uint64_t nvdsinferserver::BaseBatchBuffer::bufId ( ) const
inlineinherited

◆ bufId() [2/2]

uint64_t nvdsinferserver::BaseBatchBuffer::bufId ( ) const
inlineinherited

◆ cuEvent() [1/2]

const SharedCuEvent& nvdsinferserver::BaseBatchBuffer::cuEvent ( ) const
inlineinherited

◆ cuEvent() [2/2]

const SharedCuEvent& nvdsinferserver::BaseBatchBuffer::cuEvent ( ) const
inlineinherited

◆ detach() [1/2]

void nvdsinferserver::BaseBatchBuffer::detach ( )
inlineinherited

◆ detach() [2/2]

void nvdsinferserver::BaseBatchBuffer::detach ( )
inlineinherited

◆ getBatchSize() [1/2]

uint32_t nvdsinferserver::BaseBatchBuffer::getBatchSize ( ) const
inlinefinalvirtualinherited

◆ getBatchSize() [2/2]

uint32_t nvdsinferserver::BaseBatchBuffer::getBatchSize ( ) const
inlinefinalvirtualinherited

◆ getBufDesc() [1/2]

const InferBufferDescription& nvdsinferserver::BaseBatchBuffer::getBufDesc ( ) const
inlinefinalvirtualinherited

◆ getBufDesc() [2/2]

const InferBufferDescription& nvdsinferserver::BaseBatchBuffer::getBufDesc ( ) const
inlinefinalvirtualinherited

◆ getBufOffset() [1/2]

size_t nvdsinferserver::SurfaceBuffer::getBufOffset ( uint32_t  batchIdx) const
inlineoverridevirtual

Get the offset from start of the memory allocation to the buffer pointer.

Needed for sharing CUDA memory with Triton server.

Reimplemented from nvdsinferserver::BaseBatchBuffer.

Definition at line 73 of file sources/libs/nvdsinferserver/infer_surface_bufs.h.

References nvdsinferserver::BaseBatchBuffer::getBatchSize(), and NvBufSurface::isContiguous.

◆ getBufOffset() [2/2]

size_t nvdsinferserver::SurfaceBuffer::getBufOffset ( uint32_t  batchIdx) const
inlineoverridevirtual

Get the offset from start of the memory allocation to the buffer pointer.

Needed for sharing CUDA memory with Triton server.

Reimplemented from nvdsinferserver::BaseBatchBuffer.

Definition at line 73 of file 9.0/sources/libs/nvdsinferserver/infer_surface_bufs.h.

References nvdsinferserver::BaseBatchBuffer::getBatchSize(), and NvBufSurface::isContiguous.

◆ getBufPtr() [1/2]

void* nvdsinferserver::SurfaceBuffer::getBufPtr ( uint32_t  batchIdx) const
inlineoverridevirtual

◆ getBufPtr() [2/2]

void* nvdsinferserver::SurfaceBuffer::getBufPtr ( uint32_t  batchIdx) const
inlineoverridevirtual

◆ getBufSurface() [1/2]

NvBufSurface* nvdsinferserver::SurfaceBuffer::getBufSurface ( )
inline

◆ getBufSurface() [2/2]

NvBufSurface* nvdsinferserver::SurfaceBuffer::getBufSurface ( )
inline

◆ getColorFormat() [1/2]

InferMediaFormat nvdsinferserver::SurfaceBuffer::getColorFormat ( ) const
inlineoverridevirtual

◆ getColorFormat() [2/2]

InferMediaFormat nvdsinferserver::SurfaceBuffer::getColorFormat ( ) const
inlineoverridevirtual

◆ getReservedSize() [1/2]

uint32_t nvdsinferserver::SurfaceBuffer::getReservedSize ( )
inline

◆ getReservedSize() [2/2]

uint32_t nvdsinferserver::SurfaceBuffer::getReservedSize ( )
inline

◆ getSurfaceAlignInfo() [1/2]

const BatchSurfaceInfo& nvdsinferserver::SurfaceBuffer::getSurfaceAlignInfo ( ) const
overridevirtual

◆ getSurfaceAlignInfo() [2/2]

const BatchSurfaceInfo& nvdsinferserver::SurfaceBuffer::getSurfaceAlignInfo ( ) const
overridevirtual

◆ getSyncObj() [1/2]

NvBufSurfTransformSyncObj_t& nvdsinferserver::BaseBatchBuffer::getSyncObj ( )
inlineinherited

◆ getSyncObj() [2/2]

NvBufSurfTransformSyncObj_t& nvdsinferserver::BaseBatchBuffer::getSyncObj ( )
inlineinherited

◆ getTotalBytes() [1/2]

uint64_t nvdsinferserver::BaseBatchBuffer::getTotalBytes ( ) const
inlineoverridevirtualinherited

◆ getTotalBytes() [2/2]

uint64_t nvdsinferserver::BaseBatchBuffer::getTotalBytes ( ) const
inlineoverridevirtualinherited

◆ hasAttachedBufs() [1/2]

bool nvdsinferserver::BaseBatchBuffer::hasAttachedBufs ( ) const
inlineinherited

◆ hasAttachedBufs() [2/2]

bool nvdsinferserver::BaseBatchBuffer::hasAttachedBufs ( ) const
inlineinherited

◆ hasAttachLoop() [1/2]

bool nvdsinferserver::BaseBatchBuffer::hasAttachLoop ( ) const
inlineinherited

◆ hasAttachLoop() [2/2]

bool nvdsinferserver::BaseBatchBuffer::hasAttachLoop ( ) const
inlineinherited

◆ init() [1/2]

bool nvdsinferserver::SurfaceBuffer::init ( int  width,
int  height,
InferMediaFormat  format,
int  gpuId 
)
protected

◆ init() [2/2]

bool nvdsinferserver::SurfaceBuffer::init ( int  width,
int  height,
InferMediaFormat  format,
int  gpuId 
)
protected

◆ mutableAttachedBufs() [1/2]

std::vector<SharedBatchBuf>& nvdsinferserver::BaseBatchBuffer::mutableAttachedBufs ( )
inlineinherited

◆ mutableAttachedBufs() [2/2]

std::vector<SharedBatchBuf>& nvdsinferserver::BaseBatchBuffer::mutableAttachedBufs ( )
inlineinherited

◆ mutableBufDesc() [1/2]

InferBufferDescription& nvdsinferserver::BaseBatchBuffer::mutableBufDesc ( )
inlineinherited

◆ mutableBufDesc() [2/2]

InferBufferDescription& nvdsinferserver::BaseBatchBuffer::mutableBufDesc ( )
inlineinherited

◆ reuse() [1/2]

void nvdsinferserver::SurfaceBuffer::reuse ( )
inline

◆ reuse() [2/2]

void nvdsinferserver::SurfaceBuffer::reuse ( )
inline

◆ setBatchSize() [1/2]

virtual void nvdsinferserver::BaseBatchBuffer::setBatchSize ( uint32_t  size)
inlinevirtualinherited

◆ setBatchSize() [2/2]

virtual void nvdsinferserver::BaseBatchBuffer::setBatchSize ( uint32_t  size)
inlinevirtualinherited

◆ setBufDesc() [1/2]

void nvdsinferserver::BaseBatchBuffer::setBufDesc ( const InferBufferDescription desc)
inlineinherited

◆ setBufDesc() [2/2]

◆ setBufId() [1/2]

void nvdsinferserver::BaseBatchBuffer::setBufId ( uint64_t  id)
inlineinherited

◆ setBufId() [2/2]

void nvdsinferserver::BaseBatchBuffer::setBufId ( uint64_t  id)
inlineinherited

◆ setCuEvent() [1/2]

void nvdsinferserver::BaseBatchBuffer::setCuEvent ( SharedCuEvent  e)
inlineinherited

◆ setCuEvent() [2/2]

void nvdsinferserver::BaseBatchBuffer::setCuEvent ( SharedCuEvent  e)
inlineinherited

◆ setSyncObj() [1/2]

void nvdsinferserver::BaseBatchBuffer::setSyncObj ( NvBufSurfTransformSyncObj_t  SyncObj)
inlineinherited

◆ setSyncObj() [2/2]

void nvdsinferserver::BaseBatchBuffer::setSyncObj ( NvBufSurfTransformSyncObj_t  SyncObj)
inlineinherited

◆ waitForSyncObj() [1/2]

void nvdsinferserver::BaseBatchBuffer::waitForSyncObj ( )
inlineinherited

◆ waitForSyncObj() [2/2]

void nvdsinferserver::BaseBatchBuffer::waitForSyncObj ( )
inlineinherited

Friends And Related Function Documentation

◆ createNvBufSurface [1/2]

UniqSurfaceBuf createNvBufSurface ( int  width,
int  height,
InferMediaFormat  format,
int  batchSize,
int  gpuId 
)
friend

◆ createNvBufSurface [2/2]

UniqSurfaceBuf createNvBufSurface ( int  width,
int  height,
InferMediaFormat  format,
int  batchSize,
int  gpuId 
)
friend

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