 Chromium Code Reviews
 Chromium Code Reviews Issue 2429503002:
  Simplifying audio network adaptor by moving receiver frame length range to ctor.  (Closed)
    
  
    Issue 2429503002:
  Simplifying audio network adaptor by moving receiver frame length range to ctor.  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 const Clock* clock) | 135 const Clock* clock) | 
| 136 : min_reordering_time_ms(min_reordering_time_ms), | 136 : min_reordering_time_ms(min_reordering_time_ms), | 
| 137 min_reordering_squared_distance(min_reordering_squared_distance), | 137 min_reordering_squared_distance(min_reordering_squared_distance), | 
| 138 clock(clock) {} | 138 clock(clock) {} | 
| 139 | 139 | 
| 140 ControllerManagerImpl::Config::~Config() = default; | 140 ControllerManagerImpl::Config::~Config() = default; | 
| 141 | 141 | 
| 142 std::unique_ptr<ControllerManager> ControllerManagerImpl::Create( | 142 std::unique_ptr<ControllerManager> ControllerManagerImpl::Create( | 
| 143 const std::string& config_string, | 143 const std::string& config_string, | 
| 144 size_t num_encoder_channels, | 144 size_t num_encoder_channels, | 
| 145 rtc::ArrayView<const int> encoder_frame_lengths_ms, | 145 const std::vector<int>& encoder_frame_lengths_ms, | 
| 
kwiberg-webrtc
2016/10/19 09:12:01
Why did you make this change?
 
minyue-webrtc
2016/10/19 09:25:54
Because it is easier to construct a vector at the
 
kwiberg-webrtc
2016/10/19 10:43:33
Well, marginally---given an ArrayView av, you shou
 
minyue-webrtc
2016/10/21 08:26:29
Ok. thanks, yes. I'd changed it back.
 | |
| 146 size_t intial_channels_to_encode, | 146 size_t intial_channels_to_encode, | 
| 147 int initial_frame_length_ms, | 147 int initial_frame_length_ms, | 
| 148 int initial_bitrate_bps, | 148 int initial_bitrate_bps, | 
| 149 bool initial_fec_enabled, | 149 bool initial_fec_enabled, | 
| 150 bool initial_dtx_enabled, | 150 bool initial_dtx_enabled, | 
| 151 const Clock* clock) { | 151 const Clock* clock) { | 
| 152 #ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP | 152 #ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP | 
| 153 audio_network_adaptor::config::ControllerManager controller_manager_config; | 153 audio_network_adaptor::config::ControllerManager controller_manager_config; | 
| 154 controller_manager_config.ParseFromString(config_string); | 154 controller_manager_config.ParseFromString(config_string); | 
| 155 | 155 | 
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 NormalizeUplinkBandwidth(scoring_point.uplink_bandwidth_bps) - | 325 NormalizeUplinkBandwidth(scoring_point.uplink_bandwidth_bps) - | 
| 326 NormalizeUplinkBandwidth(uplink_bandwidth_bps); | 326 NormalizeUplinkBandwidth(uplink_bandwidth_bps); | 
| 327 float diff_normalized_packet_loss = | 327 float diff_normalized_packet_loss = | 
| 328 NormalizePacketLossFraction(scoring_point.uplink_packet_loss_fraction) - | 328 NormalizePacketLossFraction(scoring_point.uplink_packet_loss_fraction) - | 
| 329 NormalizePacketLossFraction(uplink_packet_loss_fraction); | 329 NormalizePacketLossFraction(uplink_packet_loss_fraction); | 
| 330 return std::pow(diff_normalized_bitrate_bps, 2) + | 330 return std::pow(diff_normalized_bitrate_bps, 2) + | 
| 331 std::pow(diff_normalized_packet_loss, 2); | 331 std::pow(diff_normalized_packet_loss, 2); | 
| 332 } | 332 } | 
| 333 | 333 | 
| 334 } // namespace webrtc | 334 } // namespace webrtc | 
| OLD | NEW |