| 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 21 matching lines...) Expand all Loading... |
| 32 #include "talk/media/base/rtputils.h" | 32 #include "talk/media/base/rtputils.h" |
| 33 #include "webrtc/base/checks.h" | 33 #include "webrtc/base/checks.h" |
| 34 #include "webrtc/base/gunit.h" | 34 #include "webrtc/base/gunit.h" |
| 35 | 35 |
| 36 namespace cricket { | 36 namespace cricket { |
| 37 FakeAudioSendStream::FakeAudioSendStream( | 37 FakeAudioSendStream::FakeAudioSendStream( |
| 38 const webrtc::AudioSendStream::Config& config) : config_(config) { | 38 const webrtc::AudioSendStream::Config& config) : config_(config) { |
| 39 RTC_DCHECK(config.voe_channel_id != -1); | 39 RTC_DCHECK(config.voe_channel_id != -1); |
| 40 } | 40 } |
| 41 | 41 |
| 42 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const { | 42 void FakeAudioSendStream::SetStats( |
| 43 return webrtc::AudioSendStream::Stats(); | 43 const webrtc::AudioSendStream::Stats& stats) { |
| 44 stats_ = stats; |
| 44 } | 45 } |
| 45 | 46 |
| 46 const webrtc::AudioSendStream::Config& | 47 const webrtc::AudioSendStream::Config& |
| 47 FakeAudioSendStream::GetConfig() const { | 48 FakeAudioSendStream::GetConfig() const { |
| 48 return config_; | 49 return config_; |
| 49 } | 50 } |
| 50 | 51 |
| 52 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const { |
| 53 return stats_; |
| 54 } |
| 55 |
| 51 FakeAudioReceiveStream::FakeAudioReceiveStream( | 56 FakeAudioReceiveStream::FakeAudioReceiveStream( |
| 52 const webrtc::AudioReceiveStream::Config& config) | 57 const webrtc::AudioReceiveStream::Config& config) |
| 53 : config_(config), received_packets_(0) { | 58 : config_(config), received_packets_(0) { |
| 54 RTC_DCHECK(config.voe_channel_id != -1); | 59 RTC_DCHECK(config.voe_channel_id != -1); |
| 55 } | 60 } |
| 56 | 61 |
| 57 const webrtc::AudioReceiveStream::Config& | 62 const webrtc::AudioReceiveStream::Config& |
| 58 FakeAudioReceiveStream::GetConfig() const { | 63 FakeAudioReceiveStream::GetConfig() const { |
| 59 return config_; | 64 return config_; |
| 60 } | 65 } |
| 61 | 66 |
| 62 void FakeAudioReceiveStream::SetStats( | 67 void FakeAudioReceiveStream::SetStats( |
| 63 const webrtc::AudioReceiveStream::Stats& stats) { | 68 const webrtc::AudioReceiveStream::Stats& stats) { |
| 64 stats_ = stats; | 69 stats_ = stats; |
| 65 } | 70 } |
| 66 | 71 |
| 67 void FakeAudioReceiveStream::IncrementReceivedPackets() { | 72 void FakeAudioReceiveStream::IncrementReceivedPackets() { |
| 68 received_packets_++; | 73 received_packets_++; |
| 69 } | 74 } |
| 70 | 75 |
| 76 webrtc::AudioReceiveStream::Stats FakeAudioReceiveStream::GetStats() const { |
| 77 return stats_; |
| 78 } |
| 79 |
| 71 FakeVideoSendStream::FakeVideoSendStream( | 80 FakeVideoSendStream::FakeVideoSendStream( |
| 72 const webrtc::VideoSendStream::Config& config, | 81 const webrtc::VideoSendStream::Config& config, |
| 73 const webrtc::VideoEncoderConfig& encoder_config) | 82 const webrtc::VideoEncoderConfig& encoder_config) |
| 74 : sending_(false), | 83 : sending_(false), |
| 75 config_(config), | 84 config_(config), |
| 76 codec_settings_set_(false), | 85 codec_settings_set_(false), |
| 77 num_swapped_frames_(0) { | 86 num_swapped_frames_(0) { |
| 78 RTC_DCHECK(config.encoder_settings.encoder != NULL); | 87 RTC_DCHECK(config.encoder_settings.encoder != NULL); |
| 79 ReconfigureVideoEncoder(encoder_config); | 88 ReconfigureVideoEncoder(encoder_config); |
| 80 } | 89 } |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 } | 414 } |
| 406 | 415 |
| 407 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { | 416 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { |
| 408 network_state_ = state; | 417 network_state_ = state; |
| 409 } | 418 } |
| 410 | 419 |
| 411 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { | 420 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { |
| 412 last_sent_packet_ = sent_packet; | 421 last_sent_packet_ = sent_packet; |
| 413 } | 422 } |
| 414 } // namespace cricket | 423 } // namespace cricket |
| OLD | NEW |