SRSDK  0.10.39
Loading...
Searching...
No Matches
Core

CNSDK's core. More...

Modules

 Device Config
 Device Config on Leia devices.
 
 Event
 Event system.
 
 Face Tracking
 Face tracking on Leia devices.
 
 Interlacer
 Interlacing on Leia devices.
 

Namespaces

namespace  leia
 

Data Structures

struct  leia_core
 The main entry point into CNSDK C API. More...
 
struct  leia_core_init_configuration
 leia_core's initial configuration. More...
 

Macros

#define LEIA_CORE_HINT_RESET_DISPLAY_CONFIG   "resetDisplayConfig"
 
#define leia_core_set_user_ipd_VERSION   (1)
 
#define leia_core_burn_display_config_VERSION   (4)
 
#define leia_core_burn_camera_extrinsics_VERSION   (1)
 
#define leia_core_set_tracking_camera_rotation_VERSION   (1)
 
#define leia_core_get_tracking_camera_rotation_VERSION   (1)
 
#define leia_core_get_non_predicted_eyes_VERSION   (1)
 
#define leia_core_get_lookaround_eyes_VERSION   (1)
 
#define leia_core_get_face_detector_version_VERSION   (1)
 
#define leia_core_set_face_tracking_profiling_VERSION   (1)
 
#define leia_core_get_face_tracking_profiling_VERSION   (1)
 
#define LEIA_WRAPPER_DISABLE_EXCEPTION
 

Typedefs

typedef void(* leia_core_set_user_ipd) (struct leia_core *, float ipd)
 Get the ipd.
 
typedef leia_bool(* leia_core_burn_display_config) (struct leia_core *, float slant, float pitch, float phc, float dOverN, float n, float actCoef, float thetaX, float thetaY, float thetaZ)
 
typedef leia_bool(* leia_core_burn_camera_extrinsics) (struct leia_core *, int cameraId, float thetaXFpc, float thetaYFpc, float thetaZFpc)
 
typedef void(* leia_core_set_tracking_camera_rotation) (struct leia_core *, float thetaX, float thetaY, float thetaZ)
 
typedef leia_bool(* leia_core_get_tracking_camera_rotation) (struct leia_core *, LEIA_FLOAT_SLICE(3) position)
 
typedef leia_bool(* leia_core_get_non_predicted_eyes) (struct leia_core *, LEIA_FLOAT_SLICE(3) leftEyePosition, LEIA_FLOAT_SLICE(3) rightEyePosition)
 Get the non-predicted eyes' position.
 
typedef leia_bool(* leia_core_get_lookaround_eyes) (struct leia_core *, LEIA_FLOAT_SLICE(3) leftPosition, LEIA_FLOAT_SLICE(3) rightPosition)
 Get the lookaround eyes' position.
 
typedef void(* leia_core_get_face_detector_version) (struct leia_core *, char *buffer, size_t size, size_t *actual_size)
 Get face detector version.
 
typedef void(* leia_core_set_face_tracking_profiling) (struct leia_core *, leia_bool enable)
 Toggle face tracking profiling.
 
typedef leia_bool(* leia_core_get_face_tracking_profiling) (struct leia_core *, struct leia_headtracking_frame_profiling *profiling, int32_t profilingSizeof)
 Get face tracking profiling data.
 

Enumerations

enum  leia_core_android_handle_type { LEIA_CORE_ANDROID_HANDLE_APP = 0 , LEIA_CORE_ANDROID_HANDLE_ACTIVITY = 1 , LEIA_CORE_ANDROID_HANDLE_CONTEXT = 2 , _LEIA_CORE_ANDROID_HANDLE_MAKE_ENUM_32BIT = 0x7FFFFFFF }
 

Functions

LEIASDK_API leia_bool leia_core_get_legal_orientations (struct leia_core_library *, struct leia_legal_orientations *)
 
LEIASDK_API void leia_core_limit_orientations (struct leia_core_library *, jobject activity, struct leia_legal_orientations const *)
 
