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

复合字幕 更多...

类 com.meicam.effect.sdk.NvsVideoEffectCompoundCaption 继承关系图:
com.meicam.effect.sdk.NvsEffect

Public 成员函数

int getCaptionCount ()
 获取该复合字幕中子字幕的数量 更多...
 
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值 更多...
 
void setOpacity (float opacity)
 设置字幕透明度 更多...
 
float getOpacity ()
 获取透明度 更多...
 
String getCaptionStylePackageId ()
 获得字幕样式包裹ID 更多...
 
void setVideoResolution (NvsVideoResolution resolution)
 设置贴纸渲染的画幅解析度 更多...
 
void setDisableElegantTextHeight (int captionIndex, boolean disableElegantTextHeight)
 由于历史遗留因素,美摄SDK在Android平台的水平文字排版时使用了elegant text height特性,这会导致Android平台的水平排版与其它平台的行间距有差别。设置这个属性会禁止Android水平排版使用elegant text height特性。默认值为false。 更多...
 
boolean getDisableElegantTextHeight (int captionIndex)
 获取是否禁止elegant text height特性 更多...
 
- Public 成员函数 继承自 com.meicam.effect.sdk.NvsEffect
NvsFxDescription getDescription ()
 获取Effect的描述 更多...
 
void setIntVal (String fxParam, int val)
 设置特效的整数参数值 更多...
 
int getIntVal (String fxParam)
 获得特效的整数参数值 更多...
 
void setIntValAtTime (String fxParam, int val, long time)
 设置特效的整数参数值 更多...
 
int getIntValAtTime (String fxParam, long time)
 获得特效的整数参数值 更多...
 
void setFloatVal (String fxParam, double val)
 设置特效的浮点值参数值 更多...
 
double getFloatVal (String fxParam)
 获得特效浮点值参数值 更多...
 
void setFloatValAtTime (String fxParam, double val, long time)
 设置特效的浮点值参数值 更多...
 
double getFloatValAtTime (String fxParam, long time)
 获得特效浮点值参数值 更多...
 
void setBooleanVal (String fxParam, boolean val)
 设置特效布尔值参数值 更多...
 
boolean getBooleanVal (String fxParam)
 获得特效的布尔值参数值 更多...
 
void setBooleanValAtTime (String fxParam, boolean val, long time)
 设置特效布尔值参数值 更多...
 
boolean getBooleanValAtTime (String fxParam, long time)
 获得特效的布尔值参数值 更多...
 
void setStringVal (String fxParam, String val)
 设置特效字符串参数值 更多...
 
String getStringVal (String fxParam)
 获得特效字符串参数值 更多...
 
void setStringValAtTime (String fxParam, String val, long time)
 设置特效字符串参数值 更多...
 
String getStringValAtTime (String fxParam, long time)
 获得特效字符串参数值 更多...
 
void setColorVal (String fxParam, NvsColor val)
 设置特效颜色值参数值 更多...
 
NvsColor getColorVal (String fxParam)
 获得特效颜色值参数值 更多...
 
void setColorValAtTime (String fxParam, NvsColor val, long time)
 设置特效颜色值参数值 更多...
 
NvsColor getColorValAtTime (String fxParam, long time)
 获得特效颜色值参数值 更多...
 
void setPosition2DVal (String fxParam, NvsPosition2D val)
 设置特效二维坐标参数值 更多...
 
NvsPosition2D getPosition2DVal (String fxParam)
 获得特效二维坐标参数值 更多...
 
void setPosition2DValAtTime (String fxParam, NvsPosition2D val, long time)
 设置特效二维坐标参数值 更多...
 
NvsPosition2D getPosition2DValAtTime (String fxParam, long time)
 获得特效二维坐标参数值 更多...
 
void setPosition3DVal (String fxParam, NvsPosition3D val)
 设置特效三维坐标参数值 更多...
 
NvsPosition3D getPosition3DVal (String fxParam)
 获得特效三维坐标参数值 更多...
 
void setPosition3DValAtTime (String fxParam, NvsPosition3D val, long time)
 设置特效三维坐标参数值 更多...
 
NvsPosition3D getPosition3DValAtTime (String fxParam, long time)
 获得特效三维坐标参数值 更多...
 
