| 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 29 matching lines...) Expand all Loading... |
| 40 rtc::Thread* worker_thread, | 40 rtc::Thread* worker_thread, |
| 41 std::unique_ptr<cricket::VideoCapturer> capturer, | 41 std::unique_ptr<cricket::VideoCapturer> capturer, |
| 42 const webrtc::MediaConstraintsInterface* constraints, | 42 const webrtc::MediaConstraintsInterface* constraints, |
| 43 bool remote); | 43 bool remote); |
| 44 | 44 |
| 45 static rtc::scoped_refptr<VideoTrackSourceInterface> Create( | 45 static rtc::scoped_refptr<VideoTrackSourceInterface> Create( |
| 46 rtc::Thread* worker_thread, | 46 rtc::Thread* worker_thread, |
| 47 std::unique_ptr<cricket::VideoCapturer> capturer, | 47 std::unique_ptr<cricket::VideoCapturer> capturer, |
| 48 bool remote); | 48 bool remote); |
| 49 | 49 |
| 50 bool is_screencast() const override { | 50 bool is_screencast() const final { return video_capturer_->IsScreencast(); } |
| 51 return video_capturer_->IsScreencast(); | 51 rtc::Optional<bool> needs_denoising() const final { return needs_denoising_; } |
| 52 } | |
| 53 rtc::Optional<bool> needs_denoising() const override { | |
| 54 return needs_denoising_; | |
| 55 } | |
| 56 | 52 |
| 57 bool GetStats(Stats* stats) override; | 53 bool GetStats(Stats* stats) final; |
| 58 | 54 |
| 59 protected: | 55 protected: |
| 60 VideoCapturerTrackSource(rtc::Thread* worker_thread, | 56 VideoCapturerTrackSource(rtc::Thread* worker_thread, |
| 61 std::unique_ptr<cricket::VideoCapturer> capturer, | 57 std::unique_ptr<cricket::VideoCapturer> capturer, |
| 62 bool remote); | 58 bool remote); |
| 63 virtual ~VideoCapturerTrackSource(); | 59 virtual ~VideoCapturerTrackSource(); |
| 64 void Initialize(const webrtc::MediaConstraintsInterface* constraints); | 60 void Initialize(const webrtc::MediaConstraintsInterface* constraints); |
| 65 | 61 |
| 66 private: | 62 private: |
| 67 void Stop(); | 63 void Stop(); |
| 68 | 64 |
| 69 void OnStateChange(cricket::VideoCapturer* capturer, | 65 void OnStateChange(cricket::VideoCapturer* capturer, |
| 70 cricket::CaptureState capture_state); | 66 cricket::CaptureState capture_state); |
| 71 | 67 |
| 72 rtc::Thread* signaling_thread_; | 68 rtc::Thread* signaling_thread_; |
| 73 rtc::Thread* worker_thread_; | 69 rtc::Thread* worker_thread_; |
| 74 rtc::AsyncInvoker invoker_; | 70 rtc::AsyncInvoker invoker_; |
| 75 std::unique_ptr<cricket::VideoCapturer> video_capturer_; | 71 std::unique_ptr<cricket::VideoCapturer> video_capturer_; |
| 76 bool started_; | 72 bool started_; |
| 77 cricket::VideoFormat format_; | 73 cricket::VideoFormat format_; |
| 78 rtc::Optional<bool> needs_denoising_; | 74 rtc::Optional<bool> needs_denoising_; |
| 79 }; | 75 }; |
| 80 | 76 |
| 81 } // namespace webrtc | 77 } // namespace webrtc |
| 82 | 78 |
| 83 #endif // WEBRTC_PC_VIDEOCAPTURERTRACKSOURCE_H_ | 79 #endif // WEBRTC_PC_VIDEOCAPTURERTRACKSOURCE_H_ |
| OLD | NEW |