MeiCam SDK For Android  1.0.0
Classes | Public Member Functions | Static Public Member Functions | List of all members
com.meicam.effect.sdk.NvsEffectSdkContext Class Reference

Special effect context. More...

Classes

class  SdkVersion
 Meishe SDK version information. More...
 
class  VerifyLicenseResult
 

Public Member Functions

boolean isSdkAuthorised ()
 Check whether sdk is authorized. More...
 
SdkVersion getSdkVersion ()
 Gets Meishe SDK version information. More...
 
NvsAssetPackageManager getAssetPackageManager ()
 Gets the resource package manager. More...
 
List< String > getAllBuiltinVideoFxNames ()
 Gets all built-in video effects names. More...
 
NvsVideoEffect createVideoEffect (String fxIds, NvsRational aspectRatio)
 Creates video effect object. More...
 
NvsEffectRenderCore createEffectRenderCore ()
 Creates effect rendering object. More...
 

Static Public Member Functions

static void setDebugLevel (int debugLevel)
 
static void setSaveDebugMessagesToFile (boolean saveDebugMessagesToFile)
 
static Context getContext ()
 
static ClassLoader getClassLoader ()
 
static NvsEffectSdkContext init (Context ctx, String sdkLicenseFilePath, int flags)
 Initializes a singleton instance of the effect context. More...
 
static NvsEffectSdkContext init (Activity mainActivity, String sdkLicenseFilePath, int flags)
 Initializes a singleton instance of the effect context. More...
 
static NvsEffectSdkContext init (Activity mainActivity, String sdkLicenseFilePath)
 Initialize a singleton instance of the effect context. More...
 
static void close ()
 Destroies the effect context instance. Note: users can create and get it again after it is destroyed. More...
 
static NvsEffectSdkContext getInstance ()
 Gets a singleton instance of the effect context (users must initialize it before it can be used). More...
 
static int hasARModule ()
 Checks if the current SDK contains an AR module. More...
 
static boolean initHumanDetection (Context cxt, String modelFilePath, String licenseFilePath, int features)
 Initializes the human body detection mechanism. More...
 
static void closeHumanDetection ()
 Closes the human detection mechanism. More...
 
static boolean setupHumanDetectionData (int dataType, String dataFilePath)
 Initializes human detection related data packages. More...
 

Static Public Attributes

Human detection characteristics

static final int HUMAN_DETECTION_FEATURE_FACE_LANDMARK = 1
 Face landmark. More...
 
static final int HUMAN_DETECTION_FEATURE_FACE_ACTION = 2
 
Human detection package type

static final int HUMAN_DETECTION_DATA_TYPE_FAKE_FACE = 0
 

Detailed Description

Special effect context.

The effect context class is the entry to the entire SDK framework. During development, NvsEffectSdkContext provides the "sharedInstance" interface to create the unique streaming context instance. With this instance object, users can handle one or more effects. After use, the object instance of the effect context should be destroyed.Whening adding asset package (capture effect package, scene resource package, etc.), users should firstly install it and get the package Id of the effect after installation. The package ID serves as the handle of effect. However built-in effects can be directly used by their names.
Paths for resource, authorization, etc. in sdk interfaces must be full path.

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

Member Function Documentation

static void com.meicam.effect.sdk.NvsEffectSdkContext.close ( )
inlinestatic

Destroies the effect context instance. Note: users can create and get it again after it is destroyed.

See also
init
getInstance
static void com.meicam.effect.sdk.NvsEffectSdkContext.closeHumanDetection ( )
inlinestatic

Closes the human detection mechanism.

Since
2.5.0
NvsEffectRenderCore com.meicam.effect.sdk.NvsEffectSdkContext.createEffectRenderCore ( )
inline

Creates effect rendering object.

Returns
Returns the created effect rendering object.
NvsVideoEffect com.meicam.effect.sdk.NvsEffectSdkContext.createVideoEffect ( String  fxIds,
NvsRational  aspectRatio 
)
inline

Creates video effect object.

Parameters
fxIdsVideo effects id. For built-in video effects, it is the name of the effect. If it is a resource package effect, it is the resource package id.
aspectRatioThe aspect ratio of special effect.
Returns
Returns the created special effect object.
List<String> com.meicam.effect.sdk.NvsEffectSdkContext.getAllBuiltinVideoFxNames ( )
inline

Gets all built-in video effects names.

