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

Side by Side Diff: webrtc/video/full_stack.cc

Issue 1273363005: Add send transports to individual webrtc::Call streams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase+comment Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/loopback.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 const rtc::scoped_ptr<EventWrapper> done_; 485 const rtc::scoped_ptr<EventWrapper> done_;
486 }; 486 };
487 487
488 void FullStackTest::RunTest(const FullStackTestParams& params) { 488 void FullStackTest::RunTest(const FullStackTestParams& params) {
489 test::DirectTransport send_transport(params.link); 489 test::DirectTransport send_transport(params.link);
490 test::DirectTransport recv_transport(params.link); 490 test::DirectTransport recv_transport(params.link);
491 VideoAnalyzer analyzer(nullptr, &send_transport, params.test_label, 491 VideoAnalyzer analyzer(nullptr, &send_transport, params.test_label,
492 params.avg_psnr_threshold, params.avg_ssim_threshold, 492 params.avg_psnr_threshold, params.avg_ssim_threshold,
493 params.test_durations_secs * params.clip.fps); 493 params.test_durations_secs * params.clip.fps);
494 494
495 CreateCalls(Call::Config(&analyzer), Call::Config(&recv_transport)); 495 CreateCalls(Call::Config(), Call::Config());
496 496
497 analyzer.SetReceiver(receiver_call_->Receiver()); 497 analyzer.SetReceiver(receiver_call_->Receiver());
498 send_transport.SetReceiver(&analyzer); 498 send_transport.SetReceiver(&analyzer);
499 recv_transport.SetReceiver(sender_call_->Receiver()); 499 recv_transport.SetReceiver(sender_call_->Receiver());
500 500
501 CreateSendConfig(1); 501 CreateSendConfig(1, &analyzer);
502 502
503 rtc::scoped_ptr<VideoEncoder> encoder; 503 rtc::scoped_ptr<VideoEncoder> encoder;
504 if (params.codec == "VP8") { 504 if (params.codec == "VP8") {
505 encoder = 505 encoder =
506 rtc::scoped_ptr<VideoEncoder>(VideoEncoder::Create(VideoEncoder::kVp8)); 506 rtc::scoped_ptr<VideoEncoder>(VideoEncoder::Create(VideoEncoder::kVp8));
507 send_config_.encoder_settings.encoder = encoder.get(); 507 send_config_.encoder_settings.encoder = encoder.get();
508 send_config_.encoder_settings.payload_name = "VP8"; 508 send_config_.encoder_settings.payload_name = "VP8";
509 } else if (params.codec == "VP9") { 509 } else if (params.codec == "VP9") {
510 encoder = 510 encoder =
511 rtc::scoped_ptr<VideoEncoder>(VideoEncoder::Create(VideoEncoder::kVp9)); 511 rtc::scoped_ptr<VideoEncoder>(VideoEncoder::Create(VideoEncoder::kVp9));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 vp9_settings.denoisingOn = false; 545 vp9_settings.denoisingOn = false;
546 vp9_settings.frameDroppingOn = false; 546 vp9_settings.frameDroppingOn = false;
547 vp9_settings.numberOfTemporalLayers = 2; 547 vp9_settings.numberOfTemporalLayers = 2;
548 encoder_config_.encoder_specific_settings = &vp9_settings; 548 encoder_config_.encoder_specific_settings = &vp9_settings;
549 } 549 }
550 550
551 stream->temporal_layer_thresholds_bps.clear(); 551 stream->temporal_layer_thresholds_bps.clear();
552 stream->temporal_layer_thresholds_bps.push_back(stream->target_bitrate_bps); 552 stream->temporal_layer_thresholds_bps.push_back(stream->target_bitrate_bps);
553 } 553 }
554 554
555 CreateMatchingReceiveConfigs(); 555 CreateMatchingReceiveConfigs(&recv_transport);
556 receive_configs_[0].renderer = &analyzer; 556 receive_configs_[0].renderer = &analyzer;
557 receive_configs_[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 557 receive_configs_[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
558 receive_configs_[0].rtp.rtx[kSendRtxPayloadType].ssrc = kSendRtxSsrcs[0]; 558 receive_configs_[0].rtp.rtx[kSendRtxPayloadType].ssrc = kSendRtxSsrcs[0];
559 receive_configs_[0].rtp.rtx[kSendRtxPayloadType].payload_type = 559 receive_configs_[0].rtp.rtx[kSendRtxPayloadType].payload_type =
560 kSendRtxPayloadType; 560 kSendRtxPayloadType;
561 561
562 for (auto& config : receive_configs_) 562 for (auto& config : receive_configs_)
563 config.pre_decode_callback = &analyzer; 563 config.pre_decode_callback = &analyzer;
564 CreateStreams(); 564 CreateStreams();
565 analyzer.input_ = send_stream_->Input(); 565 analyzer.input_ = send_stream_->Input();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 50000, 762 50000,
763 200000, 763 200000,
764 2000000, 764 2000000,
765 0.0, 765 0.0,
766 0.0, 766 0.0,
767 kFullStackTestDurationSecs, 767 kFullStackTestDurationSecs,
768 "VP9"}; 768 "VP9"};
769 RunTest(screenshare_params); 769 RunTest(screenshare_params);
770 } 770 }
771 } // namespace webrtc 771 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/loopback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698