1 Star 0 Fork 4.9K

平凡 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
OHOS-Media-Recorder.md 19.10 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

OHOS::Media::Recorder

Overview

Related Modules:

MultiMedia_Recorder

Description:

Provides functions for audio and video recording.

Since:

1.0

Version:

1.0

Summary

Public Member Functions

Public Member Function Name

Description

SetVideoSource (VideoSourceType source, int32_t &sourceId)

int32_t 

Sets a video source for recording.

SetVideoEncoder (int32_t sourceId, VideoCodecFormat encoder)

int32_t 

Sets a video encoder for recording.

SetVideoSize (int32_t sourceId, int32_t width, int32_t height)

int32_t 

Sets the width and height of the video to record.

SetVideoFrameRate (int32_t sourceId, int32_t frameRate)

int32_t 

Sets the frame rate of the video to record.

SetVideoEncodingBitRate (int32_t sourceId, int32_t rate)

int32_t 

Sets the encoding bit rate of the video to record.

SetCaptureRate (int32_t sourceId, double fps)

int32_t 

Sets the video capture rate.

GetSurface (int32_t sourceId)

std::shared_ptr< OHOS::Surface

Obtains the surface of the video source.

SetAudioSource (AudioSourceType source, int32_t &sourceId)

int32_t 

Sets the audio source for recording.

SetAudioEncoder (int32_t sourceId, AudioCodecFormat encoder)

int32_t 

Sets an audio encoder for recording.

SetAudioSampleRate (int32_t sourceId, int32_t rate)

int32_t 

Sets the audio sampling rate for recording.

SetAudioChannels (int32_t sourceId, int32_t num)

int32_t 

Sets the number of audio channels to record.

SetAudioEncodingBitRate (int32_t sourceId, int32_t bitRate)

int32_t 

Sets the encoding bit rate of the audio to record.

SetMaxDuration (int32_t duration)

int32_t 

Sets the maximum duration of a recorded file, in seconds.

SetOutputFormat (OutputFormatType format)

int32_t 

Sets the output file format.

SetOutputPath (const string &path)

int32_t 

Sets the output file path.

SetOutputFile (int32_t fd)

int32_t 

Sets the file descriptor (FD) of the output file.

SetNextOutputFile (int32_t fd)

int32_t 

Sets the FD of the next output file.

SetMaxFileSize (int64_t size)

int32_t 

Sets the maximum size of a recorded file, in bytes.

SetRecorderCallback (const std::shared_ptr< RecorderCallback > &callback)

int32_t 

Registers a recording listener.

Prepare ()

int32_t 

Prepares for recording.

Start ()

int32_t 

Starts recording.

Pause ()

int32_t 

Pauses recording.

Resume ()

int32_t 

Resumes recording.

Stop (bool block)

int32_t 

Stops recording.

Reset ()

int32_t 

Resets the recording.

Release ()

int32_t 

Releases recording resources.

SetFileSplitDuration (FileSplitType type, int64_t timestamp, uint32_t duration)

int32_t 

Manually splits a video.

SetParameter (int32_t sourceId, const Format &format)

int32_t 

Sets an extended parameter for recording, for example, RCORDER_PRE_CACHE_DURATION.

1
https://gitee.com/pingfan_vs_hs/docs.git
git@gitee.com:pingfan_vs_hs/docs.git
pingfan_vs_hs
docs
docs
master

搜索帮助