Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
camera_speedtest.h File Reference

Standalone, backend-neutral still-camera throughput benchmark. More...

#include <signal.h>
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for camera_speedtest.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  camera_speedtest_config
 Immutable dependencies for one selected and initialized camera backend. More...

Macros

#define CAMERA_SPEEDTEST_SAMPLE_COUNT   10
#define CAMERA_SPEEDTEST_FIRST_IMAGE   900000
#define CAMERA_SPEEDTEST_LAST_IMAGE   999999

Functions

int camera_speedtest_create_output_directory (const char *base_directory, char *output, size_t output_size)
 Atomically create a private directory for one benchmark run.
int camera_speedtest_find_image_block (const struct camera_speedtest_config *config, int *first_image)
 Find an unused consecutive image-number block for warm-up and samples.
int camera_speedtest_run (const struct camera_speedtest_config *config, int first_image)
 Capture one untimed warm-up image and ten timed images sequentially.

Detailed Description

Standalone, backend-neutral still-camera throughput benchmark.

Definition in file camera_speedtest.h.

Macro Definition Documentation

◆ CAMERA_SPEEDTEST_FIRST_IMAGE

#define CAMERA_SPEEDTEST_FIRST_IMAGE   900000

Definition at line 31 of file camera_speedtest.h.

◆ CAMERA_SPEEDTEST_LAST_IMAGE

#define CAMERA_SPEEDTEST_LAST_IMAGE   999999

Definition at line 32 of file camera_speedtest.h.

◆ CAMERA_SPEEDTEST_SAMPLE_COUNT

#define CAMERA_SPEEDTEST_SAMPLE_COUNT   10

Definition at line 30 of file camera_speedtest.h.

Function Documentation

◆ camera_speedtest_create_output_directory()

int camera_speedtest_create_output_directory ( const char * base_directory,
char * output,
size_t output_size )

Atomically create a private directory for one benchmark run.

Parameters
base_directoryConfigured backend photo root.
outputReceives the new directory path.
output_sizeCapacity of output.
Returns
0 on success, otherwise -1 with errno set.

A private mode-0700 directory prevents benchmark backends, which normally replace same-number files, from racing with or overwriting mission photographs.

Definition at line 117 of file camera_speedtest.c.

◆ camera_speedtest_find_image_block()

int camera_speedtest_find_image_block ( const struct camera_speedtest_config * config,
int * first_image )

Find an unused consecutive image-number block for warm-up and samples.

Parameters
configBackend filename information.
first_imageReceives the warm-up image number.
Returns
0 on success, -1 on invalid input, filesystem error, or exhausted range.

USHER camera backends replace an existing same-number image. Preflighting the complete block before camera initialization keeps benchmark evidence separate from mission captures and prevents accidental replacement of an existing photo.

Definition at line 404 of file camera_speedtest.c.

◆ camera_speedtest_run()

int camera_speedtest_run ( const struct camera_speedtest_config * config,
int first_image )

Capture one untimed warm-up image and ten timed images sequentially.

Parameters
configSelected and initialized camera backend.
first_imageWarm-up image number returned by camera_speedtest_find_image_block().
Returns
0 only when every requested image was captured and validated.

Only synchronous shoot time is used for camera throughput. Progress records are written through bounded nonblocking I/O by a separate reporter thread, so a slow terminal cannot delay capture requests or inflate measured camera latency. Images are retained for review.

Definition at line 438 of file camera_speedtest.c.