| OLD | NEW | 
|---|
| 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 | 
| 11 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" | 11 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" | 
| 12 | 12 | 
| 13 #include "webrtc/base/checks.h" | 13 #include "webrtc/base/checks.h" | 
| 14 #include "webrtc/base/numerics/safe_conversions.h" | 14 #include "webrtc/base/safe_conversions.h" | 
| 15 #include "webrtc/common_types.h" | 15 #include "webrtc/common_types.h" | 
| 16 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" | 16 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" | 
| 17 | 17 | 
| 18 namespace webrtc { | 18 namespace webrtc { | 
| 19 | 19 | 
| 20 namespace { | 20 namespace { | 
| 21 | 21 | 
| 22 const int kSampleRateHz = 48000; | 22 const int kSampleRateHz = 48000; | 
| 23 const int kMinBitrateBps = 500; | 23 const int kMinBitrateBps = 500; | 
| 24 const int kMaxBitrateBps = 512000; | 24 const int kMaxBitrateBps = 512000; | 
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 258     RTC_CHECK_EQ(0, WebRtcOpus_DisableDtx(inst_)); | 258     RTC_CHECK_EQ(0, WebRtcOpus_DisableDtx(inst_)); | 
| 259   } | 259   } | 
| 260   RTC_CHECK_EQ(0, | 260   RTC_CHECK_EQ(0, | 
| 261                WebRtcOpus_SetPacketLossRate( | 261                WebRtcOpus_SetPacketLossRate( | 
| 262                    inst_, static_cast<int32_t>(packet_loss_rate_ * 100 + .5))); | 262                    inst_, static_cast<int32_t>(packet_loss_rate_ * 100 + .5))); | 
| 263   config_ = config; | 263   config_ = config; | 
| 264   return true; | 264   return true; | 
| 265 } | 265 } | 
| 266 | 266 | 
| 267 }  // namespace webrtc | 267 }  // namespace webrtc | 
| OLD | NEW | 
|---|