Add webcam support

This commit is contained in:
dec05eba
2025-12-25 08:19:07 +01:00
parent 1971d4a288
commit 13562d2aa1
19 changed files with 531 additions and 26 deletions

View File

@@ -25,11 +25,22 @@ namespace gsr {
bool png = false;
};
struct SupportedCameraPixelFormats {
bool yuyv = false;
bool mjpeg = false;
};
struct GsrMonitor {
std::string name;
mgl::vec2i size;
};
struct GsrCamera {
std::string path;
mgl::vec2i size;
SupportedCameraPixelFormats supported_pixel_formats;
};
struct GsrVersion {
uint8_t major = 0;
uint8_t minor = 0;
@@ -51,6 +62,7 @@ namespace gsr {
bool focused = false;
bool portal = false;
std::vector<GsrMonitor> monitors;
std::vector<GsrCamera> cameras;
};
enum class DisplayServer {
@@ -103,4 +115,5 @@ namespace gsr {
std::vector<AudioDevice> get_audio_devices();
std::vector<std::string> get_application_audio();
SupportedCaptureOptions get_supported_capture_options(const GsrInfo &gsr_info);
std::vector<GsrCamera> get_v4l2_devices();
}