Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0bf05f7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update android.hardware.media.bufferpool@2.0 HAL"

parents 32e6038f c40c77ef
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -59,10 +59,14 @@ interface IAccessor {
     *     to get shared buffers from the buffer pool.
     * @return connectionId Id of IConnection. The Id identifies
     *     sender and receiver in FMQ messages during buffer transfer.
     * @return mqDesc FMQ descriptor. The descriptor can be used to
     *     send/receive FMQ messages.
     * @return toFmqDesc FMQ descriptor. The descriptor is used to
     *     post buffer status messages.
     * @return fromFmqDesc FMQ descriptor. The descriptor is used to
     *     receive buffer invalidation messages from the buffer pool.
     */
    connect()
        generates (ResultStatus status, IConnection connection,
                   int64_t connectionId, fmq_sync<BufferStatusMessage> mqDesc);
                   int64_t connectionId,
                   fmq_sync<BufferStatusMessage> toFmqDesc,
                   fmq_sync<BufferInvalidationMessage> fromFmqDesc);
};
+16 −0
Original line number Diff line number Diff line
@@ -91,3 +91,19 @@ struct BufferStatusMessage {
     */
    int64_t timestampUs;
};

/*
 * Buffer pool sends a buffer invalidation message to clients in order to
 * ensure fast reclamation of the buffers. Clients must free the invalidated
 * buffers as soon as possible upon receiving the message.
 */
struct BufferInvalidationMessage {
    /**
     * Buffers from fromBufferId to toBufferId must be invalidated.
     * Both of fromBufferId and toBufferId are inclusive.
     * If fromBufferId > toBufferID, wrap happens. In that case
     * the wrap is based on UINT32_MAX.
     */
    uint32_t fromBufferId;
    uint32_t toBufferId;
};