Move QVideoWindowControl out of widgets.

There is no widget dependency in it, and this enables the QML
Video element to support video overlays later.

Change-Id: I7ebcde350f9595a9f7c319663ff745930535a8a7
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Thomas McGuire
2012-04-12 11:14:04 +02:00
committed by Qt by Nokia
parent a775af111b
commit 7c84225cc8
9 changed files with 11 additions and 40 deletions

View File

@@ -56,10 +56,7 @@
#include "../qmultimedia_common/mockcameracontrol.h"
#include "../qmultimedia_common/mockvideosurface.h"
#include "../qmultimedia_common/mockvideorenderercontrol.h"
#if defined(QT_MULTIMEDIA_MOCK_WIDGETS)
#include "../qmultimedia_common/mockvideowindowcontrol.h"
#endif
class MockSimpleCameraService : public QMediaService
{
@@ -107,9 +104,7 @@ public:
mockImageProcessingControl = new MockImageProcessingControl(this);
mockImageEncoderControl = new MockImageEncoderControl(this);
rendererControl = new MockVideoRendererControl(this);
#if defined(QT_MULTIMEDIA_MOCK_WIDGETS)
windowControl = new MockVideoWindowControl(this);
#endif
rendererRef = 0;
windowRef = 0;
}
@@ -159,14 +154,12 @@ public:
return rendererControl;
}
}
#if defined(QT_MULTIMEDIA_MOCK_WIDGETS)
if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
if (windowRef == 0) {
windowRef += 1;
return windowControl;
}
}
#endif
return 0;
}
@@ -174,10 +167,8 @@ public:
{
if (control == rendererControl)
rendererRef -= 1;
#if defined(QT_MULTIMEDIA_MOCK_WIDGETS)
if (control == windowControl)
windowRef -= 1;
#endif
}
MockCameraControl *mockControl;
@@ -192,9 +183,7 @@ public:
MockImageProcessingControl *mockImageProcessingControl;
MockImageEncoderControl *mockImageEncoderControl;
MockVideoRendererControl *rendererControl;
#if defined(QT_MULTIMEDIA_MOCK_WIDGETS)
MockVideoWindowControl *windowControl;
#endif
int rendererRef;
int windowRef;
};