Home
last modified time | relevance | path

Searched refs:Camera (Results 1 – 25 of 88) sorted by relevance

1234

/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
DAndroidCameraCapabilities.java19 import android.hardware.Camera;
40 AndroidCameraCapabilities(Camera.Parameters p) { in AndroidCameraCapabilities()
89 private void buildPreviewFpsRange(Camera.Parameters p) { in buildPreviewFpsRange()
97 private void buildPreviewSizes(Camera.Parameters p) { in buildPreviewSizes()
98 List<Camera.Size> supportedPreviewSizes = p.getSupportedPreviewSizes(); in buildPreviewSizes()
100 for (Camera.Size s : supportedPreviewSizes) { in buildPreviewSizes()
107 private void buildVideoSizes(Camera.Parameters p) { in buildVideoSizes()
108 List<Camera.Size> supportedVideoSizes = p.getSupportedVideoSizes(); in buildVideoSizes()
110 for (Camera.Size s : supportedVideoSizes) { in buildVideoSizes()
117 private void buildPictureSizes(Camera.Parameters p) { in buildPictureSizes()
[all …]
DAndroidCameraAgentImpl.java21 import android.hardware.Camera;
22 import android.hardware.Camera.AutoFocusCallback;
23 import android.hardware.Camera.AutoFocusMoveCallback;
24 import android.hardware.Camera.ErrorCallback;
25 import android.hardware.Camera.FaceDetectionListener;
26 import android.hardware.Camera.OnZoomChangeListener;
27 import android.hardware.Camera.Parameters;
28 import android.hardware.Camera.PictureCallback;
29 import android.hardware.Camera.PreviewCallback;
30 import android.hardware.Camera.ShutterCallback;
[all …]
DAndroidCameraSettings.java19 import android.hardware.Camera;
31 public AndroidCameraSettings(CameraCapabilities capabilities, Camera.Parameters params) { in AndroidCameraSettings()
42 Camera.Size paramPreviewSize = params.getPreviewSize(); in AndroidCameraSettings()
47 setPreviewFpsRange(previewFpsRange[Camera.Parameters.PREVIEW_FPS_MIN_INDEX], in AndroidCameraSettings()
48 previewFpsRange[Camera.Parameters.PREVIEW_FPS_MAX_INDEX]); in AndroidCameraSettings()
70 Camera.Size paramPictureSize = params.getPictureSize(); in AndroidCameraSettings()
DCameraSettings.java19 import android.hardware.Camera;
39 protected final List<Camera.Area> mMeteringAreas = new ArrayList<>();
40 protected final List<Camera.Area> mFocusAreas = new ArrayList<>();
369 public void setMeteringAreas(List<Camera.Area> areas) { in setMeteringAreas()
376 public List<Camera.Area> getMeteringAreas() { in getMeteringAreas()
377 return new ArrayList<Camera.Area>(mMeteringAreas); in getMeteringAreas()
415 public void setFocusAreas(List<Camera.Area> areas) { in setFocusAreas()
422 public List<Camera.Area> getFocusAreas() { in getFocusAreas()
423 return new ArrayList<Camera.Area>(mFocusAreas); in getFocusAreas()
/frameworks/av/camera/
DCamera.cpp37 Camera::Camera(int cameraId) in Camera() function in android::Camera
42 CameraTraits<Camera>::TCamConnectService CameraTraits<Camera>::fnConnectService =
46 sp<Camera> Camera::create(const sp<::android::hardware::ICamera>& camera) in create()
54 sp<Camera> c = new Camera(-1); in create()
64 Camera::~Camera() in ~Camera()
74 sp<Camera> Camera::connect(int cameraId, const String16& clientPackageName, in connect()
80 status_t Camera::connectLegacy(int cameraId, int halVersion, in connectLegacy()
83 sp<Camera>& camera) in connectLegacy()
86 sp<Camera> c = new Camera(cameraId); in connectLegacy()
137 status_t Camera::reconnect() in reconnect()
[all …]
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/videosrc/
DCameraSource.java31 import android.hardware.Camera;
70 private Camera mCamera;
90 private Camera.Parameters mCameraParameters;
136 mCamera = Camera.open(mCameraId); in open()
233 … mCameraParameters.setPreviewFpsRange(closestRange[Camera.Parameters.PREVIEW_FPS_MIN_INDEX], in fieldPortValueUpdated()
234 … closestRange[Camera.Parameters.PREVIEW_FPS_MAX_INDEX]); in fieldPortValueUpdated()
239 synchronized public Camera.Parameters getCameraParameters() { in getCameraParameters()
243 mCamera = Camera.open(mCameraId); in getCameraParameters()
261 mCameraParameters.setPreviewFpsRange(closestRange[Camera.Parameters.PREVIEW_FPS_MIN_INDEX], in getCameraParameters()
262 closestRange[Camera.Parameters.PREVIEW_FPS_MAX_INDEX]); in getCameraParameters()
[all …]
/frameworks/av/camera/include/camera/
DCamera.h52 class Camera; variable
55 struct CameraTraits<Camera>
69 class Camera :
70 public CameraBase<Camera>,
82 static sp<Camera> create(const sp<::android::hardware::ICamera>& camera);
83 static sp<Camera> connect(int cameraId,
89 int clientUid, sp<Camera>& camera);
91 virtual ~Camera();
184 explicit RecordingProxy(const sp<Camera>& camera);
195 sp<Camera> mCamera;
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
DCameraTestHelper.java21 import android.hardware.Camera;
22 import android.hardware.Camera.Parameters;
23 import android.hardware.Camera.PictureCallback;
24 import android.hardware.Camera.ShutterCallback;
37 public Camera mCamera;
46 private final class CameraErrorCallback implements android.hardware.Camera.ErrorCallback {
47 public void onError(int error, android.hardware.Camera camera) { in onError()
61 public void onPictureTaken(byte[] data, Camera camera) {
68 public void onPictureTaken(byte[] data, Camera camera) {
106 mCamera = Camera.open(CAMERA_ID); in setupCameraTest()
[all …]
/frameworks/base/core/java/android/hardware/camera2/legacy/
DParameterUtils.java23 import android.hardware.Camera;
24 import android.hardware.Camera.Area;
57 public static final Camera.Area CAMERA_AREA_DEFAULT =
58 new Camera.Area(new Rect(NORMALIZED_RECTANGLE_DEFAULT),
92 public final Camera.Area meteringArea;
236 public static Size convertSize(Camera.Size size) { in convertSize()
245 public static List<Size> convertSizeList(List<Camera.Size> sizeList) { in convertSizeList()
249 for (Camera.Size s : sizeList) { in convertSizeList()
258 public static Size[] convertSizeListToArray(List<Camera.Size> sizeList) { in convertSizeListToArray()
263 for (Camera.Size s : sizeList) { in convertSizeListToArray()
[all …]
DLegacyMetadataMapper.java22 import android.hardware.Camera;
23 import android.hardware.Camera.CameraInfo;
24 import android.hardware.Camera.Parameters;
121 public static CameraCharacteristics createCharacteristics(Camera.Parameters parameters, in createCharacteristics()
155 Camera.Parameters params = Camera.getEmptyParameters(); in createCharacteristics()
179 Camera.Parameters p) { in mapCharacteristicsFromParameters()
263 private static void mapScalerStreamConfigs(CameraMetadataNative m, Camera.Parameters p) { in mapScalerStreamConfigs()
275 List<Camera.Size> previewSizes = p.getSupportedPreviewSizes(); in mapScalerStreamConfigs()
276 List<Camera.Size> jpegSizes = p.getSupportedPictureSizes(); in mapScalerStreamConfigs()
293 Camera.Size maxJpegSize = SizeAreaComparator.findLargestByArea(jpegSizes); in mapScalerStreamConfigs()
[all …]
DLegacyFaceDetectMapper.java20 import android.hardware.Camera;
21 import android.hardware.Camera.FaceDetectionListener;
49 private final Camera mCamera;
61 private Camera.Face[] mFaces;
62 private Camera.Face[] mFacesPrev;
71 public LegacyFaceDetectMapper(Camera camera, CameraCharacteristics characteristics) { in LegacyFaceDetectMapper()
87 public void onFaceDetection(Camera.Face[] faces, Camera camera) { in LegacyFaceDetectMapper()
122 Camera.Parameters parameters) { in processFaceDetectMode()
211 Camera.Face[] faces, previousFaces; in mapResultFaces()
233 Camera.Parameters params = legacyRequest.parameters; in mapResultFaces()
[all …]
DSizeAreaComparator.java19 import android.hardware.Camera;
33 public class SizeAreaComparator implements Comparator<Camera.Size> {
38 public int compare(Camera.Size size, Camera.Size size2) { in compare()
67 public static Camera.Size findLargestByArea(List<Camera.Size> sizes) { in findLargestByArea()
DLegacyFocusStateMapper.java19 import android.hardware.Camera;
20 import android.hardware.Camera.Parameters;
43 private final Camera mCamera;
62 public LegacyFocusStateMapper(Camera camera) { in LegacyFocusStateMapper()
81 Camera.Parameters parameters) { in processRequestTriggers()
117 Camera.AutoFocusMoveCallback afMoveCallback = new Camera.AutoFocusMoveCallback() { in processRequestTriggers()
119 public void onAutoFocusMoving(boolean start, Camera camera) { in processRequestTriggers()
205 mCamera.autoFocus(new Camera.AutoFocusCallback() { in processRequestTriggers()
207 public void onAutoFocus(boolean success, Camera camera) { in processRequestTriggers()
DLegacyRequest.java19 import android.hardware.Camera;
37 public final Camera.Parameters parameters;
48 Size previewSize, Camera.Parameters parameters) { in LegacyRequest()
54 this.parameters = Camera.getParametersCopy(parameters); in LegacyRequest()
62 public void setParameters(Camera.Parameters parameters) { in setParameters()
DLegacyResultMapper.java20 import android.hardware.Camera;
21 import android.hardware.Camera.Parameters;
115 Camera.Parameters params = legacyRequest.parameters; in convertResultMetadata()
276 Camera.Size s = params.getJpegThumbnailSize(); in convertResultMetadata()
351 Rect activeArray, ZoomData zoomData, Camera.Parameters p) { in mapAf()
369 private static void mapAwb(CameraMetadataNative m, Camera.Parameters p) { in mapAwb()
385 List<Camera.Area> meteringAreaList, String regionName) { in getMeteringRectangles()
388 for (Camera.Area area : meteringAreaList) { in getMeteringRectangles()
487 case Camera.Parameters.WHITE_BALANCE_AUTO: in convertLegacyAwbMode()
489 case Camera.Parameters.WHITE_BALANCE_INCANDESCENT: in convertLegacyAwbMode()
[all …]
DLegacyRequestMapper.java20 import android.hardware.Camera;
21 import android.hardware.Camera.Parameters;
62 Camera.Parameters params = legacyRequest.parameters; in convertRequestMetadata()
136 List<Camera.Area> meteringAreaList = convertMeteringRegionsToLegacy( in convertRequestMetadata()
150 List<Camera.Area> focusAreaList = convertMeteringRegionsToLegacy( in convertRequestMetadata()
177 params.setPreviewFpsRange(rangeToApply[Camera.Parameters.PREVIEW_FPS_MIN_INDEX], in convertRequestMetadata()
178 rangeToApply[Camera.Parameters.PREVIEW_FPS_MAX_INDEX]); in convertRequestMetadata()
423 List<Camera.Size> sizes = params.getSupportedJpegThumbnailSizes(); in convertRequestMetadata()
484 private static List<Camera.Area> convertMeteringRegionsToLegacy( in convertMeteringRegionsToLegacy()
511 List<Camera.Area> meteringAreaList = new ArrayList<>(countMeteringAreas); in convertMeteringRegionsToLegacy()
[all …]
/frameworks/rs/tests/java_api/LivePreview/src/com/android/rs/livepreview/
DCameraPreviewActivity.java30 import android.hardware.Camera;
59 implements TextureView.SurfaceTextureListener, Camera.PreviewCallback {
74 private Camera mCamera;
76 private List<Camera.Size> mPreviewSizes;
77 private Camera.Size mNextPreviewSize;
78 private Camera.Size mPreviewSize;
105 int numCameras = Camera.getNumberOfCameras(); in onCreate()
197 mCamera = Camera.open(id); in setUpCamera()
198 Camera.Parameters p = mCamera.getParameters(); in setUpCamera()
202 List<Camera.Size> unsortedSizes = p.getSupportedPreviewSizes(); in setUpCamera()
[all …]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DTextureViewActivity.java23 import android.hardware.Camera;
41 private Camera mCamera;
102 mCamera = Camera.open(); in onSurfaceTextureAvailable()
105 Camera.Size previewSize = mCamera.getParameters().getPreviewSize(); in onSurfaceTextureAvailable()
119 Camera.CameraInfo info = new Camera.CameraInfo(); in getCameraOrientation()
120 for (int i = 0; i < Camera.getNumberOfCameras(); i++) { in getCameraOrientation()
121 Camera.getCameraInfo(i, info); in getCameraOrientation()
122 if (info.facing == Camera.CameraInfo.CAMERA_FACING_BACK) break; in getCameraOrientation()
DGetBitmapSurfaceViewActivity.java21 import android.hardware.Camera;
38 private Camera mCamera;
83 mCamera = Camera.open(); in surfaceCreated()
96 int cameraId, android.hardware.Camera camera) { in setCameraDisplayOrientation()
97 android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo(); in setCameraDisplayOrientation()
98 android.hardware.Camera.getCameraInfo(cameraId, info); in setCameraDisplayOrientation()
118 if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) { in setCameraDisplayOrientation()
/frameworks/base/core/jni/
Dandroid_hardware_Camera.cpp74 JNICameraContext(JNIEnv* env, jobject weak_this, jclass clazz, const sp<Camera>& camera);
87 sp<Camera> getCamera() { Mutex::Autolock _l(mLock); return mCamera; } in getCamera()
99 sp<Camera> mCamera; // strong reference to native object
130 sp<Camera> get_native_camera(JNIEnv *env, jobject thiz, JNICameraContext** pContext) in get_native_camera()
132 sp<Camera> camera; in get_native_camera()
148 JNICameraContext::JNICameraContext(JNIEnv* env, jobject weak_this, jclass clazz, const sp<Camera>& … in JNICameraContext()
529 return Camera::getNumberOfCameras(); in android_hardware_Camera_getNumberOfCameras()
536 if (cameraId >= Camera::getNumberOfCameras() || cameraId < 0) { in android_hardware_Camera_getCameraInfo()
542 status_t rc = Camera::getCameraInfo(cameraId, &cameraInfo); in android_hardware_Camera_getCameraInfo()
569 sp<Camera> camera; in android_hardware_Camera_native_setup()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/
DCameraTest.java23 import android.hardware.Camera;
24 import android.hardware.Camera.PictureCallback;
25 import android.hardware.Camera.PreviewCallback;
26 import android.hardware.Camera.ShutterCallback;
66 Camera mCamera;
93 mCamera = Camera.open(CAMERA_ID); in initializeMessageLooper()
121 public void onPreviewFrame(byte [] rawData, Camera camera) { in onPreviewFrame()
147 public void onPictureTaken(byte [] rawData, Camera camera) { in onPictureTaken()
156 public void onPictureTaken(byte [] rawData, Camera camera) { in onPictureTaken()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/camera/
DCameraPairwiseTest.java19 import android.hardware.Camera;
384 Camera.Parameters params = mCameraTestHelper.getCameraParameters(); in genericPairwiseTestCase()
396 params.setFlashMode(Camera.Parameters.FLASH_MODE_ON); in genericPairwiseTestCase()
399 params.setFlashMode(Camera.Parameters.FLASH_MODE_OFF); in genericPairwiseTestCase()
402 params.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO); in genericPairwiseTestCase()
422 params.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_DAYLIGHT); in genericPairwiseTestCase()
425 params.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_FLUORESCENT); in genericPairwiseTestCase()
428 params.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_INCANDESCENT); in genericPairwiseTestCase()
431 params.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_CLOUDY_DAYLIGHT); in genericPairwiseTestCase()
434 params.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_AUTO); in genericPairwiseTestCase()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DCameraOpenTest.java19 import android.hardware.Camera;
33 private Camera mCamera;
40 int nCameras = Camera.getNumberOfCameras(); in testOpenLegacy()
43 mCamera.openLegacy(id, Camera.CAMERA_HAL_API_VERSION_1_0); in testOpenLegacy()
/frameworks/base/media/java/android/media/
DCamcorderProfile.java20 import android.hardware.Camera;
21 import android.hardware.Camera.CameraInfo;
395 int numberOfCameras = Camera.getNumberOfCameras(); in get()
398 Camera.getCameraInfo(i, cameraInfo); in get()
494 int numberOfCameras = Camera.getNumberOfCameras(); in hasProfile()
497 Camera.getCameraInfo(i, cameraInfo); in hasProfile()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DCameraStreamer.java21 import android.hardware.Camera;
22 import android.hardware.Camera.CameraInfo;
23 import android.hardware.Camera.PreviewCallback;
243 protected void setupPreviewTexture(Camera camera) { in setupPreviewTexture()
403 protected void setupPreviewTexture(Camera camera) { in setupPreviewTexture()
561 public void onPreviewFrame(byte[] data, Camera camera) {
572 Camera camera = mRunner.mCamera; in setupServerFrame()
811 private String mFlashMode = Camera.Parameters.FLASH_MODE_OFF;
814 private Camera mCamera = null;
958 public Camera getCamera() { in getCamera()
[all …]

1234