mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-15 03:26:48 +08:00
[fix] fix frame rate and video quality settings not being applied correctly, fixes #24
This commit is contained in:
@@ -448,6 +448,7 @@ class Render {
|
||||
bool enable_self_hosted_ = false;
|
||||
int language_button_value_last_ = 0;
|
||||
int video_quality_button_value_last_ = 0;
|
||||
int video_frame_rate_button_value_last_ = 0;
|
||||
int video_encode_format_button_value_last_ = 0;
|
||||
bool enable_hardware_video_codec_last_ = false;
|
||||
bool enable_turn_last_ = false;
|
||||
|
||||
@@ -288,14 +288,23 @@ int Render::SettingWindow() {
|
||||
|
||||
// Video quality
|
||||
if (video_quality_button_value_ == 0) {
|
||||
config_center_->SetVideoQuality(ConfigCenter::VIDEO_QUALITY::HIGH);
|
||||
config_center_->SetVideoQuality(ConfigCenter::VIDEO_QUALITY::LOW);
|
||||
} else if (video_quality_button_value_ == 1) {
|
||||
config_center_->SetVideoQuality(ConfigCenter::VIDEO_QUALITY::MEDIUM);
|
||||
} else {
|
||||
config_center_->SetVideoQuality(ConfigCenter::VIDEO_QUALITY::LOW);
|
||||
config_center_->SetVideoQuality(ConfigCenter::VIDEO_QUALITY::HIGH);
|
||||
}
|
||||
video_quality_button_value_last_ = video_quality_button_value_;
|
||||
|
||||
if (video_frame_rate_button_value_ == 0) {
|
||||
config_center_->SetVideoFrameRate(
|
||||
ConfigCenter::VIDEO_FRAME_RATE::FPS_30);
|
||||
} else if (video_frame_rate_button_value_ == 1) {
|
||||
config_center_->SetVideoFrameRate(
|
||||
ConfigCenter::VIDEO_FRAME_RATE::FPS_60);
|
||||
}
|
||||
video_frame_rate_button_value_last_ = video_frame_rate_button_value_;
|
||||
|
||||
// Video encode format
|
||||
if (video_encode_format_button_value_ == 0) {
|
||||
config_center_->SetVideoEncodeFormat(
|
||||
@@ -366,6 +375,11 @@ int Render::SettingWindow() {
|
||||
video_quality_button_value_ = video_quality_button_value_last_;
|
||||
}
|
||||
|
||||
if (video_frame_rate_button_value_ !=
|
||||
video_frame_rate_button_value_last_) {
|
||||
video_frame_rate_button_value_ = video_frame_rate_button_value_last_;
|
||||
}
|
||||
|
||||
if (video_encode_format_button_value_ !=
|
||||
video_encode_format_button_value_last_) {
|
||||
video_encode_format_button_value_ =
|
||||
|
||||
Reference in New Issue
Block a user