Lines Matching refs:ret
163 camera_status_t ret = ACameraCaptureSession_getDevice(session, &device); in onReady() local
165 if (ret != ACAMERA_OK && !thiz->mIsClosed) { in onReady()
183 camera_status_t ret = ACameraCaptureSession_getDevice(session, &device); in onActive() local
184 if (ret != ACAMERA_OK) { in onActive()
270 auto ret = ACameraMetadata_getConstEntry(result, ACAMERA_SYNC_FRAME_NUMBER, &entry); in onCaptureCompleted() local
271 if (ret != ACAMERA_OK) { in onCaptureCompleted()
327 int64_t ret = -1; in getCaptureSequenceLastFrameNumber() local
339 ret = mLastSequenceFrameNumber; in getCaptureSequenceLastFrameNumber()
342 return ret; in getCaptureSequenceLastFrameNumber()
346 bool ret = false; in waitForFrameNumber() local
362 ret = true; in waitForFrameNumber()
365 return ret; in waitForFrameNumber()
425 media_status_t ret = AImageReader_acquireNextImage(reader, &img); in validateImageCb() local
426 if (ret != AMEDIA_OK || img == nullptr) { in validateImageCb()
428 __FUNCTION__, reader, ret, img); in validateImageCb()
434 ret = AImage_getFormat(img, &format); in validateImageCb()
435 if (ret != AMEDIA_OK || format == -1) { in validateImageCb()
437 __FUNCTION__, img, ret, format); in validateImageCb()
443 ret = AImage_getNumberOfPlanes(img, &numPlanes); in validateImageCb()
444 if (ret != AMEDIA_OK || numPlanes != 1) { in validateImageCb()
446 __FUNCTION__, img, ret, numPlanes); in validateImageCb()
452 ret = AImage_getWidth(img, &width); in validateImageCb()
453 if (ret != AMEDIA_OK || width <= 0) { in validateImageCb()
455 __FUNCTION__, img, ret, width); in validateImageCb()
460 ret = AImage_getHeight(img, &height); in validateImageCb()
461 if (ret != AMEDIA_OK || height <= 0) { in validateImageCb()
463 __FUNCTION__, img, ret, height); in validateImageCb()
470 ret = AImage_getPlaneData(img, /*planeIdx*/0, &data, &dataLength); in validateImageCb()
471 if (ret != AMEDIA_OK || data == nullptr || dataLength <= 0) { in validateImageCb()
473 __FUNCTION__, img, ret, data, dataLength); in validateImageCb()
507 media_status_t ret = AImageReader_acquireNextImage(reader, &img); in acquireImageCb() local
508 if (ret != AMEDIA_OK || img == nullptr) { in acquireImageCb()
510 __FUNCTION__, reader, ret, img); in acquireImageCb()
627 camera_status_t ret = ACameraManager_getCameraIdList( in initWithErrorLog() local
629 if (ret != ACAMERA_OK) { in initWithErrorLog()
630 LOG_ERROR(errorString, "Get camera id list failed: ret %d", ret); in initWithErrorLog()
631 return ret; in initWithErrorLog()
633 ret = ACameraManager_registerAvailabilityCallback(mCameraManager, &mServiceCb); in initWithErrorLog()
634 if (ret != ACAMERA_OK) { in initWithErrorLog()
635 LOG_ERROR(errorString, "Register availability callback failed: ret %d", ret); in initWithErrorLog()
636 return ret; in initWithErrorLog()
647 camera_status_t ret = ACameraManager_unregisterAvailabilityCallback( in deInit() local
649 if (ret != ACAMERA_OK) { in deInit()
650 ALOGE("Unregister availability callback failed: ret %d", ret); in deInit()
651 return ret; in deInit()
696 camera_status_t ret = ACameraDevice_close(mDevice); in closeCamera() local
698 return ret; in closeCamera()
716 media_status_t ret = AImageReader_new( in initImageReaderWithErrorLog() local
719 if (ret != AMEDIA_OK) { in initImageReaderWithErrorLog()
720 LOG_ERROR(errorString, "Create image reader. ret %d", ret); in initImageReaderWithErrorLog()
721 return ret; in initImageReaderWithErrorLog()
728 ret = AImageReader_setImageListener(mImgReader, listener); in initImageReaderWithErrorLog()
729 if (ret != AMEDIA_OK) { in initImageReaderWithErrorLog()
730 LOG_ERROR(errorString, "Set AImageReader listener failed. ret %d", ret); in initImageReaderWithErrorLog()
731 return ret; in initImageReaderWithErrorLog()
734 ret = AImageReader_getWindow(mImgReader, &mImgReaderAnw); in initImageReaderWithErrorLog()
735 if (ret != AMEDIA_OK) { in initImageReaderWithErrorLog()
736 LOG_ERROR(errorString, "AImageReader_getWindow failed. ret %d", ret); in initImageReaderWithErrorLog()
737 return ret; in initImageReaderWithErrorLog()
770 camera_status_t ret = ACaptureSessionOutputContainer_create(&mOutputs); in createCaptureSessionWithLog() local
771 if (ret != ACAMERA_OK) { in createCaptureSessionWithLog()
772 LOG_ERROR(errorString, "Create capture session output container failed. ret %d", ret); in createCaptureSessionWithLog()
773 return ret; in createCaptureSessionWithLog()
777 ret = ACaptureSessionOutput_create(mImgReaderAnw, &mImgReaderOutput); in createCaptureSessionWithLog()
778 if (ret != ACAMERA_OK || mImgReaderOutput == nullptr) { in createCaptureSessionWithLog()
781 ret, mImgReaderOutput); in createCaptureSessionWithLog()
782 if (ret == ACAMERA_OK) { in createCaptureSessionWithLog()
783 ret = ACAMERA_ERROR_UNKNOWN; // ret OK but output is null in createCaptureSessionWithLog()
785 return ret; in createCaptureSessionWithLog()
788 ret = ACaptureSessionOutputContainer_add(mOutputs, mImgReaderOutput); in createCaptureSessionWithLog()
789 if (ret != ACAMERA_OK) { in createCaptureSessionWithLog()
790 LOG_ERROR(errorString, "Sesssion image reader output add failed! ret %d", ret); in createCaptureSessionWithLog()
791 return ret; in createCaptureSessionWithLog()
797 ret = ACaptureSessionSharedOutput_create(mPreviewAnw, &mPreviewOutput); in createCaptureSessionWithLog()
799 ret = ACaptureSessionOutput_create(mPreviewAnw, &mPreviewOutput); in createCaptureSessionWithLog()
801 if (ret != ACAMERA_OK || mPreviewOutput == nullptr) { in createCaptureSessionWithLog()
804 ret, mPreviewOutput); in createCaptureSessionWithLog()
805 if (ret == ACAMERA_OK) { in createCaptureSessionWithLog()
806 ret = ACAMERA_ERROR_UNKNOWN; // ret OK but output is null in createCaptureSessionWithLog()
808 return ret; in createCaptureSessionWithLog()
811 ret = ACaptureSessionOutputContainer_add(mOutputs, mPreviewOutput); in createCaptureSessionWithLog()
812 if (ret != ACAMERA_OK) { in createCaptureSessionWithLog()
813 LOG_ERROR(errorString, "Sesssion preview output add failed! ret %d", ret); in createCaptureSessionWithLog()
814 return ret; in createCaptureSessionWithLog()
818 ret = ACameraDevice_createCaptureSessionWithSessionParameters( in createCaptureSessionWithLog()
820 if (ret != ACAMERA_OK || mSession == nullptr) { in createCaptureSessionWithLog()
822 mCameraId, ret, mSession); in createCaptureSessionWithLog()
823 if (ret == ACAMERA_OK) { in createCaptureSessionWithLog()
824 ret = ACAMERA_ERROR_UNKNOWN; // ret OK but session is null in createCaptureSessionWithLog()
826 return ret; in createCaptureSessionWithLog()
864 camera_status_t ret; in createRequestsWithErrorLog() local
866 ret = ACameraDevice_createCaptureRequest( in createRequestsWithErrorLog()
868 if (ret != ACAMERA_OK) { in createRequestsWithErrorLog()
870 mCameraId, ret); in createRequestsWithErrorLog()
871 return ret; in createRequestsWithErrorLog()
874 ret = ACameraOutputTarget_create(mPreviewAnw, &mReqPreviewOutput); in createRequestsWithErrorLog()
875 if (ret != ACAMERA_OK) { in createRequestsWithErrorLog()
878 mCameraId, ret); in createRequestsWithErrorLog()
879 return ret; in createRequestsWithErrorLog()
882 ret = ACaptureRequest_addTarget(mPreviewRequest, mReqPreviewOutput); in createRequestsWithErrorLog()
883 if (ret != ACAMERA_OK) { in createRequestsWithErrorLog()
885 mCameraId, ret); in createRequestsWithErrorLog()
886 return ret; in createRequestsWithErrorLog()
893 ret = ACameraDevice_createCaptureRequest( in createRequestsWithErrorLog()
895 if (ret != ACAMERA_OK) { in createRequestsWithErrorLog()
897 mCameraId, ret); in createRequestsWithErrorLog()
898 return ret; in createRequestsWithErrorLog()
901 ret = ACameraOutputTarget_create(mImgReaderAnw, &mReqImgReaderOutput); in createRequestsWithErrorLog()
902 if (ret != ACAMERA_OK) { in createRequestsWithErrorLog()
905 mCameraId, ret); in createRequestsWithErrorLog()
906 return ret; in createRequestsWithErrorLog()
909 ret = ACaptureRequest_addTarget(mStillRequest, mReqImgReaderOutput); in createRequestsWithErrorLog()
910 if (ret != ACAMERA_OK) { in createRequestsWithErrorLog()
912 mCameraId, ret); in createRequestsWithErrorLog()
913 return ret; in createRequestsWithErrorLog()
917 ret = ACaptureRequest_addTarget(mStillRequest, mReqPreviewOutput); in createRequestsWithErrorLog()
918 if (ret != ACAMERA_OK) { in createRequestsWithErrorLog()
921 mCameraId, ret); in createRequestsWithErrorLog()
922 return ret; in createRequestsWithErrorLog()
958 camera_status_t ret; in startPreview() local
960 ret = ACameraCaptureSession_setRepeatingRequest( in startPreview()
963 ret = ACameraCaptureSession_setRepeatingRequest( in startPreview()
966 return ret; in startPreview()
978 camera_status_t ret; in updateRepeatingRequest() local
980 ret = ACameraCaptureSession_setRepeatingRequest( in updateRepeatingRequest()
983 ret = ACameraCaptureSession_setRepeatingRequest( in updateRepeatingRequest()
986 return ret; in updateRepeatingRequest()
1021 camera_status_t ret; in resetWithErrorLog() local
1042 ret = closeCamera(); in resetWithErrorLog()
1043 if (ret != ACAMERA_OK) { in resetWithErrorLog()
1044 LOG_ERROR(errorString, "Close camera device %s failure. ret %d", mCameraId, ret); in resetWithErrorLog()
1045 return ret; in resetWithErrorLog()
1147 camera_status_t ret = ACAMERA_OK; in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerGetAndCloseNative() local
1199 camera_status_t ret = ACameraManager_getCameraIdList(mgr, &cameraIdList); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerGetCameraIdsNative() local
1200 if (ret != ACAMERA_OK || cameraIdList == nullptr) { in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerGetCameraIdsNative()
1202 ret, cameraIdList); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerGetCameraIdsNative()
1235 camera_status_t ret = ACameraManager_getCameraIdList(mgr, &cameraIdList); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerAvailabilityCallbackNative() local
1242 ret = ACameraManager_registerAvailabilityCallback(mgr, &cbs); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerAvailabilityCallbackNative()
1243 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerAvailabilityCallbackNative()
1244 LOG_ERROR(errorString, "Register availability callback failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerAvailabilityCallbackNative()
1256 ret = ACameraManager_unregisterAvailabilityCallback(mgr, &cbs); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerAvailabilityCallbackNative()
1257 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerAvailabilityCallbackNative()
1258 LOG_ERROR(errorString, "Unregister availability callback failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerAvailabilityCallbackNative()
1286 camera_status_t ret = ACameraManager_getCameraIdList(mgr, &cameraIdList); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative() local
1287 if (ret != ACAMERA_OK || cameraIdList == nullptr) { in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1289 ret, cameraIdList); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1295 ret = ACameraManager_getCameraCharacteristics( in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1297 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1298 LOG_ERROR(errorString, "Get camera characteristics failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1304 ret = ACameraMetadata_getAllTags(chars, &numTags, &tags); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1305 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1306 LOG_ERROR(errorString, "Get camera characteristics tags failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1321 ret = ACameraMetadata_getConstEntry(chars, ACAMERA_REQUEST_AVAILABLE_CAPABILITIES, &entry); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1322 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1323 LOG_ERROR(errorString, "Get const available capabilities key failed. ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1355 ret = ACameraMetadata_getConstEntry(chars, badTag, &entry); in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1356 if (ret == ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraManagerTest_testCameraManagerCharacteristicsNative()
1388 camera_status_t ret = testCase.initWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative() local
1389 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1407 ret = testCase.openCamera(cameraId); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1408 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1409 LOG_ERROR(errorString, "Open camera device %s failure. ret %d", cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1420 ret = testCase.closeCamera(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1421 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1422 LOG_ERROR(errorString, "Close camera device %s failure. ret %d", cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1434 ret = testCase.deInit(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1435 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1436 LOG_ERROR(errorString, "Testcase deInit failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceOpenAndCloseNative()
1460 camera_status_t ret = ACameraManager_getCameraIdList(mgr, &cameraIdList); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative() local
1471 ret = ACameraManager_openCamera(mgr, cameraId, &deviceCb, &device); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1472 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1473 LOG_ERROR(errorString, "Open camera device %s failure. ret %d", cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1477 ret = ACameraManager_getCameraCharacteristics(mgr, cameraId, &chars); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1478 if (ret != ACAMERA_OK || chars == nullptr) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1480 cameraId, ret, chars); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1488 ret = ACameraDevice_createCaptureRequest(device, templateId, &request); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1489 if (ret == ACAMERA_ERROR_INVALID_PARAMETER) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1494 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1495 LOG_ERROR(errorString, "Create capture request failed!: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1501 ret = ACaptureRequest_getAllTags(request, &numTags, &tags); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1502 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1503 LOG_ERROR(errorString, "Get capture request tags failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1518 ret = ACaptureRequest_getUserContext(request, &context); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1519 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1520 LOG_ERROR(errorString, "Get capture request context failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1529 ret = ACaptureRequest_setUserContext(request, (void*) magic_num); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1530 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1531 LOG_ERROR(errorString, "Set capture request context failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1535 ret = ACaptureRequest_getUserContext(request, &context); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1536 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1537 LOG_ERROR(errorString, "Get capture request context failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1547 ret = ACaptureRequest_getConstEntry(request, ACAMERA_CONTROL_AE_MODE, &entry); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1548 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1549 LOG_ERROR(errorString, "Get AE mode key failed. ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1570 ret = ACaptureRequest_setEntry_u8( in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1572 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1575 cameraId, t, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1578 ret = ACaptureRequest_getConstEntry( in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1580 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1581 LOG_ERROR(errorString, "Get AE mode key failed. ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1602 ret = ACaptureRequest_setEntry_u8( in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1604 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1607 cameraId, t, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1610 ret = ACaptureRequest_getConstEntry( in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1612 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1613 LOG_ERROR(errorString, "Get AE mode key failed. ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceCreateCaptureRequestNative()
1668 camera_status_t ret = testCase.initWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative() local
1669 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1687 ret = testCase.openCamera(cameraId); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1688 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1689 LOG_ERROR(errorString, "Open camera device %s failure. ret %d", cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1714 ret = testCase.createCaptureSessionWithLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1715 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1741 ret = testCase.createCaptureSessionWithLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1742 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1744 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1756 ret = testCase.resetWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1757 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1770 ret = testCase.deInit(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1771 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1772 LOG_ERROR(errorString, "Testcase deInit failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSessionOpenAndCloseNative()
1805 camera_status_t ret = testCase.initWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate() local
1806 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1824 ret = testCase.openCamera(cameraId); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1825 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1826 LOG_ERROR(errorString, "Open camera device %s failure. ret %d", cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1843 ret = testCase.createCaptureSessionWithLog(true); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1844 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1849 ret = testCase.createRequestsWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1850 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1855 ret = testCase.startPreview(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1856 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1865 ret = ACaptureSessionSharedOutput_add(previewOutput, previewAnw); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1866 if (ret != ACAMERA_ERROR_INVALID_PARAMETER) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1868 "parameter! %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1872 ret = ACaptureSessionSharedOutput_remove(previewOutput, previewAnw); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1873 if (ret != ACAMERA_ERROR_INVALID_PARAMETER) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1875 "parameter! %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1880 ret = ACaptureSessionSharedOutput_add(previewOutput, sharedAnw); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1881 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1886 ret = testCase.updateOutput(env, previewOutput); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1887 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1892 ret = ACameraDevice_createCaptureRequest( in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1894 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1896 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1900 ret = ACameraOutputTarget_create(previewAnw, &reqPreviewOutput); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1901 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1904 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1908 ret = ACaptureRequest_addTarget(updatedRequest, reqPreviewOutput); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1909 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1911 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1915 ret = ACameraOutputTarget_create(sharedAnw, &reqSharedOutput); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1916 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1919 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1923 ret = ACaptureRequest_addTarget(updatedRequest, reqSharedOutput); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1924 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1926 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1930 ret = testCase.updateRepeatingRequest(updatedRequest, &sequenceId); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1931 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1933 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1939 ret = ACaptureSessionSharedOutput_remove(previewOutput, sharedAnw); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1940 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1946 ret = testCase.updateOutput(env, previewOutput); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1947 if (ret != ACAMERA_ERROR_INVALID_PARAMETER) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1954 ret = ACaptureRequest_removeTarget(updatedRequest, reqSharedOutput); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1955 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1957 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1961 ret = testCase.updateRepeatingRequest(updatedRequest); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1962 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1964 cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1983 ret = testCase.updateOutput(env, previewOutput); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1984 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1991 ret = testCase.resetWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
1992 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
2005 ret = testCase.deInit(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
2006 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
2007 LOG_ERROR(errorString, "Testcase deInit failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSharedOutputUpdate()
2051 camera_status_t ret = testCase.initWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative() local
2052 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2070 ret = testCase.openCamera(cameraId); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2071 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2072 LOG_ERROR(errorString, "Open camera device %s failure. ret %d", cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2089 ret = testCase.createCaptureSessionWithLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2090 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2095 ret = testCase.createRequestsWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2096 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2101 ret = testCase.startPreview(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2102 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2109 ret = testCase.resetWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2110 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2123 ret = testCase.deInit(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2124 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2125 LOG_ERROR(errorString, "Testcase deInit failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDeviceSimplePreviewNative()
2149 camera_status_t ret = testCase.initWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative() local
2150 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2168 ret = ACameraManager_getCameraCharacteristics( in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2170 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2171 LOG_ERROR(errorString, "Get camera characteristics failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2176 ret = ACameraMetadata_getConstEntry(chars, ACAMERA_REQUEST_AVAILABLE_SESSION_KEYS, in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2178 if ((ret != ACAMERA_OK) || (sessionParamKeys.count == 0)) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2184 ret = testCase.openCamera(cameraId); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2185 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2186 LOG_ERROR(errorString, "Open camera device %s failure. ret %d", cameraId, ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2203 ret = testCase.createRequestsWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2204 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2210 ret = testCase.getPreviewRequest(&previewRequest); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2211 if ((ret != ACAMERA_OK) || (previewRequest == nullptr)) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2216 ret = testCase.createCaptureSessionWithLog(/*isPreviewShared*/ false, previewRequest); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2217 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2222 ret = testCase.startPreview(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2223 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2230 ret = testCase.resetWithErrorLog(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2231 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2247 ret = testCase.deInit(); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2248 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2249 LOG_ERROR(errorString, "Testcase deInit failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeCameraDeviceTest_testCameraDevicePreviewWithSessionParametersNative()
2282 camera_status_t ret = testCase.initWithErrorLog(); in nativeImageReaderTestBase() local
2283 if (ret != ACAMERA_OK) { in nativeImageReaderTestBase()
2301 ret = testCase.openCamera(cameraId); in nativeImageReaderTestBase()
2302 if (ret != ACAMERA_OK) { in nativeImageReaderTestBase()
2303 LOG_ERROR(errorString, "Open camera device %s failure. ret %d", cameraId, ret); in nativeImageReaderTestBase()
2326 ret = testCase.createCaptureSessionWithLog(); in nativeImageReaderTestBase()
2327 if (ret != ACAMERA_OK) { in nativeImageReaderTestBase()
2332 ret = testCase.createRequestsWithErrorLog(); in nativeImageReaderTestBase()
2333 if (ret != ACAMERA_OK) { in nativeImageReaderTestBase()
2351 ret = testCase.getStillRequest(&requestTemplate); in nativeImageReaderTestBase()
2352 if (ret != ACAMERA_OK || requestTemplate == nullptr) { in nativeImageReaderTestBase()
2363 ret = testCase.capture(req, &resultCb, &seqId); in nativeImageReaderTestBase()
2364 if (ret != ACAMERA_OK) { in nativeImageReaderTestBase()
2366 cameraId, capture, ret); in nativeImageReaderTestBase()
2389 ret = ACaptureRequest_getUserContext(completedRequests[i], (void**) &userContext); in nativeImageReaderTestBase()
2390 if (ret != ACAMERA_OK) { in nativeImageReaderTestBase()
2418 ret = testCase.resetWithErrorLog(); in nativeImageReaderTestBase()
2419 if (ret != ACAMERA_OK) { in nativeImageReaderTestBase()
2432 ret = testCase.deInit(); in nativeImageReaderTestBase()
2433 if (ret != ACAMERA_OK) { in nativeImageReaderTestBase()
2434 LOG_ERROR(errorString, "Testcase deInit failed: ret %d", ret); in nativeImageReaderTestBase()
2485 camera_status_t ret = testCase.initWithErrorLog(); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative() local
2486 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2504 ret = testCase.openCamera(cameraId); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2505 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2506 LOG_ERROR(errorString, "Open camera device %s failure. ret %d", cameraId, ret); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2537 ret = testCase.createCaptureSessionWithLog(); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2538 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2543 ret = testCase.createRequestsWithErrorLog(); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2544 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2549 ret = testCase.startPreview(); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2550 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2560 ret = testCase.takePicture(); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2561 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2563 cameraId, capture, ret); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2584 ret = testCase.resetWithErrorLog(); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2585 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2598 ret = testCase.deInit(); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2599 if (ret != ACAMERA_OK) { in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()
2600 LOG_ERROR(errorString, "Testcase deInit failed: ret %d", ret); in Java_android_hardware_camera2_cts_NativeStillCaptureTest_testStillCaptureNative()