public interface AliyunIVideoRecorder
限定符和类型 | 方法和说明 |
---|---|
int |
addWaterMark(EffectImage effectImage)
Adds a watermark image.
|
void |
cancelRecording()
Cancels recording.
|
int |
clearBackground() |
void |
destroy()
Releases resources.
|
int |
finishRecording()
Stops recording and starts the composition process.
|
AliyunIClipManager |
getClipManager()
Gets the clip manager.
|
AliyunIVideoCapture |
getVideoCapture() |
void |
prepare() |
void |
removeMusic() |
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(android.graphics.Bitmap bitmap)
Set the background image with bitmap
|
int |
setBackgroundImage(java.lang.String path)
Set the background image with file path
|
void |
setEncoderInfoCallback(EncoderInfoCallback callback)
Sets the callback that outputs encoder parameters.
|
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 |
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()
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()
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(android.graphics.Bitmap bitmap)
bitmap
- AliyunErrorCode.OK
if the invocation is successful or an error code if the invocation fails.int setBackgroundImage(java.lang.String path)
path
- AliyunErrorCode.OK
if the invocation is successful or an error code if the invocation fails.int clearBackground()