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> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/api/mediastreaminterface.h" | 16 #include "webrtc/api/mediastreaminterface.h" |
17 #include "webrtc/api/videotracksource.h" | 17 #include "webrtc/api/videotracksource.h" |
18 #include "webrtc/base/asyncinvoker.h" | 18 #include "webrtc/base/asyncinvoker.h" |
19 #include "webrtc/base/scoped_ptr.h" | |
20 #include "webrtc/base/sigslot.h" | 19 #include "webrtc/base/sigslot.h" |
21 #include "webrtc/media/base/videocapturer.h" | 20 #include "webrtc/media/base/videocapturer.h" |
22 #include "webrtc/media/base/videocommon.h" | 21 #include "webrtc/media/base/videocommon.h" |
23 | 22 |
24 // VideoCapturerTrackSource implements VideoTrackSourceInterface. It owns a | 23 // VideoCapturerTrackSource implements VideoTrackSourceInterface. It owns a |
25 // cricket::VideoCapturer and make sure the camera is started at a resolution | 24 // cricket::VideoCapturer and make sure the camera is started at a resolution |
26 // that honors the constraints. | 25 // that honors the constraints. |
27 // The state is set depending on the result of starting the capturer. | 26 // The state is set depending on the result of starting the capturer. |
28 // If the constraint can't be met or the capturer fails to start, the state | 27 // If the constraint can't be met or the capturer fails to start, the state |
29 // transition to kEnded, otherwise it transitions to kLive. | 28 // transition to kEnded, otherwise it transitions to kLive. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 rtc::AsyncInvoker invoker_; | 76 rtc::AsyncInvoker invoker_; |
78 std::unique_ptr<cricket::VideoCapturer> video_capturer_; | 77 std::unique_ptr<cricket::VideoCapturer> video_capturer_; |
79 bool started_; | 78 bool started_; |
80 cricket::VideoFormat format_; | 79 cricket::VideoFormat format_; |
81 rtc::Optional<bool> needs_denoising_; | 80 rtc::Optional<bool> needs_denoising_; |
82 }; | 81 }; |
83 | 82 |
84 } // namespace webrtc | 83 } // namespace webrtc |
85 | 84 |
86 #endif // WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ | 85 #endif // WEBRTC_API_VIDEOCAPTURERTRACKSOURCE_H_ |
OLD | NEW |