| 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/api/audio/audio_mixer.h" | 14 #include "webrtc/api/audio/audio_mixer.h" |
| 15 #include "webrtc/base/constructormagic.h" | 15 #include "webrtc/base/constructormagic.h" |
| 16 #include "webrtc/base/race_checker.h" | 16 #include "webrtc/base/race_checker.h" |
| 17 #include "webrtc/base/thread_checker.h" | 17 #include "webrtc/base/thread_checker.h" |
| 18 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" |
| 18 #include "webrtc/voice_engine/channel_manager.h" | 19 #include "webrtc/voice_engine/channel_manager.h" |
| 19 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 20 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
| 20 | 21 |
| 21 #include <memory> | 22 #include <memory> |
| 22 #include <string> | 23 #include <string> |
| 23 #include <vector> | 24 #include <vector> |
| 24 | 25 |
| 25 namespace webrtc { | 26 namespace webrtc { |
| 26 | 27 |
| 27 class AudioSinkInterface; | 28 class AudioSinkInterface; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 47 // 1. Allow mocking just the interfaces used, instead of the entire | 48 // 1. Allow mocking just the interfaces used, instead of the entire |
| 48 // voe::Channel class. | 49 // voe::Channel class. |
| 49 // 2. Provide a refined interface for the stream classes, including assumptions | 50 // 2. Provide a refined interface for the stream classes, including assumptions |
| 50 // on return values and input adaptation. | 51 // on return values and input adaptation. |
| 51 class ChannelProxy { | 52 class ChannelProxy { |
| 52 public: | 53 public: |
| 53 ChannelProxy(); | 54 ChannelProxy(); |
| 54 explicit ChannelProxy(const ChannelOwner& channel_owner); | 55 explicit ChannelProxy(const ChannelOwner& channel_owner); |
| 55 virtual ~ChannelProxy(); | 56 virtual ~ChannelProxy(); |
| 56 | 57 |
| 58 virtual bool SetEncoder(int payload_type, |
| 59 std::unique_ptr<AudioEncoder> encoder); |
| 60 |
| 57 virtual void SetRTCPStatus(bool enable); | 61 virtual void SetRTCPStatus(bool enable); |
| 58 virtual void SetLocalSSRC(uint32_t ssrc); | 62 virtual void SetLocalSSRC(uint32_t ssrc); |
| 59 virtual void SetRTCP_CNAME(const std::string& c_name); | 63 virtual void SetRTCP_CNAME(const std::string& c_name); |
| 60 virtual void SetNACKStatus(bool enable, int max_packets); | 64 virtual void SetNACKStatus(bool enable, int max_packets); |
| 61 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id); | 65 virtual void SetSendAudioLevelIndicationStatus(bool enable, int id); |
| 62 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id); | 66 virtual void SetReceiveAudioLevelIndicationStatus(bool enable, int id); |
| 63 virtual void EnableSendTransportSequenceNumber(int id); | 67 virtual void EnableSendTransportSequenceNumber(int id); |
| 64 virtual void EnableReceiveTransportSequenceNumber(int id); | 68 virtual void EnableReceiveTransportSequenceNumber(int id); |
| 65 virtual void RegisterSenderCongestionControlObjects( | 69 virtual void RegisterSenderCongestionControlObjects( |
| 66 RtpTransportControllerSendInterface* transport, | 70 RtpTransportControllerSendInterface* transport, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 rtc::RaceChecker audio_thread_race_checker_; | 142 rtc::RaceChecker audio_thread_race_checker_; |
| 139 rtc::RaceChecker video_capture_thread_race_checker_; | 143 rtc::RaceChecker video_capture_thread_race_checker_; |
| 140 ChannelOwner channel_owner_; | 144 ChannelOwner channel_owner_; |
| 141 | 145 |
| 142 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); | 146 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); |
| 143 }; | 147 }; |
| 144 } // namespace voe | 148 } // namespace voe |
| 145 } // namespace webrtc | 149 } // namespace webrtc |
| 146 | 150 |
| 147 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ | 151 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
| OLD | NEW |