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

字幕 更多...

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

Public 成员函数

void setVideoResolution (NvsVideoResolution resolution)
 设置字幕渲染的画幅解析度 更多...
 
long getInPoint ()
 字幕显示的入点 更多...
 
long getOutPoint ()
 字幕显示上的出点 更多...
 
long changeInPoint (long newInPoint)
 改变字幕显示的入点 更多...
 
long changeOutPoint (long newOutPoint)
 改变字幕显示的出点 更多...
 
void movePosition (long offset)
 改变字幕显示位置(入点和出点同时偏移offset值) 更多...
 
int getRoleInTheme ()
 字幕在主题中的角色 更多...
 
int getCategory ()
 获得字幕的种类 更多...
 
String getCaptionStylePackageId ()
 获得字幕样式包裹ID 更多...
 
String getModularCaptionContextPackageId ()
 获得模块字幕环境样式包裹ID 更多...
 
String getModularCaptionRendererPackageId ()
 获得模块字幕渲染样式包裹ID 更多...
 
String getModularCaptionAnimationPackageId ()
 获得模块字幕循环动画样式包裹ID 更多...
 
String getModularCaptionInAnimationPackageId ()
 获得模块字幕入动画样式包裹ID 更多...
 
String getModularCaptionOutAnimationPackageId ()
 获得模块字幕出动画样式包裹ID 更多...
 
boolean applyCaptionStyle (String captionStylePackageId)
 运用字幕样式 更多...
 
boolean applyCaptionStyle (String captionStylePackageId, int isUseDefaultAssetParam)
 运用字幕样式 更多...
 
boolean applyModularCaptionContext (String captionContextPackageId)
 运用模块字幕环境样式包 更多...
 
boolean applyModularCaptionRenderer (String captionRendererPackageId)
 运用模块字幕渲染样式包 更多...
 
boolean applyModularCaptionAnimation (String captionAnimationPackageId)
 运用模块字幕循环动画样式包 更多...
 
boolean applyModularCaptionInAnimation (String captionInAnimationPackageId)
 运用模块字幕入动画样式包。注意:如果已经应用了循环动画样式包,需要先把循环动画设置为null,否则不生效 更多...
 
boolean applyModularCaptionOutAnimation (String captionOutAnimationPackageId)
 运用模块字幕出动画样式包. 注意:如果已经应用了循环动画样式包,需要先把循环动画设置为null,否则不生效 更多...
 
void setModularCaptionAnimationPeroid (int periodInMS)
 设置模块字幕循环动画的周期 更多...
 
int getModularCaptionAnimationPeroid ()
 获取模块字幕循环动画的周期 更多...
 
void setModularCaptionInAnimationDuration (int inAnimationDurationInMS)
 设置模块字幕入动画的时长 更多...
 
int getModularCaptionInAnimationDuration ()
 获取模块字幕入动画的时长 更多...
 
void setModularCaptionOutAnimationDuration (int outAnimationDurationInMS)
 设置模块字幕出动画的时长 更多...
 
int getModularCaptionOutAnimationDuration ()
 获取模块字幕出动画的时长 更多...
 
void setText (String text)
 设置字幕文本 更多...
 
String getText ()
 获取字幕文本 更多...
 
void setVerticalLayout (boolean verticalLayout)
 设置字幕是否竖向排版 更多...
 
boolean getVerticalLayout ()
 获取字幕是否竖向排版 更多...
 
void setTextAlignment (int textAlign)
 设置字幕水平对齐方式 更多...
 
int getTextAlignment ()
 获取字幕水平对齐方式 更多...
 
void setTextVerticalAlignment (int verticalTextAlign)
 设置字幕垂直对齐方式 更多...
 
int getTextVerticalAlignment ()
 获取字幕垂直对齐方式 更多...
 
void setBold (boolean bold)
 设置字幕字体加粗 更多...
 
boolean getBold ()
 获取字幕字体加粗状态 更多...
 
void setWeight (int weight)
 设置字幕权重 更多...
 
int getWeight ()
 获取字幕权重值 更多...
 
void setItalic (boolean italic)
 设置字幕字体斜体 更多...
 
boolean getItalic ()
 获取字幕斜体状态 更多...
 
void setUnderline (boolean underline)
 设置字幕下划线 更多...
 
boolean getUnderline ()
 获取字幕下划线状态 更多...
 
void setLetterSpacingType (int letterSpacingType)
 设置字幕字间距类型 更多...
 
int getLetterSpacingType ()
 获取字幕字间距类型 更多...
 
void setLetterSpacing (float letterSpacing)
 设置字幕字间距 更多...
 
float getLetterSpacing ()
 获取字幕字间距 更多...
 
void setLineSpacing (float lineSpacing)
 设置字幕行间距 更多...
 
float getLineSpacing ()
 获取字幕行间距 更多...
 
void setTextColor (NvsColor textColor)
 设置字幕文本颜色 更多...
 
NvsColor getTextColor ()
 获取字幕字体的当前颜色值 更多...
 
void setDrawOutline (boolean drawOutline)
 设置字幕描边 更多...
 
boolean getDrawOutline ()
 获取字幕描边状态 更多...
 
void setOutlineColor (NvsColor outlineColor)
 设置字幕描边的颜色 更多...
 