LEIASDK_API leia_bool leia_core_get_natural_orientation (struct leia_core_library *, enum leia_orientation *)
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_get_viewing_distance (struct leia_core *, float ipdMM, float *viewingDistance)
 
LEIA_NODISCARD LEIASDK_API struct leia_coreleia_core_init_async (struct leia_core_init_configuration *)
 Start initialization of a leia_core instance.
 
LEIA_NODISCARD LEIASDK_API struct leia_core_init_configurationleia_core_init_configuration_alloc (struct leia_core_library *, const char *cnsdkVersion)
 
LEIASDK_API void leia_core_init_configuration_set_license_key (struct leia_core_init_configuration *, const char *licenseKey)
 Set CNSDK license key.
 
LEIASDK_API void leia_core_init_configuration_set_license_network_proxy (struct leia_core_init_configuration *, const char *networkProxy)
 Set network proxy to be used when contacting license servers.
 
LEIASDK_API void leia_core_init_configuration_set_enable_validation (struct leia_core_init_configuration *, leia_bool enable)
 
LEIASDK_API void leia_core_init_configuration_set_platform_android_handle (struct leia_core_init_configuration *, enum leia_core_android_handle_type, jobject)
 
LEIASDK_API void leia_core_init_configuration_set_platform_log_level (struct leia_core_init_configuration *, leia_log_level)
 
LEIASDK_API void leia_core_init_configuration_set_face_tracking_shared_camera_sink (struct leia_core_init_configuration *, NONOWNING(struct leia_shared_camera_sink *))
 
LEIASDK_API void leia_core_init_configuration_set_face_tracking_runtime (struct leia_core_init_configuration *, enum leia_face_tracking_runtime_type)
 
LEIASDK_API void leia_core_init_configuration_set_face_tracking_enable (struct leia_core_init_configuration *, leia_bool)
 
LEIASDK_API void leia_core_init_configuration_set_face_tracking_start (struct leia_core_init_configuration *, leia_bool)
 
LEIASDK_API void leia_core_init_configuration_set_face_tracking_check_permission (struct leia_core_init_configuration *, leia_bool)
 
LEIASDK_API void leia_core_init_configuration_set_face_tracking_permission_dialog_kill_process (struct leia_core_init_configuration *, leia_bool)
 
LEIASDK_API void leia_core_init_configuration_set_face_tracking_server_log_level (struct leia_core_init_configuration *, leia_log_level)
 
LEIASDK_API void leia_core_init_configuration_set_face_tracking_preferred_fps (struct leia_core_init_configuration *, int32_t preferredFps)
 
LEIASDK_API void leia_core_init_configuration_set_hint (struct leia_core_init_configuration *, const char *hint)
 
LEIASDK_API void leia_core_init_configuration_free (struct leia_core_init_configuration *)
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_initialized (struct leia_core *)
 Check if leia_core is initialized.
 
LEIASDK_API void leia_core_retain (struct leia_core *)
 Increment leia_core reference count.
 
LEIASDK_API void leia_core_release (struct leia_core *)
 Decrement leia_core reference count.
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_validation_enabled (struct leia_core *)
 
LEIA_NODISCARD LEIASDK_API struct leia_device_configleia_core_get_device_config (struct leia_core *)
 Get the device config for read/write access.
 
LEIASDK_API void leia_core_sync_device_config (struct leia_core *, struct leia_device_config *)
 Synchronize the internal device config with the provided one.
 
LEIASDK_API void leia_core_on_resume (struct leia_core *)
 Notify of app resume.
 
LEIASDK_API void leia_core_on_pause (struct leia_core *)
 Notify of app pause.
 
LEIASDK_API void leia_core_enable_3d (struct leia_core *, leia_bool enable)
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_3d_enabled (struct leia_core *)
 
LEIA_NODISCARD LEIASDK_API enum leia_orientation leia_core_get_orientation (struct leia_core *)
 
