MeiCam SDK For iOS  3.10.0
Instance Methods | Properties | List of all members
NvsVideoEffectCaption Class Reference

captions. More...

#import <NvsVideoEffectCaption.h>

Inheritance diagram for NvsVideoEffectCaption:
NvsEffect

Instance Methods

(void) - setVideoResolution:
 Set the sticker's video resolution. More...
 
(int64_t) - changeInPoint:
 Changes the out point of the caption on the timeline. More...
 
(int64_t) - changeOutPoint:
 Changes the out point of the caption on the timeline. More...
 
(void) - movePosition:
 Changes the display position of the caption on the timeline (the in and out points move the value of "offset" at the same time). More...
 
(bool) - applyCaptionStyle:
 Apply the caption style. More...
 
(bool) - applyModularCaptionContext:
 Applys modular caption context style. More...
 
(bool) - applyModularCaptionRenderer:
 Applys modular caption render style. More...
 
(bool) - applyModularCaptionAnimation:
 Applys modular caption loop-animation style. More...
 
(bool) - applyModularCaptionInAnimation:
 Applys modular caption in-animation style. Notes:please set loop-Animation to null before you set in-animation, otherwise it will NOT works. More...
 
(bool) - applyModularCaptionOutAnimation:
 Applys modular caption out-animation style.Notes:please set loop-Animation to null before you set out-animation, otherwise it will NOT works. More...
 
(void) - setModularCaptionAnimationPeroid:
 Set modular caption Animation Peroid. More...
 
(int) - getModularCaptionAnimationPeroid
 Get modular caption Animation Peroid. More...
 
(void) - setModularCaptionInAnimationDuration:
 Set modular caption in-animation duration. More...
 
(int) - getModularCaptionInAnimationDuration
 Get modular caption in-animation duration. More...
 
(void) - setModularCaptionOutAnimationDuration:
 Set modular caption out-animation duration. More...
 
(int) - getModularCaptionOutAnimationDuration
 Get modular caption out-animation duration. More...
 
(bool) - applyCaptionStyleWithAssetDefaultParam:isUseDefaultAssetParam:
 apply the caption style. More...
 
(void) - setText:
 Set the caption text. More...
 
(NSString *) - getText
 Gets the caption text. More...
 
(void) - setVerticalLayout:
 Sets whether the caption is vertical layout. More...
 
(BOOL) - getVerticalLayout
 Gets the state whether the caption is vertical layout. More...
 
(void) - setTextAlignment:
 Sets the caption horizontal alignment method. More...
 
(NvsVideoEffectTextAlignment- getTextAlignment
 Gets the caption horizontal alignment method. More...
 
(void) - setTextVerticalAlignment:
 Sets the caption vertical alignment method. More...
 
(NvsVideoEffectTextAlignment- getTextVerticalAlignment
 Gets the caption vertical alignment method. More...
 
(void) - setBold:
 Sets whether the caption font is bold. More...
 
(BOOL) - getBold
 Gets the state whether the caption font is bold. More...
 
(void) - setWeight:
 Sets caption weight. More...
 
(int) - getWeight
 Gets the caption weight. More...
 
(void) - setItalic:
 Sets whether the caption font is italic. More...
 
(BOOL) - getItalic
 Gets the state whether the caption font is italic. More...
 
(void) - setUnderline:
 Sets caption under line. More...
 
(BOOL) - getUnderline
 Gets the caption under line. More...
 
(float) - getLetterSpacing
 Gets caption word spacing. More...
 
(void) - setLetterSpacing:
 Sets caption word spacing. More...
 
(NvsVideoEffectLetterSpacingType- getLetterSpacingType
 Gets caption word spacing type. More...
 
(void) - setLetterSpacingType:
 Sets caption word spacing type. More...
 
(float) - getLineSpacing
 Gets caption line spacing. More...
 
(void) - setLineSpacing:
 Sets caption line spacing. More...
 
(void) - setTextColor:
 Sets the color of the caption text. More...
 
(NvsEffectColor- getTextColor
 Gets the current color value of the caption font. More...
 
(void) - setDrawOutline:
 Sets whether the caption draws the outline. More...
 
(BOOL) - getDrawOutline
 Gets the status whether the caption draws the outline. More...
 
(void) - setOutlineColor:
 Sets the color of the outline for the caption. More...
 
(NvsEffectColor- getOutlineColor
 Gets the color of the outline for the caption. More...
 
(void) - setOutlineWidth:
 Sets the width of the outline for the caption. More...
 
(float) - getOutlineWidth
 Gets the width of the outline for the caption. More...
 
(void) - setDrawShadow:
 Sets the caption shadows. More...
 
(BOOL) - getDrawShadow
 Gets the state of the current caption shadow. More...
 
(void) - setShadowColor:
 Sets the color of the caption shadow. More...
 
(NvsEffectColor- getShadowColor
 Gets the color of the caption shadow. More...
 
(void) - setShadowOffset:
 Sets the offset of the caption shadow. More...
 
(CGPoint) - getShadowOffset
 Gets the offset of the caption shadow. More...
 
(void) - setShadowFeather:
 Sets the feathering degree of the caption shadow. More...
 
(float) - getShadowFeather
 Gets the feathering degree of the caption shadow. More...
 
(void) - setFontSize:
 Sets the font size of the caption. More...
 
(float) - getFontSize
 Gets the font size of the caption. More...
 
(void) - setFrameCaptionMaxFontSize:
 Sets the max font size of the frame caption. only apply to frame caption. More...
 
(void) - setFontWithFilePath:
 Sets the caption font. More...
 
(NSString *) - getFontFilePath
 Gets the file path of the caption font. More...
 
(NSString *) - getFontFamily
 Gets the caption font. More...
 
(void) - setFontFamily:
 Sets the caption font. More...
 
(void) - setCaptionTranslation:
 Sets the translation amount of the caption. More...
 
(CGPoint) - getCaptionTranslation
 Gets the translation amount of the caption. More...
 
(void) - translateCaption:
 translates the caption. More...
 
(void) - setAnchorPoint:
 Sets the caption anchor. More...
 
(CGPoint) - getAnchorPoint
 Gets the caption anchor. More...
 
(void) - setScaleX:
 Sets the horizontal scaling factor for the caption. More...
 
(float) - getScaleX
 Gets the horizontal scaling factor for the caption. More...
 
(void) - setScaleY:
 Sets the vertical scaling factor for the caption. More...
 
(float) - getScaleY
 Gets the vertical scaling factor for the caption. More...
 
(void) - scaleCaption:anchor:
 Scales the caption. More...
 
(void) - setRotationZ:
 Sets the rotation angle for the caption. More...
 
(float) - getRotationZ
 Gets the rotation angle for the caption. More...
 
(void) - rotateCaption:anchor:
 Rotates the caption. More...
 
(void) - rotateCaption:
 Rotates the caption with the caption center point as the anchor point. More...
 
(void) - setTextFrameOriginRect:
 Set the original frame size of the frame caption. If the current caption is not a frame caption, this function has no effect. You can get origin frame size. More...
 
(NvsEffectRect- getTextBoundingRect:
 Gets the rectangle of the caption text. More...
 
(NSArray *) - getCaptionBoundingVertices:
 Gets the transformed vertices position of the original caption bounding. More...
 
(void) - setCenterPolarAngle:
 Sets the polar angle of the center point for the caption. It's only valid for the panorama caption. More...
 
(float) - getCenterPolarAngle
 Gets the polar angle of the center point for the caption. It's only valid for the panorama caption. More...
 
(float) - getTextCenterPolarAngle
 Gets the polar angle of the center point for the caption text. It's only valid for the panorama caption. More...
 
(void) - setCenterAzimuthAngle:
 Sets the azimuth angle of the center point for the caption. It's only valid for the panorama caption. More...
 
(float) - getCenterAzimuthAngle
 Gets the azimuth angle of the center point for the caption. It's only valid for the panorama caption. More...
 
(float) - getTextCenterAzimuthAngle
 Gets the azimuth angle of the center point for the caption text. It's only valid for the panorama caption. More...
 
(void) - setPolarAngleRange:
 Sets the ranging angle of the polar angle for the caption. It's only valid for the panorama caption. More...
 
(float) - getPolarAngleRange
 Gets the ranging angle of the polar angle for the caption. It's only valid for the panorama caption. More...
 
(float) - getTextPolarAngleRange
 Gets the ranging angle of the polar angle for the caption text. It's only valid for the panorama caption. More...
 
(float) - getOrthoAngleRange
 Gets the ranging angle which is perpendicular with the polar angle for the caption. It's only valid for the panorama caption. More...
 
(float) - getTextOrthoAngleRange
 Gets the ranging angle of which is perpendicular with the polar angle for the caption text. It's only valid for the panorama caption. More...
 
(void) - setPanoramicScaleX:
 Sets the horizontal scaling factor for the caption. It's only valid for the panorama caption. More...
 
(float) - getPanoramicScaleX
 Gets the horizontal scaling factor for the caption. It's only valid for the panorama caption. More...
 
(void) - setPanoramicScaleY:
 Sets the vertical scaling factor for the caption. It's only valid for the panorama caption. More...
 
(float) - getPanoramicScaleY
 Gets the vertical scaling factor for the caption. It's only valid for the panorama caption. More...
 
(void) - setPanoramicRotation:
 Sets the rotation angle for the caption. It's only valid for the panorama caption. More...
 
(float) - getPanoramicRotation
 Gets the rotation angle for the caption. It's only valid for the panorama caption. More...
 
(void) - setZValue:
 Sets the Z value of the caption. More...
 
(float) - getZValue
 Gets the Z value of the caption. More...
 
(void) - setRecordingUserOperation:
 Sets whether to record user actions. More...
 
(void) - setOpacity:
 Set the caption opacity. More...
 
(float) - getOpacity
 Get the caption opacity. More...
 
(void) - setBackgroundColor:
 Set text background color. More...
 
(NvsEffectColor- getBackgroundColor
 Get the current text background color value. More...
 
(void) - setBackgroundRadius:
 Set text background rectangle's corner radius. More...
 
(float) - getBackgroundRadius
 Get the current text background rectangle's corner radius value. More...
 
(void) - setSecondaryColor:
 Sets caption secondary color. it is only used in karaoke subtitles now. More...
 
(NvsEffectColor- getSecondaryColor
 Gets the current color value of the caption. More...
 
(void) - setCurrentKeyFrameTime:
 Set the caption KeyFrameTime. More...
 
(BOOL) - isFrameCaption
 Gets whether the caption is a frame caption. More...
 
- Instance Methods inherited from NvsEffect
(void) - setIntVal:val:
 Sets effect parameter of integer type. More...
 
(int) - getIntVal:
 Get effect parameter of integer type. More...
 
(void) - setFloatVal:val:
 Sets effect parameter of float type. More...
 
(double) - getFloatVal:
 Gets effect parameter of float type. More...
 
(void) - setBooleanVal:val:
 Sets effect parameter of BOOL type. More...
 
(BOOL) - getBooleanVal:
 Gets effect parameter of BOOL type. More...
 
(void) - setStringVal:val:
 Sets effect parameter of string type. More...
 
(NSString *) - getStringVal:
 Gets effect parameter of string value. More...
 
(void) - setColorVal:val:
 Sets effect parameter of color type. More...
 
(NvsEffectColor- getColorVal:
 Gets effect parameter of color value. More...
 
(void) - setPosition2DVal:val:
 Sets effect parameter of 2D coordinates type. More...
 
(NvsEffectPosition2D- getPosition2DVal:
 Gets effect parameter of 2D coordinates value. More...
 
(void) - setPosition3DVal:val:
 Sets effect parameter of 3D coordinates type. More...
 
(NvsEffectPosition3D- getPosition3DVal:
 Gets effect parameter of 3D coordinates value. More...
 
(void) - setMenuVal:val:
 Sets effect parameter of menu type. More...
 
(NSString *) - getMenuVal:
 Gets effect parameter of menu value. More...
 
(void) - setArbDataVal:val:
 Sets the effect parameter of custom type. More...
 
(NvsArbitraryData *) - getArbDataVal:
 Gets the effect parameter of custom type. More...
 
(void) - setArbDataValAtTime:val:time:
 Sets custom data parameter value. More...
 
(NvsArbitraryData *) - getArbDataValAtTime:time:
 Get custom data parameter value at a specified time point. More...
 
(bool) - removeKeyframeAtTime:time:
 Remove key frame at a specified time point from key frame list. More...
 
(bool) - removeAllKeyframe:
 Remove all key frames from key frame list. More...
 
(bool) - hasKeyframeList:
 Check whether the parameter has key frame list or not. More...
 
(int64_t) - findKeyframeTime:time:flags:
 Get key frame at a specified time point. More...
 
(bool) - setKeyFrameControlPoint:time:controlPointPair:
 Set key frame control point pair. More...
 
(NvsControlPointPair *) - getKeyFrameControlPoint:time:
 Get key frame control point pair. More...
 
(bool) - setKeyFrameControlPointMode:time:controlPointModePair:
 Set key frame control point mode pair. More...
 
(NvsControlPointModePair *) - getKeyFrameControlPointMode:time:
 Get key frame control point mode pair. More...
 
(void) - setFilterIntensity:
 Set the filter intensity. More...
 
(float) - getFilterIntensity
 Gets the filter intensity. More...
 
(void) - setFilterMask:
 Sets the mask of the filter. More...
 
(bool) - getFilterMask
 Gets the usage of the filter's mask. More...
 
(void) - setRegional:
 Sets whether the filter is regional. More...
 
(BOOL) - getRegional
 Gets whether the filter is regional. More...
 
(void) - setIgnoreBackground:
 Sets whether the regional filter ignore Background. More...
 
(BOOL) - getIgnoreBackground
 Gets whether the regional filter ignores Background. More...
 
(void) - setInverseRegion:
 Sets whether the regional filter inverse region. More...
 
(BOOL) - getInverseRegion
 Gets whether the regional filter inverse region. More...
 
(void) - setRegion:
 Sets the region of this regional filter. More...
 
(NSArray *) - getRegion
 Get the region of this regional filter. More...
 
(NvsMaskRegionInfo *) - getRegionInfo
 Get the region of this regional filter. More...
 
(void) - setRegionInfo:
 Sets the region of this regional filter. More...
 
(void) - setRegionInfoAtTime:time:
 Sets the region of this regional filter at certain time. More...
 
(void) - setRegionalFeatherWidth:
 Sets the feather width of this regional filter. More...
 
(float) - getRegionalFeatherWidth
 Gets the feather width of this regional filter. More...
 
(void) - setRegionCoordinateSystemType:
 Sets the coordinate system of the region. More...
 
(int) - getRegionCoordinateSystemType
 Gets the coordinate system of the region. More...
 
(NvsParticleSystemContext *) - getParticleSystemContext
 Gets the particle effect context. More...
 
(NvsPaintingEffectContext *) - getPaintingEffectContext
 Gets the particle effect context. More...
 
(NvsARSceneManipulate *) - getARSceneManipulate
 Get the AR scene operation pointer. More...
 
(void) - setExprVar:varValue:
 Sets the value of the defined parameter in the expression. More...
 
(double) - getExprVar:
 Gets the value of the defined parameter in the expression. More...
 
(void) - clearExprVar:
 Clears the value of the defined parameter in the expression and sets it to the default value of 0. More...
 
(void) - clearExprVarCtx
 Clears the value of all parameters defined in the expression and sets it to the default value of 0. More...
 

Properties

BOOL isPanoramic
 Whether it is a panorama caption. More...
 
BOOL isModular
 whether the current caption is a modular caption More...
 
BOOL clipAffinityEnabled
 Whether to enable the affinity with clip. More...
 
int64_t inPoint
 The in point of the caption on the timeline(in microseconds) More...
 
int64_t outPoint
 The out point of the caption on the timeline (in microseconds) More...
 
NvsVideoEffectRoleInTheme roleInTheme
 The role of captions in the theme (general, title, and trailer.) More...
 
NvsVideoEffectCategory category
 Clip type. More...
 
NSString * captionStylePackageId
 The package ID of the caption style. More...
 
NSString * modularCaptionContextPackageId
 The package ID of the modular caption context style. More...
 
NSString * modularCaptionRendererPackageId
 The package ID of the modular caption render style. More...
 
NSString * modularCaptionAnimationPackageId
 The package ID of the modular caption animation style. More...
 
NSString * modularCaptionInAnimationPackageId
 The package ID of the modular caption in-animation style. More...
 
NSString * modularCaptionOutAnimationPackageId
 The package ID of the modular caption out-animation style. More...
 
- Properties inherited from NvsEffect
NvsEffectDescriptiondescription
 

Detailed Description

captions.

captions are custom text that is superimposed on the video. When editing a video, users can create and remove captions and adjust the captions position. After adding captions, user can also set the style, including font size, color, shadow, stroke, etc.

Warning
In the NvsVideoEffectCaption class, all public APIs are used in the UI thread! ! !
Since
2.20.0

Method Documentation

◆ applyCaptionStyle:

- (bool) applyCaptionStyle: (NSString *)  captionStylePackageId

Apply the caption style.

Parameters
captionStylePackageIdThe resource package ID of the caption style
Returns
Returns bool value. True means it use caption style successfully, and false means it fails.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.

◆ applyCaptionStyleWithAssetDefaultParam:isUseDefaultAssetParam:

- (bool) applyCaptionStyleWithAssetDefaultParam: (NSString *)  captionStylePackageId
isUseDefaultAssetParam: (NvsVideoEffectAssetDefaultParam isUseDefaultAssetParam 

apply the caption style.

Parameters
captionStylePackageIdThe resource package ID of the caption style
isUseDefaultAssetParamWhether to use the default material parameters.
Returns
Returns bool value. True means it use caption style successfully, and false means it fails.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.

◆ applyModularCaptionAnimation:

- (bool) applyModularCaptionAnimation: (NSString *)  captionAnimationPackageId

Applys modular caption loop-animation style.

Parameters
captionAnimationPackageIdModular caption loop-animation style resource package ID.
Returns
Returns boolean value. True means a successful application, false means a failure.
Warning
This interface will cause the streaming engine state to jump to the engine stop state. For details, please refer to Engine Change.
See also
getModularCaptionAnimationPackageId
Since
2.15.2

◆ applyModularCaptionContext:

- (bool) applyModularCaptionContext: (NSString *)  captionContextPackageId

Applys modular caption context style.

Parameters
captionContextPackageIdModular caption context style resource package ID.
Returns
Returns boolean value. True means a successful application, false means a failure.
Warning
This interface will cause the streaming engine state to jump to the engine stop state. For details, please refer to Engine Change.
See also
getModularCaptionContextPackageId
Since
2.15.2

◆ applyModularCaptionInAnimation:

- (bool) applyModularCaptionInAnimation: (NSString *)  captionInAnimationPackageId

Applys modular caption in-animation style. Notes:please set loop-Animation to null before you set in-animation, otherwise it will NOT works.

Parameters
captionInAnimationPackageIdModular caption in-animation style resource package ID.
Returns
Returns boolean value. True means a successful application, false means a failure.
Warning
This interface will cause the streaming engine state to jump to the engine stop state. For details, please refer to Engine Change.
See also
getModularCaptionInAnimationPackageId
Since
2.15.2

◆ applyModularCaptionOutAnimation:

- (bool) applyModularCaptionOutAnimation: (NSString *)  captionOutAnimationPackageId

Applys modular caption out-animation style.Notes:please set loop-Animation to null before you set out-animation, otherwise it will NOT works.

Parameters
captionOutAnimationPackageIdModular caption out-animation style resource package ID.
Returns
Returns boolean value. True means a successful application, false means a failure.
Warning
This interface will cause the streaming engine state to jump to the engine stop state. For details, please refer to Engine Change.
See also
getModularCaptionOutAnimationPackageId
Since
2.15.2

◆ applyModularCaptionRenderer:

- (bool) applyModularCaptionRenderer: (NSString *)  captionRendererPackageId

Applys modular caption render style.

Parameters
captionRendererPackageIdModular caption render style resource package ID.
Returns
Returns boolean value. True means a successful application, false means a failure.
Warning
This interface will cause the streaming engine state to jump to the engine stop state. For details, please refer to Engine Change.
See also
getModularCaptionRenderPackageId
Since
2.15.2

◆ changeInPoint:

- (int64_t) changeInPoint: (int64_t)  newInPoint

Changes the out point of the caption on the timeline.

Parameters
newInPointThe new out point of the caption on the timeline (in microseconds)
Returns
Returns the in point of the caption which displayed on the timeline (in microseconds).
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- changeOutPoint:
- movePosition:

◆ changeOutPoint:

- (int64_t) changeOutPoint: (int64_t)  newOutPoint

Changes the out point of the caption on the timeline.

Parameters
newOutPointThe new out point of the caption on the timeline (in microseconds)
Returns
Returns the out point of the caption which displayed on the timeline (in microseconds).
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- changeInPoint:
- movePosition:

◆ getAnchorPoint

- (CGPoint) getAnchorPoint

Gets the caption anchor.

Returns
Returns the caption anchor.
Since
1.15.0
See also
- setAnchorPoint:

◆ getBackgroundColor

- (NvsEffectColor) getBackgroundColor

Get the current text background color value.

Returns
Returns the NvsEffectColor object representing the current background color.
See also
- setBackgroundColor:
Since
2.15.1

◆ getBackgroundRadius

- (float) getBackgroundRadius

Get the current text background rectangle's corner radius value.

Returns
Returns corner radius value
See also
- setBackgroundRadius:
Since
2.15.1

◆ getBold

- (BOOL) getBold

Gets the state whether the caption font is bold.

Returns
Returns the state whether the caption font is bold. YES means it is bold, NO means it is not.
See also
- setBold:

◆ getCaptionBoundingVertices:

- (NSArray *) getCaptionBoundingVertices: (NvsVideoEffectBoundingType boundingType

Gets the transformed vertices position of the original caption bounding.

Parameters
boundingTypeBounding type. Please refer to Bounding Type
Returns
Returns the NSArray object, the object type is NSValue, and the actual data type is CGPoint, which correspond to the top left, bottom left, bottom right, and top right vertices of the original bounding.
Since
2.9.0

◆ getCaptionTranslation

- (CGPoint) getCaptionTranslation

Gets the translation amount of the caption.

Returns
Returns the CGPoint object indicating the translation amount of the caption which obtained.
See also
- setCaptionTranslation:

◆ getCenterAzimuthAngle

- (float) getCenterAzimuthAngle

Gets the azimuth angle of the center point for the caption. It's only valid for the panorama caption.

Returns
Returns the azimuth angle of the center point (in degrees).
Since
1.6.0

◆ getCenterPolarAngle

- (float) getCenterPolarAngle

Gets the polar angle of the center point for the caption. It's only valid for the panorama caption.

Returns
Returns the polar angle of the center point (in degrees).
Since
1.6.0

◆ getDrawOutline

- (BOOL) getDrawOutline

Gets the status whether the caption draws the outline.

Returns
Returns boolean value. YES means it has drawed the outline. NO means it has not.
See also
- setDrawOutline:

◆ getDrawShadow

- (BOOL) getDrawShadow

Gets the state of the current caption shadow.

Returns
Returns BOOL value. YES means the caption has shadow. NO means it is not.
See also
- setDrawShadow:

◆ getFontFamily

- (NSString *) getFontFamily

Gets the caption font.

Since
2.13.3
See also
setFontFamily

◆ getFontFilePath

- (NSString *) getFontFilePath

Gets the file path of the caption font.

Returns
Returns the file path of the caption font.
Since
1.3.0
See also
- setFontWithFilePath:

◆ getFontSize

- (float) getFontSize

Gets the font size of the caption.

Returns
Returns the font size of the caption.
See also
- setFontSize:

◆ getItalic

- (BOOL) getItalic

Gets the state whether the caption font is italic.

Returns
Returns boolean value. YES means the caption font is italic. NO means it is not.
See also
- setItalic:

◆ getLetterSpacing

- (float) getLetterSpacing

Gets caption word spacing.

Returns
Returns the float value, the percentage value by default.(LETTER_SPACING_TYPE)
See also
setLetterSpacing
setLetterSpacingType
Since
1.16.0

◆ getLetterSpacingType

- (NvsVideoEffectLetterSpacingType) getLetterSpacingType

Gets caption word spacing type.

Returns
return letterSpacingType.(LETTER_SPACING_TYPE)
See also
setLetterSpacingType
Since
2.15.1

◆ getLineSpacing

- (float) getLineSpacing

Gets caption line spacing.

Returns
return float value, line spacing is expressed in absolute value.
See also
setLineSpacing
Since
2.15.1

◆ getModularCaptionAnimationPeroid

- (int) getModularCaptionAnimationPeroid

Get modular caption Animation Peroid.

Returns
Return animation peroid in million second
See also
setModularCaptionAnimationPeroid
Since
2.15.2

◆ getModularCaptionInAnimationDuration

- (int) getModularCaptionInAnimationDuration

Get modular caption in-animation duration.

Returns
Return in-animation duration in million second
See also
setModularCaptionInAnimationDuration
Since
2.15.2

◆ getModularCaptionOutAnimationDuration

- (int) getModularCaptionOutAnimationDuration

Get modular caption out-animation duration.

Returns
Return out-animation duration in million second
See also
setModularCaptionOutAnimationDuration
Since
2.15.2

◆ getOpacity

- (float) getOpacity

Get the caption opacity.

Returns
Return the opacity.
See also
- setOpacity:

◆ getOrthoAngleRange

- (float) getOrthoAngleRange

Gets the ranging angle which is perpendicular with the polar angle for the caption. It's only valid for the panorama caption.

Returns
Returns the ranging angle which is perpendicular with the polar angle (in degrees).
Since
1.7.0

◆ getOutlineColor

- (NvsEffectColor) getOutlineColor

Gets the color of the outline for the caption.

Returns
Returns the NvsEffectColor object representing the color of the outline for the caption.
See also
- setOutlineColor:

◆ getOutlineWidth

- (float) getOutlineWidth

Gets the width of the outline for the caption.

Returns
Returns the width of the outline for the caption.
See also
- setOutlineWidth:

◆ getPanoramicRotation

- (float) getPanoramicRotation

Gets the rotation angle for the caption. It's only valid for the panorama caption.

Returns
Returns the rotation angle of the caption.
Since
01.7.1

◆ getPanoramicScaleX

- (float) getPanoramicScaleX

Gets the horizontal scaling factor for the caption. It's only valid for the panorama caption.

Returns
Returns the horizontal scaling factor.
Since
1.6.0

◆ getPanoramicScaleY

- (float) getPanoramicScaleY

Gets the vertical scaling factor for the caption. It's only valid for the panorama caption.

Returns
Returns the vertical scaling factor.
Since
1.6.0

◆ getPolarAngleRange

- (float) getPolarAngleRange

Gets the ranging angle of the polar angle for the caption. It's only valid for the panorama caption.

Returns
Returns the ranging angle of the polar angle (in degrees).
Since
1.6.0

◆ getRotationZ

- (float) getRotationZ

Gets the rotation angle for the caption.

Returns
Returns the rotation angle for the caption.
Since
1.14.1
See also
- setRotationZ:

◆ getScaleX

- (float) getScaleX

Gets the horizontal scaling factor for the caption.

Returns
Returns the horizontal scaling factor for the caption.
Since
1.14.1
See also
- setScaleX:
- getScaleY

◆ getScaleY

- (float) getScaleY

Gets the vertical scaling factor for the caption.

Returns
Returns the vertical scaling factor for the caption.
Since
1.14.1
See also
- setScaleY:
- getScaleX

◆ getSecondaryColor

- (NvsEffectColor) getSecondaryColor

Gets the current color value of the caption.

Returns
Returns the NvsEffectColor object representing the color value obtained.
See also
setSecondaryColor
Since
2.19.0

◆ getShadowColor

- (NvsEffectColor) getShadowColor

Gets the color of the caption shadow.

Returns
Returns the NvsEffectColor object representing the caption shadow color which obtained.
See also
- setShadowColor:

◆ getShadowFeather

- (float) getShadowFeather

Gets the feathering degree of the caption shadow.

Returns
Returns feathering degree
See also
setShadowFeather

◆ getShadowOffset

- (CGPoint) getShadowOffset

Gets the offset of the caption shadow.

Returns
Returns CGPoint object representing the caption shadow offset which obtained.
See also
- setShadowOffset:

◆ getText

- (NSString *) getText

Gets the caption text.

Returns
Returns the obtained caption text.
See also
- setText:

◆ getTextAlignment

- (NvsVideoEffectTextAlignment) getTextAlignment

Gets the caption horizontal alignment method.

Returns
Returns the caption horizontal alignment method.
See also
- setTextAlignment:

◆ getTextBoundingRect:

- (NvsEffectRect) getTextBoundingRect: (BOOL)  actualBoundingRect

Gets the rectangle of the caption text.

Returns
Returns the NvsEffectRect object representing the obtained rectangle.

◆ getTextCenterAzimuthAngle

- (float) getTextCenterAzimuthAngle

Gets the azimuth angle of the center point for the caption text. It's only valid for the panorama caption.

Returns
Returns the polar angle of the center point (in degrees).
Since
2.5.1

◆ getTextCenterPolarAngle

- (float) getTextCenterPolarAngle

Gets the polar angle of the center point for the caption text. It's only valid for the panorama caption.

Returns
Returns the polar angle of the center point (in degrees) for the caption text.
Since
2.5.1

◆ getTextColor

- (NvsEffectColor) getTextColor

Gets the current color value of the caption font.

Returns
Returns the NvsEffectColor object representing the obtained color value.
See also
- setTextColor:

◆ getTextOrthoAngleRange

- (float) getTextOrthoAngleRange

Gets the ranging angle of which is perpendicular with the polar angle for the caption text. It's only valid for the panorama caption.

Returns
Returns the ranging angle of which is perpendicular with the polar angle (in degrees).
Since
2.5.1

◆ getTextPolarAngleRange

- (float) getTextPolarAngleRange

Gets the ranging angle of the polar angle for the caption text. It's only valid for the panorama caption.

Returns
Returns the ranging angle of the polar angle for the caption text (in degrees).
Since
2.5.1

◆ getTextVerticalAlignment

- (NvsVideoEffectTextAlignment) getTextVerticalAlignment

Gets the caption vertical alignment method.

Returns
Returns the caption vertical alignment method.
See also
- setTextVerticalAlignment:
Since
2.19.1

◆ getUnderline

- (BOOL) getUnderline

Gets the caption under line.

Returns
Returns boolean value. True means it is under line, false means it is not.
See also
setUnderline

◆ getVerticalLayout

- (BOOL) getVerticalLayout

Gets the state whether the caption is vertical layout.

Returns
Returns the state whether the caption vertical layout. YES means it is vertical layout, NO means it is not.
See also
- setVerticalLayout:

◆ getWeight

- (int) getWeight

Gets the caption weight.

Returns
Returns the caption weight.
See also
setWeight

◆ getZValue

- (float) getZValue

Gets the Z value of the caption.

Returns
Returns the Z value of the caption.
See also
- setZValue:

◆ isFrameCaption

- (BOOL) isFrameCaption

Gets whether the caption is a frame caption.

Returns
Gets whether the caption is a frame caption.
Since
2.19.1

◆ movePosition:

- (void) movePosition: (int64_t)  offset

Changes the display position of the caption on the timeline (the in and out points move the value of "offset" at the same time).

Parameters
offsetThe offset value (in microseconds)
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- changeInPoint:
- changeOutPoint:

◆ rotateCaption:

- (void) rotateCaption: (float)  angle

Rotates the caption with the caption center point as the anchor point.

Parameters
angleThe rotation angle of caption
Since
1.8.1
See also
- rotateCaption:anchor:

◆ rotateCaption:anchor:

- (void) rotateCaption: (float)  angle
anchor: (CGPoint)  anchor 

Rotates the caption.

Parameters
angleThe rotation angle of the caption
anchorThe rotation anchor of the caption
Since
1.8.1
See also
- rotateCaption:

◆ scaleCaption:anchor:

- (void) scaleCaption: (float)  scaleFactor
anchor: (CGPoint)  anchor 

Scales the caption.

Parameters
scaleFactorThe scaling factor for the caption
anchorThe anchor for Scaling the caption
Since
1.8.1

◆ setAnchorPoint:

- (void) setAnchorPoint: (CGPoint)  anchor

Sets the caption anchor.

Parameters
anchorAnchor
Since
1.15.0
See also
- getAnchorPoint

◆ setBackgroundColor:

- (void) setBackgroundColor: (const NvsEffectColor *)  backgroundColor

Set text background color.

Parameters
backgroundColorBackground color value.
See also
- getBackgroundColor:
Since
2.15.1

◆ setBackgroundRadius:

- (void) setBackgroundRadius: (float)  radius

Set text background rectangle's corner radius.

Parameters
radiusCorner radius value
See also
- getBackgroundRadius:
Since
2.15.1

◆ setBold:

- (void) setBold: (BOOL)  bold

Sets whether the caption font is bold.

Parameters
boldIndicates whether the caption font is bold.YES means it is bold, NO means it is not.
See also
- getBold

◆ setCaptionTranslation:

- (void) setCaptionTranslation: (CGPoint)  translation

Sets the translation amount of the caption.

Parameters
translationThe horizontal and vertical absolute translation of the caption.
See also
- getCaptionTranslation
- translateCaption:

◆ setCenterAzimuthAngle:

- (void) setCenterAzimuthAngle: (float)  centerAzimuthAngle

Sets the azimuth angle of the center point for the caption. It's only valid for the panorama caption.

Parameters
centerAzimuthAnglethe azimuth angle of the center point (in degrees)
Since
1.6.0

◆ setCenterPolarAngle:

- (void) setCenterPolarAngle: (float)  centerPolarAngle

Sets the polar angle of the center point for the caption. It's only valid for the panorama caption.

Parameters
centerPolarAngleThe polar angle of the center point (in degrees).
Since
1.6.0

◆ setCurrentKeyFrameTime:

- (void) setCurrentKeyFrameTime: (int64_t)  time

Set the caption KeyFrameTime.

See also
setCurrentKeyFrameTime
Since
2.19.1

◆ setDrawOutline:

- (void) setDrawOutline: (BOOL)  drawOutline

Sets whether the caption draws the outline.

Parameters
drawOutlinewhether the caption draws the outline。YES means it draws the outline. NO means it does not.
See also
- getDrawOutline

◆ setDrawShadow:

- (void) setDrawShadow: (BOOL)  drawShadow

Sets the caption shadows.

Parameters
drawShadowWhether to set the caption shadow. YES means to set the caption shadow. NO means not.
See also
- getDrawShadow

◆ setFontFamily:

- (void) setFontFamily: (NSString *)  family

Sets the caption font.

Parameters
familyThe font family. if it's a null string, it's set as the default font.
Since
2.4.2
See also
- getFontFamily

◆ setFontSize:

- (void) setFontSize: (float)  fontSize

Sets the font size of the caption.

Parameters
fontSizethe font size of the caption
See also
- getFontSize

◆ setFontWithFilePath:

- (void) setFontWithFilePath: (NSString *)  filePath

Sets the caption font.

Parameters
filePathThe file path of the caption font. If it's a null string,it's set as the default font.
Since
1.3.0
See also
- getFontFilePath

◆ setFrameCaptionMaxFontSize:

- (void) setFrameCaptionMaxFontSize: (float)  maxFontSize

Sets the max font size of the frame caption. only apply to frame caption.

Since
2.19.1

◆ setItalic:

- (void) setItalic: (BOOL)  italic

Sets whether the caption font is italic.

Parameters
italicWhether it is italic. YES means the caption font is italic, and NO means it is not.
See also
- getItalic

◆ setLetterSpacing:

- (void) setLetterSpacing: (float)  letterSpacing

Sets caption word spacing.

Parameters
letterSpacingWord spacing is expressed in percentage value by default. (LETTER_SPACING_TYPE)
See also
- getLetterSpacing
setLetterSpacingType
Since
1.16.0

◆ setLetterSpacingType:

- (void) setLetterSpacingType: (NvsVideoEffectLetterSpacingType letterSpacingType

Sets caption word spacing type.

Parameters
letterSpacingTypeWord spacing type.(LETTER_SPACING_TYPE)
See also
- getLetterSpacingType
Since
2.15.1

◆ setLineSpacing:

- (void) setLineSpacing: (float)  lineSpacing

Sets caption line spacing.

Parameters
lineSpacingline spacing is expressed in absolute value.
See also
- getLineSpacing
Since
2.15.1

◆ setModularCaptionAnimationPeroid:

- (void) setModularCaptionAnimationPeroid: (int)  periodInMS

Set modular caption Animation Peroid.

Parameters
periodInMSAnimation peroid in million second
See also
- getModularCaptionAnimationPeroid
Since
2.15.2

◆ setModularCaptionInAnimationDuration:

- (void) setModularCaptionInAnimationDuration: (int)  inAnimationDurationInMS

Set modular caption in-animation duration.

Parameters
inAnimationDurationInMSin-animation duration in million second
See also
- getModularCaptionInAnimationDuration
Since
2.15.2

◆ setModularCaptionOutAnimationDuration:

- (void) setModularCaptionOutAnimationDuration: (int)  outAnimationDurationInMS

Set modular caption out-animation duration.

Parameters
outAnimationDurationInMSout-animation duration in million second
See also
- getModularCaptionOutAnimationDuration
Since
2.15.2

◆ setOpacity:

- (void) setOpacity: (float)  opacity

Set the caption opacity.

Parameters
opacityThe opacity of caption
See also
- getOpacity

◆ setOutlineColor:

- (void) setOutlineColor: (const NvsEffectColor *)  outlineColor

Sets the color of the outline for the caption.

Parameters
outlineColorthe color of the outline
See also
- getOutlineColor

◆ setOutlineWidth:

- (void) setOutlineWidth: (float)  outlineWidth

Sets the width of the outline for the caption.

Parameters
outlineWidththe width of the outline
See also
- getOutlineWidth

◆ setPanoramicRotation:

- (void) setPanoramicRotation: (float)  rotationAngle

Sets the rotation angle for the caption. It's only valid for the panorama caption.

Parameters
rotationAngleThe rotation angle
Since
1.7.1

◆ setPanoramicScaleX:

- (void) setPanoramicScaleX: (float)  scaleX

Sets the horizontal scaling factor for the caption. It's only valid for the panorama caption.

Parameters
scaleXThe horizontal scaling factor
Since
1.6.0

◆ setPanoramicScaleY:

- (void) setPanoramicScaleY: (float)  scaleY

Sets the vertical scaling factor for the caption. It's only valid for the panorama caption.

Parameters
scaleYThe vertical scaling factor
Since
1.6.0

◆ setPolarAngleRange:

- (void) setPolarAngleRange: (float)  polarAngleRange

Sets the ranging angle of the polar angle for the caption. It's only valid for the panorama caption.

Parameters
polarAngleRangethe ranging angle of the polar angle (in degrees)
Since
1.6.0

◆ setRecordingUserOperation:

- (void) setRecordingUserOperation: (BOOL)  recordingUserOperation

Sets whether to record user actions.

Parameters
recordingUserOperation
Since
02.11.0

◆ setRotationZ:

- (void) setRotationZ: (float)  angle

Sets the rotation angle for the caption.

Parameters
angleThe rotation angle
Since
1.14.1
See also
- getRotationZ

◆ setScaleX:

- (void) setScaleX: (float)  scale

Sets the horizontal scaling factor for the caption.

Parameters
scaleThe horizontal scaling factor
Since
1.14.1
See also
- getScaleX
- setScaleY:

◆ setScaleY:

- (void) setScaleY: (float)  scale

Sets the vertical scaling factor for the caption.

Parameters
scalethe vertical scaling factor
Since
1.14.1
See also
- getScaleY
- setScaleX:

◆ setSecondaryColor:

- (void) setSecondaryColor: (const NvsEffectColor *)  color

Sets caption secondary color. it is only used in karaoke subtitles now.

Parameters
textColorCaption color value.
See also
- getSecondaryColor
Since
2.19.0

◆ setShadowColor:

- (void) setShadowColor: (const NvsEffectColor *)  shadowColor

Sets the color of the caption shadow.

Parameters
shadowColorThe color of the caption shadow
See also
- getShadowColor

◆ setShadowFeather:

- (void) setShadowFeather: (float)  feather

Sets the feathering degree of the caption shadow.

Parameters
featherfeathering degree
See also
- getShadowFeather

◆ setShadowOffset:

- (void) setShadowOffset: (CGPoint)  shadowOffset

Sets the offset of the caption shadow.

Parameters
shadowOffsetThe offset of the caption shadow.
See also
- getShadowOffset

◆ setText:

- (void) setText: (NSString *)  text

Set the caption text.

Parameters
textThe caption text
See also
- getText

◆ setTextAlignment:

- (void) setTextAlignment: (NvsVideoEffectTextAlignment textAlign

Sets the caption horizontal alignment method.

Parameters
textAlignthe caption horizontal alignment method
See also
- getTextAlignment
setTextVerticalAlignment

◆ setTextColor:

- (void) setTextColor: (const NvsEffectColor *)  textColor

Sets the color of the caption text.

Parameters
textColorthe color of the caption text
See also
- getTextColor

◆ setTextFrameOriginRect:

- (void) setTextFrameOriginRect: (NvsEffectRect rc

Set the original frame size of the frame caption. If the current caption is not a frame caption, this function has no effect. You can get origin frame size.

Parameters
rcNew frame size.
See also
getCaptionBoundingVertices
Since
2.19.0

◆ setTextVerticalAlignment:

- (void) setTextVerticalAlignment: (NvsVideoEffectTextAlignment textVerticalAlign

Sets the caption vertical alignment method.

Parameters
textAlignthe caption vertical alignment method
See also
- getTextVerticalAlignment
setTextAlignment
Since
2.19.1

◆ setUnderline:

- (void) setUnderline: (BOOL)  underline

Sets caption under line.

Parameters
underlineWhether it is set to under line.
See also
- getUnderline

◆ setVerticalLayout:

- (void) setVerticalLayout: (BOOL)  verticalLayout

Sets whether the caption is vertical layout.

Parameters
verticalLayoutIndicates whether the caption is vertical layout.YES means it is vertical layout, NO means it is not.
See also
- getVerticalLayout

◆ setVideoResolution:

- (void) setVideoResolution: (NvsEffectVideoResolution resolution

Set the sticker's video resolution.

Parameters
resolutionThe sticker's video resolution
Since
2.20.0

◆ setWeight:

- (void) setWeight: (int)  weight

Sets caption weight.

Parameters
weightthe value in opentype weight integer.
See also
- getWeight

◆ setZValue:

- (void) setZValue: (float)  value

Sets the Z value of the caption.

Parameters
valueThe Z value
See also
- getZValue

◆ translateCaption:

- (void) translateCaption: (CGPoint)  translationOffset

translates the caption.

Parameters
translationOffsetThe horizontal and vertical offset values for the caption translation
Since
1.7.0
See also
- setCaptionTranslation:
- getCaptionTranslation

Property Documentation

◆ captionStylePackageId

- (NSString*) captionStylePackageId
readatomicassign

The package ID of the caption style.

Since
2.17.1

◆ category

- (NvsVideoEffectCategory) category
readatomicassign

Clip type.

◆ clipAffinityEnabled

- (BOOL) clipAffinityEnabled
readwritenonatomicassign

Whether to enable the affinity with clip.

Since
1.7.1

◆ inPoint

- (int64_t) inPoint
readatomicassign

The in point of the caption on the timeline(in microseconds)

◆ isModular

- (BOOL) isModular
readatomicassign

whether the current caption is a modular caption

Since
2.15.2

◆ isPanoramic

- (BOOL) isPanoramic
readatomicassign

Whether it is a panorama caption.

Since
1.6.0

◆ modularCaptionAnimationPackageId

- (NSString*) modularCaptionAnimationPackageId
readatomicassign

The package ID of the modular caption animation style.

Since
2.15.2

◆ modularCaptionContextPackageId

- (NSString*) modularCaptionContextPackageId
readatomicassign

The package ID of the modular caption context style.

Since
2.15.2

◆ modularCaptionInAnimationPackageId

- (NSString*) modularCaptionInAnimationPackageId
readatomicassign

The package ID of the modular caption in-animation style.

Since
2.15.2

◆ modularCaptionOutAnimationPackageId

- (NSString*) modularCaptionOutAnimationPackageId
readatomicassign

The package ID of the modular caption out-animation style.

Since
2.15.2

◆ modularCaptionRendererPackageId

- (NSString*) modularCaptionRendererPackageId
readatomicassign

The package ID of the modular caption render style.

Since
2.15.2

◆ outPoint

- (int64_t) outPoint
readatomicassign

The out point of the caption on the timeline (in microseconds)

◆ roleInTheme

- (NvsVideoEffectRoleInTheme) roleInTheme
readatomicassign

The role of captions in the theme (general, title, and trailer.)


The documentation for this class was generated from the following file: