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

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2165743003: Variable audio bitrate. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 } 1129 }
1130 1130
1131 void RecreateAudioSendStream( 1131 void RecreateAudioSendStream(
1132 const std::vector<webrtc::RtpExtension>& extensions) { 1132 const std::vector<webrtc::RtpExtension>& extensions) {
1133 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1133 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1134 if (stream_) { 1134 if (stream_) {
1135 call_->DestroyAudioSendStream(stream_); 1135 call_->DestroyAudioSendStream(stream_);
1136 stream_ = nullptr; 1136 stream_ = nullptr;
1137 } 1137 }
1138 config_.rtp.extensions = extensions; 1138 config_.rtp.extensions = extensions;
1139 if (webrtc::field_trial::FindFullName("WebRTC-AdaptAudioBitrate") ==
1140 "Enabled") {
1141 // TODO(mflodman):Set this properly.
1142 config_.min_bitrate_kbps = kOpusMinBitrate;
1143 config_.max_bitrate_kbps = kOpusBitrateFb;
stefan-webrtc 2016/07/20 10:15:00 kOpusBitrateFb seems like a bad variable name. Cou
minyue-webrtc 2016/07/21 10:59:19 is it possible to use kOpusMaxBitrate (although we
mflodman 2016/07/22 13:50:29 @minyue: I didn't want to increase the bitrate mor
mflodman 2016/07/22 13:50:29 @stefan: There are three different Opus bitrate c
stefan-webrtc 2016/07/25 15:06:20 I see. Probably good enough then, although I would
mflodman 2016/07/26 09:50:52 I agree and I'll bring that up for discussion.
1144 }
1145
1139 RTC_DCHECK(!stream_); 1146 RTC_DCHECK(!stream_);
1140 stream_ = call_->CreateAudioSendStream(config_); 1147 stream_ = call_->CreateAudioSendStream(config_);
1141 RTC_CHECK(stream_); 1148 RTC_CHECK(stream_);
1142 UpdateSendState(); 1149 UpdateSendState();
1143 } 1150 }
1144 1151
1145 bool SendTelephoneEvent(int payload_type, int event, int duration_ms) { 1152 bool SendTelephoneEvent(int payload_type, int event, int duration_ms) {
1146 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1153 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1147 RTC_DCHECK(stream_); 1154 RTC_DCHECK(stream_);
1148 return stream_->SendTelephoneEvent(payload_type, event, duration_ms); 1155 return stream_->SendTelephoneEvent(payload_type, event, duration_ms);
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 } 2623 }
2617 } else { 2624 } else {
2618 LOG(LS_INFO) << "Stopping playout for channel #" << channel; 2625 LOG(LS_INFO) << "Stopping playout for channel #" << channel;
2619 engine()->voe()->base()->StopPlayout(channel); 2626 engine()->voe()->base()->StopPlayout(channel);
2620 } 2627 }
2621 return true; 2628 return true;
2622 } 2629 }
2623 } // namespace cricket 2630 } // namespace cricket
2624 2631
2625 #endif // HAVE_WEBRTC_VOICE 2632 #endif // HAVE_WEBRTC_VOICE
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698