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

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

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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
« no previous file with comments | « talk/media/webrtc/fakewebrtccall.cc ('k') | talk/media/webrtc/webrtcvideocapturer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 32, // int medianWaitingTimeMs; 82 32, // int medianWaitingTimeMs;
83 1, // int minWaitingTimeMs; 83 1, // int minWaitingTimeMs;
84 98, // int maxWaitingTimeMs; 84 98, // int maxWaitingTimeMs;
85 7654, // int addedSamples; 85 7654, // int addedSamples;
86 }; // These random but non-trivial numbers are used for testing. 86 }; // These random but non-trivial numbers are used for testing.
87 87
88 #define WEBRTC_CHECK_CHANNEL(channel) \ 88 #define WEBRTC_CHECK_CHANNEL(channel) \
89 if (channels_.find(channel) == channels_.end()) return -1; 89 if (channels_.find(channel) == channels_.end()) return -1;
90 90
91 #define WEBRTC_ASSERT_CHANNEL(channel) \ 91 #define WEBRTC_ASSERT_CHANNEL(channel) \
92 DCHECK(channels_.find(channel) != channels_.end()); 92 RTC_DCHECK(channels_.find(channel) != channels_.end());
93 93
94 // Verify the header extension ID, if enabled, is within the bounds specified in 94 // Verify the header extension ID, if enabled, is within the bounds specified in
95 // [RFC5285]: 1-14 inclusive. 95 // [RFC5285]: 1-14 inclusive.
96 #define WEBRTC_CHECK_HEADER_EXTENSION_ID(enable, id) \ 96 #define WEBRTC_CHECK_HEADER_EXTENSION_ID(enable, id) \
97 do { \ 97 do { \
98 if (enable && (id < 1 || id > 14)) { \ 98 if (enable && (id < 1 || id > 14)) { \
99 return -1; \ 99 return -1; \
100 } \ 100 } \
101 } while (0); 101 } while (0);
102 102
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 std::string packet = channels_[channel]->packets.front(); 376 std::string packet = channels_[channel]->packets.front();
377 result = (packet == std::string(static_cast<const char*>(data), len)); 377 result = (packet == std::string(static_cast<const char*>(data), len));
378 channels_[channel]->packets.pop_front(); 378 channels_[channel]->packets.pop_front();
379 } 379 }
380 return result; 380 return result;
381 } 381 }
382 bool CheckNoPacket(int channel) { 382 bool CheckNoPacket(int channel) {
383 return channels_[channel]->packets.empty(); 383 return channels_[channel]->packets.empty();
384 } 384 }
385 void TriggerCallbackOnError(int channel_num, int err_code) { 385 void TriggerCallbackOnError(int channel_num, int err_code) {
386 DCHECK(observer_ != NULL); 386 RTC_DCHECK(observer_ != NULL);
387 observer_->CallbackOnError(channel_num, err_code); 387 observer_->CallbackOnError(channel_num, err_code);
388 } 388 }
389 void set_playout_fail_channel(int channel) { 389 void set_playout_fail_channel(int channel) {
390 playout_fail_channel_ = channel; 390 playout_fail_channel_ = channel;
391 } 391 }
392 void set_send_fail_channel(int channel) { 392 void set_send_fail_channel(int channel) {
393 send_fail_channel_ = channel; 393 send_fail_channel_ = channel;
394 } 394 }
395 void set_fail_start_recording_microphone( 395 void set_fail_start_recording_microphone(
396 bool fail_start_recording_microphone) { 396 bool fail_start_recording_microphone) {
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 DtmfInfo dtmf_info_; 1284 DtmfInfo dtmf_info_;
1285 webrtc::VoEMediaProcess* media_processor_; 1285 webrtc::VoEMediaProcess* media_processor_;
1286 FakeAudioProcessing audio_processing_; 1286 FakeAudioProcessing audio_processing_;
1287 }; 1287 };
1288 1288
1289 #undef WEBRTC_CHECK_HEADER_EXTENSION_ID 1289 #undef WEBRTC_CHECK_HEADER_EXTENSION_ID
1290 1290
1291 } // namespace cricket 1291 } // namespace cricket
1292 1292
1293 #endif // TALK_SESSION_PHONE_FAKEWEBRTCVOICEENGINE_H_ 1293 #endif // TALK_SESSION_PHONE_FAKEWEBRTCVOICEENGINE_H_
OLDNEW
« no previous file with comments | « talk/media/webrtc/fakewebrtccall.cc ('k') | talk/media/webrtc/webrtcvideocapturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698