public interface AliyunIVideoRecorder
Modifier and Type | Method and Description |
---|---|
int |
addWaterMark(EffectImage effectImage)
Adds a watermark image.
|
void |
cancelRecording()
Cancels recording.
|
int |
clearBackground()
clear background
|
void |
destroy()
Releases resources.
|
int |
finishRecording()
Stops recording and starts the composition process.
|
Uri |
finishRecordingForEdit()
Added in v3.23.0, stops recording and saves information about recorded clips into a JSON file.
|
AliyunIClipManager |
getClipManager()
Gets the clip manager.
|
AliyunIVideoCapture |
getVideoCapture() |
void |
prepare()
prepare capture sources
Note: call after adding all capture sources,
otherwise can not call
startPreview() and startRecording() |
void |
removeMusic()
Remove the background music
|
int |
removeWaterMark(EffectImage effectImage)
Removes a watermark image.
|
int |
setBackgroundColor(int color)
Set the background color
|
int |
setBackgroundDisplayMode(int displayMode)
Set the background image display mode
|
int |
setBackgroundImage(Bitmap bitmap)
Set the background image with bitmap
|
void |
setEncoderInfoCallback(EncoderInfoCallback callback)
Sets the callback that outputs encoder parameters.
|
void |
setIsAutoClearClipVideos(boolean isAutoClear)
Added in v3.23.0, set whether to clear the clip video files, default is false
Note: if you set true, you should not use
AliyunIRecorder.finishRecordingForEdit() |
int |
setMicDenoiseWeight(int denoiseWeight)
Added in v3.27.0
Denoises the mic audio stream.
|
void |
setMixAudioWeight(int bgmWeight,
int micWeight)
Added in v3.27.0
set the audio volume when mix
|
int |
setMusic(java.lang.String path,
long startTime,
long duration)
Sets the background music during recording.
|
void |
setMute(boolean isMute)
Sets whether to mute the recording.
|
void |
setOnAudioCallback(OnAudioCallBack callback)
Sets the callback that outputs audio data in 44.1 kHz 16-bit mono PCM format.
|
void |
setOnRecordListener(OnVideoRecordListener listener)
Sets the recording listener.
|
void |
setOpenMicAEC(boolean open)
Added in v3.27.0
Set whether to open mic aec effect
|
void |
setOpenMixAudioMode(boolean open)
Added in v3.27.0
Set whether to mix audios, default is false
|
void |
setRate(float rate)
Sets the recording speed.
|
int |
startPreview()
Starts preview.
|
int |
startRecording()
Starts recording.
|
void |
stopPreview()
Stops preview.
|
int |
stopRecording()
Stops recording.
|
int |
updateVideoSize(int width,
int height)
Sets the output video size.
|
java.lang.String |
version()
Gets the SDK version.
|
AliyunIVideoCapture getVideoCapture()
AliyunIClipManager getClipManager()
AliyunIClipManager
int updateVideoSize(int width, int height)
width
- height
- void prepare()
startPreview()
and startRecording()
AliyunIVideoCapture
int startPreview()
Activity#onResume()
.void stopPreview()
Activity#onPause()
.void destroy()
int setMusic(java.lang.String path, long startTime, long duration)
path
- The path of the music file.startTime
- The music start time. Unit: milliseconds.duration
- The duration of the music. Unit: milliseconds.AliyunErrorCode
if the invocation fails.void removeMusic()
void setRate(float rate)
rate
- Valid values: [0.5, 2.0]void setMute(boolean isMute)
isMute
- Whether to mute the recording.int startRecording()
int stopRecording()
int finishRecording()
Uri finishRecordingForEdit()
void cancelRecording()
void setOnRecordListener(OnVideoRecordListener listener)
listener
- OnVideoRecordListener
void setEncoderInfoCallback(EncoderInfoCallback callback)
callback
- EncoderInfoCallback
void setOnAudioCallback(OnAudioCallBack callback)
callback
- java.lang.String version()
int addWaterMark(EffectImage effectImage)
effectImage
- int removeWaterMark(EffectImage effectImage)
effectImage
- The same with the param for addWaterMark(EffectImage)
int setBackgroundColor(int color)
color
- AliyunErrorCode.OK
if the invocation is successful or an error code if the invocation fails.int setBackgroundDisplayMode(int displayMode)
displayMode
- 0:crop 1:fill 2:exact fitAliyunErrorCode.OK
if the invocation is successful or an error code if the invocation fails.int setBackgroundImage(Bitmap bitmap)
bitmap
- AliyunErrorCode.OK
if the invocation is successful or an error code if the invocation fails.int clearBackground()
void setIsAutoClearClipVideos(boolean isAutoClear)
AliyunIRecorder.finishRecordingForEdit()
isAutoClear
- int setMicDenoiseWeight(int denoiseWeight)
denoiseWeight
- 0:close 100:maxvoid setOpenMicAEC(boolean open)
open
- true:open false:closevoid setOpenMixAudioMode(boolean open)
open
- true:open false:closevoid setMixAudioWeight(int bgmWeight, int micWeight)
bgmWeight
- [0~100]micWeight
- [0~100]