Support for injection of FEC controller in Scenario tests.

Also adding sync group for video streams.

Bug: webrtc:10365
Change-Id: I9ef92de756f06bbbcd7b67524bbf51fe1365fa85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130508
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27390}
This commit is contained in:
Sebastian Jansson 2019-04-01 13:34:55 +02:00 committed by Commit Bot
parent 1c4547d1f9
commit cc5be54c26
4 changed files with 16 additions and 6 deletions

View File

@ -78,6 +78,7 @@ if (rtc_include_tests) {
"../:test_common",
"../:test_support",
"../:video_test_common",
"../../api:fec_controller_api",
"../../api:libjingle_peerconnection_api",
"../../api:transport_api",
"../../api/audio_codecs:builtin_audio_decoder_factory",

View File

@ -109,7 +109,6 @@ class CallClient : public EmulatedNetworkReceiverInterface {
std::unique_ptr<NetworkNodeTransport> transport_;
std::unique_ptr<RtpHeaderParser> const header_parser_;
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory_;
// Stores the configured overhead per known destination endpoint. This is used
// to subtract the overhead before processing.
std::map<rtc::IPAddress, DataSize> route_overhead_;

View File

@ -14,6 +14,7 @@
#include <string>
#include "absl/types/optional.h"
#include "api/fec_controller.h"
#include "api/rtp_parameters.h"
#include "api/transport/network_control.h"
#include "api/units/data_rate.h"
@ -174,10 +175,12 @@ struct VideoStreamConfig {
TimeDelta nack_history_time = TimeDelta::ms(1000);
bool use_flexfec = false;
bool use_ulpfec = false;
FecControllerFactoryInterface* fec_controller_factory = nullptr;
} stream;
struct Renderer {
struct Rendering {
enum Type { kFake } type = kFake;
};
std::string sync_group;
} render;
struct analyzer {
bool log_to_file = false;
std::function<void(const VideoFrameQualityInfo&)> frame_quality_handler;
@ -221,7 +224,7 @@ struct AudioStreamConfig {
~Stream();
bool in_bandwidth_estimation = false;
} stream;
struct Render {
struct Rendering {
std::string sync_group;
} render;
};

View File

@ -328,6 +328,7 @@ VideoReceiveStream::Config CreateVideoReceiveStreamConfig(
recv.rtp.rtx_associated_payload_types[CallTest::kRtxRedPayloadType] =
CallTest::kRedPayloadType;
}
recv.sync_group = config.render.sync_group;
return recv;
}
} // namespace
@ -386,8 +387,14 @@ SendVideoStream::SendVideoStream(CallClient* sender,
bitrate_allocator_factory_.get();
sender_->SendTask([&] {
send_stream_ = sender_->call_->CreateVideoSendStream(
std::move(send_config), std::move(encoder_config));
if (config.stream.fec_controller_factory) {
send_stream_ = sender_->call_->CreateVideoSendStream(
std::move(send_config), std::move(encoder_config),
config.stream.fec_controller_factory->CreateFecController());
} else {
send_stream_ = sender_->call_->CreateVideoSendStream(
std::move(send_config), std::move(encoder_config));
}
std::vector<std::function<void(const VideoFrameQualityInfo&)> >
frame_info_handlers;
if (config.analyzer.frame_quality_handler)