OHOS::Media::RecorderCallback::OnError (int32_t errorType, int32_t errorCode)=0
|
virtual void
Called when an error occurs during recording. This callback is used to report recording errors.
|
OHOS::Media::RecorderCallback::OnInfo (int32_t type, int32_t extra)=0
|
virtual void
Called when an information event occurs during recording. This callback is used to report recording information.
|
OHOS::Media::Recorder::SetVideoSource (VideoSourceType source, int32_t &sourceId)
|
int32_t
Sets a video source for recording.
|
OHOS::Media::Recorder::SetVideoEncoder (int32_t sourceId, VideoCodecFormat encoder)
|
int32_t
Sets a video encoder for recording.
|
OHOS::Media::Recorder::SetVideoSize (int32_t sourceId, int32_t width, int32_t height)
|
int32_t
Sets the width and height of the video to record.
|
OHOS::Media::Recorder::SetVideoFrameRate (int32_t sourceId, int32_t frameRate)
|
int32_t
Sets the frame rate of the video to record.
|
OHOS::Media::Recorder::SetVideoEncodingBitRate (int32_t sourceId, int32_t rate)
|
int32_t
Sets the encoding bit rate of the video to record.
|
OHOS::Media::Recorder::SetCaptureRate (int32_t sourceId, double fps)
|
int32_t
Sets the video capture rate.
|
OHOS::Media::Recorder::GetSurface (int32_t sourceId)
|
std::shared_ptr< OHOS::Surface >
Obtains the surface of the video source.
|
OHOS::Media::Recorder::SetAudioSource (AudioSourceType source, int32_t &sourceId)
|
int32_t
Sets the audio source for recording.
|
OHOS::Media::Recorder::SetAudioEncoder (int32_t sourceId, AudioCodecFormat encoder)
|
int32_t
Sets an audio encoder for recording.
|
OHOS::Media::Recorder::SetAudioSampleRate (int32_t sourceId, int32_t rate)
|
int32_t
Sets the audio sampling rate for recording.
|
OHOS::Media::Recorder::SetAudioChannels (int32_t sourceId, int32_t num)
|
int32_t
Sets the number of audio channels to record.
|
OHOS::Media::Recorder::SetAudioEncodingBitRate (int32_t sourceId, int32_t bitRate)
|
int32_t
Sets the encoding bit rate of the audio to record.
|
OHOS::Media::Recorder::SetMaxDuration (int32_t duration)
|
int32_t
Sets the maximum duration of a recorded file, in seconds.
|
OHOS::Media::Recorder::SetOutputFormat (OutputFormatType format)
|
int32_t
Sets the output file format.
|
OHOS::Media::Recorder::SetOutputPath (const string &path)
|
int32_t
Sets the output file path.
|
OHOS::Media::Recorder::SetOutputFile (int32_t fd)
|
int32_t
Sets the file descriptor (FD) of the output file.
|
OHOS::Media::Recorder::SetNextOutputFile (int32_t fd)
|
int32_t
Sets the FD of the next output file.
|
OHOS::Media::Recorder::SetMaxFileSize (int64_t size)
|
int32_t
Sets the maximum size of a recorded file, in bytes.
|
OHOS::Media::Recorder::SetRecorderCallback (const std::shared_ptr< RecorderCallback > &callback)
|
int32_t
Registers a recording listener.
|
OHOS::Media::Recorder::Prepare ()
|
int32_t
Prepares for recording.
|
OHOS::Media::Recorder::Start ()
|
int32_t
Starts recording.
|
OHOS::Media::Recorder::Pause ()
|
int32_t
Pauses recording.
|
OHOS::Media::Recorder::Resume ()
|
int32_t
Resumes recording.
|
OHOS::Media::Recorder::Stop (bool block)
|
int32_t
Stops recording.
|
OHOS::Media::Recorder::Reset ()
|
int32_t
Resets the recording.
|
OHOS::Media::Recorder::Release ()
|
int32_t
Releases recording resources.
|
OHOS::Media::Recorder::SetFileSplitDuration (FileSplitType type, int64_t timestamp, uint32_t duration)
|
int32_t
Manually splits a video.
|
OHOS::Media::Recorder::SetParameter (int32_t sourceId, const Format &format)
|
int32_t
Sets an extended parameter for recording, for example, RCORDER_PRE_CACHE_DURATION.
|