diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2014-12-12 12:00:06 +0100 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-01-13 13:34:41 +0100 |
commit | fe21ee675e72f7cb3936db6aa01862cfd322ce50 (patch) | |
tree | 8d2caa1d13b79cff554a7fbb8b98051c0695d683 /tests/auto/unit/qmultimedia_common/mockcameraservice.h | |
parent | c31d8cddd0a2e1f1ee622bc9ea07d038191ceea2 (diff) |
New camera viewfinder settings API.
There already was a control interface for the viewfinder settings
but no real public C++ API and a partial QML API.
This patch adds a new C++ API and improves the QML API.
Supported viewfinder settings are resolution, minimumFrameRate,
maximumFrameRate and pixelFormat. The camera can be queried for
the supported values for each of these settings.
A new control interface was created to match the new API.
Change-Id: I289fea038fe46277a5516c956a64280da09ed985
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'tests/auto/unit/qmultimedia_common/mockcameraservice.h')
-rw-r--r-- | tests/auto/unit/qmultimedia_common/mockcameraservice.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/unit/qmultimedia_common/mockcameraservice.h b/tests/auto/unit/qmultimedia_common/mockcameraservice.h index f9ffcfdce..28fa0fd4d 100644 --- a/tests/auto/unit/qmultimedia_common/mockcameraservice.h +++ b/tests/auto/unit/qmultimedia_common/mockcameraservice.h @@ -51,6 +51,7 @@ #include "../qmultimedia_common/mockvideowindowcontrol.h" #include "../qmultimedia_common/mockvideodeviceselectorcontrol.h" #include "../qmultimedia_common/mockcamerainfocontrol.h" +#include "../qmultimedia_common/mockcameraviewfindersettingscontrol.h" class MockSimpleCameraService : public QMediaService { @@ -101,6 +102,7 @@ public: windowControl = new MockVideoWindowControl(this); mockVideoDeviceSelectorControl = new MockVideoDeviceSelectorControl(this); mockCameraInfoControl = new MockCameraInfoControl(this); + mockViewfinderSettingsControl = new MockCameraViewfinderSettingsControl(this); rendererRef = 0; windowRef = 0; } @@ -162,6 +164,11 @@ public: return windowControl; } } + + if (qstrcmp(iid, QCameraViewfinderSettingsControl2_iid) == 0) { + return mockViewfinderSettingsControl; + } + return 0; } @@ -188,6 +195,7 @@ public: MockVideoWindowControl *windowControl; MockVideoDeviceSelectorControl *mockVideoDeviceSelectorControl; MockCameraInfoControl *mockCameraInfoControl; + MockCameraViewfinderSettingsControl *mockViewfinderSettingsControl; int rendererRef; int windowRef; }; |