diff options
author | Tobias Koenig <tobias.koenig.qnx@kdab.com> | 2013-02-13 11:57:02 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-21 11:23:38 +0100 |
commit | 31b454b8d6d27dec0fb39987eb315fe93de7eda1 (patch) | |
tree | 9926634052d543299b95eec6991246d940e1add9 /src/plugins/blackberry/camera/bbcamerasession.h | |
parent | 13ecd7171b4876bcf5027f9b349781b6dd9be790 (diff) |
Blackberry: Grab viewfinder frames from native window
Since the conversion from NV12 to RGB on the CPU does not scale
for larger photo/video resolutions, this patch uses a different
approach. It uses the low-level screen API to grab screenshots
of the native viewfinder window and provides them as QImage to
the QAbstractVideoSurface. Even for large resolutions this
is quite performant.
Change-Id: I59a7cbe6850b3b07575ea10026f3180cfd22e935
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Diffstat (limited to 'src/plugins/blackberry/camera/bbcamerasession.h')
-rw-r--r-- | src/plugins/blackberry/camera/bbcamerasession.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/blackberry/camera/bbcamerasession.h b/src/plugins/blackberry/camera/bbcamerasession.h index ffb650132..f57c7dabf 100644 --- a/src/plugins/blackberry/camera/bbcamerasession.h +++ b/src/plugins/blackberry/camera/bbcamerasession.h @@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE class BbCameraOrientationHandler; +class WindowGrabber; class BbCameraSession : public QObject { @@ -137,10 +138,6 @@ public: QAudioEncoderSettings audioSettings() const; void setAudioSettings(const QAudioEncoderSettings &settings); - // methods invoked from BB10 camera API callbacks in separated thread - void handlePhotoViewFinderData(camera_buffer_t*); - void handleVideoViewFinderData(camera_buffer_t*); - Q_SIGNALS: // camera control void statusChanged(QCamera::Status); @@ -178,6 +175,7 @@ private slots: void handleVideoRecordingResumed(); void deviceOrientationChanged(int); void handleCameraPowerUp(); + void viewfinderFrameGrabbed(const QImage &image); private: bool openCamera(); @@ -227,6 +225,8 @@ private: BbMediaStorageLocation m_mediaStorageLocation; camera_handle_t m_handle; + + WindowGrabber* m_windowGrabber; }; QDebug operator<<(QDebug debug, camera_error_t error); |