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

Side by Side Diff: webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h

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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
(...skipping 23 matching lines...) Expand all
34 this, 34 this,
35 "LoopBackTransport")), 35 "LoopBackTransport")),
36 channel_(channel), 36 channel_(channel),
37 voe_network_(voe_network), 37 voe_network_(voe_network),
38 transmitted_packets_(0) { 38 transmitted_packets_(0) {
39 thread_->Start(); 39 thread_->Start();
40 } 40 }
41 41
42 ~LoopBackTransport() { thread_->Stop(); } 42 ~LoopBackTransport() { thread_->Stop(); }
43 43
44 int SendPacket(const void* data, size_t len) override { 44 bool SendRtp(const uint8_t* data, size_t len) override {
45 StorePacket(Packet::Rtp, data, len); 45 StorePacket(Packet::Rtp, data, len);
46 return static_cast<int>(len); 46 return true;
47 } 47 }
48 48
49 int SendRTCPPacket(const void* data, size_t len) override { 49 bool SendRtcp(const uint8_t* data, size_t len) override {
50 StorePacket(Packet::Rtcp, data, len); 50 StorePacket(Packet::Rtcp, data, len);
51 return static_cast<int>(len); 51 return true;
52 } 52 }
53 53
54 void WaitForTransmittedPackets(int32_t packet_count) { 54 void WaitForTransmittedPackets(int32_t packet_count) {
55 enum { 55 enum {
56 kSleepIntervalMs = 10 56 kSleepIntervalMs = 10
57 }; 57 };
58 int32_t limit = transmitted_packets_.Value() + packet_count; 58 int32_t limit = transmitted_packets_.Value() + packet_count;
59 while (transmitted_packets_.Value() < limit) { 59 while (transmitted_packets_.Value() < limit) {
60 webrtc::SleepMs(kSleepIntervalMs); 60 webrtc::SleepMs(kSleepIntervalMs);
61 } 61 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 class AfterInitializationFixture : public BeforeInitializationFixture { 161 class AfterInitializationFixture : public BeforeInitializationFixture {
162 public: 162 public:
163 AfterInitializationFixture(); 163 AfterInitializationFixture();
164 virtual ~AfterInitializationFixture(); 164 virtual ~AfterInitializationFixture();
165 165
166 protected: 166 protected:
167 rtc::scoped_ptr<TestErrorObserver> error_observer_; 167 rtc::scoped_ptr<TestErrorObserver> error_observer_;
168 }; 168 };
169 169
170 #endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_AFTER_INIT_H_ 170 #endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_TEST_BASE_AFTER_INIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698