| 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 |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 num_channels_to_encode_ = NumChannels(); | 445 num_channels_to_encode_ = NumChannels(); |
| 446 next_frame_length_ms_ = config_.frame_size_ms; | 446 next_frame_length_ms_ = config_.frame_size_ms; |
| 447 return true; | 447 return true; |
| 448 } | 448 } |
| 449 | 449 |
| 450 void AudioEncoderOpus::SetFrameLength(int frame_length_ms) { | 450 void AudioEncoderOpus::SetFrameLength(int frame_length_ms) { |
| 451 next_frame_length_ms_ = frame_length_ms; | 451 next_frame_length_ms_ = frame_length_ms; |
| 452 } | 452 } |
| 453 | 453 |
| 454 void AudioEncoderOpus::SetNumChannelsToEncode(size_t num_channels_to_encode) { | 454 void AudioEncoderOpus::SetNumChannelsToEncode(size_t num_channels_to_encode) { |
| 455 RTC_DCHECK_GT(num_channels_to_encode, 0u); | 455 RTC_DCHECK_GT(num_channels_to_encode, 0); |
| 456 RTC_DCHECK_LE(num_channels_to_encode, config_.num_channels); | 456 RTC_DCHECK_LE(num_channels_to_encode, config_.num_channels); |
| 457 | 457 |
| 458 if (num_channels_to_encode_ == num_channels_to_encode) | 458 if (num_channels_to_encode_ == num_channels_to_encode) |
| 459 return; | 459 return; |
| 460 | 460 |
| 461 RTC_CHECK_EQ(0, WebRtcOpus_SetForceChannels(inst_, num_channels_to_encode)); | 461 RTC_CHECK_EQ(0, WebRtcOpus_SetForceChannels(inst_, num_channels_to_encode)); |
| 462 num_channels_to_encode_ = num_channels_to_encode; | 462 num_channels_to_encode_ = num_channels_to_encode; |
| 463 } | 463 } |
| 464 | 464 |
| 465 void AudioEncoderOpus::ApplyAudioNetworkAdaptor() { | 465 void AudioEncoderOpus::ApplyAudioNetworkAdaptor() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 490 AudioNetworkAdaptorImpl::Config config; | 490 AudioNetworkAdaptorImpl::Config config; |
| 491 config.clock = clock; | 491 config.clock = clock; |
| 492 return std::unique_ptr<AudioNetworkAdaptor>(new AudioNetworkAdaptorImpl( | 492 return std::unique_ptr<AudioNetworkAdaptor>(new AudioNetworkAdaptorImpl( |
| 493 config, ControllerManagerImpl::Create( | 493 config, ControllerManagerImpl::Create( |
| 494 config_string, NumChannels(), supported_frame_lengths_ms(), | 494 config_string, NumChannels(), supported_frame_lengths_ms(), |
| 495 num_channels_to_encode_, next_frame_length_ms_, | 495 num_channels_to_encode_, next_frame_length_ms_, |
| 496 GetTargetBitrate(), config_.fec_enabled, GetDtx(), clock))); | 496 GetTargetBitrate(), config_.fec_enabled, GetDtx(), clock))); |
| 497 } | 497 } |
| 498 | 498 |
| 499 } // namespace webrtc | 499 } // namespace webrtc |
| OLD | NEW |