Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1395)

Side by Side Diff: webrtc/media/engine/fakewebrtccall.h

Issue 2511703002: Wire up FlexFEC in VideoEngine2. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 void Start() override; 188 void Start() override;
189 void Stop() override; 189 void Stop() override;
190 190
191 webrtc::VideoReceiveStream::Stats GetStats() const override; 191 webrtc::VideoReceiveStream::Stats GetStats() const override;
192 192
193 webrtc::VideoReceiveStream::Config config_; 193 webrtc::VideoReceiveStream::Config config_;
194 bool receiving_; 194 bool receiving_;
195 webrtc::VideoReceiveStream::Stats stats_; 195 webrtc::VideoReceiveStream::Stats stats_;
196 }; 196 };
197 197
198 class FakeFlexfecReceiveStream final : public webrtc::FlexfecReceiveStream {
199 public:
200 explicit FakeFlexfecReceiveStream(
201 webrtc::FlexfecReceiveStream::Config config);
202
203 const webrtc::FlexfecReceiveStream::Config& GetConfig();
204
205 private:
206 // webrtc::FlexfecReceiveStream implementation.
207 void Start() override;
208 void Stop() override;
209
210 webrtc::FlexfecReceiveStream::Stats GetStats() const override;
211
212 webrtc::FlexfecReceiveStream::Config config_;
213 bool receiving_;
214 };
215
198 class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver { 216 class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver {
199 public: 217 public:
200 explicit FakeCall(const webrtc::Call::Config& config); 218 explicit FakeCall(const webrtc::Call::Config& config);
201 ~FakeCall() override; 219 ~FakeCall() override;
202 220
203 webrtc::Call::Config GetConfig() const; 221 webrtc::Call::Config GetConfig() const;
204 const std::vector<FakeVideoSendStream*>& GetVideoSendStreams(); 222 const std::vector<FakeVideoSendStream*>& GetVideoSendStreams();
205 const std::vector<FakeVideoReceiveStream*>& GetVideoReceiveStreams(); 223 const std::vector<FakeVideoReceiveStream*>& GetVideoReceiveStreams();
206 224
207 const std::vector<FakeAudioSendStream*>& GetAudioSendStreams(); 225 const std::vector<FakeAudioSendStream*>& GetAudioSendStreams();
208 const FakeAudioSendStream* GetAudioSendStream(uint32_t ssrc); 226 const FakeAudioSendStream* GetAudioSendStream(uint32_t ssrc);
209 const std::vector<FakeAudioReceiveStream*>& GetAudioReceiveStreams(); 227 const std::vector<FakeAudioReceiveStream*>& GetAudioReceiveStreams();
210 const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc); 228 const FakeAudioReceiveStream* GetAudioReceiveStream(uint32_t ssrc);
211 229
230 const std::vector<FakeFlexfecReceiveStream*>& GetFlexfecReceiveStreams();
231
212 rtc::SentPacket last_sent_packet() const { return last_sent_packet_; } 232 rtc::SentPacket last_sent_packet() const { return last_sent_packet_; }
213 233
214 // This is useful if we care about the last media packet (with id populated) 234 // This is useful if we care about the last media packet (with id populated)
215 // but not the last ICE packet (with -1 ID). 235 // but not the last ICE packet (with -1 ID).
216 int last_sent_nonnegative_packet_id() const { 236 int last_sent_nonnegative_packet_id() const {
217 return last_sent_nonnegative_packet_id_; 237 return last_sent_nonnegative_packet_id_;
218 } 238 }
219 239
220 webrtc::NetworkState GetNetworkState(webrtc::MediaType media) const; 240 webrtc::NetworkState GetNetworkState(webrtc::MediaType media) const;
221 int GetNumCreatedSendStreams() const; 241 int GetNumCreatedSendStreams() const;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 webrtc::Call::Config config_; 289 webrtc::Call::Config config_;
270 webrtc::NetworkState audio_network_state_; 290 webrtc::NetworkState audio_network_state_;
271 webrtc::NetworkState video_network_state_; 291 webrtc::NetworkState video_network_state_;
272 rtc::SentPacket last_sent_packet_; 292 rtc::SentPacket last_sent_packet_;
273 int last_sent_nonnegative_packet_id_ = -1; 293 int last_sent_nonnegative_packet_id_ = -1;
274 webrtc::Call::Stats stats_; 294 webrtc::Call::Stats stats_;
275 std::vector<FakeVideoSendStream*> video_send_streams_; 295 std::vector<FakeVideoSendStream*> video_send_streams_;
276 std::vector<FakeAudioSendStream*> audio_send_streams_; 296 std::vector<FakeAudioSendStream*> audio_send_streams_;
277 std::vector<FakeVideoReceiveStream*> video_receive_streams_; 297 std::vector<FakeVideoReceiveStream*> video_receive_streams_;
278 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; 298 std::vector<FakeAudioReceiveStream*> audio_receive_streams_;
299 std::vector<FakeFlexfecReceiveStream*> flexfec_receive_streams_;
stefan-webrtc 2016/11/17 12:48:59 std::vector<unique_ptr<...>>?
brandtr 2016/11/17 13:23:36 That would be nice. I'll do that in another CL tho
brandtr 2016/11/21 11:41:13 See discussion here: https://codereview.webrtc.org
279 300
280 int num_created_send_streams_; 301 int num_created_send_streams_;
281 int num_created_receive_streams_; 302 int num_created_receive_streams_;
282 303
283 int audio_transport_overhead_; 304 int audio_transport_overhead_;
284 int video_transport_overhead_; 305 int video_transport_overhead_;
285 }; 306 };
286 307
287 } // namespace cricket 308 } // namespace cricket
288 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ 309 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698