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

Side by Side Diff: webrtc/voice_engine/test/auto_test/fakes/conference_transport.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
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 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 remote_base_->Release(); 101 remote_base_->Release();
102 102
103 local_rtp_rtcp_->Release(); 103 local_rtp_rtcp_->Release();
104 local_network_->Release(); 104 local_network_->Release();
105 local_base_->Release(); 105 local_base_->Release();
106 106
107 EXPECT_TRUE(webrtc::VoiceEngine::Delete(remote_voe_)); 107 EXPECT_TRUE(webrtc::VoiceEngine::Delete(remote_voe_));
108 EXPECT_TRUE(webrtc::VoiceEngine::Delete(local_voe_)); 108 EXPECT_TRUE(webrtc::VoiceEngine::Delete(local_voe_));
109 } 109 }
110 110
111 int ConferenceTransport::SendPacket(const void* data, size_t len) { 111 bool ConferenceTransport::SendRtp(const uint8_t* data, size_t len) {
112 StorePacket(Packet::Rtp, data, len); 112 StorePacket(Packet::Rtp, data, len);
113 return static_cast<int>(len); 113 return true;
114 } 114 }
115 115
116 int ConferenceTransport::SendRTCPPacket(const void* data, size_t len) { 116 bool ConferenceTransport::SendRtcp(const uint8_t* data, size_t len) {
117 StorePacket(Packet::Rtcp, data, len); 117 StorePacket(Packet::Rtcp, data, len);
118 return static_cast<int>(len); 118 return true;
119 } 119 }
120 120
121 int ConferenceTransport::GetReceiverChannelForSsrc(unsigned int sender_ssrc) 121 int ConferenceTransport::GetReceiverChannelForSsrc(unsigned int sender_ssrc)
122 const { 122 const {
123 webrtc::CriticalSectionScoped lock(stream_crit_.get()); 123 webrtc::CriticalSectionScoped lock(stream_crit_.get());
124 auto it = streams_.find(sender_ssrc); 124 auto it = streams_.find(sender_ssrc);
125 if (it != streams_.end()) { 125 if (it != streams_.end()) {
126 return it->second.second; 126 return it->second.second;
127 } 127 }
128 return -1; 128 return -1;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 bool ConferenceTransport::GetReceiverStatistics(unsigned int id, 279 bool ConferenceTransport::GetReceiverStatistics(unsigned int id,
280 webrtc::CallStatistics* stats) { 280 webrtc::CallStatistics* stats) {
281 int dst = GetReceiverChannelForSsrc(id); 281 int dst = GetReceiverChannelForSsrc(id);
282 if (dst == -1) { 282 if (dst == -1) {
283 return false; 283 return false;
284 } 284 }
285 EXPECT_EQ(0, local_rtp_rtcp_->GetRTCPStatistics(dst, *stats)); 285 EXPECT_EQ(0, local_rtp_rtcp_->GetRTCPStatistics(dst, *stats));
286 return true; 286 return true;
287 } 287 }
288 } // namespace voetest 288 } // namespace voetest
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698