summaryrefslogtreecommitdiffstats
path: root/examples/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia')
-rw-r--r--examples/multimedia/audiorecorder/audiorecorder.cpp18
-rw-r--r--examples/multimedia/spectrum/app/engine.h2
-rw-r--r--examples/multimedia/spectrum/app/frequencyspectrum.h9
-rw-r--r--examples/multimedia/spectrum/app/spectrograph.cpp2
-rw-r--r--examples/multimedia/spectrum/app/spectrograph.h2
-rw-r--r--examples/multimedia/spectrum/app/spectrumanalyser.h8
-rw-r--r--examples/multimedia/spectrum/app/waveform.cpp2
-rw-r--r--examples/multimedia/spectrum/app/waveform.h4
-rw-r--r--examples/multimedia/video/qmlvideofilter_opencl/main.cpp2
9 files changed, 24 insertions, 25 deletions
diff --git a/examples/multimedia/audiorecorder/audiorecorder.cpp b/examples/multimedia/audiorecorder/audiorecorder.cpp
index 9dd3368e0..4eecae835 100644
--- a/examples/multimedia/audiorecorder/audiorecorder.cpp
+++ b/examples/multimedia/audiorecorder/audiorecorder.cpp
@@ -61,10 +61,10 @@
#include <QStandardPaths>
static qreal getPeakValue(const QAudioFormat &format);
-static QVector<qreal> getBufferLevels(const QAudioBuffer &buffer);
+static QList<qreal> getBufferLevels(const QAudioBuffer &buffer);
-template <class T>
-static QVector<qreal> getBufferLevels(const T *buffer, int frames, int channels);
+template<class T>
+static QList<qreal> getBufferLevels(const T *buffer, int frames, int channels);
AudioRecorder::AudioRecorder()
: ui(new Ui::AudioRecorder)
@@ -287,9 +287,9 @@ qreal getPeakValue(const QAudioFormat& format)
}
// returns the audio level for each channel
-QVector<qreal> getBufferLevels(const QAudioBuffer& buffer)
+QList<qreal> getBufferLevels(const QAudioBuffer &buffer)
{
- QVector<qreal> values;
+ QList<qreal> values;
if (!buffer.format().isValid() || buffer.format().byteOrder() != QAudioFormat::LittleEndian)
return values;
@@ -337,10 +337,10 @@ QVector<qreal> getBufferLevels(const QAudioBuffer& buffer)
return values;
}
-template <class T>
-QVector<qreal> getBufferLevels(const T *buffer, int frames, int channels)
+template<class T>
+QList<qreal> getBufferLevels(const T *buffer, int frames, int channels)
{
- QVector<qreal> max_values;
+ QList<qreal> max_values;
max_values.fill(0, channels);
for (int i = 0; i < frames; ++i) {
@@ -366,7 +366,7 @@ void AudioRecorder::processBuffer(const QAudioBuffer& buffer)
}
}
- QVector<qreal> levels = getBufferLevels(buffer);
+ QList<qreal> levels = getBufferLevels(buffer);
for (int i = 0; i < levels.count(); ++i)
m_audioLevels.at(i)->setLevel(levels.at(i));
}
diff --git a/examples/multimedia/spectrum/app/engine.h b/examples/multimedia/spectrum/app/engine.h
index ff56d7c8b..714af4d9d 100644
--- a/examples/multimedia/spectrum/app/engine.h
+++ b/examples/multimedia/spectrum/app/engine.h
@@ -60,8 +60,8 @@
#include <QBuffer>
#include <QByteArray>
#include <QDir>
+#include <QList>
#include <QObject>
-#include <QVector>
#ifdef DUMP_CAPTURED_AUDIO
#define DUMP_DATA
diff --git a/examples/multimedia/spectrum/app/frequencyspectrum.h b/examples/multimedia/spectrum/app/frequencyspectrum.h
index 82206de84..4b13cbb99 100644
--- a/examples/multimedia/spectrum/app/frequencyspectrum.h
+++ b/examples/multimedia/spectrum/app/frequencyspectrum.h
@@ -51,7 +51,7 @@
#ifndef FREQUENCYSPECTRUM_H
#define FREQUENCYSPECTRUM_H
-#include <QtCore/QVector>
+#include <QtCore/QList>
/**
* Represents a frequency spectrum as a series of elements, each of which
@@ -87,8 +87,8 @@ public:
bool clipped;
};
- typedef QVector<Element>::iterator iterator;
- typedef QVector<Element>::const_iterator const_iterator;
+ typedef QList<Element>::iterator iterator;
+ typedef QList<Element>::const_iterator const_iterator;
void reset();
@@ -101,8 +101,7 @@ public:
const_iterator end() const;
private:
- QVector<Element> m_elements;
-
+ QList<Element> m_elements;
};
#endif // FREQUENCYSPECTRUM_H
diff --git a/examples/multimedia/spectrum/app/spectrograph.cpp b/examples/multimedia/spectrum/app/spectrograph.cpp
index 7a5305435..04ef51e80 100644
--- a/examples/multimedia/spectrum/app/spectrograph.cpp
+++ b/examples/multimedia/spectrum/app/spectrograph.cpp
@@ -125,7 +125,7 @@ void Spectrograph::paintEvent(QPaintEvent *event)
painter.drawLine(rect().bottomRight(), rect().bottomLeft());
painter.drawLine(rect().bottomLeft(), rect().topLeft());
- QVector<qreal> dashes;
+ QList<qreal> dashes;
dashes << 2 << 2;
gridPen.setDashPattern(dashes);
painter.setPen(gridPen);
diff --git a/examples/multimedia/spectrum/app/spectrograph.h b/examples/multimedia/spectrum/app/spectrograph.h
index 0ef6dadd2..0e7b11717 100644
--- a/examples/multimedia/spectrum/app/spectrograph.h
+++ b/examples/multimedia/spectrum/app/spectrograph.h
@@ -97,7 +97,7 @@ private:
bool clipped;
};
- QVector<Bar> m_bars;
+ QList<Bar> m_bars;
int m_barSelected;
int m_timerId;
qreal m_lowFreq;
diff --git a/examples/multimedia/spectrum/app/spectrumanalyser.h b/examples/multimedia/spectrum/app/spectrumanalyser.h
index ebebfcd9f..799143489 100644
--- a/examples/multimedia/spectrum/app/spectrumanalyser.h
+++ b/examples/multimedia/spectrum/app/spectrumanalyser.h
@@ -53,7 +53,7 @@
#include <QByteArray>
#include <QObject>
-#include <QVector>
+#include <QList>
#ifdef DUMP_SPECTRUMANALYSER
#include <QDir>
@@ -113,10 +113,10 @@ private:
#else
typedef FFTRealFixLenParam::DataType DataType;
#endif
- QVector<DataType> m_window;
+ QList<DataType> m_window;
- QVector<DataType> m_input;
- QVector<DataType> m_output;
+ QList<DataType> m_input;
+ QList<DataType> m_output;
FrequencySpectrum m_spectrum;
diff --git a/examples/multimedia/spectrum/app/waveform.cpp b/examples/multimedia/spectrum/app/waveform.cpp
index d0058b2e3..3e7462157 100644
--- a/examples/multimedia/spectrum/app/waveform.cpp
+++ b/examples/multimedia/spectrum/app/waveform.cpp
@@ -435,7 +435,7 @@ void Waveform::resetTiles(qint64 newStartPos)
{
WAVEFORM_DEBUG << "Waveform::resetTiles" << "newStartPos" << newStartPos;
- QVector<Tile>::iterator i = m_tiles.begin();
+ QList<Tile>::iterator i = m_tiles.begin();
for ( ; i != m_tiles.end(); ++i)
i->painted = false;
diff --git a/examples/multimedia/spectrum/app/waveform.h b/examples/multimedia/spectrum/app/waveform.h
index 194681fff..8c26e99b2 100644
--- a/examples/multimedia/spectrum/app/waveform.h
+++ b/examples/multimedia/spectrum/app/waveform.h
@@ -187,7 +187,7 @@ private:
bool m_active;
QSize m_pixmapSize;
- QVector<QPixmap*> m_pixmaps;
+ QList<QPixmap*> m_pixmaps;
struct Tile {
// Pointer into parent m_pixmaps array
@@ -197,7 +197,7 @@ private:
bool painted;
};
- QVector<Tile> m_tiles;
+ QList<Tile> m_tiles;
// Length of audio data in bytes depicted by each tile
qint64 m_tileLength;
diff --git a/examples/multimedia/video/qmlvideofilter_opencl/main.cpp b/examples/multimedia/video/qmlvideofilter_opencl/main.cpp
index cf2fcbd7b..255c0b61b 100644
--- a/examples/multimedia/video/qmlvideofilter_opencl/main.cpp
+++ b/examples/multimedia/video/qmlvideofilter_opencl/main.cpp
@@ -157,7 +157,7 @@ CLFilterRunnable::CLFilterRunnable(CLFilter *filter) :
qWarning("No OpenCL platform found");
return;
}
- QVector<cl_platform_id> platformIds;
+ QList<cl_platform_id> platformIds;
platformIds.resize(n);
if (clGetPlatformIDs(n, platformIds.data(), 0) != CL_SUCCESS) {
qWarning("Failed to get platform IDs");