Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera 2: Tele and wide angle cameras #125

Open
simonschmeisser opened this issue Feb 11, 2024 · 6 comments
Open

Camera 2: Tele and wide angle cameras #125

simonschmeisser opened this issue Feb 11, 2024 · 6 comments

Comments

@simonschmeisser
Copy link

The Sony Xperia 10 III has three cameras on the back but only one is announced currently. On Android the camera is switched automatically based on zoom level but ACameraMetadata_isLogicalMultiCamera returns false here:

if (ACameraMetadata_isLogicalMultiCamera(camera_metadata,

Do we need to enable this somehow? Is there another way to switch cameras?

Some links:
https://developer.android.com/media/camera/camera2/multi-camera

https://developer.android.com/ndk/reference/group/camera#group___camera_1gga8480a8f9e2ee6f1ad2489ee1649f9ef9ad0531bfb7b50c1e6dd4ff85b630b790e

The docs also talk about fancy multi camera modes with stuff like bokeh effects by combining several cameras etc. Do we expect these to be implemented and unlockable here?

@abranson
Copy link
Member

The other physical cameras on the Xperia 10iii are disabled by default because they cause problems on the camera1 API. You can enable multiple cameras by editing a config file like this:

https://docs.sailfishos.org/Support/Help_Articles/Camera/#multiple-cameras-of-xperia-10-iii

There's also an app on Chum to do this with a top menu item:

https://build.sailfishos.org/package/show/sailfishos:chum/x10iii-cam-button

@simonschmeisser
Copy link
Author

Thanks!

Now I see 5 circles in the ui of which three select the three back lenses. Unfortunately after tapping on circle nr 4 once I'm stuck there. I can switch to front camera and restart jolla-camera, then the front camera works again. But as soon as I switch to the back camera I'm stuck with a black image.

@mlehtima
Copy link
Contributor

You probably need to remove the current camera index from dconf to get it working again.

@abranson
Copy link
Member

You can do that with dconf reset /apps/jolla-camera/deviceId (maybe I had to do that recently myself...)

@simonschmeisser
Copy link
Author

Thanks for your very handy tip!

02-13 20:53:25.364 12227   293 E DroidMediaCamera: Camera 0 facing 1 orientation 90
02-13 20:53:25.369 12227   293 E DroidMediaCamera: Camera 1 facing 0 orientation 270
02-13 20:53:25.374 12227   293 E DroidMediaCamera: Camera 2 facing 1 orientation 90
02-13 20:53:25.380 12227   293 E DroidMediaCamera: Camera 3 facing 1 orientation 90
02-13 20:53:25.385 12227   293 E DroidMediaCamera: Camera 4 facing 0 orientation 90
02-13 20:53:25.390 12227   293 E DroidMediaCamera: Camera 5 facing 1 orientation 270
02-13 20:53:25.396 12227   293 E DroidMediaCamera: Multicamera with physical camera count 2
02-13 20:53:25.396 12227   293 E DroidMediaCamera: Camera 6 facing 1 orientation 90

So two selfies and 5 back facing cameras, interesting! Does anybody know how to filter these?

ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE was set for all of them

@abranson
Copy link
Member

abranson commented Feb 14, 2024

I think the other three are virtual cameras made from combining other - maybe those bokeh ones or something. I think there's something in there to identify physical and virtual cameras, but either it's not working or someone was hoping to get those working? Not sure sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants