megapixels/src/main.h

34 lines
732 B
C
Raw Permalink Normal View History

#pragma once
#include "camera_config.h"
#include "zbar_pipeline.h"
2021-04-15 15:14:20 +02:00
#include "process_pipeline.h"
#include "gtk/gtk.h"
struct mp_main_state {
2020-12-06 15:44:31 +01:00
const struct mp_camera_config *camera;
MPCameraMode mode;
2021-04-19 16:04:53 +02:00
int image_width;
int image_height;
2020-12-06 15:44:31 +01:00
bool gain_is_manual;
int gain;
int gain_max;
2020-12-06 15:44:31 +01:00
bool exposure_is_manual;
int exposure;
2020-12-06 15:44:31 +01:00
bool has_auto_focus_continuous;
bool has_auto_focus_start;
};
void mp_main_update_state(const struct mp_main_state *state);
2021-04-15 15:14:20 +02:00
void mp_main_set_preview(MPProcessPipelineBuffer *buffer);
2021-05-01 13:28:02 +02:00
void mp_main_capture_completed(GdkTexture *thumb, const char *fname);
void mp_main_set_zbar_result(MPZBarScanResult *result);
2020-12-06 15:44:31 +01:00
int remap(int value, int input_min, int input_max, int output_min, int output_max);