Index: webrtc/video_encoder.h |
diff --git a/webrtc/video_encoder.h b/webrtc/video_encoder.h |
index 9bfec55eb7ddc48659b0063ebc13fa3c4f49c7bb..4030c513fe51910296066386fad898b43576848e 100644 |
--- a/webrtc/video_encoder.h |
+++ b/webrtc/video_encoder.h |
@@ -18,6 +18,7 @@ |
#include "webrtc/common_types.h" |
#include "webrtc/typedefs.h" |
#include "webrtc/video_frame.h" |
+#include "webrtc/base/optional.h" |
namespace webrtc { |
@@ -81,6 +82,7 @@ class VideoEncoder { |
kVp9, |
kUnsupportedCodec, |
}; |
+ typedef std::pair<int, int> QPThresholds; |
magjed_webrtc
2016/10/07 12:02:54
I think it would be better to make this a real cla
|
static VideoEncoder* Create(EncoderType codec_type); |
@@ -159,6 +161,12 @@ class VideoEncoder { |
// Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. |
virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) = 0; |
+ // If a specific set of thresholds are desired for quality scaling |
+ // an encoder implementation can override this method. |
+ virtual rtc::Optional<QPThresholds> GetQPThresholds() { |
+ return rtc::Optional<QPThresholds>(); |
+ } |
+ |
virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; } |
virtual void OnDroppedFrame() {} |
virtual bool SupportsNativeHandle() const { return false; } |