LEIASDK_API leia_bool leia_core_enable_face_tracking (struct leia_core *, leia_bool enable)
 Initialize/Release all face tracking related resources.
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_face_tracking_enabled (struct leia_core *)
 
LEIASDK_API void leia_core_start_face_tracking (struct leia_core *, leia_bool start)
 Resume/pause face tracking.
 
LEIASDK_API void leia_core_set_face_tracker_configuration (struct leia_core *, leia_bool leftEye, leia_bool rightEye)
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_face_tracking_started (struct leia_core *)
 
LEIASDK_API void leia_core_set_face_tracking_runtime (struct leia_core *, enum leia_face_tracking_runtime_type)
 Set face tracking runtime.
 
LEIA_NODISCARD LEIASDK_API enum leia_face_tracking_runtime_type leia_core_get_face_tracking_runtime (struct leia_core *)
 
LEIASDK_API void leia_core_set_face_tracking_shared_camera_sink (struct leia_core *, NONOWNING(struct leia_shared_camera_sink *) sink)
 Configure face tracking to use the shared camera sink.
 
LEIASDK_API void leia_core_set_default_face_position (struct leia_core *, LEIA_CONST_FLOAT_SLICE(3) position)
 Set the default face position.
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_get_primary_face (struct leia_core *, LEIA_FLOAT_SLICE(3) position)
 Get the primary face.
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_get_non_predicted_primary_face (struct leia_core *, LEIA_FLOAT_SLICE(3) position)
 Get the primary face.
 
LEIASDK_API void leia_core_set_face_tracking_frame_listener (struct leia_core *, OWNING(struct leia_headtracking_frame_listener *))
 
LEIASDK_API void leia_core_set_face_tracking_capture_lux (struct leia_core *, leia_bool enable)
 Toggle face tracking lux capture.
 
LEIASDK_API void leia_core_enable_no_face_mode (struct leia_core *, leia_bool enable)
 Toggle no-face mode.
 
LEIASDK_API void leia_core_set_no_face_mode_time_threshold (struct leia_core *, double timeThresholdSeconds)
 Set no-face mode time threshold.
 
LEIA_NODISCARD LEIASDK_API struct leia_asset_manager * leia_core_get_asset_manager (struct leia_core *)
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_is_face_tracking_runtime_supported (struct leia_core_library *, enum leia_face_tracking_runtime_type)
 Check if the current CNSDK build support particular leia_face_tracking_runtime_type.
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_license_required ()
 Check if the current CNSDK build requires valid license.
 
LEIA_NODISCARD LEIASDK_API leia_bool leia_is_device_supported (struct leia_core_library *)
 Check if the current device is officially supported.
 

Detailed Description

CNSDK's core.

Macro Definition Documentation

◆ LEIA_CORE_HINT_RESET_DISPLAY_CONFIG

#define LEIA_CORE_HINT_RESET_DISPLAY_CONFIG   "resetDisplayConfig"

◆ leia_core_set_user_ipd_VERSION

#define leia_core_set_user_ipd_VERSION   (1)

◆ leia_core_burn_display_config_VERSION

#define leia_core_burn_display_config_VERSION   (4)

◆ leia_core_burn_camera_extrinsics_VERSION

#define leia_core_burn_camera_extrinsics_VERSION   (1)

◆ leia_core_set_tracking_camera_rotation_VERSION

#define leia_core_set_tracking_camera_rotation_VERSION   (1)

◆ leia_core_get_tracking_camera_rotation_VERSION

#define leia_core_get_tracking_camera_rotation_VERSION   (1)

◆ leia_core_get_non_predicted_eyes_VERSION

#define leia_core_get_non_predicted_eyes_VERSION   (1)

◆ leia_core_get_lookaround_eyes_VERSION

#define leia_core_get_lookaround_eyes_VERSION   (1)

◆ leia_core_get_face_detector_version_VERSION

#define leia_core_get_face_detector_version_VERSION   (1)

◆ leia_core_set_face_tracking_profiling_VERSION

