Chromium Code Reviews| Index: webrtc/audio/audio_receive_stream.cc |
| diff --git a/webrtc/audio/audio_receive_stream.cc b/webrtc/audio/audio_receive_stream.cc |
| index cb90a68a0f72e6898fe11726d31d2b99c9770c98..9f95362f213f645b004ca9b86ebb8a336e9805db 100644 |
| --- a/webrtc/audio/audio_receive_stream.cc |
| +++ b/webrtc/audio/audio_receive_stream.cc |
| @@ -23,6 +23,7 @@ |
| #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" |
| #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" |
| #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
| +#include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
| #include "webrtc/voice_engine/channel_proxy.h" |
| #include "webrtc/voice_engine/include/voe_base.h" |
| #include "webrtc/voice_engine/voice_engine_impl.h" |
| @@ -67,6 +68,7 @@ AudioReceiveStream::AudioReceiveStream( |
| const rtc::scoped_refptr<webrtc::AudioState>& audio_state, |
| webrtc::RtcEventLog* event_log) |
| : config_(config), |
| + rtp_header_extensions_(config.rtp.extensions), |
|
pthatcher1
2017/04/29 00:58:46
Why not just use the config_.rtp.extensions? Why
nisse-webrtc
2017/05/02 09:34:47
This is also a type conversion, from a vector to t
|
| audio_state_(audio_state) { |
| LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString(); |
| RTC_DCHECK_NE(config_.voe_channel_id, -1); |
| @@ -96,15 +98,6 @@ AudioReceiveStream::AudioReceiveStream( |
| channel_proxy_->RegisterExternalTransport(config.rtcp_send_transport); |
| channel_proxy_->SetReceiveCodecs(config.decoder_map); |
| - for (const auto& extension : config.rtp.extensions) { |
| - if (extension.uri == RtpExtension::kAudioLevelUri) { |
| - channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id); |
| - } else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) { |
| - channel_proxy_->EnableReceiveTransportSequenceNumber(extension.id); |
| - } else { |
| - RTC_NOTREACHED() << "Unsupported RTP extension."; |
| - } |
| - } |
| // Configure bandwidth estimation. |
| channel_proxy_->RegisterReceiverCongestionControlObjects(packet_router); |
| } |
| @@ -305,12 +298,14 @@ bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) { |
| return channel_proxy_->ReceivedRTCPPacket(packet, length); |
| } |
| -void AudioReceiveStream::OnRtpPacket(const RtpPacketReceived& packet) { |
| +bool AudioReceiveStream::OnRtpPacketReceive(RtpPacketReceived* packet) { |
| // TODO(solenberg): Tests call this function on a network thread, libjingle |
| // calls on the worker thread. We should move towards always using a network |
| // thread. Then this check can be enabled. |
| // RTC_DCHECK(!thread_checker_.CalledOnValidThread()); |
| - channel_proxy_->OnRtpPacket(packet); |
| + packet->IdentifyExtensions(rtp_header_extensions_); |
| + channel_proxy_->OnRtpPacket(*packet); |
| + return true; |
| } |
| const webrtc::AudioReceiveStream::Config& AudioReceiveStream::config() const { |