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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 206 } |
207 | 207 |
208 JOW(void, VideoCapturerAndroid_00024NativeObserver_nativeOnOutputFormatRequest) | 208 JOW(void, VideoCapturerAndroid_00024NativeObserver_nativeOnOutputFormatRequest) |
209 (JNIEnv* jni, jclass, jlong j_capturer, jint j_width, jint j_height, | 209 (JNIEnv* jni, jclass, jlong j_capturer, jint j_width, jint j_height, |
210 jint j_fps) { | 210 jint j_fps) { |
211 LOG(LS_INFO) << "NativeObserver_nativeOnOutputFormatRequest"; | 211 LOG(LS_INFO) << "NativeObserver_nativeOnOutputFormatRequest"; |
212 reinterpret_cast<AndroidVideoCapturerJni*>(j_capturer)->OnOutputFormatRequest( | 212 reinterpret_cast<AndroidVideoCapturerJni*>(j_capturer)->OnOutputFormatRequest( |
213 j_width, j_height, j_fps); | 213 j_width, j_height, j_fps); |
214 } | 214 } |
215 | 215 |
| 216 JOW(jlong, VideoCapturerAndroid_nativeCreateVideoCapturer) |
| 217 (JNIEnv* jni, jclass, |
| 218 jobject j_video_capturer, jobject j_surface_texture_helper) { |
| 219 rtc::scoped_refptr<webrtc::AndroidVideoCapturerDelegate> delegate = |
| 220 new rtc::RefCountedObject<AndroidVideoCapturerJni>( |
| 221 jni, j_video_capturer, j_surface_texture_helper); |
| 222 rtc::scoped_ptr<cricket::VideoCapturer> capturer( |
| 223 new webrtc::AndroidVideoCapturer(delegate)); |
| 224 // Caller takes ownership of the cricket::VideoCapturer* pointer. |
| 225 return jlongFromPointer(capturer.release()); |
| 226 } |
| 227 |
216 } // namespace webrtc_jni | 228 } // namespace webrtc_jni |
OLD | NEW |