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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 void Start() override; | 189 void Start() override; |
190 void Stop() override; | 190 void Stop() override; |
191 | 191 |
192 webrtc::VideoReceiveStream::Stats GetStats() const override; | 192 webrtc::VideoReceiveStream::Stats GetStats() const override; |
193 | 193 |
194 webrtc::VideoReceiveStream::Config config_; | 194 webrtc::VideoReceiveStream::Config config_; |
195 bool receiving_; | 195 bool receiving_; |
196 webrtc::VideoReceiveStream::Stats stats_; | 196 webrtc::VideoReceiveStream::Stats stats_; |
197 }; | 197 }; |
198 | 198 |
| 199 class FakeFlexfecReceiveStream final : public webrtc::FlexfecReceiveStream { |
| 200 public: |
| 201 explicit FakeFlexfecReceiveStream( |
| 202 const webrtc::FlexfecReceiveStream::Config& config); |
| 203 |
| 204 const webrtc::FlexfecReceiveStream::Config& GetConfig(); |
| 205 |
| 206 private: |
| 207 // webrtc::FlexfecReceiveStream implementation. |
| 208 void Start() override; |
| 209 void Stop() override; |
| 210 |
| 211 webrtc::FlexfecReceiveStream::Stats GetStats() const override; |
| 212 |
| 213 webrtc::FlexfecReceiveStream::Config config_; |
| 214 bool receiving_; |
| 215 }; |
| 216 |
199 class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver { | 217 class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver { |
200 public: | 218 public: |
201 explicit FakeCall(const webrtc::Call::Config& config); | 219 explicit FakeCall(const webrtc::Call::Config& config); |
202 ~FakeCall() override; | 220 ~FakeCall() override; |
203 | 221 |
204 webrtc::Call::Config GetConfig() const; | 222 webrtc::Call::Config GetConfig() const; |
205 const std::vector<FakeVideoSendStream*>& GetVideoSendStreams(); | 223 const std::vector<FakeVideoSendStream*>& GetVideoSendStreams(); |
206 const std::vector<FakeVideoReceiveStream*>& GetVideoReceiveStreams(); | 224 const std::vector<FakeVideoReceiveStream*>& GetVideoReceiveStreams(); |
207 | 225 |
208 const std::vector<FakeAudioSendStream*>& GetAudioSendStreams(); | 226 const std::vector<FakeAudioSendStream*>& GetAudioSendStreams(); |
209 const FakeAudioSendStream* GetAudioSendStream(uint32_t ssrc); | 227 const FakeAudioSendStream* GetAudioSendStream(uint32_t ssrc); |
210 const std::vector<FakeAudioReceiveStream*>& GetAudioReceiveStreams(); | 228 const std::vector<FakeAudioReceiveStream*>& GetAudioReceiveStreams(); |
211 const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc); | 229 const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc); |
212 | 230 |
| 231 const std::vector<FakeFlexfecReceiveStream*>& GetFlexfecReceiveStreams(); |
| 232 |
213 rtc::SentPacket last_sent_packet() const { return last_sent_packet_; } | 233 rtc::SentPacket last_sent_packet() const { return last_sent_packet_; } |
214 | 234 |
215 // This is useful if we care about the last media packet (with id populated) | 235 // This is useful if we care about the last media packet (with id populated) |
216 // but not the last ICE packet (with -1 ID). | 236 // but not the last ICE packet (with -1 ID). |
217 int last_sent_nonnegative_packet_id() const { | 237 int last_sent_nonnegative_packet_id() const { |
218 return last_sent_nonnegative_packet_id_; | 238 return last_sent_nonnegative_packet_id_; |
219 } | 239 } |
220 | 240 |
221 webrtc::NetworkState GetNetworkState(webrtc::MediaType media) const; | 241 webrtc::NetworkState GetNetworkState(webrtc::MediaType media) const; |
222 int GetNumCreatedSendStreams() const; | 242 int GetNumCreatedSendStreams() const; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 webrtc::Call::Config config_; | 290 webrtc::Call::Config config_; |
271 webrtc::NetworkState audio_network_state_; | 291 webrtc::NetworkState audio_network_state_; |
272 webrtc::NetworkState video_network_state_; | 292 webrtc::NetworkState video_network_state_; |
273 rtc::SentPacket last_sent_packet_; | 293 rtc::SentPacket last_sent_packet_; |
274 int last_sent_nonnegative_packet_id_ = -1; | 294 int last_sent_nonnegative_packet_id_ = -1; |
275 webrtc::Call::Stats stats_; | 295 webrtc::Call::Stats stats_; |
276 std::vector<FakeVideoSendStream*> video_send_streams_; | 296 std::vector<FakeVideoSendStream*> video_send_streams_; |
277 std::vector<FakeAudioSendStream*> audio_send_streams_; | 297 std::vector<FakeAudioSendStream*> audio_send_streams_; |
278 std::vector<FakeVideoReceiveStream*> video_receive_streams_; | 298 std::vector<FakeVideoReceiveStream*> video_receive_streams_; |
279 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; | 299 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; |
| 300 std::vector<FakeFlexfecReceiveStream*> flexfec_receive_streams_; |
280 | 301 |
281 int num_created_send_streams_; | 302 int num_created_send_streams_; |
282 int num_created_receive_streams_; | 303 int num_created_receive_streams_; |
283 | 304 |
284 int audio_transport_overhead_; | 305 int audio_transport_overhead_; |
285 int video_transport_overhead_; | 306 int video_transport_overhead_; |
286 }; | 307 }; |
287 | 308 |
288 } // namespace cricket | 309 } // namespace cricket |
289 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ | 310 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ |
OLD | NEW |