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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 cricket::VideoCapturer* capturer, | 47 cricket::VideoCapturer* capturer, |
48 bool remote); | 48 bool remote); |
49 | 49 |
50 cricket::VideoCapturer* GetVideoCapturer() override { | 50 cricket::VideoCapturer* GetVideoCapturer() override { |
51 return video_capturer_.get(); | 51 return video_capturer_.get(); |
52 } | 52 } |
53 | 53 |
54 bool is_screencast() const override { | 54 bool is_screencast() const override { |
55 return video_capturer_->IsScreencast(); | 55 return video_capturer_->IsScreencast(); |
56 } | 56 } |
57 bool needs_denoising() const override { return needs_denoising_; } | 57 rtc::Optional<bool> needs_denoising() const override { |
| 58 return needs_denoising_; |
| 59 } |
58 | 60 |
59 void Stop() override; | 61 void Stop() override; |
60 void Restart() override; | 62 void Restart() override; |
61 | 63 |
62 protected: | 64 protected: |
63 VideoCapturerTrackSource(rtc::Thread* worker_thread, | 65 VideoCapturerTrackSource(rtc::Thread* worker_thread, |
64 cricket::VideoCapturer* capturer, | 66 cricket::VideoCapturer* capturer, |
65 bool remote); | 67 bool remote); |
66 virtual ~VideoCapturerTrackSource(); | 68 virtual ~VideoCapturerTrackSource(); |
67 void Initialize(const webrtc::MediaConstraintsInterface* constraints); | 69 void Initialize(const webrtc::MediaConstraintsInterface* constraints); |
68 | 70 |
69 private: | 71 private: |
70 void OnStateChange(cricket::VideoCapturer* capturer, | 72 void OnStateChange(cricket::VideoCapturer* capturer, |
71 cricket::CaptureState capture_state); | 73 cricket::CaptureState capture_state); |
72 | 74 |
73 rtc::Thread* signaling_thread_; | 75 rtc::Thread* signaling_thread_; |
74 rtc::AsyncInvoker invoker_; | 76 rtc::AsyncInvoker invoker_; |
75 rtc::scoped_ptr<cricket::VideoCapturer> video_capturer_; | 77 rtc::scoped_ptr<cricket::VideoCapturer> video_capturer_; |
76 bool started_; | 78 bool started_; |
77 cricket::VideoFormat format_; | 79 cricket::VideoFormat format_; |
78 bool needs_denoising_; | 80 rtc::Optional<bool> needs_denoising_; |
79 }; | 81 }; |
80 | 82 |
81 } // namespace webrtc | 83 } // namespace webrtc |
82 | 84 |
83 #endif // WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ | 85 #endif // WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ |
OLD | NEW |