Home
last modified time | relevance | path

Searched full:camera (Results 1 – 25 of 394) sorted by relevance

12345678910>>...16

/cts/hostsidetests/ctsverifier/src/com/android/cts/verifier/
DCameraTest.java36 "android.hardware.Camera#getParameters",
37 "android.hardware.Camera#setParameters",
38 "android.hardware.Camera#setDisplayOrientation",
39 "android.hardware.Camera#setPreviewCallback",
40 "android.hardware.Camera#stopPreview",
41 "android.hardware.Camera#release",
42 "android.hardware.Camera#setPreviewTexture",
43 "android.hardware.Camera#startPreview",
44 "android.hardware.Camera.Parameters#setPreviewFormat",
45 "android.hardware.Camera.Parameters#setPreviewSize",
[all …]
/cts/tests/camera/utils/src/android/hardware/cts/helpers/
DCameraUtils.java24 import android.hardware.Camera;
25 import android.hardware.Camera.Parameters;
26 import android.hardware.Camera.Size;
47 * Utility class containing helper functions for the Camera CTS tests.
58 * Camera2 API for the given camera ID.
61 * @param cameraId the ID of the camera device to check.
72 * Camera2 API for the given camera ID.
74 * @param manager The {@link CameraManager} used to retrieve camera characteristics.
75 * @param cameraId the ID of the camera device to check.
87 * Returns {@code true} if the Camera.Parameter and Camera.Info arguments describe a similar
[all …]
/cts/apps/CameraITS/utils/
Dcamera_properties_utils.py14 """Utility functions to determine what functionality the camera supports."""
51 props: Camera properties object.
54 Boolean. True if device is a LEGACY camera.
63 props: Camera properties object.
66 Boolean. True if device is a LIMITED camera.
75 props: Camera properties object.
78 Boolean. True if device is FULL or LEVEL3 camera.
88 props: Camera properties object.
91 Boolean. True if device is LEVEL3 camera.
100 props: Camera properties object.
[all …]
/cts/tests/camera/src/android/hardware/camera2/cts/testcases/
DCamera2MultiViewTestCase.java129 for (CameraHolder camera : mCameraHolders) { in tearDown()
130 if (camera.isOpened()) { in tearDown()
131 camera.close(); in tearDown()
132 camera = null; in tearDown()
234 CameraHolder camera = getCameraHolder(cameraId); in openCamera() local
235 assertFalse("Camera has already opened", camera.isOpened()); in openCamera()
236 camera.open(); in openCamera()
241 CameraHolder camera = getCameraHolder(cameraId); in closeCamera() local
242 camera.close(); in closeCamera()
247 CameraHolder camera = getCameraHolder(cameraId); in createSessionWithConfigs() local
[all …]
DCamera2ConcurrentAndroidTestCase.java79 // include both standalone camera IDs and "hidden" physical camera IDs
91 * HandlerThread, Camera IDs, and CameraStateCallback etc.
128 assertNotNull("Unable to get concurrent camera combinations", in setUp()
135 assertTrue("camera id" + cameraId + "'s metadata not found in mAllStaticInfo", in setUp()
141 assertTrue("Concurrent streaming camera id " + cameraId + in setUp()
182 * @param listener The {@link #CaptureCallback} camera device used to notify callbacks.
183 * @param handler The handler camera device used to post callbacks.
189 assertTrue("CameraTestInfo not found for camera id " + cameraId, info != null); in startCapture()
207 assertTrue("CameraTest info not found for camera id " + cameraId, info != null); in stopCapture()
224 * Open a {@link #CameraDevice camera device} and get the StaticMetadata for a given camera id.
[all …]
/cts/tests/camera/src/android/hardware/multiprocess/camera/cts/
DCamera1Activity.java17 package android.hardware.multiprocess.camera.cts;
20 import android.hardware.Camera;
28 * This will log all errors to {@link android.hardware.multiprocess.camera.cts.ErrorLoggingService}.
33 Camera mCamera;
49 mCamera = Camera.open(); in onResume()
54 mCamera.setErrorCallback(new Camera.ErrorCallback() { in onResume()
56 public void onError(int i, Camera camera) { in onResume()
57 if (i == Camera.CAMERA_ERROR_EVICTED) { in onResume()
59 TAG + " camera evicted"); in onResume()
60 Log.e(TAG, "onError called with event " + i + ", camera evicted"); in onResume()
[all …]
DCameraEvictionTest.java17 package android.hardware.multiprocess.camera.cts;
31 import android.hardware.Camera;
62 * Tests for multi-process camera usage behavior.
68 private static final int OPEN_TIMEOUT = 2000; // Timeout for camera to open (ms).
69 private static final int SETUP_TIMEOUT = 5000; // Remote camera setup timeout (ms).
70 private static final int EVICTION_TIMEOUT = 1000; // Remote camera eviction timeout (ms).
82 private Camera mCamera;
120 public void onClosed(CameraDevice camera) { in onClosed() argument
121 super.onClosed(camera); in onClosed()
222 // Setup camera manager in testBasicCamera2ActivityEvictionInternal()
[all …]
/cts/tests/camera/src/android/hardware/cts/
DCamera_SizeTest.java19 import android.hardware.Camera;
20 import android.hardware.Camera.Parameters;
48 if (Camera.getNumberOfCameras() < 1) { in testConstructor()
52 Camera camera = Camera.open(0); in testConstructor() local
53 Parameters parameters = camera.getParameters(); in testConstructor()
59 camera.release(); in testConstructor()
64 * aspect ratio must be the same as the physical camera sensor, and the FOV for these outputs
77 Camera camera = Camera.open(id); in testMaxAspectRatios() local
78 Parameters parameters = camera.getParameters(); in testMaxAspectRatios()
80 List<Camera.Size> supportedJpegDimens = parameters.getSupportedPictureSizes(); in testMaxAspectRatios()
[all …]
DCameraPerformanceTestHelper.java23 import android.hardware.Camera;
24 import android.hardware.Camera.AutoFocusCallback;
25 import android.hardware.Camera.ErrorCallback;
26 import android.hardware.Camera.PictureCallback;
27 import android.hardware.Camera.PreviewCallback;
46 private Camera mCamera;
49 * Initializes the message looper so that the Camera object can
59 // Set up a looper to be used by camera. in initializeMessageLooper()
65 mCamera = Camera.open(cameraId); in initializeMessageLooper()
68 public void onError(int error, Camera camera) { in initializeMessageLooper()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/
DPhotoCaptureActivity.java17 package com.android.cts.verifier.camera.fov;
28 import android.hardware.Camera;
29 import android.hardware.Camera.PictureCallback;
30 import android.hardware.Camera.ShutterCallback;
60 * An activity for showing the camera preview and taking a picture.
80 private Camera mCamera;
95 * Selected preview size per camera. If null, preview size should be
114 for (int cameraId = 0; cameraId < Camera.getNumberOfCameras(); ++cameraId) { in onCreate()
141 // Stop camera until preview sizes have been obtained. in onCreate()
149 mPreviewSizes = new Size[Camera.getNumberOfCameras()]; in onCreate()
[all …]
/cts/tests/tests/permission/src/android/permission/cts/
DCameraPermissionTest.java19 import android.hardware.Camera;
27 * Tests for camera-related Permissions. Currently, this means
28 * android.permission.CAMERA.
40 class ShutterCallback implements Camera.ShutterCallback {
44 class RawPictureCallback implements Camera.PictureCallback {
45 public void onPictureTaken(byte [] rawData, Camera camera) { } in onPictureTaken() argument
48 class JpegPictureCallback implements Camera.PictureCallback {
49 public void onPictureTaken(byte [] jpegData, Camera camera) { in onPictureTaken() argument
74 * {@link android.Manifest.permission#CAMERA}.
79 (Camera.open()).takePicture(new ShutterCallback(), in testCamera()
[all …]
DCamera2PermissionTest.java40 * android.permission.CAMERA.
58 assertNotNull("Can't connect to camera manager!", mCameraManager); in setContext()
63 * HandlerThread, Camera IDs, and CameraStateCallback etc.
69 assertNotNull("Camera ids shouldn't be null", mCameraIds); in setUp()
85 * Attempt to open camera. Requires Permission:
86 * {@link android.Manifest.permission#CAMERA}.
92 fail("Was able to open camera " + id + " with no permission"); in testCameraOpen()
104 * {@link android.Manifest.permission#CAMERA} and android.permission.SYSTEM_CAMERA
108 Log.i(TAG, "testSystemCameraDiscovery for camera id " + id); in testSystemCameraDiscovery()
110 assertNotNull("Camera characteristics shouldn't be null", characteristics); in testSystemCameraDiscovery()
[all …]
/cts/tests/camera/src/android/hardware/camera2/cts/
DFastBasicsTest.java27 import android.hardware.Camera;
50 * Quick-running test for very basic camera operation for all cameras
51 * and both camera APIs.
72 Log.i(TAG, "Testing camera2 API for camera device " + mCameraIdsUnderTest[i]); in testCamera2()
75 Log.i(TAG, "Camera " + mCameraIdsUnderTest[i] + in testCamera2()
143 implements SurfaceTexture.OnFrameAvailableListener, Camera.PictureCallback {
190 public void onPictureTaken(byte[] data, Camera camera) { in onPictureTaken() argument
205 Camera camera = null; in testCamera1() local
207 Log.i(TAG, "Testing android.hardware.Camera API for camera device " + i); in testCamera1()
209 camera = Camera.open(i); in testCamera1()
[all …]
DIdleUidTest.java56 * access camera. If the UID has a camera handle and becomes idle it would
57 * get an error callback losing the camera handle. Similarly if the UID is
58 * already idle it cannot obtain a camera handle.
78 * Tests that a UID has access to the camera only in active state.
89 * Tests that a UID loses access to the camera if it becomes inactive.
101 // Can access camera from an active UID. in testCameraAccessForIdleUidByCamera()
107 // Can not access camera from an idle UID. in testCameraAccessForIdleUidByCamera()
114 // Can access camera from an active UID. in testCameraAccessForIdleUidByCamera()
120 // Mock the callback used to observe camera state. in assertCameraAccess()
123 // Open the camera in assertCameraAccess()
[all …]
DCamera2OfflineTestActivity.java27 import android.hardware.multiprocess.camera.cts.ErrorLoggingService;
28 import android.hardware.multiprocess.camera.cts.TestConstants;
37 * This will log all errors to {@link android.hardware.multiprocess.camera.cts.ErrorLoggingService}.
68 " could not connect camera service"); in onResume()
82 " no camera id present in bundled extra"); in onResume()
92 Log.i(TAG, "Camera " + cameraId + " is available"); in onResume()
100 Log.i(TAG, "Camera " + cameraId + " is unavailable"); in onResume()
108 Log.i(TAG, "Camera " + cameraId + " : " + physicalCameraId + " is available"); in onResume()
116 Log.i(TAG, "Camera " + cameraId + " : " + physicalCameraId + " is unavailable"); in onResume()
125 Log.i(TAG, "Camera " + cameraId + " is opened"); in onResume()
[all …]
DCameraManagerTest.java156 Log.v(TAG, "Camera related features may not be accurate for system cameras, skipping"); in testCameraManagerGetDeviceIdList()
164 assertTrue("System camera feature and camera id list don't match", in testCameraManagerGetDeviceIdList()
177 assertNotNull("Can't get camera characteristics for camera " + ids[i], props); in testCameraManagerGetDeviceIdList()
182 assertTrue("System doesn't have front camera feature", in testCameraManagerGetDeviceIdList()
188 assertTrue("System doesn't have back camera feature", in testCameraManagerGetDeviceIdList()
195 assertTrue("System doesn't have external camera feature", in testCameraManagerGetDeviceIdList()
198 fail("Unknown camera lens facing " + lensFacing.toString()); in testCameraManagerGetDeviceIdList()
202 // Test an external camera is connected if FEATURE_CAMERA_EXTERNAL is advertised in testCameraManagerGetDeviceIdList()
204 assertTrue("External camera is not connected on device with FEATURE_CAMERA_EXTERNAL", in testCameraManagerGetDeviceIdList()
209 * Test: that if there is one camera device, then the system must have some in testCameraManagerGetDeviceIdList()
[all …]
DLogicalCameraDeviceTest.java91 * Tests exercising logical camera setup, configuration, and usage.
126 * Test that passing in invalid physical camera ids in OutputConfiguragtion behaves as expected
127 * for logical multi-camera and non-logical multi-camera.
133 Log.i(TAG, "Testing Camera " + id); in testInvalidPhysicalCameraIdInOutputConfiguration()
135 Log.i(TAG, "Camera " + id + " is legacy, skipping"); in testInvalidPhysicalCameraIdInOutputConfiguration()
139 Log.i(TAG, "Camera " + id + " does not support color outputs, skipping"); in testInvalidPhysicalCameraIdInOutputConfiguration()
166 // Regardless of logical camera or non-logical camera, create a session of an in testInvalidPhysicalCameraIdInOutputConfiguration()
167 // output configuration with invalid physical camera id, verify that the in testInvalidPhysicalCameraIdInOutputConfiguration()
193 Log.i(TAG, "Testing Camera " + id); in testBasicPhysicalStreaming()
197 Log.i(TAG, "Camera " + id + " does not support color outputs, skipping"); in testBasicPhysicalStreaming()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/orientation/
DCameraOrientationActivity.java14 package com.android.cts.verifier.camera.orientation;
22 import android.hardware.Camera;
23 import android.hardware.Camera.CameraInfo;
49 * Tests for manual verification of the CDD-required camera output formats
72 private Camera mCamera;
73 private List<Camera.Size> mPreviewSizes;
74 private List<Camera.Size> mPictureSizes;
75 private Camera.Size mOptimalPreviewSize;
76 private Camera.Size mOptimalPictureSize;
98 mNumCameras = Camera.getNumberOfCameras(); in onCreate()
[all …]
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DMediaRecorderStressTest.java20 import android.hardware.Camera;
61 private Camera mCamera;
155 private final class CameraErrorCallback implements android.hardware.Camera.ErrorCallback {
156 public void onError(int error, android.hardware.Camera camera) { in onError() argument
157 assertTrue("Camera test mediaserver died", error != in onError()
158 android.hardware.Camera.CAMERA_ERROR_SERVER_DIED); in onError()
169 //Test case for stressing the camera preview.
172 if (Camera.getNumberOfCameras() < 1) { in testStressCamera()
180 output.write("Camera start preview stress:\n"); in testStressCamera()
192 mCamera = Camera.open(); in testStressCamera()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DRVCVCameraPreview.java21 import android.hardware.Camera;
36 /** Camera preview class */
43 private Camera mCamera;
72 public void init(Camera camera, float aspectRatio, int rotation) { in init() argument
73 this.mCamera = camera; in init()
92 * Surface is created, it is OK to start the camera preview now.
95 // The Surface has been created, now tell the camera where to draw the preview. in surfaceCreated()
98 // preview camera does not exist in surfaceCreated()
106 // empty. Take care of releasing the Camera preview in your activity. in surfaceDestroyed()
111 * Restart camera preview if surface changed
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Renderer/RenderUtils/
DCameraStreamManager.java64 * A {@link CameraCaptureSession } for camera preview.
74 * The {@link android.util.Size} of camera preview.
85 // This method is called when the camera is opened. We start camera preview here.
119 * {@link CaptureRequest.Builder} for the camera preview
129 * A {@link Semaphore} to prevent the app from exiting before closing the camera.
177 * Sets up member variables related to camera.
179 * @param width The width of available size for camera preview
180 * @param height The height of available size for camera preview
183 // Danger, W.R.! Attempting to use too large a preview size could exceed the camera in setUpCameraOutputs()
190 * Opens the camera specified by {@link CameraStreamManager#CAMERA_ID}.
[all …]
/cts/tests/camera/utils/src/android/hardware/camera2/cts/
DCamera2ParameterizedTestCase.java35 // The list of camera ids we're testing. If we're testing system cameras
36 // (mAdoptShellPerm == true), we have only system camera ids in the array and not normal camera
49 * @param useAll whether all camera ids are to be used for system camera tests
64 assertNotNull("Unable to get camera ids", mCameraIdsUnderTest); in setUp()
70 assertNotNull("Camera ids shouldn't be null", cameraIdsPostTest); in tearDown()
71 Log.i(TAG, "Camera ids in setup:" + Arrays.toString(mCameraIdsUnderTest)); in tearDown()
72 Log.i(TAG, "Camera ids in tearDown:" + Arrays.toString(cameraIdsPostTest)); in tearDown()
84 assertNotNull("Camera ids shouldn't be null", idsUnderTest); in deriveCameraIdsUnderTest()
/cts/tests/tests/media/misc/src/android/media/misc/cts/
DResourceManagerRecorderActivity.java19 import android.hardware.Camera;
41 // Does MediaRecording using camera(#0).
62 private Camera mCamera;
131 // Creates a thread and does MediaRecording on that thread using Camera.
150 // through the camera capture.
151 private void setSupportedResolution(Camera camera) { in setSupportedResolution() argument
152 List<Camera.Size> videoSizes = CameraUtils.getSupportedVideoSizes(camera); in setSupportedResolution()
158 for (Camera.Size size : videoSizes) { in setSupportedResolution()
226 // Open camera#0, start recording and validate the recorded video.
228 int nCamera = Camera.getNumberOfCameras(); in recordVideoUsingCamera()
[all …]
/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_CameraVulkanGpuTest.cpp39 // 1) Reads a Camera frame into an AHardwareBuffer.
56 // Initialize image reader and camera helpers. in loadCameraAndVerifyFrameImport()
60 CameraHelper camera; in loadCameraAndVerifyFrameImport() local
63 ASSERT(camera.initCamera(imageReader.getNativeWindow()) >= 0, in loadCameraAndVerifyFrameImport()
64 "Failed to initialize camera."); in loadCameraAndVerifyFrameImport()
65 ASSERT(camera.isCameraReady(), "Camera is not ready."); in loadCameraAndVerifyFrameImport()
67 // Acquire an AHardwareBuffer from the camera. in loadCameraAndVerifyFrameImport()
68 ASSERT(camera.takePicture() >= 0, "Camera failed to take picture."); in loadCameraAndVerifyFrameImport()
/cts/apps/CameraITS/tests/scene4/
Dtest_multi_camera_alignment.py14 """Verify multi-camera alignment using internal parameters."""
98 ids: unicode string; physical camera ids
99 props: dict; physical camera properties dictionary
111 logging.debug('Camera: %s, FoV: %.2f, chart_distance: %.1fcm', i, fov,
116 test_ids.append(i) # RFoV camera
118 logging.debug('Skipping camera. Not appropriate multi-camera testing.')
119 continue # super-TELE camera
124 test_ids.append(i) # TELE camera in RFoV rig
129 test_ids.append(i) # WFoV camera in WFoV rig
131 logging.debug('Skipping camera. Not appropriate for test rig.')
[all …]

12345678910>>...16