Loading...
Searching...
No Matches
loom_camera_backend.c
Go to the documentation of this file.
41static const char *reference_directory = USHER_LOOMCAM_REFERENCE_DIR; /**< Borrowed until worker init copies it. */
42static const char *network_model = USHER_LOOMCAM_MODEL; /**< Borrowed RPK configuration for native capture lifetime. */
43static struct imx500_pipe capture_owner = IMX500_PIPE_INITIALIZER; /**< LOOM's own neutral native worker, not detector state. */
102 * @return Zero for worker startup, otherwise -1; photograph capture remains a separate capability. */
125 .capabilities = mock ? CAMERA_CAP_IMAGE : CAMERA_CAP_IMAGE | CAMERA_CAP_FINISH_OWNED | CAMERA_CAP_PRIVATE_IMAGE,
void imx500_pipe_stop(struct imx500_pipe *pipe)
Close the channel, allow an exit grace period, then kill/reap if needed.
Definition imx500_pipe.c:132
int imx500_pipe_shoot(struct imx500_pipe *pipe, char *filename, size_t capacity, int number)
Request one saved photograph and qualify its acknowledgement/file.
Definition imx500_pipe.c:251
int imx500_pipe_start(struct imx500_pipe *pipe)
Replace any owned worker and require its exact READY response.
Definition imx500_pipe.c:149
READY/SHOT/OK process ownership without model-analysis semantics.
#define IMX500_PIPE_INITIALIZER
Safe empty lifecycle state: descriptor zero must never mean uninitialized.
Definition imx500_pipe.h:49
bool loom_cam_poll_result(struct camera_point_result *result)
Consume a result on the serial owner; session_id carries the photo number for this stream.
Definition loom_cam.c:685
#define USHER_LOOMCAM_COMMAND
Saved-photo child executable; not another camera-acquisition process.
Definition loom_cam.c:51
bool loom_cam_start(uint32_t session_id)
Select outbound reference collection and discard old-phase mailbox work.
Definition loom_cam.c:621
bool loom_cam_stop(uint32_t session_id)
Select return matching and discard old-phase mailbox work.
Definition loom_cam.c:652
void loom_cam_deinit(void)
Cancel pending work and join the worker before reusing adapter state.
Definition loom_cam.c:695
int loom_cam_set_settings(const char *settings)
Select executable settings before starting the saved-photo worker.
Definition loom_cam.c:560
bool loom_cam_enabled(void)
Report whether this optional stream is running and not stopping.
Definition loom_cam.c:608
void loom_cam_image_saved(const char *filename, const union dc_shot_union *shot)
Copy the newest completed AIcam photo request into bounded worker storage.
Definition loom_cam.c:669
int loom_cam_completion_fd(void)
Borrow the nonblocking completion descriptor; minus one when not initialized.
Definition loom_cam.c:613
int loom_cam_init(const char *references, const char *model)
Start one saved-photo worker; does not acquire another camera.
Definition loom_cam.c:568
Bounded asynchronous saved-photo adapter for LOOM_cam.
#define LOOM_IMAGE_PREFIX
LOOM photographs and outbound references use 'o', not AIcam's 'a'.
Definition loom_cam.h:38
static void loom_capture_deinit(void)
Stop only LOOM's capture child; the saved-photo stream drains separately.
Definition loom_camera_backend.c:96
struct camera_backend loom_camera_backend_get(bool mock)
Return LOOM's descriptor without opening a sensor or starting a thread.
Definition loom_camera_backend.c:111
static int loom_capture_shoot(char *filename, size_t capacity, int number)
Request pixels through the neutral supervisor without detection parsing.
Definition loom_camera_backend.c:90
static void loom_capture_configure(const struct camera_backend_host *host)
Pass the service cancellation flag to the native capture owner.
Definition loom_camera_backend.c:49
static int loom_capture_init(const char *source)
Select the native capture protocol only when this owner is acquired.
Definition loom_camera_backend.c:73
void loom_camera_backend_configure(const char *references, const char *model)
Configure the LOOM plugin before selecting or initializing its owner.
Definition loom_camera_backend.c:62
static int loom_stream_init(void)
Start optional saved-photo processing without acquiring another sensor.
Definition loom_camera_backend.c:103
static const char * inference_settings_path
Definition loom_camera_backend.c:44
int loom_camera_backend_set_settings(const char *settings)
Choose one LOOM assignment before acquiring either worker.
Definition loom_camera_backend.c:54
LOOM-owned capture specialization and stream lifecycle.
#define USHER_LOOMCAM_MODEL
Expected RPK path; the framework does not fabricate a trained model.
Definition loom_camera_backend.h:34
#define USHER_LOOMCAM_REFERENCE_DIR
Default outbound archive; use independent reference storage per sortie.
Definition loom_camera_backend.h:38
Definition camera_backend.h:79
const volatile sig_atomic_t * running
Borrowed shutdown flag; backend workers must stop when it clears.
Definition camera_backend.h:81
Function table describing one backend's owned camera operations.
Definition camera_backend.h:94
struct camera_backend::@243120217343377347337244154071360217343172026241 mock
Repeated correlated point updates from saved photos or non-image work.
Definition camera_backend.h:68
One caller-serialized native worker and its borrowed configuration.
Definition imx500_pipe.h:35