提交 b4fb044b 编写于 作者: G Gloria

Update docs against 18988

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 78c09c04
......@@ -114,7 +114,7 @@ In effect, the **isStatusBarLightIcon** and **isNavigationBarLightIcon** attribu
**Reference**
[window.SystemBarProperties](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-window.md#systembarproperties)
[window.SystemBarProperties](../reference/apis/js-apis-window.md#systembarproperties)
## How do I keep the screen always on?
......
......@@ -3,27 +3,26 @@
## Overview
Provides the functions for audio decoding.
Provides the functions for audio decoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Since:**
**Since**
9
## Summary
### Files
| Name | Description |
| Name| Description|
| -------- | -------- |
| [native_avcodec_audiodecoder.h](native__avcodec__audiodecoder_8h.md) | Declares the native APIs used for audio decoding. <br>File to Include: <multimedia/player_framework/native_avcodec_audiodecoder.h> |
| [native_avcodec_audiodecoder.h](native__avcodec__audiodecoder_8h.md) | Declares the native APIs used for audio decoding.<br>File to include: <multimedia/player_framework/native_avcodec_audiodecoder.h> |
### Functions
| Name | Description |
| Name| Description|
| -------- | -------- |
| [OH_AudioDecoder_CreateByMime](#oh_audiodecoder_createbymime) (const char \*mime) | Creates an audio decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. |
| [OH_AudioDecoder_CreateByName](#oh_audiodecoder_createbyname) (const char \*name) | Creates an audio decoder instance based on an audio decoder name. To use this API, you must know the exact name of the audio decoder. |
......@@ -53,11 +52,11 @@ OH_AVErrCode OH_AudioDecoder_Configure (OH_AVCodec * codec, OH_AVFormat * format
**Description**<br>
Configures an audio decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the audio track that can be decoded. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the audio track to be decoded. |
......@@ -76,15 +75,15 @@ Returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) if the op
OH_AVCodec* OH_AudioDecoder_CreateByMime (const char * mime)
```
**Description**<br>
Creates an audio decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases.
Creates an audio decoder instance based on a MIME type. This API is recommended in most cases.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac). |
| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac).|
**Returns**
......@@ -100,11 +99,11 @@ OH_AVCodec* OH_AudioDecoder_CreateByName (const char * name)
**Description**<br>
Creates an audio decoder instance based on an audio decoder name. To use this API, you must know the exact name of the audio decoder.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| name | Indicates the pointer to an audio decoder name. |
......@@ -122,11 +121,11 @@ OH_AVErrCode OH_AudioDecoder_Destroy (OH_AVCodec * codec)
**Description**<br>
Clears the internal resources of an audio decoder and destroys the audio decoder instance.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -146,11 +145,11 @@ OH_AVErrCode OH_AudioDecoder_Flush (OH_AVCodec * codec)
**Description**<br>
Clears the input and output data in the internal buffer of an audio decoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -170,11 +169,11 @@ OH_AVErrCode OH_AudioDecoder_FreeOutputData (OH_AVCodec * codec, uint32_t index
**Description**<br>
Frees an output buffer of an audio decoder.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| index | Indicates the index of an output buffer. |
......@@ -195,11 +194,11 @@ OH_AVFormat* OH_AudioDecoder_GetOutputDescription (OH_AVCodec * codec)
**Description**<br>
Obtains the attributes of the output data of an audio decoder. The caller must manually release the **OH_AVFormat** instance in the return value.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -217,11 +216,11 @@ OH_AVErrCode OH_AudioDecoder_Prepare (OH_AVCodec * codec)
**Description**<br>
Prepares internal resources for an audio decoder. This API must be called after **Configure**.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -241,11 +240,11 @@ OH_AVErrCode OH_AudioDecoder_PushInputData (OH_AVCodec * codec, uint32_t index,
**Description**<br>
Pushes the input buffer filled with data to an audio decoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. In addition, some decoders require the input of codec-specific data to initialize the decoding process.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| index | Indicates the index of an input buffer. |
......@@ -267,11 +266,11 @@ OH_AVErrCode OH_AudioDecoder_Reset (OH_AVCodec * codec)
**Description**<br>
Resets an audio decoder. To continue decoding, you must call **Configure** and **Start** to configure and start the decoder again.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -291,14 +290,14 @@ OH_AVErrCode OH_AudioDecoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCal
**Description**<br>
Sets an asynchronous callback so that your application can respond to events generated by an audio decoder. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md). |
| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md).|
| userData | Indicates the pointer to user-specific data. |
**Returns**
......@@ -317,11 +316,11 @@ OH_AVErrCode OH_AudioDecoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * for
**Description**<br>
Sets dynamic parameters for an audio decoder. This API can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| format | Indicates the handle to an **OH_AVFormat** instance. |
......@@ -342,11 +341,11 @@ OH_AVErrCode OH_AudioDecoder_Start (OH_AVCodec * codec)
**Description**<br>
Starts an audio decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -366,11 +365,11 @@ OH_AVErrCode OH_AudioDecoder_Stop (OH_AVCodec * codec)
**Description**<br>
Stops an audio decoder. After the decoder is stopped, you can call **Start** to start it again. If you have passed codec-specific data in the previous **Start** for the decoder, you must pass it again.
\@syscap SystemCapability.Multimedia.Media.AudioDecoder
@syscap SystemCapability.Multimedia.Media.AudioDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......
......@@ -3,27 +3,26 @@
## Overview
Provides the functions for audio encoding.
Provides the functions for audio encoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Since:**
**Since**
9
## Summary
### Files
| Name | Description |
| Name| Description|
| -------- | -------- |
| [native_avcodec_audioencoder.h](native__avcodec__audioencoder_8h.md) | Declares the native APIs used for audio encoding. <br>File to Include: <multimedia/player_framework/native_avcodec_audioencoder.h> |
| [native_avcodec_audioencoder.h](native__avcodec__audioencoder_8h.md) | Declares the native APIs used for audio encoding.<br>File to include: <multimedia/player_framework/native_avcodec_audioencoder.h> |
### Functions
| Name | Description |
| Name| Description|
| -------- | -------- |
| [OH_AudioEncoder_CreateByMime](#oh_audioencoder_createbymime) (const char \*mime) | Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. |
| [OH_AudioEncoder_CreateByName](#oh_audioencoder_createbyname) (const char \*name) | Creates an audio encoder instance based on an audio encoder name. To use this API, you must know the exact name of the audio encoder. |
......@@ -37,7 +36,7 @@ Provides the functions for audio encoding.
| [OH_AudioEncoder_Reset](#oh_audioencoder_reset) (OH_AVCodec \*codec) | Resets an audio encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again. |
| [OH_AudioEncoder_GetOutputDescription](#oh_audioencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of an audio encoder. The caller must manually release the **OH_AVFormat** instance in the return value. |
| [OH_AudioEncoder_SetParameter](#oh_audioencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for an audio encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure. |
| [OH_AudioEncoder_PushInputData](#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) attr) | Pushes the input buffer filled with data to an audio encoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. |
| [OH_AudioEncoder_PushInputData](#oh_audioencoder_pushinputdata) (OH_AVCodec \*codec, uint32_t index, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) attr) | Pushes the input buffer filled with data to an audio encoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the encoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. |
| [OH_AudioEncoder_FreeOutputData](#oh_audioencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of an audio encoder. |
......@@ -53,11 +52,11 @@ OH_AVErrCode OH_AudioEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format
**Description**<br>
Configures an audio encoder. Typically, you need to configure the attributes of the audio track that can be encoded. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| format | Indicates the handle to an **OH_AVFormat** instance. |
......@@ -76,15 +75,15 @@ Returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) if the op
OH_AVCodec* OH_AudioEncoder_CreateByMime (const char * mime)
```
**Description**<br>
Creates an audio encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases.
Creates an audio encoder instance based on a MIME type. This API is recommended in most cases.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac). |
| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_AUDIO_AAC](_codec_base.md#oh_avcodec_mimetype_audio_aac).|
**Returns**
......@@ -100,11 +99,11 @@ OH_AVCodec* OH_AudioEncoder_CreateByName (const char * name)
**Description**<br>
Creates an audio encoder instance based on an audio encoder name. To use this API, you must know the exact name of the audio encoder.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| name | Indicates the pointer to an audio encoder name. |
......@@ -122,11 +121,11 @@ OH_AVErrCode OH_AudioEncoder_Destroy (OH_AVCodec * codec)
**Description**<br>
Clears the internal resources of an audio encoder and destroys the audio encoder instance.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -146,11 +145,11 @@ OH_AVErrCode OH_AudioEncoder_Flush (OH_AVCodec * codec)
**Description**<br>
Clears the input and output data in the internal buffer of an audio encoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -170,11 +169,11 @@ OH_AVErrCode OH_AudioEncoder_FreeOutputData (OH_AVCodec * codec, uint32_t index
**Description**<br>
Frees an output buffer of an audio encoder.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| index | Indicates the index of an output buffer. |
......@@ -195,11 +194,11 @@ OH_AVFormat* OH_AudioEncoder_GetOutputDescription (OH_AVCodec * codec)
**Description**<br>
Obtains the attributes of the output data of an audio encoder. The caller must manually release the **OH_AVFormat** instance in the return value.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -217,11 +216,11 @@ OH_AVErrCode OH_AudioEncoder_Prepare (OH_AVCodec * codec)
**Description**<br>
Prepares internal resources for an audio encoder. This API must be called after **Configure**.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -239,13 +238,13 @@ Returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) if the op
OH_AVErrCode OH_AudioEncoder_PushInputData (OH_AVCodec * codec, uint32_t index, OH_AVCodecBufferAttr attr )
```
**Description**<br>
Pushes the input buffer filled with data to an audio encoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback.
Pushes the input buffer filled with data to an audio encoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the encoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| index | Indicates the index of an input buffer. |
......@@ -267,11 +266,11 @@ OH_AVErrCode OH_AudioEncoder_Reset (OH_AVCodec * codec)
**Description**<br>
Resets an audio encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -291,14 +290,14 @@ OH_AVErrCode OH_AudioEncoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCal
**Description**<br>
Sets an asynchronous callback so that your application can respond to events generated by an audio encoder. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md). |
| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md).|
| userData | Indicates the pointer to user-specific data. |
**Returns**
......@@ -317,11 +316,11 @@ OH_AVErrCode OH_AudioEncoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * for
**Description**<br>
Sets dynamic parameters for an audio encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| format | Indicates the handle to an **OH_AVFormat** instance. |
......@@ -342,11 +341,11 @@ OH_AVErrCode OH_AudioEncoder_Start (OH_AVCodec * codec)
**Description**<br>
Starts an audio encoder. This API can be called only after the encoder is prepared successfully. After being started, the encoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -366,11 +365,11 @@ OH_AVErrCode OH_AudioEncoder_Stop (OH_AVCodec * codec)
**Description**<br>
Stops an audio encoder. After the encoder is stopped, you can call **Start** to start it again.
\@syscap SystemCapability.Multimedia.Media.AudioEncoder
@syscap SystemCapability.Multimedia.Media.AudioEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......
......@@ -3,11 +3,11 @@
## Overview
Provides the functions for video decoding.
Provides the functions for video decoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Since:**
**Since**
9
......@@ -16,20 +16,20 @@ Provides the functions for video decoding.
### Files
| Name | Description |
| Name| Description|
| -------- | -------- |
| [native_avcodec_videodecoder.h](native__avcodec__videodecoder_8h.md) | Declares the native APIs used for video decoding. <br>File to Include: <multimedia/player_framework/native_avcodec_videodecoder.h> |
| [native_avcodec_videodecoder.h](native__avcodec__videodecoder_8h.md) | Declares the native APIs used for video decoding.<br>File to include: <multimedia/player_framework/native_avcodec_videodecoder.h> |
### Functions
| Name | Description |
| Name| Description|
| -------- | -------- |
| [OH_VideoDecoder_CreateByMime](#oh_videodecoder_createbymime) (const char \*mime) | Creates a video decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. |
| [OH_VideoDecoder_CreateByName](#oh_videodecoder_createbyname) (const char \*name) | Creates a video decoder instance based on a video decoder name. To use this API, you must know the exact name of the video decoder. |
| [OH_VideoDecoder_Destroy](#oh_videodecoder_destroy) (OH_AVCodec \*codec) | Clears the internal resources of a video decoder and destroys the video decoder instance. |
| [OH_VideoDecoder_SetCallback](#oh_videodecoder_setcallback) (OH_AVCodec \*codec, [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md) callback, void \*userData) | Sets an asynchronous callback so that your application can respond to events generated by a video decoder. This API must be called prior to **Prepare**. |
| [OH_VideoDecoder_SetSurface](#oh_videodecoder_setsurface) (OH_AVCodec \*codec, [OHNativeWindow](_native_window.md) \*window) | Sets an output surface for a video decoder. This API must be called prior to **Prepare**. |
| [OH_VideoDecoder_SetSurface](#oh_videodecoder_setsurface) (OH_AVCodec \*codec, OHNativeWindow \*window) | Sets an output surface for a video decoder. This API must be called prior to **Prepare**. |
| [OH_VideoDecoder_Configure](#oh_videodecoder_configure) (OH_AVCodec \*codec, OH_AVFormat \*format) | Configures a video decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the video track that can be decoded. This API must be called prior to **Prepare**. |
| [OH_VideoDecoder_Prepare](#oh_videodecoder_prepare) (OH_AVCodec \*codec) | Prepares internal resources for a video decoder. This API must be called after **Configure**. |
| [OH_VideoDecoder_Start](#oh_videodecoder_start) (OH_AVCodec \*codec) | Starts a video decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event. |
......@@ -55,11 +55,11 @@ OH_AVErrCode OH_VideoDecoder_Configure (OH_AVCodec * codec, OH_AVFormat * format
**Description**<br>
Configures a video decoder. Typically, you need to configure the attributes, which can be extracted from the container, of the video track that can be decoded. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the video track to be decoded. |
......@@ -80,13 +80,13 @@ OH_AVCodec* OH_VideoDecoder_CreateByMime (const char * mime)
**Description**<br>
Creates a video decoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc). |
| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc).|
**Returns**
......@@ -102,11 +102,11 @@ OH_AVCodec* OH_VideoDecoder_CreateByName (const char * name)
**Description**<br>
Creates a video decoder instance based on a video decoder name. To use this API, you must know the exact name of the video decoder.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| name | Indicates the pointer to a video decoder name. |
......@@ -124,11 +124,11 @@ OH_AVErrCode OH_VideoDecoder_Destroy (OH_AVCodec * codec)
**Description**<br>
Clears the internal resources of a video decoder and destroys the video decoder instance.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -148,11 +148,11 @@ OH_AVErrCode OH_VideoDecoder_Flush (OH_AVCodec * codec)
**Description**<br>
Clears the input and output data in the internal buffer of a video decoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -172,11 +172,11 @@ OH_AVErrCode OH_VideoDecoder_FreeOutputData (OH_AVCodec * codec, uint32_t index
**Description**<br>
Frees an output buffer of a video decoder.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| index | Indicates the index of an output buffer. |
......@@ -197,11 +197,11 @@ OH_AVFormat* OH_VideoDecoder_GetOutputDescription (OH_AVCodec * codec)
**Description**<br>
Obtains the attributes of the output data of a video decoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -219,11 +219,11 @@ OH_AVErrCode OH_VideoDecoder_Prepare (OH_AVCodec * codec)
**Description**<br>
Prepares internal resources for a video decoder. This API must be called after **Configure**.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -243,11 +243,11 @@ OH_AVErrCode OH_VideoDecoder_PushInputData (OH_AVCodec * codec, uint32_t index,
**Description**<br>
Pushes the input buffer filled with data to a video decoder. The [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback reports available input buffers and their indexes. After being pushed to the decoder, a buffer is not accessible until the buffer with the same index is reported again through the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) callback. In addition, some decoders require the input of codec-specific data, such as PPS/SPS data in H.264 format, to initialize the decoding process.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| index | Indicates the index of an input buffer. |
......@@ -269,11 +269,11 @@ OH_AVErrCode OH_VideoDecoder_RenderOutputData (OH_AVCodec * codec, uint32_t inde
**Description**<br>
Frees an output buffer of a video decoder and instructs the decoder to render the decoded data in the buffer on the output surface. If no output surface is configured, calling this API only frees the output buffer.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| index | Indicates the index of an output buffer. |
......@@ -294,11 +294,11 @@ OH_AVErrCode OH_VideoDecoder_Reset (OH_AVCodec * codec)
**Description**<br>
Resets a video decoder. To continue decoding, you must call **Configure** and **Start** to configure and start the decoder again.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -318,14 +318,14 @@ OH_AVErrCode OH_VideoDecoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCal
**Description**<br>
Sets an asynchronous callback so that your application can respond to events generated by a video decoder. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md). |
| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md).|
| userData | Indicates the pointer to user-specific data. |
**Returns**
......@@ -344,14 +344,14 @@ OH_AVErrCode OH_VideoDecoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * for
**Description**<br>
Sets dynamic parameters for a video decoder. This API can be called only after the decoder is started. Incorrect parameter settings may cause decoding failure.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| format | Indicates the handle to an **OH_AVFormat** instance. |
| format | Indicates the pointer to an **OH_AVFormat** instance. |
**Returns**
......@@ -369,11 +369,11 @@ OH_AVErrCode OH_VideoDecoder_SetSurface (OH_AVCodec * codec, OHNativeWindow * wi
**Description**<br>
Sets an output surface for a video decoder. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| window | Indicates the pointer to an **OHNativeWindow** instance. |
......@@ -394,11 +394,11 @@ OH_AVErrCode OH_VideoDecoder_Start (OH_AVCodec * codec)
**Description**<br>
Starts a video decoder. This API can be called only after the decoder is prepared successfully. After being started, the decoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -418,11 +418,11 @@ OH_AVErrCode OH_VideoDecoder_Stop (OH_AVCodec * codec)
**Description**<br>
Stops a video decoder. After the decoder is stopped, you can call **Start** to start it again. If you have passed codec-specific data in the previous **Start** for the decoder, you must pass it again.
\@syscap SystemCapability.Multimedia.Media.VideoDecoder
@syscap SystemCapability.Multimedia.Media.VideoDecoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......
......@@ -3,41 +3,40 @@
## Overview
Provides the functions and enums for video encoding.
Provides the functions and enums for video encoding. This module may not be supported on some devices. You can call [CanIUse](../syscap.md) to check whether this module is supported on your device.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Since:**
**Since**
9
## Summary
### Files
| Name | Description |
| Name| Description|
| -------- | -------- |
| [native_avcodec_videoencoder.h](native__avcodec__videoencoder_8h.md) | Declares the native APIs used for video encoding. <br>File to Include: <multimedia/player_framework/native_avcodec_videoencoder.h> |
| [native_avcodec_videoencoder.h](native__avcodec__videoencoder_8h.md) | Declares the native APIs used for video encoding.<br>File to include: <multimedia/player_framework/native_avcodec_videoencoder.h> |
### Types
| Name | Description |
| Name| Description|
| -------- | -------- |
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) | Enumerates the bit rate modes of video encoding. |
### Enums
| Name | Description |
| Name| Description|
| -------- | -------- |
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) { CBR = 0, VBR = 1, CQ = 2 } | Enumerates the bit rate modes of video encoding. |
| [OH_VideoEncodeBitrateMode](#oh_videoencodebitratemode) { **CBR** = 0, **VBR** = 1, **CQ** = 2 } | Enumerates the bit rate modes of video encoding. |
### Functions
| Name | Description |
| Name| Description|
| -------- | -------- |
| [OH_VideoEncoder_CreateByMime](#oh_videoencoder_createbymime) (const char \*mime) | Creates a video encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases. |
| [OH_VideoEncoder_CreateByName](#oh_videoencoder_createbyname) (const char \*name) | Creates a video encoder instance based on a video encoder name. To use this API, you must know the exact name of the video encoder. |
......@@ -51,7 +50,7 @@ Provides the functions and enums for video encoding.
| [OH_VideoEncoder_Reset](#oh_videoencoder_reset) (OH_AVCodec \*codec) | Resets a video encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again. |
| [OH_VideoEncoder_GetOutputDescription](#oh_videoencoder_getoutputdescription) (OH_AVCodec \*codec) | Obtains the attributes of the output data of a video encoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed. |
| [OH_VideoEncoder_SetParameter](#oh_videoencoder_setparameter) (OH_AVCodec \*codec, OH_AVFormat \*format) | Sets dynamic parameters for a video encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure. |
| [OH_VideoEncoder_GetSurface](#oh_videoencoder_getsurface) (OH_AVCodec \*codec, [OHNativeWindow](_native_window.md) \*\*window) | Obtains an input surface from a video encoder. This API must be called prior to **Prepare**. |
| [OH_VideoEncoder_GetSurface](#oh_videoencoder_getsurface) (OH_AVCodec \*codec, OHNativeWindow \*\*window) | Obtains an input surface from a video encoder. This API must be called prior to **Prepare**. |
| [OH_VideoEncoder_FreeOutputData](#oh_videoencoder_freeoutputdata) (OH_AVCodec \*codec, uint32_t index) | Frees an output buffer of a video encoder. |
| [OH_VideoEncoder_NotifyEndOfStream](#oh_videoencoder_notifyendofstream) (OH_AVCodec \*codec) | Notifies a video encoder that input streams end. This API is recommended in surface mode. |
......@@ -68,7 +67,7 @@ typedef enum OH_VideoEncodeBitrateModeOH_VideoEncodeBitrateMode
**Description**<br>
Enumerates the bit rate modes of video encoding.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
## Enum Description
......@@ -83,13 +82,13 @@ enum OH_VideoEncodeBitrateMode
**Description**<br>
Enumerates the bit rate modes of video encoding.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
| Name | Description |
| Value| Description|
| -------- | -------- |
| CBR | Constant bit rate. |
| VBR | Variable bit rate. |
| CQ | Constant quality. |
| CBR | Constant bit rate.|
| VBR | Variable bit rate.|
| CQ | Constant quality.|
## Function Description
......@@ -104,11 +103,11 @@ OH_AVErrCode OH_VideoEncoder_Configure (OH_AVCodec * codec, OH_AVFormat * format
**Description**<br>
Configures a video encoder. Typically, you need to configure the attributes of the video track that can be encoded. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| format | Indicates the handle to an **OH_AVFormat** instance, which provides the attributes of the video track to be encoded. |
......@@ -127,15 +126,15 @@ Returns an error code defined in [OH_AVErrCode](_core.md#oh_averrcode) if the op
OH_AVCodec* OH_VideoEncoder_CreateByMime (const char * mime)
```
**Description**<br>
Creates a video encoder instance based on a Multipurpose Internet Mail Extension (MIME) type. This API is recommended in most cases.
Creates a video encoder instance based on a MIME type. This API is recommended in most cases.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc). |
| mime | Indicates the pointer to a MIME type. For details, see [OH_AVCODEC_MIMETYPE_VIDEO_AVC](_codec_base.md#oh_avcodec_mimetype_video_avc).|
**Returns**
......@@ -151,11 +150,11 @@ OH_AVCodec* OH_VideoEncoder_CreateByName (const char * name)
**Description**<br>
Creates a video encoder instance based on a video encoder name. To use this API, you must know the exact name of the video encoder.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| name | Indicates the pointer to a video encoder name. |
......@@ -173,11 +172,11 @@ OH_AVErrCode OH_VideoEncoder_Destroy (OH_AVCodec * codec)
**Description**<br>
Clears the internal resources of a video encoder and destroys the video encoder instance.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -197,11 +196,11 @@ OH_AVErrCode OH_VideoEncoder_Flush (OH_AVCodec * codec)
**Description**<br>
Clears the input and output data in the internal buffer of a video encoder. This API invalidates the indexes of all buffers previously reported through the asynchronous callback. Therefore, before calling this API, ensure that the buffers corresponding to the indexes are no longer required.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -221,11 +220,11 @@ OH_AVErrCode OH_VideoEncoder_FreeOutputData (OH_AVCodec * codec, uint32_t index
**Description**<br>
Frees an output buffer of a video encoder.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| index | Indicates the index of an output buffer. |
......@@ -246,11 +245,11 @@ OH_AVFormat* OH_VideoEncoder_GetOutputDescription (OH_AVCodec * codec)
**Description**<br>
Obtains the attributes of the output data of a video encoder. The **OH_AVFormat** instance in the return value will become invalid when this API is called again or when the **OH_AVCodec** instance is destroyed.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -268,11 +267,11 @@ OH_AVErrCode OH_VideoEncoder_GetSurface (OH_AVCodec * codec, OHNativeWindow ** w
**Description**<br>
Obtains an input surface from a video encoder. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| window | Indicates the double pointer to an **OHNativeWindow** instance. |
......@@ -293,11 +292,11 @@ OH_AVErrCode OH_VideoEncoder_NotifyEndOfStream (OH_AVCodec * codec)
**Description**<br>
Notifies a video encoder that input streams end. This API is recommended in surface mode.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -317,11 +316,11 @@ OH_AVErrCode OH_VideoEncoder_Prepare (OH_AVCodec * codec)
**Description**<br>
Prepares internal resources for a video encoder. This API must be called after **Configure**.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -341,11 +340,11 @@ OH_AVErrCode OH_VideoEncoder_Reset (OH_AVCodec * codec)
**Description**<br>
Resets a video encoder. To continue encoding, you must call **Configure** and **Start** to configure and start the encoder again.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -365,14 +364,14 @@ OH_AVErrCode OH_VideoEncoder_SetCallback (OH_AVCodec * codec, OH_AVCodecAsyncCal
**Description**<br>
Sets an asynchronous callback so that your application can respond to events generated by a video encoder. This API must be called prior to **Prepare**.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md). |
| callback | Indicates a collection of all callback functions. For details, see [OH_AVCodecAsyncCallback](_o_h___a_v_codec_async_callback.md).|
| userData | Indicates the pointer to user-specific data. |
**Returns**
......@@ -391,11 +390,11 @@ OH_AVErrCode OH_VideoEncoder_SetParameter (OH_AVCodec * codec, OH_AVFormat * for
**Description**<br>
Sets dynamic parameters for a video encoder. This API can be called only after the encoder is started. Incorrect parameter settings may cause encoding failure.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
| format | Indicates the handle to an **OH_AVFormat** instance. |
......@@ -416,11 +415,11 @@ OH_AVErrCode OH_VideoEncoder_Start (OH_AVCodec * codec)
**Description**<br>
Starts a video encoder. This API can be called only after the encoder is prepared successfully. After being started, the encoder starts to report the [OH_AVCodecOnNeedInputData](_codec_base.md#oh_avcodeconneedinputdata) event.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......@@ -440,11 +439,11 @@ OH_AVErrCode OH_VideoEncoder_Stop (OH_AVCodec * codec)
**Description**<br>
Stops a video encoder. After the encoder is stopped, you can call **Start** to start it again.
\@syscap SystemCapability.Multimedia.Media.VideoEncoder
@syscap SystemCapability.Multimedia.Media.VideoEncoder
**Parameters**
**Parameters**
| Name | Description |
| Name| Description|
| -------- | -------- |
| codec | Indicates the pointer to an **OH_AVCodec** instance. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册