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

Unified Diff: webrtc/audio/audio_receive_stream.cc

Issue 1459083007: Open backdoor in VoiceEngineImpl to get at the actual voe::Channel objects from an ID. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: presubmit complaints Created 5 years, 1 month 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
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_receive_stream.cc
diff --git a/webrtc/audio/audio_receive_stream.cc b/webrtc/audio/audio_receive_stream.cc
index 82e8ddfb2283626689b46a735c3d90e2c9a9cf8e..dd3f3c4794134cb059faf53b897f318c0236fe61 100644
--- a/webrtc/audio/audio_receive_stream.cc
+++ b/webrtc/audio/audio_receive_stream.cc
@@ -18,12 +18,14 @@
#include "webrtc/base/logging.h"
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/system_wrappers/include/tick_util.h"
+#include "webrtc/voice_engine/channel_proxy.h"
#include "webrtc/voice_engine/include/voe_base.h"
#include "webrtc/voice_engine/include/voe_codec.h"
#include "webrtc/voice_engine/include/voe_neteq_stats.h"
#include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
#include "webrtc/voice_engine/include/voe_video_sync.h"
#include "webrtc/voice_engine/include/voe_volume_control.h"
+#include "webrtc/voice_engine/voice_engine_impl.h"
namespace webrtc {
std::string AudioReceiveStream::Config::Rtp::ToString() const {
@@ -74,24 +76,26 @@ AudioReceiveStream::AudioReceiveStream(
RTC_DCHECK(audio_state_.get());
RTC_DCHECK(rtp_header_parser_);
+ VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine());
+ channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id);
+ channel_proxy_->SetLocalSSRC(config.rtp.local_ssrc);
+
const int channel_id = config.voe_channel_id;
ScopedVoEInterface<VoERTP_RTCP> rtp(voice_engine());
- int error = rtp->SetLocalSSRC(channel_id, config.rtp.local_ssrc);
- RTC_DCHECK_EQ(0, error);
for (const auto& extension : config.rtp.extensions) {
// One-byte-extension local identifiers are in the range 1-14 inclusive.
RTC_DCHECK_GE(extension.id, 1);
RTC_DCHECK_LE(extension.id, 14);
if (extension.name == RtpExtension::kAudioLevel) {
- error = rtp->SetReceiveAudioLevelIndicationStatus(channel_id, true,
- extension.id);
+ int error = rtp->SetReceiveAudioLevelIndicationStatus(channel_id, true,
+ extension.id);
RTC_DCHECK_EQ(0, error);
bool registered = rtp_header_parser_->RegisterRtpHeaderExtension(
kRtpExtensionAudioLevel, extension.id);
RTC_DCHECK(registered);
} else if (extension.name == RtpExtension::kAbsSendTime) {
- error = rtp->SetReceiveAbsoluteSenderTimeStatus(channel_id, true,
- extension.id);
+ int error = rtp->SetReceiveAbsoluteSenderTimeStatus(channel_id, true,
+ extension.id);
RTC_DCHECK_EQ(0, error);
bool registered = rtp_header_parser_->RegisterRtpHeaderExtension(
kRtpExtensionAbsoluteSendTime, extension.id);
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698