mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-07-17 16:36:49 +00:00
VNC-151 Adjust quality range for software encoders
This commit is contained in:
parent
e31e0c5be0
commit
f4129057f6
3 changed files with 7 additions and 11 deletions
|
|
@ -786,13 +786,13 @@ void SMsgWriter::writeVideoEncoders(const std::vector<int32_t> &encoders) {
|
|||
for (auto encoder: conjunction) {
|
||||
os->writeS32(encoder);
|
||||
|
||||
const auto &config = EncoderConfiguration::get_configuration(KasmVideoEncoders::from_encoding(encoder));
|
||||
const auto &[min_quality, max_quality, presets] = EncoderConfiguration::get_configuration(KasmVideoEncoders::from_encoding(encoder));
|
||||
|
||||
os->writeS32(config.min_quality);
|
||||
os->writeS32(config.max_quality);
|
||||
os->writeS32(min_quality);
|
||||
os->writeS32(max_quality);
|
||||
|
||||
os->writeU8(config.presets.size());
|
||||
for (const auto &preset_value: config.presets) {
|
||||
os->writeU8(presets.size());
|
||||
for (const auto &preset_value: presets) {
|
||||
os->writeS32(preset_value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace rfb {
|
|||
// h265_nvenc
|
||||
EncoderConfiguration{0, 51, {18, 23, 28, 39, 51}},
|
||||
// h265_software
|
||||
EncoderConfiguration{0, 51, {18, 23, 28, 39, 51}},
|
||||
EncoderConfiguration{0, 50, {18, 23, 28, 39, 50}},
|
||||
|
||||
// H.264
|
||||
// h264_vaapi
|
||||
|
|
@ -48,7 +48,7 @@ namespace rfb {
|
|||
// h264_nvenc
|
||||
EncoderConfiguration{0, 51, {18, 23, 28, 39, 51}},
|
||||
// h264_software
|
||||
EncoderConfiguration{1, 51, {9, 18, 25, 39, 51}},
|
||||
EncoderConfiguration{0, 50, {9, 18, 25, 39, 50}},
|
||||
|
||||
EncoderConfiguration{}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@
|
|||
* USA.
|
||||
*/
|
||||
#include "SoftwareEncoder.h"
|
||||
extern "C" {
|
||||
#include <libavutil/imgutils.h>
|
||||
#include <libavutil/opt.h>
|
||||
}
|
||||
#include "KasmVideoConstants.h"
|
||||
#include <rfb/LogWriter.h>
|
||||
#include <rfb/SConnection.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue