Loading...
Searching...
No Matches
camera_backend_registry.c
Go to the documentation of this file.
66 .camera_id = USHER_CAMERA_AICAM, .prefix = 'a', .capabilities = CAMERA_CAP_IMAGE | CAMERA_CAP_PRIVATE_IMAGE,
72 .shoot = spotter_cam_pipe_shoot, .deinit = spotter_cam_pipe_deinit, .soda_application = USHER_SODA,
76 .capabilities = CAMERA_CAP_IMAGE | CAMERA_CAP_DETECTION | CAMERA_CAP_FINISH_OWNED | CAMERA_CAP_PRIVATE_IMAGE, .soda_option = "--aicam",
77 .bind_frame = spotter_cam_pipe_bind_frame, .detection_summary = spotter_cam_pipe_last_detection_summary,
78 .save_detection_copy = spotter_cam_pipe_save_detection_copy, .photo_directory = USHER_SPOTTERCAM_PHOTO_DIR
83 .deinit = lwir_cam_pipe_deinit, .soda_application = USHER_SODA, .camera_id = USHER_CAMERA_LWIRCAM,
97 if (type <= CAMERA_BACKEND_UNSELECTED || type >= CAMERA_BACKEND_COUNT) return (struct camera_backend) {0};
103enum camera_backend_type camera_backend_registry_route(int camera_id, enum camera_backend_type preferred,
106 if (camera_id < USHER_CAMERA_ALL || camera_id > CAMERA_BACKEND_MAX_ID) return CAMERA_BACKEND_UNSELECTED;
109 return local_only && (selected.capabilities & CAMERA_CAP_IMAGE) ? CAMERA_BACKEND_LOCAL : preferred;
110 for (enum camera_backend_type type = CAMERA_BACKEND_CHDK; type < CAMERA_BACKEND_COUNT; ++type) {
118struct camera_backend camera_backend_registry_identity(int camera_id, enum camera_backend_type preferred,
121 return camera_backend_registry_get(camera_backend_registry_route(camera_id, preferred, false), mock);
int ai_cam_pipe_init(const char *unused)
Validate storage and start the selected camera owner.
Definition ai_cam_pipe.c:398
int ai_cam_pipe_shoot(char *filename, size_t filename_size, int image_number)
Capture one ordinary JPEG into private staging for metadata completion.
Definition ai_cam_pipe.c:430
void ai_cam_pipe_configure(const struct camera_backend_host *host)
Pass the shutdown flag to native worker supervision.
Definition ai_cam_pipe.c:393
void ai_cam_pipe_deinit(void)
Stop the native and system-camera subprocesses.
Definition ai_cam_pipe.c:470
bool ai_cam_pipe_native(void)
Report whether the selected AIcam mode uses native photo-only capture.
Definition ai_cam_pipe.c:388
Parent-side contract for stock and native Raspberry Pi camera capture.
struct camera_backend camera_backend_registry_identity(int camera_id, enum camera_backend_type preferred, bool mock)
Resolve naming/metadata identity from the profile used for acquisition.
Definition camera_backend_registry.c:118
struct camera_backend camera_backend_registry_get(enum camera_backend_type type, bool mock)
Return a descriptor without selecting, configuring or opening hardware.
Definition camera_backend_registry.c:49
enum camera_backend_type camera_backend_registry_route(int camera_id, enum camera_backend_type preferred, bool local_only)
Resolve a physical ID, preferring its configured logical profile.
Definition camera_backend_registry.c:103
Backend definitions and physical-camera routing.
struct camera_backend chdk_camera_backend_get(void)
Definition chdk_camera_backend.c:96
CHDK-owned download and photo publication.
struct camera_backend dipla_camera_backend_get(void)
Describe camera slot five without starting work.
Definition dipla_camera_backend.c:285
Optional non-image camera adapter for the native Diplacam worker.
struct camera_backend ear_camera_backend_get(void)
Return the EAR backend descriptor by value; its session hook table has static lifetime.
Definition ear_camera_backend.c:344
EAR-specific startup configuration behind USHER's generic backend interface.
int local_pipe_init(const char *mock_image)
Initialize a deterministic mock image source for local camera simulation.
Definition local_pipe.c:64
Local mock-camera backend API for simulator and desk testing.
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
LOOM-owned capture specialization and stream lifecycle.
int lwir_cam_pipe_shoot(char *filename, size_t filename_size, int image_number)
Request one thermal JPEG from an initialized capture server.
Definition lwir_cam_pipe.c:653
int lwir_cam_pipe_init_cancelable(const char *unused, const volatile sig_atomic_t *keep_running)
Start the server but abort promptly when USHER begins shutdown.
Definition lwir_cam_pipe.c:525
double lwir_cam_pipe_capture_delay(void)
Return the delay of the last successful capture request in seconds.
Definition lwir_cam_pipe.c:242
struct capture_timing lwir_cam_pipe_capture_timing(void)
Return detailed callback or polling timing evidence for the last capture.
Definition lwir_cam_pipe.c:202
void lwir_cam_pipe_deinit(void)
Stop, reap, and forget the persistent LWIR capture server.
Definition lwir_cam_pipe.c:707
int lwir_cam_pipe_init(const char *unused)
Start and qualify the persistent LWIR capture server.
Definition lwir_cam_pipe.c:520
void lwir_cam_pipe_configure(const struct camera_backend_host *host)
Bind the owner's long-lived shutdown flag before starting workers.
Definition lwir_cam_pipe.c:90
int lwir_cam_pipe_geolocate(char *filename)
Add thermal hotspot/geolocation metadata through the running server.
Definition lwir_cam_pipe.c:623
Parent-side protocol for USHER's persistent Tiny1-C LWIR capture server.
Positive opt-ins shared by the worker and its USHER adapter.
#define LWIR_ENABLE_MOCK
1 builds the development replay/synthetic-temperature adapter (lwir_mock).
Definition lwir_features.h:32
#define LWIR_ENABLE_ANALYSIS
1 builds the optional ONNX analysis of saved photos (lwir_inference).
Definition lwir_features.h:28
void spotter_cam_pipe_deinit(void)
Stop the native camera process and clear detector-specific configuration.
Definition spotter_cam_pipe.c:532
void spotter_cam_pipe_last_detection_summary(char *buffer, size_t buffer_size)
Format the most recent shot's detection result for EXIF writing.
Definition spotter_cam_pipe.c:374
void spotter_cam_pipe_save_detection_copy(const char *filename)
Copy filename into a "detections" subdirectory of the photo directory if the last spotter_cam_pipe_sh...
Definition spotter_cam_pipe.c:459
void spotter_cam_pipe_configure(const struct camera_backend_host *host)
Borrow USHER's shutdown flag for both serialized native worker owners.
Definition spotter_cam_pipe.c:110
int spotter_cam_pipe_shoot(char *filename, size_t filename_size, int image_number)
Request one JPEG and, when enabled, parse its matching detection sidecar.
Definition spotter_cam_pipe.c:510
bool spotter_cam_pipe_bind_frame(uint64_t sequence, uint64_t sensor_timestamp_ns)
Reject a detection result whose identity differs from the validated saved frame.
Definition spotter_cam_pipe.c:351
int spotter_cam_pipe_init(const char *unused)
Start and qualify native persistent capture with the selected analysis policy.
Definition spotter_cam_pipe.c:496
Native USHER adapter for on-sensor detection or photo-only capture.
struct camera_backend spotter_camera_backend_get(void)
Build the Spottercam backend descriptor for the registry.
Definition spotter_camera_backend.c:289
Spottercam backend descriptor and optional native UART target projection.
Function table describing one backend's owned camera operations.
Definition camera_backend.h:94
struct camera_backend::@243120217343377347337244154071360217343172026241 mock