| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 WebRtcVoiceEngine(); | 46 WebRtcVoiceEngine(); |
| 47 // Dependency injection for testing. | 47 // Dependency injection for testing. |
| 48 explicit WebRtcVoiceEngine(VoEWrapper* voe_wrapper); | 48 explicit WebRtcVoiceEngine(VoEWrapper* voe_wrapper); |
| 49 ~WebRtcVoiceEngine(); | 49 ~WebRtcVoiceEngine(); |
| 50 bool Init(rtc::Thread* worker_thread); | 50 bool Init(rtc::Thread* worker_thread); |
| 51 void Terminate(); | 51 void Terminate(); |
| 52 | 52 |
| 53 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const; | 53 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const; |
| 54 VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 54 VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
| 55 const MediaConfig& config, |
| 55 const AudioOptions& options); | 56 const AudioOptions& options); |
| 56 | 57 |
| 57 bool GetOutputVolume(int* level); | 58 bool GetOutputVolume(int* level); |
| 58 bool SetOutputVolume(int level); | 59 bool SetOutputVolume(int level); |
| 59 int GetInputLevel(); | 60 int GetInputLevel(); |
| 60 | 61 |
| 61 const std::vector<AudioCodec>& codecs(); | 62 const std::vector<AudioCodec>& codecs(); |
| 62 RtpCapabilities GetCapabilities() const; | 63 RtpCapabilities GetCapabilities() const; |
| 63 | 64 |
| 64 // For tracking WebRtc channels. Needed because we have to pause them | 65 // For tracking WebRtc channels. Needed because we have to pause them |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 134 |
| 134 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcVoiceEngine); | 135 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcVoiceEngine); |
| 135 }; | 136 }; |
| 136 | 137 |
| 137 // WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses | 138 // WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses |
| 138 // WebRtc Voice Engine. | 139 // WebRtc Voice Engine. |
| 139 class WebRtcVoiceMediaChannel final : public VoiceMediaChannel, | 140 class WebRtcVoiceMediaChannel final : public VoiceMediaChannel, |
| 140 public webrtc::Transport { | 141 public webrtc::Transport { |
| 141 public: | 142 public: |
| 142 WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, | 143 WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, |
| 144 const MediaConfig& config, |
| 143 const AudioOptions& options, | 145 const AudioOptions& options, |
| 144 webrtc::Call* call); | 146 webrtc::Call* call); |
| 145 ~WebRtcVoiceMediaChannel() override; | 147 ~WebRtcVoiceMediaChannel() override; |
| 146 | 148 |
| 147 const AudioOptions& options() const { return options_; } | 149 const AudioOptions& options() const { return options_; } |
| 148 | 150 |
| 151 rtc::DiffServCodePoint PreferredDscp() const override; |
| 152 |
| 149 bool SetSendParameters(const AudioSendParameters& params) override; | 153 bool SetSendParameters(const AudioSendParameters& params) override; |
| 150 bool SetRecvParameters(const AudioRecvParameters& params) override; | 154 bool SetRecvParameters(const AudioRecvParameters& params) override; |
| 151 bool SetPlayout(bool playout) override; | 155 bool SetPlayout(bool playout) override; |
| 152 bool PausePlayout(); | 156 bool PausePlayout(); |
| 153 bool ResumePlayout(); | 157 bool ResumePlayout(); |
| 154 bool SetSend(SendFlags send) override; | 158 bool SetSend(SendFlags send) override; |
| 155 bool PauseSend(); | 159 bool PauseSend(); |
| 156 bool ResumeSend(); | 160 bool ResumeSend(); |
| 157 bool SetAudioSend(uint32_t ssrc, | 161 bool SetAudioSend(uint32_t ssrc, |
| 158 bool enable, | 162 bool enable, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 270 |
| 267 class WebRtcAudioReceiveStream; | 271 class WebRtcAudioReceiveStream; |
| 268 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 272 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
| 269 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 273 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 270 | 274 |
| 271 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 275 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
| 272 }; | 276 }; |
| 273 } // namespace cricket | 277 } // namespace cricket |
| 274 | 278 |
| 275 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 279 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
| OLD | NEW |