mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 10:44:41 +00:00
Merge "bufferpool2: add sync() method and etc"
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,4 @@ parcelable ResultStatus {
|
||||
const int ALREADY_EXISTS = 2;
|
||||
const int NOT_FOUND = 3;
|
||||
const int CRITICAL_ERROR = 4;
|
||||
|
||||
int resultStatus;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user