OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 } | 44 } |
45 return false; | 45 return false; |
46 } | 46 } |
47 } // namespace | 47 } // namespace |
48 | 48 |
49 std::string AudioReceiveStream::Config::Rtp::ToString() const { | 49 std::string AudioReceiveStream::Config::Rtp::ToString() const { |
50 std::stringstream ss; | 50 std::stringstream ss; |
51 ss << "{remote_ssrc: " << remote_ssrc; | 51 ss << "{remote_ssrc: " << remote_ssrc; |
52 ss << ", local_ssrc: " << local_ssrc; | 52 ss << ", local_ssrc: " << local_ssrc; |
| 53 ss << ", transport_cc: " << (transport_cc ? "on" : "off"); |
| 54 ss << ", nack: " << nack.ToString(); |
53 ss << ", extensions: ["; | 55 ss << ", extensions: ["; |
54 for (size_t i = 0; i < extensions.size(); ++i) { | 56 for (size_t i = 0; i < extensions.size(); ++i) { |
55 ss << extensions[i].ToString(); | 57 ss << extensions[i].ToString(); |
56 if (i != extensions.size() - 1) { | 58 if (i != extensions.size() - 1) { |
57 ss << ", "; | 59 ss << ", "; |
58 } | 60 } |
59 } | 61 } |
60 ss << ']'; | 62 ss << ']'; |
61 ss << ", transport_cc: " << (transport_cc ? "on" : "off"); | |
62 ss << '}'; | 63 ss << '}'; |
63 return ss.str(); | 64 return ss.str(); |
64 } | 65 } |
65 | 66 |
66 std::string AudioReceiveStream::Config::ToString() const { | 67 std::string AudioReceiveStream::Config::ToString() const { |
67 std::stringstream ss; | 68 std::stringstream ss; |
68 ss << "{rtp: " << rtp.ToString(); | 69 ss << "{rtp: " << rtp.ToString(); |
69 ss << ", rtcp_send_transport: " | 70 ss << ", rtcp_send_transport: " |
70 << (rtcp_send_transport ? "(Transport)" : "nullptr"); | 71 << (rtcp_send_transport ? "(Transport)" : "nullptr"); |
71 ss << ", voe_channel_id: " << voe_channel_id; | 72 ss << ", voe_channel_id: " << voe_channel_id; |
(...skipping 14 matching lines...) Expand all Loading... |
86 rtp_header_parser_(RtpHeaderParser::Create()) { | 87 rtp_header_parser_(RtpHeaderParser::Create()) { |
87 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString(); | 88 LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString(); |
88 RTC_DCHECK_NE(config_.voe_channel_id, -1); | 89 RTC_DCHECK_NE(config_.voe_channel_id, -1); |
89 RTC_DCHECK(audio_state_.get()); | 90 RTC_DCHECK(audio_state_.get()); |
90 RTC_DCHECK(congestion_controller); | 91 RTC_DCHECK(congestion_controller); |
91 RTC_DCHECK(rtp_header_parser_); | 92 RTC_DCHECK(rtp_header_parser_); |
92 | 93 |
93 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); | 94 VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
94 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); | 95 channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); |
95 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); | 96 channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc); |
| 97 // TODO(solenberg): Config NACK history window (which is a packet count), |
| 98 // using the actual packet size for the configured codec. |
| 99 channel_proxy_->SetNACKStatus(config_.rtp.nack.rtp_history_ms != 0, |
| 100 config_.rtp.nack.rtp_history_ms / 20); |
96 | 101 |
97 // TODO(ossu): This is where we'd like to set the decoder factory to | 102 // TODO(ossu): This is where we'd like to set the decoder factory to |
98 // use. However, since it needs to be included when constructing Channel, we | 103 // use. However, since it needs to be included when constructing Channel, we |
99 // cannot do that until we're able to move Channel ownership into the | 104 // cannot do that until we're able to move Channel ownership into the |
100 // Audio{Send,Receive}Streams. The best we can do is check that we're not | 105 // Audio{Send,Receive}Streams. The best we can do is check that we're not |
101 // trying to use two different factories using the different interfaces. | 106 // trying to use two different factories using the different interfaces. |
102 RTC_CHECK(config.decoder_factory); | 107 RTC_CHECK(config.decoder_factory); |
103 RTC_CHECK_EQ(config.decoder_factory, | 108 RTC_CHECK_EQ(config.decoder_factory, |
104 channel_proxy_->GetAudioDecoderFactory()); | 109 channel_proxy_->GetAudioDecoderFactory()); |
105 | 110 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 257 |
253 VoiceEngine* AudioReceiveStream::voice_engine() const { | 258 VoiceEngine* AudioReceiveStream::voice_engine() const { |
254 internal::AudioState* audio_state = | 259 internal::AudioState* audio_state = |
255 static_cast<internal::AudioState*>(audio_state_.get()); | 260 static_cast<internal::AudioState*>(audio_state_.get()); |
256 VoiceEngine* voice_engine = audio_state->voice_engine(); | 261 VoiceEngine* voice_engine = audio_state->voice_engine(); |
257 RTC_DCHECK(voice_engine); | 262 RTC_DCHECK(voice_engine); |
258 return voice_engine; | 263 return voice_engine; |
259 } | 264 } |
260 } // namespace internal | 265 } // namespace internal |
261 } // namespace webrtc | 266 } // namespace webrtc |
OLD | NEW |