OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // VieEncoder. | 42 // VieEncoder. |
43 void SetEncodingData(int32_t max_bit_rate, | 43 void SetEncodingData(int32_t max_bit_rate, |
44 uint32_t bit_rate, | 44 uint32_t bit_rate, |
45 uint16_t width, | 45 uint16_t width, |
46 uint16_t height, | 46 uint16_t height, |
47 uint32_t frame_rate, | 47 uint32_t frame_rate, |
48 int num_temporal_layers, | 48 int num_temporal_layers, |
49 int32_t mtu); | 49 int32_t mtu); |
50 | 50 |
51 // Sets target rates for the encoder given the channel parameters. | 51 // Sets target rates for the encoder given the channel parameters. |
52 // Inputs: target bitrate - the encoder target bitrate in bits/s. | 52 // Input: target bitrate - the encoder target bitrate in bits/s. |
53 // fraction_lost - packet loss rate in % in the network. | 53 uint32_t SetTargetRates(uint32_t target_bitrate); |
54 // round_trip_time_ms - round trip time in milliseconds. | |
55 // min_bit_rate - the bit rate of the end-point with lowest rate. | |
56 // max_bit_rate - the bit rate of the end-point with highest rate. | |
57 uint32_t SetTargetRates(uint32_t target_bitrate, | |
58 uint8_t fraction_lost, | |
59 int64_t round_trip_time_ms); | |
60 | 54 |
61 void EnableFrameDropper(bool enable); | 55 void EnableFrameDropper(bool enable); |
62 bool DropFrame(); | 56 bool DropFrame(); |
63 | 57 |
64 // Informs Media Optimization of encoded output. | 58 // Informs Media Optimization of encoded output. |
65 // TODO(perkj): Deprecate SetEncodingData once its not used for stats in | 59 // TODO(perkj): Deprecate SetEncodingData once its not used for stats in |
66 // VieEncoder. | 60 // VieEncoder. |
67 int32_t UpdateWithEncodedData(const EncodedImage& encoded_image); | 61 int32_t UpdateWithEncodedData(const EncodedImage& encoded_image); |
68 | 62 |
69 // InputFrameRate 0 = no frame rate estimate available. | 63 // InputFrameRate 0 = no frame rate estimate available. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 102 |
109 // Protect all members. | 103 // Protect all members. |
110 std::unique_ptr<CriticalSectionWrapper> crit_sect_; | 104 std::unique_ptr<CriticalSectionWrapper> crit_sect_; |
111 | 105 |
112 Clock* clock_ GUARDED_BY(crit_sect_); | 106 Clock* clock_ GUARDED_BY(crit_sect_); |
113 int32_t max_bit_rate_ GUARDED_BY(crit_sect_); | 107 int32_t max_bit_rate_ GUARDED_BY(crit_sect_); |
114 uint16_t codec_width_ GUARDED_BY(crit_sect_); | 108 uint16_t codec_width_ GUARDED_BY(crit_sect_); |
115 uint16_t codec_height_ GUARDED_BY(crit_sect_); | 109 uint16_t codec_height_ GUARDED_BY(crit_sect_); |
116 float user_frame_rate_ GUARDED_BY(crit_sect_); | 110 float user_frame_rate_ GUARDED_BY(crit_sect_); |
117 std::unique_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_); | 111 std::unique_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_); |
118 uint8_t fraction_lost_ GUARDED_BY(crit_sect_); | |
119 uint32_t send_statistics_[4] GUARDED_BY(crit_sect_); | 112 uint32_t send_statistics_[4] GUARDED_BY(crit_sect_); |
120 uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_); | 113 uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_); |
121 int32_t max_payload_size_ GUARDED_BY(crit_sect_); | 114 int32_t max_payload_size_ GUARDED_BY(crit_sect_); |
122 int video_target_bitrate_ GUARDED_BY(crit_sect_); | 115 int video_target_bitrate_ GUARDED_BY(crit_sect_); |
123 float incoming_frame_rate_ GUARDED_BY(crit_sect_); | 116 float incoming_frame_rate_ GUARDED_BY(crit_sect_); |
124 int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_); | 117 int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_); |
125 std::list<EncodedFrameSample> encoded_frame_samples_ GUARDED_BY(crit_sect_); | 118 std::list<EncodedFrameSample> encoded_frame_samples_ GUARDED_BY(crit_sect_); |
126 uint32_t avg_sent_bit_rate_bps_ GUARDED_BY(crit_sect_); | 119 uint32_t avg_sent_bit_rate_bps_ GUARDED_BY(crit_sect_); |
127 uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_); | 120 uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_); |
128 int num_layers_ GUARDED_BY(crit_sect_); | 121 int num_layers_ GUARDED_BY(crit_sect_); |
129 }; | 122 }; |
130 } // namespace media_optimization | 123 } // namespace media_optimization |
131 } // namespace webrtc | 124 } // namespace webrtc |
132 | 125 |
133 #endif // WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ | 126 #endif // WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ |
OLD | NEW |