Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



PvChunkData.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2017, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVCHUNKDATA_H__
8 #define __PVCHUNKDATA_H__
9 
10 #include <PvBaseLib.h>
11 #include <PvPixelType.h>
12 #include <PvResult.h>
13 
18 class PV_BASE_API IPvChunkData
19 {
20 public:
21 
22  virtual ~IPvChunkData() {}
23 
29  virtual void ResetChunks() = 0;
30 
46  virtual PvResult AddChunk( uint32_t aID, const uint8_t *aData, uint32_t aLength ) = 0;
47 
53  virtual void SetChunkLayoutID( uint32_t aChunkLayoutID ) = 0;
54 
63  virtual bool HasChunks() const = 0;
64 
72  virtual uint32_t GetChunkCount() = 0;
73 
87  virtual PvResult GetChunkIDByIndex( uint32_t aIndex, uint32_t &aID ) = 0;
88 
98  virtual uint32_t GetChunkSizeByIndex( uint32_t aIndex ) = 0;
99 
109  virtual uint32_t GetChunkSizeByID( uint32_t aID ) = 0;
110 
120  virtual const uint8_t *GetChunkRawDataByIndex( uint32_t aIndex ) = 0;
121 
131  virtual const uint8_t *GetChunkRawDataByID( uint32_t aID ) = 0;
132 
138  virtual uint32_t GetChunkLayoutID() = 0;
139 
153  virtual uint32_t GetChunkDataSize() const = 0;
154 
171  virtual uint32_t GetChunkDataCapacity() const = 0;
172 
173 };
174 
175 
198 class PV_BASE_API PvChunkData
199  : public IPvChunkData
200 {
201 public:
202 
203  virtual ~PvChunkData() {}
204 
210  virtual uint64_t GetChunkDataPayloadLength() const = 0;
211 
225  virtual PvResult Alloc( uint32_t aMaximumChunkLength ) = 0;
226 
230  virtual void Free() = 0;
231 
243  virtual PvResult Attach( void * aRawBuffer, uint32_t aMaximumChunkLength ) = 0;
244 
252  virtual uint8_t *Detach() = 0;
253 
254 };
255 
256 
257 #endif
Generic chunk data interface.
Definition: PvChunkData.h:19
virtual void SetChunkLayoutID(uint32_t aChunkLayoutID)=0
Set the chunk data layout ID.
virtual uint32_t GetChunkSizeByIndex(uint32_t aIndex)=0
See PvBuffer::GetChunkSizeByIndex.
virtual const uint8_t * GetChunkRawDataByIndex(uint32_t aIndex)=0
See PvBuffer::GetChunkRawDataByIndex.
virtual PvResult AddChunk(uint32_t aID, const uint8_t *aData, uint32_t aLength)=0
See PvBuffer::AddChunk.
virtual uint32_t GetChunkSizeByID(uint32_t aID)=0
See PvBuffer::GetChunkSizeByID.
virtual uint32_t GetChunkDataCapacity() const =0
Returns the current chunk data capacity.
virtual const uint8_t * GetChunkRawDataByID(uint32_t aID)=0
See PvBuffer::GetChunkRawDataByID.
virtual void ResetChunks()=0
See PvBuffer::ResetChunks.
virtual uint32_t GetChunkLayoutID()=0
Get the chunk data layout ID.
virtual uint32_t GetChunkCount()=0
See PvBuffer::GetChunkCount.
virtual PvResult GetChunkIDByIndex(uint32_t aIndex, uint32_t &aID)=0
See PvBuffer::GetChunkIDByIndex.
virtual uint32_t GetChunkDataSize() const =0
Returns the current chunk data size.
virtual bool HasChunks() const =0
Returns true if the buffer has data chunks.
Raw data interface to a PvBuffer.
Definition: PvChunkData.h:200
virtual void Free()=0
Frees (de-allocates) the buffer's internal memory.
virtual PvResult Attach(void *aRawBuffer, uint32_t aMaximumChunkLength)=0
Attach this PvChunkData to an external memory buffer.
virtual PvResult Alloc(uint32_t aMaximumChunkLength)=0
Allocates memory for this PvChunkData.
virtual uint64_t GetChunkDataPayloadLength() const =0
Get the chunk data payload length specified in the trailer information of this block.
virtual uint8_t * Detach()=0
Releases an attached memory buffer.
Result information.
Definition: PvResult.h:30

Copyright (c) 2002-2026 Pleora Technologies Inc.
www.pleora.com