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

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
15 #include "webrtc/audio/audio_sink.h"
13 #include "webrtc/base/checks.h" 16 #include "webrtc/base/checks.h"
14 #include "webrtc/voice_engine/channel.h" 17 #include "webrtc/voice_engine/channel.h"
15 18
16 namespace webrtc { 19 namespace webrtc {
17 namespace voe { 20 namespace voe {
18 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {} 21 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {}
19 22
20 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) : 23 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) :
21 channel_owner_(channel_owner) { 24 channel_owner_(channel_owner) {
22 RTC_CHECK(channel_owner_.channel()); 25 RTC_CHECK(channel_owner_.channel());
23 } 26 }
24 27
28 ChannelProxy::~ChannelProxy() {}
29
25 void ChannelProxy::SetRTCPStatus(bool enable) { 30 void ChannelProxy::SetRTCPStatus(bool enable) {
26 channel()->SetRTCPStatus(enable); 31 channel()->SetRTCPStatus(enable);
27 } 32 }
28 33
29 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) { 34 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) {
30 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 35 RTC_DCHECK(thread_checker_.CalledOnValidThread());
31 int error = channel()->SetLocalSSRC(ssrc); 36 int error = channel()->SetLocalSSRC(ssrc);
32 RTC_DCHECK_EQ(0, error); 37 RTC_DCHECK_EQ(0, error);
33 } 38 }
34 39
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return channel()->SetSendTelephoneEventPayloadType(payload_type) == 0; 132 return channel()->SetSendTelephoneEventPayloadType(payload_type) == 0;
128 } 133 }
129 134
130 bool ChannelProxy::SendTelephoneEventOutband(uint8_t event, 135 bool ChannelProxy::SendTelephoneEventOutband(uint8_t event,
131 uint32_t duration_ms) { 136 uint32_t duration_ms) {
132 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 137 RTC_DCHECK(thread_checker_.CalledOnValidThread());
133 return 138 return
134 channel()->SendTelephoneEventOutband(event, duration_ms, 10, false) == 0; 139 channel()->SendTelephoneEventOutband(event, duration_ms, 10, false) == 0;
135 } 140 }
136 141
142 void ChannelProxy::SetSink(rtc::scoped_ptr<AudioSinkInterface> sink) {
143 RTC_DCHECK(thread_checker_.CalledOnValidThread());
144 channel()->SetSink(std::move(sink));
145 }
146
137 Channel* ChannelProxy::channel() const { 147 Channel* ChannelProxy::channel() const {
138 RTC_DCHECK(channel_owner_.channel()); 148 RTC_DCHECK(channel_owner_.channel());
139 return channel_owner_.channel(); 149 return channel_owner_.channel();
140 } 150 }
141 151
142 } // namespace voe 152 } // namespace voe
143 } // namespace webrtc 153 } // namespace webrtc
OLDNEW
« talk/session/media/channel.cc ('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