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

Commit 9d5e75bc authored by Wonsik Kim's avatar Wonsik Kim
Browse files

ApexCodecs: add prefix for out params

Bug: 380086439
Bug: 380300185
Test: builds
Change-Id: I35ef38bab4b19c3bf14156df3c7bccd0fe1da70c
parent fb5402c3
Loading
Loading
Loading
Loading
+76 −74
Original line number Diff line number Diff line
@@ -187,14 +187,14 @@ typedef struct ApexCodec_Component ApexCodec_Component;
 *
 * \param store the component store
 * \param name the name of the component
 * \param component out-param to be filled with the component; must not be null
 * \param outComponent out-param to be filled with the component; must not be null
 * \return  APEXCODEC_STATUS_OK         if successful
 *          APEXCODEC_STATUS_NOT_FOUND  if the name is not found
 */
ApexCodec_Status ApexCodec_Component_create(
        ApexCodec_ComponentStore *_Nonnull store,
        const char *_Nonnull name,
        ApexCodec_Component *_Nullable *_Nonnull comp) __INTRODUCED_IN(36);
        ApexCodec_Component *_Nullable *_Nonnull outComponent) __INTRODUCED_IN(36);

/**
 * Destroy the component by the handle. It is invalid to call component methods on the handle
@@ -412,27 +412,27 @@ typedef struct ApexCodec_SupportedValues ApexCodec_SupportedValues;
/**
 * Extract information from ApexCodec_SupportedValues object.
 *
 * \param [in] supportedValues the supported values object
 * \param [out] type        pointer to be filled with the type of the supported values
 * \param [out] numberType  pointer to be filled with the numeric type of the supported values
 * \param [out] values      pointer to be filled with the array of the actual supported values.
 * \param supportedValues   the supported values object
 * \param outType           pointer to be filled with the type of the supported values
 * \param outNumberType     pointer to be filled with the numeric type of the supported values
 * \param outValues         pointer to be filled with the array of the actual supported values.
 *                          if type == APEXCODEC_SUPPORTED_VALUES_EMPTY: nullptr
 *                          if type == APEXCODEC_SUPPORTED_VALUES_RANGE: {min, max, step, num, den}
 *                          if type == APEXCODEC_SUPPORTED_VALUES_VALUES/_FLAGS:
 *                              the array of supported values/flags
 *                          the array is owned by the |supportedValues| object and the client
 *                          should not free it.
 * \param [out] numValues   pointer to be filled with the number of values.
 * \param outNumValues      pointer to be filled with the number of values.
 *                          if type == APEXCODEC_SUPPORTED_VALUES_EMPTY: 0
 *                          if type == APEXCODEC_SUPPORTED_VALUES_RANGE: 5
 *                          if type == APEXCODEC_SUPPORTED_VALUES_VALUES/_FLAGS: varies
 */
ApexCodec_Status ApexCodec_SupportedValues_getTypeAndValues(
        ApexCodec_SupportedValues *_Nonnull supportedValues,
        ApexCodec_SupportedValuesType *_Nonnull type,
        ApexCodec_SupportedValuesNumberType *_Nonnull numberType,
        ApexCodec_Value *_Nullable *_Nonnull values,
        uint32_t *_Nonnull numValues) __INTRODUCED_IN(36);
        ApexCodec_SupportedValuesType *_Nonnull outType,
        ApexCodec_SupportedValuesNumberType *_Nonnull outNumberType,
        ApexCodec_Value *_Nullable *_Nonnull outValues,
        uint32_t *_Nonnull outNumValues) __INTRODUCED_IN(36);

