Loading...
Searching...
No Matches
imx500_pipe.c
Go to the documentation of this file.
153 (!pipe->photo_only && ((!pipe->settings || !pipe->settings[0]) && (!pipe->model || !pipe->model[0]))) ||
246 if (send_request(pipe, request, (size_t)count) && expect_response(pipe, "OK\n", IMX500_SHOT_TIMEOUT_MS) == 0) return 0;
269 if (length < 0 || (size_t)length >= capacity || strchr(filename, '\n') || strchr(filename, '\r')
286 if (!send_request(pipe, request, (size_t)length) || expect_response(pipe, "OK\n", IMX500_SHOT_TIMEOUT_MS) != 0
static void wait_ms(int milliseconds)
Wait until a short polling interval elapses.
Definition ai_cam_pipe.c:114
char ** environ
Optional split-phase capture contract for USHER image backends.
static bool capture_running(const volatile sig_atomic_t *running)
Atomically poll a borrowed cancellation flag; NULL means no cancellation.
Definition camera_capture.h:46
static bool start(uint32_t session)
Admit a nonzero session and discard correlation from the previous one.
Definition dipla_camera_backend.c:170
static bool send_request(struct imx500_pipe *pipe, const char *request, size_t length)
Send one request before a single absolute deadline, including partial writes.
Definition imx500_pipe.c:215
#define IMX500_STARTUP_TIMEOUT_MS
First-use RPK upload/warm-up needs more time than a warm still capture.
Definition imx500_pipe.c:43
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
#define IMX500_SHOT_TIMEOUT_MS
Bound response waiting so an abandoned shot cannot block the owner indefinitely.
Definition imx500_pipe.c:45
static bool reap_owned_camera(struct imx500_pipe *pipe, int timeout_ms)
Poll for exit of the camera child.
Definition imx500_pipe.c:118
#define IMX500_RESPONSE_BYTES
Fixed space for short protocol replies, never arbitrary child diagnostics.
Definition imx500_pipe.c:47
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
static int expect_response(struct imx500_pipe *pipe, const char *expected, int timeout)
Consume one exact line before an unchanged monotonic response deadline.
Definition imx500_pipe.c:72
int imx500_pipe_start(struct imx500_pipe *pipe)
Replace any owned worker and require its exact READY response.
Definition imx500_pipe.c:149
int imx500_pipe_analyze(struct imx500_pipe *pipe, const char *filename, unsigned number)
Submit one saved-picture request to a warm analysis worker without recapturing pixels.
Definition imx500_pipe.c:239
static int64_t milliseconds(void)
Read elapsed-time evidence unaffected by wall-clock corrections.
Definition imx500_pipe.c:56
READY/SHOT/OK process ownership without model-analysis semantics.
Small path and writable-directory helpers shared by USHER backends.
static int usher_prepare_photo(char *filename, size_t capacity)
Redirect an intended public photo into its same-filesystem private staging directory.
Definition path_utils.h:143
static const char * usher_resolve_path(const char *path, char *buffer, size_t buffer_size)
Expand a leading home-directory shorthand without allocating memory.
Definition path_utils.h:74
static int usher_ensure_directory(const char *path)
Create missing directory components and verify the final directory is writable.
Definition path_utils.h:97
One caller-serialized native worker and its borrowed configuration.
Definition imx500_pipe.h:35
Validated successful PTP response and optional data-phase length.
Definition chdkbridge.c:116