| 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 |
| 11 #ifndef WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ | 11 #ifndef WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ |
| 12 #define WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ | 12 #define WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ |
| 13 | 13 |
| 14 #include <memory> |
| 15 |
| 14 #include "webrtc/api/mediastreaminterface.h" | 16 #include "webrtc/api/mediastreaminterface.h" |
| 15 #include "webrtc/api/videotracksource.h" | 17 #include "webrtc/api/videotracksource.h" |
| 16 #include "webrtc/base/asyncinvoker.h" | 18 #include "webrtc/base/asyncinvoker.h" |
| 17 #include "webrtc/base/scoped_ptr.h" | 19 #include "webrtc/base/scoped_ptr.h" |
| 18 #include "webrtc/base/sigslot.h" | 20 #include "webrtc/base/sigslot.h" |
| 19 #include "webrtc/media/base/videocapturer.h" | 21 #include "webrtc/media/base/videocapturer.h" |
| 20 #include "webrtc/media/base/videocommon.h" | 22 #include "webrtc/media/base/videocommon.h" |
| 21 | 23 |
| 22 // VideoCapturerTrackSource implements VideoTrackSourceInterface. It owns a | 24 // VideoCapturerTrackSource implements VideoTrackSourceInterface. It owns a |
| 23 // cricket::VideoCapturer and make sure the camera is started at a resolution | 25 // cricket::VideoCapturer and make sure the camera is started at a resolution |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::Thread* worker_thread_; | 76 rtc::Thread* worker_thread_; |
| 75 rtc::AsyncInvoker invoker_; | 77 rtc::AsyncInvoker invoker_; |
| 76 rtc::scoped_ptr<cricket::VideoCapturer> video_capturer_; | 78 std::unique_ptr<cricket::VideoCapturer> video_capturer_; |
| 77 bool started_; | 79 bool started_; |
| 78 cricket::VideoFormat format_; | 80 cricket::VideoFormat format_; |
| 79 rtc::Optional<bool> needs_denoising_; | 81 rtc::Optional<bool> needs_denoising_; |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 } // namespace webrtc | 84 } // namespace webrtc |
| 83 | 85 |
| 84 #endif // WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ | 86 #endif // WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ |
| OLD | NEW |