| Index: webrtc/voice_engine/channel_proxy.cc
|
| diff --git a/webrtc/voice_engine/channel_proxy.cc b/webrtc/voice_engine/channel_proxy.cc
|
| index f53db8748cbf53b3ff105c9460f519c2c428b77f..614b7b72fec1c4bde156085710acf0660de294b2 100644
|
| --- a/webrtc/voice_engine/channel_proxy.cc
|
| +++ b/webrtc/voice_engine/channel_proxy.cc
|
| @@ -23,22 +23,94 @@ ChannelProxy::ChannelProxy(const ChannelOwner& channel_owner) :
|
| }
|
|
|
| void ChannelProxy::SetRTCPStatus(bool enable) {
|
| - RTC_DCHECK(channel_owner_.channel());
|
| - channel_owner_.channel()->SetRTCPStatus(enable);
|
| + channel()->SetRTCPStatus(enable);
|
| }
|
|
|
| void ChannelProxy::SetLocalSSRC(uint32_t ssrc) {
|
| - RTC_DCHECK(channel_owner_.channel());
|
| - int error = channel_owner_.channel()->SetLocalSSRC(ssrc);
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + int error = channel()->SetLocalSSRC(ssrc);
|
| RTC_DCHECK_EQ(0, error);
|
| }
|
|
|
| void ChannelProxy::SetRTCP_CNAME(const std::string& c_name) {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| // Note: VoERTP_RTCP::SetRTCP_CNAME() accepts a char[256] array.
|
| std::string c_name_limited = c_name.substr(0, 255);
|
| - RTC_DCHECK(channel_owner_.channel());
|
| - int error = channel_owner_.channel()->SetRTCP_CNAME(c_name_limited.c_str());
|
| + int error = channel()->SetRTCP_CNAME(c_name_limited.c_str());
|
| + RTC_DCHECK_EQ(0, error);
|
| +}
|
| +
|
| +void ChannelProxy::SetSendAbsoluteSenderTimeStatus(bool enable, int id) {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + int error = channel()->SetSendAbsoluteSenderTimeStatus(enable, id);
|
| + RTC_DCHECK_EQ(0, error);
|
| +}
|
| +
|
| +void ChannelProxy::SetSendAudioLevelIndicationStatus(bool enable, int id) {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + int error = channel()->SetSendAudioLevelIndicationStatus(enable, id);
|
| + RTC_DCHECK_EQ(0, error);
|
| +}
|
| +
|
| +void ChannelProxy::SetReceiveAbsoluteSenderTimeStatus(bool enable, int id) {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + int error = channel()->SetReceiveAbsoluteSenderTimeStatus(enable, id);
|
| + RTC_DCHECK_EQ(0, error);
|
| +}
|
| +
|
| +void ChannelProxy::SetReceiveAudioLevelIndicationStatus(bool enable, int id) {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + int error = channel()->SetReceiveAudioLevelIndicationStatus(enable, id);
|
| + RTC_DCHECK_EQ(0, error);
|
| +}
|
| +
|
| +CallStatistics ChannelProxy::GetRTCPStatistics() const {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + CallStatistics stats = {0};
|
| + int error = channel()->GetRTPStatistics(stats);
|
| RTC_DCHECK_EQ(0, error);
|
| + return stats;
|
| +}
|
| +
|
| +std::vector<ReportBlock> ChannelProxy::GetRemoteRTCPReportBlocks() const {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + std::vector<webrtc::ReportBlock> blocks;
|
| + int error = channel()->GetRemoteRTCPReportBlocks(&blocks);
|
| + RTC_DCHECK_EQ(0, error);
|
| + return blocks;
|
| +}
|
| +
|
| +NetworkStatistics ChannelProxy::GetNetworkStatistics() const {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + NetworkStatistics stats = {0};
|
| + int error = channel()->GetNetworkStatistics(stats);
|
| + RTC_DCHECK_EQ(0, error);
|
| + return stats;
|
| +}
|
| +
|
| +AudioDecodingCallStats ChannelProxy::GetDecodingCallStatistics() const {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + AudioDecodingCallStats stats;
|
| + channel()->GetDecodingCallStatistics(&stats);
|
| + return stats;
|
| +}
|
| +
|
| +int32_t ChannelProxy::GetSpeechOutputLevelFullRange() const {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + uint32_t level = 0;
|
| + int error = channel()->GetSpeechOutputLevelFullRange(level);
|
| + RTC_DCHECK_EQ(0, error);
|
| + return static_cast<int32_t>(level);
|
| +}
|
| +
|
| +uint32_t ChannelProxy::GetDelayEstimate() const {
|
| + RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| + return channel()->GetDelayEstimate();
|
| +}
|
| +
|
| +Channel* ChannelProxy::channel() const {
|
| + RTC_DCHECK(channel_owner_.channel());
|
| + return channel_owner_.channel();
|
| }
|
| } // namespace voe
|
| } // namespace webrtc
|
|
|