aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorErik Språng <sprang@webrtc.org>2018-04-23 12:32:22 +0200
committerCommit Bot <commit-bot@chromium.org>2018-04-23 15:31:27 +0000
commit566124a6df20995484868fdaef524c85e3faa7c5 (patch)
tree98dfcc64895d68b4d165bd1f48a5407a6baee9a2 /test
parent5c14725d53a6bebbdc47fb88f7a1b2191cbe060f (diff)
downloadwebrtc-566124a6df20995484868fdaef524c85e3faa7c5.tar.gz
Move BitrateAllocation to api/ and rename it VideoBitrateAllocation
Since the webrtc_common build target does not have visibility set, we cannot easily use BitrateAllocation in other parts of Chromium. This is currently blocking parts of chromium:794608, and I know of other usage outside webrtc already, so moving it to api/ should be warranted. Also, since there's some naming confusion and this class is video specific rename it VideoBitrateAllocation. This also fits with the standard interface for producing these: VideoBitrateAllocator. Bug: chromium:794608 Change-Id: I4c0fae40f9365e860c605a76a4f67ecc9b9cf9fe Reviewed-on: https://webrtc-review.googlesource.com/70783 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22986}
Diffstat (limited to 'test')
-rw-r--r--test/configurable_frame_size_encoder.cc2
-rw-r--r--test/configurable_frame_size_encoder.h2
-rw-r--r--test/encoder_proxy_factory.h2
-rw-r--r--test/fake_encoder.cc5
-rw-r--r--test/fake_encoder.h4
5 files changed, 8 insertions, 7 deletions
diff --git a/test/configurable_frame_size_encoder.cc b/test/configurable_frame_size_encoder.cc
index f09be533af..107c4cb498 100644
--- a/test/configurable_frame_size_encoder.cc
+++ b/test/configurable_frame_size_encoder.cc
@@ -74,7 +74,7 @@ int32_t ConfigurableFrameSizeEncoder::SetChannelParameters(uint32_t packet_loss,
}
int32_t ConfigurableFrameSizeEncoder::SetRateAllocation(
- const BitrateAllocation& allocation,
+ const VideoBitrateAllocation& allocation,
uint32_t framerate) {
return WEBRTC_VIDEO_CODEC_OK;
}
diff --git a/test/configurable_frame_size_encoder.h b/test/configurable_frame_size_encoder.h
index f3733c8369..b8c3b830d4 100644
--- a/test/configurable_frame_size_encoder.h
+++ b/test/configurable_frame_size_encoder.h
@@ -39,7 +39,7 @@ class ConfigurableFrameSizeEncoder : public VideoEncoder {
int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
- int32_t SetRateAllocation(const BitrateAllocation& allocation,
+ int32_t SetRateAllocation(const VideoBitrateAllocation& allocation,
uint32_t framerate) override;
int32_t SetFrameSize(size_t size);
diff --git a/test/encoder_proxy_factory.h b/test/encoder_proxy_factory.h
index 9c7ff0c652..2982010711 100644
--- a/test/encoder_proxy_factory.h
+++ b/test/encoder_proxy_factory.h
@@ -82,7 +82,7 @@ class EncoderProxyFactory final : public VideoEncoderFactory {
int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override {
return encoder_->SetChannelParameters(packet_loss, rtt);
}
- int32_t SetRateAllocation(const BitrateAllocation& rate_allocation,
+ int32_t SetRateAllocation(const VideoBitrateAllocation& rate_allocation,
uint32_t framerate) override {
return encoder_->SetRateAllocation(rate_allocation, framerate);
}
diff --git a/test/fake_encoder.cc b/test/fake_encoder.cc
index a7dbbd9048..c8d13cb6bc 100644
--- a/test/fake_encoder.cc
+++ b/test/fake_encoder.cc
@@ -178,8 +178,9 @@ int32_t FakeEncoder::SetChannelParameters(uint32_t packet_loss, int64_t rtt) {
return 0;
}
-int32_t FakeEncoder::SetRateAllocation(const BitrateAllocation& rate_allocation,
- uint32_t framerate) {
+int32_t FakeEncoder::SetRateAllocation(
+ const VideoBitrateAllocation& rate_allocation,
+ uint32_t framerate) {
rtc::CritScope cs(&crit_sect_);
target_bitrate_ = rate_allocation;
configured_input_framerate_ = framerate;
diff --git a/test/fake_encoder.h b/test/fake_encoder.h
index f6ed2899e0..2700f3d6f1 100644
--- a/test/fake_encoder.h
+++ b/test/fake_encoder.h
@@ -42,7 +42,7 @@ class FakeEncoder : public VideoEncoder {
EncodedImageCallback* callback) override;
int32_t Release() override;
int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
- int32_t SetRateAllocation(const BitrateAllocation& rate_allocation,
+ int32_t SetRateAllocation(const VideoBitrateAllocation& rate_allocation,
uint32_t framerate) override;
const char* ImplementationName() const override;
int GetConfiguredInputFramerate() const;
@@ -53,7 +53,7 @@ class FakeEncoder : public VideoEncoder {
Clock* const clock_;
VideoCodec config_ RTC_GUARDED_BY(crit_sect_);
EncodedImageCallback* callback_ RTC_GUARDED_BY(crit_sect_);
- BitrateAllocation target_bitrate_ RTC_GUARDED_BY(crit_sect_);
+ VideoBitrateAllocation target_bitrate_ RTC_GUARDED_BY(crit_sect_);
int configured_input_framerate_ RTC_GUARDED_BY(crit_sect_);
int max_target_bitrate_kbps_ RTC_GUARDED_BY(crit_sect_);
bool pending_keyframe_ RTC_GUARDED_BY(crit_sect_);