#define leia_core_set_face_tracking_profiling_VERSION   (1)

◆ leia_core_get_face_tracking_profiling_VERSION

#define leia_core_get_face_tracking_profiling_VERSION   (1)

◆ LEIA_WRAPPER_DISABLE_EXCEPTION

#define LEIA_WRAPPER_DISABLE_EXCEPTION

Define LEIA_WRAPPER_DISABLE_EXCEPTION to disable exceptions in the C++ wrappers. Use corresponding methods to check objects validity (e.g. IsValid).

Typedef Documentation

◆ leia_core_set_user_ipd

typedef void(* leia_core_set_user_ipd) (struct leia_core *, float ipd)

Get the ipd.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_core_burn_display_config

typedef leia_bool(* leia_core_burn_display_config) (struct leia_core *, float slant, float pitch, float phc, float dOverN, float n, float actCoef, float thetaX, float thetaY, float thetaZ)

◆ leia_core_burn_camera_extrinsics

typedef leia_bool(* leia_core_burn_camera_extrinsics) (struct leia_core *, int cameraId, float thetaXFpc, float thetaYFpc, float thetaZFpc)

◆ leia_core_set_tracking_camera_rotation

typedef void(* leia_core_set_tracking_camera_rotation) (struct leia_core *, float thetaX, float thetaY, float thetaZ)

◆ leia_core_get_tracking_camera_rotation

typedef leia_bool(* leia_core_get_tracking_camera_rotation) (struct leia_core *, LEIA_FLOAT_SLICE(3) position)

◆ leia_core_get_non_predicted_eyes

typedef leia_bool(* leia_core_get_non_predicted_eyes) (struct leia_core *, LEIA_FLOAT_SLICE(3) leftEyePosition, LEIA_FLOAT_SLICE(3) rightEyePosition)

Get the non-predicted eyes' position.

Parameters
positiona non-predicted eyes' position
Returns
whether there is a face or none

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_core_get_lookaround_eyes

typedef leia_bool(* leia_core_get_lookaround_eyes) (struct leia_core *, LEIA_FLOAT_SLICE(3) leftPosition, LEIA_FLOAT_SLICE(3) rightPosition)

Get the lookaround eyes' position.

Parameters
positiona lookaround eye's position
Returns
whether there is a face or none

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_core_get_face_detector_version

typedef void(* leia_core_get_face_detector_version) (struct leia_core *, char *buffer, size_t size, size_t *actual_size)

Get face detector version.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_core_set_face_tracking_profiling

typedef void(* leia_core_set_face_tracking_profiling) (struct leia_core *, leia_bool enable)

Toggle face tracking profiling.

It's an experimental API, see leia_get_experimental_api for more info.

◆ leia_core_get_face_tracking_profiling

typedef leia_bool(* leia_core_get_face_tracking_profiling) (struct leia_core *, struct leia_headtracking_frame_profiling *profiling, int32_t profilingSizeof)

Get face tracking profiling data.

Face tracking profiling must be explicitly enabled.

See also
Set_face_tracking_profiling.

It's an experimental API, see leia_get_experimental_api for more info.

Enumeration Type Documentation

◆ leia_core_android_handle_type

Enumerator
LEIA_CORE_ANDROID_HANDLE_APP 

android.app.Application.

LEIA_CORE_ANDROID_HANDLE_ACTIVITY 

android.app.Activity.

LEIA_CORE_ANDROID_HANDLE_CONTEXT 

android.content.Context.

_LEIA_CORE_ANDROID_HANDLE_MAKE_ENUM_32BIT 

Function Documentation

◆ leia_core_get_legal_orientations()

LEIASDK_API leia_bool leia_core_get_legal_orientations ( struct leia_core_library ,
struct leia_legal_orientations  
)

◆ leia_core_limit_orientations()

LEIASDK_API void leia_core_limit_orientations ( struct leia_core_library ,
jobject  activity,
struct leia_legal_orientations const *   
)

