main.h 579 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include "camera_config.h"
  3. #include "gtk/gtk.h"
  4. struct mp_main_state {
  5. const struct mp_camera_config *camera;
  6. MPCameraMode mode;
  7. bool gain_is_manual;
  8. int gain;
  9. int gain_max;
  10. bool exposure_is_manual;
  11. int exposure;
  12. bool has_auto_focus_continuous;
  13. bool has_auto_focus_start;
  14. };
  15. void mp_main_update_state(const struct mp_main_state *state);
  16. void mp_main_set_preview(cairo_surface_t *image);
  17. void mp_main_capture_completed(const char *fname);
  18. int
  19. remap(int value, int input_min, int input_max, int output_min, int output_max);