Merge branch 'camera' of git://scm.dev.nokia.troll.no/qt/qtmultimediakit
Change-Id: Iec6f96e3713257d25f7b1e06c6da9c153b23800b
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -71,9 +71,8 @@ public:
|
||||
WhiteBalanceShade = 4,
|
||||
WhiteBalanceTungsten = 5,
|
||||
WhiteBalanceFluorescent = 6,
|
||||
WhiteBalanceIncandescent = 7,
|
||||
WhiteBalanceFlash = 8,
|
||||
WhiteBalanceSunset = 9,
|
||||
WhiteBalanceFlash = 7,
|
||||
WhiteBalanceSunset = 8,
|
||||
WhiteBalanceVendor = 1000
|
||||
};
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user