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