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

Commit 456c1b96 authored by Sungtak Lee's avatar Sungtak Lee Committed by Android (Google) Code Review
Browse files

Merge "bufferpool2: add sync() method and etc"

parents f75666df 3782c69e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -34,5 +34,10 @@
package android.hardware.media.bufferpool2;
@VintfStability
interface IClientManager {
  long registerSender(in android.hardware.media.bufferpool2.IAccessor bufferPool);
  android.hardware.media.bufferpool2.IClientManager.Registration registerSender(in android.hardware.media.bufferpool2.IAccessor bufferPool);
  @VintfStability
  parcelable Registration {
    long connectionId;
    boolean isNew = true;
  }
}
+2 −1
Original line number Diff line number Diff line
@@ -35,12 +35,13 @@ package android.hardware.media.bufferpool2;
@VintfStability
interface IConnection {
  android.hardware.media.bufferpool2.IConnection.FetchResult[] fetch(in android.hardware.media.bufferpool2.IConnection.FetchInfo[] fetchInfos);
  void sync();
  parcelable FetchInfo {
    long transactionId;
    int bufferId;
  }
  union FetchResult {
    android.hardware.media.bufferpool2.Buffer buffer;
    android.hardware.media.bufferpool2.ResultStatus failure;
    int failure;
  }
}
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@
package android.hardware.media.bufferpool2;
@VintfStability
parcelable ResultStatus {
  int resultStatus;
  const int OK = 0;
  const int NO_MEMORY = 1;
  const int ALREADY_EXISTS = 2;
+11 −2
Original line number Diff line number Diff line
@@ -27,6 +27,16 @@ import android.hardware.media.bufferpool2.IAccessor;
 */
@VintfStability
interface IClientManager {
    /**
     * Result of registerSender.
     */
    @VintfStability
    parcelable Registration {
        /** registered connection id    */
        long connectionId;
        /** true when the connection is new */
        boolean isNew = true;
    }
    /**
     * Sets up a buffer receiving communication node for the specified
     * buffer pool. A manager must create a IConnection to the buffer
@@ -39,8 +49,7 @@ interface IClientManager {
     *     sent to that connection during transfers.
     * @throws ServiceSpecificException with one of the following values:
     *     ResultStatus::NO_MEMORY        - Memory allocation failure occurred.
     *     ResultStatus::ALREADY_EXISTS   - A sender was registered already.
     *     ResultStatus::CRITICAL_ERROR   - Other errors.
     */
    long registerSender(in IAccessor bufferPool);
    Registration registerSender(in IAccessor bufferPool);
}
+9 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ interface IConnection {
         * ResultStatus::NOT_FOUND        - A buffer was not found due to invalidation.
         * ResultStatus::CRITICAL_ERROR   - Other errors.
         */
        ResultStatus failure;
        int failure;
    }

    /**
@@ -70,4 +70,12 @@ interface IConnection {
     *     ResultStatus::CRITICAL_ERROR   - Other errors.
     */
    FetchResult[] fetch(in FetchInfo[] fetchInfos);

    /**
     * Enforce processing of unprocessed bufferpool messages.
     *
     * BufferPool implementation optimizes message processing by piggy-backing approach.
     * This method can ensure pending bufferpool messages being processed timely.
     */
    void sync();
}
Loading