From acd9a72314696d97dccc36fd491d1aff754f2606 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 22 Dec 2020 18:24:00 +0100 Subject: Merge QCameraLocksControl into QCameraControl Change-Id: I228b7ef5dbb3e782a4cf39605e2f33b3c93ba8a5 Reviewed-by: Lars Knoll --- src/plugins/gstreamer/camerabin/camerabin.pro | 2 - .../gstreamer/camerabin/camerabincontrol.cpp | 187 +++++++++++++++- src/plugins/gstreamer/camerabin/camerabincontrol.h | 27 +++ src/plugins/gstreamer/camerabin/camerabinlocks.cpp | 244 --------------------- src/plugins/gstreamer/camerabin/camerabinlocks.h | 94 -------- .../gstreamer/camerabin/camerabinservice.cpp | 4 - .../gstreamer/camerabin/camerabinsession.cpp | 9 - src/plugins/gstreamer/camerabin/camerabinsession.h | 2 - 8 files changed, 213 insertions(+), 356 deletions(-) delete mode 100644 src/plugins/gstreamer/camerabin/camerabinlocks.cpp delete mode 100644 src/plugins/gstreamer/camerabin/camerabinlocks.h (limited to 'src/plugins/gstreamer') diff --git a/src/plugins/gstreamer/camerabin/camerabin.pro b/src/plugins/gstreamer/camerabin/camerabin.pro index a50914929..ed47ec9c0 100644 --- a/src/plugins/gstreamer/camerabin/camerabin.pro +++ b/src/plugins/gstreamer/camerabin/camerabin.pro @@ -48,12 +48,10 @@ qtConfig(gstreamer_photography) { HEADERS += \ $$PWD/camerabinfocus.h \ $$PWD/camerabinexposure.h \ - $$PWD/camerabinlocks.h SOURCES += \ $$PWD/camerabinexposure.cpp \ $$PWD/camerabinfocus.cpp \ - $$PWD/camerabinlocks.cpp QMAKE_USE += gstreamer_photography DEFINES += GST_USE_UNSTABLE_API #prevents warnings because of unstable photography API diff --git a/src/plugins/gstreamer/camerabin/camerabincontrol.cpp b/src/plugins/gstreamer/camerabin/camerabincontrol.cpp index 0d9d7ff84..bd3db7bf4 100644 --- a/src/plugins/gstreamer/camerabin/camerabincontrol.cpp +++ b/src/plugins/gstreamer/camerabin/camerabincontrol.cpp @@ -43,10 +43,13 @@ #include "camerabinaudioencoder.h" #include "camerabinvideoencoder.h" #include "camerabinimageencoder.h" +#include "camerabinfocus.h" +#include "camerabinimageprocessing.h" #include #include #include +#include QT_BEGIN_NAMESPACE @@ -57,7 +60,8 @@ CameraBinControl::CameraBinControl(CameraBinSession *session) :QCameraControl(session), m_session(session), m_state(QCamera::UnloadedState), - m_reloadPending(false) + m_reloadPending(false), + m_focus(m_session->cameraFocusControl()) { connect(m_session, SIGNAL(statusChanged(QCamera::Status)), this, SIGNAL(statusChanged(QCamera::Status))); @@ -71,6 +75,9 @@ CameraBinControl::CameraBinControl(CameraBinSession *session) connect(m_session, SIGNAL(busyChanged(bool)), SLOT(handleBusyChanged(bool))); + + connect(m_focus, SIGNAL(_q_focusStatusChanged(QCamera::LockStatus,QCamera::LockChangeReason)), + this, SLOT(updateFocusStatus(QCamera::LockStatus,QCamera::LockChangeReason))); } CameraBinControl::~CameraBinControl() @@ -229,4 +236,182 @@ void CameraBinControl::setViewfinderColorSpaceConversion(bool enabled) g_object_set(G_OBJECT(m_session->cameraBin()), "flags", flags, NULL); } +QCamera::LockTypes CameraBinControl::supportedLocks() const +{ + QCamera::LockTypes locks = QCamera::LockFocus; + + if (GstPhotography *photography = m_session->photography()) { + if (gst_photography_get_capabilities(photography) & GST_PHOTOGRAPHY_CAPS_WB_MODE) + locks |= QCamera::LockWhiteBalance; + + if (GstElement *source = m_session->cameraSource()) { + if (g_object_class_find_property( + G_OBJECT_GET_CLASS(source), "exposure-mode")) { + locks |= QCamera::LockExposure; + } + } + } + + return locks; +} + +QCamera::LockStatus CameraBinControl::lockStatus(QCamera::LockType lock) const +{ + switch (lock) { + case QCamera::LockFocus: + return m_focus->focusStatus(); + case QCamera::LockExposure: + if (m_pendingLocks & QCamera::LockExposure) + return QCamera::Searching; + return isExposureLocked() ? QCamera::Locked : QCamera::Unlocked; + case QCamera::LockWhiteBalance: + if (m_pendingLocks & QCamera::LockWhiteBalance) + return QCamera::Searching; + return isWhiteBalanceLocked() ? QCamera::Locked : QCamera::Unlocked; + default: + return QCamera::Unlocked; + } +} + +void CameraBinControl::searchAndLock(QCamera::LockTypes locks) +{ + m_pendingLocks &= ~locks; + + if (locks & QCamera::LockFocus) { + m_pendingLocks |= QCamera::LockFocus; + m_focus->_q_startFocusing(); + } + if (!m_pendingLocks) + m_lockTimer.stop(); + + if (locks & QCamera::LockExposure) { + if (isExposureLocked()) { + unlockExposure(QCamera::Searching, QCamera::UserRequest); + m_pendingLocks |= QCamera::LockExposure; + m_lockTimer.start(1000, this); + } else { + lockExposure(QCamera::UserRequest); + } + } + if (locks & QCamera::LockWhiteBalance) { + if (isWhiteBalanceLocked()) { + unlockWhiteBalance(QCamera::Searching, QCamera::UserRequest); + m_pendingLocks |= QCamera::LockWhiteBalance; + m_lockTimer.start(1000, this); + } else { + lockWhiteBalance(QCamera::UserRequest); + } + } +} + +void CameraBinControl::unlock(QCamera::LockTypes locks) +{ + m_pendingLocks &= ~locks; + + if (locks & QCamera::LockFocus) + m_focus->_q_stopFocusing(); + + if (!m_pendingLocks) + m_lockTimer.stop(); + + if (locks & QCamera::LockExposure) + unlockExposure(QCamera::Unlocked, QCamera::UserRequest); + if (locks & QCamera::LockWhiteBalance) + unlockWhiteBalance(QCamera::Unlocked, QCamera::UserRequest); +} + +void CameraBinControl::updateFocusStatus(QCamera::LockStatus status, QCamera::LockChangeReason reason) +{ + if (status != QCamera::Searching) + m_pendingLocks &= ~QCamera::LockFocus; + + if (status == QCamera::Locked && !m_lockTimer.isActive()) { + if (m_pendingLocks & QCamera::LockExposure) + lockExposure(QCamera::LockAcquired); + if (m_pendingLocks & QCamera::LockWhiteBalance) + lockWhiteBalance(QCamera::LockAcquired); + } + emit lockStatusChanged(QCamera::LockFocus, status, reason); +} + +void CameraBinControl::timerEvent(QTimerEvent *event) +{ + if (event->timerId() != m_lockTimer.timerId()) + return QCameraControl::timerEvent(event); + + m_lockTimer.stop(); + + if (!(m_pendingLocks & QCamera::LockFocus)) { + if (m_pendingLocks & QCamera::LockExposure) + lockExposure(QCamera::LockAcquired); + if (m_pendingLocks & QCamera::LockWhiteBalance) + lockWhiteBalance(QCamera::LockAcquired); + } +} + +bool CameraBinControl::isExposureLocked() const +{ + if (GstElement *source = m_session->cameraSource()) { + GstPhotographyExposureMode exposureMode = GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO; + g_object_get (G_OBJECT(source), "exposure-mode", &exposureMode, NULL); + return exposureMode == GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL; + } else { + return false; + } +} + +void CameraBinControl::lockExposure(QCamera::LockChangeReason reason) +{ + GstElement *source = m_session->cameraSource(); + if (!source) + return; + + m_pendingLocks &= ~QCamera::LockExposure; + g_object_set( + G_OBJECT(source), + "exposure-mode", + GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL, + NULL); + emit lockStatusChanged(QCamera::LockExposure, QCamera::Locked, reason); +} + +void CameraBinControl::unlockExposure(QCamera::LockStatus status, QCamera::LockChangeReason reason) +{ + GstElement *source = m_session->cameraSource(); + if (!source) + return; + + g_object_set( + G_OBJECT(source), + "exposure-mode", + GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO, + NULL); + emit lockStatusChanged(QCamera::LockExposure, status, reason); +} + +bool CameraBinControl::isWhiteBalanceLocked() const +{ + if (GstPhotography *photography = m_session->photography()) { + GstPhotographyWhiteBalanceMode whiteBalanceMode; + return gst_photography_get_white_balance_mode(photography, &whiteBalanceMode) + && whiteBalanceMode == GST_PHOTOGRAPHY_WB_MODE_MANUAL; + } else { + return false; + } +} + +void CameraBinControl::lockWhiteBalance(QCamera::LockChangeReason reason) +{ + m_pendingLocks &= ~QCamera::LockWhiteBalance; + m_session->imageProcessingControl()->lockWhiteBalance(); + emit lockStatusChanged(QCamera::LockWhiteBalance, QCamera::Locked, reason); +} + +void CameraBinControl::unlockWhiteBalance( + QCamera::LockStatus status, QCamera::LockChangeReason reason) +{ + m_session->imageProcessingControl()->lockWhiteBalance(); + emit lockStatusChanged(QCamera::LockWhiteBalance, status, reason); +} + QT_END_NAMESPACE diff --git a/src/plugins/gstreamer/camerabin/camerabincontrol.h b/src/plugins/gstreamer/camerabin/camerabincontrol.h index 7210fa090..4b72e3d14 100644 --- a/src/plugins/gstreamer/camerabin/camerabincontrol.h +++ b/src/plugins/gstreamer/camerabin/camerabincontrol.h @@ -42,6 +42,7 @@ #define CAMERABINCONTROL_H #include +#include #include #include "camerabinsession.h" @@ -69,6 +70,13 @@ public: bool canChangeProperty(PropertyChangeType changeType, QCamera::Status status) const override; bool viewfinderColorSpaceConversion() const; + QCamera::LockTypes supportedLocks() const override; + + QCamera::LockStatus lockStatus(QCamera::LockType lock) const override; + + void searchAndLock(QCamera::LockTypes locks) override; + void unlock(QCamera::LockTypes locks) override; + public slots: void reloadLater(); void setViewfinderColorSpaceConversion(bool enabled); @@ -82,10 +90,29 @@ private slots: private: void updateSupportedResolutions(const QString &device); +protected: + void timerEvent(QTimerEvent *event) override; + +private slots: + void updateFocusStatus(QCamera::LockStatus status, QCamera::LockChangeReason reason); + +private: + bool isExposureLocked() const; + void lockExposure(QCamera::LockChangeReason reason); + void unlockExposure(QCamera::LockStatus status, QCamera::LockChangeReason reason); + + bool isWhiteBalanceLocked() const; + void lockWhiteBalance(QCamera::LockChangeReason reason); + void unlockWhiteBalance(QCamera::LockStatus status, QCamera::LockChangeReason reason); + CameraBinSession *m_session; QCamera::State m_state; bool m_reloadPending; + + CameraBinFocus *m_focus; + QBasicTimer m_lockTimer; + QCamera::LockTypes m_pendingLocks; }; QT_END_NAMESPACE diff --git a/src/plugins/gstreamer/camerabin/camerabinlocks.cpp b/src/plugins/gstreamer/camerabin/camerabinlocks.cpp deleted file mode 100644 index 9891ace84..000000000 --- a/src/plugins/gstreamer/camerabin/camerabinlocks.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "camerabinlocks.h" -#include "camerabinsession.h" -#include "camerabinfocus.h" -#include "camerabinimageprocessing.h" - -#include - -#include - -#include - -QT_BEGIN_NAMESPACE - -CameraBinLocks::CameraBinLocks(CameraBinSession *session) - :QCameraLocksControl(session), - m_session(session), - m_focus(m_session->cameraFocusControl()) -{ - connect(m_focus, SIGNAL(_q_focusStatusChanged(QCamera::LockStatus,QCamera::LockChangeReason)), - this, SLOT(updateFocusStatus(QCamera::LockStatus,QCamera::LockChangeReason))); -} - -CameraBinLocks::~CameraBinLocks() -{ -} - -QCamera::LockTypes CameraBinLocks::supportedLocks() const -{ - QCamera::LockTypes locks = QCamera::LockFocus; - - if (GstPhotography *photography = m_session->photography()) { - if (gst_photography_get_capabilities(photography) & GST_PHOTOGRAPHY_CAPS_WB_MODE) - locks |= QCamera::LockWhiteBalance; - - if (GstElement *source = m_session->cameraSource()) { - if (g_object_class_find_property( - G_OBJECT_GET_CLASS(source), "exposure-mode")) { - locks |= QCamera::LockExposure; - } - } - } - - return locks; -} - -QCamera::LockStatus CameraBinLocks::lockStatus(QCamera::LockType lock) const -{ - switch (lock) { - case QCamera::LockFocus: - return m_focus->focusStatus(); - case QCamera::LockExposure: - if (m_pendingLocks & QCamera::LockExposure) - return QCamera::Searching; - return isExposureLocked() ? QCamera::Locked : QCamera::Unlocked; - case QCamera::LockWhiteBalance: - if (m_pendingLocks & QCamera::LockWhiteBalance) - return QCamera::Searching; - return isWhiteBalanceLocked() ? QCamera::Locked : QCamera::Unlocked; - default: - return QCamera::Unlocked; - } -} - -void CameraBinLocks::searchAndLock(QCamera::LockTypes locks) -{ - m_pendingLocks &= ~locks; - - if (locks & QCamera::LockFocus) { - m_pendingLocks |= QCamera::LockFocus; - m_focus->_q_startFocusing(); - } - if (!m_pendingLocks) - m_lockTimer.stop(); - - if (locks & QCamera::LockExposure) { - if (isExposureLocked()) { - unlockExposure(QCamera::Searching, QCamera::UserRequest); - m_pendingLocks |= QCamera::LockExposure; - m_lockTimer.start(1000, this); - } else { - lockExposure(QCamera::UserRequest); - } - } - if (locks & QCamera::LockWhiteBalance) { - if (isWhiteBalanceLocked()) { - unlockWhiteBalance(QCamera::Searching, QCamera::UserRequest); - m_pendingLocks |= QCamera::LockWhiteBalance; - m_lockTimer.start(1000, this); - } else { - lockWhiteBalance(QCamera::UserRequest); - } - } -} - -void CameraBinLocks::unlock(QCamera::LockTypes locks) -{ - m_pendingLocks &= ~locks; - - if (locks & QCamera::LockFocus) - m_focus->_q_stopFocusing(); - - if (!m_pendingLocks) - m_lockTimer.stop(); - - if (locks & QCamera::LockExposure) - unlockExposure(QCamera::Unlocked, QCamera::UserRequest); - if (locks & QCamera::LockWhiteBalance) - unlockWhiteBalance(QCamera::Unlocked, QCamera::UserRequest); -} - -void CameraBinLocks::updateFocusStatus(QCamera::LockStatus status, QCamera::LockChangeReason reason) -{ - if (status != QCamera::Searching) - m_pendingLocks &= ~QCamera::LockFocus; - - if (status == QCamera::Locked && !m_lockTimer.isActive()) { - if (m_pendingLocks & QCamera::LockExposure) - lockExposure(QCamera::LockAcquired); - if (m_pendingLocks & QCamera::LockWhiteBalance) - lockWhiteBalance(QCamera::LockAcquired); - } - emit lockStatusChanged(QCamera::LockFocus, status, reason); -} - -void CameraBinLocks::timerEvent(QTimerEvent *event) -{ - if (event->timerId() != m_lockTimer.timerId()) - return QCameraLocksControl::timerEvent(event); - - m_lockTimer.stop(); - - if (!(m_pendingLocks & QCamera::LockFocus)) { - if (m_pendingLocks & QCamera::LockExposure) - lockExposure(QCamera::LockAcquired); - if (m_pendingLocks & QCamera::LockWhiteBalance) - lockWhiteBalance(QCamera::LockAcquired); - } -} - -bool CameraBinLocks::isExposureLocked() const -{ - if (GstElement *source = m_session->cameraSource()) { - GstPhotographyExposureMode exposureMode = GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO; - g_object_get (G_OBJECT(source), "exposure-mode", &exposureMode, NULL); - return exposureMode == GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL; - } else { - return false; - } -} - -void CameraBinLocks::lockExposure(QCamera::LockChangeReason reason) -{ - GstElement *source = m_session->cameraSource(); - if (!source) - return; - - m_pendingLocks &= ~QCamera::LockExposure; - g_object_set( - G_OBJECT(source), - "exposure-mode", - GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL, - NULL); - emit lockStatusChanged(QCamera::LockExposure, QCamera::Locked, reason); -} - -void CameraBinLocks::unlockExposure(QCamera::LockStatus status, QCamera::LockChangeReason reason) -{ - GstElement *source = m_session->cameraSource(); - if (!source) - return; - - g_object_set( - G_OBJECT(source), - "exposure-mode", - GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO, - NULL); - emit lockStatusChanged(QCamera::LockExposure, status, reason); -} - -bool CameraBinLocks::isWhiteBalanceLocked() const -{ - if (GstPhotography *photography = m_session->photography()) { - GstPhotographyWhiteBalanceMode whiteBalanceMode; - return gst_photography_get_white_balance_mode(photography, &whiteBalanceMode) - && whiteBalanceMode == GST_PHOTOGRAPHY_WB_MODE_MANUAL; - } else { - return false; - } -} - -void CameraBinLocks::lockWhiteBalance(QCamera::LockChangeReason reason) -{ - m_pendingLocks &= ~QCamera::LockWhiteBalance; - m_session->imageProcessingControl()->lockWhiteBalance(); - emit lockStatusChanged(QCamera::LockWhiteBalance, QCamera::Locked, reason); -} - -void CameraBinLocks::unlockWhiteBalance( - QCamera::LockStatus status, QCamera::LockChangeReason reason) -{ - m_session->imageProcessingControl()->lockWhiteBalance(); - emit lockStatusChanged(QCamera::LockWhiteBalance, status, reason); -} - -QT_END_NAMESPACE diff --git a/src/plugins/gstreamer/camerabin/camerabinlocks.h b/src/plugins/gstreamer/camerabin/camerabinlocks.h deleted file mode 100644 index dcc960e8e..000000000 --- a/src/plugins/gstreamer/camerabin/camerabinlocks.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CAMERABINLOCKSCONTROL_H -#define CAMERABINLOCKSCONTROL_H - -#include -#include - -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -class CameraBinSession; -class CameraBinFocus; - -class CameraBinLocks : public QCameraLocksControl -{ - Q_OBJECT - -public: - CameraBinLocks(CameraBinSession *session); - virtual ~CameraBinLocks(); - - QCamera::LockTypes supportedLocks() const override; - - QCamera::LockStatus lockStatus(QCamera::LockType lock) const override; - - void searchAndLock(QCamera::LockTypes locks) override; - void unlock(QCamera::LockTypes locks) override; - -protected: - void timerEvent(QTimerEvent *event) override; - -private slots: - void updateFocusStatus(QCamera::LockStatus status, QCamera::LockChangeReason reason); - -private: - bool isExposureLocked() const; - void lockExposure(QCamera::LockChangeReason reason); - void unlockExposure(QCamera::LockStatus status, QCamera::LockChangeReason reason); - - bool isWhiteBalanceLocked() const; - void lockWhiteBalance(QCamera::LockChangeReason reason); - void unlockWhiteBalance(QCamera::LockStatus status, QCamera::LockChangeReason reason); - - CameraBinSession *m_session; - CameraBinFocus *m_focus; - QBasicTimer m_lockTimer; - QCamera::LockTypes m_pendingLocks; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.cpp b/src/plugins/gstreamer/camerabin/camerabinservice.cpp index fde52d2ad..6c643cb6f 100644 --- a/src/plugins/gstreamer/camerabin/camerabinservice.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinservice.cpp @@ -51,7 +51,6 @@ #if QT_CONFIG(gstreamer_photography) #include "camerabinexposure.h" #include "camerabinfocus.h" -#include "camerabinlocks.h" #endif #include "camerabinimagecapture.h" @@ -203,9 +202,6 @@ QMediaControl *CameraBinService::requestControl(const char *name) if (qstrcmp(name, QCameraFocusControl_iid) == 0) return m_captureSession->cameraFocusControl(); - - if (qstrcmp(name, QCameraLocksControl_iid) == 0) - return m_captureSession->cameraLocksControl(); #endif if (qstrcmp(name, QCameraImageProcessingControl_iid) == 0) diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp index df26afbdd..39a552ae8 100644 --- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp @@ -49,7 +49,6 @@ #if QT_CONFIG(gstreamer_photography) #include "camerabinexposure.h" #include "camerabinfocus.h" -#include "camerabinlocks.h" #endif #include "camerabinimageprocessing.h" @@ -131,7 +130,6 @@ CameraBinSession::CameraBinSession(GstElementFactory *sourceFactory, QObject *pa #if QT_CONFIG(gstreamer_photography) m_cameraExposureControl(0), m_cameraFocusControl(0), - m_cameraLocksControl(0), #endif m_cameraSrc(0), m_videoSrc(0), @@ -240,13 +238,6 @@ CameraBinFocus *CameraBinSession::cameraFocusControl() m_cameraFocusControl = new CameraBinFocus(this); return m_cameraFocusControl; } - -CameraBinLocks *CameraBinSession::cameraLocksControl() -{ - if (!m_cameraLocksControl && photography()) - m_cameraLocksControl = new CameraBinLocks(this); - return m_cameraLocksControl; -} #endif bool CameraBinSession::setupCameraBin() diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.h b/src/plugins/gstreamer/camerabin/camerabinsession.h index 39f71c7e9..5c528a1e2 100644 --- a/src/plugins/gstreamer/camerabin/camerabinsession.h +++ b/src/plugins/gstreamer/camerabin/camerabinsession.h @@ -121,7 +121,6 @@ public: #if QT_CONFIG(gstreamer_photography) CameraBinExposure *cameraExposureControl(); CameraBinFocus *cameraFocusControl(); - CameraBinLocks *cameraLocksControl(); #endif CameraBinImageProcessing *imageProcessingControl() const { return m_imageProcessingControl; } @@ -238,7 +237,6 @@ private: #if QT_CONFIG(gstreamer_photography) CameraBinExposure *m_cameraExposureControl; CameraBinFocus *m_cameraFocusControl; - CameraBinLocks *m_cameraLocksControl; #endif CameraBinImageProcessing *m_imageProcessingControl; CameraBinCaptureBufferFormat *m_captureBufferFormatControl; -- cgit v1.2.3