◆ leia_core_get_natural_orientation()

LEIASDK_API leia_bool leia_core_get_natural_orientation ( struct leia_core_library ,
enum leia_orientation  
)

◆ leia_core_get_viewing_distance()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_get_viewing_distance ( struct leia_core ,
float  ipdMM,
float *  viewingDistance 
)

◆ leia_core_init_async()

LEIA_NODISCARD LEIASDK_API struct leia_core * leia_core_init_async ( struct leia_core_init_configuration )
related

Start initialization of a leia_core instance.

On some platforms (e.g. Android), initialization process is asynchronous. A part of CNSDK functionality requires leia_core to be fully initialized before use. There are two ways to know whether leia_core is fully initialized:

  • poll leia_core_is_initialized(leia_core)
  • get notified via the event center (See LEIA_CORE_EVENT_DID_INITIALIZE, leia_event_center_add_listener)

Should be called once.

◆ leia_core_init_configuration_alloc()

LEIA_NODISCARD LEIASDK_API struct leia_core_init_configuration * leia_core_init_configuration_alloc ( struct leia_core_library ,
const char *  cnsdkVersion 
)
related
Parameters
cnsdkVersionCurrent CNSDK version - CNSDK_VERSION

◆ leia_core_init_configuration_set_license_key()

LEIASDK_API void leia_core_init_configuration_set_license_key ( struct leia_core_init_configuration ,
const char *  licenseKey 
)

Set CNSDK license key.

See md_licensing.

See also
leia_core_is_license_required

◆ leia_core_init_configuration_set_license_network_proxy()

LEIASDK_API void leia_core_init_configuration_set_license_network_proxy ( struct leia_core_init_configuration ,
const char *  networkProxy 
)

Set network proxy to be used when contacting license servers.

