Skip to content

android 8.1 (XA2) compatibility + zoom implementation#115

Open
thigg wants to merge 3 commits intosailfishos:camera2from
thigg:camera2
Open

android 8.1 (XA2) compatibility + zoom implementation#115
thigg wants to merge 3 commits intosailfishos:camera2from
thigg:camera2

Conversation

@thigg
Copy link
Copy Markdown

@thigg thigg commented Oct 15, 2023

wip

#if ANDROID_MAJOR >= 9
case ACAMERA_CONTROL_ZOOM_RATIO_RANGE:
params += "max-zoom="+std::to_string(entry.data.f[1])+";";
break;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we return max-zoom also for older devices?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the parameter means the max zoom of optical zooms. This does not really make sense if zoom is only done by cropping the image

Minimum and maximum zoom ratios supported by this camera device.
https://developer.android.google.cn/ndk/reference/group/camera#group___camera_1gga49cf3e5a3deefe079ad036a8fac14627af00bd3268478899b538e6ae1323720fc

@thigg
Copy link
Copy Markdown
Author

thigg commented Oct 25, 2023

I will continue as soon as I find time. If anyone else wants to change something on this branch, feel free to do so/create a new pr if you are faster than i am

@thigg thigg force-pushed the camera2 branch 2 times, most recently from 7038d50 to 651bbd2 Compare December 9, 2023 12:26
ACAMERA_CONTROL_AE_REGIONS :
!strcmp(key, android::CameraParameters::KEY_ZOOM) ?
ACAMERA_CONTROL_ZOOM_RATIO :
#if ANDORID_MAJOR >= 9
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

#include "droidmediacamera.h"

#include <camera/CameraParameters.h>
#include <camera/NdkCaptureRequest.h>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these were sorted alphabetically before

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an issue with includes in Android versions < 10. In my wip branch I have a comment like this before this include "// This needs to be first because of broken includes in Android < 10"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants