OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 #include "webrtc/api/androidvideocapturer.h" | 11 #include "webrtc/api/androidvideocapturer.h" |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 | 14 |
15 #include "webrtc/api/android/jni/native_handle_impl.h" | 15 #include "webrtc/api/android/jni/native_handle_impl.h" |
16 #include "webrtc/base/common.h" | 16 #include "webrtc/base/common.h" |
17 #include "webrtc/base/timeutils.h" | 17 #include "webrtc/base/timeutils.h" |
18 #include "webrtc/media/engine/webrtcvideoframe.h" | 18 #include "webrtc/media/engine/webrtcvideoframe.h" |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 | 21 |
22 AndroidVideoCapturer::AndroidVideoCapturer( | 22 AndroidVideoCapturer::AndroidVideoCapturer( |
23 const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate) | 23 const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate, |
| 24 bool is_screencast) |
24 : running_(false), | 25 : running_(false), |
25 delegate_(delegate) { | 26 delegate_(delegate), |
| 27 is_screencast_(is_screencast) { |
26 thread_checker_.DetachFromThread(); | 28 thread_checker_.DetachFromThread(); |
27 SetSupportedFormats(delegate_->GetSupportedFormats()); | 29 SetSupportedFormats(delegate_->GetSupportedFormats()); |
28 } | 30 } |
29 | 31 |
30 AndroidVideoCapturer::~AndroidVideoCapturer() { | 32 AndroidVideoCapturer::~AndroidVideoCapturer() { |
31 RTC_CHECK(!running_); | 33 RTC_CHECK(!running_); |
32 } | 34 } |
33 | 35 |
34 cricket::CaptureState AndroidVideoCapturer::Start( | 36 cricket::CaptureState AndroidVideoCapturer::Start( |
35 const cricket::VideoFormat& capture_format) { | 37 const cricket::VideoFormat& capture_format) { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 86 |
85 bool AndroidVideoCapturer::GetBestCaptureFormat( | 87 bool AndroidVideoCapturer::GetBestCaptureFormat( |
86 const cricket::VideoFormat& desired, | 88 const cricket::VideoFormat& desired, |
87 cricket::VideoFormat* best_format) { | 89 cricket::VideoFormat* best_format) { |
88 // Delegate this choice to VideoCapturer.startCapture(). | 90 // Delegate this choice to VideoCapturer.startCapture(). |
89 *best_format = desired; | 91 *best_format = desired; |
90 return true; | 92 return true; |
91 } | 93 } |
92 | 94 |
93 } // namespace webrtc | 95 } // namespace webrtc |
OLD | NEW |