mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "media.c2 aidl: do not throw status, return instead" into main
This commit is contained in:
@@ -37,12 +37,23 @@ interface IConfigurable {
|
|||||||
android.hardware.media.c2.IConfigurable.ConfigResult config(in android.hardware.media.c2.Params inParams, in boolean mayBlock);
|
android.hardware.media.c2.IConfigurable.ConfigResult config(in android.hardware.media.c2.Params inParams, in boolean mayBlock);
|
||||||
int getId();
|
int getId();
|
||||||
String getName();
|
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.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
|
@VintfStability
|
||||||
parcelable ConfigResult {
|
parcelable ConfigResult {
|
||||||
android.hardware.media.c2.Params params;
|
android.hardware.media.c2.Params params;
|
||||||
android.hardware.media.c2.SettingResult[] failures;
|
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.ParamDescriptor;
|
||||||
import android.hardware.media.c2.Params;
|
import android.hardware.media.c2.Params;
|
||||||
import android.hardware.media.c2.SettingResult;
|
import android.hardware.media.c2.SettingResult;
|
||||||
|
import android.hardware.media.c2.Status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic configuration interface presented by all configurable Codec2 objects.
|
* Generic configuration interface presented by all configurable Codec2 objects.
|
||||||
@@ -34,12 +35,42 @@ interface IConfigurable {
|
|||||||
* Return parcelable for config() interface.
|
* Return parcelable for config() interface.
|
||||||
*
|
*
|
||||||
* This includes the successful config settings along with the failure reasons of
|
* 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
|
@VintfStability
|
||||||
parcelable ConfigResult {
|
parcelable ConfigResult {
|
||||||
Params params;
|
Params params;
|
||||||
SettingResult[] failures;
|
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.
|
* @param mayBlock Whether this call may block or not.
|
||||||
* @return result of config. Params in the result should be in same order
|
* @return result of config. Params in the result should be in same order
|
||||||
* with @p inParams.
|
* 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
|
* - `Status::NO_MEMORY` - Some supported parameters could not be updated
|
||||||
* successfully because they contained unsupported values.
|
* successfully because they contained unsupported values.
|
||||||
* These are returned in @p failures.
|
* These are returned in @p failures.
|
||||||
@@ -146,17 +178,22 @@ interface IConfigurable {
|
|||||||
*
|
*
|
||||||
* @param indices List of C2Param structure indices to query.
|
* @param indices List of C2Param structure indices to query.
|
||||||
* @param mayBlock Whether this call may block or not.
|
* @param mayBlock Whether this call may block or not.
|
||||||
* @return Flattened representation of std::vector<C2Param> object.
|
* @return @p params is the flattened representation of std::vector<C2Param> object.
|
||||||
* Unsupported settings are skipped in the results. The order in @p indices
|
* Technically unsupported settings can be either skipped or invalidated.
|
||||||
* still be preserved except skipped settings.
|
* (Invalidated params will be skipped during unflattening to make these identical.)
|
||||||
* @throws ServiceSpecificException with one of the following values:
|
* 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::NO_MEMORY` - Could not allocate memory for a supported parameter.
|
||||||
* - `Status::BLOCKING` - Querying some parameters requires blocking, but
|
* - `Status::BLOCKING` - Querying some parameters requires blocking, but
|
||||||
* @p mayBlock is false.
|
* @p mayBlock is false.
|
||||||
* - `Status::TIMED_OUT` - The operation cannot be finished in a timely manner.
|
* - `Status::TIMED_OUT` - The operation cannot be finished in a timely manner.
|
||||||
* - `Status::CORRUPTED` - Some unknown error occurred.
|
* - `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
|
* 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 inFields List of field queries.
|
||||||
* @param mayBlock Whether this call may block or not.
|
* @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.
|
* 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
|
* - `Status::BLOCKING` - Querying some parameters requires blocking, but
|
||||||
* @p mayBlock is false.
|
* @p mayBlock is false.
|
||||||
* - `Status::NO_MEMORY` - Not enough memory to complete this method.
|
* - `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::TIMED_OUT` - The operation cannot be finished in a timely manner.
|
||||||
* - `Status::CORRUPTED` - Some unknown error occurred.
|
* - `Status::CORRUPTED` - Some unknown error occurred.
|
||||||
*/
|
*/
|
||||||
FieldSupportedValuesQueryResult[] querySupportedValues(
|
QuerySupportedValuesResult querySupportedValues(
|
||||||
in FieldSupportedValuesQuery[] inFields, in boolean mayBlock);
|
in FieldSupportedValuesQuery[] inFields, in boolean mayBlock);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user