| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 for (size_t i = current_encoder_settings_->config.streams.size(); | 596 for (size_t i = current_encoder_settings_->config.streams.size(); |
| 597 i < config_.rtp.ssrcs.size(); ++i) { | 597 i < config_.rtp.ssrcs.size(); ++i) { |
| 598 stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]); | 598 stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]); |
| 599 } | 599 } |
| 600 | 600 |
| 601 size_t number_of_temporal_layers = | 601 size_t number_of_temporal_layers = |
| 602 current_encoder_settings_->config.streams.back() | 602 current_encoder_settings_->config.streams.back() |
| 603 .temporal_layer_thresholds_bps.size() + | 603 .temporal_layer_thresholds_bps.size() + |
| 604 1; | 604 1; |
| 605 protection_bitrate_calculator_.SetEncodingData( | 605 protection_bitrate_calculator_.SetEncodingData( |
| 606 current_encoder_settings_->video_codec.startBitrate * 1000, | |
| 607 current_encoder_settings_->video_codec.width, | 606 current_encoder_settings_->video_codec.width, |
| 608 current_encoder_settings_->video_codec.height, | 607 current_encoder_settings_->video_codec.height, |
| 609 current_encoder_settings_->video_codec.maxFramerate, | |
| 610 number_of_temporal_layers, payload_router_.MaxPayloadLength()); | 608 number_of_temporal_layers, payload_router_.MaxPayloadLength()); |
| 611 | 609 |
| 612 // We might've gotten new settings while configuring the encoder settings, | 610 // We might've gotten new settings while configuring the encoder settings, |
| 613 // restart from the top to see if that's the case before trying to encode | 611 // restart from the top to see if that's the case before trying to encode |
| 614 // a frame (which might correspond to the last frame size). | 612 // a frame (which might correspond to the last frame size). |
| 615 encoder_wakeup_event_.Set(); | 613 encoder_wakeup_event_.Set(); |
| 616 continue; | 614 continue; |
| 617 } | 615 } |
| 618 | 616 |
| 619 if (pending_state_change) { | 617 if (pending_state_change) { |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 &module_nack_rate); | 896 &module_nack_rate); |
| 899 *sent_video_rate_bps += module_video_rate; | 897 *sent_video_rate_bps += module_video_rate; |
| 900 *sent_nack_rate_bps += module_nack_rate; | 898 *sent_nack_rate_bps += module_nack_rate; |
| 901 *sent_fec_rate_bps += module_fec_rate; | 899 *sent_fec_rate_bps += module_fec_rate; |
| 902 } | 900 } |
| 903 return 0; | 901 return 0; |
| 904 } | 902 } |
| 905 | 903 |
| 906 } // namespace internal | 904 } // namespace internal |
| 907 } // namespace webrtc | 905 } // namespace webrtc |
| OLD | NEW |