| 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_PC_VIDEOCAPTURERTRACKSOURCE_H_ | 11 #ifndef WEBRTC_PC_VIDEOCAPTURERTRACKSOURCE_H_ |
| 12 #define WEBRTC_PC_VIDEOCAPTURERTRACKSOURCE_H_ | 12 #define WEBRTC_PC_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/base/asyncinvoker.h" |
| 18 #include "webrtc/base/sigslot.h" |
| 17 #include "webrtc/media/base/videocapturer.h" | 19 #include "webrtc/media/base/videocapturer.h" |
| 18 #include "webrtc/media/base/videocommon.h" | 20 #include "webrtc/media/base/videocommon.h" |
| 19 #include "webrtc/pc/videotracksource.h" | 21 #include "webrtc/pc/videotracksource.h" |
| 20 #include "webrtc/rtc_base/asyncinvoker.h" | |
| 21 #include "webrtc/rtc_base/sigslot.h" | |
| 22 | 22 |
| 23 // VideoCapturerTrackSource implements VideoTrackSourceInterface. It owns a | 23 // VideoCapturerTrackSource implements VideoTrackSourceInterface. It owns a |
| 24 // 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 |
| 25 // that honors the constraints. | 25 // that honors the constraints. |
| 26 // 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. |
| 27 // 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 |
| 28 // transition to kEnded, otherwise it transitions to kLive. | 28 // transition to kEnded, otherwise it transitions to kLive. |
| 29 namespace webrtc { | 29 namespace webrtc { |
| 30 | 30 |
| 31 class MediaConstraintsInterface; | 31 class MediaConstraintsInterface; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 rtc::AsyncInvoker invoker_; | 70 rtc::AsyncInvoker invoker_; |
| 71 std::unique_ptr<cricket::VideoCapturer> video_capturer_; | 71 std::unique_ptr<cricket::VideoCapturer> video_capturer_; |
| 72 bool started_; | 72 bool started_; |
| 73 cricket::VideoFormat format_; | 73 cricket::VideoFormat format_; |
| 74 rtc::Optional<bool> needs_denoising_; | 74 rtc::Optional<bool> needs_denoising_; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace webrtc | 77 } // namespace webrtc |
| 78 | 78 |
| 79 #endif // WEBRTC_PC_VIDEOCAPTURERTRACKSOURCE_H_ | 79 #endif // WEBRTC_PC_VIDEOCAPTURERTRACKSOURCE_H_ |
| OLD | NEW |