Returns
Returns a List containing all built-in video effects names.
See also
getAllBuiltinAudioFxNames
NvsAssetPackageManager com.meicam.effect.sdk.NvsEffectSdkContext.getAssetPackageManager ( )
inline

Gets the resource package manager.

Returns
Returns the obtained resource package manager object.
static ClassLoader com.meicam.effect.sdk.NvsEffectSdkContext.getClassLoader ( )
inlinestatic
static Context com.meicam.effect.sdk.NvsEffectSdkContext.getContext ( )
inlinestatic
static NvsEffectSdkContext com.meicam.effect.sdk.NvsEffectSdkContext.getInstance ( )
inlinestatic

Gets a singleton instance of the effect context (users must initialize it before it can be used).

Returns
Returns a singleton instance object for the effect context.
See also
init
close
SdkVersion com.meicam.effect.sdk.NvsEffectSdkContext.getSdkVersion ( )
inline

Gets Meishe SDK version information.

Returns
Returns Meishe SDK version information objects.
Since
2.3.0
static int com.meicam.effect.sdk.NvsEffectSdkContext.hasARModule ( )
inlinestatic

Checks if the current SDK contains an AR module.

Returns
The return value indicates whether the AR module is included.
Since
2.5.0
static NvsEffectSdkContext com.meicam.effect.sdk.NvsEffectSdkContext.init ( Context  ctx,
String  sdkLicenseFilePath,
int  flags 
)
inlinestatic

Initializes a singleton instance of the effect context.

Parameters
ctxAndroid Context object.
sdkLicenseFilePathSpecifies the path of the SDK license file.
flagsFlag field. If there is no special requirement, please fill in 0.
Returns
Returns a singleton instance object for the effect context.
Since
2.3.0
See also
getInstance
close
static NvsEffectSdkContext com.meicam.effect.sdk.NvsEffectSdkContext.init ( Activity  mainActivity,
String  sdkLicenseFilePath,
int  flags 
)
inlinestatic

Initializes a singleton instance of the effect context.

Parameters
mainActivityMain Android Activity object.
sdkLicenseFilePathSpecified the path of the SDK license file.
flagsFlag field. If there is no special requirement, please fill in 0.
Returns
Returns a singleton instance object for the effect context.
Since
2.3.0
See also
getInstance
close
static NvsEffectSdkContext com.meicam.effect.sdk.NvsEffectSdkContext.init ( Activity  mainActivity,
String  sdkLicenseFilePath 
)
inlinestatic

Initialize a singleton instance of the effect context.

Parameters
mainActivityMain Android Activity object
sdkLicenseFilePathThe specified path of the SDK license file
Returns
Returns a singleton instance object for the effect context.
See also
getInstance
close
static boolean com.meicam.effect.sdk.NvsEffectSdkContext.initHumanDetection ( Context  cxt,
String  modelFilePath,
String  licenseFilePath,
int  features 
)
inlinestatic

Initializes the human body detection mechanism.

Parameters
cxtThe context object from android.
modelFilePathThe path of model file.
licenseFilePathThe path of license file.
featuresHuman detection feature flag field. Please refer to Streaming Media Context Flags.
Returns
The return value indicates whether it is successful.
Since
2.5.0
boolean com.meicam.effect.sdk.NvsEffectSdkContext.isSdkAuthorised ( )
inline

Check whether sdk is authorized.

static void com.meicam.effect.sdk.NvsEffectSdkContext.setDebugLevel ( int  debugLevel)
inlinestatic
static void com.meicam.effect.sdk.NvsEffectSdkContext.setSaveDebugMessagesToFile ( boolean  saveDebugMessagesToFile)
inlinestatic
static boolean com.meicam.effect.sdk.NvsEffectSdkContext.setupHumanDetectionData ( int  dataType,
String  dataFilePath 
)
inlinestatic

Initializes human detection related data packages.

Parameters
dataTypeHuman detection package type. Please refer to Human Detection Packet Type.
dataFilePathThe path of the data file.
Returns
The return value indicates whether it is successful.
Since
2.6.0

Member Data Documentation

final int com.meicam.effect.sdk.NvsEffectSdkContext.HUMAN_DETECTION_DATA_TYPE_FAKE_FACE = 0
static

Fake face package type

final int com.meicam.effect.sdk.NvsEffectSdkContext.HUMAN_DETECTION_FEATURE_FACE_ACTION = 2
static

Face action

final int com.meicam.effect.sdk.NvsEffectSdkContext.HUMAN_DETECTION_FEATURE_FACE_LANDMARK = 1
static

Face landmark.


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