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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 MOCK_METHOD2(SetCaptureDevice, | 86 MOCK_METHOD2(SetCaptureDevice, |
87 bool(uint32_t ssrc, cricket::VideoCapturer* camera)); | 87 bool(uint32_t ssrc, cricket::VideoCapturer* camera)); |
88 MOCK_METHOD3(SetVideoPlayout, | 88 MOCK_METHOD3(SetVideoPlayout, |
89 void(uint32_t ssrc, | 89 void(uint32_t ssrc, |
90 bool enable, | 90 bool enable, |
91 cricket::VideoRenderer* renderer)); | 91 cricket::VideoRenderer* renderer)); |
92 MOCK_METHOD3(SetVideoSend, | 92 MOCK_METHOD3(SetVideoSend, |
93 void(uint32_t ssrc, | 93 void(uint32_t ssrc, |
94 bool enable, | 94 bool enable, |
95 const cricket::VideoOptions* options)); | 95 const cricket::VideoOptions* options)); |
| 96 rtc::VideoSinkInterface<cricket::VideoFrame>* GetSink( |
| 97 uint32_t ssrc) override { |
| 98 return NULL; |
| 99 } |
96 }; | 100 }; |
97 | 101 |
98 class FakeVideoSource : public Notifier<VideoSourceInterface> { | 102 class FakeVideoSource : public Notifier<VideoSourceInterface> { |
99 public: | 103 public: |
100 static rtc::scoped_refptr<FakeVideoSource> Create(bool remote) { | 104 static rtc::scoped_refptr<FakeVideoSource> Create(bool remote) { |
101 return new rtc::RefCountedObject<FakeVideoSource>(remote); | 105 return new rtc::RefCountedObject<FakeVideoSource>(remote); |
102 } | 106 } |
103 virtual cricket::VideoCapturer* GetVideoCapturer() { return &fake_capturer_; } | 107 virtual cricket::VideoCapturer* GetVideoCapturer() { return &fake_capturer_; } |
104 virtual void Stop() {} | 108 virtual void Stop() {} |
105 virtual void Restart() {} | 109 virtual void Restart() {} |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 video_track_->GetSource()->GetVideoCapturer())); | 510 video_track_->GetSource()->GetVideoCapturer())); |
507 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); | 511 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); |
508 sender->SetSsrc(kVideoSsrc2); | 512 sender->SetSsrc(kVideoSsrc2); |
509 | 513 |
510 // Calls expected from destructor. | 514 // Calls expected from destructor. |
511 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); | 515 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); |
512 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); | 516 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); |
513 } | 517 } |
514 | 518 |
515 } // namespace webrtc | 519 } // namespace webrtc |
OLD | NEW |