| 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 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // AndroidVideoCapturerJni implements AndroidVideoCapturerDelegate. | 30 // AndroidVideoCapturerJni implements AndroidVideoCapturerDelegate. |
| 31 // The purpose of the delegate is to hide the JNI specifics from the C++ only | 31 // The purpose of the delegate is to hide the JNI specifics from the C++ only |
| 32 // AndroidVideoCapturer. | 32 // AndroidVideoCapturer. |
| 33 class AndroidVideoCapturerJni : public webrtc::AndroidVideoCapturerDelegate { | 33 class AndroidVideoCapturerJni : public webrtc::AndroidVideoCapturerDelegate { |
| 34 public: | 34 public: |
| 35 static int SetAndroidObjects(JNIEnv* jni, jobject appliction_context); | 35 static int SetAndroidObjects(JNIEnv* jni, jobject appliction_context); |
| 36 | 36 |
| 37 AndroidVideoCapturerJni(JNIEnv* jni, | 37 AndroidVideoCapturerJni(JNIEnv* jni, |
| 38 jobject j_video_capturer, | 38 jobject j_video_capturer, |
| 39 jobject j_egl_context); | 39 rtc::scoped_refptr<SurfaceTextureHelper> helper); |
| 40 | 40 |
| 41 void Start(int width, int height, int framerate, | 41 void Start(int width, int height, int framerate, |
| 42 webrtc::AndroidVideoCapturer* capturer) override; | 42 webrtc::AndroidVideoCapturer* capturer) override; |
| 43 void Stop() override; | 43 void Stop() override; |
| 44 | 44 |
| 45 std::vector<cricket::VideoFormat> GetSupportedFormats() override; | 45 std::vector<cricket::VideoFormat> GetSupportedFormats() override; |
| 46 | 46 |
| 47 // Called from VideoCapturer::NativeObserver on a Java thread. | 47 // Called from VideoCapturer::NativeObserver on a Java thread. |
| 48 void OnCapturerStarted(bool success); | 48 void OnCapturerStarted(bool success); |
| 49 void OnMemoryBufferFrame(void* video_frame, int length, int width, | 49 void OnMemoryBufferFrame(void* video_frame, int length, int width, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 std::unique_ptr<rtc::GuardedAsyncInvoker> invoker_ GUARDED_BY(capturer_lock_); | 91 std::unique_ptr<rtc::GuardedAsyncInvoker> invoker_ GUARDED_BY(capturer_lock_); |
| 92 | 92 |
| 93 static jobject application_context_; | 93 static jobject application_context_; |
| 94 | 94 |
| 95 RTC_DISALLOW_COPY_AND_ASSIGN(AndroidVideoCapturerJni); | 95 RTC_DISALLOW_COPY_AND_ASSIGN(AndroidVideoCapturerJni); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace webrtc_jni | 98 } // namespace webrtc_jni |
| 99 | 99 |
| 100 #endif // WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ | 100 #endif // WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ |
| OLD | NEW |