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

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

Issue 1870283002: Don't reconfigure the encoder if the video options aren't changing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@50
Patch Set: Created 4 years, 8 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/fakewebrtccall.cc ('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 c6bdafee5a336666a4fd46f5aab78c0590525105..3844e3bc31a4c4ab80936712d0ac7514c9cb3571 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -1668,6 +1668,14 @@ WebRtcVideoChannel2::WebRtcVideoSendStream::GetSsrcs() const {
void WebRtcVideoChannel2::WebRtcVideoSendStream::SetOptions(
const VideoOptions& options) {
rtc::CritScope cs(&lock_);
+
+ VideoOptions old_options = parameters_.options;
+ parameters_.options.SetAll(options);
+ // No need to do anything if the options aren't changing.
+ if (parameters_.options == old_options) {
+ return;
+ }
+
if (parameters_.codec_settings) {
LOG(LS_INFO) << "SetCodecAndOptions because of SetOptions; options="
<< options.ToString();
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.cc ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698