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/api/rtpreceiverinterface.h" | |
16 #include "webrtc/base/constructormagic.h" | 15 #include "webrtc/base/constructormagic.h" |
17 #include "webrtc/base/race_checker.h" | 16 #include "webrtc/base/race_checker.h" |
18 #include "webrtc/base/thread_checker.h" | 17 #include "webrtc/base/thread_checker.h" |
19 #include "webrtc/voice_engine/channel_manager.h" | 18 #include "webrtc/voice_engine/channel_manager.h" |
20 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 19 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
21 | 20 |
22 #include <memory> | 21 #include <memory> |
23 #include <string> | 22 #include <string> |
24 #include <vector> | 23 #include <vector> |
25 | 24 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 virtual bool SetVADStatus(bool enable); | 114 virtual bool SetVADStatus(bool enable); |
116 virtual bool SetCodecFECStatus(bool enable); | 115 virtual bool SetCodecFECStatus(bool enable); |
117 virtual bool SetOpusDtx(bool enable); | 116 virtual bool SetOpusDtx(bool enable); |
118 virtual bool SetOpusMaxPlaybackRate(int frequency_hz); | 117 virtual bool SetOpusMaxPlaybackRate(int frequency_hz); |
119 virtual bool SetSendCodec(const CodecInst& codec_inst); | 118 virtual bool SetSendCodec(const CodecInst& codec_inst); |
120 virtual bool SetSendCNPayloadType(int type, PayloadFrequencies frequency); | 119 virtual bool SetSendCNPayloadType(int type, PayloadFrequencies frequency); |
121 virtual void OnTwccBasedUplinkPacketLossRate(float packet_loss_rate); | 120 virtual void OnTwccBasedUplinkPacketLossRate(float packet_loss_rate); |
122 virtual void OnRecoverableUplinkPacketLossRate( | 121 virtual void OnRecoverableUplinkPacketLossRate( |
123 float recoverable_packet_loss_rate); | 122 float recoverable_packet_loss_rate); |
124 virtual void RegisterLegacyReceiveCodecs(); | 123 virtual void RegisterLegacyReceiveCodecs(); |
125 virtual std::vector<webrtc::RtpSource> GetSources() const; | |
126 | 124 |
127 private: | 125 private: |
128 Channel* channel() const; | 126 Channel* channel() const; |
129 | 127 |
130 // Thread checkers document and lock usage of some methods on voe::Channel to | 128 // Thread checkers document and lock usage of some methods on voe::Channel to |
131 // specific threads we know about. The goal is to eventually split up | 129 // specific threads we know about. The goal is to eventually split up |
132 // voe::Channel into parts with single-threaded semantics, and thereby reduce | 130 // voe::Channel into parts with single-threaded semantics, and thereby reduce |
133 // the need for locks. | 131 // the need for locks. |
134 rtc::ThreadChecker worker_thread_checker_; | 132 rtc::ThreadChecker worker_thread_checker_; |
135 rtc::ThreadChecker module_process_thread_checker_; | 133 rtc::ThreadChecker module_process_thread_checker_; |
136 // Methods accessed from audio and video threads are checked for sequential- | 134 // Methods accessed from audio and video threads are checked for sequential- |
137 // only access. We don't necessarily own and control these threads, so thread | 135 // only access. We don't necessarily own and control these threads, so thread |
138 // checkers cannot be used. E.g. Chromium may transfer "ownership" from one | 136 // checkers cannot be used. E.g. Chromium may transfer "ownership" from one |
139 // audio thread to another, but access is still sequential. | 137 // audio thread to another, but access is still sequential. |
140 rtc::RaceChecker audio_thread_race_checker_; | 138 rtc::RaceChecker audio_thread_race_checker_; |
141 rtc::RaceChecker video_capture_thread_race_checker_; | 139 rtc::RaceChecker video_capture_thread_race_checker_; |
142 ChannelOwner channel_owner_; | 140 ChannelOwner channel_owner_; |
143 | 141 |
144 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); | 142 RTC_DISALLOW_COPY_AND_ASSIGN(ChannelProxy); |
145 }; | 143 }; |
146 } // namespace voe | 144 } // namespace voe |
147 } // namespace webrtc | 145 } // namespace webrtc |
148 | 146 |
149 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ | 147 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_PROXY_H_ |
OLD | NEW |