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

Side by Side Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc

Issue 2986083002: Removed an obsolete DCHECK in AudioEncoderOpus. (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 RTC_CHECK_EQ(0, WebRtcOpus_SetBitRate(inst_, GetBitrateBps(config_))); 722 RTC_CHECK_EQ(0, WebRtcOpus_SetBitRate(inst_, GetBitrateBps(config_)));
723 const auto new_complexity = GetNewComplexity(config_); 723 const auto new_complexity = GetNewComplexity(config_);
724 if (new_complexity && complexity_ != *new_complexity) { 724 if (new_complexity && complexity_ != *new_complexity) {
725 complexity_ = *new_complexity; 725 complexity_ = *new_complexity;
726 RTC_CHECK_EQ(0, WebRtcOpus_SetComplexity(inst_, complexity_)); 726 RTC_CHECK_EQ(0, WebRtcOpus_SetComplexity(inst_, complexity_));
727 } 727 }
728 } 728 }
729 729
730 void AudioEncoderOpus::ApplyAudioNetworkAdaptor() { 730 void AudioEncoderOpus::ApplyAudioNetworkAdaptor() {
731 auto config = audio_network_adaptor_->GetEncoderRuntimeConfig(); 731 auto config = audio_network_adaptor_->GetEncoderRuntimeConfig();
732 RTC_DCHECK(!config.frame_length_ms || *config.frame_length_ms == 20 ||
733 *config.frame_length_ms == 60);
734 732
735 if (config.bitrate_bps) 733 if (config.bitrate_bps)
736 SetTargetBitrate(*config.bitrate_bps); 734 SetTargetBitrate(*config.bitrate_bps);
737 if (config.frame_length_ms) 735 if (config.frame_length_ms)
738 SetFrameLength(*config.frame_length_ms); 736 SetFrameLength(*config.frame_length_ms);
739 if (config.enable_fec) 737 if (config.enable_fec)
740 SetFec(*config.enable_fec); 738 SetFec(*config.enable_fec);
741 if (config.uplink_packet_loss_fraction) 739 if (config.uplink_packet_loss_fraction)
742 SetProjectedPacketLossRate(*config.uplink_packet_loss_fraction); 740 SetProjectedPacketLossRate(*config.uplink_packet_loss_fraction);
743 if (config.enable_dtx) 741 if (config.enable_dtx)
(...skipping 24 matching lines...) Expand all
768 config_.uplink_bandwidth_update_interval_ms) { 766 config_.uplink_bandwidth_update_interval_ms) {
769 rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage(); 767 rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage();
770 if (smoothed_bitrate) 768 if (smoothed_bitrate)
771 audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate); 769 audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate);
772 bitrate_smoother_last_update_time_ = rtc::Optional<int64_t>(now_ms); 770 bitrate_smoother_last_update_time_ = rtc::Optional<int64_t>(now_ms);
773 } 771 }
774 } 772 }
775 } 773 }
776 774
777 } // namespace webrtc 775 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698