NvsColor getOutlineColor ()
 获取当前字幕描边的颜色值 更多...
 
void setOutlineWidth (float outlineWidth)
 设置字幕描边的宽度 更多...
 
float getOutlineWidth ()
 获取当前字幕描边的宽度 更多...
 
void setDrawShadow (boolean drawShadow)
 设置字幕阴影 更多...
 
boolean getDrawShadow ()
 获取当前字幕阴影状态 更多...
 
void setShadowColor (NvsColor shadowColor)
 设置字幕阴影的颜色 更多...
 
NvsColor getShadowColor ()
 获取当前字幕阴影的颜色 更多...
 
void setShadowOffset (PointF shadowOffset)
 设置字幕阴影的偏移量 更多...
 
PointF getShadowOffset ()
 获取当前字幕阴影的偏移量 更多...
 
void setShadowFeather (float feather)
 设置字幕阴影的羽化程度 更多...
 
float getShadowFeather ()
 获取当前字幕阴影的羽化程度 更多...
 
void setFontSize (float fontSize)
 设置字幕字体大小 更多...
 
float getFontSize ()
 获取当前字幕的字体大小 更多...
 
void setFontByFilePath (String filePath)
 设置字幕字体 更多...
 
String getFontFilePath ()
 获取字幕字体的文件路径 更多...
 
void setFontFamily (String family)
 设置字幕字体 更多...
 
String getFontFamily ()
 获取字幕字体的名字 更多...
 
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 rotateCaption (float angle)
 以字幕中心点为锚点旋转字幕 更多...
 
RectF getTextBoundingRect (boolean actualBoundingRect)
 获取字幕文本矩形框 更多...
 
void setTextFrameOriginRect (RectF rc)
 设置边框字幕的原始边框大小,如果当前字幕不是边框字幕,该函数没有效果. 可以通过getCaptionBoundingVertices中的BOUNDING_TYPE_TEXT_ORIGIN_FRAME获取原始边框大小 更多...
 
List< PointF > getCaptionBoundingVertices (int boundingType)
 获取字幕原始边框变换后的顶点位置 更多...
 
void setSecondaryColor (NvsColor color)
 设置字幕第二个颜色, 目前只应用在卡拉OK字幕上 更多...
 
NvsColor getSecondaryColor ()
 获取字幕字体的当前第二个颜色值 更多...
 
boolean isPanoramic ()
 判断当前字幕是否为全景图字幕 更多...
 
boolean isModular ()
 判断当前字幕是否为模块字幕 更多...
 
void setCenterPolarAngle (float centerPolarAngle)
 对字幕设置中心点的极角。只对全景图字幕有效 更多...
 
float getCenterPolarAngle ()
 获取字幕中心点的极角。只对全景图字幕有效 更多...
 
float getTextCenterPolarAngle ()
 获取字幕文本中心点的极角。只对全景图字幕有效 更多...
 
void setCenterAzimuthAngle (float centerAzimuthAngle)
 对字幕设置中心点的方位角。只对全景图字幕有效 更多...
 
float getCenterAzimuthAngle ()
 获取字幕中心点的方位角。只对全景图字幕有效 更多...
 
float getTextCenterAzimuthAngle ()
 获取字幕文本中心点的方位角。只对全景图字幕有效 更多...
 
void setPolarAngleRange (float polarAngleRange)
 对字幕设置极角的张角。只对全景图字幕有效 更多...
 
float getPolarAngleRange ()
 获取字幕极角的张角。只对全景图字幕有效 更多...
 
float getOrthoAngleRange ()
 获取字幕与极角垂直的张角。只对全景图字幕有效 更多...
 
float getTextPolarAngleRange ()
 获取文本与极角垂直的张角。只对全景图字幕有效 更多...
 
float getTextOrthoAngleRange ()
 获取文本与极角垂直的张角。只对全景图字幕有效 更多...
 
void setPanoramicScaleX (float scaleX)
 对字幕设置水平缩放系数。只对全景图字幕有效 更多...
 
float getPanoramicScaleX ()
 获取字幕水平缩放系数。只对全景图字幕有效 更多...
 
void setPanoramicScaleY (float scaleY)
 对字幕设置垂直缩放系数。只对全景图字幕有效 更多...
 
float getPanoramicScaleY ()
 获取字幕垂直缩放系数。只对全景图字幕有效 更多...
 
void setPanoramicRotation (float rotationAngle)
 对字幕设置旋转角度。只对全景图字幕有效 更多...
 
float getPanoramicRotation ()
 获取字幕旋转角度。只对全景图字幕有效 更多...
 
void setZValue (float value)
 设置字幕Z值 更多...
 
float getZValue ()
 获取字幕Z值 更多...
 
void setRecordingUserOperation (boolean recordingUserOperation)
 设置字幕是否记录用户的操作 更多...
 
void setOpacity (float opacity)
 设置字幕透明度 更多...
 
float getOpacity ()
 获取透明度 更多...
 
void setBackgroundColor (NvsColor backgroundColor)
 设置字幕文本的背景颜色 更多...
 
NvsColor getBackgroundColor ()
 获取字幕文本的当前背景颜色值 更多...
 
void setBackgroundRadius (float radius)
 设置字幕文本的背景框的圆角半径 更多...
 
float getBackgroundRadius ()
 获取字幕文本的当前背景框的圆角半径 更多...
 
