mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-08-22 19:15:40 +08:00
[fix] use screen content defaults for desktop streaming
This commit is contained in:
@@ -29,7 +29,11 @@ int ConfigCenter::Load() {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool persist_turn_mode_migration = false;
|
bool persist_config_migration = false;
|
||||||
|
persist_config_migration |= ini_.Delete(section_, "video_content_type");
|
||||||
|
persist_config_migration |= ini_.Delete(section_, "screen_content");
|
||||||
|
persist_config_migration |=
|
||||||
|
ini_.Delete(section_, "enable_desktop_quality_optimization");
|
||||||
|
|
||||||
const long language_value =
|
const long language_value =
|
||||||
ini_.GetLongValue(section_, "language", static_cast<long>(language_));
|
ini_.GetLongValue(section_, "language", static_cast<long>(language_));
|
||||||
@@ -52,7 +56,6 @@ int ConfigCenter::Load() {
|
|||||||
|
|
||||||
hardware_video_codec_ = ini_.GetBoolValue(section_, "hardware_video_codec",
|
hardware_video_codec_ = ini_.GetBoolValue(section_, "hardware_video_codec",
|
||||||
hardware_video_codec_);
|
hardware_video_codec_);
|
||||||
|
|
||||||
const char* turn_mode_value = ini_.GetValue(section_, "turn_mode", nullptr);
|
const char* turn_mode_value = ini_.GetValue(section_, "turn_mode", nullptr);
|
||||||
if (turn_mode_value != nullptr && strlen(turn_mode_value) > 0) {
|
if (turn_mode_value != nullptr && strlen(turn_mode_value) > 0) {
|
||||||
const long parsed_turn_mode = ini_.GetLongValue(
|
const long parsed_turn_mode = ini_.GetLongValue(
|
||||||
@@ -70,7 +73,7 @@ int ConfigCenter::Load() {
|
|||||||
turn_mode_ = legacy_enable_turn ? TURN_MODE::AUTO_UDP_TCP
|
turn_mode_ = legacy_enable_turn ? TURN_MODE::AUTO_UDP_TCP
|
||||||
: TURN_MODE::DISABLED;
|
: TURN_MODE::DISABLED;
|
||||||
ini_.SetLongValue(section_, "turn_mode", static_cast<long>(turn_mode_));
|
ini_.SetLongValue(section_, "turn_mode", static_cast<long>(turn_mode_));
|
||||||
persist_turn_mode_migration = true;
|
persist_config_migration = true;
|
||||||
}
|
}
|
||||||
enable_srtp_ = ini_.GetBoolValue(section_, "enable_srtp", enable_srtp_);
|
enable_srtp_ = ini_.GetBoolValue(section_, "enable_srtp", enable_srtp_);
|
||||||
enable_self_hosted_ =
|
enable_self_hosted_ =
|
||||||
@@ -121,8 +124,7 @@ int ConfigCenter::Load() {
|
|||||||
file_transfer_save_path_ = "";
|
file_transfer_save_path_ = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (persist_turn_mode_migration &&
|
if (persist_config_migration && ini_.SaveFile(config_path_.c_str()) < 0) {
|
||||||
ini_.SaveFile(config_path_.c_str()) < 0) {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,8 +111,14 @@ int GuiRuntime::CreateConnectionPeer() {
|
|||||||
: false;
|
: false;
|
||||||
params_.turn_mode = static_cast<TurnMode>(config_center_->GetTurnMode());
|
params_.turn_mode = static_cast<TurnMode>(config_center_->GetTurnMode());
|
||||||
params_.enable_srtp = config_center_->IsEnableSrtp();
|
params_.enable_srtp = config_center_->IsEnableSrtp();
|
||||||
|
params_.video_content_type = VideoContentType::ScreenContent;
|
||||||
params_.video_quality =
|
params_.video_quality =
|
||||||
static_cast<VideoQuality>(config_center_->GetVideoQuality());
|
static_cast<VideoQuality>(config_center_->GetVideoQuality());
|
||||||
|
params_.video_frame_rate =
|
||||||
|
config_center_->GetVideoFrameRate() ==
|
||||||
|
ConfigCenter::VIDEO_FRAME_RATE::FPS_30
|
||||||
|
? 30
|
||||||
|
: 60;
|
||||||
params_.on_receive_video_buffer = nullptr;
|
params_.on_receive_video_buffer = nullptr;
|
||||||
params_.on_receive_audio_buffer = PeerEventHandler::OnReceiveAudioBuffer;
|
params_.on_receive_audio_buffer = PeerEventHandler::OnReceiveAudioBuffer;
|
||||||
params_.on_receive_data_buffer = PeerEventHandler::OnReceiveDataBuffer;
|
params_.on_receive_data_buffer = PeerEventHandler::OnReceiveDataBuffer;
|
||||||
|
|||||||
+1
-1
Submodule submodules/minirtc updated: cb1d9fe118...f0d35828cc
Reference in New Issue
Block a user