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

Effect SDK context class. More...

#import <NvsEffectSdkContext.h>

Inheritance diagram for NvsEffectSdkContext:

Instance Methods

(NSArray *) - getAllBuiltinVideoFxNames
 Gets a list of all build-in video effects' names. More...
 
(NvsVideoEffect *) - createVideoEffect:aspectRatio:
 Creates a special effect object. More...
 
(NvsVideoEffect *) - createVideoEffect:aspectRatio:realTime:
 Creates a special effect object. More...
 
(NvsVideoEffectTransition *) - createVideoTransition:aspectRatio:
 Creates a special transition object. More...
 
(NvsVideoEffectAnimatedSticker *) - createAnimatedSticker:duration:isPanoramic:packageId:aspectRatio:
 Creates animated sticker object. More...
 
(NvsVideoEffectAnimatedSticker *) - createCustomAnimatedSticker:duration:isPanoramic:packageId:customImageFilePath:aspectRatio:
 Creates custom animated sticker object. More...
 
(NvsVideoEffectCompoundCaption *) - createCompoundCaption:duration:packageId:aspectRatio:
 Creates compound caption object. More...
 
(NvsVideoEffectCaption *) - createCaption:inPoint:duration:captionStylePackageId:aspectRatio:
 Create caption. More...
 
(NvsVideoEffectCaption *) - createPanoramicCaption:inPoint:duration:captionStylePackageId:aspectRatio:
 Add a panorama caption on the timeline. More...
 
(NvsVideoEffectCaption *) - createModularCaption:inPoint:duration:aspectRatio:
 Add a modular caption on the timeline. More...
 
(NvsEffectRenderCore *) - createEffectRenderCore
 Creates a special effect rendering object. More...
 
(NSString *) - registerFontByFilePath:
 Register fonts according to file path. More...
 
(void) - UnregisterFontByFilePath:
 Unregister fonts according to file path. More...
 

Class Methods

(BOOL) + verifySdkLicenseFile:
 Verifies the SDK license. Note: This interface must be called before the NvsStreamingContext is initialized. More...
 
(NvsEffectSdkContext *) + sharedInstance:
 Gets the unique instance of the effect sdk context. More...
 
(void) + destroyInstance
 Destroys the effect sdk context instance. More...
 
(int) + hasARModule
 Checks if the current SDK contains an AR module. More...
 
(BOOL) + initHumanDetection:licenseFilePath:features:
 Initializes the human body detection mechanism. More...
 
(BOOL) + initHumanDetectionExt:licenseFilePath:features:
 Human detection initialization extension. More...
 
(BOOL) + setupHumanDetectionData:dataFilePath:
 Setup human detection data package. More...
 
(void) + closeHumanDetection
 Turns off the human detection mechanism. More...
 
(void) + getSdkVersion:minorVersion:revisionNumber:
 Gets the version information of Meishe SDK. More...
 

Properties

NvsAssetPackageManagerassetPackageManager
 Asset package manager. More...
 

Detailed Description

Effect SDK context class.

Method Documentation

◆ closeHumanDetection

+ (void) closeHumanDetection

Turns off the human detection mechanism.

Since
2.5.0

◆ createAnimatedSticker:duration:isPanoramic:packageId:aspectRatio:

