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

Side by Side Diff: webrtc/call/call.cc

Issue 2649973005: Inform jitter buffer about FlexFEC protection. (Closed)
Patch Set: Take 2. Created 3 years, 10 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 } 631 }
632 632
633 UpdateAggregateNetworkState(); 633 UpdateAggregateNetworkState();
634 delete send_stream_impl; 634 delete send_stream_impl;
635 } 635 }
636 636
637 webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream( 637 webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream(
638 webrtc::VideoReceiveStream::Config configuration) { 638 webrtc::VideoReceiveStream::Config configuration) {
639 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream"); 639 TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream");
640 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 640 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
641
642 bool protected_by_flexfec = false;
643 {
644 ReadLockScoped read_lock(*receive_crit_);
645 protected_by_flexfec =
646 flexfec_receive_ssrcs_media_.find(configuration.rtp.remote_ssrc) !=
647 flexfec_receive_ssrcs_media_.end();
648 }
641 VideoReceiveStream* receive_stream = new VideoReceiveStream( 649 VideoReceiveStream* receive_stream = new VideoReceiveStream(
642 num_cpu_cores_, congestion_controller_.get(), &packet_router_, 650 num_cpu_cores_, protected_by_flexfec, congestion_controller_.get(),
643 std::move(configuration), voice_engine(), module_process_thread_.get(), 651 &packet_router_, std::move(configuration), voice_engine(),
644 call_stats_.get(), &remb_); 652 module_process_thread_.get(), call_stats_.get(), &remb_);
645 653
646 const webrtc::VideoReceiveStream::Config& config = receive_stream->config(); 654 const webrtc::VideoReceiveStream::Config& config = receive_stream->config();
647 { 655 {
648 WriteLockScoped write_lock(*receive_crit_); 656 WriteLockScoped write_lock(*receive_crit_);
649 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) == 657 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) ==
650 video_receive_ssrcs_.end()); 658 video_receive_ssrcs_.end());
651 video_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; 659 video_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream;
652 // TODO(pbos): Configure different RTX payloads per receive payload. 660 // TODO(pbos): Configure different RTX payloads per receive payload.
653 VideoReceiveStream::Config::Rtp::RtxMap::const_iterator it = 661 VideoReceiveStream::Config::Rtp::RtxMap::const_iterator it =
654 config.rtp.rtx.begin(); 662 config.rtp.rtx.begin();
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 1210
1203 void Call::NotifyBweOfReceivedPacket(const RtpPacketReceived& packet) { 1211 void Call::NotifyBweOfReceivedPacket(const RtpPacketReceived& packet) {
1204 RTPHeader header; 1212 RTPHeader header;
1205 packet.GetHeader(&header); 1213 packet.GetHeader(&header);
1206 congestion_controller_->OnReceivedPacket(packet.arrival_time_ms(), 1214 congestion_controller_->OnReceivedPacket(packet.arrival_time_ms(),
1207 packet.payload_size(), header); 1215 packet.payload_size(), header);
1208 } 1216 }
1209 1217
1210 } // namespace internal 1218 } // namespace internal
1211 } // namespace webrtc 1219 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698