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/constructormagic.h" | 14 #include "webrtc/base/constructormagic.h" |
15 #include "webrtc/base/thread_checker.h" | 15 #include "webrtc/base/thread_checker.h" |
16 #include "webrtc/voice_engine/channel_manager.h" | 16 #include "webrtc/voice_engine/channel_manager.h" |
17 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 17 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
18 | 18 |
19 #include <memory> | 19 #include <memory> |
20 #include <string> | 20 #include <string> |
21 #include <vector> | 21 #include <vector> |
22 | 22 |
23 namespace webrtc { | 23 namespace webrtc { |
24 | 24 |
25 class AudioSinkInterface; | 25 class AudioSinkInterface; |
26 class PacketRouter; | 26 class PacketRouter; |
27 class RtpPacketSender; | 27 class RtpPacketSender; |
28 class Transport; | |
28 class TransportFeedbackObserver; | 29 class TransportFeedbackObserver; |
29 | 30 |
30 namespace voe { | 31 namespace voe { |
31 | 32 |
32 class Channel; | 33 class Channel; |
33 | 34 |
34 // This class provides the "view" of a voe::Channel that we need to implement | 35 // This class provides the "view" of a voe::Channel that we need to implement |
35 // webrtc::AudioSendStream and webrtc::AudioReceiveStream. It serves two | 36 // webrtc::AudioSendStream and webrtc::AudioReceiveStream. It serves two |
36 // purposes: | 37 // purposes: |
37 // 1. Allow mocking just the interfaces used, instead of the entire | 38 // 1. Allow mocking just the interfaces used, instead of the entire |
(...skipping 27 matching lines...) Expand all Loading... | |
65 virtual std::vector<ReportBlock> GetRemoteRTCPReportBlocks() const; | 66 virtual std::vector<ReportBlock> GetRemoteRTCPReportBlocks() const; |
66 virtual NetworkStatistics GetNetworkStatistics() const; | 67 virtual NetworkStatistics GetNetworkStatistics() const; |
67 virtual AudioDecodingCallStats GetDecodingCallStatistics() const; | 68 virtual AudioDecodingCallStats GetDecodingCallStatistics() const; |
68 virtual int32_t GetSpeechOutputLevelFullRange() const; | 69 virtual int32_t GetSpeechOutputLevelFullRange() const; |
69 virtual uint32_t GetDelayEstimate() const; | 70 virtual uint32_t GetDelayEstimate() const; |
70 | 71 |
71 virtual bool SetSendTelephoneEventPayloadType(int payload_type); | 72 virtual bool SetSendTelephoneEventPayloadType(int payload_type); |
72 virtual bool SendTelephoneEventOutband(int event, int duration_ms); | 73 virtual bool SendTelephoneEventOutband(int event, int duration_ms); |
73 virtual void SetSink(std::unique_ptr<AudioSinkInterface> sink); | 74 virtual void SetSink(std::unique_ptr<AudioSinkInterface> sink); |
74 | 75 |
76 virtual void RegisterExternalTransport(Transport* transport); | |
77 virtual void DeRegisterExternalTransport(); | |
78 virtual bool ReceivedRTPPacket(const uint8_t* packet, | |
tommi
2016/04/23 16:00:09
prefer using CopyOnWriteBuffer here instead of for
mflodman
2016/04/27 13:42:18
I think that as something we should look at, but n
| |
79 size_t length, | |
80 const PacketTime& packet_time); | |
81 virtual bool ReceivedRTCPPacket(const uint8_t* packet, size_t length); | |
82 | |
75 private: | 83 private: |
76 Channel* channel() const; | 84 Channel* channel() const; |
77 | 85 |
78 rtc::ThreadChecker thread_checker_; | 86 rtc::ThreadChecker thread_checker_; |
79 ChannelOwner channel_owner_; | 87 ChannelOwner channel_owner_; |
80 | 88 |
81 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); | 89 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); |
82 }; | 90 }; |
83 } // namespace voe | 91 } // namespace voe |
84 } // namespace webrtc | 92 } // namespace webrtc |
85 | 93 |
86 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ | 94 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
OLD | NEW |