| 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(cricket::VideoRenderer* output) {} | 106 virtual void AddSink(rtc::VideoSinkInterface<cricket::VideoFrame>* output) {} |
| 107 virtual void RemoveSink(cricket::VideoRenderer* output) {} | 107 virtual void RemoveSink( |
| 108 rtc::VideoSinkInterface<cricket::VideoFrame>* output) {} |
| 108 virtual SourceState state() const { return state_; } | 109 virtual SourceState state() const { return state_; } |
| 109 virtual bool remote() const { return remote_; } | 110 virtual bool remote() const { return remote_; } |
| 110 virtual const cricket::VideoOptions* options() const { return &options_; } | 111 virtual const cricket::VideoOptions* options() const { return &options_; } |
| 111 virtual cricket::VideoRenderer* FrameInput() { return NULL; } | 112 virtual cricket::VideoRenderer* FrameInput() { return NULL; } |
| 112 | 113 |
| 113 protected: | 114 protected: |
| 114 explicit FakeVideoSource(bool remote) : state_(kLive), remote_(remote) {} | 115 explicit FakeVideoSource(bool remote) : state_(kLive), remote_(remote) {} |
| 115 ~FakeVideoSource() {} | 116 ~FakeVideoSource() {} |
| 116 | 117 |
| 117 private: | 118 private: |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 video_track_->GetSource()->GetVideoCapturer())); | 506 video_track_->GetSource()->GetVideoCapturer())); |
| 506 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); | 507 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); |
| 507 sender->SetSsrc(kVideoSsrc2); | 508 sender->SetSsrc(kVideoSsrc2); |
| 508 | 509 |
| 509 // Calls expected from destructor. | 510 // Calls expected from destructor. |
| 510 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); | 511 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); |
| 511 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); | 512 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); |
| 512 } | 513 } |
| 513 | 514 |
| 514 } // namespace webrtc | 515 } // namespace webrtc |
| OLD | NEW |