未验证 提交 08120c60 编写于 作者: S shuboxu 提交者: Gitee

update zh-cn/application-dev/media/video-recording.md.

Signed-off-by: Nshuboxu <xushubo1@huawei.com>
上级 3b6026c8
...@@ -63,18 +63,18 @@ AVRecorder详细的API说明请参考[AVRecorder API参考](../reference/apis/js ...@@ -63,18 +63,18 @@ AVRecorder详细的API说明请参考[AVRecorder API参考](../reference/apis/js
```ts ```ts
class AVProfile { class AVProfile {
fileFormat: media.ContainerFormatType; fileFormat: media.ContainerFormatType;
videoBitrate: number; videoBitrate: number;
videoCodec: media.CodecMimeType; videoCodec: media.CodecMimeType;
videoFrameWidth: number; videoFrameWidth: number;
videoFrameHeight: number; videoFrameHeight: number;
videoFrameRate: number; videoFrameRate: number;
} }
class AVConfig { class AVConfig {
videoSourceType: media.VideoSourceType; videoSourceType: media.VideoSourceType;
profile: AVProfile; profile: AVProfile;
url: string; url: string;
rotation: number; rotation: number;
} }
let avProfile: AVProfile = { let avProfile: AVProfile = {
fileFormat : media.ContainerFormatType.CFT_MPEG_4, // 视频文件封装格式,只支持MP4 fileFormat : media.ContainerFormatType.CFT_MPEG_4, // 视频文件封装格式,只支持MP4
...@@ -103,9 +103,9 @@ AVRecorder详细的API说明请参考[AVRecorder API参考](../reference/apis/js ...@@ -103,9 +103,9 @@ AVRecorder详细的API说明请参考[AVRecorder API参考](../reference/apis/js
输入源模块通过SurfaceID可以获取到Surface,通过Surface可以将视频数据流传递给AVRecorder,由AVRecorder再进行视频数据的处理。 输入源模块通过SurfaceID可以获取到Surface,通过Surface可以将视频数据流传递给AVRecorder,由AVRecorder再进行视频数据的处理。
```ts ```ts
avRecorder.getInputSurface().then((surfaceId) => { avRecorder.getInputSurface().then((surfaceId: string) => {
console.info('avRecorder getInputSurface success') console.info('avRecorder getInputSurface success')
}, (error) => { }, (error: Error) => {
console.error('avRecorder getInputSurface failed') console.error('avRecorder getInputSurface failed')
}) })
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册