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_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ |
6 #define MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ | 6 #define MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "media/capture/capture_export.h" | 16 #include "media/base/media_export.h" |
17 #include "media/capture/video/video_capture_device.h" | 17 #include "media/capture/video/video_capture_device.h" |
18 | 18 |
19 namespace tracked_objects { | 19 namespace tracked_objects { |
20 class Location; | 20 class Location; |
21 } // namespace tracked_ | 21 } // namespace tracked_ |
22 | 22 |
23 namespace media { | 23 namespace media { |
24 | 24 |
25 // VideoCaptureDevice on Android. The VideoCaptureDevice API's are called | 25 // VideoCaptureDevice on Android. The VideoCaptureDevice API's are called |
26 // by VideoCaptureManager on its own thread, while OnFrameAvailable is called | 26 // by VideoCaptureManager on its own thread, while OnFrameAvailable is called |
27 // on JAVA thread (i.e., UI thread). Both will access |state_| and |client_|, | 27 // on JAVA thread (i.e., UI thread). Both will access |state_| and |client_|, |
28 // but only VideoCaptureManager would change their value. | 28 // but only VideoCaptureManager would change their value. |
29 class CAPTURE_EXPORT VideoCaptureDeviceAndroid : public VideoCaptureDevice { | 29 class MEDIA_EXPORT VideoCaptureDeviceAndroid : public VideoCaptureDevice { |
30 public: | 30 public: |
31 // Automatically generated enum to interface with Java world. | 31 // Automatically generated enum to interface with Java world. |
32 // | 32 // |
33 // A Java counterpart will be generated for this enum. | 33 // A Java counterpart will be generated for this enum. |
34 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media | 34 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media |
35 enum AndroidImageFormat { | 35 enum AndroidImageFormat { |
36 // Android graphics ImageFormat mapping, see reference in: | 36 // Android graphics ImageFormat mapping, see reference in: |
37 // http://developer.android.com/reference/android/graphics/ImageFormat.html | 37 // http://developer.android.com/reference/android/graphics/ImageFormat.html |
38 ANDROID_IMAGE_FORMAT_NV21 = 17, | 38 ANDROID_IMAGE_FORMAT_NV21 = 17, |
39 ANDROID_IMAGE_FORMAT_YUV_420_888 = 35, | 39 ANDROID_IMAGE_FORMAT_YUV_420_888 = 35, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 // Java VideoCaptureAndroid instance. | 108 // Java VideoCaptureAndroid instance. |
109 base::android::ScopedJavaLocalRef<jobject> j_capture_; | 109 base::android::ScopedJavaLocalRef<jobject> j_capture_; |
110 | 110 |
111 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceAndroid); | 111 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceAndroid); |
112 }; | 112 }; |
113 | 113 |
114 } // namespace media | 114 } // namespace media |
115 | 115 |
116 #endif // MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ | 116 #endif // MEDIA_CAPTURE_VIDEO_ANDROID_VIDEO_CAPTURE_DEVICE_ANDROID_H_ |
OLD | NEW |