Loading services/camera/libcameraservice/device3/Camera3Device.cpp +59 −23 Original line number Original line Diff line number Diff line Loading @@ -97,6 +97,8 @@ Camera3Device::Camera3Device(const String8 &id, bool overrideForPerfClass, bool mNeedFixupMonochromeTags(false), mNeedFixupMonochromeTags(false), mOverrideForPerfClass(overrideForPerfClass), mOverrideForPerfClass(overrideForPerfClass), mOverrideToPortrait(overrideToPortrait), mOverrideToPortrait(overrideToPortrait), mRotateAndCropOverride(ANDROID_SCALER_ROTATE_AND_CROP_NONE), mComposerOutput(false), mActivePhysicalId("") mActivePhysicalId("") { { ATRACE_CALL(); ATRACE_CALL(); Loading Loading @@ -1353,12 +1355,34 @@ status_t Camera3Device::filterParamsAndConfigureLocked(const CameraMetadata& ses set_camera_metadata_vendor_id(meta, mVendorTagId); set_camera_metadata_vendor_id(meta, mVendorTagId); filteredParams.unlock(meta); filteredParams.unlock(meta); if (availableSessionKeys.count > 0) { if (availableSessionKeys.count > 0) { bool rotateAndCropSessionKey = false; for (size_t i = 0; i < availableSessionKeys.count; i++) { for (size_t i = 0; i < availableSessionKeys.count; i++) { camera_metadata_ro_entry entry = params.find( camera_metadata_ro_entry entry = params.find( availableSessionKeys.data.i32[i]); availableSessionKeys.data.i32[i]); if (entry.count > 0) { if (entry.count > 0) { filteredParams.update(entry); filteredParams.update(entry); } } if (ANDROID_SCALER_ROTATE_AND_CROP == availableSessionKeys.data.i32[i]) { rotateAndCropSessionKey = true; } } if (rotateAndCropSessionKey) { sp<CaptureRequest> request = new CaptureRequest(); PhysicalCameraSettings settingsList; settingsList.metadata = filteredParams; request->mSettingsList.push_back(settingsList); auto rotateAndCropEntry = filteredParams.find(ANDROID_SCALER_ROTATE_AND_CROP); if (rotateAndCropEntry.count > 0 && rotateAndCropEntry.data.u8[0] == ANDROID_SCALER_ROTATE_AND_CROP_AUTO) { request->mRotateAndCropAuto = true; } else { request->mRotateAndCropAuto = false; } overrideAutoRotateAndCrop(request, mOverrideToPortrait, mRotateAndCropOverride); filteredParams = request->mSettingsList.begin()->metadata; } } } } Loading Loading @@ -2370,7 +2394,7 @@ status_t Camera3Device::configureStreamsLocked(int operatingMode, } } mGroupIdPhysicalCameraMap.clear(); mGroupIdPhysicalCameraMap.clear(); bool composerSurfacePresent = false; mComposerOutput = false; for (size_t i = 0; i < mOutputStreams.size(); i++) { for (size_t i = 0; i < mOutputStreams.size(); i++) { // Don't configure bidi streams twice, nor add them twice to the list // Don't configure bidi streams twice, nor add them twice to the list Loading Loading @@ -2413,7 +2437,7 @@ status_t Camera3Device::configureStreamsLocked(int operatingMode, } } if (outputStream->usage & GraphicBuffer::USAGE_HW_COMPOSER) { if (outputStream->usage & GraphicBuffer::USAGE_HW_COMPOSER) { composerSurfacePresent = true; mComposerOutput = true; } } } } Loading Loading @@ -2482,7 +2506,7 @@ status_t Camera3Device::configureStreamsLocked(int operatingMode, } } } } mRequestThread->setComposerSurface(composerSurfacePresent); mRequestThread->setComposerSurface(mComposerOutput); // Request thread needs to know to avoid using repeat-last-settings protocol // Request thread needs to know to avoid using repeat-last-settings protocol // across configure_streams() calls // across configure_streams() calls Loading Loading @@ -3439,6 +3463,16 @@ bool Camera3Device::RequestThread::threadLoop() { latestRequestId = NAME_NOT_FOUND; latestRequestId = NAME_NOT_FOUND; } } for (size_t i = 0; i < mNextRequests.size(); i++) { auto& nextRequest = mNextRequests.editItemAt(i); sp<CaptureRequest> captureRequest = nextRequest.captureRequest; // Do not override rotate&crop for stream configurations that include // SurfaceViews(HW_COMPOSER) output, unless mOverrideToPortrait is set. // The display rotation there will be compensated by NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY captureRequest->mRotateAndCropChanged = (mComposerOutput && !mOverrideToPortrait) ? false : overrideAutoRotateAndCrop(captureRequest); } // 'mNextRequests' will at this point contain either a set of HFR batched requests // 'mNextRequests' will at this point contain either a set of HFR batched requests // or a single request from streaming or burst. In either case the first element // or a single request from streaming or burst. In either case the first element // should contain the latest camera settings that we need to check for any session // should contain the latest camera settings that we need to check for any session Loading Loading @@ -3584,18 +3618,13 @@ status_t Camera3Device::RequestThread::prepareHalRequests() { bool triggersMixedIn = (triggerCount > 0 || mPrevTriggers > 0); bool triggersMixedIn = (triggerCount > 0 || mPrevTriggers > 0); mPrevTriggers = triggerCount; mPrevTriggers = triggerCount; // Do not override rotate&crop for stream configurations that include // SurfaceViews(HW_COMPOSER) output, unless mOverrideToPortrait is set. // The display rotation there will be compensated by NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY bool rotateAndCropChanged = (mComposerOutput && !mOverrideToPortrait) ? false : overrideAutoRotateAndCrop(captureRequest); bool testPatternChanged = overrideTestPattern(captureRequest); bool testPatternChanged = overrideTestPattern(captureRequest); // If the request is the same as last, or we had triggers now or last time or // If the request is the same as last, or we had triggers now or last time or // changing overrides this time // changing overrides this time bool newRequest = bool newRequest = (mPrevRequest != captureRequest || triggersMixedIn || (mPrevRequest != captureRequest || triggersMixedIn || rotateAndCropChanged || testPatternChanged) && captureRequest->mRotateAndCropChanged || testPatternChanged) && // Request settings are all the same within one batch, so only treat the first // Request settings are all the same within one batch, so only treat the first // request in a batch as new // request in a batch as new !(batchedRequest && i > 0); !(batchedRequest && i > 0); Loading Loading @@ -4058,9 +4087,6 @@ status_t Camera3Device::RequestThread::setRotateAndCropAutoBehavior( camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropValue) { camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropValue) { ATRACE_CALL(); ATRACE_CALL(); Mutex::Autolock l(mTriggerMutex); Mutex::Autolock l(mTriggerMutex); if (rotateAndCropValue == ANDROID_SCALER_ROTATE_AND_CROP_AUTO) { return BAD_VALUE; } mRotateAndCropOverride = rotateAndCropValue; mRotateAndCropOverride = rotateAndCropValue; return OK; return OK; } } Loading Loading @@ -4637,13 +4663,20 @@ status_t Camera3Device::RequestThread::addFakeTriggerIds( return OK; return OK; } } bool Camera3Device::RequestThread::overrideAutoRotateAndCrop( bool Camera3Device::RequestThread::overrideAutoRotateAndCrop(const sp<CaptureRequest> &request) { const sp<CaptureRequest> &request) { ATRACE_CALL(); ATRACE_CALL(); if (mOverrideToPortrait) { Mutex::Autolock l(mTriggerMutex); Mutex::Autolock l(mTriggerMutex); uint8_t rotateAndCrop_u8 = mRotateAndCropOverride; return Camera3Device::overrideAutoRotateAndCrop(request, this->mOverrideToPortrait, this->mRotateAndCropOverride); } bool Camera3Device::overrideAutoRotateAndCrop(const sp<CaptureRequest> &request, bool overrideToPortrait, camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropOverride) { ATRACE_CALL(); if (overrideToPortrait) { uint8_t rotateAndCrop_u8 = rotateAndCropOverride; CameraMetadata &metadata = request->mSettingsList.begin()->metadata; CameraMetadata &metadata = request->mSettingsList.begin()->metadata; metadata.update(ANDROID_SCALER_ROTATE_AND_CROP, metadata.update(ANDROID_SCALER_ROTATE_AND_CROP, &rotateAndCrop_u8, 1); &rotateAndCrop_u8, 1); Loading @@ -4651,24 +4684,23 @@ bool Camera3Device::RequestThread::overrideAutoRotateAndCrop( } } if (request->mRotateAndCropAuto) { if (request->mRotateAndCropAuto) { Mutex::Autolock l(mTriggerMutex); CameraMetadata &metadata = request->mSettingsList.begin()->metadata; CameraMetadata &metadata = request->mSettingsList.begin()->metadata; auto rotateAndCropEntry = metadata.find(ANDROID_SCALER_ROTATE_AND_CROP); auto rotateAndCropEntry = metadata.find(ANDROID_SCALER_ROTATE_AND_CROP); if (rotateAndCropEntry.count > 0) { if (rotateAndCropEntry.count > 0) { if (rotateAndCropEntry.data.u8[0] == mRotateAndCropOverride) { if (rotateAndCropEntry.data.u8[0] == rotateAndCropOverride) { return false; return false; } else { } else { rotateAndCropEntry.data.u8[0] = mRotateAndCropOverride; rotateAndCropEntry.data.u8[0] = rotateAndCropOverride; return true; return true; } } } else { } else { uint8_t rotateAndCrop_u8 = mRotateAndCropOverride; uint8_t rotateAndCrop_u8 = rotateAndCropOverride; metadata.update(ANDROID_SCALER_ROTATE_AND_CROP, metadata.update(ANDROID_SCALER_ROTATE_AND_CROP, &rotateAndCrop_u8, 1); &rotateAndCrop_u8, 1); return true; return true; } } } } return false; return false; } } Loading Loading @@ -5154,6 +5186,10 @@ status_t Camera3Device::setRotateAndCropAutoBehavior( if (mRequestThread == nullptr) { if (mRequestThread == nullptr) { return INVALID_OPERATION; return INVALID_OPERATION; } } if (rotateAndCropValue == ANDROID_SCALER_ROTATE_AND_CROP_AUTO) { return BAD_VALUE; } mRotateAndCropOverride = rotateAndCropValue; return mRequestThread->setRotateAndCropAutoBehavior(rotateAndCropValue); return mRequestThread->setRotateAndCropAutoBehavior(rotateAndCropValue); } } Loading services/camera/libcameraservice/device3/Camera3Device.h +11 −1 Original line number Original line Diff line number Diff line Loading @@ -581,6 +581,9 @@ class Camera3Device : // overriding of ROTATE_AND_CROP value and adjustment of coordinates // overriding of ROTATE_AND_CROP value and adjustment of coordinates // in several other controls in both the request and the result // in several other controls in both the request and the result bool mRotateAndCropAuto; bool mRotateAndCropAuto; // Indicates that the ROTATE_AND_CROP value within 'mSettingsList' was modified // irrespective of the original value. bool mRotateAndCropChanged = false; // Whether this capture request has its zoom ratio set to 1.0x before // Whether this capture request has its zoom ratio set to 1.0x before // the framework overrides it for camera HAL consumption. // the framework overrides it for camera HAL consumption. Loading Loading @@ -767,6 +770,11 @@ class Camera3Device : */ */ static nsecs_t getMonoToBoottimeOffset(); static nsecs_t getMonoToBoottimeOffset(); // Override rotate_and_crop control if needed static bool overrideAutoRotateAndCrop(const sp<CaptureRequest> &request /*out*/, bool overrideToPortrait, camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropOverride); struct RequestTrigger { struct RequestTrigger { // Metadata tag number, e.g. android.control.aePrecaptureTrigger // Metadata tag number, e.g. android.control.aePrecaptureTrigger uint32_t metadataTag; uint32_t metadataTag; Loading Loading @@ -917,7 +925,7 @@ class Camera3Device : status_t addFakeTriggerIds(const sp<CaptureRequest> &request); status_t addFakeTriggerIds(const sp<CaptureRequest> &request); // Override rotate_and_crop control if needed; returns true if the current value was changed // Override rotate_and_crop control if needed; returns true if the current value was changed bool overrideAutoRotateAndCrop(const sp<CaptureRequest> &request); bool overrideAutoRotateAndCrop(const sp<CaptureRequest> &request /*out*/); // Override test_pattern control if needed for camera mute; returns true // Override test_pattern control if needed for camera mute; returns true // if the current value was changed // if the current value was changed Loading Loading @@ -1356,6 +1364,8 @@ class Camera3Device : // Whether the camera framework overrides the device characteristics for // Whether the camera framework overrides the device characteristics for // app compatibility reasons. // app compatibility reasons. bool mOverrideToPortrait; bool mOverrideToPortrait; camera_metadata_enum_android_scaler_rotate_and_crop_t mRotateAndCropOverride; bool mComposerOutput; // Current active physical id of the logical multi-camera, if any // Current active physical id of the logical multi-camera, if any std::string mActivePhysicalId; std::string mActivePhysicalId; Loading Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +59 −23 Original line number Original line Diff line number Diff line Loading @@ -97,6 +97,8 @@ Camera3Device::Camera3Device(const String8 &id, bool overrideForPerfClass, bool mNeedFixupMonochromeTags(false), mNeedFixupMonochromeTags(false), mOverrideForPerfClass(overrideForPerfClass), mOverrideForPerfClass(overrideForPerfClass), mOverrideToPortrait(overrideToPortrait), mOverrideToPortrait(overrideToPortrait), mRotateAndCropOverride(ANDROID_SCALER_ROTATE_AND_CROP_NONE), mComposerOutput(false), mActivePhysicalId("") mActivePhysicalId("") { { ATRACE_CALL(); ATRACE_CALL(); Loading Loading @@ -1353,12 +1355,34 @@ status_t Camera3Device::filterParamsAndConfigureLocked(const CameraMetadata& ses set_camera_metadata_vendor_id(meta, mVendorTagId); set_camera_metadata_vendor_id(meta, mVendorTagId); filteredParams.unlock(meta); filteredParams.unlock(meta); if (availableSessionKeys.count > 0) { if (availableSessionKeys.count > 0) { bool rotateAndCropSessionKey = false; for (size_t i = 0; i < availableSessionKeys.count; i++) { for (size_t i = 0; i < availableSessionKeys.count; i++) { camera_metadata_ro_entry entry = params.find( camera_metadata_ro_entry entry = params.find( availableSessionKeys.data.i32[i]); availableSessionKeys.data.i32[i]); if (entry.count > 0) { if (entry.count > 0) { filteredParams.update(entry); filteredParams.update(entry); } } if (ANDROID_SCALER_ROTATE_AND_CROP == availableSessionKeys.data.i32[i]) { rotateAndCropSessionKey = true; } } if (rotateAndCropSessionKey) { sp<CaptureRequest> request = new CaptureRequest(); PhysicalCameraSettings settingsList; settingsList.metadata = filteredParams; request->mSettingsList.push_back(settingsList); auto rotateAndCropEntry = filteredParams.find(ANDROID_SCALER_ROTATE_AND_CROP); if (rotateAndCropEntry.count > 0 && rotateAndCropEntry.data.u8[0] == ANDROID_SCALER_ROTATE_AND_CROP_AUTO) { request->mRotateAndCropAuto = true; } else { request->mRotateAndCropAuto = false; } overrideAutoRotateAndCrop(request, mOverrideToPortrait, mRotateAndCropOverride); filteredParams = request->mSettingsList.begin()->metadata; } } } } Loading Loading @@ -2370,7 +2394,7 @@ status_t Camera3Device::configureStreamsLocked(int operatingMode, } } mGroupIdPhysicalCameraMap.clear(); mGroupIdPhysicalCameraMap.clear(); bool composerSurfacePresent = false; mComposerOutput = false; for (size_t i = 0; i < mOutputStreams.size(); i++) { for (size_t i = 0; i < mOutputStreams.size(); i++) { // Don't configure bidi streams twice, nor add them twice to the list // Don't configure bidi streams twice, nor add them twice to the list Loading Loading @@ -2413,7 +2437,7 @@ status_t Camera3Device::configureStreamsLocked(int operatingMode, } } if (outputStream->usage & GraphicBuffer::USAGE_HW_COMPOSER) { if (outputStream->usage & GraphicBuffer::USAGE_HW_COMPOSER) { composerSurfacePresent = true; mComposerOutput = true; } } } } Loading Loading @@ -2482,7 +2506,7 @@ status_t Camera3Device::configureStreamsLocked(int operatingMode, } } } } mRequestThread->setComposerSurface(composerSurfacePresent); mRequestThread->setComposerSurface(mComposerOutput); // Request thread needs to know to avoid using repeat-last-settings protocol // Request thread needs to know to avoid using repeat-last-settings protocol // across configure_streams() calls // across configure_streams() calls Loading Loading @@ -3439,6 +3463,16 @@ bool Camera3Device::RequestThread::threadLoop() { latestRequestId = NAME_NOT_FOUND; latestRequestId = NAME_NOT_FOUND; } } for (size_t i = 0; i < mNextRequests.size(); i++) { auto& nextRequest = mNextRequests.editItemAt(i); sp<CaptureRequest> captureRequest = nextRequest.captureRequest; // Do not override rotate&crop for stream configurations that include // SurfaceViews(HW_COMPOSER) output, unless mOverrideToPortrait is set. // The display rotation there will be compensated by NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY captureRequest->mRotateAndCropChanged = (mComposerOutput && !mOverrideToPortrait) ? false : overrideAutoRotateAndCrop(captureRequest); } // 'mNextRequests' will at this point contain either a set of HFR batched requests // 'mNextRequests' will at this point contain either a set of HFR batched requests // or a single request from streaming or burst. In either case the first element // or a single request from streaming or burst. In either case the first element // should contain the latest camera settings that we need to check for any session // should contain the latest camera settings that we need to check for any session Loading Loading @@ -3584,18 +3618,13 @@ status_t Camera3Device::RequestThread::prepareHalRequests() { bool triggersMixedIn = (triggerCount > 0 || mPrevTriggers > 0); bool triggersMixedIn = (triggerCount > 0 || mPrevTriggers > 0); mPrevTriggers = triggerCount; mPrevTriggers = triggerCount; // Do not override rotate&crop for stream configurations that include // SurfaceViews(HW_COMPOSER) output, unless mOverrideToPortrait is set. // The display rotation there will be compensated by NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY bool rotateAndCropChanged = (mComposerOutput && !mOverrideToPortrait) ? false : overrideAutoRotateAndCrop(captureRequest); bool testPatternChanged = overrideTestPattern(captureRequest); bool testPatternChanged = overrideTestPattern(captureRequest); // If the request is the same as last, or we had triggers now or last time or // If the request is the same as last, or we had triggers now or last time or // changing overrides this time // changing overrides this time bool newRequest = bool newRequest = (mPrevRequest != captureRequest || triggersMixedIn || (mPrevRequest != captureRequest || triggersMixedIn || rotateAndCropChanged || testPatternChanged) && captureRequest->mRotateAndCropChanged || testPatternChanged) && // Request settings are all the same within one batch, so only treat the first // Request settings are all the same within one batch, so only treat the first // request in a batch as new // request in a batch as new !(batchedRequest && i > 0); !(batchedRequest && i > 0); Loading Loading @@ -4058,9 +4087,6 @@ status_t Camera3Device::RequestThread::setRotateAndCropAutoBehavior( camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropValue) { camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropValue) { ATRACE_CALL(); ATRACE_CALL(); Mutex::Autolock l(mTriggerMutex); Mutex::Autolock l(mTriggerMutex); if (rotateAndCropValue == ANDROID_SCALER_ROTATE_AND_CROP_AUTO) { return BAD_VALUE; } mRotateAndCropOverride = rotateAndCropValue; mRotateAndCropOverride = rotateAndCropValue; return OK; return OK; } } Loading Loading @@ -4637,13 +4663,20 @@ status_t Camera3Device::RequestThread::addFakeTriggerIds( return OK; return OK; } } bool Camera3Device::RequestThread::overrideAutoRotateAndCrop( bool Camera3Device::RequestThread::overrideAutoRotateAndCrop(const sp<CaptureRequest> &request) { const sp<CaptureRequest> &request) { ATRACE_CALL(); ATRACE_CALL(); if (mOverrideToPortrait) { Mutex::Autolock l(mTriggerMutex); Mutex::Autolock l(mTriggerMutex); uint8_t rotateAndCrop_u8 = mRotateAndCropOverride; return Camera3Device::overrideAutoRotateAndCrop(request, this->mOverrideToPortrait, this->mRotateAndCropOverride); } bool Camera3Device::overrideAutoRotateAndCrop(const sp<CaptureRequest> &request, bool overrideToPortrait, camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropOverride) { ATRACE_CALL(); if (overrideToPortrait) { uint8_t rotateAndCrop_u8 = rotateAndCropOverride; CameraMetadata &metadata = request->mSettingsList.begin()->metadata; CameraMetadata &metadata = request->mSettingsList.begin()->metadata; metadata.update(ANDROID_SCALER_ROTATE_AND_CROP, metadata.update(ANDROID_SCALER_ROTATE_AND_CROP, &rotateAndCrop_u8, 1); &rotateAndCrop_u8, 1); Loading @@ -4651,24 +4684,23 @@ bool Camera3Device::RequestThread::overrideAutoRotateAndCrop( } } if (request->mRotateAndCropAuto) { if (request->mRotateAndCropAuto) { Mutex::Autolock l(mTriggerMutex); CameraMetadata &metadata = request->mSettingsList.begin()->metadata; CameraMetadata &metadata = request->mSettingsList.begin()->metadata; auto rotateAndCropEntry = metadata.find(ANDROID_SCALER_ROTATE_AND_CROP); auto rotateAndCropEntry = metadata.find(ANDROID_SCALER_ROTATE_AND_CROP); if (rotateAndCropEntry.count > 0) { if (rotateAndCropEntry.count > 0) { if (rotateAndCropEntry.data.u8[0] == mRotateAndCropOverride) { if (rotateAndCropEntry.data.u8[0] == rotateAndCropOverride) { return false; return false; } else { } else { rotateAndCropEntry.data.u8[0] = mRotateAndCropOverride; rotateAndCropEntry.data.u8[0] = rotateAndCropOverride; return true; return true; } } } else { } else { uint8_t rotateAndCrop_u8 = mRotateAndCropOverride; uint8_t rotateAndCrop_u8 = rotateAndCropOverride; metadata.update(ANDROID_SCALER_ROTATE_AND_CROP, metadata.update(ANDROID_SCALER_ROTATE_AND_CROP, &rotateAndCrop_u8, 1); &rotateAndCrop_u8, 1); return true; return true; } } } } return false; return false; } } Loading Loading @@ -5154,6 +5186,10 @@ status_t Camera3Device::setRotateAndCropAutoBehavior( if (mRequestThread == nullptr) { if (mRequestThread == nullptr) { return INVALID_OPERATION; return INVALID_OPERATION; } } if (rotateAndCropValue == ANDROID_SCALER_ROTATE_AND_CROP_AUTO) { return BAD_VALUE; } mRotateAndCropOverride = rotateAndCropValue; return mRequestThread->setRotateAndCropAutoBehavior(rotateAndCropValue); return mRequestThread->setRotateAndCropAutoBehavior(rotateAndCropValue); } } Loading
services/camera/libcameraservice/device3/Camera3Device.h +11 −1 Original line number Original line Diff line number Diff line Loading @@ -581,6 +581,9 @@ class Camera3Device : // overriding of ROTATE_AND_CROP value and adjustment of coordinates // overriding of ROTATE_AND_CROP value and adjustment of coordinates // in several other controls in both the request and the result // in several other controls in both the request and the result bool mRotateAndCropAuto; bool mRotateAndCropAuto; // Indicates that the ROTATE_AND_CROP value within 'mSettingsList' was modified // irrespective of the original value. bool mRotateAndCropChanged = false; // Whether this capture request has its zoom ratio set to 1.0x before // Whether this capture request has its zoom ratio set to 1.0x before // the framework overrides it for camera HAL consumption. // the framework overrides it for camera HAL consumption. Loading Loading @@ -767,6 +770,11 @@ class Camera3Device : */ */ static nsecs_t getMonoToBoottimeOffset(); static nsecs_t getMonoToBoottimeOffset(); // Override rotate_and_crop control if needed static bool overrideAutoRotateAndCrop(const sp<CaptureRequest> &request /*out*/, bool overrideToPortrait, camera_metadata_enum_android_scaler_rotate_and_crop_t rotateAndCropOverride); struct RequestTrigger { struct RequestTrigger { // Metadata tag number, e.g. android.control.aePrecaptureTrigger // Metadata tag number, e.g. android.control.aePrecaptureTrigger uint32_t metadataTag; uint32_t metadataTag; Loading Loading @@ -917,7 +925,7 @@ class Camera3Device : status_t addFakeTriggerIds(const sp<CaptureRequest> &request); status_t addFakeTriggerIds(const sp<CaptureRequest> &request); // Override rotate_and_crop control if needed; returns true if the current value was changed // Override rotate_and_crop control if needed; returns true if the current value was changed bool overrideAutoRotateAndCrop(const sp<CaptureRequest> &request); bool overrideAutoRotateAndCrop(const sp<CaptureRequest> &request /*out*/); // Override test_pattern control if needed for camera mute; returns true // Override test_pattern control if needed for camera mute; returns true // if the current value was changed // if the current value was changed Loading Loading @@ -1356,6 +1364,8 @@ class Camera3Device : // Whether the camera framework overrides the device characteristics for // Whether the camera framework overrides the device characteristics for // app compatibility reasons. // app compatibility reasons. bool mOverrideToPortrait; bool mOverrideToPortrait; camera_metadata_enum_android_scaler_rotate_and_crop_t mRotateAndCropOverride; bool mComposerOutput; // Current active physical id of the logical multi-camera, if any // Current active physical id of the logical multi-camera, if any std::string mActivePhysicalId; std::string mActivePhysicalId; Loading