OLD | NEW |
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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 } | 462 } |
463 bool SetOptions(const AudioOptions& options) { | 463 bool SetOptions(const AudioOptions& options) { |
464 // Does a "merge" of current options and set options. | 464 // Does a "merge" of current options and set options. |
465 options_.SetAll(options); | 465 options_.SetAll(options); |
466 return true; | 466 return true; |
467 } | 467 } |
468 bool SetLocalSource(uint32_t ssrc, AudioSource* source) { | 468 bool SetLocalSource(uint32_t ssrc, AudioSource* source) { |
469 auto it = local_sinks_.find(ssrc); | 469 auto it = local_sinks_.find(ssrc); |
470 if (source) { | 470 if (source) { |
471 if (it != local_sinks_.end()) { | 471 if (it != local_sinks_.end()) { |
472 RTC_DCHECK(it->second->source() == source); | 472 RTC_CHECK(it->second->source() == source); |
473 } else { | 473 } else { |
474 local_sinks_.insert( | 474 local_sinks_.insert( |
475 std::make_pair(ssrc, new VoiceChannelAudioSink(source))); | 475 std::make_pair(ssrc, new VoiceChannelAudioSink(source))); |
476 } | 476 } |
477 } else { | 477 } else { |
478 if (it != local_sinks_.end()) { | 478 if (it != local_sinks_.end()) { |
479 delete it->second; | 479 delete it->second; |
480 local_sinks_.erase(it); | 480 local_sinks_.erase(it); |
481 } | 481 } |
482 } | 482 } |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; } | 952 virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; } |
953 | 953 |
954 private: | 954 private: |
955 std::vector<FakeDataMediaChannel*> channels_; | 955 std::vector<FakeDataMediaChannel*> channels_; |
956 std::vector<DataCodec> data_codecs_; | 956 std::vector<DataCodec> data_codecs_; |
957 }; | 957 }; |
958 | 958 |
959 } // namespace cricket | 959 } // namespace cricket |
960 | 960 |
961 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 961 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |