PDA

View Full Version : How can I decrease the frame rate of the QCamera?



mismael85
6th July 2011, 07:50
Hello everybody,

How can I decrease the frame rate of the QCamera?

I am using Qt SDk 1.1 on Nokia C7
Thank you

mismael85
6th July 2011, 13:09
[SOLVED]

in the QVideoSuface::start(QVideoSurfaceFormat & formt)
set the frame rate you want using
format.setFrameRate(qreal)

mvuori
9th July 2011, 00:13
Thank you for reporting.

This interests me too, so tried to figure out, and after your telling one answer I tried to find what connection QVideoSuface has to QCamera -- in the context of the latest QtMobility -- and found none. Instead it seems that you can (in principle, at least...) do it via a QMediaRecorder attached to the QCamera:

recorder = new QMediaRecorder(camera);
// QVideoEncoderSettings videosettings;
videosettings = recorder->videoSettings();
videosettings.setFrameRate(3.99); // get the supported rates with QMediaRecorder::supportedFrameRates() -- this might report some values only after camera has been started
QAudioEncoderSettings audiosettings = recorder->audioSettings(); // just to get something to pass to the next function call...
recorder->setEncodingSettings(audiosettings, videosettings);