| 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 const webrtc::AudioSendStream::Config& |
| 43 FakeAudioSendStream::GetConfig() const { |
| 44 return config_; |
| 45 } |
| 46 |
| 42 void FakeAudioSendStream::SetStats( | 47 void FakeAudioSendStream::SetStats( |
| 43 const webrtc::AudioSendStream::Stats& stats) { | 48 const webrtc::AudioSendStream::Stats& stats) { |
| 44 stats_ = stats; | 49 stats_ = stats; |
| 45 } | 50 } |
| 46 | 51 |
| 47 const webrtc::AudioSendStream::Config& | 52 FakeAudioSendStream::TelephoneEvent |
| 48 FakeAudioSendStream::GetConfig() const { | 53 FakeAudioSendStream::GetLatestTelephoneEvent() const { |
| 49 return config_; | 54 return latest_telephone_event_; |
| 55 } |
| 56 |
| 57 bool FakeAudioSendStream::SendTelephoneEvent(int payload_type, uint8_t event, |
| 58 uint32_t duration_ms) { |
| 59 latest_telephone_event_.payload_type = payload_type; |
| 60 latest_telephone_event_.event_code = event; |
| 61 latest_telephone_event_.duration_ms = duration_ms; |
| 62 return true; |
| 50 } | 63 } |
| 51 | 64 |
| 52 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const { | 65 webrtc::AudioSendStream::Stats FakeAudioSendStream::GetStats() const { |
| 53 return stats_; | 66 return stats_; |
| 54 } | 67 } |
| 55 | 68 |
| 56 FakeAudioReceiveStream::FakeAudioReceiveStream( | 69 FakeAudioReceiveStream::FakeAudioReceiveStream( |
| 57 const webrtc::AudioReceiveStream::Config& config) | 70 const webrtc::AudioReceiveStream::Config& config) |
| 58 : config_(config), received_packets_(0) { | 71 : config_(config), received_packets_(0) { |
| 59 RTC_DCHECK(config.voe_channel_id != -1); | 72 RTC_DCHECK(config.voe_channel_id != -1); |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 } | 427 } |
| 415 | 428 |
| 416 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { | 429 void FakeCall::SignalNetworkState(webrtc::NetworkState state) { |
| 417 network_state_ = state; | 430 network_state_ = state; |
| 418 } | 431 } |
| 419 | 432 |
| 420 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { | 433 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { |
| 421 last_sent_packet_ = sent_packet; | 434 last_sent_packet_ = sent_packet; |
| 422 } | 435 } |
| 423 } // namespace cricket | 436 } // namespace cricket |
| OLD | NEW |