linux client: only show 10-bit if supported

This commit is contained in:
galister
2026-09-29 19:22:33 +02:00
committed by xytovl
parent 9062f082e5
commit e5923e155a
9 changed files with 106 additions and 28 deletions
+5 -2
View File
@@ -343,7 +343,8 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
if (config.codec)
{
info.supported_codecs = {*config.codec};
const bool supports_10bit = decoder::supports_10bit(*config.codec);
info.supported_codecs = {{.codec = *config.codec, .supports_10bit = supports_10bit}};
switch (*config.codec)
{
case h264:
@@ -351,11 +352,13 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
break;
case h265:
case av1:
info.bit_depth = config.bit_depth;
info.bit_depth = supports_10bit ? config.bit_depth : 8;
}
}
else
{
info.supported_codecs = decoder::supported_codecs();
}
return info;
}());