Refactor controls
This commit is contained in:
42
src/state.h
42
src/state.h
@@ -19,6 +19,11 @@ typedef struct state_main {
|
||||
int burst_length;
|
||||
|
||||
// Control state
|
||||
bool control_gain;
|
||||
bool control_exposure;
|
||||
bool control_flash;
|
||||
bool control_focus;
|
||||
|
||||
bool gain_is_manual;
|
||||
int gain;
|
||||
int gain_max;
|
||||
@@ -30,4 +35,39 @@ typedef struct state_main {
|
||||
|
||||
bool has_auto_focus_continuous;
|
||||
bool has_auto_focus_start;
|
||||
} mp_state_main;
|
||||
} mp_state_main;
|
||||
|
||||
typedef struct cstate {
|
||||
uint32_t control;
|
||||
int32_t value;
|
||||
int32_t value_req;
|
||||
int32_t max;
|
||||
bool manual;
|
||||
bool manual_req;
|
||||
} controlstate;
|
||||
|
||||
typedef struct state_io {
|
||||
libmegapixels_camera *camera;
|
||||
libmegapixels_mode *mode_capture;
|
||||
libmegapixels_mode *mode_preview;
|
||||
|
||||
int burst_length;
|
||||
int captures_remaining;
|
||||
bool flush_pipeline;
|
||||
int blank_frame_count;
|
||||
|
||||
// Control state
|
||||
controlstate gain;
|
||||
controlstate exposure;
|
||||
controlstate focus;
|
||||
controlstate red;
|
||||
controlstate blue;
|
||||
bool can_af_trigger;
|
||||
bool trigger_af;
|
||||
bool flash_enabled;
|
||||
|
||||
// State passed through to the process pipeline
|
||||
int preview_width;
|
||||
int preview_height;
|
||||
int device_rotation;
|
||||
} mp_state_io;
|
Reference in New Issue
Block a user