Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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<AudioSink> sink) { | |
|
the sun
2015/12/11 13:52:01
Thread check please.
tommi (sloooow) - chröme
2015/12/11 14:22:57
Done.
| |
| 140 channel()->SetSink(std::move(sink)); | |
| 141 } | |
| 142 | |
| 137 Channel* ChannelProxy::channel() const { | 143 Channel* ChannelProxy::channel() const { |
| 138 RTC_DCHECK(channel_owner_.channel()); | 144 RTC_DCHECK(channel_owner_.channel()); |
| 139 return channel_owner_.channel(); | 145 return channel_owner_.channel(); |
| 140 } | 146 } |
| 141 | 147 |
| 142 } // namespace voe | 148 } // namespace voe |
| 143 } // namespace webrtc | 149 } // namespace webrtc |
| OLD | NEW |