summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/android/src/mediacapture/qandroidcapturesession.cpp6
-rw-r--r--src/plugins/audiocapture/audioencodercontrol.cpp4
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinsession.cpp6
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp6
-rw-r--r--src/plugins/winrt/qwinrtcameracontrol.cpp7
5 files changed, 19 insertions, 10 deletions
diff --git a/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp b/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp
index a5aff51cd..bdc7ed403 100644
--- a/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp
+++ b/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp
@@ -46,6 +46,8 @@
#include "qandroidvideooutput.h"
#include "qandroidglobal.h"
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
QAndroidCaptureSession::QAndroidCaptureSession(QAndroidCameraSession *cameraSession)
@@ -495,8 +497,8 @@ void QAndroidCaptureSession::onCameraOpened()
}
}
- qSort(m_supportedResolutions.begin(), m_supportedResolutions.end(), qt_sizeLessThan);
- qSort(m_supportedFramerates.begin(), m_supportedFramerates.end());
+ std::sort(m_supportedResolutions.begin(), m_supportedResolutions.end(), qt_sizeLessThan);
+ std::sort(m_supportedFramerates.begin(), m_supportedFramerates.end());
applySettings();
}
diff --git a/src/plugins/audiocapture/audioencodercontrol.cpp b/src/plugins/audiocapture/audioencodercontrol.cpp
index f4c560e0e..d8a83bf26 100644
--- a/src/plugins/audiocapture/audioencodercontrol.cpp
+++ b/src/plugins/audiocapture/audioencodercontrol.cpp
@@ -44,6 +44,8 @@
#include <QtCore/qdebug.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
static QAudioFormat audioSettingsToAudioFormat(const QAudioEncoderSettings &settings)
@@ -167,7 +169,7 @@ void AudioEncoderControl::update()
m_sampleRates.append(rate);
}
}
- qSort(m_sampleRates);
+ std::sort(m_sampleRates.begin(), m_sampleRates.end());
}
QT_END_NAMESPACE
diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp
index 823cfe408..39f97e989 100644
--- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp
@@ -80,6 +80,8 @@
#include <QtGui/qimage.h>
#include <QtCore/qdatetime.h>
+#include <algorithm>
+
//#define CAMERABIN_DEBUG 1
//#define CAMERABIN_DEBUG_DUMP_BIN 1
#define ENUM_NAME(c,e,v) (c::staticMetaObject.enumerator(c::staticMetaObject.indexOfEnumerator(e)).valueToKey((v)))
@@ -1257,7 +1259,7 @@ QList< QPair<int,int> > CameraBinSession::supportedFrameRates(const QSize &frame
readValue(rateValue, &res, continuous);
}
- qSort(res.begin(), res.end(), rateLessThan);
+ std::sort(res.begin(), res.end(), rateLessThan);
#if CAMERABIN_DEBUG
qDebug() << "Supported rates:" << caps;
@@ -1384,7 +1386,7 @@ QList<QSize> CameraBinSession::supportedResolutions(QPair<int,int> rate,
}
- qSort(res.begin(), res.end(), resolutionLessThan);
+ std::sort(res.begin(), res.end(), resolutionLessThan);
//if the range is continuos, populate is with the common rates
if (isContinuous && res.size() >= 2) {
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp
index 9139f1fe2..ef0832f7e 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp
@@ -45,6 +45,8 @@
#include <private/qcore_unix_p.h>
#include <linux/videodev2.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
static inline uint qHash(const QSize& key) { return uint(key.width()*256+key.height()); }
@@ -252,10 +254,10 @@ void QGstreamerV4L2Input::updateSupportedResolutions(const QByteArray &device)
m_frameRates.append(rate/1000.0);
}
- qSort(m_frameRates);
+ std::sort(m_frameRates.begin(), m_frameRates.end());
m_resolutions = allResolutions.toList();
- qSort(m_resolutions);
+ std::sort(m_resolutions.begin(), m_resolutions.end());
//qDebug() << "frame rates:" << m_frameRates;
//qDebug() << "resolutions:" << m_resolutions;
diff --git a/src/plugins/winrt/qwinrtcameracontrol.cpp b/src/plugins/winrt/qwinrtcameracontrol.cpp
index 4c515bc3d..0086e92e9 100644
--- a/src/plugins/winrt/qwinrtcameracontrol.cpp
+++ b/src/plugins/winrt/qwinrtcameracontrol.cpp
@@ -62,6 +62,8 @@
#include <windows.storage.streams.h>
#include <windows.media.devices.h>
+#include <algorithm>
+
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
using namespace ABI::Windows::Devices::Enumeration;
@@ -1416,9 +1418,8 @@ HRESULT QWinRTCameraControl::onInitializationCompleted(IAsyncAction *, AsyncStat
if (qAbs(aspectRatio - captureAspectRatio) <= ASPECTRATIO_EPSILON)
filtered.append(resolution);
}
- qSort(filtered.begin(),
- filtered.end(),
- [](QSize size1, QSize size2) { return size1.width() * size1.height() < size2.width() * size2.height(); });
+ std::sort(filtered.begin(), filtered.end(),
+ [](QSize size1, QSize size2) { return size1.width() * size1.height() < size2.width() * size2.height(); });
const QSize &viewfinderResolution = filtered.first();
const quint32 viewfinderResolutionIndex = previewResolutions.indexOf(viewfinderResolution);