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

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

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. Created 3 years, 11 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) 2010 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2010 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_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ 11 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_
12 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ 12 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_
13 13
14 #include <stddef.h> 14 #include <stddef.h>
15 15
16 #include <list> 16 #include <list>
17 #include <map> 17 #include <map>
18 #include <vector> 18 #include <vector>
19 19
20 #include "webrtc/base/checks.h" 20 #include "webrtc/base/checks.h"
21 #include "webrtc/base/stringutils.h" 21 #include "webrtc/base/stringutils.h"
22 #include "webrtc/base/checks.h"
22 #include "webrtc/config.h" 23 #include "webrtc/config.h"
23 #include "webrtc/media/base/codec.h" 24 #include "webrtc/media/base/codec.h"
24 #include "webrtc/media/base/rtputils.h" 25 #include "webrtc/media/base/rtputils.h"
25 #include "webrtc/media/engine/webrtcvoe.h" 26 #include "webrtc/media/engine/webrtcvoe.h"
26 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" 27 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
27 #include "webrtc/modules/audio_processing/include/audio_processing.h" 28 #include "webrtc/modules/audio_processing/include/audio_processing.h"
28 29
29 namespace cricket { 30 namespace cricket {
30 31
31 static const int kOpusBandwidthNb = 4000; 32 static const int kOpusBandwidthNb = 4000;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 return highpass_filter_enabled_; 320 return highpass_filter_enabled_;
320 } 321 }
321 bool IsStereoChannelSwappingEnabled() override { 322 bool IsStereoChannelSwappingEnabled() override {
322 return stereo_swapping_enabled_; 323 return stereo_swapping_enabled_;
323 } 324 }
324 void EnableStereoChannelSwapping(bool enable) override { 325 void EnableStereoChannelSwapping(bool enable) override {
325 stereo_swapping_enabled_ = enable; 326 stereo_swapping_enabled_ = enable;
326 } 327 }
327 size_t GetNetEqCapacity() const { 328 size_t GetNetEqCapacity() const {
328 auto ch = channels_.find(last_channel_); 329 auto ch = channels_.find(last_channel_);
329 ASSERT(ch != channels_.end()); 330 RTC_DCHECK(ch != channels_.end());
330 return ch->second->neteq_capacity; 331 return ch->second->neteq_capacity;
331 } 332 }
332 bool GetNetEqFastAccelerate() const { 333 bool GetNetEqFastAccelerate() const {
333 auto ch = channels_.find(last_channel_); 334 auto ch = channels_.find(last_channel_);
334 ASSERT(ch != channels_.end()); 335 RTC_DCHECK(ch != channels_.end());
335 return ch->second->neteq_fast_accelerate; 336 return ch->second->neteq_fast_accelerate;
336 } 337 }
337 338
338 private: 339 private:
339 bool inited_ = false; 340 bool inited_ = false;
340 int last_channel_ = -1; 341 int last_channel_ = -1;
341 std::map<int, Channel*> channels_; 342 std::map<int, Channel*> channels_;
342 bool fail_create_channel_ = false; 343 bool fail_create_channel_ = false;
343 bool ec_enabled_ = false; 344 bool ec_enabled_ = false;
344 bool ec_metrics_enabled_ = false; 345 bool ec_metrics_enabled_ = false;
345 bool cng_enabled_ = false; 346 bool cng_enabled_ = false;
346 bool ns_enabled_ = false; 347 bool ns_enabled_ = false;
347 bool agc_enabled_ = false; 348 bool agc_enabled_ = false;
348 bool highpass_filter_enabled_ = false; 349 bool highpass_filter_enabled_ = false;
349 bool stereo_swapping_enabled_ = false; 350 bool stereo_swapping_enabled_ = false;
350 bool typing_detection_enabled_ = false; 351 bool typing_detection_enabled_ = false;
351 webrtc::EcModes ec_mode_ = webrtc::kEcDefault; 352 webrtc::EcModes ec_mode_ = webrtc::kEcDefault;
352 webrtc::AecmModes aecm_mode_ = webrtc::kAecmSpeakerphone; 353 webrtc::AecmModes aecm_mode_ = webrtc::kAecmSpeakerphone;
353 webrtc::NsModes ns_mode_ = webrtc::kNsDefault; 354 webrtc::NsModes ns_mode_ = webrtc::kNsDefault;
354 webrtc::AgcModes agc_mode_ = webrtc::kAgcDefault; 355 webrtc::AgcModes agc_mode_ = webrtc::kAgcDefault;
355 webrtc::AgcConfig agc_config_; 356 webrtc::AgcConfig agc_config_;
356 webrtc::AudioProcessing* apm_ = nullptr; 357 webrtc::AudioProcessing* apm_ = nullptr;
357 358
358 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FakeWebRtcVoiceEngine); 359 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FakeWebRtcVoiceEngine);
359 }; 360 };
360 361
361 } // namespace cricket 362 } // namespace cricket
362 363
363 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ 364 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/fakemediaengine.h ('k') | webrtc/modules/video_capture/windows/sink_filter_ds.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698