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

Side by Side Diff: webrtc/media/base/fakemediaengine.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) 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
11 #ifndef WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ 11 #ifndef WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_
12 #define WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ 12 #define WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_
13 13
14 #include <list> 14 #include <list>
15 #include <map> 15 #include <map>
16 #include <memory> 16 #include <memory>
17 #include <set> 17 #include <set>
18 #include <string> 18 #include <string>
19 #include <vector> 19 #include <vector>
20 20
21 #include "webrtc/api/call/audio_sink.h" 21 #include "webrtc/api/call/audio_sink.h"
22 #include "webrtc/base/checks.h"
22 #include "webrtc/base/copyonwritebuffer.h" 23 #include "webrtc/base/copyonwritebuffer.h"
23 #include "webrtc/base/networkroute.h" 24 #include "webrtc/base/networkroute.h"
24 #include "webrtc/base/stringutils.h" 25 #include "webrtc/base/stringutils.h"
25 #include "webrtc/media/base/audiosource.h" 26 #include "webrtc/media/base/audiosource.h"
26 #include "webrtc/media/base/mediaengine.h" 27 #include "webrtc/media/base/mediaengine.h"
27 #include "webrtc/media/base/rtputils.h" 28 #include "webrtc/media/base/rtputils.h"
28 #include "webrtc/media/base/streamparams.h" 29 #include "webrtc/media/base/streamparams.h"
29 #include "webrtc/p2p/base/sessiondescription.h" 30 #include "webrtc/p2p/base/sessiondescription.h"
30 31
31 using webrtc::RtpExtension; 32 using webrtc::RtpExtension;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 } 462 }
462 bool SetOptions(const AudioOptions& options) { 463 bool SetOptions(const AudioOptions& options) {
463 // Does a "merge" of current options and set options. 464 // Does a "merge" of current options and set options.
464 options_.SetAll(options); 465 options_.SetAll(options);
465 return true; 466 return true;
466 } 467 }
467 bool SetLocalSource(uint32_t ssrc, AudioSource* source) { 468 bool SetLocalSource(uint32_t ssrc, AudioSource* source) {
468 auto it = local_sinks_.find(ssrc); 469 auto it = local_sinks_.find(ssrc);
469 if (source) { 470 if (source) {
470 if (it != local_sinks_.end()) { 471 if (it != local_sinks_.end()) {
471 ASSERT(it->second->source() == source); 472 RTC_DCHECK(it->second->source() == source);
472 } else { 473 } else {
473 local_sinks_.insert( 474 local_sinks_.insert(
474 std::make_pair(ssrc, new VoiceChannelAudioSink(source))); 475 std::make_pair(ssrc, new VoiceChannelAudioSink(source)));
475 } 476 }
476 } else { 477 } else {
477 if (it != local_sinks_.end()) { 478 if (it != local_sinks_.end()) {
478 delete it->second; 479 delete it->second;
479 local_sinks_.erase(it); 480 local_sinks_.erase(it);
480 } 481 }
481 } 482 }
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; } 966 virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; }
966 967
967 private: 968 private:
968 std::vector<FakeDataMediaChannel*> channels_; 969 std::vector<FakeDataMediaChannel*> channels_;
969 std::vector<DataCodec> data_codecs_; 970 std::vector<DataCodec> data_codecs_;
970 }; 971 };
971 972
972 } // namespace cricket 973 } // namespace cricket
973 974
974 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ 975 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_
OLDNEW
« no previous file with comments | « webrtc/examples/peerconnection/client/peer_connection_client.cc ('k') | webrtc/media/engine/fakewebrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698