OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ |
6 #define MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ | 6 #define MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 static VideoCaptureDevice* Create(const Name& device_name); | 36 static VideoCaptureDevice* Create(const Name& device_name); |
37 static bool RegisterVideoCaptureDevice(JNIEnv* env); | 37 static bool RegisterVideoCaptureDevice(JNIEnv* env); |
38 | 38 |
39 // Registers the Java VideoCaptureDevice pointer, used by the rest of the | 39 // Registers the Java VideoCaptureDevice pointer, used by the rest of the |
40 // methods of the class to operate the Java capture code. This method must be | 40 // methods of the class to operate the Java capture code. This method must be |
41 // called after the class constructor and before AllocateAndStart(). | 41 // called after the class constructor and before AllocateAndStart(). |
42 bool Init(); | 42 bool Init(); |
43 | 43 |
44 // VideoCaptureDevice implementation. | 44 // VideoCaptureDevice implementation. |
45 virtual void AllocateAndStart(const VideoCaptureParams& params, | 45 virtual void AllocateAndStart(const VideoCaptureParams& params, |
46 scoped_ptr<Client> client) OVERRIDE; | 46 scoped_ptr<Client> client) override; |
47 virtual void StopAndDeAllocate() OVERRIDE; | 47 virtual void StopAndDeAllocate() override; |
48 | 48 |
49 // Implement org.chromium.media.VideoCapture.nativeOnFrameAvailable. | 49 // Implement org.chromium.media.VideoCapture.nativeOnFrameAvailable. |
50 void OnFrameAvailable( | 50 void OnFrameAvailable( |
51 JNIEnv* env, | 51 JNIEnv* env, |
52 jobject obj, | 52 jobject obj, |
53 jbyteArray data, | 53 jbyteArray data, |
54 jint length, | 54 jint length, |
55 jint rotation); | 55 jint rotation); |
56 | 56 |
57 private: | 57 private: |
(...skipping 20 matching lines...) Expand all Loading... |
78 | 78 |
79 // Java VideoCaptureAndroid instance. | 79 // Java VideoCaptureAndroid instance. |
80 base::android::ScopedJavaLocalRef<jobject> j_capture_; | 80 base::android::ScopedJavaLocalRef<jobject> j_capture_; |
81 | 81 |
82 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceAndroid); | 82 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceAndroid); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace media | 85 } // namespace media |
86 | 86 |
87 #endif // MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ | 87 #endif // MEDIA_VIDEO_CAPTURE_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ |
OLD | NEW |