Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: webrtc/video/video_quality_test.cc

Issue 2794243002: Making FakeNetworkPipe demux audio and video packets. (Closed)
Patch Set: further fixing Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« webrtc/video/video_quality_test.h ('K') | « webrtc/video/video_quality_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_quality_test.cc
diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc
index 3fa07db7fdbcc3f5a3ce60193b019daeb5229ddf..c5a267bd385da03bda2824dd0179a39ddc408f0c 100644
--- a/webrtc/video/video_quality_test.cc
+++ b/webrtc/video/video_quality_test.cc
@@ -1724,6 +1724,7 @@ void VideoQualityTest::SetupAudio(int send_channel_id,
audio_config.rtp.transport_cc = params_.call.send_side_bwe;
audio_config.rtp.extensions = audio_send_config_.rtp.extensions;
audio_config.decoder_factory = decoder_factory_;
+ audio_config.decoder_map = {{120, {"opus", 48000, 2}}};
if (params_.video.enabled && params_.audio.sync_video)
audio_config.sync_group = kSyncGroup;
@@ -1751,15 +1752,20 @@ void VideoQualityTest::RunWithRenderers(const Params& params) {
std::unique_ptr<Call> call(Call::Create(call_config));
- // TODO(minyue): consider if this is a good transport even for audio only
- // calls.
- test::LayerFilteringTransport transport(
+ test::LayerFilteringTransport video_transport(
params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9,
params.video.selected_tl, params_.ss.selected_sl);
+ MediaTypePacketReceiver video_receiver(call->Receiver(), MediaType::VIDEO);
+
// TODO(ivica): Use two calls to be able to merge with RunWithAnalyzer or at
// least share as much code as possible. That way this test would also match
// the full stack tests better.
- transport.SetReceiver(call->Receiver());
+ video_transport.SetReceiver(&video_receiver);
+
+ test::DirectTransport audio_transport(params.pipe, call.get(),
+ MediaType::AUDIO);
+ MediaTypePacketReceiver audio_receiver(call->Receiver(), MediaType::AUDIO);
nisse-webrtc 2017/04/04 09:57:27 If it's ok to use two separate transports in this
stefan-webrtc 2017/04/05 08:52:17 Let's not introduce an additional transport. We wa
+ audio_transport.SetReceiver(&audio_receiver);
VideoReceiveStream* video_receive_stream = nullptr;
FlexfecReceiveStream* flexfec_receive_stream = nullptr;
@@ -1782,7 +1788,7 @@ void VideoQualityTest::RunWithRenderers(const Params& params) {
title.c_str(), params_.ss.streams[stream_id].width,
params_.ss.streams[stream_id].height));
- SetupVideo(&transport, &transport);
+ SetupVideo(&video_transport, &video_transport);
video_send_config_.pre_encode_callback = local_preview.get();
video_receive_configs_[stream_id].renderer = loopback_video.get();
if (params_.audio.enabled && params_.audio.sync_video)
@@ -1808,7 +1814,7 @@ void VideoQualityTest::RunWithRenderers(const Params& params) {
AudioReceiveStream* audio_receive_stream = nullptr;
if (params_.audio.enabled) {
SetupAudio(voe.send_channel_id, voe.receive_channel_id, call.get(),
- &transport, &audio_receive_stream);
+ &audio_transport, &audio_receive_stream);
}
StartEncodedFrameLogs(video_receive_stream);
@@ -1860,7 +1866,8 @@ void VideoQualityTest::RunWithRenderers(const Params& params) {
call->DestroyVideoSendStream(video_send_stream_);
}
- transport.StopSending();
+ audio_transport.StopSending();
+ video_transport.StopSending();
if (params_.audio.enabled)
DestroyVoiceEngine(&voe);
}
« webrtc/video/video_quality_test.h ('K') | « webrtc/video/video_quality_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698