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>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user