Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: webrtc/media/engine/videoencodersoftwarefallbackwrapper.h

Issue 3000693003: Move kMinPixelsPerFrame constant in VideoStreamEncoder to VideoEncoder::ScalingSettings. (Closed)
Patch Set: rebase Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/media/engine/videoencodersoftwarefallbackwrapper.h
diff --git a/webrtc/media/engine/videoencodersoftwarefallbackwrapper.h b/webrtc/media/engine/videoencodersoftwarefallbackwrapper.h
index ea7e13d353ba3846ae669b35e413f617bda8f78c..d11a0f678e1c1346138b9fbda9ba8c7122340766 100644
--- a/webrtc/media/engine/videoencodersoftwarefallbackwrapper.h
+++ b/webrtc/media/engine/videoencodersoftwarefallbackwrapper.h
@@ -52,22 +52,24 @@ class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder {
// If |forced_fallback_possible_| is true:
// The forced fallback is requested if the target bitrate is below |low_kbps|
// for more than |min_low_ms| and the input video resolution is not larger
- // than |kMaxPixels|.
- // If the bitrate is above |high_kbps|, the forced fallback is requested to
- // immediately be stopped.
+ // than |kMaxPixelsStart|.
+ // If the bitrate is above |high_kbps| and the resolution is not smaller than
+ // |kMinPixelsStop|, the forced fallback is requested to immediately be
+ // stopped.
class ForcedFallbackParams {
public:
bool ShouldStart(uint32_t bitrate_kbps, const VideoCodec& codec);
- bool ShouldStop(uint32_t bitrate_kbps) const;
+ bool ShouldStop(uint32_t bitrate_kbps, const VideoCodec& codec) const;
void Reset() { start_ms.reset(); }
bool IsValid(const VideoCodec& codec) const {
- return codec.width * codec.height <= kMaxPixels;
+ return codec.width * codec.height <= kMaxPixelsStart;
}
rtc::Optional<int64_t> start_ms; // Set when bitrate is below |low_kbps|.
uint32_t low_kbps = 100;
uint32_t high_kbps = 150;
int64_t min_low_ms = 10000;
- const int kMaxPixels = 320 * 240;
+ const int kMaxPixelsStart = 320 * 240;
+ const int kMinPixelsStop = 320 * 180;
};
bool RequestForcedFallback();
« no previous file with comments | « webrtc/api/video_codecs/video_encoder.cc ('k') | webrtc/media/engine/videoencodersoftwarefallbackwrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698