void setCurrentKeyFrameTime (long time)
 设置字幕的关键帧时间 更多...
 
boolean isFrameCaption ()
 判断是否是边框字幕 更多...
 
void setFrameCaptionMaxFontSize (float maxFontSize)
 设置边框字幕的最大字号,只有边框字幕才可以使用此方法。 更多...
 
- 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 ()
 
NvsARFaceContext getARFaceContext ()
 获取人脸特效上下文 更多...
 
NvsARSceneManipulate getARSceneManipulate ()
 获得NvsARSceneManipulate接口 更多...
 
void setExprVar (String varName, double varValue)
 ??????????????????? 更多...
 
double getExprVar (String varName)
 ??????????????????? 更多...
 

静态 Public 属性

字幕种类

static final int DEFAULT_CATEGORY = 0
 默认种类 更多...
 
static final int USER_CATEGORY = 1
 用户自定义种类 更多...
 
static final int THEME_CATEGORY = 2
 主题种类 更多...
 
字幕在主题中的角色

static final int ROLE_IN_THEME_GENERAL = 0
 通用 更多...
 
static final int ROLE_IN_THEME_TITLE = 1
 片头 更多...
 
static final int ROLE_IN_THEME_TRAILER = 2
 片尾 更多...
 
字幕对齐方式

static final int TEXT_ALIGNMENT_LEFT = 0
 居左对齐 更多...
 
static final int TEXT_ALIGNMENT_CENTER = 1
 居中对齐 更多...
 
static final int TEXT_ALIGNMENT_RIGHT = 2
 居右对齐 更多...
 
static final int TEXT_ALIGNMENT_TOP = 3
 居上对齐 更多...
 
static final int TEXT_ALIGNMENT_BOTTOM = 4
 居下对齐 更多...
 
static final int TEXT_ALIGNMENT_VCENTER = 5
 垂直居中对齐 更多...
 
使用默认的字幕包属性

static final int USE_ASSET_DEFAULT_PARAM = 0
 使用默认的字幕包属性 更多...
 
static final int NOT_USE_ASSET_DEFAULT_PARAM = 1
 不使用默认的字幕包属性 更多...
 
边框类型

static final int BOUNDING_TYPE_TEXT = 0
 文字的实际边框 更多...
 
static final int BOUNDING_TYPE_TEXT_FRAME = 1
 文字框的边框 更多...
 
static final int BOUNDING_TYPE_FRAME = 2
 包括装饰在内的整体边框 更多...
 
static final int BOUNDING_TYPE_TEXT_ORIGIN_FRAME = 3
 
字间距类型

static final int LETTER_SPACING_TYPE_PERCENTAGE = 0
 文字字间距的类型是百分比 更多...
 
static final int LETTER_SPACING_TYPE_ABSOLUTE = 1
 
- 静态 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
 

详细描述

字幕

字幕是视频上叠加的自定义文字。编辑视频时,可以创建和移除字幕,并对字幕位置进行调整处理。添加完字幕,还可以进行样式设置,包括字体大小,颜色,阴影,描边等。

警告
自从
2.20.0

成员函数说明

◆ applyCaptionStyle() [1/2]

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.applyCaptionStyle ( String  captionStylePackageId)
inline

运用字幕样式

参数
captionStylePackageId字幕样式资源包ID
返回
返回boolean值。true表示成功运用字幕样式,false则运用失败
警告
此接口会引发流媒体引擎状态跳转到引擎停止状态,具体情况请参见引擎变化专题

◆ applyCaptionStyle() [2/2]

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.applyCaptionStyle ( String  captionStylePackageId,
int  isUseDefaultAssetParam 
)
inline

运用字幕样式

参数
captionStylePackageId字幕样式资源包ID
isUseDefaultAssetParam是否使用字幕包裹自带的属性。请参见使用默认的字幕包属性
返回
返回boolean值。true表示成功运用字幕样式,false则运用失败
警告
此接口会引发流媒体引擎状态跳转到引擎停止状态,具体情况请参见引擎变化专题

◆ applyModularCaptionAnimation()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.applyModularCaptionAnimation ( String  captionAnimationPackageId)
inline

运用模块字幕循环动画样式包

参数
captionAnimationPackageId字幕循环动画样式资源包ID
返回
返回boolean值。true表示成功运用,false则运用失败
警告
此接口会引发流媒体引擎状态跳转到引擎停止状态,具体情况请参见引擎变化专题
参见
getModularCaptionAnimationPackageId

◆ applyModularCaptionContext()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.applyModularCaptionContext ( String  captionContextPackageId)
inline

运用模块字幕环境样式包

参数
captionContextPackageId字幕环境样式资源包ID
返回
返回boolean值。true表示成功运用,false则运用失败
警告
此接口会引发流媒体引擎状态跳转到引擎停止状态,具体情况请参见引擎变化专题
参见
getModularCaptionContextPackageId

◆ applyModularCaptionInAnimation()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.applyModularCaptionInAnimation ( String  captionInAnimationPackageId)
inline

运用模块字幕入动画样式包。注意:如果已经应用了循环动画样式包,需要先把循环动画设置为null,否则不生效

