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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #include "webrtc/api/video/video_frame.h" | 27 #include "webrtc/api/video/video_frame.h" |
28 #include "webrtc/base/buffer.h" | 28 #include "webrtc/base/buffer.h" |
29 #include "webrtc/call/audio_receive_stream.h" | 29 #include "webrtc/call/audio_receive_stream.h" |
30 #include "webrtc/call/audio_send_stream.h" | 30 #include "webrtc/call/audio_send_stream.h" |
31 #include "webrtc/call/call.h" | 31 #include "webrtc/call/call.h" |
32 #include "webrtc/call/flexfec_receive_stream.h" | 32 #include "webrtc/call/flexfec_receive_stream.h" |
33 #include "webrtc/video_receive_stream.h" | 33 #include "webrtc/video_receive_stream.h" |
34 #include "webrtc/video_send_stream.h" | 34 #include "webrtc/video_send_stream.h" |
35 | 35 |
| 36 namespace webrtc { |
| 37 class RtpContributingSources; |
| 38 } // namespace webrtc |
| 39 |
36 namespace cricket { | 40 namespace cricket { |
37 class FakeAudioSendStream final : public webrtc::AudioSendStream { | 41 class FakeAudioSendStream final : public webrtc::AudioSendStream { |
38 public: | 42 public: |
39 struct TelephoneEvent { | 43 struct TelephoneEvent { |
40 int payload_type = -1; | 44 int payload_type = -1; |
41 int payload_frequency = -1; | 45 int payload_frequency = -1; |
42 int event_code = 0; | 46 int event_code = 0; |
43 int duration_ms = 0; | 47 int duration_ms = 0; |
44 }; | 48 }; |
45 | 49 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 94 |
91 private: | 95 private: |
92 // webrtc::AudioReceiveStream implementation. | 96 // webrtc::AudioReceiveStream implementation. |
93 void Start() override { started_ = true; } | 97 void Start() override { started_ = true; } |
94 void Stop() override { started_ = false; } | 98 void Stop() override { started_ = false; } |
95 | 99 |
96 webrtc::AudioReceiveStream::Stats GetStats() const override; | 100 webrtc::AudioReceiveStream::Stats GetStats() const override; |
97 int GetOutputLevel() const override { return 0; } | 101 int GetOutputLevel() const override { return 0; } |
98 void SetSink(std::unique_ptr<webrtc::AudioSinkInterface> sink) override; | 102 void SetSink(std::unique_ptr<webrtc::AudioSinkInterface> sink) override; |
99 void SetGain(float gain) override; | 103 void SetGain(float gain) override; |
| 104 std::vector<webrtc::RtpContributingSource> GetContributingSources() override { |
| 105 return std::vector<webrtc::RtpContributingSource>(); |
| 106 } |
100 | 107 |
101 int id_ = -1; | 108 int id_ = -1; |
102 webrtc::AudioReceiveStream::Config config_; | 109 webrtc::AudioReceiveStream::Config config_; |
103 webrtc::AudioReceiveStream::Stats stats_; | 110 webrtc::AudioReceiveStream::Stats stats_; |
104 int received_packets_ = 0; | 111 int received_packets_ = 0; |
105 std::unique_ptr<webrtc::AudioSinkInterface> sink_; | 112 std::unique_ptr<webrtc::AudioSinkInterface> sink_; |
106 float gain_ = 1.0f; | 113 float gain_ = 1.0f; |
107 rtc::Buffer last_packet_; | 114 rtc::Buffer last_packet_; |
108 bool started_ = false; | 115 bool started_ = false; |
109 }; | 116 }; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 318 |
312 int num_created_send_streams_; | 319 int num_created_send_streams_; |
313 int num_created_receive_streams_; | 320 int num_created_receive_streams_; |
314 | 321 |
315 int audio_transport_overhead_; | 322 int audio_transport_overhead_; |
316 int video_transport_overhead_; | 323 int video_transport_overhead_; |
317 }; | 324 }; |
318 | 325 |
319 } // namespace cricket | 326 } // namespace cricket |
320 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ | 327 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ |
OLD | NEW |