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 25 matching lines...) Expand all Loading... |
36 // arbitrary thread. | 36 // arbitrary thread. |
37 class ProtectionBitrateCalculator { | 37 class ProtectionBitrateCalculator { |
38 public: | 38 public: |
39 ProtectionBitrateCalculator(Clock* clock, | 39 ProtectionBitrateCalculator(Clock* clock, |
40 VCMProtectionCallback* protection_callback); | 40 VCMProtectionCallback* protection_callback); |
41 ~ProtectionBitrateCalculator(); | 41 ~ProtectionBitrateCalculator(); |
42 | 42 |
43 void SetProtectionMethod(bool enable_fec, bool enable_nack); | 43 void SetProtectionMethod(bool enable_fec, bool enable_nack); |
44 | 44 |
45 // Informs media optimization of initial encoding state. | 45 // Informs media optimization of initial encoding state. |
46 void SetEncodingData(uint32_t estimated_bitrate_bps, | 46 void SetEncodingData(size_t width, |
47 uint16_t width, | 47 size_t height, |
48 uint16_t height, | |
49 uint32_t frame_rate, | |
50 size_t num_temporal_layers, | 48 size_t num_temporal_layers, |
51 size_t max_payload_size); | 49 size_t max_payload_size); |
52 | 50 |
53 // Returns target rate for the encoder given the channel parameters. | 51 // Returns target rate for the encoder given the channel parameters. |
54 // Inputs: estimated_bitrate_bps - the estimated network bitrate in bits/s. | 52 // Inputs: estimated_bitrate_bps - the estimated network bitrate in bits/s. |
55 // actual_framerate - encoder frame rate. | 53 // actual_framerate - encoder frame rate. |
56 // fraction_lost - packet loss rate in % in the network. | 54 // fraction_lost - packet loss rate in % in the network. |
57 // round_trip_time_ms - round trip time in milliseconds. | 55 // round_trip_time_ms - round trip time in milliseconds. |
58 uint32_t SetTargetRates(uint32_t estimated_bitrate_bps, | 56 uint32_t SetTargetRates(uint32_t estimated_bitrate_bps, |
59 int actual_framerate, | 57 int actual_framerate, |
(...skipping 12 matching lines...) Expand all Loading... |
72 rtc::CriticalSection crit_sect_; | 70 rtc::CriticalSection crit_sect_; |
73 std::unique_ptr<media_optimization::VCMLossProtectionLogic> loss_prot_logic_ | 71 std::unique_ptr<media_optimization::VCMLossProtectionLogic> loss_prot_logic_ |
74 GUARDED_BY(crit_sect_); | 72 GUARDED_BY(crit_sect_); |
75 size_t max_payload_size_ GUARDED_BY(crit_sect_); | 73 size_t max_payload_size_ GUARDED_BY(crit_sect_); |
76 | 74 |
77 RTC_DISALLOW_COPY_AND_ASSIGN(ProtectionBitrateCalculator); | 75 RTC_DISALLOW_COPY_AND_ASSIGN(ProtectionBitrateCalculator); |
78 }; | 76 }; |
79 | 77 |
80 } // namespace webrtc | 78 } // namespace webrtc |
81 #endif // WEBRTC_MODULES_VIDEO_CODING_PROTECTION_BITRATE_CALCULATOR_H_ | 79 #endif // WEBRTC_MODULES_VIDEO_CODING_PROTECTION_BITRATE_CALCULATOR_H_ |
OLD | NEW |