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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 if (ssrc != 0 && sinks_.find(ssrc) == sinks_.end()) { | 496 if (ssrc != 0 && sinks_.find(ssrc) == sinks_.end()) { |
497 return false; | 497 return false; |
498 } | 498 } |
499 if (ssrc != 0) { | 499 if (ssrc != 0) { |
500 sinks_[ssrc] = sink; | 500 sinks_[ssrc] = sink; |
501 } | 501 } |
502 return true; | 502 return true; |
503 } | 503 } |
504 | 504 |
505 virtual bool SetSend(bool send) { return set_sending(send); } | 505 virtual bool SetSend(bool send) { return set_sending(send); } |
506 virtual bool SetVideoSend(uint32_t ssrc, bool enable, | 506 virtual bool SetVideoSend(uint32_t ssrc, |
507 const VideoOptions* options) { | 507 bool enable, |
| 508 const VideoOptions* options, |
| 509 VideoCapturer* capturer) { |
508 if (!RtpHelper<VideoMediaChannel>::MuteStream(ssrc, !enable)) { | 510 if (!RtpHelper<VideoMediaChannel>::MuteStream(ssrc, !enable)) { |
509 return false; | 511 return false; |
510 } | 512 } |
511 if (enable && options) { | 513 if (enable && options) { |
512 return SetOptions(*options); | 514 return SetOptions(*options); |
513 } | 515 } |
514 return true; | |
515 } | |
516 virtual bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) { | |
517 capturers_[ssrc] = capturer; | 516 capturers_[ssrc] = capturer; |
518 return true; | 517 return true; |
519 } | 518 } |
520 bool HasCapturer(uint32_t ssrc) const { | 519 bool HasCapturer(uint32_t ssrc) const { |
521 return capturers_.find(ssrc) != capturers_.end(); | 520 return capturers_.find(ssrc) != capturers_.end(); |
522 } | 521 } |
523 virtual bool AddRecvStream(const StreamParams& sp) { | 522 virtual bool AddRecvStream(const StreamParams& sp) { |
524 if (!RtpHelper<VideoMediaChannel>::AddRecvStream(sp)) | 523 if (!RtpHelper<VideoMediaChannel>::AddRecvStream(sp)) |
525 return false; | 524 return false; |
526 sinks_[sp.first_ssrc()] = NULL; | 525 sinks_[sp.first_ssrc()] = NULL; |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 | 891 |
893 private: | 892 private: |
894 std::vector<FakeDataMediaChannel*> channels_; | 893 std::vector<FakeDataMediaChannel*> channels_; |
895 std::vector<DataCodec> data_codecs_; | 894 std::vector<DataCodec> data_codecs_; |
896 DataChannelType last_channel_type_; | 895 DataChannelType last_channel_type_; |
897 }; | 896 }; |
898 | 897 |
899 } // namespace cricket | 898 } // namespace cricket |
900 | 899 |
901 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 900 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |