Pleora Technologies Inc. eBUS SDK v6.5.1.6797 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 <PvBufferLib.h>
11 #include <PvPixelType.h>
12 
17 class PV_BUFFER_API IPvChunkData
18 {
19 public:
20 
21  virtual ~IPvChunkData() {}
22 
28  virtual void ResetChunks() = 0;
29 
45  virtual PvResult AddChunk( uint32_t aID, const uint8_t *aData, uint32_t aLength ) = 0;
46 
52  virtual void SetChunkLayoutID( uint32_t aChunkLayoutID ) = 0;
53 
62  virtual bool HasChunks() const = 0;
63 
71  virtual uint32_t GetChunkCount() = 0;
72 
86  virtual PvResult GetChunkIDByIndex( uint32_t aIndex, uint32_t &aID ) = 0;
87 
97  virtual uint32_t GetChunkSizeByIndex( uint32_t aIndex ) = 0;
98 
108  virtual uint32_t GetChunkSizeByID( uint32_t aID ) = 0;
109 
119  virtual const uint8_t *GetChunkRawDataByIndex( uint32_t aIndex ) = 0;
120 
130  virtual const uint8_t *GetChunkRawDataByID( uint32_t aID ) = 0;
131 
137  virtual uint32_t GetChunkLayoutID() = 0;
138 
152  virtual uint32_t GetChunkDataSize() const = 0;
153 
170  virtual uint32_t GetChunkDataCapacity() const = 0;
171 
172 };
173 
174 
197 class PV_BUFFER_API PvChunkData
198  : public IPvChunkData
199 {
200 public:
201 
202  virtual ~PvChunkData() {}
203 
209  virtual uint64_t GetChunkDataPayloadLength() const = 0;
210 
224  virtual PvResult Alloc( uint32_t aMaximumChunkLength ) = 0;
225 
229  virtual void Free() = 0;
230 
242  virtual PvResult Attach( void * aRawBuffer, uint32_t aMaximumChunkLength ) = 0;
243 
251  virtual uint8_t *Detach() = 0;
252 
253 };
254 
255 
256 #endif
Generic chunk data interface.
Definition: PvChunkData.h:18
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:199
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-2024 Pleora Technologies Inc.
www.pleora.com