Merge "media.c2 aidl: do not throw status, return instead" into main am: 3c548fc475
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2893421 Change-Id: I3bec1187bdd784d3e2e2f903d337e5b003285bb4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
1cccdf5c1c
2 changed files with 61 additions and 12 deletions
|
@ -37,12 +37,23 @@ interface IConfigurable {
|
|||
android.hardware.media.c2.IConfigurable.ConfigResult config(in android.hardware.media.c2.Params inParams, in boolean mayBlock);
|
||||
int getId();
|
||||
String getName();
|
||||
android.hardware.media.c2.Params query(in int[] indices, in boolean mayBlock);
|
||||
android.hardware.media.c2.IConfigurable.QueryResult query(in int[] indices, in boolean mayBlock);
|
||||
android.hardware.media.c2.ParamDescriptor[] querySupportedParams(in int start, in int count);
|
||||
android.hardware.media.c2.FieldSupportedValuesQueryResult[] querySupportedValues(in android.hardware.media.c2.FieldSupportedValuesQuery[] inFields, in boolean mayBlock);
|
||||
android.hardware.media.c2.IConfigurable.QuerySupportedValuesResult querySupportedValues(in android.hardware.media.c2.FieldSupportedValuesQuery[] inFields, in boolean mayBlock);
|
||||
@VintfStability
|
||||
parcelable ConfigResult {
|
||||
android.hardware.media.c2.Params params;
|
||||
android.hardware.media.c2.SettingResult[] failures;
|
||||
android.hardware.media.c2.Status status;
|
||||
}
|
||||
@VintfStability
|
||||
parcelable QueryResult {
|
||||
android.hardware.media.c2.Params params;
|
||||
android.hardware.media.c2.Status status;
|
||||
}
|
||||
@VintfStability
|
||||
parcelable QuerySupportedValuesResult {
|
||||
android.hardware.media.c2.FieldSupportedValuesQueryResult[] values;
|
||||
android.hardware.media.c2.Status status;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import android.hardware.media.c2.FieldSupportedValuesQueryResult;
|
|||
import android.hardware.media.c2.ParamDescriptor;
|
||||
import android.hardware.media.c2.Params;
|
||||
import android.hardware.media.c2.SettingResult;
|
||||
import android.hardware.media.c2.Status;
|
||||
|
||||
/**
|
||||
* Generic configuration interface presented by all configurable Codec2 objects.
|
||||
|
@ -34,12 +35,42 @@ interface IConfigurable {
|
|||
* Return parcelable for config() interface.
|
||||
*
|
||||
* This includes the successful config settings along with the failure reasons of
|
||||
* the specified setting.
|
||||
* the specified setting. @p status is for the compatibility with HIDL interface.
|
||||
* (The value is defined in Status.aidl, and possible values are enumerated
|
||||
* in config() interface definition)
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ConfigResult {
|
||||
Params params;
|
||||
SettingResult[] failures;
|
||||
Status status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return parcelable for query() interface.
|
||||
*
|
||||
* @p params is the parameter descripion for queried configuration indices.
|
||||
* @p status is for the compatibility with HIDL interface. (The value is defined in
|
||||
* Status.aidl, and possible values are enumerated in query() interface definition)
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable QueryResult {
|
||||
Params params;
|
||||
Status status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return parcelable for querySupportedValues() interface.
|
||||
*
|
||||
* @p values is the value descripion for queried configuration fields.
|
||||
* @p status is for the compatibility with HIDL interface. (The value is defined in
|
||||
* Status.aidl, and possible values are enumerated in querySupportedValues()
|
||||
* interface definition)
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable QuerySupportedValuesResult {
|
||||
FieldSupportedValuesQueryResult[] values;
|
||||
Status status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,7 +113,8 @@ interface IConfigurable {
|
|||
* @param mayBlock Whether this call may block or not.
|
||||
* @return result of config. Params in the result should be in same order
|
||||
* with @p inParams.
|
||||
* @throws ServiceSpecificException with one of the following values:
|
||||
*
|
||||
* Returned @p status will be one of the following.
|
||||
* - `Status::NO_MEMORY` - Some supported parameters could not be updated
|
||||
* successfully because they contained unsupported values.
|
||||
* These are returned in @p failures.
|
||||
|
@ -146,17 +178,22 @@ interface IConfigurable {
|
|||
*
|
||||
* @param indices List of C2Param structure indices to query.
|
||||
* @param mayBlock Whether this call may block or not.
|
||||
* @return Flattened representation of std::vector<C2Param> object.
|
||||
* Unsupported settings are skipped in the results. The order in @p indices
|
||||
* still be preserved except skipped settings.
|
||||
* @throws ServiceSpecificException with one of the following values:
|
||||
* @return @p params is the flattened representation of std::vector<C2Param> object.
|
||||
* Technically unsupported settings can be either skipped or invalidated.
|
||||
* (Invalidated params will be skipped during unflattening to make these identical.)
|
||||
* In the future we will want these to be invalidated to make it easier
|
||||
* for the framework code.
|
||||
*
|
||||
* The order in @p indices still be preserved except skipped settings.
|
||||
*
|
||||
* Returned @p status will be one of the following.
|
||||
* - `Status::NO_MEMORY` - Could not allocate memory for a supported parameter.
|
||||
* - `Status::BLOCKING` - Querying some parameters requires blocking, but
|
||||
* @p mayBlock is false.
|
||||
* - `Status::TIMED_OUT` - The operation cannot be finished in a timely manner.
|
||||
* - `Status::CORRUPTED` - Some unknown error occurred.
|
||||
*/
|
||||
Params query(in int[] indices, in boolean mayBlock);
|
||||
QueryResult query(in int[] indices, in boolean mayBlock);
|
||||
|
||||
/**
|
||||
* Returns a list of supported parameters within a selected range of C2Param
|
||||
|
@ -197,9 +234,10 @@ interface IConfigurable {
|
|||
*
|
||||
* @param inFields List of field queries.
|
||||
* @param mayBlock Whether this call may block or not.
|
||||
* @return List of supported values and results for the
|
||||
* @return @p values is the list of supported values and results for the
|
||||
* supplied queries.
|
||||
* @throws ServiceSpecificException with one of the following values:
|
||||
*
|
||||
* Returned @p status will be one of the following.
|
||||
* - `Status::BLOCKING` - Querying some parameters requires blocking, but
|
||||
* @p mayBlock is false.
|
||||
* - `Status::NO_MEMORY` - Not enough memory to complete this method.
|
||||
|
@ -208,6 +246,6 @@ interface IConfigurable {
|
|||
* - `Status::TIMED_OUT` - The operation cannot be finished in a timely manner.
|
||||
* - `Status::CORRUPTED` - Some unknown error occurred.
|
||||
*/
|
||||
FieldSupportedValuesQueryResult[] querySupportedValues(
|
||||
QuerySupportedValuesResult querySupportedValues(
|
||||
in FieldSupportedValuesQuery[] inFields, in boolean mayBlock);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue