ADTF  3.18.2
ISampleBufferabstract

The SampleBuffer is the memory block object for the data of a ISample. More...

Inheritance diagram for ISampleBuffer:
[legend]

Public Member Functions

 ADTF_IID (ISampleBuffer, "samplebuffer.ant.streaming.adtf.iid")
 Defintion of interface ID.
 
virtual tResult Write (const base::ant::IRawMemory &oBufferWrite)=0
 Copy Writing Access. More...
 
virtual tResult Read (base::ant::IRawMemory &&oBufferRead) const =0
 Copy Reading Access. More...
 
virtual void * GetPtr ()=0
 Direct Writing Access. More...
 
virtual const void * GetPtr () const =0
 Direct Reading Access. More...
 
virtual size_t GetSize () const =0
 Returns the current size in bytes.
 
virtual size_t GetCapacity () const =0
 Returns the current maximal capacity in bytes.
 
virtual tResult Reserve (size_t szSize)=0
 Reserves memory. More...
 
virtual tResult Resize (size_t szSize)=0
 Resizes the Buffer. More...
 
- Public Member Functions inherited from ISharedLockedObject
 ADTF_IID (ISharedLockedObject, "sharedlockedobject.ant.ucom.adtf.iid")
 Marks the ISharedLockedObject to be castable with the ucom_cast<> More...
 
virtual tResult LockShared () const =0
 Locks the object for shared use. More...
 
virtual tResult UnlockShared () const =0
 Unlocks the object for shared use. More...
 
- Public Member Functions inherited from ILockedObject
 ADTF_IID (ILockedObject, "lockedobject.ant.ucom.adtf.iid")
 Marks the ILockedObject to be castable with the ucom_cast<> More...
 
virtual tResult Lock () const =0
 Locks the object for exclusive use. More...
 
virtual tResult Unlock () const =0
 Unlocks the object for exclusive use. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Protected Member Functions

 ~ISampleBuffer ()=default
 not destructable
 
- Protected Member Functions inherited from ISharedLockedObject
 ~ISharedLockedObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 
- Protected Member Functions inherited from ILockedObject
 ~ILockedObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

The SampleBuffer is the memory block object for the data of a ISample.

Definition at line 21 of file samplebuffer_intf.h.

Member Function Documentation

◆ GetPtr() [1/2]

virtual const void* GetPtr ( ) const
pure virtual

Direct Reading Access.

Retrieves the raw buffer content pointer.

Returns
the buffers raw pointer.

◆ GetPtr() [2/2]

virtual void* GetPtr ( )
pure virtual

Direct Writing Access.

Retrieves the raw buffer content pointer.

Warning
Do not write more than GetSize() bytes !
Returns
the buffers raw pointer.

◆ Read()

virtual tResult Read ( base::ant::IRawMemory &&  oBufferRead) const
pure virtual

Copy Reading Access.

The buffer content will be copied to the given memory. Depending on implemntation of the buffer, it will grow automatically.

Parameters
[in,out]oBufferReadMemory to copy to.
Returns
Standard Result Code.

◆ Reserve()

virtual tResult Reserve ( size_t  szSize)
pure virtual

Reserves memory.

Capacity will be at least szSize bytes. Current data will be lost.

Parameters
szSize[in] Size in bytes.
Returns
standard result.

◆ Resize()

virtual tResult Resize ( size_t  szSize)
pure virtual

Resizes the Buffer.

Capacity will be at least szSize bytes. Current data will be retained.

Parameters
szSize[in] Size in bytes.
Returns
standard result.

◆ Write()

virtual tResult Write ( const base::ant::IRawMemory oBufferWrite)
pure virtual

Copy Writing Access.

The given memory will be copied to the buffer. Depending on implemntation of the buffer, it will grow automatically.

Parameters
[in]oBufferWriteMemory to copy from.
Returns
Standard Result Code.