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

Unified Diff: webrtc/api/video_codecs/video_encoder.h

Issue 2993923002: Removing VCMCodecDataBase::Codec and VideoCodingModule::Codec. (Closed)
Patch Set: Remove deprate - let sprang handle when method is removed 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
« no previous file with comments | « webrtc/api/video_codecs/BUILD.gn ('k') | webrtc/api/video_codecs/video_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/video_codecs/video_encoder.h
diff --git a/webrtc/api/video_codecs/video_encoder.h b/webrtc/api/video_codecs/video_encoder.h
index 2e392763459cfefb6e3fa79499c563cc23ff995b..0f21cae13a767dd54ae5ade8c272dbf3dad89564 100644
--- a/webrtc/api/video_codecs/video_encoder.h
+++ b/webrtc/api/video_codecs/video_encoder.h
@@ -41,7 +41,7 @@ class EncodedImageCallback {
ERROR_SEND_FAILED,
};
- Result(Error error) : error(error) {}
+ explicit Result(Error error) : error(error) {}
Result(Error error, uint32_t frame_id) : error(error), frame_id(frame_id) {}
Error error;
@@ -74,10 +74,11 @@ class VideoEncoder {
int high;
};
struct ScalingSettings {
- ScalingSettings(bool on, int low, int high)
- : enabled(on),
- thresholds(rtc::Optional<QpThresholds>(QpThresholds(low, high))) {}
- explicit ScalingSettings(bool on) : enabled(on) {}
+ ScalingSettings(bool on, int low, int high);
+ explicit ScalingSettings(bool on);
+ ScalingSettings(const ScalingSettings&);
+ ~ScalingSettings();
+
const bool enabled;
const rtc::Optional<QpThresholds> thresholds;
};
@@ -155,28 +156,20 @@ class VideoEncoder {
// - framerate : The target frame rate
//
// Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
- virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) {
- RTC_NOTREACHED() << "SetRate(uint32_t, uint32_t) is deprecated.";
- return -1;
- }
+ virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate);
// Default fallback: Just use the sum of bitrates as the single target rate.
// TODO(sprang): Remove this default implementation when we remove SetRates().
virtual int32_t SetRateAllocation(const BitrateAllocation& allocation,
- uint32_t framerate) {
- return SetRates(allocation.get_sum_kbps(), framerate);
- }
+ uint32_t framerate);
// Any encoder implementation wishing to use the WebRTC provided
// quality scaler must implement this method.
- virtual ScalingSettings GetScalingSettings() const {
- return ScalingSettings(false);
- }
+ virtual ScalingSettings GetScalingSettings() const;
- virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; }
- virtual bool SupportsNativeHandle() const { return false; }
- virtual const char* ImplementationName() const { return "unknown"; }
+ virtual int32_t SetPeriodicKeyFrames(bool enable);
+ virtual bool SupportsNativeHandle() const;
+ virtual const char* ImplementationName() const;
};
-
} // namespace webrtc
#endif // WEBRTC_API_VIDEO_CODECS_VIDEO_ENCODER_H_
« no previous file with comments | « webrtc/api/video_codecs/BUILD.gn ('k') | webrtc/api/video_codecs/video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698