diff options
Diffstat (limited to 'src/multimediakit')
-rw-r--r-- | src/multimediakit/qcameraimagecapture.cpp | 13 | ||||
-rw-r--r-- | src/multimediakit/qcameraimagecapture.h | 1 | ||||
-rw-r--r-- | src/multimediakit/qcameraimageprocessing.cpp | 1 | ||||
-rw-r--r-- | src/multimediakit/qcameraimageprocessing.h | 5 | ||||
-rw-r--r-- | src/multimediakit/qmediarecorder.cpp | 7 |
5 files changed, 22 insertions, 5 deletions
diff --git a/src/multimediakit/qcameraimagecapture.cpp b/src/multimediakit/qcameraimagecapture.cpp index 145eb0991..541b7db78 100644 --- a/src/multimediakit/qcameraimagecapture.cpp +++ b/src/multimediakit/qcameraimagecapture.cpp @@ -109,6 +109,7 @@ public: void _q_error(int id, int error, const QString &errorString); void _q_readyChanged(bool); + void _q_serviceDestroyed(); void unsetError() { error = QCameraImageCapture::NoError; errorString.clear(); } @@ -141,6 +142,14 @@ void QCameraImageCapturePrivate::_q_readyChanged(bool ready) emit q->readyForCaptureChanged(ready); } +void QCameraImageCapturePrivate::_q_serviceDestroyed() +{ + mediaObject = 0; + control = 0; + encoderControl = 0; + captureDestinationControl = 0; + bufferFormatControl = 0; +} /*! Constructs a media recorder which records the media produced by \a mediaObject. @@ -225,6 +234,8 @@ bool QCameraImageCapture::setMediaObject(QMediaObject *mediaObject) service->releaseControl(d->captureDestinationControl); if (d->bufferFormatControl) service->releaseControl(d->bufferFormatControl); + + disconnect(service, SIGNAL(destroyed()), this, SLOT(_q_serviceDestroyed())); } } @@ -269,6 +280,8 @@ bool QCameraImageCapture::setMediaObject(QMediaObject *mediaObject) this, SIGNAL(bufferFormatChanged(QVideoFrame::PixelFormat))); } + connect(service, SIGNAL(destroyed()), this, SLOT(_q_serviceDestroyed())); + return true; } } diff --git a/src/multimediakit/qcameraimagecapture.h b/src/multimediakit/qcameraimagecapture.h index 0b4601ef1..0e33f37fb 100644 --- a/src/multimediakit/qcameraimagecapture.h +++ b/src/multimediakit/qcameraimagecapture.h @@ -145,6 +145,7 @@ private: Q_DECLARE_PRIVATE(QCameraImageCapture) Q_PRIVATE_SLOT(d_func(), void _q_error(int, int, const QString &)) Q_PRIVATE_SLOT(d_func(), void _q_readyChanged(bool)) + Q_PRIVATE_SLOT(d_func(), void _q_serviceDestroyed()) }; Q_DECLARE_OPERATORS_FOR_FLAGS(QCameraImageCapture::CaptureDestinations) diff --git a/src/multimediakit/qcameraimageprocessing.cpp b/src/multimediakit/qcameraimageprocessing.cpp index 6ed9bb402..79419a52b 100644 --- a/src/multimediakit/qcameraimageprocessing.cpp +++ b/src/multimediakit/qcameraimageprocessing.cpp @@ -343,7 +343,6 @@ void QCameraImageProcessing::setDenoisingLevel(int level) \value WhiteBalanceShade Shade white balance mode. \value WhiteBalanceTungsten Tungsten white balance mode. \value WhiteBalanceFluorescent Fluorescent white balance mode. - \value WhiteBalanceIncandescent Incandescent white balance mode. \value WhiteBalanceFlash Flash white balance mode. \value WhiteBalanceSunset Sunset white balance mode. \value WhiteBalanceVendor Vendor defined white balance mode. diff --git a/src/multimediakit/qcameraimageprocessing.h b/src/multimediakit/qcameraimageprocessing.h index 9ed23d175..aba38a3dc 100644 --- a/src/multimediakit/qcameraimageprocessing.h +++ b/src/multimediakit/qcameraimageprocessing.h @@ -71,9 +71,8 @@ public: WhiteBalanceShade = 4, WhiteBalanceTungsten = 5, WhiteBalanceFluorescent = 6, - WhiteBalanceIncandescent = 7, - WhiteBalanceFlash = 8, - WhiteBalanceSunset = 9, + WhiteBalanceFlash = 7, + WhiteBalanceSunset = 8, WhiteBalanceVendor = 1000 }; diff --git a/src/multimediakit/qmediarecorder.cpp b/src/multimediakit/qmediarecorder.cpp index 1c08e28a5..2584359ef 100644 --- a/src/multimediakit/qmediarecorder.cpp +++ b/src/multimediakit/qmediarecorder.cpp @@ -168,7 +168,12 @@ void QMediaRecorderPrivate::_q_error(int error, const QString &errorString) void QMediaRecorderPrivate::_q_serviceDestroyed() { - q_func()->setMediaObject(0); + mediaObject = 0; + control = 0; + formatControl = 0; + audioControl = 0; + videoControl = 0; + metaDataControl = 0; } void QMediaRecorderPrivate::_q_notify() |