Lines Matching refs:codec
55 * @brief Create an audio codec instance through the audio codec name.
56 * The premise of using this interface is to know the exact name of the codec.
58 * @param name Audio codec name
65 * @brief Clear the internal resources of the codec and destroy the codec instance
67 * @param codec Pointer to an OH_AVCodec instance
70 * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
76 OH_AVErrCode OH_AudioCodec_Destroy(OH_AVCodec *codec);
80 * can respond to the events generated by the audio codec. This interface must be called before Prepare is called.
82 * @param codec Pointer to an OH_AVCodec instance
91 OH_AVErrCode OH_AudioCodec_RegisterCallback(OH_AVCodec *codec, OH_AVCodecCallback callback, void *userData);
94 * @brief To configure the audio codec, typically, you need to configure the description information of the
97 * @param codec Pointer to an OH_AVCodec instance
108 OH_AVErrCode OH_AudioCodec_Configure(OH_AVCodec *codec, const OH_AVFormat *format);
111 * @brief To prepare the internal resources of the codec, the Configure interface must be called
114 * @param codec Pointer to an OH_AVCodec instance
117 * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
124 OH_AVErrCode OH_AudioCodec_Prepare(OH_AVCodec *codec);
127 * @brief Start the codec, this interface must be called after the Prepare is successful.
128 * After being successfully started, the codec will start reporting NeedInputData events.
130 * @param codec Pointer to an OH_AVCodec instance
133 * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
140 OH_AVErrCode OH_AudioCodec_Start(OH_AVCodec *codec);
143 * @brief Stop the codec. After stopping, you can re-enter the Started state through Start,
144 * but it should be noted that need to re-enter if the codec has been input before
147 * @param codec Pointer to an OH_AVCodec instance
150 * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
157 OH_AVErrCode OH_AudioCodec_Stop(OH_AVCodec *codec);
160 * @brief Clear the input and output data buffered in the codec. After this interface is called, all the Buffer
164 * @param codec Pointer to an OH_AVCodec instance
167 * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
174 OH_AVErrCode OH_AudioCodec_Flush(OH_AVCodec *codec);
177 * @brief Reset the codec. To continue encoding or decoding, you need to call the Configure interface again to
178 * configure the codec instance.
180 * @param codec Pointer to an OH_AVCodec instance
183 * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
188 OH_AVErrCode OH_AudioCodec_Reset(OH_AVCodec *codec);
191 * @brief Get the description information of the output data of the codec, refer to {@link OH_AVFormat} for details.
195 * @param codec Pointer to an OH_AVCodec instance
200 OH_AVFormat *OH_AudioCodec_GetOutputDescription(OH_AVCodec *codec);
203 * @brief Set dynamic parameters to the codec. Note: This interface can only be called after the codec is started.
206 * @param codec Pointer to an OH_AVCodec instance
217 OH_AVErrCode OH_AudioCodec_SetParameter(OH_AVCodec *codec, const OH_AVFormat *format);
220 * @brief Submit the input buffer filled with data to the audio codec. The {@link OH_AVCodecOnNeedInputBuffer} callback
222 * is submitted to the audio codec, the buffer cannot be accessed again until the {@link OH_AVCodecOnNeedInputBuffer}
224 * codecs, it is required to input Codec-Specific-Data to the codec at the beginning to initialize the encoding or
225 * decoding process of the codec.
227 * @param codec Pointer to an OH_AVCodec instance
239 OH_AVErrCode OH_AudioCodec_PushInputBuffer(OH_AVCodec *codec, uint32_t index);
242 * @brief Return the processed output Buffer to the codec.
244 * @param codec Pointer to an OH_AVCodec instance
256 OH_AVErrCode OH_AudioCodec_FreeOutputBuffer(OH_AVCodec *codec, uint32_t index);
259 * @brief Check whether the current codec instance is valid. It can be used fault recovery or app
262 * @param codec Pointer to an OH_AVCodec instance
263 * @param isValid Output Parameter. A pointer to a boolean instance, it is true if the codec instance is valid,
264 * false if the codec instance is invalid
270 OH_AVErrCode OH_AudioCodec_IsValid(OH_AVCodec *codec, bool *isValid);
275 * @param codec Pointer to an OH_AVCodec instance
279 * {@link AV_ERR_INVALID_VAL} 3 - If the codec instance is nullptr or invalid,
281 * {@link AV_ERR_INVALID_STATE} 8 - If the codec service is invalid.
286 OH_AVErrCode OH_AudioCodec_SetDecryptionConfig(OH_AVCodec *codec, MediaKeySession *mediaKeySession,