- (NvsVideoEffectAnimatedSticker *) createAnimatedSticker: (int64_t)  inPoint
duration: (int64_t)  duration
isPanoramic: (bool)  isPanoramic
packageId: (NSString *)  packageId
aspectRatio: (NvsEffectRational aspectRatio 

Creates animated sticker object.

Parameters
inPointIn point of sticker
durationDuration of sticker
isPanoramicWhether panoramic sticker
animatedStickerIdAnimated sticker package id.
aspectRatioThe aspect ratio of animated sticker.
Returns
Returns the created animated sticker object.

◆ createCaption:inPoint:duration:captionStylePackageId:aspectRatio:

- (NvsVideoEffectCaption *) createCaption: (NSString *)  captionText
inPoint: (int64_t)  inPoint
duration: (int64_t)  duration
captionStylePackageId: (NSString *)  captionStylePackageId
aspectRatio: (NvsEffectRational aspectRatio 

Create caption.

Parameters
captionTextText of caption
inPointThe in point of the caption (in microseconds)
durationCaption display duration (in microseconds)
captionStylePackageIdCaption style package Id.If it does not exist, you can pass an empty string or null.
aspectRatioThe aspect ratio of caption
Returns
Returns the NvsTimelineCaption object.
It will return null in the following situations:
1. No caption function authorization;
2. If inPoint is less than 0 or greater than or equal to the current timeline duration, or duration is not greater than 0.
Since
2.20.0

◆ createCompoundCaption:duration:packageId:aspectRatio:

- (NvsVideoEffectCompoundCaption *) createCompoundCaption: (int64_t)  inPoint
duration: (int64_t)  duration
packageId: (NSString *)  packageId
aspectRatio: (NvsEffectRational aspectRatio 

Creates compound caption object.

Parameters
inPointIn point of caption
durationDuration of caption
packageIdcaption package id.
aspectRatioThe aspect ratio of caption
Returns
Returns the created compound caption object.

◆ createCustomAnimatedSticker:duration:isPanoramic:packageId:customImageFilePath:aspectRatio:

- (NvsVideoEffectAnimatedSticker *) createCustomAnimatedSticker: (int64_t)  inPoint
duration: (int64_t)  duration
isPanoramic: (bool)  isPanoramic
packageId: (NSString *)  packageId
customImageFilePath: (NSString *)  customImageFilePath
aspectRatio: (NvsEffectRational aspectRatio 

Creates custom animated sticker object.

Parameters
inPointIn point of sticker
durationDuration of sticker
isPanoramicWhether panoramic sticker
animatedStickerIdAnimated sticker package id.
customImageFilePathCustom sticker image file path.
aspectRatioThe aspect ratio of animated sticker.
Returns
Returns the created animated sticker object.

◆ createEffectRenderCore

- (NvsEffectRenderCore *) createEffectRenderCore

Creates a special effect rendering object.

Returns
Returns the created effect rendering object.

◆ createModularCaption:inPoint:duration:aspectRatio:

- (NvsVideoEffectCaption *) createModularCaption: (NSString *)  captionText
inPoint: (int64_t)  inPoint
duration: (int64_t)  duration
aspectRatio: (NvsEffectRational aspectRatio 

Add a modular caption on the timeline.

Parameters
captionTextText of caption
inPointThe in point of the caption on the timeline (in microseconds)
durationCaption display duration (in microseconds)
aspectRatioThe aspect ratio of caption
Returns
Returns the NvsTimelineCaption object.
It will return null in the following situations:
1. No caption function authorization;
2. If inPoint is less than 0 or greater than or equal to the current timeline duration, or duration is not greater than 0.
Since
2.20.0

◆ createPanoramicCaption:inPoint:duration:captionStylePackageId:aspectRatio:

- (NvsVideoEffectCaption *) createPanoramicCaption: (NSString *)  captionText
inPoint: (int64_t)  inPoint
duration: (int64_t)  duration
captionStylePackageId: (NSString *)  captionStylePackageId
aspectRatio: (NvsEffectRational aspectRatio 

Add a panorama caption on the timeline.

Parameters
captionTextText of caption
inPointThe in point of the caption on the timeline (in microseconds)
durationCaption display duration (in microseconds)
captionStylePackageIdCaption style package Id.If it does not exist, you can pass an empty string or null.
aspectRatioThe aspect ratio of caption
Returns
Returns the NvsTimelineCaption object.
It will return null in the following situations:
1. No caption function authorization;
2. If inPoint is less than 0 or greater than or equal to the current timeline duration, or duration is not greater than 0.
Since
2.20.0

◆ createVideoEffect:aspectRatio:

- (NvsVideoEffect *) createVideoEffect: (NSString *)  effectId
aspectRatio: (NvsEffectRational aspectRatio 

Creates a special effect object.

Parameters
effectIdSpecial effects ID. For build-in video effects, it is the name of the effect. If it is a resource package effect, it is the resource package ID.
aspectRatioAspect ratio
Returns
Returns the created special effect object.

◆ createVideoEffect:aspectRatio:realTime:

- (NvsVideoEffect *) createVideoEffect: (NSString *)  effectId
aspectRatio: (NvsEffectRational aspectRatio
realTime: (BOOL)  realTime 

Creates a special effect object.

Parameters
effectIdSpecial effects ID. For build-in video effects, it is the name of the effect. If it is a resource package effect, it is the resource package ID.
aspectRatioAspect ratio
realTimerealTime mode
Returns
Returns the created special effect object.

◆ createVideoTransition:aspectRatio:

- (NvsVideoEffectTransition *) createVideoTransition: (NSString *)  transitionId
aspectRatio: (NvsEffectRational aspectRatio 

Creates a special transition object.

Parameters
effectIdSpecial transitions ID. For build-in video transitions, it is the name of the effect. If it is a resource package transition, it is the resource package ID.
aspectRatioAspect ratio
realTimerealTime mode
Returns
Returns the created special transition object.

◆ destroyInstance

+ (void) destroyInstance

Destroys the effect sdk context instance.

See also
+ sharedInstance:

◆ getAllBuiltinVideoFxNames

- (NSArray *) getAllBuiltinVideoFxNames

Gets a list of all build-in video effects' names.

Returns
Returns an array object containing all the build-in video effects' names.

◆ getSdkVersion:minorVersion:revisionNumber:

+ (void) getSdkVersion: (int *)  majorVersion
minorVersion: (int *)  minorVersion
revisionNumber: (int *)  revisionNumber 

Gets the version information of Meishe SDK.

Parameters
majorVersionMajor version number
minorVersionMinor version number
revisionNumberRevision number
Since
2.23.0

◆ hasARModule

+ (int) hasARModule

Checks if the current SDK contains an AR module.

Returns
Returns value of 0 means that no AR module exists, and a value greater than 0 means that the AR module exists.
Since
2.5.0

◆ initHumanDetection:licenseFilePath:features:

+ (BOOL) initHumanDetection: (NSString *)  modelFilePath
licenseFilePath: (NSString *)  licenseFilePath
features: (int)  features 

Initializes the human body detection mechanism.

Parameters
modelFilePathThe file path of the face model
licenseFilePathThe file path of license
featuresHuman detection feature flag field. Please refer to Human detection feature
Returns
The return value indicates whether it is successful
Since
2.5.0

◆ initHumanDetectionExt:licenseFilePath:features:

+ (BOOL) initHumanDetectionExt: (NSString *)  modelFilePath
licenseFilePath: (NSString *)  licenseFilePath
features: (int)  features 

Human detection initialization extension.

Parameters
modelFilePathPath of the model file
licenseFilePathPath of the license file
featureshuman detection flag field. Please refer to Flag of human detection.
Since
2.17.1

◆ registerFontByFilePath:

- (NSString *) registerFontByFilePath: (NSString *)  filePath

Register fonts according to file path.

Returns
Returns the fontfamily of the font. If the file path is empty or the registration fails, it returns an empty string. If the context does not exist, it returns nil.
Since
2.23.0

◆ setupHumanDetectionData:dataFilePath:

+ (BOOL) setupHumanDetectionData: (int)  dataType
dataFilePath: (NSString *)  dataFilePath 

Setup human detection data package.

Parameters
dataTypeHuman detection data package type.Please refer toHuman detection data packet type.
dataFilePathThe file path of data
Returns
The return value indicates whether it is successful.
Since
2.6.0

◆ sharedInstance:

+ (NvsEffectSdkContext *) sharedInstance: (NvsEffectSdkContextFlag flags

Gets the unique instance of the effect sdk context.

Returns
Returns the instance of the effect sdk context.
See also
+ destroyInstance

◆ UnregisterFontByFilePath:

- (void) UnregisterFontByFilePath: (NSString *)  filePath

Unregister fonts according to file path.

Since
2.23.0

◆ verifySdkLicenseFile:

+ (BOOL) verifySdkLicenseFile: (NSString *)  sdkLicenseFilePath

Verifies the SDK license. Note: This interface must be called before the NvsStreamingContext is initialized.

Parameters
sdkLicenseFilePathSDK license file path
Returns
Returns BOOL value. YES indicates that the license verification is successful, and NO indicates that the verification fails. If the verification fails, a subsequent watermark will appear in video preview and generated videos.

Property Documentation

◆ assetPackageManager

- (NvsAssetPackageManager*) assetPackageManager
readatomicassign

Asset package manager.


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