void setMenuVal (String fxParam, String val)
 设置特效菜单参数值 更多...
 
String getMenuVal (String fxParam)
 获得特效菜单参数值 更多...
 
void setMenuValAtTime (String fxParam, String val, long time)
 设置特效菜单参数值 更多...
 
String getMenuValAtTime (String fxParam, long time)
 获得特效菜单参数值 更多...
 
void setArbDataVal (String fxParam, NvsArbitraryData val)
 设置自定义数据参数值 更多...
 
void setArbDataValAtTime (String fxParam, NvsArbitraryData val, long time)
 设置自定义数据参数值 更多...
 
boolean removeKeyframeAtTime (String fxParam, long time)
 删除参数某一个时间点的关键帧 更多...
 
boolean removeAllKeyframe (String fxParam)
 删除参数的所有关键帧 更多...
 
boolean hasKeyframeList (String fxParam)
 当前参数是否有关键帧列表 更多...
 
long findKeyframeTime (String fxParam, long time, int flags)
 当前参数是否有关键帧列表 更多...
 
boolean setKeyFrameControlPoint (String fxParam, long time, NvsControlPointPair controlPointPair)
 设置关键帧控制点对 更多...
 
NvsControlPointPair getKeyFrameControlPoint (String fxParam, long time)
 返回关键帧控制点对 更多...
 
boolean setKeyFrameControlPointMode (String fxParam, long time, NvsControlPointModePair controlPointModePair)
 设置关键帧控制点模式对 更多...
 
NvsControlPointModePair getKeyFrameControlPointMode (String fxParam, long time)
 返回关键帧控制点模式对 更多...
 
void setFilterIntensity (float intensity)
 设置滤镜的强度 更多...
 
float getFilterIntensity ()
 获得滤镜的强度 更多...
 
void setRegional (boolean isRegional)
 设置滤镜是否为局部滤镜 更多...
 
boolean getRegional ()
 获得滤镜是否为局部滤镜 更多...
 
void setIgnoreBackground (boolean isIgnoreBackground)
 设置局部滤镜是否消除背景 更多...
 
boolean getIgnoreBackground ()
 获得局部滤镜是否消除背景 更多...
 
void setInverseRegion (boolean isInverseRegion)
 设置局部滤镜是否反选区域 更多...
 
boolean getInverseRegion ()
 获得局部滤镜是否反选区域 更多...
 
void setRegion (float[] region)
 设置局部滤镜的控制范围 更多...
 
void setRegionInfo (NvsMaskRegionInfo info)
 设置局部滤镜的控制范围 更多...
 
void setRegionInfoAtTime (NvsMaskRegionInfo info, long time)
 设置某时刻局部滤镜的控制范围 更多...
 
void setRegionalFeatherWidth (float featherWidth)
 设置局部滤镜的羽化宽度 更多...
 
float getRegionalFeatherWidth ()
 获得局部滤镜的羽化宽度 更多...
 
void setRegionCoordinateSystemType (int type)
 设置局部滤镜所在坐标系类型,默认为NDC坐标系 更多...
 
int getRegionCoordinateSystemType ()
 获得局部滤镜所在坐标系类型 更多...
 
void setFilterMask (boolean useMask)
 设置滤镜遮罩 更多...
 
boolean getFilterMask ()
 获得是否使用滤镜遮罩 更多...
 
void release ()
 释放内部使用的资源 更多...
 
NvsParticleSystemContext getParticleSystemContext ()
 
NvsPaintingEffectContext getPaintingEffectContext ()
 
NvsARSceneManipulate getARSceneManipulate ()
 获得NvsARSceneManipulate接口 更多...
 
void setExprVar (String varName, double varValue)
 ??????????????????? 更多...
 
double getExprVar (String varName)
 ??????????????????? 更多...
 

静态 Public 属性

边框类型

static final int BOUNDING_TYPE_TEXT = 0
 文字的实际边框 更多...
 
static final int BOUNDING_TYPE_TEXT_FRAME = 1
 文字框的边框 更多...
 
static final int BOUNDING_TYPE_FRAME = 2
 
- 静态 Public 属性 继承自 com.meicam.effect.sdk.NvsEffect
static final int KEY_FRAME_FIND_MODE_INPUT_TIME_BEFORE = 1
 查找当前时间点之前的关键帧 更多...
 
