Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.6.1
Description
I write QML code to select an appropriate CameraFormat for my application; in my case, I want to avoid the overhead of cameras which produce their output as JPEG. Consider the following QML snippet:
Item {
CaptureSession {
id: captureSession
camera: Camera {
id: camera
cameraFormat: {
let videoFormats = Object.values(camera.cameraDevice.videoFormats)
// Failure: VideoFrameFormat.Format_Jpeg is not defined; use the number 29 instead.
videoFormats = videoFormats.filter(videoFormat => videoFormat.pixelFormat !== VideoFrameFormat.Format_Jpeg)
return videoFormats[0]
}
}
}
}
Note that the enum VideoFrameFormat.Format_Jpeg is not defined, causing this code to fail. Therefore, providing this enum would improve the quality of QML code.
Attachments
Issue Links
- is blocked by
-
QTBUG-137732 Move PixelFormat enum out of QVideoFrameFormat
-
- Open
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-120721 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
652353,2 | Quick: expose VideoFrameFormat to qml | dev | qt/qtmultimedia | Status: NEW | 0 | 0 |