| 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 // This file contains fake implementations, for use in unit tests, of the | 11 // This file contains fake implementations, for use in unit tests, of the |
| 12 // following classes: | 12 // following classes: |
| 13 // | 13 // |
| 14 // webrtc::Call | 14 // webrtc::Call |
| 15 // webrtc::AudioSendStream | 15 // webrtc::AudioSendStream |
| 16 // webrtc::AudioReceiveStream | 16 // webrtc::AudioReceiveStream |
| 17 // webrtc::VideoSendStream | 17 // webrtc::VideoSendStream |
| 18 // webrtc::VideoReceiveStream | 18 // webrtc::VideoReceiveStream |
| 19 | 19 |
| 20 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ | 20 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ |
| 21 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ | 21 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ |
| 22 | 22 |
| 23 #include <list> | |
| 24 #include <memory> | 23 #include <memory> |
| 25 #include <string> | 24 #include <string> |
| 26 #include <vector> | 25 #include <vector> |
| 27 | 26 |
| 28 #include "webrtc/api/video/video_frame.h" | 27 #include "webrtc/api/video/video_frame.h" |
| 29 #include "webrtc/base/buffer.h" | 28 #include "webrtc/base/buffer.h" |
| 30 #include "webrtc/call/audio_receive_stream.h" | 29 #include "webrtc/call/audio_receive_stream.h" |
| 31 #include "webrtc/call/audio_send_stream.h" | 30 #include "webrtc/call/audio_send_stream.h" |
| 32 #include "webrtc/call/call.h" | 31 #include "webrtc/call/call.h" |
| 33 #include "webrtc/call/flexfec_receive_stream.h" | 32 #include "webrtc/call/flexfec_receive_stream.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 222 |
| 224 webrtc::Call::Config GetConfig() const; | 223 webrtc::Call::Config GetConfig() const; |
| 225 const std::vector<FakeVideoSendStream*>& GetVideoSendStreams(); | 224 const std::vector<FakeVideoSendStream*>& GetVideoSendStreams(); |
| 226 const std::vector<FakeVideoReceiveStream*>& GetVideoReceiveStreams(); | 225 const std::vector<FakeVideoReceiveStream*>& GetVideoReceiveStreams(); |
| 227 | 226 |
| 228 const std::vector<FakeAudioSendStream*>& GetAudioSendStreams(); | 227 const std::vector<FakeAudioSendStream*>& GetAudioSendStreams(); |
| 229 const FakeAudioSendStream* GetAudioSendStream(uint32_t ssrc); | 228 const FakeAudioSendStream* GetAudioSendStream(uint32_t ssrc); |
| 230 const std::vector<FakeAudioReceiveStream*>& GetAudioReceiveStreams(); | 229 const std::vector<FakeAudioReceiveStream*>& GetAudioReceiveStreams(); |
| 231 const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc); | 230 const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc); |
| 232 | 231 |
| 233 const std::list<FakeFlexfecReceiveStream>& GetFlexfecReceiveStreams(); | 232 const std::vector<FakeFlexfecReceiveStream*>& GetFlexfecReceiveStreams(); |
| 234 | 233 |
| 235 rtc::SentPacket last_sent_packet() const { return last_sent_packet_; } | 234 rtc::SentPacket last_sent_packet() const { return last_sent_packet_; } |
| 236 | 235 |
| 237 // This is useful if we care about the last media packet (with id populated) | 236 // This is useful if we care about the last media packet (with id populated) |
| 238 // but not the last ICE packet (with -1 ID). | 237 // but not the last ICE packet (with -1 ID). |
| 239 int last_sent_nonnegative_packet_id() const { | 238 int last_sent_nonnegative_packet_id() const { |
| 240 return last_sent_nonnegative_packet_id_; | 239 return last_sent_nonnegative_packet_id_; |
| 241 } | 240 } |
| 242 | 241 |
| 243 webrtc::NetworkState GetNetworkState(webrtc::MediaType media) const; | 242 webrtc::NetworkState GetNetworkState(webrtc::MediaType media) const; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 webrtc::Call::Config config_; | 291 webrtc::Call::Config config_; |
| 293 webrtc::NetworkState audio_network_state_; | 292 webrtc::NetworkState audio_network_state_; |
| 294 webrtc::NetworkState video_network_state_; | 293 webrtc::NetworkState video_network_state_; |
| 295 rtc::SentPacket last_sent_packet_; | 294 rtc::SentPacket last_sent_packet_; |
| 296 int last_sent_nonnegative_packet_id_ = -1; | 295 int last_sent_nonnegative_packet_id_ = -1; |
| 297 webrtc::Call::Stats stats_; | 296 webrtc::Call::Stats stats_; |
| 298 std::vector<FakeVideoSendStream*> video_send_streams_; | 297 std::vector<FakeVideoSendStream*> video_send_streams_; |
| 299 std::vector<FakeAudioSendStream*> audio_send_streams_; | 298 std::vector<FakeAudioSendStream*> audio_send_streams_; |
| 300 std::vector<FakeVideoReceiveStream*> video_receive_streams_; | 299 std::vector<FakeVideoReceiveStream*> video_receive_streams_; |
| 301 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; | 300 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; |
| 302 std::list<FakeFlexfecReceiveStream> flexfec_receive_streams_; | 301 std::vector<FakeFlexfecReceiveStream*> flexfec_receive_streams_; |
| 303 | 302 |
| 304 int num_created_send_streams_; | 303 int num_created_send_streams_; |
| 305 int num_created_receive_streams_; | 304 int num_created_receive_streams_; |
| 306 | 305 |
| 307 int audio_transport_overhead_; | 306 int audio_transport_overhead_; |
| 308 int video_transport_overhead_; | 307 int video_transport_overhead_; |
| 309 }; | 308 }; |
| 310 | 309 |
| 311 } // namespace cricket | 310 } // namespace cricket |
| 312 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ | 311 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ |
| OLD | NEW |