8000 [Camera Plugin] Focus and Exposure bug on some Android device · Issue #83549 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Camera Plugin] Focus and Exposure bug on some Android device #83549
Open
@LeoFavor1562

Description

@LeoFavor1562

Steps to Reproduce

  1. Just run camera demo: https://pub.dev/packages/camera/example
  2. Tap camera preview area on screen

Expected results:
Focus and exposure function work well

Actual results:
On Android device, only exposure worked, focus doesn't work.
After that, I modify the key code from
cameraController.setExposurePoint(offset); cameraController.setFocusPoint(offset);
to
cameraController.setExposurePoint(offset); cameraController.setFocusPoint(offset); cameraController.setFocusMode(FocusMode.locked);.
Focus and exposure function all work well, but if I move my phone to a very dart environment(or put the camera side on the table)for a minute, the camera will overexposure and never restore, and camera plugin shut down. When I take a photo, the log as follow:

It is worth mentioning that some iOS devices work well without cameraController.setFocusMode(FocusMode.locked);, and some iOS devices need cameraController.setFocusMode(FocusMode.locked); to make focus take effect. But camera plugin

Logs
[  +59 ms] I/RequestQueue(10022): Repeating capture request cancelled.
[        ] I/RequestQueue(10022): Repeating capture request set.
[   +4 ms] D/Surface (10022): Surface::setBuffersUserDimensions(this=0x72e1d4d800,w=1280,h=720)
[  +12 ms] W/LegacyRequestMapper(10022): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
[  +42 ms] D/Surface (10022): Surface::setBuffersUserDimensions(this=0x72e1d4d800,w=1280,h=720)
[   +3 ms] I/BufferQueueProducer(10022): [SurfaceTexture-0-10022-0](this:0x72ff371800,id:0,api:1,p:10022,c:10022) queueBuffer: slot 2 is dropped, handle=0x72c37ce140
[  +55 ms] D/Surface (10022): Surface::setBuffersUserDimensions(this=0x72e1d4d800,w=1280,h=720)
[   +1 ms] I/BufferQueueProducer(10022): [SurfaceTexture-0-10022-0](this:0x72ff371800,id:0,api:1,p:10022,c:10022) queueBuffer: slot 1 is dropped, handle=0x72d3ffe400
[  +63 ms] D/Surface (10022): Surface::setBuffersUserDimensions(this=0x72e1d4d800,w=1280,h=720)
[   +3 ms] I/BufferQueueProducer(10022): [SurfaceTexture-0-10022-0](this:0x72ff371800,id:0,api:1,p:10022,c:10022) queueBuffer: slot 2 is dropped, handle=0x72c37ce140

[✓] Flutter (Channel unknown, 2.0.4, on macOS 11.2.2 20D80 darwin-arm, locale zh-Hans-CN)
• Flutter version 2.0.4 at /Users/zdwh/Desktop/Flutter/FlutterSDK/flutter
• Framework revision b139559 (8 weeks ago), 2021-04-01 14:25:01 -0700
• Engine revision 2dce470
• Dart version 2.12.2
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/zdwh/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.55.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
• OPPO A79k (mobile) • S4CUD6KJBI555SLN • android-arm64 • Android 7.1.1 (API 25)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: device-specificOnly manifests on certain devicesp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    Status

    [PENDING] camera_android issues solved by camera_android_camerax

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0