1#ifndef CNSDK_LEIA_CORE_CORE_H
2#define CNSDK_LEIA_CORE_CORE_H
191#define LEIA_CORE_HINT_RESET_DISPLAY_CONFIG "resetDisplayConfig"
336typedef void (*leia_core_set_user_ipd)(
struct leia_core*,
float ipd);
337#define leia_core_set_user_ipd_VERSION (1)
340 struct leia_core*,
float slant,
float pitch,
float phc,
float dOverN,
float n,
float actCoef,
float thetaX,
float thetaY,
float thetaZ);
341#define leia_core_burn_display_config_VERSION (4)
344#define leia_core_burn_camera_extrinsics_VERSION (1)
347#define leia_core_set_tracking_camera_rotation_VERSION (1)
350#define leia_core_get_tracking_camera_rotation_VERSION (1)
437#define leia_core_get_non_predicted_eyes_VERSION (1)
449#define leia_core_get_lookaround_eyes_VERSION (1)
472#define leia_core_get_face_detector_version_VERSION (1)
480#define leia_core_set_face_tracking_profiling_VERSION (1)
493#define leia_core_get_face_tracking_profiling_VERSION (1)
568#if !defined(_LEIA_DUMP_ABI_VERIFICATION) && defined(LEIA_X64)
573# define _LEIA_LINE_STRING LEIA_STRINGIZE(__LINE__)
574# define LEIA_ABI_ASSERT(condition) static_assert(condition, "ABI assert failed on line " _LEIA_LINE_STRING ": " #condition)
575# include <type_traits>
576# define LEIA_ABI_TRIVIALLY_COPYABLE_ASSERT(T) static_assert(std::is_trivially_copyable<T>::value, #T " must be trivially copyable")
578# define LEIA_ABI_ASSERT(condition) typedef char static_abi_assertion_failed_at_line##__LINE__[(condition) ? 1 : -1]
579# define LEIA_ABI_TRIVIALLY_COPYABLE_ASSERT(T)
581#define LEIA_ABI_SIZEOF_ASSERT(T, size) LEIA_ABI_ASSERT(sizeof(T) == size)
582#define LEIA_ABI_OFFSETOF_ASSERT(T, F, offset) LEIA_ABI_ASSERT(offsetof(T, F) == offset)
584#undef LEIA_ABI_ASSERT
585#undef _LEIA_LINE_STRING
BEGIN_CAPI_DECL typedef int32_t leia_bool
Definition types.h:10
leia_orientation
Definition types.h:108
#define LEIASDK_API
Definition api.h:9
leia_face_tracking_runtime_type
Definition types.h:82
#define LEIA_NODISCARD
Definition defines.h:86
#define OWNING(ptr)
Definition defines.h:105
#define END_CAPI_DECL
Definition defines.h:74
#define NONOWNING(ptr)
Definition defines.h:110
#define BEGIN_CAPI_DECL
Definition defines.h:73
leia_bool(* leia_core_get_tracking_camera_rotation)(struct leia_core *, LEIA_FLOAT_SLICE(3) position)
Definition core.h:349
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.
Definition core.h:448
LEIA_NODISCARD LEIASDK_API enum leia_orientation leia_core_get_orientation(struct leia_core *)
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_enable_no_face_mode(struct leia_core *, leia_bool enable)
Toggle no-face mode.
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_enable(struct leia_core_init_configuration *, leia_bool)
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_init_configuration_set_face_tracking_preferred_fps(struct leia_core_init_configuration *, int32_t preferredFps)
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_face_tracking_started(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.
void(* leia_core_set_tracking_camera_rotation)(struct leia_core *, float thetaX, float thetaY, float thetaZ)
Definition core.h:346
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.
Definition core.h:436
LEIASDK_API void leia_core_set_face_tracking_frame_listener(struct leia_core *, OWNING(struct leia_headtracking_frame_listener *))
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_initialized(struct leia_core *)
Check if leia_core is initialized.
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_core_is_3d_enabled(struct leia_core *)
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_get_viewing_distance(struct leia_core *, float ipdMM, float *viewingDistance)
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_get_primary_face(struct leia_core *, LEIA_FLOAT_SLICE(3) position)
Get the primary face.
LEIASDK_API void leia_core_init_configuration_set_enable_validation(struct leia_core_init_configuration *, leia_bool enable)
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_validation_enabled(struct leia_core *)
LEIA_NODISCARD LEIASDK_API struct leia_device_config * leia_core_get_device_config(struct leia_core *)
Get the device config for read/write access.
LEIA_NODISCARD LEIASDK_API leia_bool leia_is_device_supported(struct leia_core_library *)
Check if the current device is officially supported.
LEIASDK_API void leia_core_set_face_tracking_runtime(struct leia_core *, enum leia_face_tracking_runtime_type)
Set face tracking runtime.
LEIASDK_API void leia_core_set_face_tracker_configuration(struct leia_core *, leia_bool leftEye, leia_bool rightEye)
LEIA_NODISCARD LEIASDK_API struct leia_asset_manager * leia_core_get_asset_manager(struct leia_core *)
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.
void(* leia_core_set_face_tracking_profiling)(struct leia_core *, leia_bool enable)
Toggle face tracking profiling.
Definition core.h:479
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_default_face_position(struct leia_core *, LEIA_CONST_FLOAT_SLICE(3) position)
Set the default face position.
LEIASDK_API void leia_core_init_configuration_free(struct leia_core_init_configuration *)
LEIASDK_API void leia_core_retain(struct leia_core *)
Increment leia_core reference count.
LEIASDK_API void leia_core_set_no_face_mode_time_threshold(struct leia_core *, double timeThresholdSeconds)
Set no-face mode time threshold.
LEIASDK_API void leia_core_init_configuration_set_face_tracking_permission_dialog_kill_process(struct leia_core_init_configuration *, leia_bool)
LEIASDK_API leia_bool leia_core_get_natural_orientation(struct leia_core_library *, enum leia_orientation *)
LEIASDK_API void leia_core_on_pause(struct leia_core *)
Notify of app pause.
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_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_limit_orientations(struct leia_core_library *, jobject activity, struct leia_legal_orientations const *)
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_init_configuration_set_face_tracking_start(struct leia_core_init_configuration *, leia_bool)
LEIASDK_API void leia_core_enable_3d(struct leia_core *, leia_bool enable)
void(* leia_core_get_face_detector_version)(struct leia_core *, char *buffer, size_t size, size_t *actual_size)
Get face detector version.
Definition core.h:471
LEIASDK_API void leia_core_init_configuration_set_hint(struct leia_core_init_configuration *, const char *hint)
LEIA_NODISCARD LEIASDK_API struct leia_core * leia_core_init_async(struct leia_core_init_configuration *)
Start initialization of a leia_core instance.
LEIA_NODISCARD LEIASDK_API enum leia_face_tracking_runtime_type leia_core_get_face_tracking_runtime(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_core_android_handle_type
Definition core.h:133
LEIASDK_API void leia_core_start_face_tracking(struct leia_core *, leia_bool start)
Resume/pause face tracking.
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.
Definition core.h:492
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)
Definition core.h:339
leia_bool(* leia_core_burn_camera_extrinsics)(struct leia_core *, int cameraId, float thetaXFpc, float thetaYFpc, float thetaZFpc)
Definition core.h:343
LEIASDK_API void leia_core_init_configuration_set_platform_log_level(struct leia_core_init_configuration *, leia_log_level)
LEIASDK_API void leia_core_release(struct leia_core *)
Decrement leia_core reference count.
LEIASDK_API void leia_core_init_configuration_set_face_tracking_runtime(struct leia_core_init_configuration *, enum leia_face_tracking_runtime_type)
LEIA_NODISCARD LEIASDK_API struct leia_core_init_configuration * leia_core_init_configuration_alloc(struct leia_core_library *, const char *cnsdkVersion)
LEIASDK_API leia_bool leia_core_get_legal_orientations(struct leia_core_library *, struct leia_legal_orientations *)
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_face_tracking_enabled(struct leia_core *)
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_on_resume(struct leia_core *)
Notify of app resume.
LEIASDK_API void leia_core_init_configuration_set_platform_android_handle(struct leia_core_init_configuration *, enum leia_core_android_handle_type, jobject)
@ LEIA_CORE_ANDROID_HANDLE_ACTIVITY
android.app.Activity.
Definition core.h:135
@ _LEIA_CORE_ANDROID_HANDLE_MAKE_ENUM_32BIT
Definition core.h:138
@ LEIA_CORE_ANDROID_HANDLE_APP
android.app.Application.
Definition core.h:134
@ LEIA_CORE_ANDROID_HANDLE_CONTEXT
android.content.Context.
Definition core.h:136
void * jobject
Definition jniTypes.h:15
int32_t leia_log_level
Definition log.h:22
#define LEIA_FLOAT_SLICE(size)
Definition slice.h:27
#define LEIA_CONST_FLOAT_SLICE(size)
Definition slice.h:28
leia_core's initial configuration.
Definition core.h:70
Core library.
Definition library.h:17
The main entry point into CNSDK C API.
Definition core.h:63
Device Config.
Definition deviceConfig.h:25
Face tracking frame listener.
Definition faceTracking.h:26
Definition sharedCameraSink.h:10