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

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

Issue 2535173008: Clean up FlexfecReceiveStream ctor signatures. (CL0) (Closed)
Patch Set: Rebase. Created 4 years 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
« no previous file with comments | « webrtc/call/call.h ('k') | webrtc/call/flexfec_receive_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 webrtc::VideoSendStream::Config config, 85 webrtc::VideoSendStream::Config config,
86 VideoEncoderConfig encoder_config) override; 86 VideoEncoderConfig encoder_config) override;
87 void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) override; 87 void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) override;
88 88
89 webrtc::VideoReceiveStream* CreateVideoReceiveStream( 89 webrtc::VideoReceiveStream* CreateVideoReceiveStream(
90 webrtc::VideoReceiveStream::Config configuration) override; 90 webrtc::VideoReceiveStream::Config configuration) override;
91 void DestroyVideoReceiveStream( 91 void DestroyVideoReceiveStream(
92 webrtc::VideoReceiveStream* receive_stream) override; 92 webrtc::VideoReceiveStream* receive_stream) override;
93 93
94 webrtc::FlexfecReceiveStream* CreateFlexfecReceiveStream( 94 webrtc::FlexfecReceiveStream* CreateFlexfecReceiveStream(
95 webrtc::FlexfecReceiveStream::Config configuration) override; 95 const webrtc::FlexfecReceiveStream::Config& config) override;
96 void DestroyFlexfecReceiveStream( 96 void DestroyFlexfecReceiveStream(
97 webrtc::FlexfecReceiveStream* receive_stream) override; 97 webrtc::FlexfecReceiveStream* receive_stream) override;
98 98
99 Stats GetStats() const override; 99 Stats GetStats() const override;
100 100
101 // Implements PacketReceiver. 101 // Implements PacketReceiver.
102 DeliveryStatus DeliverPacket(MediaType media_type, 102 DeliveryStatus DeliverPacket(MediaType media_type,
103 const uint8_t* packet, 103 const uint8_t* packet,
104 size_t length, 104 size_t length,
105 const PacketTime& packet_time) override; 105 const PacketTime& packet_time) override;
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 } 649 }
650 video_receive_streams_.erase(receive_stream_impl); 650 video_receive_streams_.erase(receive_stream_impl);
651 RTC_CHECK(receive_stream_impl != nullptr); 651 RTC_CHECK(receive_stream_impl != nullptr);
652 ConfigureSync(receive_stream_impl->config().sync_group); 652 ConfigureSync(receive_stream_impl->config().sync_group);
653 } 653 }
654 UpdateAggregateNetworkState(); 654 UpdateAggregateNetworkState();
655 delete receive_stream_impl; 655 delete receive_stream_impl;
656 } 656 }
657 657
658 webrtc::FlexfecReceiveStream* Call::CreateFlexfecReceiveStream( 658 webrtc::FlexfecReceiveStream* Call::CreateFlexfecReceiveStream(
659 webrtc::FlexfecReceiveStream::Config configuration) { 659 const webrtc::FlexfecReceiveStream::Config& config) {
660 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream"); 660 TRACE_EVENT0("webrtc", "Call::CreateFlexfecReceiveStream");
661 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 661 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
662 FlexfecReceiveStream* receive_stream = 662 FlexfecReceiveStream* receive_stream = new FlexfecReceiveStream(config, this);
663 new FlexfecReceiveStream(std::move(configuration), this);
664 663
665 const webrtc::FlexfecReceiveStream::Config& config = receive_stream->config();
666 { 664 {
667 WriteLockScoped write_lock(*receive_crit_); 665 WriteLockScoped write_lock(*receive_crit_);
668 for (auto ssrc : config.protected_media_ssrcs) 666 for (auto ssrc : config.protected_media_ssrcs)
669 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream)); 667 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream));
670 RTC_DCHECK(flexfec_receive_ssrcs_protection_.find(config.flexfec_ssrc) == 668 RTC_DCHECK(flexfec_receive_ssrcs_protection_.find(config.flexfec_ssrc) ==
671 flexfec_receive_ssrcs_protection_.end()); 669 flexfec_receive_ssrcs_protection_.end());
672 flexfec_receive_ssrcs_protection_[config.flexfec_ssrc] = receive_stream; 670 flexfec_receive_ssrcs_protection_[config.flexfec_ssrc] = receive_stream;
673 flexfec_receive_streams_.insert(receive_stream); 671 flexfec_receive_streams_.insert(receive_stream);
674 } 672 }
675 // TODO(brandtr): Store config in RtcEventLog here. 673 // TODO(brandtr): Store config in RtcEventLog here.
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); 1122 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]);
1125 ReadLockScoped read_lock(*receive_crit_); 1123 ReadLockScoped read_lock(*receive_crit_);
1126 auto it = video_receive_ssrcs_.find(ssrc); 1124 auto it = video_receive_ssrcs_.find(ssrc);
1127 if (it == video_receive_ssrcs_.end()) 1125 if (it == video_receive_ssrcs_.end())
1128 return false; 1126 return false;
1129 return it->second->OnRecoveredPacket(packet, length); 1127 return it->second->OnRecoveredPacket(packet, length);
1130 } 1128 }
1131 1129
1132 } // namespace internal 1130 } // namespace internal
1133 } // namespace webrtc 1131 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/call.h ('k') | webrtc/call/flexfec_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698