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

Animated sticker class. More...

#import <NvsVideoEffectAnimatedSticker.h>

Inheritance diagram for NvsVideoEffectAnimatedSticker:
NvsEffect

Instance Methods

(NSString *) - getAnimatedStickerPackageId
 Get animated sticker's package ID. More...
 
(int64_t) - changeInPoint:
 Change the in-point of the animated sticker on the timeline. When the new in-point does not conform to the established rules, the final return in-point may be different from the new in-point value. Such as the new in-point is less than 0, the new in-point value is greater than the timeline duration, or the new in-point is greater than the out-point. More...
 
(int64_t) - changeOutPoint:
 Change the out-point of the animated sticker on the timeline. When the new out-point does not conform to the established rules, the final return out-point may be different from the new out-point value. Such as the new out-point is less than 0, the new out-point value is greater than the timeline duration, or the new out-point is less than the in-point. More...
 
(void) - movePosition:
 Change the display position of the animated sticker on the timeline (the in and out points are offset from the offset value at the same time). More...
 
(void) - setScale:
 Set the scale value of the animated sticker. The scale value set by this function do not stack. More...
 
(float) - getScale
 Get the scale value of the animated sticker. More...
 
(void) - setHorizontalFlip:
 Set the horizontal flip of the animated sticker. More...
 
(BOOL) - getHorizontalFlip
 Get the horizontal flip state of the animated sticker. More...
 
(void) - setVerticalFlip:
 Set the vertical flip of the animated sticker. More...
 
(BOOL) - getVerticalFlip
 Get the vertical flip state of the animated sticker. More...
 
(void) - setRotationZ:
 Set the angle at which the animation sticker rotates clockwise along the Z-axis, which is perpendicular to the screen.The rotation Angle set by this function does not stack. More...
 
(float) - getRotationZ
 Get the angle at which the animation sticker rotates clockwise along the Z-axis, which is perpendicular to the screen. More...
 
(void) - setTranslation:
 Sets the translation position of the animated sticker in the timeline coordinate system.The translation coordinate set by this function do not stack.please refer to TimeLine and View Coordinate. More...
 
(CGPoint) - getTransltion
 Get the translation position of the animated sticker in the timeline coordinate system. More...
 
(void) - translateAnimatedSticker:
 Tanslate animated sticker in the timeline coordinate system.The translation coordinates set by this function are stackable. More...
 
(void) - scaleAnimatedSticker:anchor:
 Scale animation sticker with the anchor point as the center. The scaling value set by this function is stackable. More...
 
(void) - rotateAnimatedSticker:anchor:
 Rotate the animation sticker around the anchor point. The rotation angle set by this function is stackable. More...
 
(void) - rotateAnimatedSticker:
 Rotate the animation sticker with the center point of the animation sticker as the anchor point.The rotation angle set by this function is stackable. More...
 
