Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: webrtc/audio/audio_receive_stream.cc

Issue 2709723003: Initial implementation of RtpTransportControllerReceive and related interfaces.
Patch Set: Adapt Call to use the new RtpTransportReceive class. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/audio/audio_receive_stream.cc
diff --git a/webrtc/audio/audio_receive_stream.cc b/webrtc/audio/audio_receive_stream.cc
index 8c073d9c8c3250e29d132d4cbb27566c999687da..6c5cd7d81144098cc109b251510ca02cc283ff4e 100644
--- a/webrtc/audio/audio_receive_stream.cc
+++ b/webrtc/audio/audio_receive_stream.cc
@@ -67,6 +67,7 @@ AudioReceiveStream::AudioReceiveStream(
const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
webrtc::RtcEventLog* event_log)
: config_(config),
+ rtp_header_extensions_(config.rtp.extensions),
audio_state_(audio_state) {
LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString();
RTC_DCHECK_NE(config_.voe_channel_id, -1);
@@ -99,15 +100,6 @@ AudioReceiveStream::AudioReceiveStream(
channel_proxy_->SetRecPayloadType(kv.first, kv.second);
}
- 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);
}
@@ -303,12 +295,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 {

Powered by Google App Engine
This is Rietveld 408576698