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

Side by Side Diff: webrtc/test/direct_transport.cc

Issue 1582833002: Add ramp-up tests for transport sequence number with and w/o audio. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix win compile issue... Created 4 years, 11 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/test/direct_transport.h ('k') | webrtc/test/fake_network_pipe.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 #include "webrtc/test/direct_transport.h" 10 #include "webrtc/test/direct_transport.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 packet_event_.Set(); 63 packet_event_.Set();
64 return true; 64 return true;
65 } 65 }
66 66
67 bool DirectTransport::SendRtcp(const uint8_t* data, size_t length) { 67 bool DirectTransport::SendRtcp(const uint8_t* data, size_t length) {
68 fake_network_.SendPacket(data, length); 68 fake_network_.SendPacket(data, length);
69 packet_event_.Set(); 69 packet_event_.Set();
70 return true; 70 return true;
71 } 71 }
72 72
73 int DirectTransport::GetAverageDelayMs() {
74 return fake_network_.AverageDelay();
75 }
76
73 bool DirectTransport::NetworkProcess(void* transport) { 77 bool DirectTransport::NetworkProcess(void* transport) {
74 return static_cast<DirectTransport*>(transport)->SendPackets(); 78 return static_cast<DirectTransport*>(transport)->SendPackets();
75 } 79 }
76 80
77 bool DirectTransport::SendPackets() { 81 bool DirectTransport::SendPackets() {
78 fake_network_.Process(); 82 fake_network_.Process();
79 int64_t wait_time_ms = fake_network_.TimeUntilNextProcess(); 83 int64_t wait_time_ms = fake_network_.TimeUntilNextProcess();
80 if (wait_time_ms > 0) { 84 if (wait_time_ms > 0) {
81 packet_event_.Wait(static_cast<int>(wait_time_ms)); 85 packet_event_.Wait(static_cast<int>(wait_time_ms));
82 } 86 }
83 rtc::CritScope crit(&lock_); 87 rtc::CritScope crit(&lock_);
84 return shutting_down_ ? false : true; 88 return shutting_down_ ? false : true;
85 } 89 }
86 } // namespace test 90 } // namespace test
87 } // namespace webrtc 91 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/direct_transport.h ('k') | webrtc/test/fake_network_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698