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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 #include <memory> | 23 #include <memory> |
24 #include <string> | 24 #include <string> |
25 #include <vector> | 25 #include <vector> |
26 | 26 |
27 #include "webrtc/api/video/video_frame.h" | 27 #include "webrtc/api/video/video_frame.h" |
28 #include "webrtc/call/audio_receive_stream.h" | 28 #include "webrtc/call/audio_receive_stream.h" |
29 #include "webrtc/call/audio_send_stream.h" | 29 #include "webrtc/call/audio_send_stream.h" |
30 #include "webrtc/call/call.h" | 30 #include "webrtc/call/call.h" |
31 #include "webrtc/call/flexfec_receive_stream.h" | 31 #include "webrtc/call/flexfec_receive_stream.h" |
| 32 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
32 #include "webrtc/rtc_base/buffer.h" | 33 #include "webrtc/rtc_base/buffer.h" |
33 #include "webrtc/video_receive_stream.h" | 34 #include "webrtc/video_receive_stream.h" |
34 #include "webrtc/video_send_stream.h" | 35 #include "webrtc/video_send_stream.h" |
35 | 36 |
36 namespace cricket { | 37 namespace cricket { |
37 class FakeAudioSendStream final : public webrtc::AudioSendStream { | 38 class FakeAudioSendStream final : public webrtc::AudioSendStream { |
38 public: | 39 public: |
39 struct TelephoneEvent { | 40 struct TelephoneEvent { |
40 int payload_type = -1; | 41 int payload_type = -1; |
41 int payload_frequency = -1; | 42 int payload_frequency = -1; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 192 |
192 bool IsReceiving() const; | 193 bool IsReceiving() const; |
193 | 194 |
194 void InjectFrame(const webrtc::VideoFrame& frame); | 195 void InjectFrame(const webrtc::VideoFrame& frame); |
195 | 196 |
196 void SetStats(const webrtc::VideoReceiveStream::Stats& stats); | 197 void SetStats(const webrtc::VideoReceiveStream::Stats& stats); |
197 | 198 |
198 void EnableEncodedFrameRecording(rtc::PlatformFile file, | 199 void EnableEncodedFrameRecording(rtc::PlatformFile file, |
199 size_t byte_limit) override; | 200 size_t byte_limit) override; |
200 | 201 |
| 202 void AddSecondarySink(webrtc::RtpPacketSinkInterface* sink) override; |
| 203 void RemoveSecondarySink(const webrtc::RtpPacketSinkInterface* sink) override; |
| 204 |
201 private: | 205 private: |
202 // webrtc::VideoReceiveStream implementation. | 206 // webrtc::VideoReceiveStream implementation. |
203 void Start() override; | 207 void Start() override; |
204 void Stop() override; | 208 void Stop() override; |
205 | 209 |
206 webrtc::VideoReceiveStream::Stats GetStats() const override; | 210 webrtc::VideoReceiveStream::Stats GetStats() const override; |
207 | 211 |
208 rtc::Optional<webrtc::TimingFrameInfo> GetAndResetTimingFrameInfo() override; | 212 rtc::Optional<webrtc::TimingFrameInfo> GetAndResetTimingFrameInfo() override; |
209 | 213 |
210 webrtc::VideoReceiveStream::Config config_; | 214 webrtc::VideoReceiveStream::Config config_; |
211 bool receiving_; | 215 bool receiving_; |
212 webrtc::VideoReceiveStream::Stats stats_; | 216 webrtc::VideoReceiveStream::Stats stats_; |
213 }; | 217 }; |
214 | 218 |
215 class FakeFlexfecReceiveStream final : public webrtc::FlexfecReceiveStream { | 219 class FakeFlexfecReceiveStream final : public webrtc::FlexfecReceiveStream { |
216 public: | 220 public: |
217 explicit FakeFlexfecReceiveStream( | 221 explicit FakeFlexfecReceiveStream( |
218 const webrtc::FlexfecReceiveStream::Config& config); | 222 const webrtc::FlexfecReceiveStream::Config& config); |
219 | 223 |
220 const webrtc::FlexfecReceiveStream::Config& GetConfig() const override; | 224 const webrtc::FlexfecReceiveStream::Config& GetConfig() const override; |
221 | 225 |
222 private: | 226 private: |
223 // webrtc::FlexfecReceiveStream implementation. | 227 // webrtc::FlexfecReceiveStream implementation. |
224 void Start() override; | 228 void Start() override; |
225 void Stop() override; | 229 void Stop() override; |
226 | 230 |
227 webrtc::FlexfecReceiveStream::Stats GetStats() const override; | 231 webrtc::FlexfecReceiveStream::Stats GetStats() const override; |
228 | 232 |
| 233 void OnRtpPacket(const webrtc::RtpPacketReceived& packet) override; |
| 234 |
229 webrtc::FlexfecReceiveStream::Config config_; | 235 webrtc::FlexfecReceiveStream::Config config_; |
230 bool receiving_; | 236 bool receiving_; |
231 }; | 237 }; |
232 | 238 |
233 class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver { | 239 class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver { |
234 public: | 240 public: |
235 explicit FakeCall(const webrtc::Call::Config& config); | 241 explicit FakeCall(const webrtc::Call::Config& config); |
236 ~FakeCall() override; | 242 ~FakeCall() override; |
237 | 243 |
238 webrtc::Call::Config GetConfig() const; | 244 webrtc::Call::Config GetConfig() const; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 326 |
321 int num_created_send_streams_; | 327 int num_created_send_streams_; |
322 int num_created_receive_streams_; | 328 int num_created_receive_streams_; |
323 | 329 |
324 int audio_transport_overhead_; | 330 int audio_transport_overhead_; |
325 int video_transport_overhead_; | 331 int video_transport_overhead_; |
326 }; | 332 }; |
327 | 333 |
328 } // namespace cricket | 334 } // namespace cricket |
329 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ | 335 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ |
OLD | NEW |