Update VideoEncoderSoftwareFallbackWrapper to take VideoEncoder as arg

VideoEncoderSoftwareFallbackWrapper is updated to take a VideoEncoder as
argument instead relying on built-in SW codecs. The purpose is to make
VideoEncoderSoftwareFallbackWrapper more modular and not depend on
built-in SW encoders.

Bug: webrtc:7925
Change-Id: I99896f0751cfb77e01efd29c97d3bd07bdb2c7c0
Reviewed-on: https://webrtc-review.googlesource.com/22320
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20671}
This commit is contained in:
Magnus Jedvert
2017-11-13 15:26:17 +01:00
committed by Commit Bot
parent d4f01c1e87
commit ee92d626bd
5 changed files with 67 additions and 92 deletions

View File

@ -382,7 +382,9 @@ void VideoProcessorIntegrationTest::CreateEncoderAndDecoder() {
if (config_.sw_fallback_encoder) {
encoder_ = rtc::MakeUnique<VideoEncoderSoftwareFallbackWrapper>(
codec, std::move(encoder_));
std::unique_ptr<VideoEncoder>(
cricket::InternalEncoderFactory().CreateVideoEncoder(codec)),
std::move(encoder_));
}
if (config_.sw_fallback_decoder) {
decoder_ = rtc::MakeUnique<VideoDecoderSoftwareFallbackWrapper>(