Use the factory instead of using the builtin code path in VideoCodecInitializer.

Bug: webrtc:9513
Change-Id: Ia299ae1044a3ff4c91e208200938cba540bdcea6
Reviewed-on: https://webrtc-review.googlesource.com/c/94782
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25456}
This commit is contained in:
Jiawei Ou
2018-10-10 01:16:20 -07:00
committed by Commit Bot
parent 838643550f
commit be142178aa
57 changed files with 389 additions and 137 deletions

View File

@ -14,6 +14,7 @@
#include <limits>
#include <utility>
#include "api/video/builtin_video_bitrate_allocator_factory.h"
#include "api/video/i420_buffer.h"
#include "common_types.h" // NOLINT(build/include)
#include "common_video/h264/h264_common.h"
@ -173,8 +174,9 @@ VideoProcessor::VideoProcessor(webrtc::VideoEncoder* encoder,
stats_(stats),
encoder_(encoder),
decoders_(decoders),
bitrate_allocator_(VideoCodecInitializer::CreateBitrateAllocator(
config_.codec_settings)),
bitrate_allocator_(
CreateBuiltinVideoBitrateAllocatorFactory()
->CreateVideoBitrateAllocator(config_.codec_settings)),
framerate_fps_(0),
encode_callback_(this),
input_frame_reader_(input_frame_reader),