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 #ifndef WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ | 11 #ifndef WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ |
12 #define WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ | 12 #define WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ |
13 | 13 |
| 14 #include <memory> |
14 #include <string> | 15 #include <string> |
15 | 16 |
16 #include "webrtc/api/androidvideocapturer.h" | 17 #include "webrtc/api/androidvideocapturer.h" |
17 #include "webrtc/api/java/jni/jni_helpers.h" | 18 #include "webrtc/api/java/jni/jni_helpers.h" |
18 #include "webrtc/base/asyncinvoker.h" | 19 #include "webrtc/base/asyncinvoker.h" |
19 #include "webrtc/base/constructormagic.h" | 20 #include "webrtc/base/constructormagic.h" |
20 #include "webrtc/base/criticalsection.h" | 21 #include "webrtc/base/criticalsection.h" |
21 #include "webrtc/base/thread_checker.h" | 22 #include "webrtc/base/thread_checker.h" |
22 #include "webrtc/common_video/include/i420_buffer_pool.h" | 23 #include "webrtc/common_video/include/i420_buffer_pool.h" |
23 | 24 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 rtc::scoped_refptr<SurfaceTextureHelper> surface_texture_helper_; | 81 rtc::scoped_refptr<SurfaceTextureHelper> surface_texture_helper_; |
81 rtc::ThreadChecker thread_checker_; | 82 rtc::ThreadChecker thread_checker_; |
82 | 83 |
83 // |capturer| is a guaranteed to be a valid pointer between a call to | 84 // |capturer| is a guaranteed to be a valid pointer between a call to |
84 // AndroidVideoCapturerDelegate::Start | 85 // AndroidVideoCapturerDelegate::Start |
85 // until AndroidVideoCapturerDelegate::Stop. | 86 // until AndroidVideoCapturerDelegate::Stop. |
86 rtc::CriticalSection capturer_lock_; | 87 rtc::CriticalSection capturer_lock_; |
87 webrtc::AndroidVideoCapturer* capturer_ GUARDED_BY(capturer_lock_); | 88 webrtc::AndroidVideoCapturer* capturer_ GUARDED_BY(capturer_lock_); |
88 // |invoker_| is used to communicate with |capturer_| on the thread Start() is | 89 // |invoker_| is used to communicate with |capturer_| on the thread Start() is |
89 // called on. | 90 // called on. |
90 rtc::scoped_ptr<rtc::GuardedAsyncInvoker> invoker_ GUARDED_BY(capturer_lock_); | 91 std::unique_ptr<rtc::GuardedAsyncInvoker> invoker_ GUARDED_BY(capturer_lock_); |
91 | 92 |
92 static jobject application_context_; | 93 static jobject application_context_; |
93 | 94 |
94 RTC_DISALLOW_COPY_AND_ASSIGN(AndroidVideoCapturerJni); | 95 RTC_DISALLOW_COPY_AND_ASSIGN(AndroidVideoCapturerJni); |
95 }; | 96 }; |
96 | 97 |
97 } // namespace webrtc_jni | 98 } // namespace webrtc_jni |
98 | 99 |
99 #endif // WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ | 100 #endif // WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ |
OLD | NEW |