参数
captionInAnimationPackageId字幕入动画样式资源包ID
返回
返回boolean值。true表示成功运用,false则运用失败
警告
此接口会引发流媒体引擎状态跳转到引擎停止状态,具体情况请参见引擎变化专题
参见
getModularCaptionInAnimationPackageId

◆ applyModularCaptionOutAnimation()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.applyModularCaptionOutAnimation ( String  captionOutAnimationPackageId)
inline

运用模块字幕出动画样式包. 注意:如果已经应用了循环动画样式包,需要先把循环动画设置为null,否则不生效

参数
captionOutAnimationPackageId字幕出动画样式资源包ID
返回
返回boolean值。true表示成功运用,false则运用失败
警告
此接口会引发流媒体引擎状态跳转到引擎停止状态,具体情况请参见引擎变化专题
参见
getModularCaptionOutAnimationPackageId

◆ applyModularCaptionRenderer()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.applyModularCaptionRenderer ( String  captionRendererPackageId)
inline

运用模块字幕渲染样式包

参数
captionRendererPackageId字幕渲染样式资源包ID
返回
返回boolean值。true表示成功运用,false则运用失败
警告
此接口会引发流媒体引擎状态跳转到引擎停止状态,具体情况请参见引擎变化专题
参见
getModularCaptionRenderPackageId

◆ changeInPoint()

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

改变字幕显示的入点

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

◆ changeOutPoint()

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

改变字幕显示的出点

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

◆ getAnchorPoint()

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

获取字幕锚点

返回
返回字幕锚点
参见
setAnchorPoint

◆ getBackgroundColor()

NvsColor com.meicam.effect.sdk.NvsVideoEffectCaption.getBackgroundColor ( )
inline

获取字幕文本的当前背景颜色值

返回
返回NvsColor对象,表示当前的文本背景颜色值
参见
setBackgroundColor

◆ getBackgroundRadius()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getBackgroundRadius ( )
inline

获取字幕文本的当前背景框的圆角半径

返回
返回圆角半径值
参见
setBackgroundRadius

◆ getBold()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.getBold ( )
inline

获取字幕字体加粗状态

返回
返回字幕字体加粗状态。true表示字体已加粗,false则字体未加粗
参见
setBold

◆ getCaptionBoundingVertices()

List<PointF> com.meicam.effect.sdk.NvsVideoEffectCaption.getCaptionBoundingVertices ( int  boundingType)
inline

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

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

◆ getCaptionStylePackageId()

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

获得字幕样式包裹ID

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

◆ getCaptionTranslation()

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

获取字幕的平移量

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

◆ getCategory()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getCategory ( )
inline

获得字幕的种类

返回
返回获得的字幕种类

◆ getCenterAzimuthAngle()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getCenterAzimuthAngle ( )
inline

获取字幕中心点的方位角。只对全景图字幕有效

返回
返回字幕中心点的方位角,单位为角度

◆ getCenterPolarAngle()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getCenterPolarAngle ( )
inline

获取字幕中心点的极角。只对全景图字幕有效

返回
返回字幕中心点的极角,单位为角度

◆ getDrawOutline()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.getDrawOutline ( )
inline

获取字幕描边状态

返回
返回boolean值,true表示已描边,false则未描边
参见
setDrawOutline

◆ getDrawShadow()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.getDrawShadow ( )
inline

获取当前字幕阴影状态

返回
返回boolean值,true表示有字幕阴影,false则没有字幕阴影
参见
setDrawShadow

◆ getFontFamily()

String com.meicam.effect.sdk.NvsVideoEffectCaption.getFontFamily ( )
inline

获取字幕字体的名字

返回
返回字幕字体的名字
参见
setFontFamily

◆ getFontFilePath()

String com.meicam.effect.sdk.NvsVideoEffectCaption.getFontFilePath ( )
inline

获取字幕字体的文件路径

返回
返回字幕字体的文件路径
参见
setFontByFilePath

◆ getFontSize()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getFontSize ( )
inline

获取当前字幕的字体大小

返回
返回获得的字幕字体大小值
参见
setFontSize

◆ getInPoint()

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

字幕显示的入点

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

◆ getItalic()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.getItalic ( )
inline

获取字幕斜体状态

返回
返回boolean值,true表示是斜体字体,false则不是斜体
参见
setItalic

◆ getLetterSpacing()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getLetterSpacing ( )
inline

获取字幕字间距

返回
返回float值,类型默认百分比值。(LETTER_SPACING_TYPE)
参见
setLetterSpacing
setLetterSpacingType

◆ getLetterSpacingType()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getLetterSpacingType ( )
inline

获取字幕字间距类型

返回
返回字间距类型 (LETTER_SPACING_TYPE)
参见
setLetterSpacingType

◆ getLineSpacing()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getLineSpacing ( )
inline

获取字幕行间距

返回
返回float值, 行间距,绝对值
参见
setLineSpacing

◆ getModularCaptionAnimationPackageId()

String com.meicam.effect.sdk.NvsVideoEffectCaption.getModularCaptionAnimationPackageId ( )
inline

获得模块字幕循环动画样式包裹ID

返回
返回获得的模块字幕循环动画样式资源包ID
参见
isModular
applyModularCaptionAnimation

◆ getModularCaptionAnimationPeroid()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getModularCaptionAnimationPeroid ( )
inline

获取模块字幕循环动画的周期

