Package: android.hardware.media.bufferpool@1.0

types

Properties

ResultStatus

enum ResultStatus: int32_t
Details
Members
OK = 0
NO_MEMORY = 1
ALREADY_EXISTS = 2
NOT_FOUND = 3
CRITICAL_ERROR = 4

BufferStatus

enum BufferStatus: int32_t

Buffer ownership status for the specified client.Buffer transfer status for the specified buffer transafer transaction.BufferStatus is posted along with BufferStatusMessage from a client to the buffer pool for synchronization after status change.

Details
Members
NOT_USED = 0
No longer used by the specified client.
USED = 1
Buffer is acquired by the specified client.
TRANSFER_TO = 2
Buffer is sent by the specified client.
TRANSFER_FROM = 3
Buffer transfer is acked by the receiver client.
TRANSFER_TIMEOUT = 4
Buffer transfer is timed out by receiver client.
TRANSFER_LOST = 5
Buffer transfer is not acked by the receiver.
TRANSFER_FETCH = 6
Buffer fetch request from the client.
TRANSFER_OK = 7
Buffer transaction succeeded.
TRANSFER_ERROR = 8
Buffer transaction failure.

Buffer

struct Buffer {uint32_t id; handle buffer}

Generic buffer for fast recycling for media/stagefright.

During media pipeline buffer references are created, shared and destroyed frequently.The underlying buffers are allocated on demand by a buffer pool, and are recycled to the buffer pool when they are no longer referenced by the clients.

E.g.ion or gralloc buffer

Details
Members
id
buffer

BufferStatusMessage

struct BufferStatusMessage {uint64_t transactionId; uint32_t bufferId; BufferStatus newStatus; int64_t connectionId; int64_t targetConnectionId; int64_t timestampUs}

Buffer ownership status change message.This message is sent via fmq to the buffer pool from client processes.

Details
Members
transactionId
Transaction Id =(SenderId:sender local transaction Id)Transaction Id is created from sender and posted via fmq within TRANSFER_TO message.
bufferId
newStatus
connectionId
Used by the buffer pool.not by client.
targetConnectionId
Valid only when TRANSFER_TO is posted.
timestampUs
Used by the buffer pool, not by client.Monotonic timestamp in Us since fixed point in time as decided by the sender of the message