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

Side by Side Diff: webrtc/voice_engine/channel_proxy.cc

Issue 1505253004: Support for remote audio into tracks (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address comments Created 5 years 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
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
11 #include "webrtc/voice_engine/channel_proxy.h" 11 #include "webrtc/voice_engine/channel_proxy.h"
12 12
13 #include <utility>
14
13 #include "webrtc/base/checks.h" 15 #include "webrtc/base/checks.h"
14 #include "webrtc/voice_engine/channel.h" 16 #include "webrtc/voice_engine/channel.h"
15 17
16 namespace webrtc { 18 namespace webrtc {
17 namespace voe { 19 namespace voe {
18 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {} 20 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {}
19 21
20 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) : 22 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) :
21 channel_owner_(channel_owner) { 23 channel_owner_(channel_owner) {
22 RTC_CHECK(channel_owner_.channel()); 24 RTC_CHECK(channel_owner_.channel());
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return channel()->SetSendTelephoneEventPayloadType(payload_type) == 0; 129 return channel()->SetSendTelephoneEventPayloadType(payload_type) == 0;
128 } 130 }
129 131
130 bool ChannelProxy::SendTelephoneEventOutband(uint8_t event, 132 bool ChannelProxy::SendTelephoneEventOutband(uint8_t event,
131 uint32_t duration_ms) { 133 uint32_t duration_ms) {
132 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 134 RTC_DCHECK(thread_checker_.CalledOnValidThread());
133 return 135 return
134 channel()->SendTelephoneEventOutband(event, duration_ms, 10, false) == 0; 136 channel()->SendTelephoneEventOutband(event, duration_ms, 10, false) == 0;
135 } 137 }
136 138
139 void ChannelProxy::SetSink(rtc::scoped_ptr<AudioSinkInterface> sink) {
140 RTC_DCHECK(thread_checker_.CalledOnValidThread());
141 channel()->SetSink(std::move(sink));
142 }
143
137 Channel* ChannelProxy::channel() const { 144 Channel* ChannelProxy::channel() const {
138 RTC_DCHECK(channel_owner_.channel()); 145 RTC_DCHECK(channel_owner_.channel());
139 return channel_owner_.channel(); 146 return channel_owner_.channel();
140 } 147 }
141 148
142 } // namespace voe 149 } // namespace voe
143 } // namespace webrtc 150 } // namespace webrtc
OLDNEW
« webrtc/base/format_macros.h ('K') | « webrtc/voice_engine/channel_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698