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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 bool UseSendSideBwe(const AudioReceiveStream::Config& config) { | 83 bool UseSendSideBwe(const AudioReceiveStream::Config& config) { |
84 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); | 84 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); |
85 } | 85 } |
86 | 86 |
87 bool UseSendSideBwe(const FlexfecReceiveStream::Config& config) { | 87 bool UseSendSideBwe(const FlexfecReceiveStream::Config& config) { |
88 return UseSendSideBwe(config.rtp_header_extensions, config.transport_cc); | 88 return UseSendSideBwe(config.rtp_header_extensions, config.transport_cc); |
89 } | 89 } |
90 | 90 |
| 91 rtclog::StreamConfig CreateRtcLogStreamConfig( |
| 92 const VideoReceiveStream::Config& config) { |
| 93 rtclog::StreamConfig rtclog_config; |
| 94 rtclog_config.remote_ssrc = config.rtp.remote_ssrc; |
| 95 rtclog_config.local_ssrc = config.rtp.local_ssrc; |
| 96 rtclog_config.rtx_ssrc = config.rtp.rtx_ssrc; |
| 97 rtclog_config.rtcp_mode = config.rtp.rtcp_mode; |
| 98 rtclog_config.remb = config.rtp.remb; |
| 99 rtclog_config.rtp_extensions = config.rtp.extensions; |
| 100 |
| 101 for (const auto& d : config.decoders) { |
| 102 auto search = config.rtp.rtx_payload_types.find(d.payload_type); |
| 103 rtclog_config.codecs.emplace_back( |
| 104 d.payload_name, d.payload_type, |
| 105 search != config.rtp.rtx_payload_types.end() ? search->second : 0); |
| 106 } |
| 107 return rtclog_config; |
| 108 } |
| 109 |
91 } // namespace | 110 } // namespace |
92 | 111 |
93 namespace internal { | 112 namespace internal { |
94 | 113 |
95 class Call : public webrtc::Call, | 114 class Call : public webrtc::Call, |
96 public PacketReceiver, | 115 public PacketReceiver, |
97 public RecoveredPacketReceiver, | 116 public RecoveredPacketReceiver, |
98 public SendSideCongestionController::Observer, | 117 public SendSideCongestionController::Observer, |
99 public BitrateAllocator::LimitObserver { | 118 public BitrateAllocator::LimitObserver { |
100 public: | 119 public: |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 // type, we may get an incorrect value for the rtx stream, but | 722 // type, we may get an incorrect value for the rtx stream, but |
704 // that is unlikely to matter in practice. | 723 // that is unlikely to matter in practice. |
705 receive_rtp_config_[config.rtp.rtx_ssrc] = receive_config; | 724 receive_rtp_config_[config.rtp.rtx_ssrc] = receive_config; |
706 } | 725 } |
707 receive_rtp_config_[config.rtp.remote_ssrc] = receive_config; | 726 receive_rtp_config_[config.rtp.remote_ssrc] = receive_config; |
708 video_receive_streams_.insert(receive_stream); | 727 video_receive_streams_.insert(receive_stream); |
709 ConfigureSync(config.sync_group); | 728 ConfigureSync(config.sync_group); |
710 } | 729 } |
711 receive_stream->SignalNetworkState(video_network_state_); | 730 receive_stream->SignalNetworkState(video_network_state_); |
712 UpdateAggregateNetworkState(); | 731 UpdateAggregateNetworkState(); |
713 event_log_->LogVideoReceiveStreamConfig(config); | 732 event_log_->LogVideoReceiveStreamConfig(CreateRtcLogStreamConfig(config)); |
714 return receive_stream; | 733 return receive_stream; |
715 } | 734 } |
716 | 735 |
717 void Call::DestroyVideoReceiveStream( | 736 void Call::DestroyVideoReceiveStream( |
718 webrtc::VideoReceiveStream* receive_stream) { | 737 webrtc::VideoReceiveStream* receive_stream) { |
719 TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream"); | 738 TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream"); |
720 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 739 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
721 RTC_DCHECK(receive_stream != nullptr); | 740 RTC_DCHECK(receive_stream != nullptr); |
722 VideoReceiveStream* receive_stream_impl = | 741 VideoReceiveStream* receive_stream_impl = |
723 static_cast<VideoReceiveStream*>(receive_stream); | 742 static_cast<VideoReceiveStream*>(receive_stream); |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1251 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
1233 receive_side_cc_.OnReceivedPacket( | 1252 receive_side_cc_.OnReceivedPacket( |
1234 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1253 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
1235 header); | 1254 header); |
1236 } | 1255 } |
1237 } | 1256 } |
1238 | 1257 |
1239 } // namespace internal | 1258 } // namespace internal |
1240 | 1259 |
1241 } // namespace webrtc | 1260 } // namespace webrtc |
OLD | NEW |