Class cwipc_decoder
Defined in File api.h
Inheritance Relationships
Base Type
public cwipc_source(Class cwipc_source)
Class Documentation
-
class cwipc_decoder : public cwipc_source
Pointcloud decoder, abstract C++ interface.
This interface is provided by pointcloud decompressors. The caller feeds in memory blocks with compressed pointcloud data. The interface adheres to the
cwipc_sourceinterface and producescwipc_pointcloudobjects on the output side.Public Functions
-
inline virtual ~cwipc_decoder()
-
virtual void free() = 0
Deallocate the pointcloud source.
Because the pointcloud source may be used in a different implementation language or DLL than where it is implemented we do not count on refcounting and such. Call this method if you no longer need the source.
-
virtual bool eof() = 0
Return true if no more pointclouds are forthcoming.
-
virtual bool available(bool wait) = 0
Return true if a pointcloud is currently available.
If this cwipc_source is not multi-threading capable the wait parameter is ignored. If it is multi-threaded aware and no pointcloud is currently available it may wait a reasonable amount of time (think: about a second) to see whether one becomes available.
- Parameters:
wait – Set to true if the caller is willing to wait until a pointcloud is available.
-
virtual cwipc_pointcloud *get() = 0
Get a new pointcloud.
- Returns:
The new pointcloud.
-
virtual void feed(void *buffer, size_t bufferSize) = 0
Feed compressed data into the decoder.
Use this call to pass a new compressed pointcloud into the decoder. After decompression
available()will return true, andget()can be used to obtain the cwipc_pointcloud pointcloud data.The caller remains the owner of the buffer, i.e. after feed returns the caller can free the buffer.
- Parameters:
buffer – Pointer to the data buffer containing the compressed pointcloud data.
bufferSize – Size of the data buffer.
-
inline virtual ~cwipc_decoder()