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

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.h

Issue 2397573006: Using AudioOption to enable audio network adaptor. (Closed)
Patch Set: Created 4 years, 2 months 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) 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool operator!=(const SendCodecSpec& rhs) const; 47 bool operator!=(const SendCodecSpec& rhs) const;
48 48
49 bool nack_enabled = false; 49 bool nack_enabled = false;
50 bool transport_cc_enabled = false; 50 bool transport_cc_enabled = false;
51 bool enable_codec_fec = false; 51 bool enable_codec_fec = false;
52 bool enable_opus_dtx = false; 52 bool enable_opus_dtx = false;
53 int opus_max_playback_rate = 0; 53 int opus_max_playback_rate = 0;
54 int red_payload_type = -1; 54 int red_payload_type = -1;
55 int cng_payload_type = -1; 55 int cng_payload_type = -1;
56 int cng_plfreq = -1; 56 int cng_plfreq = -1;
57 // max_ptime_ms: maximal frame length in ms.
58 int max_ptime_ms = kPreferredMaxPTime;
59 // min_ptime_ms: minimal frame length in ms.
60 int min_ptime_ms = kPreferredMinPTime;
57 webrtc::CodecInst codec_inst; 61 webrtc::CodecInst codec_inst;
58 }; 62 };
59 63
60 // WebRtcVoiceEngine is a class to be used with CompositeMediaEngine. 64 // WebRtcVoiceEngine is a class to be used with CompositeMediaEngine.
61 // It uses the WebRtc VoiceEngine library for audio handling. 65 // It uses the WebRtc VoiceEngine library for audio handling.
62 class WebRtcVoiceEngine final : public webrtc::TraceCallback { 66 class WebRtcVoiceEngine final : public webrtc::TraceCallback {
63 friend class WebRtcVoiceMediaChannel; 67 friend class WebRtcVoiceMediaChannel;
64 public: 68 public:
65 // Exposed for the WVoE/MC unit test. 69 // Exposed for the WVoE/MC unit test.
66 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out); 70 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); 234 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions());
231 } 235 }
232 236
233 int GetReceiveChannelId(uint32_t ssrc) const; 237 int GetReceiveChannelId(uint32_t ssrc) const;
234 int GetSendChannelId(uint32_t ssrc) const; 238 int GetSendChannelId(uint32_t ssrc) const;
235 239
236 private: 240 private:
237 bool SetOptions(const AudioOptions& options); 241 bool SetOptions(const AudioOptions& options);
238 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); 242 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs);
239 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); 243 bool SetSendCodecs(const std::vector<AudioCodec>& codecs);
240 bool SetSendCodecs(int channel, const webrtc::RtpParameters& rtp_parameters); 244 bool SetSendCodecs(uint32_t ssrc,
245 const webrtc::RtpParameters& rtp_parameters);
241 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); 246 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec);
242 bool SetLocalSource(uint32_t ssrc, AudioSource* source); 247 bool SetLocalSource(uint32_t ssrc, AudioSource* source);
243 bool MuteStream(uint32_t ssrc, bool mute); 248 bool MuteStream(uint32_t ssrc, bool mute);
244 249
245 WebRtcVoiceEngine* engine() { return engine_; } 250 WebRtcVoiceEngine* engine() { return engine_; }
246 int GetLastEngineError() { return engine()->GetLastEngineError(); } 251 int GetLastEngineError() { return engine()->GetLastEngineError(); }
247 int GetOutputLevel(int channel); 252 int GetOutputLevel(int channel);
248 void ChangePlayout(bool playout); 253 void ChangePlayout(bool playout);
249 int CreateVoEChannel(); 254 int CreateVoEChannel();
250 bool DeleteVoEChannel(int channel); 255 bool DeleteVoEChannel(int channel);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; 300 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
296 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; 301 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
297 302
298 SendCodecSpec send_codec_spec_; 303 SendCodecSpec send_codec_spec_;
299 304
300 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); 305 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
301 }; 306 };
302 } // namespace cricket 307 } // namespace cricket
303 308
304 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ 309 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698