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

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

Issue 1790703002: Reconfigure video encoders even when not sending. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback + compile 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 | « no previous file | 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 daffc2fd3419f66ff615a90fd7a576d43fd744c9..5f8488705184488def8fbaca74d04dadb29fa6c8 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -1550,11 +1550,6 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame(
return;
}
- // Not sending, abort early to prevent expensive reconfigurations while
- // setting up codecs etc.
- if (!sending_)
- return;
-
if (muted_) {
// Create a black frame to transmit instead.
CreateBlackFrame(&video_frame,
@@ -1575,6 +1570,13 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame(
SetDimensions(video_frame.width(), video_frame.height());
last_rotation_ = video_frame.rotation();
+ // Not sending, abort after reconfiguration. Reconfiguration should still
+ // occur to permit sending this input as quickly as possible once we start
+ // sending (without having to reconfigure then).
+ if (!sending_) {
+ return;
+ }
+
stream_->Input()->IncomingCapturedFrame(video_frame);
}
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698