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

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

Issue 2974453002: Protected streams report RTP messages directly to the FlexFec streams (Closed)
Patch Set: s/AssociateTo/AssociateWith Created 3 years, 4 months 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void FakeVideoReceiveStream::SetStats( 325 void FakeVideoReceiveStream::SetStats(
326 const webrtc::VideoReceiveStream::Stats& stats) { 326 const webrtc::VideoReceiveStream::Stats& stats) {
327 stats_ = stats; 327 stats_ = stats;
328 } 328 }
329 329
330 void FakeVideoReceiveStream::EnableEncodedFrameRecording(rtc::PlatformFile file, 330 void FakeVideoReceiveStream::EnableEncodedFrameRecording(rtc::PlatformFile file,
331 size_t byte_limit) { 331 size_t byte_limit) {
332 rtc::ClosePlatformFile(file); 332 rtc::ClosePlatformFile(file);
333 } 333 }
334 334
335 void FakeVideoReceiveStream::AddSecondarySink(
336 webrtc::RtpPacketSinkInterface* sink) {
337 }
338
339 void FakeVideoReceiveStream::RemoveSecondarySink(
340 const webrtc::RtpPacketSinkInterface* sink) {
341 }
342
335 FakeFlexfecReceiveStream::FakeFlexfecReceiveStream( 343 FakeFlexfecReceiveStream::FakeFlexfecReceiveStream(
336 const webrtc::FlexfecReceiveStream::Config& config) 344 const webrtc::FlexfecReceiveStream::Config& config)
337 : config_(config), receiving_(false) {} 345 : config_(config), receiving_(false) {}
338 346
339 const webrtc::FlexfecReceiveStream::Config& 347 const webrtc::FlexfecReceiveStream::Config&
340 FakeFlexfecReceiveStream::GetConfig() const { 348 FakeFlexfecReceiveStream::GetConfig() const {
341 return config_; 349 return config_;
342 } 350 }
343 351
344 void FakeFlexfecReceiveStream::Start() { 352 void FakeFlexfecReceiveStream::Start() {
345 receiving_ = true; 353 receiving_ = true;
346 } 354 }
347 355
348 void FakeFlexfecReceiveStream::Stop() { 356 void FakeFlexfecReceiveStream::Stop() {
349 receiving_ = false; 357 receiving_ = false;
350 } 358 }
351 359
352 // TODO(brandtr): Implement when the stats have been designed. 360 // TODO(brandtr): Implement when the stats have been designed.
353 webrtc::FlexfecReceiveStream::Stats FakeFlexfecReceiveStream::GetStats() const { 361 webrtc::FlexfecReceiveStream::Stats FakeFlexfecReceiveStream::GetStats() const {
354 return webrtc::FlexfecReceiveStream::Stats(); 362 return webrtc::FlexfecReceiveStream::Stats();
355 } 363 }
356 364
365 void FakeFlexfecReceiveStream::OnRtpPacket(const webrtc::RtpPacketReceived&) {
366 RTC_NOTREACHED() << "Not implemented.";
367 }
368
357 FakeCall::FakeCall(const webrtc::Call::Config& config) 369 FakeCall::FakeCall(const webrtc::Call::Config& config)
358 : config_(config), 370 : config_(config),
359 audio_network_state_(webrtc::kNetworkUp), 371 audio_network_state_(webrtc::kNetworkUp),
360 video_network_state_(webrtc::kNetworkUp), 372 video_network_state_(webrtc::kNetworkUp),
361 num_created_send_streams_(0), 373 num_created_send_streams_(0),
362 num_created_receive_streams_(0), 374 num_created_receive_streams_(0),
363 audio_transport_overhead_(0), 375 audio_transport_overhead_(0),
364 video_transport_overhead_(0) {} 376 video_transport_overhead_(0) {}
365 377
366 FakeCall::~FakeCall() { 378 FakeCall::~FakeCall() {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 } 643 }
632 644
633 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { 645 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) {
634 last_sent_packet_ = sent_packet; 646 last_sent_packet_ = sent_packet;
635 if (sent_packet.packet_id >= 0) { 647 if (sent_packet.packet_id >= 0) {
636 last_sent_nonnegative_packet_id_ = sent_packet.packet_id; 648 last_sent_nonnegative_packet_id_ = sent_packet.packet_id;
637 } 649 }
638 } 650 }
639 651
640 } // namespace cricket 652 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698