diff options
author | Andrew den Exter <andrew.den.exter@jollamobile.com> | 2013-12-10 17:50:01 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-13 06:05:52 +0100 |
commit | 61001f8dd5a1b2d128259b518f74d46cf9f69173 (patch) | |
tree | f0c37887650fe37b0ecccad981c05fd4af9bc43a /src/imports/multimedia | |
parent | 2ec3645b729d4a9ccc3b4bfbf4d64c6def69b68f (diff) | |
download | qtmultimedia-61001f8dd5a1b2d128259b518f74d46cf9f69173.tar.gz |
Fix recording settings being discarded by the Camera QML type.
Query existing settings from the recorder instead of locally cached
settings as some other agent may have applied some settings separately
and those would otherwise be discarded.
Change-Id: I0ebeaf06c6f7306c5987aa269032842b538a6a8b
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src/imports/multimedia')
-rw-r--r-- | src/imports/multimedia/qdeclarativecameracapture.cpp | 1 | ||||
-rw-r--r-- | src/imports/multimedia/qdeclarativecamerarecorder.cpp | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/imports/multimedia/qdeclarativecameracapture.cpp b/src/imports/multimedia/qdeclarativecameracapture.cpp index b93ab456e..d5f363431 100644 --- a/src/imports/multimedia/qdeclarativecameracapture.cpp +++ b/src/imports/multimedia/qdeclarativecameracapture.cpp @@ -267,6 +267,7 @@ QSize QDeclarativeCameraCapture::resolution() void QDeclarativeCameraCapture::setResolution(const QSize &captureResolution) { + m_imageSettings = m_capture->encodingSettings(); if (captureResolution != resolution()) { m_imageSettings.setResolution(captureResolution); m_capture->setEncodingSettings(m_imageSettings); diff --git a/src/imports/multimedia/qdeclarativecamerarecorder.cpp b/src/imports/multimedia/qdeclarativecamerarecorder.cpp index 9e11731c4..0f4004677 100644 --- a/src/imports/multimedia/qdeclarativecamerarecorder.cpp +++ b/src/imports/multimedia/qdeclarativecamerarecorder.cpp @@ -145,6 +145,7 @@ QString QDeclarativeCameraRecorder::mediaContainer() const void QDeclarativeCameraRecorder::setCaptureResolution(const QSize &resolution) { + m_videoSettings = m_recorder->videoSettings(); if (resolution != captureResolution()) { m_videoSettings.setResolution(resolution); m_recorder->setVideoSettings(m_videoSettings); @@ -154,6 +155,7 @@ void QDeclarativeCameraRecorder::setCaptureResolution(const QSize &resolution) void QDeclarativeCameraRecorder::setAudioCodec(const QString &codec) { + m_audioSettings = m_recorder->audioSettings(); if (codec != audioCodec()) { m_audioSettings.setCodec(codec); m_recorder->setAudioSettings(m_audioSettings); @@ -163,6 +165,7 @@ void QDeclarativeCameraRecorder::setAudioCodec(const QString &codec) void QDeclarativeCameraRecorder::setVideoCodec(const QString &codec) { + m_videoSettings = m_recorder->videoSettings(); if (codec != videoCodec()) { m_videoSettings.setCodec(codec); m_recorder->setVideoSettings(m_videoSettings); @@ -281,6 +284,7 @@ QDeclarativeCameraRecorder::EncodingMode QDeclarativeCameraRecorder::audioEncodi void QDeclarativeCameraRecorder::setFrameRate(qreal frameRate) { + m_videoSettings = m_recorder->videoSettings(); if (!qFuzzyCompare(m_videoSettings.frameRate(),frameRate)) { m_videoSettings.setFrameRate(frameRate); m_recorder->setVideoSettings(m_videoSettings); @@ -290,6 +294,7 @@ void QDeclarativeCameraRecorder::setFrameRate(qreal frameRate) void QDeclarativeCameraRecorder::setVideoBitRate(int rate) { + m_videoSettings = m_recorder->videoSettings(); if (m_videoSettings.bitRate() != rate) { m_videoSettings.setBitRate(rate); m_recorder->setVideoSettings(m_videoSettings); @@ -299,6 +304,7 @@ void QDeclarativeCameraRecorder::setVideoBitRate(int rate) void QDeclarativeCameraRecorder::setAudioBitRate(int rate) { + m_audioSettings = m_recorder->audioSettings(); if (m_audioSettings.bitRate() != rate) { m_audioSettings.setBitRate(rate); m_recorder->setAudioSettings(m_audioSettings); @@ -308,6 +314,7 @@ void QDeclarativeCameraRecorder::setAudioBitRate(int rate) void QDeclarativeCameraRecorder::setAudioChannels(int channels) { + m_audioSettings = m_recorder->audioSettings(); if (m_audioSettings.channelCount() != channels) { m_audioSettings.setChannelCount(channels); m_recorder->setAudioSettings(m_audioSettings); @@ -317,6 +324,7 @@ void QDeclarativeCameraRecorder::setAudioChannels(int channels) void QDeclarativeCameraRecorder::setAudioSampleRate(int rate) { + m_audioSettings = m_recorder->audioSettings(); if (m_audioSettings.sampleRate() != rate) { m_audioSettings.setSampleRate(rate); m_recorder->setAudioSettings(m_audioSettings); @@ -326,6 +334,7 @@ void QDeclarativeCameraRecorder::setAudioSampleRate(int rate) void QDeclarativeCameraRecorder::setAudioEncodingMode(QDeclarativeCameraRecorder::EncodingMode encodingMode) { + m_audioSettings = m_recorder->audioSettings(); if (m_audioSettings.encodingMode() != QMultimedia::EncodingMode(encodingMode)) { m_audioSettings.setEncodingMode(QMultimedia::EncodingMode(encodingMode)); m_recorder->setAudioSettings(m_audioSettings); @@ -335,6 +344,7 @@ void QDeclarativeCameraRecorder::setAudioEncodingMode(QDeclarativeCameraRecorder void QDeclarativeCameraRecorder::setVideoEncodingMode(QDeclarativeCameraRecorder::EncodingMode encodingMode) { + m_videoSettings = m_recorder->videoSettings(); if (m_videoSettings.encodingMode() != QMultimedia::EncodingMode(encodingMode)) { m_videoSettings.setEncodingMode(QMultimedia::EncodingMode(encodingMode)); m_recorder->setVideoSettings(m_videoSettings); |