美摄SDK For Android  2.9.0
Public 成员函数 | 所有成员列表
com.meicam.sdk.NvsTimelineCompoundCaption类 参考

时间线复合字幕 更多...

类 com.meicam.sdk.NvsTimelineCompoundCaption 继承关系图:
com.meicam.sdk.NvsFx com.meicam.sdk.NvsObject

Public 成员函数

int getCaptionCount ()
 获取该复合字幕中子字幕的数量 更多...
 
void setClipAffinityEnabled (boolean enable)
 设置是否开启字幕与视频片段之间的亲和度 更多...
 
boolean getClipAffinityEnabled ()
 获取字幕与片段之间的亲和度是否开启 更多...
 
long getInPoint ()
 字幕在时间线上显示的入点 更多...
 
long getOutPoint ()
 字幕在时间线显示上的出点 更多...
 
long changeInPoint (long newInPoint)
 改变字幕在时间线上显示的入点 更多...
 
long changeOutPoint (long newOutPoint)
 改变字幕在时间线上显示的出点 更多...
 
void movePosition (long offset)
 改变字幕在时间线上的显示位置(入点和出点同时偏移offset值) 更多...
 
void setText (int captionIndex, String text)
 设置字幕文本 更多...
 
String getText (int captionIndex)
 获取字幕文本 更多...
 
void setFontFamily (int captionIndex, String family)
 设置字幕字体 更多...
 
String getFontFamily (int captionIndex)
 获取字幕字体的名字 更多...
 
void setTextColor (int captionIndex, NvsColor textColor)
 设置字幕文本颜色 更多...
 
NvsColor getTextColor (int captionIndex)
 获取字幕的颜色值 更多...
 
void setCaptionTranslation (PointF translation)
 设置字幕平移量 更多...
 
PointF getCaptionTranslation ()
 获取字幕的平移量 更多...
 
void translateCaption (PointF translationOffset)
 平移字幕 更多...
 
void setAnchorPoint (PointF anchor)
 设置字幕锚点 更多...
 
PointF getAnchorPoint ()
 获取字幕锚点 更多...
 
void setScaleX (float scale)
 对字幕设置水平缩放系数 更多...
 
float getScaleX ()
 获取字幕水平缩放系数 更多...
 
void setScaleY (float scale)
 对字幕设置垂直缩放系数 更多...
 
float getScaleY ()
 获取字幕垂直缩放系数 更多...
 
void scaleCaption (float scaleFactor, PointF anchor)
 缩放字幕 更多...
 
void setRotationZ (float angle)
 对字幕设置旋转角度 更多...
 
float getRotationZ ()
 获取字幕旋转角度 更多...
 
void rotateCaption (float angle, PointF anchor)
 旋转字幕 更多...
 
void rotateCaptionAroundCenter (float angle, int boundingType)
 绕字幕边框中心旋转 更多...
 
List< PointF > getCaptionBoundingVertices (int captionIndex, int boundingType)
 获取字幕原始边框变换后的顶点位置 更多...
 
List< PointF > getCompoundBoundingVertices (int boundingType)
 获取复合字幕原始边框变换后的顶点位置 更多...
 
void setZValue (float value)
 设置字幕Z值 更多...
 
float getZValue ()
 获取字幕Z值 更多...
 
- Public 成员函数 继承自 com.meicam.sdk.NvsFx
NvsFxDescription getDescription ()
 获取Fx的描述 更多...
 
void setIntVal (String fxParam, int val)
 设置特效的整数参数值 更多...
 
int getIntVal (String fxParam)
 获得特效的整数参数值 更多...
 
void setFloatVal (String fxParam, double val)
 设置特效的浮点值参数值 更多...
 
double getFloatVal (String fxParam)
 获得特效浮点值参数值 更多...
 
void setBooleanVal (String fxParam, boolean val)
 设置特效布尔值参数值 更多...
 
boolean getBooleanVal (String fxParam)
 获得特效的布尔值参数值 更多...
 
void setStringVal (String fxParam, String val)
 设置特效字符串参数值 更多...
 
String getStringVal (String fxParam)
 获得特效字符串参数值 更多...
 
void setColorVal (String fxParam, NvsColor val)
 设置特效颜色值参数值 更多...
 
NvsColor getColorVal (String fxParam)
 获得特效颜色值参数值 更多...
 
void setPosition2DVal (String fxParam, NvsPosition2D val)
 设置特效二维坐标参数值 更多...
 
NvsPosition2D getPosition2DVal (String fxParam)
 获得特效二维坐标参数值 更多...
 
void setPosition3DVal (String fxParam, NvsPosition3D val)
 设置特效三维坐标参数值 更多...
 
NvsPosition3D getPosition3DVal (String fxParam)
 获得特效三维坐标参数值 更多...
 
void setMenuVal (String fxParam, String val)
 设置特效菜单参数值 更多...
 
String getMenuVal (String fxParam)
 获得特效菜单参数值 更多...
 
