Blackberry: Fix resolution selection for video recording

Fix the selection of the video viewfinder resolution depending
on the features provided by the camera. If the viewfinder is responsible
for encoding the video frames, the resolution of the viewfinder
and the video output must match. Otherwise only the ratio must match
and we can use a lower resolution for the viewfinder to improve
the performance of the NV12->RGB frame conversion.

Change-Id: I66ace84841a69be84f83bf9c5240cd23d96fbb76
Reviewed-by: Bernd Weimer <bweimer@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
This commit is contained in:
Tobias Koenig
2013-02-12 10:26:55 +01:00
committed by The Qt Project
parent df2c324364
commit dbe69f38d0
3 changed files with 58 additions and 49 deletions

View File

@@ -125,7 +125,7 @@ public:
void setVideoState(QMediaRecorder::State state);
QMediaRecorder::Status videoStatus() const;
qint64 duration() const;
void applySettings();
void applyVideoSettings();
// video encoder settings control
QList<QSize> supportedResolutions(const QVideoEncoderSettings &settings, bool *continuous) const;
@@ -201,6 +201,7 @@ private:
QCamera::CaptureModes m_captureMode;
QByteArray m_device;
bool m_previewIsVideo;
QPointer<QAbstractVideoSurface> m_surface;
QMutex m_surfaceMutex;