camera_config.h 878 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include "camera.h"
  3. #include <stdbool.h>
  4. #include <stddef.h>
  5. #define MP_MAX_CAMERAS 5
  6. #define MP_MAX_LINKS 10
  7. struct mp_media_link_config {
  8. char source_name[100];
  9. char target_name[100];
  10. int source_port;
  11. int target_port;
  12. };
  13. struct mp_camera_config {
  14. size_t index;
  15. char cfg_name[100];
  16. char dev_name[260];
  17. char media_dev_name[260];
  18. MPCameraMode capture_mode;
  19. MPCameraMode preview_mode;
  20. int rotate;
  21. bool mirrored;
  22. struct mp_media_link_config media_links[MP_MAX_LINKS];
  23. int num_media_links;
  24. float colormatrix[9];
  25. float forwardmatrix[9];
  26. float previewmatrix[9];
  27. int blacklevel;
  28. int whitelevel;
  29. float focallength;
  30. float cropfactor;
  31. double fnumber;
  32. int iso_min;
  33. int iso_max;
  34. };
  35. bool mp_load_config();
  36. const char *mp_get_device_make();
  37. const char *mp_get_device_model();
  38. const struct mp_camera_config *mp_get_camera_config(size_t index);