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

Unified Diff: webrtc/video/vie_encoder.h

Issue 2398963003: Move usage of QualityScaler to ViEEncoder. (Closed)
Patch Set: fix videotoolbox overridden QP thresholds Created 4 years, 2 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/video/vie_encoder.h
diff --git a/webrtc/video/vie_encoder.h b/webrtc/video/vie_encoder.h
index 6c77823a7b2285c13129ee5191221d084a7bb14b..ea06be234a0861a2075b5476aa1aa596e9196919 100644
--- a/webrtc/video/vie_encoder.h
+++ b/webrtc/video/vie_encoder.h
@@ -25,6 +25,7 @@
#include "webrtc/media/base/videosinkinterface.h"
#include "webrtc/modules/video_coding/include/video_coding_defines.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h"
+#include "webrtc/modules/video_coding/utility/quality_scaler.h"
#include "webrtc/modules/video_coding/video_coding_impl.h"
#include "webrtc/modules/video_processing/include/video_processing.h"
#include "webrtc/system_wrappers/include/atomic32.h"
@@ -49,7 +50,7 @@ class SendStatisticsProxy;
class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
public EncodedImageCallback,
public VCMSendStatisticsCallback,
- public CpuOveruseObserver {
+ public ScalingInterface {
public:
// Interface for receiving encoded video frames and notifications about
// configuration changes.
@@ -109,14 +110,14 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
int64_t round_trip_time_ms);
protected:
- // Used for testing. For example the |CpuOveruseObserver| methods must be
+ // Used for testing. For example the |ScalingInterface| methods must be
// called on |encoder_queue_|.
rtc::TaskQueue* encoder_queue() { return &encoder_queue_; }
- // webrtc::CpuOveruseObserver implementation.
+ // webrtc::ScalingInterface implementation.
// These methods are protected for easier testing.
- void OveruseDetected() override;
- void NormalUsage() override;
+ void ScaleUp() override;
+ void ScaleDown() override;
private:
class ConfigureEncoderTask;
@@ -174,6 +175,7 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
vcm::VideoSender video_sender_ ACCESS_ON(&encoder_queue_);
bool disable_resolution_scaling_ ACCESS_ON(&encoder_queue_);
OveruseFrameDetector overuse_detector_ ACCESS_ON(&encoder_queue_);
+ QualityScaler quality_scaler_ ACCESS_ON(&encoder_queue_);
SendStatisticsProxy* const stats_proxy_;
rtc::VideoSinkInterface<VideoFrame>* const pre_encode_callback_;

Powered by Google App Engine
This is Rietveld 408576698