MeiCam SDK For iOS  3.1.2
Instance Methods | Properties | List of all members
NvsAssetPackageManager Class Reference

Asset package manager for managing assets in video. More...

#import <NvsAssetPackageManager.h>

Inheritance diagram for NvsAssetPackageManager:

Instance Methods

(NSString *) - getAssetPackageIdFromAssetPackageFilePath:
 Gets asset package ID from asset package path. More...
 
(int) - getAssetPackageVersionFromAssetPackageFilePath:
 Gets the package version number from package file path. More...
 
(NvsAssetPackageManagerError- installAssetPackage:license:type:sync:assetPackageId:
 Installs asset package. More...
 
(NvsAssetPackageManagerError- upgradeAssetPackage:license:type:sync:assetPackageId:
 Upgrades asset package. More...
 
(NvsAssetPackageManagerError- uninstallAssetPackage:type:
 Uninstalls asset package. More...
 
(NvsAssetPackageStatus- getAssetPackageStatus:type:
 Get the state of asset package. More...
 
(int) - getAssetPackageVersion:type:
 Gets the version number of the installed asset package. More...
 
(int) - getAssetPackageSupportedAspectRatio:type:
 Gets the supported aspect ratio of the asset package. More...
 
(NSArray *) - getAssetPackageListOfType:
 Gets a list of asset packages of certain type. More...
 
(BOOL) - isCustomAnimatedSticker:
 Defines if it is a customized sticker. More...
 
(BOOL) - isParticleFx:
 Defines if it is particle Fx. More...
 
(BOOL) - isThemeContainMusic:
 Check whether a theme package contain music. More...
 
(NSString *) - GetVideoFxAssetPackageDescription:
 Gets the Fx description of an asset of type VideoFx. More...
 
(NSArray< NvsTemplateFootageDesc * > *) - getTemplateFootages:
 Gets the footage description list of the Template asset. More...
 
(NSArray< NvsTemplateCaptionDesc * > *) - getTemplateCaptions:
 Gets the caption description list of the Template asset. More...
 
(int) - getTemplateCurrentAspectRatio:
 Gets the aspect ratio which is template using. More...
 
(NSArray< NvsTemplateCompoundCaptionDesc * > *) - getTemplateCampoundCaptions:
 Gets the compound caption description list of the Template asset. More...
 
(BOOL) - changeTemplateAspectRatio:aspectRatio:
 Change aspect ratio of template. More...
 
(NSString *) - getARSceneAssetPackagePrompt:
 Get the prompt message of the ARScene asset package. More...
 
(BOOL) - getARSceneAssetPackage:beautyPreset:
 Get Beauty effect preset in a ARScene asset package. More...
 
(BOOL) - getARSceneAssetPackage:shapeBeautificationPreset:
 Get shape beautification effect preset in a ARScene asset package. More...
 

Properties

id< NvsAssetPackageManagerDelegatedelegate
 
id< NvsAssetPackageManagerGenerateTemplateDelegategenerateTemplateDelegate
 

Detailed Description

Asset package manager for managing assets in video.

In the development of the SDK, the asset package manager unifies the various special asset packages including subtitles, themes, animation stickers, etc. for installation, upgrading, and uninstallation. When it is installing, upgrading, and uninstalling, there will be a corresponding error type for errors to be quickly located and resolved.

Warning
NvsAssetPackageManager类中,所有public API都在UI线程使用!!!

Method Documentation

◆ changeTemplateAspectRatio:aspectRatio:

- (BOOL) changeTemplateAspectRatio: (NSString *)  uuidString
aspectRatio: (int)  aspectRatio 

Change aspect ratio of template.

Parameters
uuidStringspecial effect uuid
Returns
Returns suc or not
Since
2.18.1

◆ getARSceneAssetPackage:beautyPreset:

- (BOOL) getARSceneAssetPackage: (NSString *)  uuidString
beautyPreset: (NvsARSceneBeautyPreset *)  beautyPreset 

Get Beauty effect preset in a ARScene asset package.

Parameters
uuidStringasset package uuid
beautyPreseta pointer of NvsARSceneBeautyPreset, preset data will be returned in this structure
Returns
Returns YES on success, NO on failure or if there is no preset, data in preset will be undefined if this method returns NO!
Since
2.9.0

◆ getARSceneAssetPackage:shapeBeautificationPreset:

- (BOOL) getARSceneAssetPackage: (NSString *)  uuidString
shapeBeautificationPreset: (NvsARSceneShapeBeautificationPreset *)  shapeBeautificationPreset 

Get shape beautification effect preset in a ARScene asset package.

Parameters
uuidStringasset package uuid
shapeBeautificationPreseta pointer of NvsARSceneShapeBeautificationPreset, preset data will be returned in this structure
Returns
Returns YES on success, NO on failure or if there is no preset, data in preset will be undefined if this method returns NO!
Since
2.9.0

◆ getARSceneAssetPackagePrompt:

- (NSString *) getARSceneAssetPackagePrompt: (NSString *)  uuidString

Get the prompt message of the ARScene asset package.

Parameters
uuidStringasset package uuid
Returns
Returns a String object which represent the prompt message.
Since
2.9.0

◆ getAssetPackageIdFromAssetPackageFilePath:

- (NSString *) getAssetPackageIdFromAssetPackageFilePath: (NSString *)  assetPackageFilePath

Gets asset package ID from asset package path.

Parameters
assetPackageFilePathAsset package file path
Returns
Returns a string representing the assets package ID.
Warning
By the character in the path, so do not change the file name!

◆ getAssetPackageListOfType:

- (NSArray *) getAssetPackageListOfType: (NvsAssetPackageType type

Gets a list of asset packages of certain type.

Parameters
typeAsset package type
Returns
Return an NSArray array object. It represents a list of asset packages of a certain type. Each NSString element in the list is an asset package ID.

◆ getAssetPackageStatus:type:

- (NvsAssetPackageStatus) getAssetPackageStatus: (NSString *)  assetPackageId
type: (NvsAssetPackageType type 

Get the state of asset package.

Parameters
assetPackageIdID of the asset package to be checked
typeAsset package type
Returns
Returns the current state value of asset package.

◆ getAssetPackageSupportedAspectRatio:type:

- (int) getAssetPackageSupportedAspectRatio: (NSString *)  assetPackageId
type: (NvsAssetPackageType type 

Gets the supported aspect ratio of the asset package.

Parameters
assetPackageIdID of the asset package to be checked.
typeType of the asset package to be checked.
Returns
Returns the supported aspect ratio of the asset package, which is the result of a bitwise OR operation of several aspect ratios (NvsAssetPackageAspectRatio_XXX).

◆ getAssetPackageVersion:type:

- (int) getAssetPackageVersion: (NSString *)  assetPackageId
type: (NvsAssetPackageType type 

Gets the version number of the installed asset package.

Parameters
assetPackageIdID of the asset package to be checked
typeType of the asset package to be checked
Returns
Returns the version number of the asset package. Returns 1 if asset package is not installed.

Need install this package before use this method.Please check this package status by getAssetPackageStatus()

◆ getAssetPackageVersionFromAssetPackageFilePath:

- (int) getAssetPackageVersionFromAssetPackageFilePath: (NSString *)  assetPackageFilePath

Gets the package version number from package file path.

Parameters
assetPackageFilePathAsset package file path
Returns
Returns the version of package. If the asset package does not have a version number, return 1.
Warning
By the character in the path, so do not change the file name!

◆ getTemplateCampoundCaptions:

- (NSArray <NvsTemplateCompoundCaptionDesc *>*) getTemplateCampoundCaptions: (NSString *)  uuidString

Gets the compound caption description list of the Template asset.

Parameters
uuidStringspecial effect uuid
Returns
Returns a ArrayList object, which is a compound caption description list.
Since
2.18.1

◆ getTemplateCaptions:

- (NSArray <NvsTemplateCaptionDesc *>*) getTemplateCaptions: (NSString *)  uuidString

Gets the caption description list of the Template asset.

Parameters
uuidStringspecial effect uuid
Returns
Returns a ArrayList object, which is a caption description list.
Since
2.18.1

◆ getTemplateCurrentAspectRatio:

- (int) getTemplateCurrentAspectRatio: (NSString *)  uuidString

Gets the aspect ratio which is template using.

Parameters
uuidStringspecial effect uuid
Returns
Returns aspect ratio which is template using
Since
2.18.1

◆ getTemplateFootages:

- (NSArray <NvsTemplateFootageDesc *>*) getTemplateFootages: (NSString *)  uuidString

Gets the footage description list of the Template asset.

Parameters
uuidStringspecial effect uuid
Returns
Returns a ArrayList object, which is a footage description list.
Since
1.18.0

◆ GetVideoFxAssetPackageDescription:

- (NSString *) GetVideoFxAssetPackageDescription: (NSString *)  uuidString

Gets the Fx description of an asset of type VideoFx.

Parameters
uuidStringFx asset uuid
Returns
Returns a String object,the Fx description of the Fx asset
Since
1.14.0

◆ installAssetPackage:license:type:sync:assetPackageId:

- (NvsAssetPackageManagerError) installAssetPackage: (NSString *)  assetPackageFilePath
license: (NSString *)  licenseFilePath
type: (NvsAssetPackageType type
sync: (BOOL)  synchronous
assetPackageId: (NSMutableString *)  assetPackageId 

Installs asset package.

Parameters
assetPackageFilePathAsset package file path
licenseFilePathLicense file path
typeAsset package type
synchronousWhether to install synchronously: A value of YES will cause the installation process to block the current thread until the installation succeeds or fails. NO means results in the installation process being asynchronously notified by the delegate (but also notified by the current thread).
Noticeif type is template, this param will be ignored and will install asynchronously
assetPackageIdoutput value. Output asset package ID
Returns
Returns error value of installation. "NvsAssetPackageManagerError_NoError" or "NvsAssetPackageManagerError_AlreadyInstalled" indicates that the installation succeeds (It can only be returned in synchronous installation), otherwise it fails.
See also
- upgradeAssetPackage:license:type:sync:assetPackageId:
- uninstallAssetPackage:type:

◆ isCustomAnimatedSticker:

- (BOOL) isCustomAnimatedSticker: (NSString *)  uuidString

Defines if it is a customized sticker.

Parameters
uuidStringSticker uuid
Returns
Returns BOOL value,which indicates whether it is customized sticker.
Since
1.11.0

◆ isParticleFx:

- (BOOL) isParticleFx: (NSString *)  uuidString

Defines if it is particle Fx.

Parameters
uuidStringFx Asset uuid
Returns
Returns BOOL value,which indicates whether it is particle Fx
Since
1.14.0

◆ isThemeContainMusic:

- (BOOL) isThemeContainMusic: (NSString *)  uuidString

Check whether a theme package contain music.

Parameters
uuidStringtheme package uuid
Returns
Returns BOOL value indicating whether it contain music
Since
2.6.0

◆ uninstallAssetPackage:type:

- (NvsAssetPackageManagerError) uninstallAssetPackage: (NSString *)  assetPackageId
type: (NvsAssetPackageType type 

Uninstalls asset package.

Parameters
assetPackageIdID of the asset package to be uninstalled
typeType of the asset package to be uninstalled
Returns
Returns error value of uninstallation. "NvsAssetPackageManagerError_NoError" indicates that the uninstallation is successful, otherwise it fails.
See also
- installAssetPackage:license:type:sync:assetPackageId:
- upgradeAssetPackage:license:type:sync:assetPackageId:

◆ upgradeAssetPackage:license:type:sync:assetPackageId:

- (NvsAssetPackageManagerError) upgradeAssetPackage: (NSString *)  assetPackageFilePath
license: (NSString *)  licenseFilePath
type: (NvsAssetPackageType type
sync: (BOOL)  synchronous
assetPackageId: (NSMutableString *)  assetPackageId 

Upgrades asset package.

Parameters
assetPackageFilePathFile path of the asset package to be upgraded
licenseFilePathLicense file path of the asset package to be upgraded
typeType of the asset package to be upgraded
synchronousWhether to upgrade synchronously. Value of YES will cause the upgrade process to block the current thread until the upgrade succeeds or fails. NO results in the upgrade process being asynchronously notified by the delegate (it can also be notified by the current thread).
Noticeif type is template, this param will be ignored and will install asynchronously
assetPackageIdOutput value, output the assets package ID
Returns
Returns error value of upgrading. "NvsAssetPackageManagerError_NoError" indicates that the upgrade succeeds (It can only be returned in synchronous installation), otherwise it fails.
See also
- installAssetPackage:license:type:sync:assetPackageId:
- uninstallAssetPackage:type:

Property Documentation

◆ delegate

- (id<NvsAssetPackageManagerDelegate>) delegate
readwritenonatomicweak

◆ generateTemplateDelegate

- (id<NvsAssetPackageManagerGenerateTemplateDelegate>) generateTemplateDelegate
readwritenonatomicweak

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