OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 explicit FakeCall(const webrtc::Call::Config& config); | 157 explicit FakeCall(const webrtc::Call::Config& config); |
158 ~FakeCall() override; | 158 ~FakeCall() override; |
159 | 159 |
160 webrtc::Call::Config GetConfig() const; | 160 webrtc::Call::Config GetConfig() const; |
161 const std::vector<FakeVideoSendStream*>& GetVideoSendStreams(); | 161 const std::vector<FakeVideoSendStream*>& GetVideoSendStreams(); |
162 const std::vector<FakeVideoReceiveStream*>& GetVideoReceiveStreams(); | 162 const std::vector<FakeVideoReceiveStream*>& GetVideoReceiveStreams(); |
163 | 163 |
164 const std::vector<FakeAudioReceiveStream*>& GetAudioReceiveStreams(); | 164 const std::vector<FakeAudioReceiveStream*>& GetAudioReceiveStreams(); |
165 const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc); | 165 const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc); |
166 | 166 |
| 167 rtc::SentPacket last_sent_packet() const { return last_sent_packet_; } |
167 webrtc::NetworkState GetNetworkState() const; | 168 webrtc::NetworkState GetNetworkState() const; |
168 int GetNumCreatedSendStreams() const; | 169 int GetNumCreatedSendStreams() const; |
169 int GetNumCreatedReceiveStreams() const; | 170 int GetNumCreatedReceiveStreams() const; |
170 void SetStats(const webrtc::Call::Stats& stats); | 171 void SetStats(const webrtc::Call::Stats& stats); |
171 | 172 |
172 private: | 173 private: |
173 webrtc::AudioSendStream* CreateAudioSendStream( | 174 webrtc::AudioSendStream* CreateAudioSendStream( |
174 const webrtc::AudioSendStream::Config& config) override; | 175 const webrtc::AudioSendStream::Config& config) override; |
175 void DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) override; | 176 void DestroyAudioSendStream(webrtc::AudioSendStream* send_stream) override; |
176 | 177 |
(...skipping 16 matching lines...) Expand all Loading... |
193 DeliveryStatus DeliverPacket(webrtc::MediaType media_type, | 194 DeliveryStatus DeliverPacket(webrtc::MediaType media_type, |
194 const uint8_t* packet, | 195 const uint8_t* packet, |
195 size_t length, | 196 size_t length, |
196 const webrtc::PacketTime& packet_time) override; | 197 const webrtc::PacketTime& packet_time) override; |
197 | 198 |
198 webrtc::Call::Stats GetStats() const override; | 199 webrtc::Call::Stats GetStats() const override; |
199 | 200 |
200 void SetBitrateConfig( | 201 void SetBitrateConfig( |
201 const webrtc::Call::Config::BitrateConfig& bitrate_config) override; | 202 const webrtc::Call::Config::BitrateConfig& bitrate_config) override; |
202 void SignalNetworkState(webrtc::NetworkState state) override; | 203 void SignalNetworkState(webrtc::NetworkState state) override; |
| 204 void OnSentPacket(const rtc::SentPacket& sent_packet) override; |
203 | 205 |
204 webrtc::Call::Config config_; | 206 webrtc::Call::Config config_; |
205 webrtc::NetworkState network_state_; | 207 webrtc::NetworkState network_state_; |
| 208 rtc::SentPacket last_sent_packet_; |
206 webrtc::Call::Stats stats_; | 209 webrtc::Call::Stats stats_; |
207 std::vector<FakeVideoSendStream*> video_send_streams_; | 210 std::vector<FakeVideoSendStream*> video_send_streams_; |
208 std::vector<FakeVideoReceiveStream*> video_receive_streams_; | 211 std::vector<FakeVideoReceiveStream*> video_receive_streams_; |
209 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; | 212 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; |
210 | 213 |
211 int num_created_send_streams_; | 214 int num_created_send_streams_; |
212 int num_created_receive_streams_; | 215 int num_created_receive_streams_; |
213 }; | 216 }; |
214 | 217 |
215 } // namespace cricket | 218 } // namespace cricket |
216 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_ | 219 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_ |
OLD | NEW |