The current repo belongs to Closed status, and some functions are restricted. For details, please refer to the description of repo status
1 Star 1 Fork 5.3K

fork_ohos_wj / docs
Closed

forked from OpenHarmony / docs 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
ohos-media-recorder.md 18.96 KB
Copy Edit Raw Blame History
wenjun authored 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/fork_ohos_wj/docs.git
git@gitee.com:fork_ohos_wj/docs.git
fork_ohos_wj
docs
docs
master

Search