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

采集复合字幕 更多...

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

Public 成员函数

long getOffsetPoint ()
 获取字幕的相对偏移时间 更多...
 
long getDuration ()
 字幕在时间线显示上的出点 更多...
 
long changeOffsetPoint (long newOffset)
 改变字幕的相对偏移时间 更多...
 
long changeDuration (long newOutPoint)
 改变字幕持续时间 更多...
 
void setStartTime (long startTime)
 设置复合字幕的起始时间 更多...
 
void resetStartTime ()
 重置复合字幕的起始时间 更多...
 
- Public 成员函数 继承自 com.meicam.sdk.NvsCompoundCaption
int getCaptionCount ()
 获取该复合字幕中子字幕的数量 更多...
 
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)
 获取字幕原始边框变换后的顶点位置 更多...
 
boolean isFrameCaption (int captionIndex)
 判断子字幕是否是边框字幕。 更多...
 
List< PointF > getCompoundBoundingVertices (int boundingType)
 获取复合字幕原始边框变换后的顶点位置 更多...
 
void setZValue (float value)
 设置字幕Z值 更多...
 
float getZValue ()
 获取字幕Z值 更多...
 
void setOpacity (float opacity)
 设置字幕透明度 更多...
 
float getOpacity ()
 获取透明度 更多...
 
String getCaptionStylePackageId ()
 获得字幕样式包裹ID 更多...
 
void setDrawOutline (boolean drawOutline, int captionIndex)
 设置字幕描边 更多...
 
boolean getDrawOutline (int captionIndex)
 获取字幕描边状态 更多...
 
void setOutlineColor (NvsColor outlineColor, int captionIndex)
 设置字幕描边的颜色 更多...
 
NvsColor getOutlineColor (int captionIndex)
 获取当前字幕描边的颜色值 更多...
 
void setOutlineWidth (float outlineWidth, int captionIndex)
 设置字幕描边的宽度 更多...
 
float getOutlineWidth (int captionIndex)
 获取当前字幕描边的宽度 更多...
 
void setBackgroundColor (NvsColor backgroundColor, int captionIndex)
 设置字幕文本的背景颜色 更多...
 
NvsColor getBackgroundColor (int captionIndex)
 获取字幕文本的当前背景颜色值 更多...
 
void setCurrentKeyFrameTime (long time)
 设置复合字幕的关键帧时间 更多...
 
boolean setControlPoint (String fxParam, NvsControlPointPair controlPointPair)
 设置字幕的关键帧控制点对 更多...
 
NvsControlPointPair getControlPoint (String fxParam)
 返回关键帧控制点对 更多...
 
boolean removeKeyframeAtTime (String fxParam, long time)
 删除参数指定时间点的关键帧 更多...
 
boolean removeAllKeyframe (String fxParam)
 删除参数的所有关键帧 更多...
 
boolean hasKeyframeList (String fxParam)
 当前参数是否有关键帧列表 更多...
 
long findKeyframeTime (String fxParam, long time, int flags)
 获取指定时间点附近的关键帧 更多...
 
void setDisableElegantTextHeight (int captionIndex, boolean disableElegantTextHeight)
 由于历史遗留因素,美摄SDK在Android平台的水平文字排版时使用了elegant text height特性,这会导致Android平台的水平排版与其它平台的行间距有差别。设置这个属性会禁止Android水平排版使用elegant text height特性。默认值为false。 更多...
 
boolean getDisableElegantTextHeight (int captionIndex)
 获取是否禁止elegant text height特性 更多...
 
void setWeight (int captionIndex, int weight)
 设置字幕权重 更多...
 
int getWeight (int captionIndex)
 获取字幕权重 更多...
 
void setItalic (int captionIndex, boolean italic)
 设置字幕斜体 更多...
 
boolean getItalic (int captionIndex)
 字幕是否设置斜体 更多...
 
void setBold (int captionIndex, boolean bold)
 设置字幕字体是否加粗 更多...
 
boolean getBold (int captionIndex)
 获取字幕字体加粗状态 更多...
 
- Public 成员函数 继承自 com.meicam.sdk.NvsFx
NvsFxDescription getDescription ()
 获取特效的描述 更多...
 
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, int flags)
 获得指定时间点上特效字符串参数值 更多...
 
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)
 设置自定义数据参数值 更多...
 
NvsArbitraryData getArbDataVal (String fxParam)
 返回自定义数据参数值 更多...
 
void setArbDataValAtTime (String fxParam, NvsArbitraryData val, long time)
 设置自定义数据参数值 更多...
 
NvsArbitraryData getArbDataValAtTime (String fxParam, NvsArbitraryData val, long time)
 返回自定义数据参数值 更多...
 
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 setFilterMask (boolean useMask)
 设置滤镜遮罩 更多...
 
