Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 1695663003: Drop VideoOptions from VideoSendParameters. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed pbos' comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.h ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index 5f8488705184488def8fbaca74d04dadb29fa6c8..6442613081e73492c494fce9d1a0e1bcfa99a591 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -613,11 +613,10 @@ WebRtcVideoChannel2::WebRtcVideoChannel2(
unsignalled_ssrc_handler_(&default_unsignalled_ssrc_handler_),
video_config_(config.video),
external_encoder_factory_(external_encoder_factory),
- external_decoder_factory_(external_decoder_factory) {
+ external_decoder_factory_(external_decoder_factory),
+ default_send_options_(options) {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
- send_params_.options = options;
-
rtcp_receiver_report_ssrc_ = kDefaultRtcpReceiverReportSsrc;
sending_ = false;
default_send_ssrc_ = 0;
@@ -740,15 +739,6 @@ bool WebRtcVideoChannel2::GetChangedSendParameters(
rtc::Optional<bool>(params.conference_mode);
}
- // Handle options.
- // TODO(pbos): Require VideoSendParameters to contain a full set of options
- // and check if params.options != options_ instead of applying a delta.
- VideoOptions new_options = send_params_.options;
- new_options.SetAll(params.options);
- if (!(new_options == send_params_.options)) {
- changed_params->options = rtc::Optional<VideoOptions>(new_options);
- }
-
// Handle RTCP mode.
if (params.rtcp.reduced_size != send_params_.rtcp.reduced_size) {
changed_params->rtcp_mode = rtc::Optional<webrtc::RtcpMode>(
@@ -807,9 +797,6 @@ bool WebRtcVideoChannel2::SetSendParameters(const VideoSendParameters& params) {
call_->SetBitrateConfig(bitrate_config_);
}
- if (changed_params.options)
- send_params_.options.SetAll(*changed_params.options);
-
{
rtc::CritScope stream_lock(&stream_crit_);
for (auto& kv : send_streams_) {
@@ -1000,11 +987,11 @@ bool WebRtcVideoChannel2::AddSendStream(const StreamParams& sp) {
webrtc::VideoSendStream::Config config(this);
config.suspend_below_min_bitrate = video_config_.suspend_below_min_bitrate;
- WebRtcVideoSendStream* stream =
- new WebRtcVideoSendStream(call_, sp, config, external_encoder_factory_,
- video_config_.enable_cpu_overuse_detection,
- bitrate_config_.max_bitrate_bps, send_codec_,
- send_rtp_extensions_, send_params_);
+ WebRtcVideoSendStream* stream = new WebRtcVideoSendStream(
+ call_, sp, config, default_send_options_, external_encoder_factory_,
+ video_config_.enable_cpu_overuse_detection,
+ bitrate_config_.max_bitrate_bps, send_codec_, send_rtp_extensions_,
+ send_params_);
uint32_t ssrc = sp.first_ssrc();
RTC_DCHECK(ssrc != 0);
@@ -1470,6 +1457,7 @@ WebRtcVideoChannel2::WebRtcVideoSendStream::WebRtcVideoSendStream(
webrtc::Call* call,
const StreamParams& sp,
const webrtc::VideoSendStream::Config& config,
+ const VideoOptions& options,
WebRtcVideoEncoderFactory* external_encoder_factory,
bool enable_cpu_overuse_detection,
int max_bitrate_bps,
@@ -1487,7 +1475,7 @@ WebRtcVideoChannel2::WebRtcVideoSendStream::WebRtcVideoSendStream(
capturer_(nullptr),
external_encoder_factory_(external_encoder_factory),
stream_(nullptr),
- parameters_(config, send_params.options, max_bitrate_bps, codec_settings),
+ parameters_(config, options, max_bitrate_bps, codec_settings),
pending_encoder_reconfiguration_(false),
allocated_encoder_(nullptr, webrtc::kVideoCodecUnknown, false),
sending_(false),
@@ -1783,8 +1771,6 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::SetSendParameters(
if (params.conference_mode) {
parameters_.conference_mode = *params.conference_mode;
}
- if (params.options)
- SetOptions(*params.options);
// Set codecs and options.
if (params.codec) {
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.h ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698