返回
返回模块字幕的动画周期,注意:单位是毫秒
参见
setModularCaptionAnimationPeroid

◆ getModularCaptionContextPackageId()

String com.meicam.effect.sdk.NvsVideoEffectCaption.getModularCaptionContextPackageId ( )
inline

获得模块字幕环境样式包裹ID

返回
返回获得的模块字幕环境样式资源包ID
参见
isModular
applyModularCaptionContext

◆ getModularCaptionInAnimationDuration()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getModularCaptionInAnimationDuration ( )
inline

获取模块字幕入动画的时长

返回
返回模块字幕入动画的时长,注意:单位是毫秒
参见
setModularCaptionInAnimationDuration

◆ getModularCaptionInAnimationPackageId()

String com.meicam.effect.sdk.NvsVideoEffectCaption.getModularCaptionInAnimationPackageId ( )
inline

获得模块字幕入动画样式包裹ID

返回
返回获得的模块字幕入动画样式资源包ID
参见
isModular
applyModularCaptionInAnimation

◆ getModularCaptionOutAnimationDuration()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getModularCaptionOutAnimationDuration ( )
inline

获取模块字幕出动画的时长

返回
返回模块字幕出动画的时长,注意:单位是毫秒
参见
setModularCaptionOutAnimationDuration

◆ getModularCaptionOutAnimationPackageId()

String com.meicam.effect.sdk.NvsVideoEffectCaption.getModularCaptionOutAnimationPackageId ( )
inline

获得模块字幕出动画样式包裹ID

返回
返回获得的模块字幕出动画样式资源包ID
参见
isModular
applyModularCaptionOutAnimation

◆ getModularCaptionRendererPackageId()

String com.meicam.effect.sdk.NvsVideoEffectCaption.getModularCaptionRendererPackageId ( )
inline

获得模块字幕渲染样式包裹ID

返回
返回获得的模块字幕渲染样式资源包ID
参见
isModular
applyModularCaptionRenderer

◆ getOpacity()

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

获取透明度

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

◆ getOrthoAngleRange()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getOrthoAngleRange ( )
inline

获取字幕与极角垂直的张角。只对全景图字幕有效

返回
返字幕与极角垂直的张角,单位为角度

◆ getOutlineColor()

NvsColor com.meicam.effect.sdk.NvsVideoEffectCaption.getOutlineColor ( )
inline

获取当前字幕描边的颜色值

返回
返回NvsColor对象,表示获得的字幕描边的颜色
参见
setOutlineColor

◆ getOutlineWidth()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getOutlineWidth ( )
inline

获取当前字幕描边的宽度

返回
返回获得的字幕描边的宽度值
参见
setOutlineWidth

◆ getOutPoint()

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

字幕显示上的出点

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

◆ getPanoramicRotation()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getPanoramicRotation ( )
inline

获取字幕旋转角度。只对全景图字幕有效

返回
返回字幕旋转角度

◆ getPanoramicScaleX()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getPanoramicScaleX ( )
inline

获取字幕水平缩放系数。只对全景图字幕有效

返回
返回字幕水平缩放系数

◆ getPanoramicScaleY()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getPanoramicScaleY ( )
inline

获取字幕垂直缩放系数。只对全景图字幕有效

返回
返回字幕垂直缩放系数

◆ getPolarAngleRange()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getPolarAngleRange ( )
inline

获取字幕极角的张角。只对全景图字幕有效

返回
返回字幕极角的张角,单位为角度

◆ getRoleInTheme()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getRoleInTheme ( )
inline

字幕在主题中的角色

返回
返回字幕在主题中的角色

◆ getRotationZ()

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

获取字幕旋转角度

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

◆ getScaleX()

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

获取字幕水平缩放系数

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

◆ getScaleY()

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

获取字幕垂直缩放系数

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

◆ getSecondaryColor()

NvsColor com.meicam.effect.sdk.NvsVideoEffectCaption.getSecondaryColor ( )
inline

获取字幕字体的当前第二个颜色值

返回
返回NvsColor对象,表示获得的颜色值
参见
setSecondaryColor

◆ getShadowColor()

NvsColor com.meicam.effect.sdk.NvsVideoEffectCaption.getShadowColor ( )
inline

获取当前字幕阴影的颜色

返回
返回NvsColor对象,表示获得的字幕阴影颜色值
参见
setShadowColor

◆ getShadowFeather()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getShadowFeather ( )
inline

获取当前字幕阴影的羽化程度

返回
返回羽化程度
参见
setShadowFeather

◆ getShadowOffset()

PointF com.meicam.effect.sdk.NvsVideoEffectCaption.getShadowOffset ( )
inline

获取当前字幕阴影的偏移量

返回
返回PointF对象,表示获得的字幕阴影偏移量
参见
setShadowOffset

◆ getText()

String com.meicam.effect.sdk.NvsVideoEffectCaption.getText ( )
inline

获取字幕文本

返回
返回获取的字幕文本
参见
setText

◆ getTextAlignment()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getTextAlignment ( )
inline

获取字幕水平对齐方式

返回
返回字幕水平对齐方式。请参见字幕对齐方式
参见
setTextAlignment

◆ getTextBoundingRect()

RectF com.meicam.effect.sdk.NvsVideoEffectCaption.getTextBoundingRect ( boolean  actualBoundingRect)
inline

