OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 receiving_ = false; | 187 receiving_ = false; |
188 } | 188 } |
189 | 189 |
190 void FakeVideoReceiveStream::SetStats( | 190 void FakeVideoReceiveStream::SetStats( |
191 const webrtc::VideoReceiveStream::Stats& stats) { | 191 const webrtc::VideoReceiveStream::Stats& stats) { |
192 stats_ = stats; | 192 stats_ = stats; |
193 } | 193 } |
194 | 194 |
195 FakeCall::FakeCall(const webrtc::Call::Config& config) | 195 FakeCall::FakeCall(const webrtc::Call::Config& config) |
196 : config_(config), | 196 : config_(config), |
197 network_state_(kNetworkUp), | 197 network_state_(webrtc::kNetworkUp), |
198 num_created_send_streams_(0), | 198 num_created_send_streams_(0), |
199 num_created_receive_streams_(0) { | 199 num_created_receive_streams_(0) { |
200 } | 200 } |
201 | 201 |
202 FakeCall::~FakeCall() { | 202 FakeCall::~FakeCall() { |
203 EXPECT_EQ(0u, video_send_streams_.size()); | 203 EXPECT_EQ(0u, video_send_streams_.size()); |
204 EXPECT_EQ(0u, video_receive_streams_.size()); | 204 EXPECT_EQ(0u, video_receive_streams_.size()); |
205 EXPECT_EQ(0u, audio_receive_streams_.size()); | 205 EXPECT_EQ(0u, audio_receive_streams_.size()); |
206 } | 206 } |
207 | 207 |
(...skipping 15 matching lines...) Expand all Loading... |
223 | 223 |
224 const FakeAudioReceiveStream* FakeCall::GetAudioReceiveStream(uint32_t ssrc) { | 224 const FakeAudioReceiveStream* FakeCall::GetAudioReceiveStream(uint32_t ssrc) { |
225 for (const auto p : GetAudioReceiveStreams()) { | 225 for (const auto p : GetAudioReceiveStreams()) { |
226 if (p->GetConfig().rtp.remote_ssrc == ssrc) { | 226 if (p->GetConfig().rtp.remote_ssrc == ssrc) { |
227 return p; | 227 return p; |
228 } | 228 } |
229 } | 229 } |
230 return nullptr; | 230 return nullptr; |
231 } | 231 } |
232 | 232 |
233 webrtc::Call::NetworkState FakeCall::GetNetworkState() const { | 233 webrtc::NetworkState FakeCall::GetNetworkState() const { |
234 return network_state_; | 234 return network_state_; |
235 } | 235 } |
236 | 236 |
237 webrtc::AudioSendStream* FakeCall::CreateAudioSendStream( | 237 webrtc::AudioSendStream* FakeCall::CreateAudioSendStream( |
238 const webrtc::AudioSendStream::Config& config) { | 238 const webrtc::AudioSendStream::Config& config) { |
239 return nullptr; | 239 return nullptr; |
240 } | 240 } |
241 | 241 |
242 void FakeCall::DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) { | 242 void FakeCall::DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) { |
243 } | 243 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 webrtc::Call::Stats FakeCall::GetStats() const { | 350 webrtc::Call::Stats FakeCall::GetStats() const { |
351 return stats_; | 351 return stats_; |
352 } | 352 } |
353 | 353 |
354 void FakeCall::SetBitrateConfig( | 354 void FakeCall::SetBitrateConfig( |
355 const webrtc::Call::Config::BitrateConfig& bitrate_config) { | 355 const webrtc::Call::Config::BitrateConfig& bitrate_config) { |
356 config_.bitrate_config = bitrate_config; | 356 config_.bitrate_config = bitrate_config; |
357 } | 357 } |
358 | 358 |
359 void FakeCall::SignalNetworkState(webrtc::Call::NetworkState state) { | 359 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { |
360 network_state_ = state; | 360 network_state_ = state; |
361 } | 361 } |
362 } // namespace cricket | 362 } // namespace cricket |
OLD | NEW |