The proxy format should be: [protocol://][username:password@]machine[:port]

Following are some examples of the valid proxy strings:

Note
Proxy settings of the computer are automatically detected. So, in most of the cases you don't need to care whether your user is behind a proxy server or not.

See md_licensing.

◆ leia_core_init_configuration_set_enable_validation()

LEIASDK_API void leia_core_init_configuration_set_enable_validation ( struct leia_core_init_configuration ,
leia_bool  enable 
)

Whether to enable runtime validation.

◆ leia_core_init_configuration_set_platform_android_handle()

LEIASDK_API void leia_core_init_configuration_set_platform_android_handle ( struct leia_core_init_configuration ,
enum  leia_core_android_handle_type,
jobject   
)

Set one of the android handles. In this priority order: App > Activity > Context. Unity and Unreal applications can leave this unset.

◆ leia_core_init_configuration_set_platform_log_level()

LEIASDK_API void leia_core_init_configuration_set_platform_log_level ( struct leia_core_init_configuration ,
leia_log_level   
)

Use any kLeiaLogLevel except the default one to override the logging level.

◆ leia_core_init_configuration_set_face_tracking_shared_camera_sink()

LEIASDK_API void leia_core_init_configuration_set_face_tracking_shared_camera_sink ( struct leia_core_init_configuration ,
NONOWNING(struct leia_shared_camera_sink *)   
)

Set face tracking shared camera sink.

◆ leia_core_init_configuration_set_face_tracking_runtime()

LEIASDK_API void leia_core_init_configuration_set_face_tracking_runtime ( struct leia_core_init_configuration ,
enum  leia_face_tracking_runtime_type 
)

Set face tracking runtime to use.

◆ leia_core_init_configuration_set_face_tracking_enable()

LEIASDK_API void leia_core_init_configuration_set_face_tracking_enable ( struct leia_core_init_configuration ,
leia_bool   
)

Enable face tracking ASAP.

◆ leia_core_init_configuration_set_face_tracking_start()

LEIASDK_API void leia_core_init_configuration_set_face_tracking_start ( struct leia_core_init_configuration ,
leia_bool   
)

Start face tracking ASAP.

◆ leia_core_init_configuration_set_face_tracking_check_permission()

LEIASDK_API void leia_core_init_configuration_set_face_tracking_check_permission ( struct leia_core_init_configuration ,
leia_bool   
)

Do the system-level face tracking permission check.

◆ leia_core_init_configuration_set_face_tracking_permission_dialog_kill_process()

LEIASDK_API void leia_core_init_configuration_set_face_tracking_permission_dialog_kill_process ( struct leia_core_init_configuration ,
leia_bool   
)

Whether CNSDK should kill the process when the user denies face tracking permission.

◆ leia_core_init_configuration_set_face_tracking_server_log_level()

LEIASDK_API void leia_core_init_configuration_set_face_tracking_server_log_level ( struct leia_core_init_configuration ,
leia_log_level   
)

Face tracking service logging level.

◆ leia_core_init_configuration_set_face_tracking_preferred_fps()

LEIASDK_API void leia_core_init_configuration_set_face_tracking_preferred_fps ( struct leia_core_init_configuration ,
int32_t  preferredFps 
)

◆ leia_core_init_configuration_set_hint()

LEIASDK_API void leia_core_init_configuration_set_hint ( struct leia_core_init_configuration ,
const char *  hint 
)

◆ leia_core_init_configuration_free()

LEIASDK_API void leia_core_init_configuration_free ( struct leia_core_init_configuration )

◆ leia_core_is_initialized()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_initialized ( struct leia_core )

◆ leia_core_retain()

LEIASDK_API void leia_core_retain ( struct leia_core )

Increment leia_core reference count.

◆ leia_core_release()

LEIASDK_API void leia_core_release ( struct leia_core )

Decrement leia_core reference count.

Frees resources allocated after leia_core_init_async when its reference count reaches 0.

◆ leia_core_is_validation_enabled()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_validation_enabled ( struct leia_core )

◆ leia_core_get_device_config()

LEIA_NODISCARD LEIASDK_API struct leia_device_config * leia_core_get_device_config ( struct leia_core )

Get the device config for read/write access.

Requires leia_core to be fully initialized (leia_core_is_initialized(leia_core) == true). Should be released via leia_device_config_release.

◆ leia_core_sync_device_config()

LEIASDK_API void leia_core_sync_device_config ( struct leia_core ,
struct leia_device_config  
)

Synchronize the internal device config with the provided one.

◆ leia_core_on_resume()

LEIASDK_API void leia_core_on_resume ( struct leia_core )

Notify of app resume.

◆ leia_core_on_pause()

LEIASDK_API void leia_core_on_pause ( struct leia_core )

Notify of app pause.

◆ leia_core_enable_3d()

LEIASDK_API void leia_core_enable_3d ( struct leia_core ,
leia_bool  enable 
)

◆ leia_core_is_3d_enabled()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_3d_enabled ( struct leia_core )

◆ leia_core_get_orientation()

LEIA_NODISCARD LEIASDK_API enum leia_orientation leia_core_get_orientation ( struct leia_core )

◆ leia_core_enable_face_tracking()

LEIASDK_API leia_bool leia_core_enable_face_tracking ( struct leia_core ,
leia_bool  enable 
)

Initialize/Release all face tracking related resources.

Do not call on the main thread to avoid stalls.

If face tracking should be temporarily paused, consider using leia_core_start_face_tracking(leia_core, leia_bool) instead.

◆ leia_core_is_face_tracking_enabled()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_face_tracking_enabled ( struct leia_core )

◆ leia_core_start_face_tracking()

LEIASDK_API void leia_core_start_face_tracking ( struct leia_core ,
leia_bool  start 
)

Resume/pause face tracking.

It's a lightweight call - can be called on the main thread.

◆ leia_core_set_face_tracker_configuration()

LEIASDK_API void leia_core_set_face_tracker_configuration ( struct leia_core ,
leia_bool  leftEye,
leia_bool  rightEye 
)

◆ leia_core_is_face_tracking_started()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_face_tracking_started ( struct leia_core )

◆ leia_core_set_face_tracking_runtime()

LEIASDK_API void leia_core_set_face_tracking_runtime ( struct leia_core ,
enum  leia_face_tracking_runtime_type 
)

Set face tracking runtime.

No-op if runtime is not supported.

See also
leia_core_is_face_tracking_runtimeSupported.

◆ leia_core_get_face_tracking_runtime()

LEIA_NODISCARD LEIASDK_API enum leia_face_tracking_runtime_type leia_core_get_face_tracking_runtime ( struct leia_core )

◆ leia_core_set_face_tracking_shared_camera_sink()

LEIASDK_API void leia_core_set_face_tracking_shared_camera_sink ( struct leia_core ,
NONOWNING(struct leia_shared_camera_sink *)  sink 
)

Configure face tracking to use the shared camera sink.

Face tracking must be re-enabled to apply changes. Shared camera sink is supported only by in-app face tracking runtime. leia_core takes ownership over the sink.

◆ leia_core_set_default_face_position()

LEIASDK_API void leia_core_set_default_face_position ( struct leia_core ,
LEIA_CONST_FLOAT_SLICE(3)  position 
)

Set the default face position.

By default, leia_core uses the last known face position when tracking is lost. This function allows to override this behavior to use the specified position instead.

Position must be in the display space coordinates in millimeters - when looking onto the display in its natural orientation (see display config):

  • origin in the center of the display
  • X points right
  • Y points up
  • Z points to the viewer

An empty position might be given, in this case leia_core reverts to the default behavior.

◆ leia_core_get_primary_face()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_get_primary_face ( struct leia_core ,
LEIA_FLOAT_SLICE(3)  position 
)

Get the primary face.

Parameters
positiona predicted face position
Returns
whether there is a face or none

◆ leia_core_get_non_predicted_primary_face()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_get_non_predicted_primary_face ( struct leia_core ,
LEIA_FLOAT_SLICE(3)  position 
)

Get the primary face.

Parameters
positiona non-predicted face position
Returns
whether there is a face or none

◆ leia_core_set_face_tracking_frame_listener()

LEIASDK_API void leia_core_set_face_tracking_frame_listener ( struct leia_core ,
OWNING(struct leia_headtracking_frame_listener *)   
)

◆ leia_core_set_face_tracking_capture_lux()

LEIASDK_API void leia_core_set_face_tracking_capture_lux ( struct leia_core ,
leia_bool  enable 
)

Toggle face tracking lux capture.

See also
leia_headtracking_frame_get_lux

◆ leia_core_enable_no_face_mode()

LEIASDK_API void leia_core_enable_no_face_mode ( struct leia_core ,
leia_bool  enable 
)

Toggle no-face mode.

No-face mode automatically disables 3D and forces all interlacers into the single view mode when there is no face available for the "no-face mode time threshold" seconds.

See also
leia_core_set_no_face_mode_time_threshold

◆ leia_core_set_no_face_mode_time_threshold()

LEIASDK_API void leia_core_set_no_face_mode_time_threshold ( struct leia_core ,
double  timeThresholdSeconds 
)

Set no-face mode time threshold.

See also
leia_core_enable_no_face_mode

◆ leia_core_get_asset_manager()

LEIA_NODISCARD LEIASDK_API struct leia_asset_manager * leia_core_get_asset_manager ( struct leia_core )

◆ leia_is_face_tracking_runtime_supported()

LEIA_NODISCARD LEIASDK_API leia_bool leia_is_face_tracking_runtime_supported ( struct leia_core_library ,
enum  leia_face_tracking_runtime_type 
)
static

Check if the current CNSDK build support particular leia_face_tracking_runtime_type.

◆ leia_core_is_license_required()

LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_license_required ( )
static

Check if the current CNSDK build requires valid license.

◆ leia_is_device_supported()

LEIA_NODISCARD LEIASDK_API leia_bool leia_is_device_supported ( struct leia_core_library )
static

Check if the current device is officially supported.