void setFilterIntensity (float intensity)
 设置滤镜的强度 更多...
 
float getFilterIntensity ()
 获得滤镜的强度 更多...
 
NvsParticleSystemContext getParticleSystemContext ()
 
NvsARFaceContext getARFaceContext ()
 
NvsPaintingEffectContext getPaintingEffectContext ()
 
NvsARSceneManipulate getARSceneManipulate ()
 获得NvsARSceneManipulate接口 更多...
 
- Public 成员函数 继承自 com.meicam.sdk.NvsObject
void setAttachment (String key, Object value)
 为NvsObject对象添加附加的数据,用来标识NvsObject的对象或者其他用途 更多...
 
Object getAttachment (String key)
 获取NvsObject的附件 更多...
 

静态 Public 属性

边框类型

static final int BOUNDING_TYPE_TEXT = 0
 文字的实际边框 更多...
 
static final int BOUNDING_TYPE_TEXT_FRAME = 1
 文字框的边框 更多...
 
static final int BOUNDING_TYPE_FRAME = 2
 

额外继承的成员函数

- Protected 成员函数 继承自 com.meicam.sdk.NvsObject
void setInternalObject (long internalObject)
 
long getInternalObject ()
 
- Protected 属性 继承自 com.meicam.sdk.NvsObject
long m_internalObject = 0
 

详细描述

时间线复合字幕

时间线复合字幕是视频上叠加的组合型文字,每个复合字幕包含若干个子字幕。编辑视频时,可以添加和移除时间线复合字幕,并对字幕位置进行调整处理,还可以对字体,颜色属性进行修改。

警告
NvsTimelineCompoundCaption类中,所有public API都必须在UI线程使用!!!
自从
2.9.0

成员函数说明

long com.meicam.sdk.NvsTimelineCompoundCaption.changeInPoint ( long  newInPoint)
inline

改变字幕在时间线上显示的入点

参数
newInPoint字幕在时间线上的新的入点(单位微秒)
返回
返回字幕在时间线上的显示的入点(单位微秒)
参见
changeOutPoint
getInPoint
movePosition
long com.meicam.sdk.NvsTimelineCompoundCaption.changeOutPoint ( long  newOutPoint)
inline

改变字幕在时间线上显示的出点

参数
newOutPoint字幕在时间线上的新的出点(单位微秒)
返回
返回字幕在时间线上显示的出点(单位微秒)
参见
changeInPoint
getOutPoint
movePosition
PointF com.meicam.sdk.NvsTimelineCompoundCaption.getAnchorPoint ( )
inline

获取字幕锚点

返回
返回字幕锚点
参见
setAnchorPoint
List<PointF> com.meicam.sdk.NvsTimelineCompoundCaption.getCaptionBoundingVertices ( int  captionIndex,
int  boundingType 
)
inline

获取字幕原始边框变换后的顶点位置

参数
captionIndex要获取顶点位置的字幕索引号
boundingType边框类型。请参见边框类型
返回
返回List<PointF>对象,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点
int com.meicam.sdk.NvsTimelineCompoundCaption.getCaptionCount ( )
inline

获取该复合字幕中子字幕的数量

返回
子字幕数量
PointF com.meicam.sdk.NvsTimelineCompoundCaption.getCaptionTranslation ( )
inline

获取字幕的平移量

返回
返回PointF对象,表示获得的字幕平移量
参见
setCaptionTranslation
boolean com.meicam.sdk.NvsTimelineCompoundCaption.getClipAffinityEnabled ( )
inline

获取字幕与片段之间的亲和度是否开启

返回
返回是否开启字幕与片段之间的亲和度,默认为开启
List<PointF> com.meicam.sdk.NvsTimelineCompoundCaption.getCompoundBoundingVertices ( int  boundingType)
inline

获取复合字幕原始边框变换后的顶点位置

参数
boundingType边框类型。请参见边框类型
返回
返回List<PointF>对象,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点
String com.meicam.sdk.NvsTimelineCompoundCaption.getFontFamily ( int  captionIndex)
inline

获取字幕字体的名字

参数
captionIndex想要获取字体的字幕索引号
返回
返回字幕字体的名字
参见
setFontFamily
long com.meicam.sdk.NvsTimelineCompoundCaption.getInPoint ( )
inline

字幕在时间线上显示的入点

返回
字幕在时间线上显示的入点(单位微秒)
参见
getOutPoint
changeInPoint
long com.meicam.sdk.NvsTimelineCompoundCaption.getOutPoint ( )
inline

字幕在时间线显示上的出点

返回
字幕在时间线显示上的出点(单位微秒)
参见
getInPoint
changeOutPoint
float com.meicam.sdk.NvsTimelineCompoundCaption.getRotationZ ( )
inline

获取字幕旋转角度

返回
返回字幕旋转角度
参见
setRotationZ
float com.meicam.sdk.NvsTimelineCompoundCaption.getScaleX ( )
inline

获取字幕水平缩放系数

