OLD | NEW |
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 |
11 #include "webrtc/media/engine/fakewebrtccall.h" | 11 #include "webrtc/media/engine/fakewebrtccall.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include "webrtc/api/call/audio_sink.h" | 16 #include "webrtc/api/call/audio_sink.h" |
17 #include "webrtc/base/checks.h" | 17 #include "webrtc/base/checks.h" |
18 #include "webrtc/base/platform_file.h" | 18 #include "webrtc/base/platform_file.h" |
19 #include "webrtc/base/gunit.h" | 19 #include "webrtc/base/gunit.h" |
20 #include "webrtc/media/base/rtputils.h" | 20 #include "webrtc/media/base/rtputils.h" |
21 | 21 |
22 namespace cricket { | 22 namespace cricket { |
23 FakeAudioSendStream::FakeAudioSendStream( | 23 FakeAudioSendStream::FakeAudioSendStream( |
24 int id, const webrtc::AudioSendStream::Config& config) | 24 int id, const webrtc::AudioSendStream::Config& config) |
25 : id_(id), config_(config) { | 25 : id_(id), config_(config) { |
26 RTC_DCHECK(config.voe_channel_id != -1); | 26 RTC_DCHECK(config.voe_channel_id != -1); |
27 } | 27 } |
28 | 28 |
| 29 void FakeAudioSendStream::Reconfigure( |
| 30 const webrtc::AudioSendStream::Config& config) { |
| 31 config_ = config; |
| 32 } |
| 33 |
29 const webrtc::AudioSendStream::Config& | 34 const webrtc::AudioSendStream::Config& |
30 FakeAudioSendStream::GetConfig() const { | 35 FakeAudioSendStream::GetConfig() const { |
31 return config_; | 36 return config_; |
32 } | 37 } |
33 | 38 |
34 void FakeAudioSendStream::SetStats( | 39 void FakeAudioSendStream::SetStats( |
35 const webrtc::AudioSendStream::Stats& stats) { | 40 const webrtc::AudioSendStream::Stats& stats) { |
36 stats_ = stats; | 41 stats_ = stats; |
37 } | 42 } |
38 | 43 |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 } | 621 } |
617 | 622 |
618 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { | 623 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { |
619 last_sent_packet_ = sent_packet; | 624 last_sent_packet_ = sent_packet; |
620 if (sent_packet.packet_id >= 0) { | 625 if (sent_packet.packet_id >= 0) { |
621 last_sent_nonnegative_packet_id_ = sent_packet.packet_id; | 626 last_sent_nonnegative_packet_id_ = sent_packet.packet_id; |
622 } | 627 } |
623 } | 628 } |
624 | 629 |
625 } // namespace cricket | 630 } // namespace cricket |
OLD | NEW |