Home
last modified time | relevance | path

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

12345

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/
DCameraBinderTest.java86 for (int cameraId = 0; cameraId < mUtils.getGuessedNumCameras(); ++cameraId) { in testCameraInfo()
88 CameraInfo info = mUtils.getCameraService().getCameraInfo(cameraId); in testCameraInfo()
89 assertTrue("Facing was not set for camera " + cameraId, info.info.facing != -1); in testCameraInfo()
90 assertTrue("Orientation was not set for camera " + cameraId, in testCameraInfo()
93 Log.v(TAG, "Camera " + cameraId + " info: facing " + info.info.facing in testCameraInfo()
100 for (int cameraId = 0; cameraId < mUtils.getGuessedNumCameras(); ++cameraId) { in testGetLegacyParameters()
102 String parameters = mUtils.getCameraService().getLegacyParameters(cameraId); in testGetLegacyParameters()
112 Log.v(TAG, "Camera " + cameraId + " parameters: " + parameters.substring(0, end)); in testGetLegacyParameters()
119 for (int cameraId = 0; cameraId < mUtils.getGuessedNumCameras(); ++cameraId) { in testSupportsCamera2Api()
121 String.valueOf(cameraId), API_VERSION_2); in testSupportsCamera2Api()
[all …]
/frameworks/av/services/camera/libcameraservice/
DCameraFlashlight.cpp52 status_t CameraFlashlight::createFlashlightControl(const String8& cameraId) { in createFlashlightControl() argument
54 cameraId.string()); in createFlashlightControl()
59 if (mProviderManager->supportSetTorchMode(cameraId.string())) { in createFlashlightControl()
70 status_t CameraFlashlight::setTorchMode(const String8& cameraId, bool enabled) { in setTorchMode() argument
78 cameraId.string(), enabled); in setTorchMode()
83 if (mOpenedCameraIds.indexOf(cameraId) != NAME_NOT_FOUND) { in setTorchMode()
93 __FUNCTION__, cameraId.string()); in setTorchMode()
98 res = createFlashlightControl(cameraId); in setTorchMode()
102 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
108 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
[all …]
DCameraFlashlight.h43 virtual status_t hasFlashUnit(const String8& cameraId,
47 virtual status_t setTorchMode(const String8& cameraId,
67 bool hasFlashUnit(const String8& cameraId);
70 status_t setTorchMode(const String8& cameraId, bool enabled);
76 status_t prepareDeviceOpen(const String8& cameraId);
81 status_t deviceClosed(const String8& cameraId);
86 status_t createFlashlightControl(const String8& cameraId);
89 bool hasFlashUnitLocked(const String8& cameraId);
93 bool isBackwardCompatibleMode(const String8& cameraId);
118 status_t hasFlashUnit(const String8& cameraId, bool *hasFlash);
[all …]
DCameraService.cpp205 for (auto& cameraId : deviceIds) { in enumerateProviders() local
206 String8 id8 = String8(cameraId.c_str()); in enumerateProviders()
238 void CameraService::broadcastTorchModeStatus(const String8& cameraId, TorchModeStatus status) { in broadcastTorchModeStatus() argument
242 i.second->getListener()->onTorchStatusChanged(mapToInterface(status), String16{cameraId}); in broadcastTorchModeStatus()
264 std::string cameraId(id.c_str()); in addStates() local
266 status_t res = mCameraProviderManager->getResourceCost(cameraId, &cost); in addStates()
382 void CameraService::onTorchStatusChanged(const String8& cameraId, in onTorchStatusChanged() argument
385 onTorchStatusChangedLocked(cameraId, newStatus); in onTorchStatusChanged()
388 void CameraService::onTorchStatusChangedLocked(const String8& cameraId, in onTorchStatusChangedLocked() argument
391 __FUNCTION__, cameraId.string(), newStatus); in onTorchStatusChangedLocked()
[all …]
DCameraService.h101 virtual void onDeviceStatusChanged(const String8 &cameraId,
103 virtual void onTorchStatusChanged(const String8& cameraId,
111 virtual binder::Status getCameraInfo(int cameraId,
113 virtual binder::Status getCameraCharacteristics(const String16& cameraId,
123 int32_t cameraId, const String16& clientPackageName,
129 int32_t cameraId, int32_t halVersion,
135 const sp<hardware::camera2::ICameraDeviceCallbacks>& cameraCb, const String16& cameraId,
147 int32_t cameraId,
151 virtual binder::Status setTorchMode(const String16& cameraId, bool enabled,
161 const String16& cameraId, int32_t apiVersion,
[all …]
/frameworks/base/media/java/android/media/
DCameraProfile.java77 public static int getJpegEncodingQualityParameter(int cameraId, int quality) { in getJpegEncodingQualityParameter() argument
82 int[] levels = sCache.get(cameraId); in getJpegEncodingQualityParameter()
84 levels = getImageEncodingQualityLevels(cameraId); in getJpegEncodingQualityParameter()
85 sCache.put(cameraId, levels); in getJpegEncodingQualityParameter()
96 private static int[] getImageEncodingQualityLevels(int cameraId) { in getImageEncodingQualityLevels() argument
97 int nLevels = native_get_num_image_encoding_quality_levels(cameraId); in getImageEncodingQualityLevels()
104 levels[i] = native_get_image_encoding_quality_level(cameraId, i); in getImageEncodingQualityLevels()
112 private static native final int native_get_num_image_encoding_quality_levels(int cameraId); in native_get_num_image_encoding_quality_levels() argument
113 … private static native final int native_get_image_encoding_quality_level(int cameraId, int index); in native_get_image_encoding_quality_level() argument
DCamcorderProfile.java457 public static CamcorderProfile get(int cameraId, int quality) { in get() argument
467 return native_get_camcorder_profile(cameraId, quality); in get()
529 public static boolean hasProfile(int cameraId, int quality) { in hasProfile() argument
530 return native_has_camcorder_profile(cameraId, quality); in hasProfile()
571 int cameraId, int quality); in native_get_camcorder_profile() argument
573 int cameraId, int quality); in native_has_camcorder_profile() argument
/frameworks/av/camera/aidl/android/hardware/
DICameraService.aidl66 CameraInfo getCameraInfo(int cameraId); in getCameraInfo() argument
79 int cameraId, in connect() argument
88 String cameraId, in connectDevice() argument
101 int cameraId, in connectLegacy() argument
124 CameraMetadataNative getCameraCharacteristics(String cameraId); in getCameraCharacteristics() argument
144 String getLegacyParameters(int cameraId); in getLegacyParameters() argument
153 boolean supportsCameraApi(String cameraId, int apiVersion); in supportsCameraApi() argument
155 boolean isHiddenPhysicalCamera(String cameraId); in isHiddenPhysicalCamera() argument
157 void setTorchMode(String cameraId, boolean enabled, IBinder clientBinder); in setTorchMode() argument
/frameworks/base/core/java/android/hardware/camera2/impl/
DPhysicalCaptureResultInfo.java27 private String cameraId; field in PhysicalCaptureResultInfo
47 public PhysicalCaptureResultInfo(String cameraId, CameraMetadataNative cameraMetadata) { in PhysicalCaptureResultInfo() argument
48 this.cameraId = cameraId; in PhysicalCaptureResultInfo()
59 dest.writeString(cameraId); in writeToParcel()
64 cameraId = in.readString(); in readFromParcel()
70 return cameraId; in getCameraId()
/frameworks/base/core/java/android/hardware/camera2/
DCameraManager.java282 public CameraCharacteristics getCameraCharacteristics(@NonNull String cameraId) in getCameraCharacteristics() argument
303 if (!isHiddenPhysicalCamera(cameraId) && !supportsCamera2ApiLocked(cameraId)) { in getCameraCharacteristics()
306 int id = Integer.parseInt(cameraId); in getCameraCharacteristics()
316 CameraMetadataNative info = cameraService.getCameraCharacteristics(cameraId); in getCameraCharacteristics()
318 info.setCameraId(Integer.parseInt(cameraId)); in getCameraCharacteristics()
320 Log.e(TAG, "Failed to parse camera Id " + cameraId + " to integer"); in getCameraCharacteristics()
360 private CameraDevice openCameraDeviceUserAsync(String cameraId, in openCameraDeviceUserAsync() argument
363 CameraCharacteristics characteristics = getCameraCharacteristics(cameraId); in openCameraDeviceUserAsync()
372 cameraId, in openCameraDeviceUserAsync()
381 if (supportsCamera2ApiLocked(cameraId)) { in openCameraDeviceUserAsync()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
DCameraTestResultPrinter.java60 public void printStatus(int numAttempts, int iteration, String cameraId) throws Exception { in printStatus() argument
62 numAttempts, iteration, cameraId)); in printStatus()
64 sendInstrumentationStatus(numAttempts, iteration, cameraId); in printStatus()
67 writeToFile(numAttempts, iteration, cameraId); in printStatus()
81 private void sendInstrumentationStatus(int numAttempts, int iteration, String cameraId) in sendInstrumentationStatus() argument
86 if (!"".equals(cameraId)) { in sendInstrumentationStatus()
87 output.putString(KEY_CAMERA_ID, cameraId); in sendInstrumentationStatus()
92 private void writeToFile(final int numAttempts, final int iteration, String cameraId) { in writeToFile() argument
97 if (!"".equals(cameraId)) { in writeToFile()
98 results += String.format("|%s=%s", KEY_CAMERA_ID, cameraId); in writeToFile()
[all …]
/frameworks/av/camera/ndk/
DNdkCameraManager.cpp163 ACameraManager* mgr, const char* cameraId, ACameraMetadata** chars){ in ACameraManager_getCameraCharacteristics() argument
165 if (mgr == nullptr || cameraId == nullptr || chars == nullptr) { in ACameraManager_getCameraCharacteristics()
167 __FUNCTION__, mgr, cameraId, chars); in ACameraManager_getCameraCharacteristics()
171 camera_status_t status = mgr->getCameraCharacteristics(cameraId, &spChars); in ACameraManager_getCameraCharacteristics()
182 ACameraManager* mgr, const char* cameraId, in ACameraManager_openCamera() argument
186 if (mgr == nullptr || cameraId == nullptr || callback == nullptr || device == nullptr) { in ACameraManager_openCamera()
188 __FUNCTION__, mgr, cameraId, callback, device); in ACameraManager_openCamera()
191 return mgr->openCamera(cameraId, callback, device); in ACameraManager_openCamera()
196 camera_status_t ACameraManager_getTagFromName(ACameraManager *mgr, const char* cameraId, in ACameraManager_getTagFromName() argument
199 if (mgr == nullptr || cameraId == nullptr || name == nullptr) { in ACameraManager_getTagFromName()
[all …]
/frameworks/av/camera/ndk/impl/
DACameraManager.cpp127 onStatusChangedLocked(c.status, c.cameraId); in getCameraService()
187 const String8 &cameraId = pair.first; in binderDied() local
189 CameraServiceListener::STATUS_NOT_PRESENT, cameraId); in binderDied()
218 const String8& cameraId = pair.first; in registerAvailabilityCallback() local
226 msg->setString(kCameraIdKey, AString(cameraId)); in registerAvailabilityCallback()
287 AString cameraId; in onMessageReceived() local
298 found = msg->findString(kCameraIdKey, &cameraId); in onMessageReceived()
303 (*cb)(context, cameraId.c_str()); in onMessageReceived()
310 AString cameraId; in onMessageReceived() local
341 int32_t status, const String16& cameraId) { in onStatusChanged() argument
[all …]
/frameworks/av/media/libmedia/
DMediaProfiles.cpp324 static bool isCameraIdFound(int cameraId, const Vector<int>& cameraIds) { in isCameraIdFound() argument
326 if (cameraId == cameraIds[i]) { in isCameraIdFound()
334 MediaProfiles::createCamcorderProfile(int cameraId, const char **atts, Vector<int>& cameraIds) in createCamcorderProfile() argument
350 profile->mCameraId = cameraId; in createCamcorderProfile()
351 if (!isCameraIdFound(cameraId, cameraIds)) { in createCamcorderProfile()
352 cameraIds.add(cameraId); in createCamcorderProfile()
361 MediaProfiles::findImageEncodingQualityLevels(int cameraId) const in findImageEncodingQualityLevels()
366 if (levels->mCameraId == cameraId) { in findImageEncodingQualityLevels()
373 void MediaProfiles::addImageEncodingQualityLevel(int cameraId, const char** atts) in addImageEncodingQualityLevel() argument
377 ALOGV("%s: cameraId=%d, quality=%d", __func__, cameraId, quality); in addImageEncodingQualityLevel()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/
DCamera2ReprocessCaptureTest.java209 private void testBasicReprocessing(String cameraId, int inputFormat, in testBasicReprocessing() argument
212 openDevice(cameraId); in testBasicReprocessing()
214 testReprocessingMaxSizes(cameraId, inputFormat, reprocessOutputFormat, in testBasicReprocessing()
225 private void testReprocessingMaxSizes(String cameraId, int inputFormat, in testReprocessingMaxSizes() argument
234 testReprocess(cameraId, maxInputSize, inputFormat, maxReprocessOutputSize, in testReprocessingMaxSizes()
238 testReprocessAbort(cameraId, maxInputSize, inputFormat, maxReprocessOutputSize, in testReprocessingMaxSizes()
242 testReprocessTimestamps(cameraId, maxInputSize, inputFormat, maxReprocessOutputSize, in testReprocessingMaxSizes()
246 testReprocessJpegExif(cameraId, maxInputSize, inputFormat, maxReprocessOutputSize); in testReprocessingMaxSizes()
249 testReprocessRequestKeys(cameraId, maxInputSize, inputFormat, in testReprocessingMaxSizes()
260 private void testReprocessingAllCombinations(String cameraId, Size previewSize, in testReprocessingAllCombinations() argument
[all …]
/frameworks/av/camera/
DCameraBase.cpp59 auto res = parcel->writeString16(String16(cameraId)); in writeToParcel()
70 cameraId = String8(tempCameraId); in readFromParcel()
139 sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId, in connect() argument
144 sp<TCam> c = new TCam(cameraId); in connect()
151 ret = (cs.get()->*fnConnectService)(cl, cameraId, clientPackageName, clientUid, in connect()
158 ALOGW("An error occurred while connecting to camera %d: %s", cameraId, in connect()
178 CameraBase<TCam, TCamTraits>::CameraBase(int cameraId) : in CameraBase() argument
180 mCameraId(cameraId) in CameraBase()
252 status_t CameraBase<TCam, TCamTraits>::getCameraInfo(int cameraId, in getCameraInfo() argument
256 binder::Status res = cs->getCameraInfo(cameraId, cameraInfo); in getCameraInfo()
/frameworks/av/camera/ndk/ndk_vendor/impl/
DACameraManager.cpp295 cameraStatusAndId.cameraId = pair.first; in serviceDied()
312 const hidl_string& cameraId = pair.first; in registerAvailabilityCallback() local
320 msg->setString(kCameraIdKey, AString(cameraId.c_str())); in registerAvailabilityCallback()
375 AString cameraId; in onMessageReceived() local
386 found = msg->findString(kCameraIdKey, &cameraId); in onMessageReceived()
391 (*cb)(context, cameraId.c_str()); in onMessageReceived()
419 hidl_string cameraId = statusAndId.cameraId; in onStatusChangedLocked() local
426 bool firstStatus = (mDeviceStatusMap.count(cameraId) == 0); in onStatusChangedLocked()
429 mDeviceStatusMap[cameraId]; in onStatusChangedLocked()
438 mDeviceStatusMap[cameraId] = status; in onStatusChangedLocked()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/
DMediaFrameworkIntegrationTestRunner.java60 String cameraId = (String) icicle.get("camera_id"); in onCreate() local
61 if (cameraId != null) { in onCreate()
64 String.format("Reading camera_id from icicle: '%s'", cameraId)); in onCreate()
65 mCameraId = cameraId; in onCreate()
/frameworks/av/camera/include/camera/
DCameraBase.h76 String8 cameraId; member
86 CameraStatus(String8 id, int32_t s) : cameraId(id), status(s) {} in CameraStatus()
108 static sp<TCam> connect(int cameraId,
117 static status_t getCameraInfo(int cameraId,
127 CameraBase(int cameraId);
/frameworks/av/services/camera/libcameraservice/utils/
DTagMonitor.cpp129 const std::string& cameraId, uint32_t tag, const CameraMetadata& metadata) { in monitorSingleMetadata() argument
132 (cameraId.empty() ? mLastMonitoredRequestValues : in monitorSingleMetadata()
133 mLastMonitoredPhysicalRequestKeys[cameraId]) : in monitorSingleMetadata()
134 (cameraId.empty() ? mLastMonitoredResultValues : in monitorSingleMetadata()
135 mLastMonitoredPhysicalResultKeys[cameraId]); in monitorSingleMetadata()
176 mMonitoringEvents.emplace(source, frameNumber, timestamp, entry, cameraId); in monitorSingleMetadata()
188 mMonitoringEvents.emplace(source, frameNumber, timestamp, entry, cameraId); in monitorSingleMetadata()
213 2, event.cameraId.c_str(), in dumpMonitoredMetadata()
318 const T &value, const std::string& cameraId) : in MonitorEvent() argument
325 cameraId(cameraId) { in MonitorEvent()
/frameworks/av/camera/ndk/include/camera/
DNdkCameraManager.h123 const char* cameraId);
215 ACameraManager* manager, const char* cameraId,
274 ACameraManager* manager, const char* cameraId,
389 camera_status_t ACameraManager_getTagFromName(ACameraManager *manager, const char* cameraId,
/frameworks/av/services/camera/libcameraservice/api1/client2/
DFrameProcessor.cpp242 int cameraId = client->getCameraId(); in process3aState() local
269 &pendingState.afMode, frameNumber, cameraId); in process3aState()
272 &pendingState.awbMode, frameNumber, cameraId); in process3aState()
275 &pendingState.aeState, frameNumber, cameraId); in process3aState()
278 &pendingState.afState, frameNumber, cameraId); in process3aState()
281 &pendingState.awbState, frameNumber, cameraId); in process3aState()
290 __FUNCTION__, cameraId, in process3aState()
305 __FUNCTION__, cameraId, in process3aState()
322 __FUNCTION__, cameraId, in process3aState()
356 T* value, int32_t frameNumber, int cameraId) { in updatePendingState() argument
[all …]
/frameworks/av/camera/tests/
DCameraBinderTests.cpp79 virtual binder::Status onStatusChanged(int32_t status, const String16& cameraId) { in onStatusChanged() argument
81 mCameraStatuses[cameraId] = status; in onStatusChanged()
86 virtual binder::Status onTorchStatusChanged(int32_t status, const String16& cameraId) { in onTorchStatusChanged() argument
88 mCameraTorchStatuses[cameraId] = status; in onTorchStatusChanged()
113 bool waitForTorchState(int32_t status, int32_t cameraId) const { in waitForTorchState()
116 const auto& iter = mCameraTorchStatuses.find(String16(String8::format("%d", cameraId))); in waitForTorchState()
127 mCameraTorchStatuses.find(String16(String8::format("%d", cameraId))); in waitForTorchState()
133 int32_t getTorchStatus(int32_t cameraId) const { in getTorchStatus()
135 const auto& iter = mCameraTorchStatuses.find(String16(String8::format("%d", cameraId))); in getTorchStatus()
142 int32_t getStatus(const String16& cameraId) const { in getStatus()
[all …]
/frameworks/av/media/libmedia/include/media/
DMediaProfiles.h134 int getCamcorderProfileParamByName(const char *name, int cameraId,
141 bool hasCamcorderProfile(int cameraId, camcorder_quality quality) const;
201 Vector<int> getImageEncodingQualityLevels(int cameraId) const;
207 int getStartTimeOffsetMs(int cameraId) const;
363 int getCamcorderProfileIndex(int cameraId, camcorder_quality quality) const;
365 int getRequiredProfileRefIndex(int cameraId);
391 int cameraId, const char **atts, Vector<int>& cameraIds);
395 void addStartTimeOffset(int cameraId, const char **atts);
397 ImageEncodingQualityLevels* findImageEncodingQualityLevels(int cameraId) const;
398 void addImageEncodingQualityLevel(int cameraId, const char** atts);
/frameworks/av/include/media/
DMediaProfiles.h134 int getCamcorderProfileParamByName(const char *name, int cameraId,
141 bool hasCamcorderProfile(int cameraId, camcorder_quality quality) const;
201 Vector<int> getImageEncodingQualityLevels(int cameraId) const;
207 int getStartTimeOffsetMs(int cameraId) const;
363 int getCamcorderProfileIndex(int cameraId, camcorder_quality quality) const;
365 int getRequiredProfileRefIndex(int cameraId);
391 int cameraId, const char **atts, Vector<int>& cameraIds);
395 void addStartTimeOffset(int cameraId, const char **atts);
397 ImageEncodingQualityLevels* findImageEncodingQualityLevels(int cameraId) const;
398 void addImageEncodingQualityLevel(int cameraId, const char** atts);

12345