获取字幕文本矩形框

参数
actualBoundingRect紧致的矩形框
返回
返回RectF对象,表示获得的字幕文本矩形框

◆ getTextCenterAzimuthAngle()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getTextCenterAzimuthAngle ( )
inline

获取字幕文本中心点的方位角。只对全景图字幕有效

返回
返回字幕文本中心点的方位角,单位为角度

◆ getTextCenterPolarAngle()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getTextCenterPolarAngle ( )
inline

获取字幕文本中心点的极角。只对全景图字幕有效

返回
返回字幕文本中心点的极角,单位为角度

◆ getTextColor()

NvsColor com.meicam.effect.sdk.NvsVideoEffectCaption.getTextColor ( )
inline

获取字幕字体的当前颜色值

返回
返回NvsColor对象,表示获得的颜色值
参见
setTextColor

◆ getTextOrthoAngleRange()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getTextOrthoAngleRange ( )
inline

获取文本与极角垂直的张角。只对全景图字幕有效

返回
返文本与极角垂直的张角,单位为角度

◆ getTextPolarAngleRange()

float com.meicam.effect.sdk.NvsVideoEffectCaption.getTextPolarAngleRange ( )
inline

获取文本与极角垂直的张角。只对全景图字幕有效

返回
返回文本与极角垂直的张角,单位为角度

◆ getTextVerticalAlignment()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getTextVerticalAlignment ( )
inline

获取字幕垂直对齐方式

返回
返回字幕垂直对齐方式。请参见字幕对齐方式
参见
setTextVerticalAlignment

◆ getUnderline()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.getUnderline ( )
inline

获取字幕下划线状态

返回
返回boolean值,true表示是下划线,false则不是下划线
参见
setUnderline

◆ getVerticalLayout()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.getVerticalLayout ( )
inline

获取字幕是否竖向排版

返回
返回字幕是否竖向排版
参见
setVerticalLayout

◆ getWeight()

int com.meicam.effect.sdk.NvsVideoEffectCaption.getWeight ( )
inline

获取字幕权重值

返回
字幕权重值
参见
setWeight

◆ getZValue()

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

获取字幕Z值

返回
返回字幕Z值

◆ isFrameCaption()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.isFrameCaption ( )
inline

判断是否是边框字幕

返回
返回值为true表示为边框字幕

◆ isModular()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.isModular ( )
inline

判断当前字幕是否为模块字幕

返回
返回值为true表示为模块字幕

◆ isPanoramic()

boolean com.meicam.effect.sdk.NvsVideoEffectCaption.isPanoramic ( )
inline

判断当前字幕是否为全景图字幕

返回
返回值为true表示为全景图字幕

◆ movePosition()

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

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

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

◆ rotateCaption() [1/2]

void com.meicam.effect.sdk.NvsVideoEffectCaption.rotateCaption ( float  angle)
inline

以字幕中心点为锚点旋转字幕

参数
angle字幕旋转的角度

◆ rotateCaption() [2/2]

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

旋转字幕

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

◆ scaleCaption()

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

缩放字幕

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

◆ setAnchorPoint()

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

设置字幕锚点

参数
anchor锚点
参见
getAnchorPoint

◆ setBackgroundColor()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setBackgroundColor ( NvsColor  backgroundColor)
inline

设置字幕文本的背景颜色

参数
backgroundColor文本背景颜色值
参见
getBackgroundColor

◆ setBackgroundRadius()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setBackgroundRadius ( float  radius)
inline

设置字幕文本的背景框的圆角半径

参数
radius圆角半径值
参见
getBackgroundRadius

◆ setBold()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setBold ( boolean  bold)
inline

设置字幕字体加粗

参数
bold表示字幕字体是否加粗。true表示加粗,false则不加粗
参见
getBold

◆ setCaptionTranslation()

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

设置字幕平移量

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

◆ setCenterAzimuthAngle()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setCenterAzimuthAngle ( float  centerAzimuthAngle)
inline

对字幕设置中心点的方位角。只对全景图字幕有效

参数
centerAzimuthAngle中心点的极角,单位为角度

◆ setCenterPolarAngle()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setCenterPolarAngle ( float  centerPolarAngle)
inline

对字幕设置中心点的极角。只对全景图字幕有效

参数
centerPolarAngle中心点的极角,单位为角度

◆ setCurrentKeyFrameTime()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setCurrentKeyFrameTime ( long  time)
inline

设置字幕的关键帧时间

参见
setCurrentKeyFrameTime

◆ setDrawOutline()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setDrawOutline ( boolean  drawOutline)
inline

设置字幕描边

参数
drawOutline是否对字幕描边。true表示对字幕进行描边,false则不描边
参见
getDrawOutline

◆ setDrawShadow()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setDrawShadow ( boolean  drawShadow)
inline

设置字幕阴影

参数
drawShadow是否设置字幕阴影。true表示设置字幕阴影,false则不设置
参见
getDrawShadow

◆ setFontByFilePath()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setFontByFilePath ( String  filePath)
inline

设置字幕字体

参数
filePath字幕字体的文件路径,若设为空字符串,则设为默认字体
参见
getFontFilePath

◆ setFontFamily()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setFontFamily ( String  family)
inline

设置字幕字体

