Home
last modified time | relevance | path

Searched refs:cameraId (Results 1 – 25 of 89) sorted by relevance

1234

/packages/apps/Camera2/src/com/android/camera/one/v2/
DCamera2OneCameraManagerImpl.java114 String cameraId = findCameraId(facing); in findFirstCameraFacing() local
115 return (cameraId != null) ? CameraId.from(cameraId) : null; in findFirstCameraFacing()
157 String cameraId = findFirstCameraIdFacing(CameraCharacteristics.LENS_FACING_BACK); in findFirstBackCameraId() local
158 if (cameraId == null) { in findFirstBackCameraId()
160 cameraId = findFirstCameraIdFacing(CameraCharacteristics.LENS_FACING_EXTERNAL); in findFirstBackCameraId()
161 if (cameraId == null) { in findFirstBackCameraId()
165 return cameraId; in findFirstBackCameraId()
171 String cameraId = findFirstCameraIdFacing(CameraCharacteristics.LENS_FACING_FRONT); in findFirstFrontCameraId() local
172 if (cameraId == null) { in findFirstFrontCameraId()
174 cameraId = findFirstCameraIdFacing(CameraCharacteristics.LENS_FACING_EXTERNAL); in findFirstFrontCameraId()
[all …]
/packages/services/Car/evs/sampleDriver/
DEvsEnumerator.cpp275 Return<sp<IEvsCamera_1_0>> EvsEnumerator::openCamera(const hidl_string& cameraId) { in openCamera() argument
282 CameraRecord *pRecord = findCameraById(cameraId); in openCamera()
284 LOG(ERROR) << cameraId << " does not exist!"; in openCamera()
297 pActiveCamera = EvsV4lCamera::Create(cameraId.c_str()); in openCamera()
299 pActiveCamera = EvsV4lCamera::Create(cameraId.c_str(), in openCamera()
300 sConfigManager->getCameraInfo(cameraId)); in openCamera()
305 LOG(ERROR) << "Failed to create new EvsV4lCamera object for " << cameraId; in openCamera()
321 std::string cameraId; in closeCamera() local
322 pCamera->getCameraInfo([&cameraId](CameraDesc_1_0 desc) { in closeCamera()
323 cameraId = desc.cameraId; in closeCamera()
[all …]
DEvsEnumerator.h54 Return<sp<IEvsCamera_1_0>> openCamera(const hidl_string& cameraId) override;
62 Return<sp<IEvsCamera_1_1>> openCamera_1_1(const hidl_string& cameraId,
84 CameraRecord(const char *cameraId) : desc() { desc.v1.cameraId = cameraId; } in CameraRecord()
90 static CameraRecord* findCameraById(const std::string& cameraId);
94 void closeCamera_impl(const sp<IEvsCamera_1_0>& pCamera, const std::string& cameraId);
/packages/apps/Camera2/src/com/android/camera/settings/
DSettingsUtil.java160 public static Size getPhotoSize(String sizeSetting, List<Size> supported, int cameraId) { in getPhotoSize() argument
164 Size selectedSize = getCameraPictureSize(sizeSetting, supported, cameraId); in getPhotoSize()
181 int cameraId) { in getCameraPictureSize() argument
182 return getSelectedCameraPictureSizes(supported, cameraId).getFromSetting(sizeSetting, in getCameraPictureSize()
194 static SelectedPictureSizes getSelectedCameraPictureSizes(List<Size> supported, int cameraId) { in getSelectedCameraPictureSizes() argument
196 if (sCachedSelectedPictureSizes.get(cameraId) != null) { in getSelectedCameraPictureSizes()
197 return sCachedSelectedPictureSizes.get(cameraId); in getSelectedCameraPictureSizes()
290 sCachedSelectedPictureSizes.put(cameraId, selectedSizes); in getSelectedCameraPictureSizes()
304 public static int getVideoQuality(String qualitySetting, int cameraId) { in getVideoQuality() argument
305 return getSelectedVideoQualities(cameraId).getFromSetting(qualitySetting); in getVideoQuality()
[all …]
DCameraPictureSizesCacher.java44 public static void updateSizesForCamera(Context context, int cameraId, List<Size> sizes) { in updateSizesForCamera() argument
45 String key_build = PICTURE_SIZES_BUILD_KEY + cameraId; in updateSizesForCamera()
50 String key_sizes = PICTURE_SIZES_SIZES_KEY + cameraId; in updateSizesForCamera()
69 public static List<Size> getSizesForCamera(int cameraId, Context context) { in getSizesForCamera() argument
70 Optional<List<Size>> cachedSizes = getCachedSizesForCamera(cameraId, context); in getSizesForCamera()
78 thisCamera = Camera.open(cameraId); in getSizesForCamera()
84 String key_build = PICTURE_SIZES_BUILD_KEY + cameraId; in getSizesForCamera()
85 String key_sizes = PICTURE_SIZES_SIZES_KEY + cameraId; in getSizesForCamera()
109 public static Optional<List<Size>> getCachedSizesForCamera(int cameraId, Context context) { in getCachedSizesForCamera() argument
110 String key_build = PICTURE_SIZES_BUILD_KEY + cameraId; in getCachedSizesForCamera()
[all …]
DPictureSizeLoader.java127 int cameraId = SettingsUtil.getCameraId(mCameraDeviceInfo, facingSelector); in computeSizesForCamera() local
128 if (cameraId >= 0) { in computeSizesForCamera()
130 sizes = CameraPictureSizesCacher.getCachedSizesForCamera(cameraId, mContext) in computeSizesForCamera()
133 sizes = CameraPictureSizesCacher.getSizesForCamera(cameraId, mContext); in computeSizesForCamera()
151 int cameraId = SettingsUtil.getCameraId(mCameraDeviceInfo, facingSelector); in computeQualitiesForCamera() local
152 if (cameraId >= 0) { in computeQualitiesForCamera()
154 return Optional.of(SettingsUtil.getSelectedVideoQualities(cameraId)); in computeQualitiesForCamera()
DResolutionSetting.java66 public void setPictureAspectRatio(CameraId cameraId, Rational aspectRatio) in setPictureAspectRatio() argument
69 mOneCameraManager.getOneCameraCharacteristics(cameraId); in setPictureAspectRatio()
107 public Size getPictureSize(CameraId cameraId, Facing cameraFacing) in getPictureSize() argument
149 mOneCameraManager.getOneCameraCharacteristics(cameraId); in getPictureSize()
179 public Rational getPictureAspectRatio(CameraId cameraId, Facing facing) in getPictureAspectRatio() argument
181 Size pictureSize = getPictureSize(cameraId, facing); in getPictureAspectRatio()
DCameraFacingSetting.java103 final int cameraId = mSettingsManager.getInteger(mSettingScope, mCameraFacingSettingKey); in getCameraFacing() local
104 if (cameraId == mCameraFacingBackValue) { in getCameraFacing()
106 } else if (cameraId == mCameraFacingFrontValue) { in getCameraFacing()
119 final int cameraId = (cameraFacing == OneCamera.Facing.BACK) ? in setCameraFacing() local
121 mSettingsManager.set(mSettingScope, mCameraFacingSettingKey, cameraId); in setCameraFacing()
/packages/services/Car/evs/support_library/
DAnalyzeUseCase.cpp31 AnalyzeUseCase::AnalyzeUseCase(string cameraId, BaseAnalyzeCallback* callback) in AnalyzeUseCase() argument
32 : BaseUseCase(vector<string>(1, cameraId)), in AnalyzeUseCase()
59 string cameraId = mCameraIds[0]; in initialize() local
60 if (cameraId == info.cameraId) { in initialize()
62 mResourceManager->obtainStreamHandler(cameraId); in initialize()
65 cameraId.c_str()); in initialize()
132 string cameraId, BaseAnalyzeCallback* callback) { in createDefaultUseCase() argument
133 return AnalyzeUseCase(cameraId, callback); in createDefaultUseCase()
DDisplayUseCase.cpp35 DisplayUseCase::DisplayUseCase(string cameraId, BaseRenderCallback* callback) in DisplayUseCase() argument
36 : BaseUseCase(vector<string>(1, cameraId)) { in DisplayUseCase()
85 string cameraId = mCameraIds[0]; in initialize() local
86 if (cameraId == info.cameraId) { in initialize()
87 mStreamHandler = mResourceManager->obtainStreamHandler(cameraId); in initialize()
90 cameraId.c_str()); in initialize()
247 DisplayUseCase DisplayUseCase::createDefaultUseCase(string cameraId, BaseRenderCallback* callback) { in createDefaultUseCase() argument
248 return DisplayUseCase(cameraId, callback); in createDefaultUseCase()
DUtils.cpp62 ALOGD("Found camera %s", cam.cameraId.c_str()); in getRearViewCameraIds()
67 if (cam.cameraId == info.cameraId) { in getRearViewCameraIds()
71 cam.cameraId.c_str()); in getRearViewCameraIds()
72 cameraIds.emplace_back(cam.cameraId); in getRearViewCameraIds()
/packages/apps/Camera2/src/com/android/camera/one/v1/
DLegacyOneCameraManagerImpl.java130 public OneCameraCharacteristics getOneCameraCharacteristics(@Nonnull CameraId cameraId) in getOneCameraCharacteristics() argument
133 if (cameraId.equals(mFirstBackCameraId)) { in getOneCameraCharacteristics()
136 + cameraId); in getOneCameraCharacteristics()
137 mBackCameraCharacteristics = computeCameraCharacteristics(cameraId); in getOneCameraCharacteristics()
141 + cameraId); in getOneCameraCharacteristics()
144 } else if (cameraId.equals(mFirstFrontCameraId)) { in getOneCameraCharacteristics()
147 + cameraId); in getOneCameraCharacteristics()
148 mFrontCameraCharacteristics = computeCameraCharacteristics(cameraId); in getOneCameraCharacteristics()
152 + cameraId); in getOneCameraCharacteristics()
157 == cameraId)); in getOneCameraCharacteristics()
[all …]
/packages/apps/Camera2/src/com/android/camera/app/
DCameraController.java108 public CameraDeviceInfo.Characteristics getCharacteristics(int cameraId) { in getCharacteristics() argument
112 return mInfo.getCharacteristics(cameraId); in getCharacteristics()
183 public void onCameraDisabled(int cameraId) { in onCameraDisabled() argument
185 mCallbackReceiver.onCameraDisabled(cameraId); in onCameraDisabled()
190 public void onDeviceOpenFailure(int cameraId, String info) { in onDeviceOpenFailure() argument
192 mCallbackReceiver.onDeviceOpenFailure(cameraId, info); in onDeviceOpenFailure()
197 public void onDeviceOpenedAlready(int cameraId, String info) { in onDeviceOpenedAlready() argument
199 mCallbackReceiver.onDeviceOpenedAlready(cameraId, info); in onDeviceOpenedAlready()
318 final int cameraId, Handler handler, final CameraAgent.CameraOpenCallback cb) { in checkAndOpenCamera() argument
322 cameraManager.openCamera(handler, cameraId, cb); in checkAndOpenCamera()
[all …]
/packages/apps/Camera2/src/com/android/camera/device/
DMultiCameraDeviceLifecycle.java136 Lifetime requestLifetime, CameraId cameraId) { in openCamera2Device() argument
137 CameraDeviceKey key = new CameraDeviceKey(ApiType.CAMERA_API2, cameraId); in openCamera2Device()
162 Lifetime requestLifetime, CameraId cameraId) { in openPortabilityDevice() argument
164 cameraId); in openPortabilityDevice()
189 Lifetime requestLifetime, CameraId cameraId) { in openCamera2PortabilityDevice() argument
191 cameraId); in openCamera2PortabilityDevice()
215 Lifetime requestLifetime, CameraId cameraId) { in openLegacyPortabilityDevice() argument
216 CameraDeviceKey key = new CameraDeviceKey(ApiType.CAMERA_API_PORTABILITY_API1, cameraId); in openLegacyPortabilityDevice()
239 CameraId cameraId) { in openLegacyCameraDevice() argument
240 CameraDeviceKey key = new CameraDeviceKey(ApiType.CAMERA_API1, cameraId); in openLegacyCameraDevice()
DPortabilityCameraActions.java127 public OpenCameraRunnable(CameraAgent cameraAgent, int cameraId, in OpenCameraRunnable() argument
131 mCameraId = cameraId; in OpenCameraRunnable()
201 public void onCameraDisabled(int cameraId) { in onCameraDisabled() argument
203 mLogger.w("onCameraDisabled(id: " + cameraId + ")"); in onCameraDisabled()
209 public void onDeviceOpenFailure(int cameraId, String info) { in onDeviceOpenFailure() argument
211 mLogger.e("onDeviceOpenFailure(id: " + cameraId in onDeviceOpenFailure()
218 public void onDeviceOpenedAlready(int cameraId, String info) { in onDeviceOpenedAlready() argument
220 mLogger.w("onDeviceOpenedAlready(id: " + cameraId in onDeviceOpenedAlready()
/packages/apps/Dialer/java/com/android/dialer/simulator/impl/
DSimulatorPreviewCamera.java45 @NonNull private final String cameraId; field in SimulatorPreviewCamera
51 @NonNull Context context, @NonNull String cameraId, @NonNull Surface surface) { in SimulatorPreviewCamera() argument
53 this.cameraId = Assert.isNotNull(cameraId); in SimulatorPreviewCamera()
63 .openCamera(cameraId, new CameraListener(), null /* handler */); in startCamera()
80 @NonNull Context context, @Nullable String cameraId) { in getCameraCapabilities() argument
81 if (cameraId == null) { in getCameraCapabilities()
89 characteristics = cameraManager.getCameraCharacteristics(cameraId); in getCameraCapabilities()
/packages/services/Car/evs/manager/1.1/
DEnumerator.cpp218 Return<sp<IEvsCamera_1_0>> Enumerator::openCamera(const hidl_string& cameraId) { in checkPermission() argument
226 if (mActiveCameras.find(cameraId) != mActiveCameras.end()) { in checkPermission()
227 hwCamera = mActiveCameras[cameraId]; in checkPermission()
231 IEvsCamera_1_1::castFrom(mHwEnumerator->openCamera(cameraId)) in checkPermission()
234 LOG(ERROR) << "Failed to open hardware camera " << cameraId; in checkPermission()
238 auto recordId = fn(cameraId) & 0xFF; in checkPermission()
239 hwCamera = new HalCamera(device, cameraId, recordId); in checkPermission()
255 mActiveCameras.try_emplace(cameraId, hwCamera); in checkPermission()
257 LOG(ERROR) << "Requested camera " << cameraId in checkPermission()
304 Return<sp<IEvsCamera_1_1>> Enumerator::openCamera_1_1(const hidl_string& cameraId, in checkPermission() argument
[all …]
/packages/services/Car/evs/manager/1.0/
DEnumerator.cpp64 Return<sp<IEvsCamera>> Enumerator::openCamera(const hidl_string& cameraId) { in openCamera() argument
74 cam->getHwCamera()->getCameraInfo([cameraId, &match](CameraDesc desc) { in openCamera()
75 if (desc.cameraId == cameraId) { in openCamera()
89 sp<IEvsCamera> device = mHwEnumerator->openCamera(cameraId); in openCamera()
91 ALOGE("Failed to open hardware camera %s", cameraId.c_str()); in openCamera()
111 ALOGE("Requested camera %s not found or not available", cameraId.c_str()); in openCamera()
/packages/apps/LegacyCamera/src/com/android/camera/
DCameraHolder.java120 public synchronized android.hardware.Camera open(int cameraId) in open() argument
123 if (mCameraDevice != null && mCameraId != cameraId) { in open()
130 Log.v(TAG, "open camera " + cameraId); in open()
131 mCameraDevice = android.hardware.Camera.open(cameraId); in open()
132 mCameraId = cameraId; in open()
157 public synchronized android.hardware.Camera tryOpen(int cameraId) { in tryOpen() argument
159 return mUsers == 0 ? open(cameraId) : null; in tryOpen()
DUtil.java257 public static android.hardware.Camera openCamera(Activity activity, int cameraId) in openCamera() argument
267 return CameraHolder.instance().open(cameraId); in openCamera()
338 public static int getDisplayOrientation(int degrees, int cameraId) { in getDisplayOrientation() argument
342 Camera.getCameraInfo(cameraId, info); in getDisplayOrientation()
353 public static int getCameraOrientation(int cameraId) { in getCameraOrientation() argument
355 Camera.getCameraInfo(cameraId, info); in getCameraOrientation()
493 int cameraId = -1; in getCameraFacingIntentExtras() local
502 cameraId = frontCameraId; in getCameraFacingIntentExtras()
508 cameraId = backCameraId; in getCameraFacingIntentExtras()
511 return cameraId; in getCameraFacingIntentExtras()
[all …]
/packages/services/Car/surround_view/service-impl/
DCameraUtils.cpp84 LOG(INFO) << desc.v1.cameraId << " is not a logical camera device."; in getPhysicalCameraIds()
85 physicalCameras.emplace_back(desc.v1.cameraId); in getPhysicalCameraIds()
97 << desc.v1.cameraId; in getPhysicalCameraIds()
113 LOG(INFO) << desc.v1.cameraId << " consists of " << physicalCameras.size() in getPhysicalCameraIds()
159 const string& cameraId, in getAndroidCameraParams() argument
167 camera->getPhysicalCameraInfo(cameraId, [&desc](const CameraDesc& info) { in getAndroidCameraParams()
172 LOG(ERROR) << "No metadata found for " << desc.v1.cameraId; in getAndroidCameraParams()
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/
DTestVideoProvider.java85 public void onSetCamera(String cameraId) { in onSetCamera() argument
86 log("Set camera to " + cameraId); in onSetCamera()
87 mCameraId = cameraId; in onSetCamera()
235 private void startCamera(String cameraId) { in startCamera() argument
255 mCameraDevice = blockingCameraManager.openCamera(cameraId, null /* listener */, in startCamera()
328 private void setCameraCapabilities(String cameraId) { in setCameraCapabilities() argument
334 c = cameraManager.getCameraCharacteristics(cameraId); in setCameraCapabilities()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DMockVideoProvider.java58 public void onSetCamera(String cameraId) { in onSetCamera() argument
59 handleCameraChange(cameraId); in onSetCamera()
161 private void handleCameraChange(String cameraId) { in handleCameraChange() argument
162 if (CAMERA_FRONT.equals(cameraId)) { in handleCameraChange()
165 } else if (CAMERA_BACK.equals(cameraId)) { in handleCameraChange()
/packages/services/Car/surround_view/service-impl/mock-evs/
DMockEvsEnumerator.cpp45 const hidl_string& cameraId) { in openCamera() argument
48 (void)cameraId; in openCamera()
92 desc.v1.cameraId = cameraGroupIdList[i]; in getCameraList_1_1()
111 const hidl_string& cameraId, const Stream& streamCfg) { in openCamera_1_1() argument
114 (void)cameraId; in openCamera_1_1()
/packages/apps/Camera2/src/com/android/camera/
DCaptureModule.java390 CameraId cameraId = mOneCameraManager.findFirstCameraFacing(mCameraFacing); in updateCameraCharacteristics() local
391 if (cameraId != null && cameraId.getValue() != null) { in updateCameraCharacteristics()
392 mCameraCharacteristics = mOneCameraManager.getOneCameraCharacteristics(cameraId); in updateCameraCharacteristics()
449 CameraId cameraId = mOneCameraManager.findFirstCameraFacing(mCameraFacing); in onShutterButtonLongPressed() local
450 cameraCharacteristics = mOneCameraManager.getOneCameraCharacteristics(cameraId); in onShutterButtonLongPressed()
1140 public void onStateChanged(int cameraId) {
1151 cameraId);
1153 Log.d(TAG, "Start to switch camera. cameraId=" + cameraId);
1154 mCameraFacing = getFacingFromCameraId(cameraId);
1357 CameraId cameraId = mOneCameraManager.findFirstCameraFacing(mCameraFacing);
[all …]

1234