NVIDIA DeepStream SDK API Reference

8.0 Release
deepstream::DS3DBuffer Class Reference

Detailed Description

Inheritance diagram for deepstream::DS3DBuffer:
Collaboration diagram for deepstream::DS3DBuffer:

Public Types

typedef struct deepstream::Buffer::_Latency Latency
 Unified definition of latency for a buffer. More...
 
typedef struct deepstream::Buffer::_Latency Latency
 Unified definition of latency for a buffer. More...
 
using FreeFunction = void(*)(void *)
 Signature of customized function for freeing data in a buffer. More...
 
using FreeFunction = void(*)(void *)
 Signature of customized function for freeing data in a buffer. More...
 

Public Member Functions

 DS3DBuffer ()
 
 DS3DBuffer (OpaqueBuffer *buffer)
 
 DS3DBuffer ()
 
 DS3DBuffer (OpaqueBuffer *buffer)
 
 operator bool () const
 If the buffer is null. More...
 
 operator bool () const
 If the buffer is null. More...
 
size_t size () const
 Size of the buffer in bytes. More...
 
size_t size () const
 Size of the buffer in bytes. More...
 
uint64_t timestamp () const
 Timestamp of the buffer. More...
 
uint64_t timestamp () const
 Timestamp of the buffer. More...
 
int32_t chunkId (unsigned int batchId) const
 Chunk id of the buffer. More...
 
int32_t chunkId (unsigned int batchId) const
 Chunk id of the buffer. More...
 
std::vector< LatencymeasureLatency () const
 Return latency data of the buffer. More...
 
std::vector< LatencymeasureLatency () const
 Return latency data of the buffer. More...
 
virtual size_t read (std::function< size_t(const void *data, size_t len)> callable)
 Read data from the buffer. More...
 
virtual size_t read (std::function< size_t(const void *data, size_t len)> callable)
 Read data from the buffer. More...
 
virtual size_t write (std::function< size_t(void *data, size_t len)> callable)
 Write data to the buffer. More...
 
virtual size_t write (std::function< size_t(void *data, size_t len)> callable)
 Write data to the buffer. More...
 
OpaqueBuffergive ()
 Give up the ownership of this buffer and return the opaque buffer pointer. More...
 
OpaqueBuffergive ()
 Give up the ownership of this buffer and return the opaque buffer pointer. More...
 
virtual size_t batchSize ()
 get the batch size of the buffer, 1 for un-batched buffer More...
 
virtual size_t batchSize ()
 get the batch size of the buffer, 1 for un-batched buffer More...
 
virtual Tensorextract (unsigned int batchId)
 create a tensor object with the buffer data More...
 
virtual Tensorextract (unsigned int batchId)
 create a tensor object with the buffer data More...
 

Static Public Member Functions

static void wrap (Tensor *)
 wrap the tensor to a new buffer More...
 
static void wrap (Tensor *)
 wrap the tensor to a new buffer More...
 

Protected Attributes

OpaqueBufferbuffer_
 opaque buffer pointer More...
 
std::vector< int > chunk_ids_ = { 0 }
 chunk ids, optional More...
 

Member Typedef Documentation

◆ FreeFunction [1/2]

using deepstream::Buffer::FreeFunction = void(*)(void*)
inherited

Signature of customized function for freeing data in a buffer.

Definition at line 59 of file service-maker/includes/buffer.hpp.

◆ FreeFunction [2/2]

using deepstream::Buffer::FreeFunction = void(*)(void*)
inherited

Signature of customized function for freeing data in a buffer.

Definition at line 59 of file 9.0/service-maker/includes/buffer.hpp.

◆ Latency [1/2]

Unified definition of latency for a buffer.

◆ Latency [2/2]

Unified definition of latency for a buffer.

Constructor & Destructor Documentation

◆ DS3DBuffer() [1/4]

deepstream::DS3DBuffer::DS3DBuffer ( )
inline

◆ DS3DBuffer() [2/4]

deepstream::DS3DBuffer::DS3DBuffer ( OpaqueBuffer buffer)
inline

◆ DS3DBuffer() [3/4]

deepstream::DS3DBuffer::DS3DBuffer ( )
inline

◆ DS3DBuffer() [4/4]

deepstream::DS3DBuffer::DS3DBuffer ( OpaqueBuffer buffer)
inline

Member Function Documentation

◆ batchSize() [1/2]

virtual size_t deepstream::Buffer::batchSize ( )
virtualinherited