boolean getFilterMask ()
 获得是否使用滤镜遮罩 更多...
 
void setRegional (boolean isRegional)
 设置滤镜是否为局部滤镜 更多...
 
boolean getRegional ()
 获得滤镜是否为局部滤镜 更多...
 
void setIgnoreBackground (boolean isIgnoreBackground)
 设置局部滤镜是否消除背景 更多...
 
boolean getIgnoreBackground ()
 获得局部滤镜是否消除背景 更多...
 
void setInverseRegion (boolean isInverseRegion)
 设置局部滤镜是否反选区域 更多...
 
boolean getInverseRegion ()
 获得局部滤镜是否反选区域 更多...
 
void setRegion (float[] region)
 设置局部滤镜的控制范围 更多...
 
float[] getRegion ()
 获取局部滤镜的控制范围 更多...
 
void setRegionInfo (NvsMaskRegionInfo info)
 设置局部滤镜的蒙版区域信息 更多...
 
NvsMaskRegionInfo getRegionInfo ()
 获取局部滤镜的蒙版区域信息 更多...
 
void setRegionInfoAtTime (NvsMaskRegionInfo info, long time)
 设置指定时间点局部滤镜的蒙版区域信息 更多...
 
NvsMaskRegionInfo getRegionInfoAtTime (long time)
 获取指定时间点局部滤镜的模板区域信息 更多...
 
void setRegionalFeatherWidth (float featherWidth)
 设置局部滤镜的羽化宽度 更多...
 
float getRegionalFeatherWidth ()
 获得局部滤镜的羽化宽度 更多...
 
void setRegionalFeatherWidthAtTime (float featherWidth, long time)
 设置指定时间点局部滤镜的羽化宽度 更多...
 
float getRegionalFeatherWidthAtTime (long time)
 获得指定时间点局部滤镜的羽化宽度 更多...
 
void setRegionCoordinateSystemType (int type)
 设置局部滤镜所在坐标系类型,默认为NDC坐标系 更多...
 
int getRegionCoordinateSystemType ()
 获得局部滤镜所在坐标系类型 更多...
 
NvsParticleSystemContext getParticleSystemContext ()
 获得粒子特效上下文对象。请参见NvsParticleSystemContext 更多...
 
NvsARFaceContext getARFaceContext ()
 获得人脸特效上下文对象。请参见NvsARFaceContext 更多...
 
NvsPaintingEffectContext getPaintingEffectContext ()
 获得手绘特效上下文对象。请参见NvsPaintingEffectContext 更多...
 
NvsARSceneManipulate getARSceneManipulate ()
 获得AR场景操作对象。请参见NvsARSceneManipulate 更多...
 
void setExprVar (String varName, double varValue)
 设置表达式中定义参数的值 更多...
 
double getExprVar (String varName)
 获得表达式中定义参数的值 更多...
 
void setExprStringVar (String varName, String varValue)
 设置表达式中定义参数的值 更多...
 
String getExprStringVar (String varName)
 获得表达式中定义参数的值 更多...
 
void setExprObjectVar (String varName, Object varValue)
 设置表达式中定义参数的值 更多...
 
Object getExprObjectVar (String varName)
 获得表达式中定义参数的值 更多...
 
void clearExprVar (String varName)
 清空表达式中定义参数的值,并设置为默认值0 更多...
 
void clearExprVarCtx ()
 清空表达式中定义的全部参数的值,并设置为默认值0 更多...
 
- Public 成员函数 继承自 com.meicam.sdk.NvsObject
void setAttachment (String key, Object value)
 为NvsObject对象添加附加的数据,用来标识NvsObject的对象或者其他用途 更多...
 
void setTemplateAttachment (String key, String value)
 为NvsObject对象添加模板资源的附加数据,用来标识NvsObject的模板数据 更多...
 
Object getAttachment (String key)
 获取NvsObject的附件 更多...
 
String getTemplateAttachment (String key)
 获取NvsObject的模板资源附件 更多...
 

额外继承的成员函数

- 静态 Public 属性 继承自 com.meicam.sdk.NvsCompoundCaption
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.sdk.NvsFx
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
 
- 静态 Public 属性 继承自 com.meicam.sdk.NvsObject
static final String TEMPLATE_KEY_REPLACE_ID = "MSTemplate-ReplaceId"
 
static final String TEMPLATE_KEY_FOOTAGE_CAN_REPLACE = "MSTemplate-FootageCanReplace"
 
static final String TEMPLATE_KEY_FOOTAGE_ID = "MSTemplate-FootageId"
 
static final String TEMPLATE_KEY_FOOTAGE_NAME = "MSTemplate-FootageName"
 
static final String TEMPLATE_KEY_FOOTAGE_M3U8_NAME = "MSTemplate-FootageM3U8Name"
 
