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

Side by Side Diff: audio/audio_receive_stream.cc

Issue 3020473002: Remove voe::Statistics. (Closed)
Patch Set: rebase Created 3 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // TODO(ossu): This is where we'd like to set the decoder factory to 88 // TODO(ossu): This is where we'd like to set the decoder factory to
89 // use. However, since it needs to be included when constructing Channel, we 89 // use. However, since it needs to be included when constructing Channel, we
90 // cannot do that until we're able to move Channel ownership into the 90 // cannot do that until we're able to move Channel ownership into the
91 // Audio{Send,Receive}Streams. The best we can do is check that we're not 91 // Audio{Send,Receive}Streams. The best we can do is check that we're not
92 // trying to use two different factories using the different interfaces. 92 // trying to use two different factories using the different interfaces.
93 RTC_CHECK(config.decoder_factory); 93 RTC_CHECK(config.decoder_factory);
94 RTC_CHECK_EQ(config.decoder_factory, 94 RTC_CHECK_EQ(config.decoder_factory,
95 channel_proxy_->GetAudioDecoderFactory()); 95 channel_proxy_->GetAudioDecoderFactory());
96 96
97 channel_proxy_->RegisterExternalTransport(config.rtcp_send_transport); 97 channel_proxy_->RegisterTransport(config.rtcp_send_transport);
98 channel_proxy_->SetReceiveCodecs(config.decoder_map); 98 channel_proxy_->SetReceiveCodecs(config.decoder_map);
99 99
100 for (const auto& extension : config.rtp.extensions) { 100 for (const auto& extension : config.rtp.extensions) {
101 if (extension.uri == RtpExtension::kAudioLevelUri) { 101 if (extension.uri == RtpExtension::kAudioLevelUri) {
102 channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id); 102 channel_proxy_->SetReceiveAudioLevelIndicationStatus(true, extension.id);
103 } else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) { 103 } else if (extension.uri == RtpExtension::kTransportSequenceNumberUri) {
104 channel_proxy_->EnableReceiveTransportSequenceNumber(extension.id); 104 channel_proxy_->EnableReceiveTransportSequenceNumber(extension.id);
105 } else { 105 } else {
106 RTC_NOTREACHED() << "Unsupported RTP extension."; 106 RTC_NOTREACHED() << "Unsupported RTP extension.";
107 } 107 }
108 } 108 }
109 // Configure bandwidth estimation. 109 // Configure bandwidth estimation.
110 channel_proxy_->RegisterReceiverCongestionControlObjects(packet_router); 110 channel_proxy_->RegisterReceiverCongestionControlObjects(packet_router);
111 111
112 // Register with transport. 112 // Register with transport.
113 rtp_stream_receiver_ = 113 rtp_stream_receiver_ =
114 receiver_controller->CreateReceiver(config_.rtp.remote_ssrc, 114 receiver_controller->CreateReceiver(config_.rtp.remote_ssrc,
115 channel_proxy_.get()); 115 channel_proxy_.get());
116 } 116 }
117 117
118 AudioReceiveStream::~AudioReceiveStream() { 118 AudioReceiveStream::~AudioReceiveStream() {
119 RTC_DCHECK_RUN_ON(&worker_thread_checker_); 119 RTC_DCHECK_RUN_ON(&worker_thread_checker_);
120 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString(); 120 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString();
121 if (playing_) { 121 if (playing_) {
122 Stop(); 122 Stop();
123 } 123 }
124 channel_proxy_->DisassociateSendChannel(); 124 channel_proxy_->DisassociateSendChannel();
125 channel_proxy_->DeRegisterExternalTransport(); 125 channel_proxy_->RegisterTransport(nullptr);
126 channel_proxy_->ResetReceiverCongestionControlObjects(); 126 channel_proxy_->ResetReceiverCongestionControlObjects();
127 channel_proxy_->SetRtcEventLog(nullptr); 127 channel_proxy_->SetRtcEventLog(nullptr);
128 } 128 }
129 129
130 void AudioReceiveStream::Start() { 130 void AudioReceiveStream::Start() {
131 RTC_DCHECK_RUN_ON(&worker_thread_checker_); 131 RTC_DCHECK_RUN_ON(&worker_thread_checker_);
132 if (playing_) { 132 if (playing_) {
133 return; 133 return;
134 } 134 }
135 135
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 int AudioReceiveStream::SetVoiceEnginePlayout(bool playout) { 345 int AudioReceiveStream::SetVoiceEnginePlayout(bool playout) {
346 ScopedVoEInterface<VoEBase> base(voice_engine()); 346 ScopedVoEInterface<VoEBase> base(voice_engine());
347 if (playout) { 347 if (playout) {
348 return base->StartPlayout(config_.voe_channel_id); 348 return base->StartPlayout(config_.voe_channel_id);
349 } else { 349 } else {
350 return base->StopPlayout(config_.voe_channel_id); 350 return base->StopPlayout(config_.voe_channel_id);
351 } 351 }
352 } 352 }
353 } // namespace internal 353 } // namespace internal
354 } // namespace webrtc 354 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698