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

Unified Diff: webrtc/video_encoder.h

Issue 2489843002: Revert of Extract bitrate allocation of spatial/temporal layers out of codec impl. (Closed)
Patch Set: Created 4 years, 1 month 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/video/vie_encoder_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_encoder.h
diff --git a/webrtc/video_encoder.h b/webrtc/video_encoder.h
index 2dc8334d625144806d589fd11294c36ec53e1ce5..8bfa72fe1ef47e83ec38961ef5f01e4dbb7b0edf 100644
--- a/webrtc/video_encoder.h
+++ b/webrtc/video_encoder.h
@@ -15,7 +15,6 @@
#include <string>
#include <vector>
-#include "webrtc/base/checks.h"
#include "webrtc/common_types.h"
#include "webrtc/typedefs.h"
#include "webrtc/video_frame.h"
@@ -149,17 +148,7 @@
// - 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;
- }
-
- // 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);
- }
+ virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) = 0;
virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; }
virtual void OnDroppedFrame() {}
@@ -187,8 +176,8 @@
const CodecSpecificInfo* codec_specific_info,
const std::vector<FrameType>* frame_types) override;
int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
- int32_t SetRateAllocation(const BitrateAllocation& bitrate_allocation,
- uint32_t framerate) override;
+
+ int32_t SetRates(uint32_t bitrate, uint32_t framerate) override;
void OnDroppedFrame() override;
bool SupportsNativeHandle() const override;
@@ -203,7 +192,7 @@
// The last bitrate/framerate set, and a flag for noting they are set.
bool rates_set_;
- BitrateAllocation bitrate_allocation_;
+ uint32_t bitrate_;
uint32_t framerate_;
// The last channel parameters set, and a flag for noting they are set.
« no previous file with comments | « webrtc/video/vie_encoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698