Delete support for custom VP8 frame buffer controller as unused

Bug: None
Change-Id: Ie7970eeb25f87cd0621aab0c076867a9d631fb06
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346500
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42047}
diff --git a/modules/video_coding/codecs/vp8/include/vp8.h b/modules/video_coding/codecs/vp8/include/vp8.h
index 625e5ac..e86d758 100644
--- a/modules/video_coding/codecs/vp8/include/vp8.h
+++ b/modules/video_coding/codecs/vp8/include/vp8.h
@@ -17,18 +17,11 @@
 #include "absl/base/nullability.h"
 #include "api/environment/environment.h"
 #include "api/video_codecs/video_encoder.h"
-#include "api/video_codecs/vp8_frame_buffer_controller.h"
 #include "modules/video_coding/include/video_codec_interface.h"
 
 namespace webrtc {
 
 struct Vp8EncoderSettings {
-  // Allows for overriding the Vp8FrameBufferController used by the encoder.
-  // If unset, a default Vp8FrameBufferController will be instantiated
-  // internally.
-  absl::Nullable<std::unique_ptr<Vp8FrameBufferControllerFactory>>
-      frame_buffer_controller_factory;
-
   // Allows for overriding the resolution/bitrate limits exposed through
   // VideoEncoder::GetEncoderInfo(). No override is done if empty.
   std::vector<VideoEncoder::ResolutionBitrateLimits> resolution_bitrate_limits;
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
index a6befaf..3af0bdf 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
@@ -314,8 +314,6 @@
                                    VP8Encoder::Settings settings)
     : libvpx_(std::move(interface)),
       rate_control_settings_(RateControlSettings::ParseFromFieldTrials()),
-      frame_buffer_controller_factory_(
-          std::move(settings.frame_buffer_controller_factory)),
       resolution_bitrate_limits_(std::move(settings.resolution_bitrate_limits)),
       key_frame_request_(kMaxSimulcastStreams, false),
       last_encoder_output_time_(kMaxSimulcastStreams,
@@ -537,14 +535,9 @@
   }
 
   RTC_DCHECK(!frame_buffer_controller_);
-  if (frame_buffer_controller_factory_) {
-    frame_buffer_controller_ = frame_buffer_controller_factory_->Create(
-        *inst, settings, fec_controller_override_);
-  } else {
-    Vp8TemporalLayersFactory factory;
-    frame_buffer_controller_ =
-        factory.Create(*inst, settings, fec_controller_override_);
-  }
+  Vp8TemporalLayersFactory factory;
+  frame_buffer_controller_ =
+      factory.Create(*inst, settings, fec_controller_override_);
   RTC_DCHECK(frame_buffer_controller_);
 
   number_of_cores_ = settings.number_of_cores;
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h
index 3d9dca7..989ce5e 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h
@@ -129,8 +129,6 @@
   int number_of_cores_ = 0;
   uint32_t rc_max_intra_target_ = 0;
   int num_active_streams_ = 0;
-  const std::unique_ptr<Vp8FrameBufferControllerFactory>
-      frame_buffer_controller_factory_;
   std::unique_ptr<Vp8FrameBufferController> frame_buffer_controller_;
   const std::vector<VideoEncoder::ResolutionBitrateLimits>
       resolution_bitrate_limits_;