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

Unified Diff: webrtc/video/video_send_stream.cc

Issue 1751363003: Move all calls after SetEncoder into SetEncoder. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/video/vie_encoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index b2ae1445723ae7fb34463711c4ae799fec1eddcb..7ae55dcf72af857985f368602967764f3735ae82 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -359,6 +359,7 @@ void VideoSendStream::ReconfigureVideoEncoder(
static const int kEncoderMinBitrateKbps = 30;
RTC_DCHECK(!streams.empty());
RTC_DCHECK_GE(config_.rtp.ssrcs.size(), streams.size());
+ RTC_DCHECK_GE(config.min_transmit_bitrate_bps, 0);
VideoCodec video_codec;
memset(&video_codec, 0, sizeof(video_codec));
@@ -486,18 +487,7 @@ void VideoSendStream::ReconfigureVideoEncoder(
RTC_DCHECK_GT(streams[0].max_framerate, 0);
video_codec.maxFramerate = streams[0].max_framerate;
- vie_encoder_.SetEncoder(video_codec);
-
- // Clear stats for disabled layers.
- for (size_t i = video_codec.numberOfSimulcastStreams;
- i < config_.rtp.ssrcs.size(); ++i) {
- stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]);
- }
-
- stats_proxy_.SetContentType(config.content_type);
-
- RTC_DCHECK_GE(config.min_transmit_bitrate_bps, 0);
- vie_encoder_.SetMinTransmitBitrate(config.min_transmit_bitrate_bps / 1000);
+ vie_encoder_.SetEncoder(video_codec, config.min_transmit_bitrate_bps);
}
bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
« no previous file with comments | « no previous file | webrtc/video/vie_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698