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}
This commit is contained in:
Danil Chapovalov 2024-02-23 14:57:50 +01:00 committed by WebRTC LUCI CQ
parent 95977d8a6a
commit b9ce3b79fc
4 changed files with 7 additions and 27 deletions

View File

@ -559,7 +559,6 @@ rtc_library("webrtc_vp8") {
"../../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",

View File

@ -41,12 +41,6 @@ class VP8Encoder {
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

View File

@ -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 @@ GetPostProcParamsFromFieldTrialGroup(const FieldTrialsView& field_trials) {
} // 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 @@ class LibvpxVp8Decoder::QpSmoother {
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 @@ LibvpxVp8Decoder::LibvpxVp8Decoder(const FieldTrialsView& field_trials)
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() {

View File

@ -28,9 +28,6 @@ namespace webrtc {
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 @@ class LibvpxVp8Decoder : public VideoDecoder {
private:
class QpSmoother;
explicit LibvpxVp8Decoder(const FieldTrialsView& field_trials);
int ReturnFrame(const vpx_image_t* img,
uint32_t timeStamp,
int qp,