winrt: Add camera focus and focus lock controls
[ChangLog][multimedia][winrt] The winrt backend now supports camera focus and focus lock for Windows Phone. Task-Id: QTBUG-46120 Change-Id: Idb222798284d887a6e90a4986c69274e0ef765f5 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
@@ -45,6 +45,8 @@
|
||||
#include <QtMultimedia/QVideoRendererControl>
|
||||
#include <QtMultimedia/QVideoDeviceSelectorControl>
|
||||
#include <QtMultimedia/QImageEncoderControl>
|
||||
#include <QtMultimedia/QCameraFocusControl>
|
||||
#include <QtMultimedia/QCameraLocksControl>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -69,34 +71,34 @@ QMediaControl *QWinRTCameraService::requestControl(const char *name)
|
||||
d->cameraControl = new QWinRTCameraControl(this);
|
||||
return d->cameraControl;
|
||||
}
|
||||
|
||||
if (qstrcmp(name, QVideoRendererControl_iid) == 0) {
|
||||
if (d->cameraControl)
|
||||
return d->cameraControl->videoRenderer();
|
||||
}
|
||||
|
||||
if (qstrcmp(name, QVideoDeviceSelectorControl_iid) == 0) {
|
||||
if (d->cameraControl)
|
||||
return d->cameraControl->videoDeviceSelector();
|
||||
}
|
||||
|
||||
if (qstrcmp(name, QCameraInfoControl_iid) == 0) {
|
||||
if (!d->cameraInfoControl)
|
||||
d->cameraInfoControl = new QWinRTCameraInfoControl(this);
|
||||
return d->cameraInfoControl;
|
||||
}
|
||||
|
||||
if (qstrcmp(name, QCameraImageCaptureControl_iid) == 0) {
|
||||
if (d->cameraControl)
|
||||
return d->cameraControl->imageCaptureControl();
|
||||
}
|
||||
if (!d->cameraControl)
|
||||
return nullptr;
|
||||
|
||||
if (qstrcmp(name, QImageEncoderControl_iid) == 0) {
|
||||
if (d->cameraControl)
|
||||
return d->cameraControl->imageEncoderControl();
|
||||
}
|
||||
if (qstrcmp(name, QVideoRendererControl_iid) == 0)
|
||||
return d->cameraControl->videoRenderer();
|
||||
|
||||
return Q_NULLPTR;
|
||||
if (qstrcmp(name, QVideoDeviceSelectorControl_iid) == 0)
|
||||
return d->cameraControl->videoDeviceSelector();
|
||||
|
||||
if (qstrcmp(name, QCameraImageCaptureControl_iid) == 0)
|
||||
return d->cameraControl->imageCaptureControl();
|
||||
|
||||
if (qstrcmp(name, QImageEncoderControl_iid) == 0)
|
||||
return d->cameraControl->imageEncoderControl();
|
||||
|
||||
if (qstrcmp(name, QCameraFocusControl_iid) == 0)
|
||||
return d->cameraControl->cameraFocusControl();
|
||||
|
||||
if (qstrcmp(name, QCameraLocksControl_iid) == 0)
|
||||
return d->cameraControl->cameraLocksControl();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void QWinRTCameraService::releaseControl(QMediaControl *control)
|
||||
|
||||
Reference in New Issue
Block a user