返回
返回字幕水平缩放系数
参见
setScaleX
getScaleY
float com.meicam.sdk.NvsTimelineCompoundCaption.getScaleY ( )
inline

获取字幕垂直缩放系数

返回
返回字幕垂直缩放系数
参见
setScaleY
getScaleX
String com.meicam.sdk.NvsTimelineCompoundCaption.getText ( int  captionIndex)
inline

获取字幕文本

参数
captionIndex想要获取文字的字幕索引号
返回
返回字幕文本
参见
setText
NvsColor com.meicam.sdk.NvsTimelineCompoundCaption.getTextColor ( int  captionIndex)
inline

获取字幕的颜色值

参数
captionIndex想要获取文本颜色的字幕索引号
返回
返回NvsColor对象,表示文本的颜色值
参见
setTextColor
float com.meicam.sdk.NvsTimelineCompoundCaption.getZValue ( )
inline

获取字幕Z值

返回
返回字幕Z值
void com.meicam.sdk.NvsTimelineCompoundCaption.movePosition ( long  offset)
inline

改变字幕在时间线上的显示位置(入点和出点同时偏移offset值)

参数
offset入点和出点改变的偏移值(单位微秒)
参见
changeInPoint
changeOutPoint
void com.meicam.sdk.NvsTimelineCompoundCaption.rotateCaption ( float  angle,
PointF  anchor 
)
inline

旋转字幕

参数
angle字幕旋转的角度
anchor字幕旋转的锚点
void com.meicam.sdk.NvsTimelineCompoundCaption.rotateCaptionAroundCenter ( float  angle,
int  boundingType 
)
inline

绕字幕边框中心旋转

参数
angle字幕旋转的角度
boundingType用于计算中心点的边框类型。请参见边框类型
void com.meicam.sdk.NvsTimelineCompoundCaption.scaleCaption ( float  scaleFactor,
PointF  anchor 
)
inline

缩放字幕

参数
scaleFactor字幕缩放的因子
anchor字幕缩放的锚点
void com.meicam.sdk.NvsTimelineCompoundCaption.setAnchorPoint ( PointF  anchor)
inline

设置字幕锚点

参数
anchor锚点
参见
getAnchorPoint
void com.meicam.sdk.NvsTimelineCompoundCaption.setCaptionTranslation ( PointF  translation)
inline

设置字幕平移量

参数
translation字幕平移的水平和垂直的平移值
参见
getCaptionTranslation
void com.meicam.sdk.NvsTimelineCompoundCaption.setClipAffinityEnabled ( boolean  enable)
inline

设置是否开启字幕与视频片段之间的亲和度

参数
enable是否开启字幕与视频片段之间的亲和度
void com.meicam.sdk.NvsTimelineCompoundCaption.setFontFamily ( int  captionIndex,
String  family 
)
inline

设置字幕字体

参数
captionIndex想要设置字体的字幕索引号
family字体名称,若设为空字符串,则设为默认字体
参见
getFontFamily
void com.meicam.sdk.NvsTimelineCompoundCaption.setRotationZ ( float  angle)
inline

对字幕设置旋转角度

参数
angle旋转角度
参见
getRotationZ
void com.meicam.sdk.NvsTimelineCompoundCaption.setScaleX ( float  scale)
inline

对字幕设置水平缩放系数

参数
scale水平缩放系数
参见
getScaleX
setScaleY
void com.meicam.sdk.NvsTimelineCompoundCaption.setScaleY ( float  scale)
inline

对字幕设置垂直缩放系数

参数
scale垂直缩放系数
参见
getScaleY
setScaleX
void com.meicam.sdk.NvsTimelineCompoundCaption.setText ( int  captionIndex,
String  text 
)
inline

设置字幕文本

参数
captionIndex想要设置文字的字幕索引号
text字幕文本
参见
getText
void com.meicam.sdk.NvsTimelineCompoundCaption.setTextColor ( int  captionIndex,
NvsColor  textColor 
)
inline

设置字幕文本颜色

参数
captionIndex想要设置文本颜色的字幕索引号
textColor文本颜色值
参见
getTextColor
void com.meicam.sdk.NvsTimelineCompoundCaption.setZValue ( float  value)
inline

设置字幕Z值

参数
valuez值
void com.meicam.sdk.NvsTimelineCompoundCaption.translateCaption ( PointF  translationOffset)
inline

平移字幕

参数
translationOffset字幕平移的水平和垂直的偏移值
参见
setCaptionTranslation
getCaptionTranslation

类成员变量说明

final int com.meicam.sdk.NvsTimelineCompoundCaption.BOUNDING_TYPE_FRAME = 2
static

包括装饰在内的整体边框

final int com.meicam.sdk.NvsTimelineCompoundCaption.BOUNDING_TYPE_TEXT = 0
static

文字的实际边框

final int com.meicam.sdk.NvsTimelineCompoundCaption.BOUNDING_TYPE_TEXT_FRAME = 1
static

文字框的边框


该类的文档由以下文件生成: