23 #include <com/avpkit/ferry/IBuffer.h>
25 namespace com {
namespace avpkit {
namespace ferry
30 VS_JNIUTILS_REFCOUNTED_OBJECT_PRIVATE_MAKE(
Buffer);
33 virtual void*
getBytes(int32_t offset, int32_t length);
48 FreeFunc freeFunc,
void * closure);
56 Type type, int32_t numElements,
bool zero);
58 static int32_t getTypeSize(Type type);
67 bool mInternallyAllocated;
69 static uint8_t mTypeSize[];
virtual void setType(Type)
Reset the buffer type to a new type.
virtual void * getBytes(int32_t offset, int32_t length)
Returns up to length bytes, starting at offset in the underlying buffer we're managing.
virtual Type getType()
Get the type this buffer was created as.
virtual int32_t getBufferSize()
Get the current maximum number of bytes that can be safely placed in this buffer.
virtual int32_t getSize()
Returns the size, in units of getType() of this buffer.
static VS_API_FERRY Buffer * make(RefCounted *requestor, int32_t bufferSize)
Allocate a new buffer of at least bufferSize.
Allows Java code to get data from a native buffers, and optionally modify native memory directly.
Parent of all Ferry objects – it mains reference counts in native code.
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...