QtMultimedia Camera Not Work Android 10
-
Hello, I want to use the camera with QML on Android 10, but I cannot see the camera output in any way. My codes are as follows, am I doing something missing?
import QtQuick import QtQuick.Controls import QtQuick.Layouts import QtMultimedia Page { MediaDevices { id: deviceList } Camera { id: mainCamera active: true cameraDevice: deviceList.defaultVideoInput focusMode: Camera.FocusModeAutoNear } CaptureSession { camera: mainCamera videoOutput: videoOutput } VideoOutput { id: videoOutput anchors.fill: parent fillMode: VideoOutput.PreserveAspectFit } }
-
@NullByte Does it work for you in any version of android? If so then report the bug, also in that bug ask the supported android versions.
-
@eyllanesc said in QtMultimedia Camera Not Work Android 10:
@NullByte Does it work for you in any version of android? If so then report the bug, also in that bug ask the supported android versions.
I tried it on android 10 and android 11, both of them did not open the camera. In Android 10, I get outputs like this, I think the camera is turned on and off automatically.
I Camera : open camera: 0, package name: com.package.camera D HwFrameworkSecurityPartsFactory: HwFrameworkSecurityPartsFactory in. I HwFrameworkSecurityPartsFactory: add HwFrameworkSecurityPartsFactory to memory. I HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = false , isOpend = true I Camera : close camera: 0, package name:com.package.camera I HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = false , isOpend = false I Camera : open camera: 1, package name: com.package.camera I HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = true , isOpend = true I HwCameraUtil: notifySurfaceFlingerFrontCameraStatus 8011 transact success! I Camera : close camera: 1, package name: com.package.camera I HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = true , isOpend = false I HwCameraUtil: notifySurfaceFlingerFrontCameraStatus 8012 transact success! W IInputConnectionWrapper: getExtractedText on inactive InputConnection W IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection W libEGL : EGLNativeWindowType 0x74bfbe4010 disconnect failed
What can we do about this issue? Is this a mistake or am I doing something wrong?
-
Any idea?