Delete deprecated VP8Decoder::Create
Bug: webrtc:15791
Change-Id: Ic198706535da9f299735cd0a7bbf571cda643098
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340461
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41837}
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index eec1e66..58a92d5 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -559,7 +559,6 @@
"../../api:field_trials_view",
"../../api:scoped_refptr",
"../../api/environment",
- "../../api/transport:field_trial_based_config",
"../../api/units:time_delta",
"../../api/units:timestamp",
"../../api/video:encoded_image",
diff --git a/modules/video_coding/codecs/vp8/include/vp8.h b/modules/video_coding/codecs/vp8/include/vp8.h
index b03200a..cb49516 100644
--- a/modules/video_coding/codecs/vp8/include/vp8.h
+++ b/modules/video_coding/codecs/vp8/include/vp8.h
@@ -41,12 +41,6 @@
static std::unique_ptr<VideoEncoder> Create(Settings settings);
};
-// TODO: bugs.webrtc.org/15791 - Delete in favor of the CreateVp8Decoder below.
-class VP8Decoder {
- public:
- [[deprecated]] static std::unique_ptr<VideoDecoder> Create();
-};
-
std::unique_ptr<VideoDecoder> CreateVp8Decoder(const Environment& env);
} // namespace webrtc
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
index 3466080..3eed384 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
@@ -21,7 +21,6 @@
#include "api/environment/environment.h"
#include "api/field_trials_view.h"
#include "api/scoped_refptr.h"
-#include "api/transport/field_trial_based_config.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame.h"
#include "api/video/video_frame_buffer.h"
@@ -87,10 +86,6 @@
} // namespace
-std::unique_ptr<VideoDecoder> VP8Decoder::Create() {
- return std::make_unique<LibvpxVp8Decoder>();
-}
-
std::unique_ptr<VideoDecoder> CreateVp8Decoder(const Environment& env) {
return std::make_unique<LibvpxVp8Decoder>(env);
}
@@ -119,15 +114,10 @@
rtc::ExpFilter smoother_;
};
-LibvpxVp8Decoder::LibvpxVp8Decoder()
- : LibvpxVp8Decoder(FieldTrialBasedConfig()) {}
-
LibvpxVp8Decoder::LibvpxVp8Decoder(const Environment& env)
- : LibvpxVp8Decoder(env.field_trials()) {}
-
-LibvpxVp8Decoder::LibvpxVp8Decoder(const FieldTrialsView& field_trials)
- : use_postproc_(kIsArm ? field_trials.IsEnabled(kVp8PostProcArmFieldTrial)
- : true),
+ : use_postproc_(
+ kIsArm ? env.field_trials().IsEnabled(kVp8PostProcArmFieldTrial)
+ : true),
buffer_pool_(false, 300 /* max_number_of_buffers*/),
decode_complete_callback_(NULL),
inited_(false),
@@ -135,9 +125,9 @@
last_frame_width_(0),
last_frame_height_(0),
key_frame_required_(true),
- deblock_params_(use_postproc_
- ? GetPostProcParamsFromFieldTrialGroup(field_trials)
- : absl::nullopt),
+ deblock_params_(use_postproc_ ? GetPostProcParamsFromFieldTrialGroup(
+ env.field_trials())
+ : absl::nullopt),
qp_smoother_(use_postproc_ ? new QpSmoother() : nullptr) {}
LibvpxVp8Decoder::~LibvpxVp8Decoder() {
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h
index 8ed8e7c..c14a2b7 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h
@@ -28,9 +28,6 @@
class LibvpxVp8Decoder : public VideoDecoder {
public:
- // TODO: bugs.webrtc.org/15791 - Delete default constructor when
- // Environment is always propagated.
- LibvpxVp8Decoder();
explicit LibvpxVp8Decoder(const Environment& env);
~LibvpxVp8Decoder() override;
@@ -61,7 +58,7 @@
private:
class QpSmoother;
- explicit LibvpxVp8Decoder(const FieldTrialsView& field_trials);
+
int ReturnFrame(const vpx_image_t* img,
uint32_t timeStamp,
int qp,