Chromium Code Reviews| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 } |
| 244 | 244 |
| 245 webrtc::AudioReceiveStream* FakeCall::CreateAudioReceiveStream( | 245 webrtc::AudioReceiveStream* FakeCall::CreateAudioReceiveStream( |
| 246 const webrtc::AudioReceiveStream::Config& config) { | 246 const webrtc::AudioReceiveStream::Config& config) { |
| 247 DCHECK(config.channel_id != -1); | |
|
the sun
2015/06/11 11:52:04
Validate config in object ctor instead.
pbos-webrtc
2015/06/11 14:48:53
Done.
| |
| 247 audio_receive_streams_.push_back(new FakeAudioReceiveStream(config)); | 248 audio_receive_streams_.push_back(new FakeAudioReceiveStream(config)); |
| 248 ++num_created_receive_streams_; | 249 ++num_created_receive_streams_; |
| 249 return audio_receive_streams_.back(); | 250 return audio_receive_streams_.back(); |
| 250 } | 251 } |
| 251 | 252 |
| 252 void FakeCall::DestroyAudioReceiveStream( | 253 void FakeCall::DestroyAudioReceiveStream( |
| 253 webrtc::AudioReceiveStream* receive_stream) { | 254 webrtc::AudioReceiveStream* receive_stream) { |
| 254 auto it = std::find(audio_receive_streams_.begin(), | 255 auto it = std::find(audio_receive_streams_.begin(), |
| 255 audio_receive_streams_.end(), | 256 audio_receive_streams_.end(), |
| 256 static_cast<FakeAudioReceiveStream*>(receive_stream)); | 257 static_cast<FakeAudioReceiveStream*>(receive_stream)); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 | 354 |
| 354 void FakeCall::SetBitrateConfig( | 355 void FakeCall::SetBitrateConfig( |
| 355 const webrtc::Call::Config::BitrateConfig& bitrate_config) { | 356 const webrtc::Call::Config::BitrateConfig& bitrate_config) { |
| 356 config_.bitrate_config = bitrate_config; | 357 config_.bitrate_config = bitrate_config; |
| 357 } | 358 } |
| 358 | 359 |
| 359 void FakeCall::SignalNetworkState(webrtc::Call::NetworkState state) { | 360 void FakeCall::SignalNetworkState(webrtc::Call::NetworkState state) { |
| 360 network_state_ = state; | 361 network_state_ = state; |
| 361 } | 362 } |
| 362 } // namespace cricket | 363 } // namespace cricket |
| OLD | NEW |