qml 的Camera怎么实现录像功能

KingNDSC2012 2017-06-15 05:14:57
如题:Camera{//摄像头
id: camera
captureMode: Camera.CaptureVideo
imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
exposure {
exposureCompensation: -1.0
exposureMode: Camera.ExposurePortrait
}

flash.mode: Camera.FlashRedEyeReduction

videoRecorder {
onRecorderStateChanged: {
console.log("onRecorderStateChanged: " + videoRecorder.recorderState);
if (videoRecorder.recorderState === CameraRecorder.StoppedState) {
console.log("actualLocation: " + videoRecorder.actualLocation);
myvideo.source = videoRecorder.actualLocation;
}
}
}
// videoRecorder.audioEncodingMode: videoRecorder.ConstantBitrateEncoding
videoRecorder.audioBitRate: 128000
videoRecorder.mediaContainer: "mp4"
videoRecorder.outputLocation: "D:\\a"

Component.onCompleted: {
camera.viewfinder.resolution.width = 640
camera.viewfinder.resolution.height = 480
resolution = camera.viewfinder.resolution
console.log("resolution: " + resolution.width + " " + resolution.height)
console.log("deviceId: " + camera.deviceId)
}

}
这是一部份,调用开始录像的函数了,但是收不到信号回复
...全文
456 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

3,423

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 其他开发语言
社区管理员
  • 其他开发语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