Move creating encoder to VideoStreamEncoder.

This used to be in WebRtcVideoChannel::WebRtcVideoSendStream.
One implication is that encoder is not created until the first
frame arrives, and some of the tests needed updates to emit a
frame or two.

Bug: webrtc:8830
Change-Id: I78169b2bb4dfa4197b4b4229af9fd69d0f747835
Reviewed-on: https://webrtc-review.googlesource.com/64885
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22905}
This commit is contained in:
Niels Möller
2018-04-17 16:09:34 +02:00
committed by Commit Bot
parent a44b91de3e
commit fb82fcc7f9
34 changed files with 698 additions and 305 deletions

View File

@ -19,9 +19,9 @@
#include "modules/audio_device/include/test_audio_device.h"
#include "test/encoder_settings.h"
#include "test/fake_decoder.h"
#include "test/fake_encoder.h"
#include "test/fake_videorenderer.h"
#include "test/frame_generator_capturer.h"
#include "test/function_video_encoder_factory.h"
#include "test/rtp_rtcp_observer.h"
#include "test/single_threaded_task_queue.h"
@ -138,7 +138,8 @@ class CallTest : public ::testing::Test {
std::vector<FlexfecReceiveStream*> flexfec_receive_streams_;
std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
test::FakeEncoder fake_encoder_;
test::FunctionVideoEncoderFactory fake_encoder_factory_;
int fake_encoder_max_bitrate_ = -1;
std::vector<std::unique_ptr<VideoDecoder>> allocated_decoders_;
size_t num_video_streams_;
size_t num_audio_streams_;