Index: webrtc/video_encoder.h |
diff --git a/webrtc/video_encoder.h b/webrtc/video_encoder.h |
index 8bfa72fe1ef47e83ec38961ef5f01e4dbb7b0edf..ad8e0440fd4e39b7397dd5ad3a3800d4ab3e5d71 100644 |
--- a/webrtc/video_encoder.h |
+++ b/webrtc/video_encoder.h |
@@ -18,6 +18,8 @@ |
#include "webrtc/common_types.h" |
#include "webrtc/typedefs.h" |
#include "webrtc/video_frame.h" |
+#include "webrtc/base/optional.h" |
+#include "webrtc/modules/video_coding/utility/quality_scaler.h" |
namespace webrtc { |
@@ -68,7 +70,6 @@ class VideoEncoder { |
kVp9, |
kUnsupportedCodec, |
}; |
- |
static VideoEncoder* Create(EncoderType codec_type); |
// Returns true if this type of encoder can be created using |
// VideoEncoder::Create. |
@@ -150,6 +151,12 @@ class VideoEncoder { |
// Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. |
virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) = 0; |
+ // Any encoder implementation wishing to use the WebRTC provided |
+ // quality scaler must implement this method. |
+ virtual QualityScaler::Settings GetQPThresholds() const { |
+ return QualityScaler::Settings(false); |
+ } |
+ |
virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; } |
virtual void OnDroppedFrame() {} |
virtual bool SupportsNativeHandle() const { return false; } |
@@ -180,6 +187,7 @@ class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder { |
int32_t SetRates(uint32_t bitrate, uint32_t framerate) override; |
void OnDroppedFrame() override; |
bool SupportsNativeHandle() const override; |
+ QualityScaler::Settings GetQPThresholds() const override; |
private: |
bool InitFallbackEncoder(); |