我试图在camera example
中设置一些设置QCamera *camera;
QMediaRecorder* mediaRecorder;
QVideoEncoderSettings videoSettings;
videoSettings.setFrameRate(10);
qDebug() << videoSettings.frameRate();
videoSettings.setQuality(QMultimedia::VeryLowQuality);
videoSettings.setResolution(200, 300);
qDebug() << videoSettings.resolution();
mediaRecorder->setVideoSettings(videoSettings);
qDebug() << mediaRecorder->videoSettings().resolution();
它无法正常工作,因为您可以看到调试日志:
10
QSize(200, 300)
QSize(-1, -1) 0 // should be 200*300 an 10fps, isn't it ?
我不明白为什么它不起作用......