SRSDK  0.10.39
Loading...
Searching...
No Matches
leia_core Struct Reference

The main entry point into CNSDK C API. More...

#include <core.h>

Public Types

typedef void(* leia_core_set_user_ipd) (struct leia_core *, float ipd)
 Get the ipd.
 
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.
 

Public Member Functions

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 *)
 

Static Public Member Functions

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.
 

Related Symbols

(Note that these are not member symbols.)

LEIA_NODISCARD LEIASDK_API struct leia_coreleia_core_init_async (struct leia_core_init_configuration *)
 Start initialization of a leia_core instance.
 

Detailed Description

The main entry point into CNSDK C API.

This object is reference counted. See md_reference_counting_rules.

It's designed to be initialized once at the start of an app using leia_core_init_async(leia_core_init_configuration*).

int main() {
struct leia_core_init_configuration* config = leia_core_init_configuration_alloc(CNSDK_VERSION);
leia_core_init_configuration_free(config);
while (!leia_core_is_initialized(core));
auto interlacerConfig = leia_interlacer_init_configuration_alloc();
leia_interlacer* interlacer = leia_interlacer_opengl_initialize(core, interlacerConfig, glContext);
while (rendering) {
attachFrameBuffer();
leia_interlacer_opengl_set_source_views(interlacer, tilesTexture, 0, 0);
leia_interlacer_opengl_do_post_process(interlacer, framebufferWidth, framebufferHeight);
present();
}
leia_interlacer_release(core, interlacer);
}
LEIA_NODISCARD LEIASDK_API leia_bool leia_core_is_initialized(struct leia_core *)
Check if leia_core is initialized.
LEIA_NODISCARD LEIASDK_API struct leia_core * leia_core_init_async(struct leia_core_init_configuration *)
Start initialization of a leia_core instance.
LEIASDK_API void leia_core_release(struct leia_core *)
Decrement leia_core reference count.
LEIA_NODISCARD LEIASDK_API struct leia_interlacer_init_configuration * leia_interlacer_init_configuration_alloc()
leia_core's initial configuration.
Definition core.h:70
The main entry point into CNSDK C API.
Definition core.h:63
The main entity used for performing interlacing on Leia devices.
Definition interlacer.h:41
#define CNSDK_VERSION
Definition version.h:7

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