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 |
(...skipping 10 matching lines...) Expand all Loading... | |
21 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {} | 21 ChannelProxy::ChannelProxy() : channel_owner_(nullptr) {} |
22 | 22 |
23 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) : | 23 ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) : |
24 channel_owner_(channel_owner) { | 24 channel_owner_(channel_owner) { |
25 RTC_CHECK(channel_owner_.channel()); | 25 RTC_CHECK(channel_owner_.channel()); |
26 module_process_thread_checker_.DetachFromThread(); | 26 module_process_thread_checker_.DetachFromThread(); |
27 } | 27 } |
28 | 28 |
29 ChannelProxy::~ChannelProxy() {} | 29 ChannelProxy::~ChannelProxy() {} |
30 | 30 |
31 bool ChannelProxy::SetEncoder(int payload_type, | |
32 std::unique_ptr<AudioEncoder> encoder) { | |
the sun
2017/03/02 20:44:22
add thread check + dcheck assumptions on pt range
ossu
2017/03/04 01:38:52
I've added the thread check here (since ChannelPro
| |
33 return channel()->SetEncoder(payload_type, std::move(encoder)); | |
34 } | |
35 | |
31 void ChannelProxy::SetRTCPStatus(bool enable) { | 36 void ChannelProxy::SetRTCPStatus(bool enable) { |
32 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 37 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
33 channel()->SetRTCPStatus(enable); | 38 channel()->SetRTCPStatus(enable); |
34 } | 39 } |
35 | 40 |
36 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) { | 41 void ChannelProxy::SetLocalSSRC(uint32_t ssrc) { |
37 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 42 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
38 int error = channel()->SetLocalSSRC(ssrc); | 43 int error = channel()->SetLocalSSRC(ssrc); |
39 RTC_DCHECK_EQ(0, error); | 44 RTC_DCHECK_EQ(0, error); |
40 } | 45 } |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 return channel()->SetSendCNPayloadType(type, frequency) == 0; | 367 return channel()->SetSendCNPayloadType(type, frequency) == 0; |
363 } | 368 } |
364 | 369 |
365 Channel* ChannelProxy::channel() const { | 370 Channel* ChannelProxy::channel() const { |
366 RTC_DCHECK(channel_owner_.channel()); | 371 RTC_DCHECK(channel_owner_.channel()); |
367 return channel_owner_.channel(); | 372 return channel_owner_.channel(); |
368 } | 373 } |
369 | 374 |
370 } // namespace voe | 375 } // namespace voe |
371 } // namespace webrtc | 376 } // namespace webrtc |
OLD | NEW |