Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Side by Side Diff: webrtc/voice_engine/channel_proxy.h

Issue 1505253004: Support for remote audio into tracks (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address comments Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 22
23 class AudioSinkInterface;
23 class PacketRouter; 24 class PacketRouter;
24 class RtpPacketSender; 25 class RtpPacketSender;
25 class TransportFeedbackObserver; 26 class TransportFeedbackObserver;
26 27
27 namespace voe { 28 namespace voe {
28 29
29 class Channel; 30 class Channel;
30 31
31 // This class provides the "view" of a voe::Channel that we need to implement 32 // This class provides the "view" of a voe::Channel that we need to implement
32 // webrtc::AudioSendStream and webrtc::AudioReceiveStream. It serves two 33 // webrtc::AudioSendStream and webrtc::AudioReceiveStream. It serves two
33 // purposes: 34 // purposes:
34 // 1. Allow mocking just the interfaces used, instead of the entire 35 // 1. Allow mocking just the interfaces used, instead of the entire
35 // voe::Channel class. 36 // voe::Channel class.
36 // 2. Provide a refined interface for the stream classes, including assumptions 37 // 2. Provide a refined interface for the stream classes, including assumptions
37 // on return values and input adaptation. 38 // on return values and input adaptation.
38 class ChannelProxy { 39 class ChannelProxy {
39 public: 40 public:
40 ChannelProxy(); 41 ChannelProxy();
41 explicit ChannelProxy(const ChannelOwner& channel_owner); 42 explicit ChannelProxy(const ChannelOwner& channel_owner);
42 virtual ~ChannelProxy() {} 43 virtual ~ChannelProxy();
43 44
44 virtual void SetRTCPStatus(bool enable); 45 virtual void SetRTCPStatus(bool enable);
45 virtual void SetLocalSSRC(uint32_t ssrc); 46 virtual void SetLocalSSRC(uint32_t ssrc);
46 virtual void SetRTCP_CNAME(const std::string& c_name); 47 virtual void SetRTCP_CNAME(const std::string& c_name);
47 virtual void SetSendAbsoluteSenderTimeStatus(bool enable, int id); 48 virtual void SetSendAbsoluteSenderTimeStatus(bool enable, int id);
48 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id); 49 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id);
49 virtual void EnableSendTransportSequenceNumber(int id); 50 virtual void EnableSendTransportSequenceNumber(int id);
50 virtual void SetReceiveAbsoluteSenderTimeStatus(bool enable, int id); 51 virtual void SetReceiveAbsoluteSenderTimeStatus(bool enable, int id);
51 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id); 52 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id);
52 virtual void SetCongestionControlObjects( 53 virtual void SetCongestionControlObjects(
53 RtpPacketSender* rtp_packet_sender, 54 RtpPacketSender* rtp_packet_sender,
54 TransportFeedbackObserver* transport_feedback_observer, 55 TransportFeedbackObserver* transport_feedback_observer,
55 PacketRouter* packet_router); 56 PacketRouter* packet_router);
56 57
57 virtual CallStatistics GetRTCPStatistics() const; 58 virtual CallStatistics GetRTCPStatistics() const;
58 virtual std::vector<ReportBlock> GetRemoteRTCPReportBlocks() const; 59 virtual std::vector<ReportBlock> GetRemoteRTCPReportBlocks() const;
59 virtual NetworkStatistics GetNetworkStatistics() const; 60 virtual NetworkStatistics GetNetworkStatistics() const;
60 virtual AudioDecodingCallStats GetDecodingCallStatistics() const; 61 virtual AudioDecodingCallStats GetDecodingCallStatistics() const;
61 virtual int32_t GetSpeechOutputLevelFullRange() const; 62 virtual int32_t GetSpeechOutputLevelFullRange() const;
62 virtual uint32_t GetDelayEstimate() const; 63 virtual uint32_t GetDelayEstimate() const;
63 64
64 virtual bool SetSendTelephoneEventPayloadType(int payload_type); 65 virtual bool SetSendTelephoneEventPayloadType(int payload_type);
65 virtual bool SendTelephoneEventOutband(uint8_t event, uint32_t duration_ms); 66 virtual bool SendTelephoneEventOutband(uint8_t event, uint32_t duration_ms);
66 67
68 virtual void SetSink(rtc::scoped_ptr<AudioSinkInterface> sink);
69
67 private: 70 private:
68 Channel* channel() const; 71 Channel* channel() const;
69 72
70 rtc::ThreadChecker thread_checker_; 73 rtc::ThreadChecker thread_checker_;
71 ChannelOwner channel_owner_; 74 ChannelOwner channel_owner_;
72 }; 75 };
73 } // namespace voe 76 } // namespace voe
74 } // namespace webrtc 77 } // namespace webrtc
75 78
76 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ 79 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698