| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void(uint32_t ssrc, | 76 void(uint32_t ssrc, |
| 77 bool enable, | 77 bool enable, |
| 78 const cricket::VideoOptions* options)); | 78 const cricket::VideoOptions* options)); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 class FakeVideoSource : public Notifier<VideoSourceInterface> { | 81 class FakeVideoSource : public Notifier<VideoSourceInterface> { |
| 82 public: | 82 public: |
| 83 static rtc::scoped_refptr<FakeVideoSource> Create(bool remote) { | 83 static rtc::scoped_refptr<FakeVideoSource> Create(bool remote) { |
| 84 return new rtc::RefCountedObject<FakeVideoSource>(remote); | 84 return new rtc::RefCountedObject<FakeVideoSource>(remote); |
| 85 } | 85 } |
| 86 virtual cricket::VideoCapturer* GetVideoCapturer() { return &fake_capturer_; } | 86 cricket::VideoCapturer* GetVideoCapturer() { return &fake_capturer_; } |
| 87 virtual void Stop() {} | 87 void Stop() override {} |
| 88 virtual void Restart() {} | 88 void Restart() override {} |
| 89 virtual void AddSink(rtc::VideoSinkInterface<cricket::VideoFrame>* output) {} | 89 void AddOrUpdateSink( |
| 90 virtual void RemoveSink( | 90 rtc::VideoSinkInterface<cricket::VideoFrame>* sink, |
| 91 rtc::VideoSinkInterface<cricket::VideoFrame>* output) {} | 91 const rtc::VideoSinkWants& wants) override {} |
| 92 virtual SourceState state() const { return state_; } | 92 void RemoveSink( |
| 93 virtual bool remote() const { return remote_; } | 93 rtc::VideoSinkInterface<cricket::VideoFrame>* output) override {} |
| 94 virtual const cricket::VideoOptions* options() const { return &options_; } | 94 SourceState state() const override { return state_; } |
| 95 virtual cricket::VideoRenderer* FrameInput() { return NULL; } | 95 bool remote() const override { return remote_; } |
| 96 const cricket::VideoOptions* options() const override { return &options_; } |
| 96 | 97 |
| 97 protected: | 98 protected: |
| 98 explicit FakeVideoSource(bool remote) : state_(kLive), remote_(remote) {} | 99 explicit FakeVideoSource(bool remote) : state_(kLive), remote_(remote) {} |
| 99 ~FakeVideoSource() {} | 100 ~FakeVideoSource() {} |
| 100 | 101 |
| 101 private: | 102 private: |
| 102 cricket::FakeVideoCapturer fake_capturer_; | 103 cricket::FakeVideoCapturer fake_capturer_; |
| 103 SourceState state_; | 104 SourceState state_; |
| 104 bool remote_; | 105 bool remote_; |
| 105 cricket::VideoOptions options_; | 106 cricket::VideoOptions options_; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 video_track_->GetSource()->GetVideoCapturer())); | 490 video_track_->GetSource()->GetVideoCapturer())); |
| 490 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); | 491 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); |
| 491 sender->SetSsrc(kVideoSsrc2); | 492 sender->SetSsrc(kVideoSsrc2); |
| 492 | 493 |
| 493 // Calls expected from destructor. | 494 // Calls expected from destructor. |
| 494 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); | 495 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); |
| 495 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); | 496 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); |
| 496 } | 497 } |
| 497 | 498 |
| 498 } // namespace webrtc | 499 } // namespace webrtc |
| OLD | NEW |