/**
 * Release the supported values object. No-op if |values| is nullptr.
@@ -513,17 +513,17 @@ typedef struct ApexCodec_ParamFieldValues {
 * The client can iterate through the results with index starting from 0 until this function returns
 * APEXCODEC_STATUS_NOT_FOUND.
 *
 * \param [in]  result  the result object
 * \param [in]  index   the index of the result to extract, starts from 0.
 * \param [out] failure pointer to be filled with the failure code
 * \param [out] field   pointer to be filled with the field that failed.
 * \param result        the result object
 * \param index         the index of the result to extract, starts from 0.
 * \param outFailure    pointer to be filled with the failure code
 * \param outField      pointer to be filled with the field that failed.
 *                      |field->value| is owned by the |result| object and the client should not
 *                      free it.
 * \param [out] conflicts   pointer to be filled with the array of conflicts.
 * \param outConflicts      pointer to be filled with the array of conflicts.
 *                          nullptr if |numConflicts| is 0.
 *                          the array and its content is owned by the |result| object and the client
 *                          should not free it.
 * \param [out] numConflicts pointer to be filled with the number of conflicts
 * \param outNumConflicts   pointer to be filled with the number of conflicts
 *                          may be 0 if there are no conflicts
 * \return APEXCODEC_STATUS_OK         if successful
 * \return APEXCODEC_STATUS_NOT_FOUND  if index is out of range
@@ -531,10 +531,10 @@ typedef struct ApexCodec_ParamFieldValues {
ApexCodec_Status ApexCodec_SettingResults_getResultAtIndex(
        ApexCodec_SettingResults *_Nonnull results,
        size_t index,
        ApexCodec_SettingResultFailure *_Nonnull failure,
        ApexCodec_ParamFieldValues *_Nonnull field,
        ApexCodec_ParamFieldValues *_Nullable *_Nonnull conflicts,
        size_t *_Nonnull numConflicts) __INTRODUCED_IN(36);
        ApexCodec_SettingResultFailure *_Nonnull outFailure,
        ApexCodec_ParamFieldValues *_Nonnull outField,
        ApexCodec_ParamFieldValues *_Nullable *_Nonnull outConflicts,
        size_t *_Nonnull outNumConflicts) __INTRODUCED_IN(36);

/**
 * Release the setting result object. No-op if |results| is nullptr.
@@ -551,15 +551,17 @@ void ApexCodec_SettingResults_release(
 * buffer; |output->configUpdates| contains config updates as a result of processing the frame.
 *
 * \param comp          the component to process the buffers
 * \param input     the input buffer; when nullptr, the component should fill |output| if there are
 *                  any pending output buffers.
 * \param input         the input buffer; when nullptr, the component should fill |output|
 *                      if there are any pending output buffers.
 * \param output        the output buffer, should not be nullptr.
 * \param consumed  the number of consumed bytes from the input buffer
 * \param outConsumed   the number of consumed bytes from the input buffer
 *                      set to 0 if no input buffer has been consumed, including |input| is nullptr.
 *                  for graphic buffers, any non-zero value means that the input buffer is consumed.
 * \param produced  the number of bytes produced on the output buffer
 *                      for graphic buffers, any non-zero value means that
 *                      the input buffer is consumed.
 * \param outProduced   the number of bytes produced on the output buffer
 *                      set to 0 if no output buffer has been produced.
 *                  for graphic buffers, any non-zero value means that the output buffer is filled.
 *                      for graphic buffers, any non-zero value means that
 *                      the output buffer is filled.
 * \return APEXCODEC_STATUS_OK         if successful
 * \return APEXCODEC_STATUS_NO_MEMORY  if the output buffer is not suitable to hold the output frame
 *                                     the client should retry with a new output buffer;
@@ -574,8 +576,8 @@ ApexCodec_Status ApexCodec_Component_process(
        ApexCodec_Component *_Nonnull comp,
        const ApexCodec_Buffer *_Nullable input,
        ApexCodec_Buffer *_Nonnull output,
        size_t *_Nonnull consumed,
        size_t *_Nonnull produced) __INTRODUCED_IN(36);
        size_t *_Nonnull outConsumed,
        size_t *_Nonnull outProduced) __INTRODUCED_IN(36);

/**
 * Configure the component with the given config.
@@ -591,10 +593,10 @@ ApexCodec_Status ApexCodec_Component_process(
 * information about the failures. See ApexCodec_SettingResultFailure and ApexCodec_SettingResults
 * for more details.
 *
 * \param [in]    comp   the handle for the component
 * \param [inout] config the config blob; after the call, the config blob is updated to the actual
 * \param comp          the handle for the component
 * \param inoutConfig   the config blob; after the call, the config blob is updated to the actual
 *                      config by the component.
 * \param [out]   result the result of the configuration.
 * \param outResult     the result of the configuration.
 *                      the client should call ApexCodec_SettingResult_getResultAtIndex()
 *                      to extract the result. The result object is owned by the client and should
 *                      be released with ApexCodec_SettingResult_release().
@@ -606,20 +608,20 @@ ApexCodec_Status ApexCodec_Component_process(
 */
ApexCodec_Status ApexCodec_Configurable_config(
        ApexCodec_Configurable *_Nonnull comp,
        ApexCodec_LinearBuffer *_Nonnull config,
        ApexCodec_SettingResults *_Nullable *_Nonnull results) __INTRODUCED_IN(36);
        ApexCodec_LinearBuffer *_Nonnull inoutConfig,
        ApexCodec_SettingResults *_Nullable *_Nonnull outResults) __INTRODUCED_IN(36);

/**
 * Query the component for the given indices.
 *
 * Parameter indices are defined in frameworks/av/media/codec2/core/include/C2Config.h.
 *
 * \param [in] comp         the handle for the component
 * \param [in] indices      the array of indices to query
 * \param [in] numIndices   the size of the indices array
 * \param [inout] config    the output buffer for the config blob, allocated by the client.
 * \param comp          the handle for the component
 * \param indices       the array of indices to query
 * \param numIndices    the size of the indices array
 * \param inoutConfig   the output buffer for the config blob, allocated by the client.
 *                      it can be null to query the required size.
 * \param [out] writtenOrRequired       the number of bytes written to |config|.
 * \param outWrittenOrRequired      the number of bytes written to |config|.
 *                                  if the |config->size| was insufficient, it is set to the
 *                                  required size.
 *
@@ -633,8 +635,8 @@ ApexCodec_Status ApexCodec_Configurable_query(
        ApexCodec_Configurable *_Nonnull comp,
        uint32_t indices[_Nonnull],
        size_t numIndices,
        ApexCodec_LinearBuffer *_Nullable config,
        size_t *_Nonnull writtenOrRequired) __INTRODUCED_IN(36);
        ApexCodec_LinearBuffer *_Nullable inoutConfig,
        size_t *_Nonnull outWrittenOrRequired) __INTRODUCED_IN(36);

/**
 * Struct that represents a parameter descriptor.
@@ -668,32 +670,32 @@ typedef enum ApexCodec_ParamAttribute : uint32_t {
/**
 * Get the parameter indices of the param descriptors.
 *
 * \param [in] descriptors the param descriptors object
 * \param [out] indices the pointer to be filled with the array of the indices;
 * \param descriptors   the param descriptors object
 * \param outIndices    the pointer to be filled with the array of the indices;
 *                      the array is owned by |descriptors| and should not be freed by the client.
 * \param [out] numIndices the size of the indices array
 * \param outNumIndices the size of the indices array
 * \return APEXCODEC_STATUS_OK          if successful
 * \return APEXCODEC_STATUS_BAD_VALUE   if parameters are bad. e.g. |descriptors|, |indices| or
 *                                  |numIndices| is nullptr.
 */
ApexCodec_Status ApexCodec_ParamDescriptors_getIndices(
        ApexCodec_ParamDescriptors *_Nonnull descriptors,
        uint32_t *_Nullable *_Nonnull indices,
        size_t *_Nonnull numIndices) __INTRODUCED_IN(36);
        uint32_t *_Nullable *_Nonnull outIndices,
        size_t *_Nonnull outNumIndices) __INTRODUCED_IN(36);

