public interface AliyunPasterRender
Modifier and Type | Method and Description |
---|---|
int |
addCaption(AliyunCaption aCaption)
Add Caption
|
int |
addCaptionPaster(Bitmap bmp,
EffectCaption caption)
Deprecated.
|
int |
addCaptionPaster(BitmapGenerator generator,
EffectCaption caption)
Deprecated.
|
int |
addEffectPaster(EffectPaster paster)
添加普通贴图
|
int |
addSubtitle(Bitmap bmp,
EffectText subtitle)
Deprecated.
|
int |
addSubtitle(BitmapGenerator generator,
EffectText subtitle)
Deprecated.
|
int |
applyPaintCanvas(EffectPaint effectPaint)
添加涂鸦
|
java.util.List<AliyunCaption> |
findCaptions(long timeInUs)
Find Caption List at startTime in microseconds
|
Size |
getDisplaySize()
Get the rect of display size
|
int |
hidePaster(EffectPaster paster)
隐藏贴图
|
void |
removeCanvas()
删除涂鸦
|
int |
removeCaption(AliyunCaption caption)
remove Caption
|
int |
removePaster(EffectPaster paster)
移除贴图,调用后底层不再渲染
|
void |
setDisplaySize(int width,
int height)
设置贴图展示区域的大小,该设置影响贴图在视频中的位置和大小,
贴图在视频中的大小为贴图的展示大小与展示区域大小的比例换算到视频区域中,位置的计算同理
|
int |
setEffectWaterMark(EffectImage image)
添加水印
|
void |
setOnPasterResumeAndSave(OnPasterResumeAndSave listener)
设置贴图恢复和保存的回调,因为页面被系统回收后,渲染层资源已经释放,
之前添加的贴图资源也已经不存在,需要在恰当的时机保存当前已经使用的贴图资源,
贴图保存时会回调
OnPasterResumeAndSave 的onPasterSave方法
该回调的参数是贴图列表,因为sdk需要实现保存的贴图与屏幕无关,
所以使用了PasterTrack 类来保存贴图到文件 |
int |
showCaptionPaster(Bitmap bmp,
EffectCaption caption)
Deprecated.
|
int |
showCaptionPaster(BitmapGenerator bitmapGenerator,
EffectCaption caption)
显示字幕贴图
|
int |
showPaster(EffectPaster paster)
显示贴图,基本效果如同调用了removePaster()和addEffectPaster()
|
int |
showTextPaster(Bitmap bmp,
EffectText text)
显示文字贴图
|
int |
showTextPaster(BitmapGenerator generator,
EffectText text)
显示文字贴图
|
int |
updateCaption(AliyunCaption caption)
Update Caption
|
void setDisplaySize(int width, int height)
width
- height
- Size getDisplaySize()
void setOnPasterResumeAndSave(OnPasterResumeAndSave listener)
OnPasterResumeAndSave
的onPasterSave方法
该回调的参数是贴图列表,因为sdk需要实现保存的贴图与屏幕无关,
所以使用了PasterTrack
类来保存贴图到文件listener
- @Deprecated int addSubtitle(Bitmap bmp, EffectText subtitle)
bmp
- 文字贴图的文字图片subtitle
- 贴图描述类AliyunErrorCode.ERROR_DUPLICATE_ADD_EFFECT
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
@Deprecated int addSubtitle(BitmapGenerator generator, EffectText subtitle)
generator
- 文字图片生成器subtitle
- 贴图对象AliyunErrorCode.ERROR_DUPLICATE_ADD_EFFECT
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
int addEffectPaster(EffectPaster paster)
paster
- 贴图描述类AliyunErrorCode.ERROR_DUPLICATE_ADD_EFFECT
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_PARSE_RESOURCE_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
int setEffectWaterMark(EffectImage image)
@Deprecated int addCaptionPaster(Bitmap bmp, EffectCaption caption)
bmp
- 字幕贴图的文字图片caption
- 贴图描述类AliyunErrorCode.ERROR_DUPLICATE_ADD_EFFECT
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED
AliyunEditorErrorCode.SVIDEO_EDITOR_PARSE_RESOURCE_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
@Deprecated int addCaptionPaster(BitmapGenerator generator, EffectCaption caption)
generator
- 字幕贴图的文字图片生成器caption
- 贴图描述类AliyunErrorCode.ERROR_DUPLICATE_ADD_EFFECT
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED
AliyunEditorErrorCode.SVIDEO_EDITOR_PARSE_RESOURCE_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
int removePaster(EffectPaster paster)
paster
- 贴图描述类int hidePaster(EffectPaster paster)
paster
- 贴图描述类int showPaster(EffectPaster paster)
paster
- 贴图描述类int showTextPaster(Bitmap bmp, EffectText text)
bmp
- 文字图片text
- 文字贴图描述int showTextPaster(BitmapGenerator generator, EffectText text)
generator
- text
- int showCaptionPaster(Bitmap bmp, EffectCaption caption)
showCaptionPaster(Bitmap, EffectCaption)
bmp
- 文字图片caption
- 贴图描述int showCaptionPaster(BitmapGenerator bitmapGenerator, EffectCaption caption)
bitmapGenerator
- 文字图片生成器caption
- 贴图描述void removeCanvas()
int applyPaintCanvas(EffectPaint effectPaint)
effectPaint
- AliyunErrorCode.ERROR_EFFECT_USE_FAILED
AliyunErrorCode.ERROR_PARAM_IMAGE_FILE_PATH_INVALID
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED
int addCaption(AliyunCaption aCaption)
aCaption
- Caption Instanceint removeCaption(AliyunCaption caption)
aCaption
- Caption Instanceint updateCaption(AliyunCaption caption)
aCaption
- Caption Instancejava.util.List<AliyunCaption> findCaptions(long timeInUs)
timeInUs
- the caption show time in microseconds