Home
last modified time | relevance | path

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

12345678910>>...17

/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;
48 * Utility class containing helper functions for the Camera CTS tests.
59 * Camera2 API for the given camera ID.
62 * @param cameraId the ID of the camera device to check.
73 * Camera2 API for the given camera ID.
75 * @param manager The {@link CameraManager} used to retrieve camera characteristics.
76 * @param cameraId the ID of the camera device to check.
88 * 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."""
55 props: Camera properties object.
58 assertionError if not front or rear camera.
69 props: Camera properties object.
72 Boolean. True if device is a LEGACY camera.
81 props: Camera properties object.
84 Boolean. True if device is a LIMITED camera.
93 props: Camera properties object.
96 Boolean. True if device is FULL or LEVEL3 camera.
106 props: Camera properties object.
[all …]
/cts/tests/camera/src/android/hardware/camera2/cts/testcases/
DCamera2MultiViewTestCase.java130 for (CameraHolder camera : mCameraHolders) { in tearDown()
131 if (camera.isOpened()) { in tearDown()
132 camera.close(); in tearDown()
133 camera = null; in tearDown()
235 CameraHolder camera = getCameraHolder(cameraId); in openCamera() local
236 assertFalse("Camera has already opened", camera.isOpened()); in openCamera()
237 camera.open(); in openCamera()
242 CameraHolder camera = getCameraHolder(cameraId); in closeCamera() local
243 camera.close(); in closeCamera()
248 CameraHolder camera = getCameraHolder(cameraId); in createSessionWithConfigs() local
[all …]
DCamera2ConcurrentAndroidTestCase.java63 // include both standalone camera IDs and "hidden" physical camera IDs
95 * HandlerThread, Camera IDs, and CameraStateCallback etc.
103 + "override set, restricting the test to single camera", in setUp()
139 assertNotNull("Unable to get concurrent camera combinations", in setUp()
146 assertTrue("camera id" + cameraId + "'s metadata not found in mAllStaticInfo", in setUp()
152 assertTrue("Concurrent streaming camera id " + cameraId + in setUp()
193 * @param listener The {@link #CaptureCallback} camera device used to notify callbacks.
194 * @param handler The handler camera device used to post callbacks.
200 assertTrue("CameraTestInfo not found for camera id " + cameraId, info != null); in startCapture()
218 assertTrue("CameraTest info not found for camera id " + cameraId, info != null); in stopCapture()
[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;
29 import android.hardware.Camera;
30 import android.hardware.Camera.PictureCallback;
31 import android.hardware.Camera.ShutterCallback;
61 * An activity for showing the camera preview and taking a picture.
81 private Camera mCamera;
96 * Selected preview size per camera. If null, preview size should be
115 for (int cameraId = 0; cameraId < Camera.getNumberOfCameras(); ++cameraId) { in onCreate()
142 // Stop camera until preview sizes have been obtained. in onCreate()
150 mPreviewSizes = new Size[Camera.getNumberOfCameras()]; in onCreate()
[all …]
/cts/tests/tests/virtualdevice/camera/src/android/virtualdevice/cts/camera/util/
DNativeCameraManager.java17 package android.virtualdevice.cts.camera.util;
41 * @return camera ids returned ACameraManager_getCameraIdList NDK call.
49 * to INFO_DEVICE_ID key from camera characteristics.
51 * @param cameraId - camera id to fetch device id for.
52 * @return device id associated with the camera.
61 * @param callback implementation of {@code AvailabilityCallback} called when new camera becomes
70 * Called when there's new camera available.
71 * @param cameraId - camera id of newly available camera.
76 * Called when camera becomes unavailable.
77 * @param cameraId - camera id of newly unavailable camera.
/cts/tests/camera/utils/src/android/hardware/camera2/cts/
DCamera2ParameterizedTestCase.java37 // The list of camera ids we're testing. If we're testing system cameras
38 // (mAdoptShellPerm == true), we have only system camera ids in the array and not normal camera
53 * @param useAll whether all camera ids are to be used for system camera tests
68 assertNotNull("Unable to get camera ids", mCameraIdsUnderTest); in setUp()
74 assertNotNull("Camera ids shouldn't be null", cameraIdsPostTest); in tearDown()
75 Log.i(TAG, "Camera ids in setup:" + Arrays.toString(mCameraIdsUnderTest)); in tearDown()
76 Log.i(TAG, "Camera ids in tearDown:" + Arrays.toString(cameraIdsPostTest)); in tearDown()
88 assertNotNull("Camera ids shouldn't be null", idsUnderTest); in deriveCameraIdsUnderTest()
101 // If external camera is supported, verify that it is connected as part of the camera Ids in getCameraIdsUnderTest()
102 // under test. If the external camera is not connected, an exception will be thrown to in getCameraIdsUnderTest()
[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/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()
102 // Initialize image reader and camera helpers. in loadCameraAndVerifyFrameImportWithAIMAGE_FORMAT_YUV_420_888()
106 CameraHelper camera; in loadCameraAndVerifyFrameImportWithAIMAGE_FORMAT_YUV_420_888() local
[all …]
/cts/tests/tests/sensorprivacy/src/android/sensorprivacy/cts/
DSensorPrivacyCameraTest.kt22 import android.hardware.SensorPrivacyManager.Sensors.CAMERA
34 import com.android.internal.camera.flags.Flags
46 class SensorPrivacyCameraTest : SensorPrivacyBaseTest(CAMERA, USE_CAM_EXTRA) {
52 Assume.assumeTrue("No camera available", cameraManager.cameraIdList.isNotEmpty()) in init()
53 oldCameraState = getSensorState(TOGGLE_TYPE_SOFTWARE, CAMERA) in init()
58 setSensorState(CAMERA, oldCameraState) in tearDown()
101 setSensorState(CAMERA, ENABLED) in testSetSensorState()
102 assertEquals(getSensorState(TOGGLE_TYPE_SOFTWARE, CAMERA), ENABLED) in testSetSensorState()
104 setSensorState(CAMERA, DISABLED) in testSetSensorState()
105 assertEquals(getSensorState(TOGGLE_TYPE_SOFTWARE, CAMERA), DISABLED) in testSetSensorState()
[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.
73 Log.i(TAG, "Testing camera2 API for camera device " + cameraIdsUnderTest[i]); in testCamera2()
76 Log.i(TAG, "Camera " + cameraIdsUnderTest[i] + in testCamera2()
144 implements SurfaceTexture.OnFrameAvailableListener, Camera.PictureCallback {
191 public void onPictureTaken(byte[] data, Camera camera) { in onPictureTaken() argument
206 Camera camera = null; in testCamera1() local
208 Log.i(TAG, "Testing android.hardware.Camera API for camera device " + i); in testCamera1()
210 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.java157 assumeFalse("Camera related features may not be accurate for system cameras, skipping", in testCameraManagerGetDeviceIdList()
160 "Camera related features may not be accurent when test is run with single " in testCameraManagerGetDeviceIdList()
161 + "camera under test specified by cameraId override", in testCameraManagerGetDeviceIdList()
168 assertTrue("System camera feature and camera id list don't match", in testCameraManagerGetDeviceIdList()
181 assertNotNull("Can't get camera characteristics for camera " + ids[i], props); in testCameraManagerGetDeviceIdList()
186 assertTrue("System doesn't have front camera feature", in testCameraManagerGetDeviceIdList()
192 assertTrue("System doesn't have back camera feature", in testCameraManagerGetDeviceIdList()
199 assertTrue("System doesn't have external camera feature", in testCameraManagerGetDeviceIdList()
202 fail("Unknown camera lens facing " + lensFacing.toString()); in testCameraManagerGetDeviceIdList()
206 // Test an external camera is connected if FEATURE_CAMERA_EXTERNAL is advertised in testCameraManagerGetDeviceIdList()
[all …]
DLogicalCameraDeviceTest.java89 * Tests exercising logical camera setup, configuration, and usage.
124 * Test that passing in invalid physical camera ids in OutputConfiguragtion behaves as expected
125 * for logical multi-camera and non-logical multi-camera.
131 Log.i(TAG, "Testing Camera " + id); in testInvalidPhysicalCameraIdInOutputConfiguration()
133 Log.i(TAG, "Camera " + id + " is legacy, skipping"); in testInvalidPhysicalCameraIdInOutputConfiguration()
137 Log.i(TAG, "Camera " + id + " does not support color outputs, skipping"); in testInvalidPhysicalCameraIdInOutputConfiguration()
164 // Regardless of logical camera or non-logical camera, create a session of an in testInvalidPhysicalCameraIdInOutputConfiguration()
165 // output configuration with invalid physical camera id, verify that the in testInvalidPhysicalCameraIdInOutputConfiguration()
192 Log.i(TAG, "Testing Camera " + id); in testBasicPhysicalStreaming()
196 Log.i(TAG, "Camera " + id + " does not support color outputs, skipping"); in testBasicPhysicalStreaming()
[all …]
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DMediaRecorderStressTest.java20 import android.hardware.Camera;
64 private Camera mCamera;
158 private final class CameraErrorCallback implements android.hardware.Camera.ErrorCallback {
159 public void onError(int error, android.hardware.Camera camera) { in onError() argument
160 assertTrue("Camera test mediaserver died", error != in onError()
161 android.hardware.Camera.CAMERA_ERROR_SERVER_DIED); in onError()
172 //Test case for stressing the camera preview.
175 if (Camera.getNumberOfCameras() < 1) { in testStressCamera()
183 output.write("Camera start preview stress:\n"); in testStressCamera()
195 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/tests/virtualdevice/camera/src/android/virtualdevice/cts/camera/
DVirtualCameraCameraXTest.kt17 package android.virtualdevice.cts.camera in <lambda>()
22 import android.companion.virtual.camera.VirtualCamera in <lambda>()
23 import android.companion.virtual.camera.VirtualCameraCallback in <lambda>()
24 import android.companion.virtual.camera.VirtualCameraConfig in <lambda>()
33 import android.virtualdevice.cts.camera.VirtualCameraUtils.BACK_CAMERA_ID in <lambda>()
34 import android.virtualdevice.cts.camera.VirtualCameraUtils.INFO_DEVICE_ID in <lambda>()
35 import android.virtualdevice.cts.camera.VirtualCameraUtils.assertImagesSimilar in <lambda>()
36 import android.virtualdevice.cts.camera.VirtualCameraUtils.loadBitmapFromRaw in <lambda>()
39 import androidx.camera.camera2.Camera2Config in <lambda>()
40 import androidx.camera.camera2.interop.Camera2CameraInfo in <lambda>()
[all …]
/cts/tests/tests/media/misc/src/android/media/misc/cts/
DResourceManagerRecorderActivity.java21 import android.hardware.Camera;
41 // Does MediaRecording using camera(#0).
59 private Camera mCamera;
128 // Creates a thread and does MediaRecording on that thread using Camera.
147 // through the camera capture.
148 private void setSupportedResolution(Camera camera) { in setSupportedResolution() argument
149 List<Camera.Size> videoSizes = CameraUtils.getSupportedVideoSizes(camera); in setSupportedResolution()
155 for (Camera.Size size : videoSizes) { in setSupportedResolution()
223 // Open camera#0, start recording and validate the recorded video.
225 int nCamera = Camera.getNumberOfCameras(); in recordVideoUsingCamera()
[all …]

12345678910>>...17