/**
 * Get the descriptor of the param.
 *
 * \param [in] descriptors the param descriptors object
 * \param [in] index the index of the param
 * \param [out] attr the attribute of the param
 * \param [out] name    the pointer to be filled with the name of the param
 * \param descriptors   the param descriptors object
 * \param index         the index of the param
 * \param outAttr       the attribute of the param
 * \param outName       the pointer to be filled with the name of the param
 *                      the string is owned by |descriptors| and should not be freed by the client.
 * \param [out] dependencies the pointer to be filled with an array of the parameter indices
 * \param outDependencies the pointer to be filled with an array of the parameter indices
 *                        that the parameter with |index| depends on.
 *                        may be null if empty.
 *                        the array is owned by |descriptors| and should not be freed by the client.
 * \param [out] numDependencies the number of dependencies
 * \param outNumDependencies the number of dependencies
 * \return APEXCODEC_STATUS_OK          if successful
 * \return APEXCODEC_STATUS_BAD_VALUE   if parameters are bad. e.g. |descriptors|, |attr|, |name|,
 *                                  |dependencies| or |numDependencies| is nullptr.
@@ -702,10 +704,10 @@ ApexCodec_Status ApexCodec_ParamDescriptors_getIndices(
ApexCodec_Status ApexCodec_ParamDescriptors_getDescriptor(
        ApexCodec_ParamDescriptors *_Nonnull descriptors,
        uint32_t index,
        ApexCodec_ParamAttribute *_Nonnull attr,
        const char *_Nullable *_Nonnull name,
        uint32_t *_Nullable *_Nonnull dependencies,
        size_t *_Nonnull numDependencies) __INTRODUCED_IN(36);
        ApexCodec_ParamAttribute *_Nonnull outAttr,
        const char *_Nullable *_Nonnull outName,
        uint32_t *_Nullable *_Nonnull outDependencies,
        size_t *_Nonnull outNumDependencies) __INTRODUCED_IN(36);

/**
 * Release the param descriptors object.
@@ -719,14 +721,14 @@ ApexCodec_Status ApexCodec_ParamDescriptors_release(
 * Query the component for the supported parameters.
 *
 * \param comp              the handle for the component
 * \param descriptors   the pointer to be filled with the param descriptors object
 * \param outDescriptors    the pointer to be filled with the param descriptors object
 *                          the object should be released with ApexCodec_ParamDescriptors_release().
 * \return APEXCODEC_STATUS_OK          if successful
 * \return APEXCODEC_STATUS_BAD_VALUE   if parameters are bad. e.g. |descriptors| is nullptr.
 */
ApexCodec_Status ApexCodec_Configurable_querySupportedParams(
        ApexCodec_Configurable *_Nonnull comp,
        ApexCodec_ParamDescriptors *_Nullable *_Nonnull descriptors) __INTRODUCED_IN(36);
        ApexCodec_ParamDescriptors *_Nullable *_Nonnull outDescriptors) __INTRODUCED_IN(36);

/**
 * Struct that represents the query for the supported values of a parameter.
@@ -758,14 +760,14 @@ typedef struct ApexCodec_SupportedValuesQuery {
 * Query the component for the supported values of the given indices.
 *
 * \param comp the handle for the component
 * \param queries the array of queries
 * \param inoutQueries the array of queries
 * \param numQueries the size of the queries array
 * \return  APEXCODEC_STATUS_OK         if successful
 *          APEXCODEC_STATUS_CORRUPTED  if unexpected error has occurred
 */
ApexCodec_Status ApexCodec_Configurable_querySupportedValues(
        ApexCodec_Configurable *_Nonnull comp,
        ApexCodec_SupportedValuesQuery *_Nonnull queries,
        ApexCodec_SupportedValuesQuery *_Nonnull inoutQueries,
        size_t numQueries) __INTRODUCED_IN(36);

__END_DECLS
 No newline at end of file