| 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 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ | 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
| 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ | 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
| 13 | 13 |
| 14 #include "webrtc/base/thread_checker.h" |
| 14 #include "webrtc/voice_engine/channel_manager.h" | 15 #include "webrtc/voice_engine/channel_manager.h" |
| 16 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
| 15 | 17 |
| 16 #include <string> | 18 #include <string> |
| 19 #include <vector> |
| 17 | 20 |
| 18 namespace webrtc { | 21 namespace webrtc { |
| 19 namespace voe { | 22 namespace voe { |
| 20 | 23 |
| 24 class Channel; |
| 25 |
| 21 // This class provides the "view" of a voe::Channel that we need to implement | 26 // This class provides the "view" of a voe::Channel that we need to implement |
| 22 // webrtc::AudioSendStream and webrtc::AudioReceiveStream. It serves two | 27 // webrtc::AudioSendStream and webrtc::AudioReceiveStream. It serves two |
| 23 // purposes: | 28 // purposes: |
| 24 // 1. Allow mocking just the interfaces used, instead of the entire | 29 // 1. Allow mocking just the interfaces used, instead of the entire |
| 25 // voe::Channel class. | 30 // voe::Channel class. |
| 26 // 2. Provide a refined interface for the stream classes, including assumptions | 31 // 2. Provide a refined interface for the stream classes, including assumptions |
| 27 // on return values and input adaptation. | 32 // on return values and input adaptation. |
| 28 class ChannelProxy { | 33 class ChannelProxy { |
| 29 public: | 34 public: |
| 30 ChannelProxy(); | 35 ChannelProxy(); |
| 31 explicit ChannelProxy(const ChannelOwner& channel_owner); | 36 explicit ChannelProxy(const ChannelOwner& channel_owner); |
| 32 virtual ~ChannelProxy() {} | 37 virtual ~ChannelProxy() {} |
| 33 | 38 |
| 34 virtual void SetRTCPStatus(bool enable); | 39 virtual void SetRTCPStatus(bool enable); |
| 35 virtual void SetLocalSSRC(uint32_t ssrc); | 40 virtual void SetLocalSSRC(uint32_t ssrc); |
| 36 virtual void SetRTCP_CNAME(const std::string& c_name); | 41 virtual void SetRTCP_CNAME(const std::string& c_name); |
| 42 virtual void SetSendAbsoluteSenderTimeStatus(bool enable, int id); |
| 43 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id); |
| 44 virtual void SetReceiveAbsoluteSenderTimeStatus(bool enable, int id); |
| 45 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id); |
| 46 |
| 47 virtual CallStatistics GetRTCPStatistics() const; |
| 48 virtual std::vector<ReportBlock> GetRemoteRTCPReportBlocks() const; |
| 49 virtual NetworkStatistics GetNetworkStatistics() const; |
| 50 virtual AudioDecodingCallStats GetDecodingCallStatistics() const; |
| 51 virtual int32_t GetSpeechOutputLevelFullRange() const; |
| 52 virtual uint32_t GetDelayEstimate() const; |
| 37 | 53 |
| 38 private: | 54 private: |
| 55 Channel* channel() const; |
| 56 |
| 57 rtc::ThreadChecker thread_checker_; |
| 39 ChannelOwner channel_owner_; | 58 ChannelOwner channel_owner_; |
| 40 }; | 59 }; |
| 41 } // namespace voe | 60 } // namespace voe |
| 42 } // namespace webrtc | 61 } // namespace webrtc |
| 43 | 62 |
| 44 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ | 63 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
| OLD | NEW |