2020-11-25 14:34:57 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "camera.h"
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#define MP_MAX_CAMERAS 5
|
|
|
|
#define MP_MAX_LINKS 10
|
|
|
|
|
|
|
|
struct mp_media_link_config {
|
2021-11-12 14:00:03 +01:00
|
|
|
char source_name[100];
|
|
|
|
char target_name[100];
|
|
|
|
int source_port;
|
|
|
|
int target_port;
|
2020-11-25 14:34:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct mp_camera_config {
|
2021-11-12 14:00:03 +01:00
|
|
|
size_t index;
|
|
|
|
|
|
|
|
char cfg_name[100];
|
|
|
|
char dev_name[260];
|
|
|
|
char media_dev_name[260];
|
|
|
|
|
|
|
|
MPCameraMode capture_mode;
|
|
|
|
MPCameraMode preview_mode;
|
|
|
|
int rotate;
|
|
|
|
bool mirrored;
|
|
|
|
|
|
|
|
struct mp_media_link_config media_links[MP_MAX_LINKS];
|
|
|
|
int num_media_links;
|
|
|
|
|
|
|
|
float colormatrix[9];
|
|
|
|
float forwardmatrix[9];
|
|
|
|
float previewmatrix[9];
|
|
|
|
int blacklevel;
|
|
|
|
int whitelevel;
|
|
|
|
|
|
|
|
float focallength;
|
|
|
|
float cropfactor;
|
|
|
|
double fnumber;
|
|
|
|
int iso_min;
|
|
|
|
int iso_max;
|
|
|
|
|
|
|
|
char flash_path[260];
|
|
|
|
bool flash_display;
|
|
|
|
bool has_flash;
|
2020-11-25 14:34:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
bool mp_load_config();
|
|
|
|
|
|
|
|
const char *mp_get_device_make();
|
|
|
|
const char *mp_get_device_model();
|
2020-12-06 15:44:31 +01:00
|
|
|
const struct mp_camera_config *mp_get_camera_config(size_t index);
|