OLD | NEW |
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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 webrtc::FlexfecReceiveStream* Call::CreateFlexfecReceiveStream( | 658 webrtc::FlexfecReceiveStream* Call::CreateFlexfecReceiveStream( |
659 const webrtc::FlexfecReceiveStream::Config& config) { | 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 = new FlexfecReceiveStream(config, this); | 662 FlexfecReceiveStream* receive_stream = new FlexfecReceiveStream(config, this); |
663 | 663 |
664 { | 664 { |
665 WriteLockScoped write_lock(*receive_crit_); | 665 WriteLockScoped write_lock(*receive_crit_); |
666 for (auto ssrc : config.protected_media_ssrcs) | 666 for (auto ssrc : config.protected_media_ssrcs) |
667 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream)); | 667 flexfec_receive_ssrcs_media_.insert(std::make_pair(ssrc, receive_stream)); |
668 RTC_DCHECK(flexfec_receive_ssrcs_protection_.find(config.flexfec_ssrc) == | 668 RTC_DCHECK(flexfec_receive_ssrcs_protection_.find(config.remote_ssrc) == |
669 flexfec_receive_ssrcs_protection_.end()); | 669 flexfec_receive_ssrcs_protection_.end()); |
670 flexfec_receive_ssrcs_protection_[config.flexfec_ssrc] = receive_stream; | 670 flexfec_receive_ssrcs_protection_[config.remote_ssrc] = receive_stream; |
671 flexfec_receive_streams_.insert(receive_stream); | 671 flexfec_receive_streams_.insert(receive_stream); |
672 } | 672 } |
673 // TODO(brandtr): Store config in RtcEventLog here. | 673 // TODO(brandtr): Store config in RtcEventLog here. |
674 return receive_stream; | 674 return receive_stream; |
675 } | 675 } |
676 | 676 |
677 void Call::DestroyFlexfecReceiveStream( | 677 void Call::DestroyFlexfecReceiveStream( |
678 webrtc::FlexfecReceiveStream* receive_stream) { | 678 webrtc::FlexfecReceiveStream* receive_stream) { |
679 TRACE_EVENT0("webrtc", "Call::DestroyFlexfecReceiveStream"); | 679 TRACE_EVENT0("webrtc", "Call::DestroyFlexfecReceiveStream"); |
680 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 680 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); | 1122 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); |
1123 ReadLockScoped read_lock(*receive_crit_); | 1123 ReadLockScoped read_lock(*receive_crit_); |
1124 auto it = video_receive_ssrcs_.find(ssrc); | 1124 auto it = video_receive_ssrcs_.find(ssrc); |
1125 if (it == video_receive_ssrcs_.end()) | 1125 if (it == video_receive_ssrcs_.end()) |
1126 return false; | 1126 return false; |
1127 return it->second->OnRecoveredPacket(packet, length); | 1127 return it->second->OnRecoveredPacket(packet, length); |
1128 } | 1128 } |
1129 | 1129 |
1130 } // namespace internal | 1130 } // namespace internal |
1131 } // namespace webrtc | 1131 } // namespace webrtc |
OLD | NEW |