Chromium Code Reviews| Index: webrtc/audio/audio_send_stream.cc |
| diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc |
| index 4dd952295667f7a231497b1202cd70ab10f5ed53..ab5c047b16d1758aa1293a6ecd7c7e32ef472e5e 100644 |
| --- a/webrtc/audio/audio_send_stream.cc |
| +++ b/webrtc/audio/audio_send_stream.cc |
| @@ -17,6 +17,10 @@ |
| #include "webrtc/audio/scoped_voe_interface.h" |
| #include "webrtc/base/checks.h" |
| #include "webrtc/base/logging.h" |
| +#include "webrtc/call/congestion_controller.h" |
| +#include "webrtc/modules/pacing/paced_sender.h" |
| +#include "webrtc/modules/pacing/packet_router.h" |
| +#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| #include "webrtc/voice_engine/channel_proxy.h" |
| #include "webrtc/voice_engine/include/voe_audio_processing.h" |
| #include "webrtc/voice_engine/include/voe_codec.h" |
| @@ -55,7 +59,8 @@ std::string AudioSendStream::Config::ToString() const { |
| namespace internal { |
| AudioSendStream::AudioSendStream( |
| const webrtc::AudioSendStream::Config& config, |
| - const rtc::scoped_refptr<webrtc::AudioState>& audio_state) |
| + const rtc::scoped_refptr<webrtc::AudioState>& audio_state, |
| + CongestionController* congestion_controller) |
| : config_(config), audio_state_(audio_state) { |
| LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); |
| RTC_DCHECK_NE(config_.voe_channel_id, -1); |
| @@ -66,20 +71,33 @@ AudioSendStream::AudioSendStream( |
| channel_proxy_->SetRTCPStatus(true); |
| channel_proxy_->SetLocalSSRC(config.rtp.ssrc); |
| channel_proxy_->SetRTCP_CNAME(config.rtp.c_name); |
| + |
| + TransportFeedbackObserver* transport_feedback_observer = nullptr; |
| + |
|
the sun
2015/11/30 12:37:20
RTC_DCHECK(congestion_controller);
since you deref
stefan-webrtc
2015/11/30 15:22:02
Done.
|
| for (const auto& extension : config.rtp.extensions) { |
| if (extension.name == RtpExtension::kAbsSendTime) { |
| channel_proxy_->SetSendAbsoluteSenderTimeStatus(true, extension.id); |
| } else if (extension.name == RtpExtension::kAudioLevel) { |
| channel_proxy_->SetSendAudioLevelIndicationStatus(true, extension.id); |
| + } else if (extension.name == RtpExtension::kTransportSequenceNumber) { |
|
the sun
2015/11/30 12:37:20
You have 2x "if (extension.name == RtpExtension::k
stefan-webrtc
2015/11/30 15:22:02
Ah, merge problem. Adding the same test that you h
|
| + channel_proxy_->SetSendTransportSequenceNumber(extension.id); |
| + } else if (extension.name == RtpExtension::kTransportSequenceNumber) { |
| + channel_proxy_->SetSendTransportSequenceNumber(extension.id); |
| + transport_feedback_observer = |
| + congestion_controller->GetTransportFeedbackObserver(); |
| } else { |
| RTC_NOTREACHED() << "Registering unsupported RTP extension."; |
| } |
| } |
| + channel_proxy_->SetCongestionControlObjects( |
|
the sun
2015/11/30 12:37:20
Would it be easier to just call this SetCongestion
stefan-webrtc
2015/11/30 15:22:02
It would be a bit more tricky since voice engine c
the sun
2015/12/01 10:25:35
No, likely not.
|
| + congestion_controller->pacer(), transport_feedback_observer, |
| + congestion_controller->packet_router()); |
| } |
| AudioSendStream::~AudioSendStream() { |
| RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString(); |
| + channel_proxy_->SetCongestionControlObjects(nullptr, nullptr, nullptr); |
| } |
| void AudioSendStream::Start() { |