OLD | NEW |
1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
2 * | 2 * |
3 * Use of this source code is governed by a BSD-style license | 3 * Use of this source code is governed by a BSD-style license |
4 * that can be found in the LICENSE file in the root of the source | 4 * that can be found in the LICENSE file in the root of the source |
5 * tree. An additional intellectual property rights grant can be found | 5 * tree. An additional intellectual property rights grant can be found |
6 * in the file PATENTS. All contributing project authors may | 6 * in the file PATENTS. All contributing project authors may |
7 * be found in the AUTHORS file in the root of the source tree. | 7 * be found in the AUTHORS file in the root of the source tree. |
8 */ | 8 */ |
9 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ | 9 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ |
10 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ | 10 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ |
11 | 11 |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
| 14 #include "webrtc/base/rate_statistics.h" |
14 #include "webrtc/base/timeutils.h" | 15 #include "webrtc/base/timeutils.h" |
15 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" | 16 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" |
16 #include "webrtc/modules/video_coding/utility/frame_dropper.h" | 17 #include "webrtc/modules/video_coding/utility/frame_dropper.h" |
17 #include "webrtc/typedefs.h" | 18 #include "webrtc/typedefs.h" |
18 | 19 |
19 namespace webrtc { | 20 namespace webrtc { |
20 | 21 |
21 struct CodecSpecificInfoVP8; | 22 struct CodecSpecificInfoVP8; |
22 class Clock; | 23 class Clock; |
23 | 24 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 bool last_base_layer_sync_; | 68 bool last_base_layer_sync_; |
68 uint8_t tl0_pic_idx_; | 69 uint8_t tl0_pic_idx_; |
69 int active_layer_; | 70 int active_layer_; |
70 int64_t last_timestamp_; | 71 int64_t last_timestamp_; |
71 int64_t last_sync_timestamp_; | 72 int64_t last_sync_timestamp_; |
72 int64_t last_emitted_tl0_timestamp_; | 73 int64_t last_emitted_tl0_timestamp_; |
73 rtc::TimestampWrapAroundHandler time_wrap_handler_; | 74 rtc::TimestampWrapAroundHandler time_wrap_handler_; |
74 int min_qp_; | 75 int min_qp_; |
75 int max_qp_; | 76 int max_qp_; |
76 uint32_t max_debt_bytes_; | 77 uint32_t max_debt_bytes_; |
77 int framerate_; | 78 |
| 79 // Configured max framerate. |
| 80 rtc::Optional<uint32_t> target_framerate_; |
| 81 // Incoming framerate from capturer. |
| 82 rtc::Optional<uint32_t> incoming_framerate_; |
| 83 // Tracks what framerate we actually encode, and drops frames on overshoot. |
| 84 RateStatistics encode_framerate_; |
78 bool bitrate_updated_; | 85 bool bitrate_updated_; |
79 | 86 |
80 static const int kMaxNumTemporalLayers = 2; | 87 static const int kMaxNumTemporalLayers = 2; |
81 struct TemporalLayer { | 88 struct TemporalLayer { |
82 TemporalLayer() | 89 TemporalLayer() |
83 : state(State::kNormal), | 90 : state(State::kNormal), |
84 enhanced_max_qp(-1), | 91 enhanced_max_qp(-1), |
85 last_qp(-1), | 92 last_qp(-1), |
86 debt_bytes_(0), | 93 debt_bytes_(0), |
87 target_rate_kbps_(0) {} | 94 target_rate_kbps_(0) {} |
(...skipping 23 matching lines...) Expand all Loading... |
111 int64_t num_overshoots_ = 0; | 118 int64_t num_overshoots_ = 0; |
112 int64_t tl0_qp_sum_ = 0; | 119 int64_t tl0_qp_sum_ = 0; |
113 int64_t tl1_qp_sum_ = 0; | 120 int64_t tl1_qp_sum_ = 0; |
114 int64_t tl0_target_bitrate_sum_ = 0; | 121 int64_t tl0_target_bitrate_sum_ = 0; |
115 int64_t tl1_target_bitrate_sum_ = 0; | 122 int64_t tl1_target_bitrate_sum_ = 0; |
116 } stats_; | 123 } stats_; |
117 }; | 124 }; |
118 } // namespace webrtc | 125 } // namespace webrtc |
119 | 126 |
120 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ | 127 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ |
OLD | NEW |