OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 WebRtcVoiceEngine(); | 63 WebRtcVoiceEngine(); |
64 // Dependency injection for testing. | 64 // Dependency injection for testing. |
65 explicit WebRtcVoiceEngine(VoEWrapper* voe_wrapper); | 65 explicit WebRtcVoiceEngine(VoEWrapper* voe_wrapper); |
66 ~WebRtcVoiceEngine(); | 66 ~WebRtcVoiceEngine(); |
67 bool Init(rtc::Thread* worker_thread); | 67 bool Init(rtc::Thread* worker_thread); |
68 void Terminate(); | 68 void Terminate(); |
69 | 69 |
70 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const; | 70 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const; |
71 VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 71 VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
72 const AudioOptions& options); | 72 const MediaChannelOptions& options, |
| 73 const AudioOptions& audio_options); |
73 | 74 |
74 bool GetOutputVolume(int* level); | 75 bool GetOutputVolume(int* level); |
75 bool SetOutputVolume(int level); | 76 bool SetOutputVolume(int level); |
76 int GetInputLevel(); | 77 int GetInputLevel(); |
77 | 78 |
78 const std::vector<AudioCodec>& codecs(); | 79 const std::vector<AudioCodec>& codecs(); |
79 RtpCapabilities GetCapabilities() const; | 80 RtpCapabilities GetCapabilities() const; |
80 | 81 |
81 // For tracking WebRtc channels. Needed because we have to pause them | 82 // For tracking WebRtc channels. Needed because we have to pause them |
82 // all when switching devices. | 83 // all when switching devices. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 151 |
151 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcVoiceEngine); | 152 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcVoiceEngine); |
152 }; | 153 }; |
153 | 154 |
154 // WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses | 155 // WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses |
155 // WebRtc Voice Engine. | 156 // WebRtc Voice Engine. |
156 class WebRtcVoiceMediaChannel final : public VoiceMediaChannel, | 157 class WebRtcVoiceMediaChannel final : public VoiceMediaChannel, |
157 public webrtc::Transport { | 158 public webrtc::Transport { |
158 public: | 159 public: |
159 WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, | 160 WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, |
160 const AudioOptions& options, | 161 const MediaChannelOptions& options, |
| 162 const AudioOptions& audio_options, |
161 webrtc::Call* call); | 163 webrtc::Call* call); |
162 ~WebRtcVoiceMediaChannel() override; | 164 ~WebRtcVoiceMediaChannel() override; |
163 | 165 |
164 const AudioOptions& options() const { return options_; } | 166 const AudioOptions& options() const { return options_; } |
165 | 167 |
| 168 rtc::DiffServCodePoint MediaTypeDscpValue() const override; |
166 bool SetSendParameters(const AudioSendParameters& params) override; | 169 bool SetSendParameters(const AudioSendParameters& params) override; |
167 bool SetRecvParameters(const AudioRecvParameters& params) override; | 170 bool SetRecvParameters(const AudioRecvParameters& params) override; |
168 bool SetPlayout(bool playout) override; | 171 bool SetPlayout(bool playout) override; |
169 bool PausePlayout(); | 172 bool PausePlayout(); |
170 bool ResumePlayout(); | 173 bool ResumePlayout(); |
171 bool SetSend(SendFlags send) override; | 174 bool SetSend(SendFlags send) override; |
172 bool PauseSend(); | 175 bool PauseSend(); |
173 bool ResumeSend(); | 176 bool ResumeSend(); |
174 bool SetAudioSend(uint32_t ssrc, | 177 bool SetAudioSend(uint32_t ssrc, |
175 bool enable, | 178 bool enable, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 288 |
286 class WebRtcAudioReceiveStream; | 289 class WebRtcAudioReceiveStream; |
287 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 290 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
288 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 291 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
289 | 292 |
290 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 293 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
291 }; | 294 }; |
292 } // namespace cricket | 295 } // namespace cricket |
293 | 296 |
294 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ | 297 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ |
OLD | NEW |