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