参数
family字幕字体名字,若设为空字符串,则设为默认字体
参见
getFontFamily

◆ setFontSize()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setFontSize ( float  fontSize)
inline

设置字幕字体大小

参数
fontSize字幕字体大小值
参见
getFontSize

◆ setFrameCaptionMaxFontSize()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setFrameCaptionMaxFontSize ( float  maxFontSize)
inline

设置边框字幕的最大字号,只有边框字幕才可以使用此方法。

◆ setItalic()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setItalic ( boolean  italic)
inline

设置字幕字体斜体

参数
italic是否设为斜体。true表示设置字幕字体为斜体,false则不设为斜体
参见
getItalic

◆ setLetterSpacing()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setLetterSpacing ( float  letterSpacing)
inline

设置字幕字间距

参数
letterSpacing字间距,类型默认百分比。(LETTER_SPACING_TYPE)
参见
getLetterSpacing
setLetterSpacingType

◆ setLetterSpacingType()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setLetterSpacingType ( int  letterSpacingType)
inline

设置字幕字间距类型

参数
letterSpacingType字间距类型. (LETTER_SPACING_TYPE)
参见
getLetterSpacingType

◆ setLineSpacing()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setLineSpacing ( float  lineSpacing)
inline

设置字幕行间距

参数
lineSpacing行间距,绝对值
参见
getLineSpacing

◆ setModularCaptionAnimationPeroid()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setModularCaptionAnimationPeroid ( int  periodInMS)
inline

设置模块字幕循环动画的周期

参数
periodInMS周期的时间,注意:单位是毫秒
参见
getModularCaptionAnimationPeroid

◆ setModularCaptionInAnimationDuration()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setModularCaptionInAnimationDuration ( int  inAnimationDurationInMS)
inline

设置模块字幕入动画的时长

参数
inAnimationDurationInMS入动画的时长,注意:单位是毫秒
参见
getModularCaptionInAnimationDuration

◆ setModularCaptionOutAnimationDuration()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setModularCaptionOutAnimationDuration ( int  outAnimationDurationInMS)
inline

设置模块字幕出动画的时长

参数
outAnimationDurationInMS出动画的时长,注意:单位是毫秒
参见
getModularCaptionOutAnimationDuration

◆ setOpacity()

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

设置字幕透明度

参数
opacity字幕透明度
参见
getOpacity

◆ setOutlineColor()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setOutlineColor ( NvsColor  outlineColor)
inline

设置字幕描边的颜色

参数
outlineColor字幕描边颜色值
参见
getOutlineColor

◆ setOutlineWidth()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setOutlineWidth ( float  outlineWidth)
inline

设置字幕描边的宽度

参数
outlineWidth字幕描边的宽度
参见
getOutlineWidth

◆ setPanoramicRotation()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setPanoramicRotation ( float  rotationAngle)
inline

对字幕设置旋转角度。只对全景图字幕有效

参数
rotationAngle旋转角度

◆ setPanoramicScaleX()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setPanoramicScaleX ( float  scaleX)
inline

对字幕设置水平缩放系数。只对全景图字幕有效

参数
scaleX水平缩放系数

◆ setPanoramicScaleY()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setPanoramicScaleY ( float  scaleY)
inline

对字幕设置垂直缩放系数。只对全景图字幕有效

参数
scaleY垂直缩放系数

◆ setPolarAngleRange()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setPolarAngleRange ( float  polarAngleRange)
inline

对字幕设置极角的张角。只对全景图字幕有效

参数
polarAngleRange极角的张角,单位为角度

◆ setRecordingUserOperation()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setRecordingUserOperation ( boolean  recordingUserOperation)
inline

设置字幕是否记录用户的操作

参数
recordingUserOperation字幕是否记录用户操作

◆ setRotationZ()

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

对字幕设置旋转角度

参数
angle旋转角度
参见
getRotationZ

◆ setScaleX()

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

对字幕设置水平缩放系数

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

◆ setScaleY()

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

对字幕设置垂直缩放系数

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

◆ setSecondaryColor()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setSecondaryColor ( NvsColor  color)
inline

设置字幕第二个颜色, 目前只应用在卡拉OK字幕上

参数
color字幕颜色值
参见
getSecondaryColor

◆ setShadowColor()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setShadowColor ( NvsColor  shadowColor)
inline

设置字幕阴影的颜色

参数
shadowColor字幕阴影颜色值
参见
getShadowColor

◆ setShadowFeather()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setShadowFeather ( float  feather)
inline

设置字幕阴影的羽化程度

参数
feather羽化程度
参见
getShadowFeather

◆ setShadowOffset()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setShadowOffset ( PointF  shadowOffset)
inline

设置字幕阴影的偏移量

参数
shadowOffset字幕阴影的偏移量
参见
getShadowOffset

◆ setText()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setText ( String  text)
inline

设置字幕文本

参数
text字幕文本
参见
getText

◆ setTextAlignment()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setTextAlignment ( int  textAlign)
inline

设置字幕水平对齐方式

参数
textAlign表示字幕水平对齐方式。请参见字幕对齐方式
参见
getTextAlignment
setTextVerticalAlignment

◆ setTextColor()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setTextColor ( NvsColor  textColor)
inline

设置字幕文本颜色

参数
textColor字幕文本颜色值
参见
getTextColor

