mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-17 20:47:01 +08:00
[feat] add VideoQuality configuration option to limit maximum video resolution
This commit is contained in:
@@ -495,6 +495,8 @@ int Render::CreateConnectionPeer() {
|
|||||||
: false;
|
: false;
|
||||||
params_.enable_turn = config_center_->IsEnableTurn();
|
params_.enable_turn = config_center_->IsEnableTurn();
|
||||||
params_.enable_srtp = config_center_->IsEnableSrtp();
|
params_.enable_srtp = config_center_->IsEnableSrtp();
|
||||||
|
params_.video_quality =
|
||||||
|
static_cast<VideoQuality>(config_center_->GetVideoQuality());
|
||||||
params_.on_receive_video_buffer = nullptr;
|
params_.on_receive_video_buffer = nullptr;
|
||||||
params_.on_receive_audio_buffer = OnReceiveAudioBufferCb;
|
params_.on_receive_audio_buffer = OnReceiveAudioBufferCb;
|
||||||
params_.on_receive_data_buffer = OnReceiveDataBufferCb;
|
params_.on_receive_data_buffer = OnReceiveDataBufferCb;
|
||||||
|
|||||||
@@ -225,6 +225,8 @@ void Render::OnReceiveVideoBufferCb(const XVideoFrame* video_frame,
|
|||||||
props->video_height_ = video_frame->height;
|
props->video_height_ = video_frame->height;
|
||||||
props->video_size_ = video_frame->size;
|
props->video_size_ = video_frame->size;
|
||||||
|
|
||||||
|
LOG_ERROR("receive: {}x{}", props->video_width_, props->video_height_);
|
||||||
|
|
||||||
if (need_to_update_render_rect) {
|
if (need_to_update_render_rect) {
|
||||||
render->UpdateRenderRect();
|
render->UpdateRenderRect();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,11 +82,11 @@ int Render::SettingWindow() {
|
|||||||
|
|
||||||
{
|
{
|
||||||
const char* video_quality_items[] = {
|
const char* video_quality_items[] = {
|
||||||
localization::video_quality_high[localization_language_index_]
|
localization::video_quality_low[localization_language_index_]
|
||||||
.c_str(),
|
.c_str(),
|
||||||
localization::video_quality_medium[localization_language_index_]
|
localization::video_quality_medium[localization_language_index_]
|
||||||
.c_str(),
|
.c_str(),
|
||||||
localization::video_quality_low[localization_language_index_]
|
localization::video_quality_high[localization_language_index_]
|
||||||
.c_str()};
|
.c_str()};
|
||||||
|
|
||||||
settings_items_offset += settings_items_padding;
|
settings_items_offset += settings_items_padding;
|
||||||
|
|||||||
Submodule submodules/minirtc updated: af031a9996...6954d0f3d8
Reference in New Issue
Block a user