| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 class FakeVideoSource : public Notifier<VideoSourceInterface> { | 98 class FakeVideoSource : public Notifier<VideoSourceInterface> { |
| 99 public: | 99 public: |
| 100 static rtc::scoped_refptr<FakeVideoSource> Create(bool remote) { | 100 static rtc::scoped_refptr<FakeVideoSource> Create(bool remote) { |
| 101 return new rtc::RefCountedObject<FakeVideoSource>(remote); | 101 return new rtc::RefCountedObject<FakeVideoSource>(remote); |
| 102 } | 102 } |
| 103 virtual cricket::VideoCapturer* GetVideoCapturer() { return &fake_capturer_; } | 103 virtual cricket::VideoCapturer* GetVideoCapturer() { return &fake_capturer_; } |
| 104 virtual void Stop() {} | 104 virtual void Stop() {} |
| 105 virtual void Restart() {} | 105 virtual void Restart() {} |
| 106 virtual void AddSink(rtc::VideoSinkInterface<cricket::VideoFrame>* output) {} | 106 virtual void AddSink(cricket::VideoRenderer* output) {} |
| 107 virtual void RemoveSink( | 107 virtual void RemoveSink(cricket::VideoRenderer* output) {} |
| 108 rtc::VideoSinkInterface<cricket::VideoFrame>* output) {} | |
| 109 virtual SourceState state() const { return state_; } | 108 virtual SourceState state() const { return state_; } |
| 110 virtual bool remote() const { return remote_; } | 109 virtual bool remote() const { return remote_; } |
| 111 virtual const cricket::VideoOptions* options() const { return &options_; } | 110 virtual const cricket::VideoOptions* options() const { return &options_; } |
| 112 virtual cricket::VideoRenderer* FrameInput() { return NULL; } | 111 virtual cricket::VideoRenderer* FrameInput() { return NULL; } |
| 113 | 112 |
| 114 protected: | 113 protected: |
| 115 explicit FakeVideoSource(bool remote) : state_(kLive), remote_(remote) {} | 114 explicit FakeVideoSource(bool remote) : state_(kLive), remote_(remote) {} |
| 116 ~FakeVideoSource() {} | 115 ~FakeVideoSource() {} |
| 117 | 116 |
| 118 private: | 117 private: |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 video_track_->GetSource()->GetVideoCapturer())); | 505 video_track_->GetSource()->GetVideoCapturer())); |
| 507 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); | 506 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); |
| 508 sender->SetSsrc(kVideoSsrc2); | 507 sender->SetSsrc(kVideoSsrc2); |
| 509 | 508 |
| 510 // Calls expected from destructor. | 509 // Calls expected from destructor. |
| 511 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); | 510 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); |
| 512 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); | 511 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); |
| 513 } | 512 } |
| 514 | 513 |
| 515 } // namespace webrtc | 514 } // namespace webrtc |
| OLD | NEW |