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

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

Issue 1369263002: Unify Transport and newapi::Transport interfaces. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: self-review Created 5 years, 2 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/video_quality_test.h ('k') | webrtc/video_receive_stream.h » ('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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 21 matching lines...) Expand all
32 32
33 namespace webrtc { 33 namespace webrtc {
34 34
35 static const int kTransportSeqExtensionId = 35 static const int kTransportSeqExtensionId =
36 VideoQualityTest::kAbsSendTimeExtensionId + 1; 36 VideoQualityTest::kAbsSendTimeExtensionId + 1;
37 static const int kSendStatsPollingIntervalMs = 1000; 37 static const int kSendStatsPollingIntervalMs = 1000;
38 static const int kPayloadTypeVP8 = 123; 38 static const int kPayloadTypeVP8 = 123;
39 static const int kPayloadTypeVP9 = 124; 39 static const int kPayloadTypeVP9 = 124;
40 40
41 class VideoAnalyzer : public PacketReceiver, 41 class VideoAnalyzer : public PacketReceiver,
42 public newapi::Transport, 42 public Transport,
43 public VideoRenderer, 43 public VideoRenderer,
44 public VideoCaptureInput, 44 public VideoCaptureInput,
45 public EncodedFrameObserver { 45 public EncodedFrameObserver {
46 public: 46 public:
47 VideoAnalyzer(VideoCaptureInput* input, 47 VideoAnalyzer(VideoCaptureInput* input,
48 Transport* transport, 48 Transport* transport,
49 const std::string& test_label, 49 const std::string& test_label,
50 double avg_psnr_threshold, 50 double avg_psnr_threshold,
51 double avg_ssim_threshold, 51 double avg_ssim_threshold,
52 int duration_frames, 52 int duration_frames,
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 void VideoQualityTest::ValidateParams(const Params& params) { 567 void VideoQualityTest::ValidateParams(const Params& params) {
568 RTC_CHECK_GE(params.common.max_bitrate_bps, params.common.target_bitrate_bps); 568 RTC_CHECK_GE(params.common.max_bitrate_bps, params.common.target_bitrate_bps);
569 RTC_CHECK_GE(params.common.target_bitrate_bps, params.common.min_bitrate_bps); 569 RTC_CHECK_GE(params.common.target_bitrate_bps, params.common.min_bitrate_bps);
570 RTC_CHECK_LT(params.common.tl_discard_threshold, 570 RTC_CHECK_LT(params.common.tl_discard_threshold,
571 params.common.num_temporal_layers); 571 params.common.num_temporal_layers);
572 } 572 }
573 573
574 void VideoQualityTest::TestBody() {} 574 void VideoQualityTest::TestBody() {}
575 575
576 void VideoQualityTest::SetupFullStack(const Params& params, 576 void VideoQualityTest::SetupFullStack(const Params& params,
577 newapi::Transport* send_transport, 577 Transport* send_transport,
578 newapi::Transport* recv_transport) { 578 Transport* recv_transport) {
579 if (params.logs) 579 if (params.logs)
580 trace_to_stderr_.reset(new test::TraceToStderr); 580 trace_to_stderr_.reset(new test::TraceToStderr);
581 581
582 CreateSendConfig(1, send_transport); 582 CreateSendConfig(1, send_transport);
583 583
584 int payload_type; 584 int payload_type;
585 if (params.common.codec == "VP8") { 585 if (params.common.codec == "VP8") {
586 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp8)); 586 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp8));
587 payload_type = kPayloadTypeVP8; 587 payload_type = kPayloadTypeVP8;
588 } else if (params.common.codec == "VP9") { 588 } else if (params.common.codec == "VP9") {
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 send_stream_->Stop(); 830 send_stream_->Stop();
831 receive_stream->Stop(); 831 receive_stream->Stop();
832 832
833 call->DestroyVideoReceiveStream(receive_stream); 833 call->DestroyVideoReceiveStream(receive_stream);
834 call->DestroyVideoSendStream(send_stream_); 834 call->DestroyVideoSendStream(send_stream_);
835 835
836 transport.StopSending(); 836 transport.StopSending();
837 } 837 }
838 838
839 } // namespace webrtc 839 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_quality_test.h ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698