static final int KEY_FRAME_FIND_MODE_INPUT_TIME_AFTER = 2
 
static final int REGION_COORDINATE_SYSTEM_TYPE_NDC = 0
 NDC坐标系 更多...
 
static final int REGION_COORDINATE_SYSTEM_TYPE_TIMELINE = 1
 
static final int FACE_WARP_EFFECT_STRATEGY_CUSTOM = 0x7FFFFFFF
 

额外继承的成员函数

- Protected 成员函数 继承自 com.meicam.effect.sdk.NvsEffect
void setInternalObject (long internalObject)
 
long getInternalObject ()
 
void finalize () throws Throwable
 

详细描述

复合字幕

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

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

成员函数说明

◆ changeInPoint()

long com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.changeInPoint ( long  newInPoint)
inline

改变字幕显示的入点

参数
newInPoint字幕新的入点(单位微秒)
返回
返回字幕显示的入点(单位微秒)
参见
changeOutPoint
getInPoint
movePosition

◆ changeOutPoint()

long com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.changeOutPoint ( long  newOutPoint)
inline

改变字幕显示的出点

参数
newOutPoint字幕新的出点(单位微秒)
返回
返回字幕显示的出点(单位微秒)
参见
changeInPoint
getOutPoint
movePosition

◆ getAnchorPoint()

PointF com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getAnchorPoint ( )
inline

获取字幕锚点

返回
返回字幕锚点
参见
setAnchorPoint

◆ getCaptionBoundingVertices()

List<PointF> com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getCaptionBoundingVertices ( int  captionIndex,
int  boundingType 
)
inline

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

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

◆ getCaptionCount()

int com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getCaptionCount ( )
inline

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

返回
子字幕数量

◆ getCaptionStylePackageId()

String com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getCaptionStylePackageId ( )
inline

获得字幕样式包裹ID

返回
返回获得的字幕样式资源包ID
自从
2.20.0

◆ getCaptionTranslation()

PointF com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getCaptionTranslation ( )
inline

获取字幕的平移量

返回
返回PointF对象,表示获得的字幕平移量
参见
setCaptionTranslation

◆ getCompoundBoundingVertices()

List<PointF> com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getCompoundBoundingVertices ( int  boundingType)
inline

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

参数
boundingType边框类型。请参见边框类型
返回
返回List<PointF>对象,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点

◆ getDisableElegantTextHeight()

boolean com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getDisableElegantTextHeight ( int  captionIndex)
inline

获取是否禁止elegant text height特性

自从
3.5.2

◆ getFontFamily()

String com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getFontFamily ( int  captionIndex)
inline

获取字幕字体的名字

参数
captionIndex想要获取字体的字幕索引号
返回
返回字幕字体的名字
参见
setFontFamily

◆ getInPoint()

long com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getInPoint ( )
inline

字幕显示的入点

返回
字幕显示的入点(单位微秒)
参见
getOutPoint
changeInPoint

◆ getOpacity()

float com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getOpacity ( )
inline

获取透明度

返回
返回获取的字幕透明度
参见
setOpacity
自从
2.20.0

◆ getOutPoint()

long com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getOutPoint ( )
inline

字幕显示上的出点

返回
字幕显示上的出点(单位微秒)
参见
getInPoint
changeOutPoint

◆ getRotationZ()

float com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getRotationZ ( )
inline

获取字幕旋转角度

返回
返回字幕旋转角度
参见
setRotationZ

◆ getScaleX()

float com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getScaleX ( )
inline

获取字幕水平缩放系数

返回
返回字幕水平缩放系数
参见
setScaleX
getScaleY

◆ getScaleY()

float com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getScaleY ( )
inline

获取字幕垂直缩放系数

返回
返回字幕垂直缩放系数
参见
setScaleY
getScaleX

◆ getText()

String com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getText ( int  captionIndex)
inline

获取字幕文本

参数
captionIndex想要获取文字的字幕索引号
返回
返回字幕文本
参见
setText

◆ getTextColor()

NvsColor com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getTextColor ( int  captionIndex)
inline

获取字幕的颜色值

