Qt 5.1:适用于相机的 QMultimedia 5.0
Qt 5.1: QMultimedia 5.0 in android for Camera
我想在Android中使用带有Qml界面和QtMultimedia 5.0的相机直到现在我还没有成功。
我正在使用Qt 5.1和qtquick 2.1和Android 4.2.2 API 17
这是我的代码:
主.qml :
import QtQuick 2.1
import QtMultimedia 5.0
Rectangle {
width: 800
height: 1280
color:'green'
Camera {
id: camera
imageCapture {
onImageCaptured: {
// Show the preview in an Image
photoPreview.source = preview
}
onImageSaved: {
text.text = qsTr("Last Captured Image (%1):").arg(camera.imageCapture.capturedImagePath)
}
}
}
Column {
Text {
height: 15
text: qsTr("Preview (Click to capture):")
}
VideoOutput {
source: camera
focus: visible // To receive focus and capture key events when visible
width: 320; height: 240
MouseArea {
anchors.fill: parent
onClicked: camera.imageCapture.capture()
}
}
Text {
id: text
height: 15
text: qsTr("Last Captured Image (none)")
}
Image {
id: photoPreview
width: 320; height: 240
}
}
}
在 AndroidManifest 中.xml我添加了的文件:
<uses-feature android:name="android.hardware.camera" />
我得到的是白屏
提前致谢
如果您有
HTC设备,此错误可能是您没有视频输出的原因:QTBUG-43487。
相关文章:
- 了解 GLM- openGL 中的相机转换
- OpenGL相机和相机空间转型的困惑
- 如何使用按钮更新GTK3图像以使用C++从相机捕获图片
- 通过 API 控制 DJI 相机
- 将相机数据从服务器实时流式传输到客户端
- 来自逆 vp 矩阵和相机位置的光线方向不正确
- OpenCV - Python 断言错误:SAD 算法 - 立体相机视差图计算
- Qt 和 Android - 如何使用 Qandroidjniobject 启动相机
- 在Windows(C++)中使用USB相机拍摄高分辨率照片
- 如何在相机类中添加胶卷
- 强制Qt相机视频格式
- 操纵安卓相机的深度图导致应用程序崩溃
- 深度值没有意义 R200 相机
- Qt QML相机在部署后显示白屏
- Opencv 如何从相机读取单帧
- OpenCV - 来自相机的实时馈送不流畅
- 佳能SDK无法从相机下载图片
- 如何处理来自MIPI相机的12位图像?
- 如何设置vtk相机的正确变焦系数?
- Qt 5.1:适用于相机的 QMultimedia 5.0