未验证 提交 4ffdf6b4 编写于 作者: O openharmony_ci 提交者: Gitee

!2773 Done! 2588:补充AudioEncoder和AudioOutputFormat的deprecated说明

Merge pull request !2773 from wusongqing/TR2588
......@@ -254,7 +254,7 @@ Enumerates the media description keys.
| MD_KEY_BITRATE | "bitrate" | Bit rate, which is a number, in units of bit/s. |
| MD_KEY_WIDTH | "width" | Video width, which is a number, in units of pixel. |
| MD_KEY_HEIGHT | "height" | Video height, which is a number, in units of pixel. |
| MD_KEY_FRAME_RATE | "frame_rate" | Video frame rate, which is a number, in units of 100 fps. |
| MD_KEY_FRAME_RATE | "frame_rate" | Video frame rate, which is a number, in units of 100 fps.|
| MD_KEY_AUD_CHANNEL_COUNT | "channel_count" | Number of audio channels, which is a number. |
| MD_KEY_AUD_SAMPLE_RATE | "sample_rate" | Sampling rate, which is a number, in units of Hz. |
......@@ -265,7 +265,7 @@ Enumerates the buffering event types.
**System capability**: SystemCapability.Multimedia.Media.Core
| Name | Value | Description |
| ----------------- | ---- | -------------------------- |
| ----------------- | ---- | -------------------------------- |
| BUFFERING_START | 1 | Buffering starts. |
| BUFFERING_END | 2 | Buffering ends. |
| BUFFERING_PERCENT | 3 | Buffering progress, in percent. |
......@@ -283,7 +283,7 @@ For details about the audio playback demo, see [Audio Playback Development](../.
| Name | Type | Readable| Writable| Description |
| ----------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ |
| src | string | Yes | Yes | Audio media URI. The mainstream audio formats (MPEG-4, AAC, MPEG-3, OGG, and WAV) are supported.<br>**Example of supported URIs**:<br>1. FD playback: fd://xx<br>![](figures/en-us_image_url.png)<br>2. HTTP network playback: http://xx<br>3. HLS network playback path (under development)<br>**Note**:<br>To use media materials, you must declare the read permission. Otherwise, the media materials cannot be played properly. |
| src | string | Yes | Yes | Audio media URI. The mainstream audio formats (MPEG-4, AAC, MPEG-3, OGG, and WAV) are supported.<br>**Example of supported URIs**:<br>1. FD playback: fd://xx<br>![](figures/en-us_image_url.png)<br>2. HTTP network playback: http://xx<br>3. HLS network playback path (under development)<br>**Note**:<br>To use media materials, you must declare the read permission. Otherwise, the media materials cannot be played properly.|
| loop | boolean | Yes | Yes | Whether to loop audio playback. The value **true** means to loop audio playback, and **false** means the opposite. |
| currentTime | number | Yes | No | Current audio playback position. |
| duration | number | Yes | No | Audio duration. |
......@@ -368,7 +368,7 @@ Seeks to the specified playback position.
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------ |
| ------ | ------ | ---- | ------------------------------------ |
| timeMs | number | Yes | Position to seek to, in milliseconds.|
**Example**
......@@ -677,7 +677,7 @@ For details about the video playback demo, see [Video Playback Development](../.
| Name | Type | Readable| Writable| Description |
| ------------------------ | ---------------------------------- | ---- | ---- | ------------------------------------------------------------ |
| url<sup>8+</sup> | string | Yes | Yes | Video media URL. The mainstream video formats (MPEG-4, MPEG-TS, WebM, and MKV) are supported.<br>**Example of supported URIs**:<br>1. FD playback: fd://xx<br>![](figures/en-us_image_url.png)<br>2. HTTP network playback: http://xx<br>3. HLS network playback path (under development)<br>**Note**:<br>To use media materials, you must declare the read permission. Otherwise, the media materials cannot be played properly. |
| url<sup>8+</sup> | string | Yes | Yes | Video media URL. The mainstream video formats (MPEG-4, MPEG-TS, WebM, and MKV) are supported.<br>**Example of supported URIs**:<br>1. FD playback: fd://xx<br>![](figures/en-us_image_url.png)<br>2. HTTP network playback: http://xx<br>3. HLS network playback path (under development)<br>**Note**:<br>To use media materials, you must declare the read permission. Otherwise, the media materials cannot be played properly.|
| loop<sup>8+</sup> | boolean | Yes | Yes | Whether to loop video playback. The value **true** means to loop video playback, and **false** means the opposite. |
| currentTime<sup>8+</sup> | number | Yes | No | Current video playback position. |
| duration<sup>8+</sup> | number | Yes | No | Video duration. The value **-1** indicates the live streaming mode. |
......@@ -698,7 +698,7 @@ Sets **SurfaceId**. This API uses a callback to return the result.
| Name | Type | Mandatory| Description |
| --------- | -------- | ---- | ------------------------- |
| surfaceId | string | Yes | Surface ID to set. |
| callback | function | Yes | Callback used to set **SurfaceId**.|
| callback | function | Yes | Callback used to return the result.|
**Example**
......@@ -730,7 +730,7 @@ Sets **SurfaceId**. This API uses a promise to return the result.
| Type | Description |
| ------------- | ------------------------------ |
| Promise<void> | Promise used to set **SurfaceId**.|
| Promise<void> | Promise used to return the result.|
**Example**
......@@ -1027,9 +1027,9 @@ Seeks to the specified playback position. The next key frame at the specified po
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | -------- | ---- | ------------------------------ |
| -------- | -------- | ---- | ------------------------------------ |
| timeMs | number | Yes | Position to seek to, in milliseconds.|
| callback | function | Yes | Callback used to return the result.|
| callback | function | Yes | Callback used to return the result. |
**Example**
......@@ -1054,10 +1054,10 @@ Seeks to the specified playback position. This API uses a callback to return the
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ---------------------- | ---- | ------------------------------ |
| -------- | ---------------------- | ---- | ------------------------------------ |
| timeMs | number | Yes | Position to seek to, in milliseconds.|
| mode | [SeekMode](#seekmode8) | Yes | Seek mode. |
| callback | function | Yes | Callback used to return the result.|
| callback | function | Yes | Callback used to return the result. |
**Example**
......@@ -1082,7 +1082,7 @@ Seeks to the specified playback position. If **mode** is not specified, the next
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ---------------------- | ---- | ------------------------------ |
| ------ | ---------------------- | ---- | ------------------------------------ |
| timeMs | number | Yes | Position to seek to, in milliseconds.|
| mode | [SeekMode](#seekmode8) | No | Seek mode. |
......@@ -1803,11 +1803,14 @@ Describes audio recording configurations.
| numberOfChannels | number | No | Number of audio channels. The default value is **2**. |
| format | [AudioOutputFormat](#audiooutputformat) | No | Audio output format. The default value is **MPEG_4**. |
| location | [Location](#location) | No | Geographical location of the recorded audio. |
| uri | string | Yes | Audio output URI. Supported: fd://xx&nbsp;(fd&nbsp;number)<br>![en-us_image_0000001164217678](figures/en-us_image_url.png)<br>The file must be created by the caller and granted with proper permissions.|
| uri | string | Yes | Audio output URI. Supported: fd://xx&nbsp;(fd&nbsp;number)<br>![en-us_image_0000001164217678](figures/en-us_image_url.png) <br>The file must be created by the caller and granted with proper permissions.|
| audioEncoderMime | [CodecMimeType](#codecmimetype8) | No | Audio encoding format. |
## AudioEncoder
## AudioEncoder<sup>(deprecated)</sup>
> **NOTE**
> This API is deprecated since API version 8. You are advised to use [CodecMimeType](#codecmimetype8) instead.
Enumerates the audio encoding formats.
......@@ -1815,14 +1818,17 @@ Enumerates the audio encoding formats.
| Name | Default Value| Description |
| ------- | ------ | ------------------------------------------------------------ |
| DEFAULT | 0 | Default audio encoding format, which is Adaptive Multi Rate-Narrow Band Speech Codec (AMR-NB).<br>This API is merely defined in OpenHarmony 3.1 Release and cannot be used currently. It can be used in OpenHarmony 3.1 MR.|
| AMR_NB | 1 | AMR-NB.<br>This API is merely defined in OpenHarmony 3.1 Release and cannot be used currently. It can be used in OpenHarmony 3.1 MR.|
| AMR_WB | 2 | Adaptive Multi Rate-Wide Band Speech Codec (AMR-WB).<br>This API is merely defined in OpenHarmony 3.1 Release and cannot be used currently. It can be used in OpenHarmony 3.1 MR.|
| DEFAULT | 0 | Default audio encoding format, which is Adaptive Multi Rate-Narrow Band Speech Codec (AMR-NB).<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| AMR_NB | 1 | AMR-NB.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| AMR_WB | 2 | Adaptive Multi Rate-Wide Band Speech Codec (AMR-WB).<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| AAC_LC | 3 | Advanced Audio Coding Low Complexity (AAC-LC).|
| HE_AAC | 4 | High-Efficiency Advanced&nbsp;Audio&nbsp;Coding (HE_AAC).<br>This API is merely defined in OpenHarmony 3.1 Release and cannot be used currently. It can be used in OpenHarmony 3.1 MR.|
| HE_AAC | 4 | High-Efficiency Advanced&nbsp;Audio&nbsp;Coding (HE_AAC).<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
## AudioOutputFormat<sup>(deprecated)</sup>
## AudioOutputFormat
> **NOTE**
> This API is deprecated since API version 8. You are advised to use [ContainerFormatType ](#containerformattype8) instead.
Enumerates the audio output formats.
......@@ -1830,10 +1836,10 @@ Enumerates the audio output formats.
| Name | Default Value| Description |
| -------- | ------ | ------------------------------------------------------------ |
| DEFAULT | 0 | Default encapsulation format, which is MPEG-4.<br>This API is merely defined in OpenHarmony 3.1 Release and cannot be used currently. It can be used in OpenHarmony 3.1 MR.|
| DEFAULT | 0 | Default encapsulation format, which is MPEG-4.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| MPEG_4 | 2 | MPEG-4. |
| AMR_NB | 3 | AMR_NB.<br>This API is merely defined in OpenHarmony 3.1 Release and cannot be used currently. It can be used in OpenHarmony 3.1 MR.|
| AMR_WB | 4 | AMR_WB.<br>This API is merely defined in OpenHarmony 3.1 Release and cannot be used currently. It can be used in OpenHarmony 3.1 MR.|
| AMR_NB | 3 | AMR_NB.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| AMR_WB | 4 | AMR_WB.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| AAC_ADTS | 6 | Audio Data Transport Stream (ADTS), which is a transport stream format of AAC-based audio.|
## VideoRecorder<sup>9+</sup>
......@@ -1856,7 +1862,7 @@ prepare(config: VideoRecorderConfig, callback: AsyncCallback\<void>): void;
Sets video recording parameters in asynchronous mode. This API uses a callback to return the result.
**Required permissions:** ohos.permission.MICROPHONE and ohos.permission.CAMERA
**Required permissions:** ohos.permission.MICROPHONE
**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
......@@ -2434,7 +2440,7 @@ Enumerates the video recording states. You can obtain the state through the **st
| playing | string | Video recording is in progress. |
| paused | string | Video recording is paused. |
| stopped | string | Video recording is stopped. |
| error | string | Audio playback is in the error state. |
| error | string | Video recording is in the error state. |
## VideoRecorderConfig<sup>9+</sup>
......@@ -2449,7 +2455,7 @@ Describes the video recording parameters.
| profile | [VideoRecorderProfile](#videorecorderprofile9) | Yes | Video recording profile. |
| rotation | number | No | Rotation angle of the recorded video. |
| location | [Location](#location) | No | Geographical location of the recorded video. |
| url | string | Yes | Video output URL. Supported: fd://xx&nbsp;(fd&nbsp;number)<br>![](figures/en-us_image_url.png) <br>The file must be created by the caller and granted with proper permissions.|
| url | string | Yes | Video output URL. Supported: fd://xx&nbsp;(fd&nbsp;number)<br>![](figures/zh-cn_image_url.png) <br>The file must be created by the caller and granted with proper permissions.|
## AudioSourceType<sup>9+</sup>
......@@ -2500,7 +2506,7 @@ Enumerates the container format types (CFTs).
| Name | Value | Description |
| ----------- | ----- | --------------------- |
| CFT_MPEG_4 | "mp4" | Video container format MP4.|
| CFT_MPEG_4 | "mp4" | Video container format MPEG-4 .|
| CFT_MPEG_4A | "m4a" | Audio container format M4A.|
## Location
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册