api: quality options for screen mirroring (#313)

## Link to GitHub Issue, if one exists
n/a

## Description of change
Allow the server to override client's quality options for screen
mirroring.

On Windows / Android versions (flutter-based) clients, this is already
in the options of those apps. However, the iOS version lacks the quality
options.

## Testing
Tested with iOS and Windows clients.
This commit is contained in:
bicarus-dev
2025-05-04 20:10:56 -07:00
committed by GitHub
parent b3cee1dfcc
commit df9d9d8673
5 changed files with 53 additions and 3 deletions
+22
View File
@@ -1194,6 +1194,28 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.type = OptionType::Bool,
.category = "API (Dev)",
},
{
// APIScreenMirrorQuality
.title = "API Screen Mirror Quality Override",
.name = "apiscreenq",
.desc = "JPEG compression level of mirrored images, overriding any client request. "
"Value must be between 0 (poor quality) and 100 (best quality), inclusive. Default: 70",
.type = OptionType::Integer,
.setting_name = "(0-100)",
.category = "SpiceCompanion and API",
},
{
// APIScreenMirrorDivide
.title = "API Screen Mirror Divide Override",
.name = "apiscreendiv",
.desc = "Divide value of mirrored images, overriding any client request. "
"Divide of 1 means send every pixel, 2 means every other pixel, 3 means every third pixel, and so on; "
"increasing the value drastically reduces transfer size at the cost of image quality. "
"Value must be 1 or greater. Default: 1",
.type = OptionType::Integer,
.setting_name = "1",
.category = "SpiceCompanion and API",
},
{
.title = "Enable All IO Modules",
.name = "io",