From b28ee24628f77fced393cacc45500be6761e4497 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Wed, 22 Jan 2014 16:18:42 +0100 Subject: New QCameraInfo class. The class allows to get the list of available cameras on the system as well as getting some static information about them such as their unique ID, display name, physical position and sensor orientation. This makes QCamera::availableDevices() and QCamera::deviceDescription() obsolete. This patch contains the API, documentation and auto-tests but not the actual implementation by each backend (except for retrieving the default camera device). [ChangeLog][QtMultimedia] Added new QCameraInfo class [ChangeLog][QtMultimedia] QCamera: availableDevices() and deviceDescription() are deprecated, use QCameraInfo instead Change-Id: I64fd65729ab26a789468979ed5444ee90bb82cd0 Reviewed-by: Christian Stromme --- tests/auto/unit/qmultimedia_common/mockcameraservice.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/auto/unit/qmultimedia_common/mockcameraservice.h') diff --git a/tests/auto/unit/qmultimedia_common/mockcameraservice.h b/tests/auto/unit/qmultimedia_common/mockcameraservice.h index 633b28488..f12b0eab0 100644 --- a/tests/auto/unit/qmultimedia_common/mockcameraservice.h +++ b/tests/auto/unit/qmultimedia_common/mockcameraservice.h @@ -57,6 +57,8 @@ #include "../qmultimedia_common/mockvideosurface.h" #include "../qmultimedia_common/mockvideorenderercontrol.h" #include "../qmultimedia_common/mockvideowindowcontrol.h" +#include "../qmultimedia_common/mockvideodeviceselectorcontrol.h" +#include "../qmultimedia_common/mockcamerainfocontrol.h" class MockSimpleCameraService : public QMediaService { @@ -105,6 +107,8 @@ public: mockImageEncoderControl = new MockImageEncoderControl(this); rendererControl = new MockVideoRendererControl(this); windowControl = new MockVideoWindowControl(this); + mockVideoDeviceSelectorControl = new MockVideoDeviceSelectorControl(this); + mockCameraInfoControl = new MockCameraInfoControl(this); rendererRef = 0; windowRef = 0; } @@ -148,6 +152,12 @@ public: if (qstrcmp(iid, QImageEncoderControl_iid) == 0) return mockImageEncoderControl; + if (qstrcmp(iid, QVideoDeviceSelectorControl_iid) == 0) + return mockVideoDeviceSelectorControl; + + if (qstrcmp(iid, QCameraInfoControl_iid) == 0) + return mockCameraInfoControl; + if (qstrcmp(iid, QVideoRendererControl_iid) == 0) { if (rendererRef == 0) { rendererRef += 1; @@ -184,6 +194,8 @@ public: MockImageEncoderControl *mockImageEncoderControl; MockVideoRendererControl *rendererControl; MockVideoWindowControl *windowControl; + MockVideoDeviceSelectorControl *mockVideoDeviceSelectorControl; + MockCameraInfoControl *mockCameraInfoControl; int rendererRef; int windowRef; }; -- cgit v1.2.3