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

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

Issue 1469013002: Move ThreadWrapper to ProcessThread in base. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removed comment Created 5 years 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/rampup_tests.h ('k') | webrtc/video/video_capture_input.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) 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 10
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "webrtc/base/checks.h" 12 #include "webrtc/base/checks.h"
13 #include "webrtc/base/common.h" 13 #include "webrtc/base/common.h"
14 #include "webrtc/base/event.h" 14 #include "webrtc/base/event.h"
15 #include "webrtc/base/platform_thread.h"
15 #include "webrtc/modules/pacing/packet_router.h" 16 #include "webrtc/modules/pacing/packet_router.h"
16 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s end_time.h" 17 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s end_time.h"
17 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_singl e_stream.h" 18 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_singl e_stream.h"
18 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h" 19 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h"
19 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" 20 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h"
20 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 21 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
21 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" 22 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h"
22 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 23 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
23 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" 24 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
24 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 25 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
25 #include "webrtc/system_wrappers/include/thread_wrapper.h"
26 #include "webrtc/test/testsupport/perf_test.h" 26 #include "webrtc/test/testsupport/perf_test.h"
27 #include "webrtc/video/rampup_tests.h" 27 #include "webrtc/video/rampup_tests.h"
28 28
29 namespace webrtc { 29 namespace webrtc {
30 namespace { 30 namespace {
31 31
32 static const int64_t kPollIntervalMs = 20; 32 static const int64_t kPollIntervalMs = 20;
33 33
34 std::vector<uint32_t> GenerateSsrcs(size_t num_streams, 34 std::vector<uint32_t> GenerateSsrcs(size_t num_streams,
35 uint32_t ssrc_offset) { 35 uint32_t ssrc_offset) {
(...skipping 17 matching lines...) Expand all
53 red_(red), 53 red_(red),
54 send_stream_(nullptr), 54 send_stream_(nullptr),
55 start_bitrate_bps_(start_bitrate_bps), 55 start_bitrate_bps_(start_bitrate_bps),
56 start_bitrate_verified_(false), 56 start_bitrate_verified_(false),
57 expected_bitrate_bps_(0), 57 expected_bitrate_bps_(0),
58 test_start_ms_(-1), 58 test_start_ms_(-1),
59 ramp_up_finished_ms_(-1), 59 ramp_up_finished_ms_(-1),
60 extension_type_(extension_type), 60 extension_type_(extension_type),
61 ssrcs_(GenerateSsrcs(num_streams, 100)), 61 ssrcs_(GenerateSsrcs(num_streams, 100)),
62 rtx_ssrcs_(GenerateSsrcs(num_streams, 200)), 62 rtx_ssrcs_(GenerateSsrcs(num_streams, 200)),
63 poller_thread_(ThreadWrapper::CreateThread(&BitrateStatsPollingThread, 63 poller_thread_(PlatformThread::CreateThread(&BitrateStatsPollingThread,
64 this, 64 this,
65 "BitrateStatsPollingThread")), 65 "BitrateStatsPollingThread")),
66 sender_call_(nullptr) { 66 sender_call_(nullptr) {
67 if (rtx_) { 67 if (rtx_) {
68 for (size_t i = 0; i < ssrcs_.size(); ++i) 68 for (size_t i = 0; i < ssrcs_.size(); ++i)
69 rtx_ssrc_map_[rtx_ssrcs_[i]] = ssrcs_[i]; 69 rtx_ssrc_map_[rtx_ssrcs_[i]] = ssrcs_[i];
70 } 70 }
71 } 71 }
72 72
73 RampUpTester::~RampUpTester() { 73 RampUpTester::~RampUpTester() {
74 event_.Set(); 74 event_.Set();
75 } 75 }
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 RampUpTester test(3, 0, RtpExtension::kTransportSequenceNumber, true, true); 503 RampUpTester test(3, 0, RtpExtension::kTransportSequenceNumber, true, true);
504 RunBaseTest(&test, FakeNetworkPipe::Config()); 504 RunBaseTest(&test, FakeNetworkPipe::Config());
505 } 505 }
506 506
507 TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) { 507 TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) {
508 RampUpTester test(1, 0.9 * kSingleStreamTargetBps, 508 RampUpTester test(1, 0.9 * kSingleStreamTargetBps,
509 RtpExtension::kTransportSequenceNumber, false, false); 509 RtpExtension::kTransportSequenceNumber, false, false);
510 RunBaseTest(&test, FakeNetworkPipe::Config()); 510 RunBaseTest(&test, FakeNetworkPipe::Config());
511 } 511 }
512 } // namespace webrtc 512 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/rampup_tests.h ('k') | webrtc/video/video_capture_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698