◆ setTextFrameOriginRect()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setTextFrameOriginRect ( RectF  rc)
inline

设置边框字幕的原始边框大小,如果当前字幕不是边框字幕,该函数没有效果. 可以通过getCaptionBoundingVertices中的BOUNDING_TYPE_TEXT_ORIGIN_FRAME获取原始边框大小

参数
rc新的边框大小
参见
getCaptionBoundingVertices

◆ setTextVerticalAlignment()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setTextVerticalAlignment ( int  verticalTextAlign)
inline

设置字幕垂直对齐方式

参数
verticalTextAlign表示字幕垂直对齐方式。请参见字幕对齐方式
参见
getTextVerticalAlignment
setTextAlignment

◆ setUnderline()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setUnderline ( boolean  underline)
inline

设置字幕下划线

参数
underline是否设置下划线
参见
getUnderline

◆ setVerticalLayout()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setVerticalLayout ( boolean  verticalLayout)
inline

设置字幕是否竖向排版

参数
verticalLayout字幕竖向排版
参见
getVerticalLayout

◆ setVideoResolution()

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

设置字幕渲染的画幅解析度

参数
resolution画幅解析度
自从
2.20.0

◆ setWeight()

void com.meicam.effect.sdk.NvsVideoEffectCaption.setWeight ( int  weight)
inline

设置字幕权重

参数
weightopentype中的权重值
参见
getWeight

◆ setZValue()

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

设置字幕Z值

参数
valuez值

◆ translateCaption()

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

平移字幕

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

类成员变量说明

◆ BOUNDING_TYPE_FRAME

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

包括装饰在内的整体边框

◆ BOUNDING_TYPE_TEXT

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

文字的实际边框

◆ BOUNDING_TYPE_TEXT_FRAME

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

文字框的边框

◆ BOUNDING_TYPE_TEXT_ORIGIN_FRAME

final int com.meicam.effect.sdk.NvsVideoEffectCaption.BOUNDING_TYPE_TEXT_ORIGIN_FRAME = 3
static

没有经过变换的文字框的边框

◆ DEFAULT_CATEGORY

final int com.meicam.effect.sdk.NvsVideoEffectCaption.DEFAULT_CATEGORY = 0
static

默认种类

◆ LETTER_SPACING_TYPE_ABSOLUTE

final int com.meicam.effect.sdk.NvsVideoEffectCaption.LETTER_SPACING_TYPE_ABSOLUTE = 1
static

文字字间距的类型是绝对值

◆ LETTER_SPACING_TYPE_PERCENTAGE

final int com.meicam.effect.sdk.NvsVideoEffectCaption.LETTER_SPACING_TYPE_PERCENTAGE = 0
static

文字字间距的类型是百分比

◆ NOT_USE_ASSET_DEFAULT_PARAM

final int com.meicam.effect.sdk.NvsVideoEffectCaption.NOT_USE_ASSET_DEFAULT_PARAM = 1
static

不使用默认的字幕包属性

◆ ROLE_IN_THEME_GENERAL

final int com.meicam.effect.sdk.NvsVideoEffectCaption.ROLE_IN_THEME_GENERAL = 0
static

通用

◆ ROLE_IN_THEME_TITLE

final int com.meicam.effect.sdk.NvsVideoEffectCaption.ROLE_IN_THEME_TITLE = 1
static

片头

◆ ROLE_IN_THEME_TRAILER

final int com.meicam.effect.sdk.NvsVideoEffectCaption.ROLE_IN_THEME_TRAILER = 2
static

片尾

◆ TEXT_ALIGNMENT_BOTTOM

final int com.meicam.effect.sdk.NvsVideoEffectCaption.TEXT_ALIGNMENT_BOTTOM = 4
static

居下对齐

◆ TEXT_ALIGNMENT_CENTER

final int com.meicam.effect.sdk.NvsVideoEffectCaption.TEXT_ALIGNMENT_CENTER = 1
static

居中对齐

◆ TEXT_ALIGNMENT_LEFT

final int com.meicam.effect.sdk.NvsVideoEffectCaption.TEXT_ALIGNMENT_LEFT = 0
static

居左对齐

◆ TEXT_ALIGNMENT_RIGHT

final int com.meicam.effect.sdk.NvsVideoEffectCaption.TEXT_ALIGNMENT_RIGHT = 2
static

居右对齐

◆ TEXT_ALIGNMENT_TOP

final int com.meicam.effect.sdk.NvsVideoEffectCaption.TEXT_ALIGNMENT_TOP = 3
static

居上对齐

◆ TEXT_ALIGNMENT_VCENTER

final int com.meicam.effect.sdk.NvsVideoEffectCaption.TEXT_ALIGNMENT_VCENTER = 5
static

垂直居中对齐

◆ THEME_CATEGORY

final int com.meicam.effect.sdk.NvsVideoEffectCaption.THEME_CATEGORY = 2
static

主题种类

◆ USE_ASSET_DEFAULT_PARAM

final int com.meicam.effect.sdk.NvsVideoEffectCaption.USE_ASSET_DEFAULT_PARAM = 0
static

使用默认的字幕包属性

◆ USER_CATEGORY

final int com.meicam.effect.sdk.NvsVideoEffectCaption.USER_CATEGORY = 1
static

用户自定义种类


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