Chromium Code Reviews| Index: webrtc/video/vie_encoder.h |
| diff --git a/webrtc/video/vie_encoder.h b/webrtc/video/vie_encoder.h |
| index c0b80baadd6e948c918b8f75fb704b5b77b4e2b4..b6674e11b62c1d9a04a069aed75f54c2eb81b357 100644 |
| --- a/webrtc/video/vie_encoder.h |
| +++ b/webrtc/video/vie_encoder.h |
| @@ -11,6 +11,7 @@ |
| #ifndef WEBRTC_VIDEO_VIE_ENCODER_H_ |
| #define WEBRTC_VIDEO_VIE_ENCODER_H_ |
| +#include <map> |
| #include <memory> |
| #include <string> |
| #include <vector> |
| @@ -216,8 +217,10 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>, |
| uint64_t picture_id_rpsi_ ACCESS_ON(&encoder_queue_); |
| Clock* const clock_; |
| // Counters used for deciding if the video resolution is currently |
| - // restricted, and if so, why. |
| - std::vector<int> scale_counter_ ACCESS_ON(&encoder_queue_); |
| + // restricted, and if so, why, on a per degradation preference basis. |
| + // TODO(sprang): Replace this with a state holding a relative overuse measure |
| + // instead, that can be translated into suitable down-scale or fps limit. |
| + std::map<size_t, std::vector<int>> scale_counter_ ACCESS_ON(&encoder_queue_); |
|
kthelgason
2017/02/27 14:02:39
Why not have this a map from DegradationPreference
sprang_webrtc
2017/02/28 08:46:28
Hm, when I tried this I kept getting giant obscure
|
| // Set depending on degradation preferences |
| VideoSendStream::DegradationPreference degradation_preference_ |
| ACCESS_ON(&encoder_queue_); |
| @@ -225,6 +228,8 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>, |
| struct AdaptationRequest { |
| // The pixel count produced by the source at the time of the adaptation. |
| int input_pixel_count_; |
| + // Framerate received from the source at the time of the adaptation. |
| + int framerate_fps_; |
| // Indicates if request was to adapt up or down. |
| enum class Mode { kAdaptUp, kAdaptDown } mode_; |
| }; |