get the batch size of the buffer, 1 for un-batched buffer

◆ batchSize() [2/2]

virtual size_t deepstream::Buffer::batchSize ( )
virtualinherited

get the batch size of the buffer, 1 for un-batched buffer

◆ chunkId() [1/2]

int32_t deepstream::Buffer::chunkId ( unsigned int  batchId) const
inherited

Chunk id of the buffer.

◆ chunkId() [2/2]

int32_t deepstream::Buffer::chunkId ( unsigned int  batchId) const
inherited

Chunk id of the buffer.

◆ extract() [1/2]

virtual Tensor* deepstream::Buffer::extract ( unsigned int  batchId)
virtualinherited

create a tensor object with the buffer data

◆ extract() [2/2]

virtual Tensor* deepstream::Buffer::extract ( unsigned int  batchId)
virtualinherited

create a tensor object with the buffer data

◆ give() [1/2]

OpaqueBuffer* deepstream::Buffer::give ( )
inherited

Give up the ownership of this buffer and return the opaque buffer pointer.

◆ give() [2/2]

OpaqueBuffer* deepstream::Buffer::give ( )
inherited

Give up the ownership of this buffer and return the opaque buffer pointer.

Referenced by deepstream::EnsembleRender::consume().

◆ measureLatency() [1/2]

std::vector<Latency> deepstream::Buffer::measureLatency ( ) const
inherited

Return latency data of the buffer.

Referenced by deepstream::NvDsMeasureLatency::handleBuffer().

◆ measureLatency() [2/2]

std::vector<Latency> deepstream::Buffer::measureLatency ( ) const
inherited

Return latency data of the buffer.

◆ operator bool() [1/2]

deepstream::Buffer::operator bool ( ) const
inherited

If the buffer is null.

◆ operator bool() [2/2]

deepstream::Buffer::operator bool ( ) const
inherited

If the buffer is null.

◆ read() [1/2]

virtual size_t deepstream::Buffer::read ( std::function< size_t(const void *data, size_t len)>  callable)
virtualinherited

Read data from the buffer.

Parameters
[in]callablecallable provided by the caller to collect data

Reimplemented in deepstream::VideoBuffer, and deepstream::VideoBuffer.

◆ read() [2/2]

virtual size_t deepstream::Buffer::read ( std::function< size_t(const void *data, size_t len)>  callable)
virtualinherited

Read data from the buffer.

Parameters
[in]callablecallable provided by the caller to collect data

Reimplemented in deepstream::VideoBuffer, and deepstream::VideoBuffer.

◆ size() [1/2]

size_t deepstream::Buffer::size ( ) const
inherited

Size of the buffer in bytes.

◆ size() [2/2]

size_t deepstream::Buffer::size ( ) const
inherited

Size of the buffer in bytes.

◆ timestamp() [1/2]

uint64_t deepstream::Buffer::timestamp ( ) const
inherited

Timestamp of the buffer.

◆ timestamp() [2/2]

uint64_t deepstream::Buffer::timestamp ( ) const
inherited

Timestamp of the buffer.

◆ wrap() [1/2]

static void deepstream::Buffer::wrap ( Tensor )
staticinherited

wrap the tensor to a new buffer

◆ wrap() [2/2]

static void deepstream::Buffer::wrap ( Tensor )
staticinherited

wrap the tensor to a new buffer

◆ write() [1/2]

virtual size_t deepstream::Buffer::write ( std::function< size_t(void *data, size_t len)>  callable)
virtualinherited

Write data to the buffer.

Parameters
[in]callablecallable provided by the caller to inject data

Reimplemented in deepstream::VideoBuffer, and deepstream::VideoBuffer.

◆ write() [2/2]

virtual size_t deepstream::Buffer::write ( std::function< size_t(void *data, size_t len)>  callable)
virtualinherited

Write data to the buffer.

Parameters
[in]callablecallable provided by the caller to inject data

Reimplemented in deepstream::VideoBuffer, and deepstream::VideoBuffer.

Referenced by deepstream::FileDataSource::read().

Field Documentation

◆ buffer_

OpaqueBuffer * deepstream::Buffer::buffer_
protectedinherited

opaque buffer pointer

Definition at line 164 of file service-maker/includes/buffer.hpp.

Referenced by DS3DBuffer().

◆ chunk_ids_

std::vector< int > deepstream::Buffer::chunk_ids_ = { 0 }
protectedinherited

chunk ids, optional

Definition at line 166 of file service-maker/includes/buffer.hpp.


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