参数
captionIndex想要获取文本颜色的字幕索引号
返回
返回NvsColor对象,表示文本的颜色值
参见
setTextColor

◆ getZValue()

float com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.getZValue ( )
inline

获取字幕Z值

返回
返回字幕Z值

◆ movePosition()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.movePosition ( long  offset)
inline

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

参数
offset入点和出点改变的偏移值(单位微秒)
参见
changeInPoint
changeOutPoint

◆ rotateCaption()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.rotateCaption ( float  angle,
PointF  anchor 
)
inline

旋转字幕

参数
angle字幕旋转的角度
anchor字幕旋转的锚点

◆ rotateCaptionAroundCenter()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.rotateCaptionAroundCenter ( float  angle,
int  boundingType 
)
inline

绕字幕边框中心旋转

参数
angle字幕旋转的角度
boundingType用于计算中心点的边框类型。请参见边框类型

◆ scaleCaption()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.scaleCaption ( float  scaleFactor,
PointF  anchor 
)
inline

缩放字幕

参数
scaleFactor字幕缩放的因子
anchor字幕缩放的锚点

◆ setAnchorPoint()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setAnchorPoint ( PointF  anchor)
inline

设置字幕锚点

参数
anchor锚点
参见
getAnchorPoint

◆ setCaptionTranslation()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setCaptionTranslation ( PointF  translation)
inline

设置字幕平移量

参数
translation字幕平移的水平和垂直的平移值
参见
getCaptionTranslation

◆ setDisableElegantTextHeight()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setDisableElegantTextHeight ( int  captionIndex,
boolean  disableElegantTextHeight 
)
inline

由于历史遗留因素,美摄SDK在Android平台的水平文字排版时使用了elegant text height特性,这会导致Android平台的水平排版与其它平台的行间距有差别。设置这个属性会禁止Android水平排版使用elegant text height特性。默认值为false。

参数
禁止开启ElegantText Height
自从
3.5.2

◆ setFontFamily()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setFontFamily ( int  captionIndex,
String  family 
)
inline

设置字幕字体

参数
captionIndex想要设置字体的字幕索引号
family字体名称,若设为空字符串,则设为默认字体
参见
getFontFamily

◆ setOpacity()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setOpacity ( float  opacity)
inline

设置字幕透明度

参数
opacity字幕透明度
参见
getOpacity
自从
2.20.0

◆ setRotationZ()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setRotationZ ( float  angle)
inline

对字幕设置旋转角度

参数
angle旋转角度
参见
getRotationZ

◆ setScaleX()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setScaleX ( float  scale)
inline

对字幕设置水平缩放系数

参数
scale水平缩放系数
参见
getScaleX
setScaleY

◆ setScaleY()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setScaleY ( float  scale)
inline

对字幕设置垂直缩放系数

参数
scale垂直缩放系数
参见
getScaleY
setScaleX

◆ setText()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setText ( int  captionIndex,
String  text 
)
inline

设置字幕文本

参数
captionIndex想要设置文字的字幕索引号
text字幕文本
参见
getText

◆ setTextColor()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setTextColor ( int  captionIndex,
NvsColor  textColor 
)
inline

设置字幕文本颜色

参数
captionIndex想要设置文本颜色的字幕索引号
textColor文本颜色值
参见
getTextColor

◆ setVideoResolution()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setVideoResolution ( NvsVideoResolution  resolution)
inline

设置贴纸渲染的画幅解析度

参数
resolution画幅解析度
自从
2.20.0

◆ setZValue()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.setZValue ( float  value)
inline

设置字幕Z值

参数
valuez值

◆ translateCaption()

void com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.translateCaption ( PointF  translationOffset)
inline

平移字幕

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

类成员变量说明

◆ BOUNDING_TYPE_FRAME

final int com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.BOUNDING_TYPE_FRAME = 2
static

包括装饰在内的整体边框

◆ BOUNDING_TYPE_TEXT

final int com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.BOUNDING_TYPE_TEXT = 0
static

文字的实际边框

◆ BOUNDING_TYPE_TEXT_FRAME

final int com.meicam.effect.sdk.NvsVideoEffectCompoundCaption.BOUNDING_TYPE_TEXT_FRAME = 1
static

文字框的边框


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