static final String TEMPLATE_KEY_FOOTAGE_TAGS = "MSTemplate-FootageTags"
 
static final String TEMPLATE_KEY_FOOTAGE_TYPE = "MSTemplate-FootageType"
 
static final String TEMPLATE_KEY_FOOTAGE_NEED_REVERSE = "MSTemplate-FootageNeedReverse"
 
static final String TEMPLATE_KEY_CLIP_RAW_WIDTH = "MSTemplate-ClipRawWidth"
 
static final String TEMPLATE_KEY_CLIP_RAW_HEIGHT = "MSTemplate-ClipRawHeight"
 
static final String TEMPLATE_KEY_VOLUME_TYPE = "MSTemplate-VolumeType"
 
static final String TEMPLATE_KEY_FX_GROUP = "MSTemplate-FxGroup"
 
static final String TEMPLATE_KEY_BEST_SEEK_TIME = "MSTemplate-BestSeekTime"
 
static final String TEMPLATE_KEY_MASK_TYPE = "MSTemplate-MaskType"
 
static final String TEMPLATE_VALUE_MASK_TYPE_LINE = "MSTemplate-MaskType-Line"
 
static final String TEMPLATE_VALUE_MASK_TYPE_MIRROR = "MSTemplate-MaskType-Mirror"
 
static final String TEMPLATE_VALUE_MASK_TYPE_CIRCLE = "MSTemplate-MaskType-Circle"
 
static final String TEMPLATE_VALUE_MASK_TYPE_RECT = "MSTemplate-MaskType-Rect"
 
static final String TEMPLATE_VALUE_MASK_TYPE_HEART = "MSTemplate-MaskType-Heart"
 
static final String TEMPLATE_VALUE_MASK_TYPE_STAR = "MSTemplate-MaskType-Star"
 
static final String TEMPLATE_KEY_TRANS_TYPE_CUT = "MSTemplate-TransType-Cut"
 
static final String TEMPLATE_KEY_CURVE_SPEED_TYPE = "MSTemplate-CurveSpeedType"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_CUSTOM = "MSTemplate-CurveSpeedType-Custom"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_MONTAGE = "MSTemplate-CurveSpeedType-Montage"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_HERO = "MSTemplate-CurveSpeedType-Hero"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_BULLET = "MSTemplate-CurveSpeedType-bullet"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_PLUS = "MSTemplate-CurveSpeedType-Plus"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_IN = "MSTemplate-CurveSpeedType-In"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_OUT = "MSTemplate-CurveSpeedType-Out"
 
- Protected 成员函数 继承自 com.meicam.sdk.NvsObject
void setInternalObject (long internalObject)
 
long getInternalObject ()
 
- Protected 属性 继承自 com.meicam.sdk.NvsObject
long m_internalObject = 0
 

详细描述

采集复合字幕

复合字幕是应用在视频采集时的组合型文字,每个复合字幕包含若干个子字幕。在采集时,可以添加和移除时间线复合字幕,并对字幕位置进行调整处理,还可以对字体,颜色属性进行修改。
注:复合字幕的偏移时间和持续时间单位都为微秒
注1:复合字幕的默认开始时间为添加时刻的采集时间,如果在StartCapturePreview调用之前添加的,起始时间都为0

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

成员函数说明

◆ changeDuration()

long com.meicam.sdk.NvsCaptureCompoundCaption.changeDuration ( long  newOutPoint)
inline

改变字幕持续时间

参数
newOutPoint字幕新的期望持续时间(单位微秒)
返回
返回字幕新的持续时间(单位微秒)

◆ changeOffsetPoint()

long com.meicam.sdk.NvsCaptureCompoundCaption.changeOffsetPoint ( long  newOffset)
inline

改变字幕的相对偏移时间

参数
newInPoint新的相对偏移时间(单位微秒)
返回
返回新的相对偏移时间(单位微秒)

◆ getDuration()

long com.meicam.sdk.NvsCaptureCompoundCaption.getDuration ( )
inline

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

返回
字幕在时间线显示上的出点(单位微秒)
参见
getOffsetPoint
changeDuration

◆ getOffsetPoint()

long com.meicam.sdk.NvsCaptureCompoundCaption.getOffsetPoint ( )
inline

获取字幕的相对偏移时间

返回
字幕偏移时间(单位微秒)
参见
getOutPoint
changeInPoint

◆ resetStartTime()

void com.meicam.sdk.NvsCaptureCompoundCaption.resetStartTime ( )
inline

重置复合字幕的起始时间

◆ setStartTime()

void com.meicam.sdk.NvsCaptureCompoundCaption.setStartTime ( long  startTime)
inline

设置复合字幕的起始时间

自从
3.4.0

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