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

DeviceOrientation.portraitUp?????? Right????? #30

Open
bakboem opened this issue Sep 2, 2024 · 6 comments
Open

DeviceOrientation.portraitUp?????? Right????? #30

bakboem opened this issue Sep 2, 2024 · 6 comments

Comments

@bakboem
Copy link

bakboem commented Sep 2, 2024

No description provided.

@RafaelBarbosatec
Copy link
Owner

Yes

@bakboem
Copy link
Author

bakboem commented Sep 4, 2024

bro, I used a decoder only. because the camera Orientation is naughty.

@RafaelBarbosatec
Copy link
Owner

Hi @bakboem .
I don't understood your point.
What do you need?
Do you have some problem with the camera?
Do you have any suggestions?

@bakboem
Copy link
Author

bakboem commented Dec 16, 2024

Hi @bakboem . I don't understood your point. What do you need? Do you have some problem with the camera? Do you have any suggestions?

Yes, the camera calls in your plugin are insufficient, I think you should only support portrait orientation

@T1G3R192
Copy link

T1G3R192 commented Jan 11, 2025

@RafaelBarbosatec there is indeed a problem, whenever you need the camera to open in the orientation portraitUp. You need to set it to landscapeRight like this: lockCaptureOrientation: DeviceOrientation.landscapeRight, in order to achieve the desired result. The camera is always opened with a 90 degrees tilt toward the left side of the device.

@bakboem
Copy link
Author

bakboem commented Jan 12, 2025

@RafaelBarbosatec there is indeed a problem, whenever you need the camera to open in the orientation portraitUp. You need to set it to landscapeRight like this: lockCaptureOrientation: DeviceOrientation.landscapeRight, in order to achieve the desired result. The camera is always opened with a 90 degrees tilt toward the left side of the device.

Yes, you are right. The camera's sensor orientation is inconsistent with the screen orientation (most rear camera sensors are actually "horizontally", sensorOrientation=90 or 270, resulting in the output data being naturally horizontal). If the underlying camera2 api is used, the direction should be recalculated

val relativeRotation = (sensorOrientation - deviceOrientation + 360) % 360
MediaMuxer.setOrientationHint(relativeRotation)

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