(NvsEffectRect- getOriginalBoundingRect
 Get the original bounding of the animated sticker in the timeline coordinate system.please refer to TimeLine and View Coordinate. More...
 
(NSArray *) - getBoundingRectangleVertices
 Get the vertex positions of the animated sticker's original bounding in the timeline coordinate system.please refer to TimeLine and View Coordinate. More...
 
(void) - setCenterPolarAngle:
 Set the polar angle of the center point on the animated sticker. Only valid for panorama animated stickers. More...
 
(float) - getCenterPolarAngle
 Get the polar angle of the center point of the animated sticker. It is only valid for panorama animated stickers. More...
 
(void) - setCenterAzimuthAngle:
 Set the azimuth of the center point on the animated sticker. It is only valid for panorama animated stickers. More...
 
(float) - getCenterAzimuthAngle
 Get the azimuth of the center point of the animated sticker. It is only valid for panorama animated stickers. More...
 
(void) - setPolarAngleRange:
 Set animated sticker's field angle, which is coplanar with the polar angle. It is only valid for panorama animated stickers. More...
 
(float) - getPolarAngleRange
 Get animated sticker's field angle, which is coplanar with the polar angle. It is only valid for panorama animated stickers. More...
 
(float) - getOrthoAngleRange
 Get the animated sticker’s field angle which is perpendicular to the polar angle. It is only valid for panorama animated stickers. More...
 
(void) - setZValue:
 Set the sticker Z value.The higher the Z value, the higher the sticker is. More...
 
(float) - getZValue
 Get the sticker Z value. More...
 
(void) - setOpacity:
 Set the sticker opacity,value range [0, 1]. More...
 
(float) - getOpacity
 Get the sticker opacity. More...
 
(void) - setCurrentKeyFrameTime:
 Set the sticker's Key frame time. More...
 
(void) - setVideoResolution:
 Set the sticker's video resolution. More...
 
(bool) - applyAnimatedStickerPeriodAnimation:
 Applys animated sticker loop-animation style. More...
 
(bool) - applyAnimatedStickerInAnimation:
 Applys animated sticker in-animation style. Notes:please set loop-Animation to null before you set in-animation, otherwise it will NOT works. More...
 
(bool) - applyAnimatedStickerOutAnimation:
 Applys animated sticker out-animation style.Notes:please set loop-Animation to null before you set out-animation, otherwise it will NOT works. More...
 
(void) - setAnimatedStickerAnimationPeriod:
 Set animated sticker Animation Period. More...
 
(int) - getAnimatedStickerAnimationPeriod
 Get animated sticker Animation Period. More...
 
(void) - setAnimatedStickerInAnimationDuration:
 Set animated sticker in-animation duration. More...
 
(int) - getAnimatedStickerInAnimationDuration
 Get animated sticker in-animation duration. More...
 
(void) - setAnimatedStickerOutAnimationDuration:
 Set animated sticker out-animation duration. More...
 
(int) - getAnimatedStickerOutAnimationDuration
 Get animated sticker out-animation duration. 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's a panorama animated sticker,Default is no. More...
 
int64_t inPoint
 The in point of the animated sticker on the timeline (in microseconds). More...
 
int64_t outPoint
 The out point of the animated sticker on the timeline (in microseconds). More...
 
int64_t defaultDuration
 The default duration of the animated sticker on the timeline (in microseconds). More...
 
- Properties inherited from NvsEffect
NvsEffectDescriptiondescription
 

Detailed Description

Animated sticker class.

Animation sticker is a landscaping effect used in video editing to produce animated effects. Users can add and remove animated stickers from the timeline, as well as adjust various properties of the stickers through various APIs, such as position, size, display time, and so on.
Note: The in-point and out-point units of the animated sticker on the timeline are both in microseconds.

Warning
In the NvsVideoEffectAnimatedSticker class, all public APIs are used in the UI thread! ! !

Method Documentation

◆ applyAnimatedStickerInAnimation:

- (bool) applyAnimatedStickerInAnimation: (NSString *)  animatedStickerInAnimationPackageId

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

Parameters
animatedStickerInAnimationPackageIdAnimated sticker 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
getAnimatedStickerInAnimationPackageId
Since
2.21.0

◆ applyAnimatedStickerOutAnimation:

- (bool) applyAnimatedStickerOutAnimation: (NSString *)  animatedStickerOutAnimationPackageId

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

Parameters
AnimatedStickerOutAnimationPackageIdAnimated sticker 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
getAnimatedStickerOutAnimationPackageId
Since
2.21.0

◆ applyAnimatedStickerPeriodAnimation:

- (bool) applyAnimatedStickerPeriodAnimation: (NSString *)  animatedStickerPeriodAnimationPackageId

Applys animated sticker loop-animation style.

Parameters
animatedStickerPeriodAnimationPackageIdanimated sticker 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
getAnimatedStickerAnimationPackageId
Since
2.21.0

◆ changeInPoint:

- (int64_t) changeInPoint: (int64_t)  newInPoint

Change the in-point of the animated sticker on the timeline. When the new in-point does not conform to the established rules, the final return in-point may be different from the new in-point value. Such as the new in-point is less than 0, the new in-point value is greater than the timeline duration, or the new in-point is greater than the out-point.

Parameters
newInPointThe new in-point of the animated sticker on the timeline (in microseconds).
Returns
Return the in-point of the animated sticker on the timeline (in microseconds).
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
- changeOutPoint:
getInPoint
- movePosition:

◆ changeOutPoint:

- (int64_t) changeOutPoint: (int64_t)  newOutPoint

Change the out-point of the animated sticker on the timeline. When the new out-point does not conform to the established rules, the final return out-point may be different from the new out-point value. Such as the new out-point is less than 0, the new out-point value is greater than the timeline duration, or the new out-point is less than the in-point.

Parameters
newOutPointThe out-point of the animated sticker on the timeline (in microseconds).
Returns
Return the out-point of the animated sticker on the timeline (in microseconds).
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
- changeInPoint:
getOutPoint
- movePosition:

◆ getAnimatedStickerAnimationPeriod

- (int) getAnimatedStickerAnimationPeriod

Get animated sticker Animation Period.

Returns
Return animation period in million second
See also
setAnimatedStickerAnimationPeriod
Since
2.21.0

◆ getAnimatedStickerInAnimationDuration

- (int) getAnimatedStickerInAnimationDuration

Get animated sticker in-animation duration.

Returns
Return in-animation duration in million second
See also
setAnimatedStickerInAnimationDuration
Since
2.21.0

◆ getAnimatedStickerOutAnimationDuration

- (int) getAnimatedStickerOutAnimationDuration

Get animated sticker out-animation duration.

Returns
Return out-animation duration in million second
See also
setAnimatedStickerOutAnimationDuration
Since
2.21.0

◆ getAnimatedStickerPackageId

- (NSString *) getAnimatedStickerPackageId

Get animated sticker's package ID.

Returns
Return the animated sticker's package ID.
Since
2.20.0

◆ getBoundingRectangleVertices

- (NSArray *) getBoundingRectangleVertices

Get the vertex positions of the animated sticker's original bounding in the timeline coordinate system.please refer to TimeLine and View Coordinate.

Returns
Return a List<PointF> object containing four vertex positions corresponding to the top left, bottom left, bottom right, and top right vertices of the original bounding.
Since
2.20.0

◆ getCenterAzimuthAngle

- (float) getCenterAzimuthAngle

Get the azimuth of the center point of the animated sticker. It is only valid for panorama animated stickers.

Returns
Return the azimuth of the center point of the animated sticker, in degrees.
Since
2.20.0

◆ getCenterPolarAngle

- (float) getCenterPolarAngle

Get the polar angle of the center point of the animated sticker. It is only valid for panorama animated stickers.

Returns
Return the polar angle of the center point of the animated sticker, in degrees.
Since
2.20.0

◆ getHorizontalFlip

- (BOOL) getHorizontalFlip

Get the horizontal flip state of the animated sticker.

Returns
Return a boolean value indicating a horizontal flip state. True means it flips, false means not.
See also
- setHorizontalFlip:

◆ getOpacity

- (float) getOpacity

Get the sticker opacity.

Returns
Return the sticker opacity.
See also
- setOpacity:
Since
2.20.0

◆ getOriginalBoundingRect

- (NvsEffectRect) getOriginalBoundingRect

Get the original bounding of the animated sticker in the timeline coordinate system.please refer to TimeLine and View Coordinate.

Returns
Return a RectF object representing the original bounding.

◆ getOrthoAngleRange

- (float) getOrthoAngleRange

Get the animated sticker’s field angle which is perpendicular to the polar angle. It is only valid for panorama animated stickers.

Returns
Return the animated sticker’s field angle which is perpendicular to the polar angle, in degrees.
Since
2.20.0

◆ getPolarAngleRange

- (float) getPolarAngleRange

Get animated sticker's field angle, which is coplanar with the polar angle. It is only valid for panorama animated stickers.

Returns
Return animated sticker's field angle coplanar with the polar corner, in degrees.
Since
2.20.0

◆ getRotationZ

- (float) getRotationZ

Get the angle at which the animation sticker rotates clockwise along the Z-axis, which is perpendicular to the screen.

Returns
Return the rotation angle value.
See also
- setRotationZ:
- rotateAnimatedSticker:

◆ getScale

- (float) getScale

Get the scale value of the animated sticker.

Returns
Return the scale value.
See also
- setScale:

◆ getTransltion

- (CGPoint) getTransltion

Get the translation position of the animated sticker in the timeline coordinate system.

Returns
Return a PointF object representing the translation position.
See also
- setTranslation:

◆ getVerticalFlip

- (BOOL) getVerticalFlip

Get the vertical flip state of the animated sticker.

Returns
Return a boolean value indicating a vertical flip state. True means it flips, false means not.
See also
- setVerticalFlip:

◆ getZValue

- (float) getZValue

Get the sticker Z value.

Returns
Return sticker Z value.
Since
2.20.0

◆ movePosition:

- (void) movePosition: (int64_t)  offset

Change the display position of the animated sticker on the timeline (the in and out points are offset from the offset value at the same time).

Parameters
offsetOffset value for in and out points changes (in microseconds).
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
- changeInPoint:
- changeOutPoint:

◆ rotateAnimatedSticker:

- (void) rotateAnimatedSticker: (float)  angle

Rotate the animation sticker with the center point of the animation sticker as the anchor point.The rotation angle set by this function is stackable.

Parameters
anglerotation angle
Since
2.20.0

◆ rotateAnimatedSticker:anchor:

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

Rotate the animation sticker around the anchor point. The rotation angle set by this function is stackable.

Parameters
anglerotation angle.
anchorrotation anchor.
Since
2.20.0

◆ scaleAnimatedSticker:anchor:

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

Scale animation sticker with the anchor point as the center. The scaling value set by this function is stackable.

Parameters
scaleFactorAnimated sticker scaling factor.
anchorAnimated sticker scale anchor.
Since
2.20.0

◆ setAnimatedStickerAnimationPeriod:

- (void) setAnimatedStickerAnimationPeriod: (int)  periodInMS

Set animated sticker Animation Period.

Parameters
periodInMSAnimation period in million second
See also
- getAnimatedStickerAnimationPeriod
Since
2.21.0

◆ setAnimatedStickerInAnimationDuration:

- (void) setAnimatedStickerInAnimationDuration: (int)  inAnimationDurationInMS

Set animated sticker in-animation duration.

Parameters
inAnimationDurationInMSin-animation duration in million second
See also
- getAnimatedStickerInAnimationDuration
Since
2.21.0

◆ setAnimatedStickerOutAnimationDuration:

- (void) setAnimatedStickerOutAnimationDuration: (int)  outAnimationDurationInMS

Set animated sticker out-animation duration.

Parameters
outAnimationDurationInMSout-animation duration in million second
See also
- getAnimatedStickerOutAnimationDuration
Since
2.21.0

◆ setCenterAzimuthAngle:

- (void) setCenterAzimuthAngle: (float)  centerAzimuthAngle

Set the azimuth of the center point on the animated sticker. It is only valid for panorama animated stickers.

Parameters
centerAzimuthAngleThe azimuth of the center point, in degrees.
Since
2.20.0

◆ setCenterPolarAngle:

- (void) setCenterPolarAngle: (float)  centerPolarAngle

Set the polar angle of the center point on the animated sticker. Only valid for panorama animated stickers.

Parameters
centerPolarAngleThe polar angle of the center point, in degrees.
Since
2.20.0

◆ setCurrentKeyFrameTime:

- (void) setCurrentKeyFrameTime: (int64_t)  time

Set the sticker's Key frame time.

Parameters
timetime point
See also
setCurrentKeyFrameTime
Since
2.20.0

◆ setHorizontalFlip:

- (void) setHorizontalFlip: (bool)  flip

Set the horizontal flip of the animated sticker.

Parameters
flipWhether to flip horizontally. True means horizontal flip, and false means not.
See also
- getHorizontalFlip

◆ setOpacity:

- (void) setOpacity: (float)  opacity

Set the sticker opacity,value range [0, 1].

Parameters
opacitysticker opacity.
See also
- getOpacity
Since
2.20.0

◆ setPolarAngleRange:

- (void) setPolarAngleRange: (float)  polarAngleRange

Set animated sticker's field angle, which is coplanar with the polar angle. It is only valid for panorama animated stickers.

Parameters
polarAngleRangeThe field angle coplanar with the polar angle, in degrees.
Since
2.20.0

◆ setRotationZ:

- (void) setRotationZ: (float)  angle

Set the angle at which the animation sticker rotates clockwise along the Z-axis, which is perpendicular to the screen.The rotation Angle set by this function does not stack.

Parameters
angleRotation angle value.
See also
- getRotationZ

◆ setScale:

- (void) setScale: (float)  scale

Set the scale value of the animated sticker. The scale value set by this function do not stack.

Parameters
scaleScaling value.
See also
- getScale

◆ setTranslation:

- (void) setTranslation: (CGPoint)  translation

Sets the translation position of the animated sticker in the timeline coordinate system.The translation coordinate set by this function do not stack.please refer to TimeLine and View Coordinate.

Parameters
translationTranslation position
See also
- getTransltion
- translateAnimatedSticker:

◆ setVerticalFlip:

- (void) setVerticalFlip: (bool)  flip

Set the vertical flip of the animated sticker.

Parameters
flipWhether to flip vertically. True means it flip vertically, false means not.
See also
- getVerticalFlip

◆ setVideoResolution:

- (void) setVideoResolution: (NvsEffectVideoResolution *)  resolution

Set the sticker's video resolution.

Parameters
resolutionThe sticker's video resolution
Since
2.20.0

◆ setZValue:

- (void) setZValue: (float)  value

Set the sticker Z value.The higher the Z value, the higher the sticker is.

Parameters
valueZ value
Since
2.20.0

◆ translateAnimatedSticker:

- (void) translateAnimatedSticker: (CGPoint)  translationOffset

Tanslate animated sticker in the timeline coordinate system.The translation coordinates set by this function are stackable.

Parameters
translationOffsetAnimated sticker translation offset values.
Since
2.20.0
See also
- setTranslation:
getTranslation

Property Documentation

◆ defaultDuration

- (int64_t) defaultDuration
readatomicassign

The default duration of the animated sticker on the timeline (in microseconds).

Since
2.1.0

◆ inPoint

- (int64_t) inPoint
readatomicassign

The in point of the animated sticker on the timeline (in microseconds).

◆ isPanoramic

- (BOOL) isPanoramic
readatomicassign

Whether It's a panorama animated sticker,Default is no.

Since
1.6.0

◆ outPoint

- (int64_t) outPoint
readatomicassign

The out point of the animated sticker on the timeline (in microseconds).


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