Pass FecControllerOverride to Vp8FrameBufferControllerFactory::Create

Previously, FecControllerOverride was passed to
Vp8FrameBufferController::SetFecControllerOverride. Passing to
the factory is a more elegant way, since it's only used when
the controller is constructed.

TBR=kwiberg@webrtc.org

Bug: webrtc:10769
Change-Id: Iae599889e7ca9003e3200c2911239cbb763ee65a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144380
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28443}
This commit is contained in:
Elad Alon
2019-07-02 11:20:09 +02:00
committed by Commit Bot
parent 14be7993c6
commit 45befc5f1f
20 changed files with 118 additions and 47 deletions

View File

@ -16,6 +16,7 @@
#include "absl/types/optional.h"
#include "api/scoped_refptr.h"
#include "api/test/mock_fec_controller_override.h"
#include "api/video/builtin_video_bitrate_allocator_factory.h"
#include "api/video/video_bitrate_allocation.h"
#include "api/video/video_bitrate_allocator.h"
@ -26,6 +27,7 @@
#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
#include "rtc_base/checks.h"
#include "rtc_base/ref_counted_object.h"
#include "test/gmock.h"
#include "test/gtest.h"
namespace webrtc {
@ -100,7 +102,8 @@ class VideoCodecInitializerTest : public ::testing::Test {
Vp8TemporalLayersFactory factory;
const VideoEncoder::Settings settings(VideoEncoder::Capabilities(false),
1, 1000);
frame_buffer_controller_ = factory.Create(codec_out_, settings);
frame_buffer_controller_ =
factory.Create(codec_out_, settings, &fec_controller_override_);
}
return true;
}
@ -130,6 +133,8 @@ class VideoCodecInitializerTest : public ::testing::Test {
return stream;
}
MockFecControllerOverride fec_controller_override_;
// Input settings.
VideoEncoderConfig config_;
std::vector<VideoStream> streams_;