summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/audio/audio.pri4
-rw-r--r--src/multimedia/audio/qaudiodevicefactory.cpp3
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.cpp34
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.h2
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp12
-rw-r--r--src/multimedia/audio/qaudioengine.cpp4
-rw-r--r--src/multimedia/audio/qaudioformat.cpp66
-rw-r--r--src/multimedia/audio/qaudioformat.h4
-rw-r--r--src/multimedia/audio/qaudioinput.cpp20
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp21
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.h5
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp15
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.h3
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp2
-rw-r--r--src/multimedia/audio/qaudiooutput_alsa_p.h5
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp4
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.h2
-rw-r--r--src/multimedia/multimedia.pro4
-rw-r--r--src/multimedia/video/qabstractvideobuffer.cpp5
-rw-r--r--src/multimedia/video/qabstractvideobuffer.h3
-rw-r--r--src/multimedia/video/qvideoframe.cpp1
21 files changed, 155 insertions, 64 deletions
diff --git a/src/multimedia/audio/audio.pri b/src/multimedia/audio/audio.pri
index ae28a26..7b2f9ad 100644
--- a/src/multimedia/audio/audio.pri
+++ b/src/multimedia/audio/audio.pri
@@ -42,8 +42,8 @@ mac {
wince*:LIBS += -lcoredll
} else:symbian {
- INCLUDEPATH += /epoc32/include/mmf/common
- INCLUDEPATH += /epoc32/include/mmf/server
+ INCLUDEPATH += $${EPOCROOT}epoc32/include/mmf/common
+ INCLUDEPATH += $${EPOCROOT}epoc32/include/mmf/server
HEADERS += $$PWD/qaudio_symbian_p.h \
$$PWD/qaudiodeviceinfo_symbian_p.h \
diff --git a/src/multimedia/audio/qaudiodevicefactory.cpp b/src/multimedia/audio/qaudiodevicefactory.cpp
index 523075c..736630e 100644
--- a/src/multimedia/audio/qaudiodevicefactory.cpp
+++ b/src/multimedia/audio/qaudiodevicefactory.cpp
@@ -73,7 +73,6 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QAudioEngineFactoryInterface_iid, QLatin1String("/audio"), Qt::CaseInsensitive))
#endif
-
class QNullDeviceInfo : public QAbstractAudioDeviceInfo
{
public:
@@ -167,6 +166,7 @@ QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioInput);
}
#endif
+
#ifndef QT_NO_AUDIO_BACKEND
#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN))
return QAudioDeviceInfo(QLatin1String("builtin"), QAudioDeviceInfoInternal::defaultInputDevice(), QAudio::AudioInput);
@@ -186,6 +186,7 @@ QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice()
return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioOutput);
}
#endif
+
#ifndef QT_NO_AUDIO_BACKEND
#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN))
return QAudioDeviceInfo(QLatin1String("builtin"), QAudioDeviceInfoInternal::defaultOutputDevice(), QAudio::AudioOutput);
diff --git a/src/multimedia/audio/qaudiodeviceinfo.cpp b/src/multimedia/audio/qaudiodeviceinfo.cpp
index ae65b02..201a03d 100644
--- a/src/multimedia/audio/qaudiodeviceinfo.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo.cpp
@@ -106,8 +106,8 @@ public:
The values supported by the the device for each of these
parameters can be fetched with
- supportedByteOrders(), supportedChannels(), supportedCodecs(),
- supportedFrequencies(), supportedSampleSizes(), and
+ supportedByteOrders(), supportedChannelCounts(), supportedCodecs(),
+ supportedSampleRates(), supportedSampleSizes(), and
supportedSampleTypes(). The combinations supported are dependent on the platform,
audio plugins installed and the audio device capabilities. If you need a specific format, you can check if
the device supports it with isFormatSupported(), or fetch a
@@ -319,7 +319,20 @@ QStringList QAudioDeviceInfo::supportedCodecs() const
}
/*!
- Returns a list of supported frequencies.
+ Returns a list of supported sample rates.
+
+ \since 4.7
+*/
+
+QList<int> QAudioDeviceInfo::supportedSampleRates() const
+{
+ return supportedFrequencies();
+}
+
+/*!
+ \obsolete
+
+ Use supportedSampleRates() instead.
*/
QList<int> QAudioDeviceInfo::supportedFrequencies() const
@@ -328,7 +341,20 @@ QList<int> QAudioDeviceInfo::supportedFrequencies() const
}
/*!
- Returns a list of supported channels.
+ Returns a list of supported channel counts.
+
+ \since 4.7
+*/
+
+QList<int> QAudioDeviceInfo::supportedChannelCounts() const
+{
+ return supportedChannels();
+}
+
+/*!
+ \obsolete
+
+ Use supportedChannelCount() instead.
*/
QList<int> QAudioDeviceInfo::supportedChannels() const
diff --git a/src/multimedia/audio/qaudiodeviceinfo.h b/src/multimedia/audio/qaudiodeviceinfo.h
index 62dc8a2..1cc0731 100644
--- a/src/multimedia/audio/qaudiodeviceinfo.h
+++ b/src/multimedia/audio/qaudiodeviceinfo.h
@@ -84,7 +84,9 @@ public:
QStringList supportedCodecs() const;
QList<int> supportedFrequencies() const;
+ QList<int> supportedSampleRates() const;
QList<int> supportedChannels() const;
+ QList<int> supportedChannelCounts() const;
QList<int> supportedSampleSizes() const;
QList<QAudioFormat::Endian> supportedByteOrders() const;
QList<QAudioFormat::SampleType> supportedSampleTypes() const;
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index a4b28d4..4ff6a21 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -97,14 +97,14 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const
QAudioFormat nearest;
if(mode == QAudio::AudioOutput) {
nearest.setFrequency(44100);
- nearest.setChannels(2);
+ nearest.setChannelCount(2);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(16);
nearest.setCodec(QLatin1String("audio/pcm"));
} else {
nearest.setFrequency(11025);
- nearest.setChannels(1);
+ nearest.setChannelCount(1);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(8);
@@ -277,7 +277,7 @@ void QAudioDeviceInfoInternal::updateLists()
for(i=0;i<iNumDevs;i++) {
if(waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS))
== MMSYSERR_NOERROR) {
- tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
+ tmp = QString((const QChar *)woc.szPname);
if(tmp.compare(device) == 0) {
match = true;
fmt = woc.dwFormats;
@@ -297,7 +297,7 @@ void QAudioDeviceInfoInternal::updateLists()
for(i=0;i<iNumDevs;i++) {
if(waveInGetDevCaps(i, &woc, sizeof(WAVEINCAPS))
== MMSYSERR_NOERROR) {
- tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
+ tmp = QString((const QChar *)woc.szPname);
if(tmp.compare(device) == 0) {
match = true;
fmt = woc.dwFormats;
@@ -413,7 +413,7 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode)
for(i=0;i<iNumDevs;i++) {
if(waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS))
== MMSYSERR_NOERROR) {
- devices.append(QString::fromUtf16((const unsigned short*)woc.szPname).toLocal8Bit().constData());
+ devices.append(QString((const QChar *)woc.szPname).toLocal8Bit().constData());
}
}
} else {
@@ -423,7 +423,7 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode)
for(i=0;i<iNumDevs;i++) {
if(waveInGetDevCaps(i, &woc, sizeof(WAVEINCAPS))
== MMSYSERR_NOERROR) {
- devices.append(QString::fromUtf16((const unsigned short*)woc.szPname).toLocal8Bit().constData());
+ devices.append(QString((const QChar *)woc.szPname).toLocal8Bit().constData());
}
}
diff --git a/src/multimedia/audio/qaudioengine.cpp b/src/multimedia/audio/qaudioengine.cpp
index 7f1f5d3..c379aff 100644
--- a/src/multimedia/audio/qaudioengine.cpp
+++ b/src/multimedia/audio/qaudioengine.cpp
@@ -133,7 +133,7 @@ QT_BEGIN_NAMESPACE
Uses the \a device as the QIODevice to transfer data. If \a device is null then the class
creates an internal QIODevice. Returns a pointer to the QIODevice being used to handle
the data transfer. This QIODevice can be used to write() audio data directly. Passing a
- QIODevice allows the data to be transfered without any extra code.
+ QIODevice allows the data to be transferred without any extra code.
*/
/*!
@@ -247,7 +247,7 @@ QT_BEGIN_NAMESPACE
Uses the \a device as the QIODevice to transfer data. If \a device is null
then the class creates an internal QIODevice. Returns a pointer to the
QIODevice being used to handle the data transfer. This QIODevice can be used to
- read() audio data directly. Passing a QIODevice allows the data to be transfered
+ read() audio data directly. Passing a QIODevice allows the data to be transferred
without any extra code.
*/
diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index 89ae0ff..86d72f6 100644
--- a/src/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
@@ -111,7 +111,7 @@ public:
\o Parameter
\o Description
\row
- \o Frequency
+ \o Sample Rate
\o Samples per second of audio data in Hertz.
\row
\o Number of channels
@@ -143,8 +143,8 @@ public:
Values are initialized as follows:
\list
- \o frequency() = -1
- \o channels() = -1
+ \o sampleRate() = -1
+ \o channelCount() = -1
\o sampleSize() = -1
\o byteOrder() = QAudioFormat::Endian(QSysInfo::ByteOrder)
\o sampleType() = QAudioFormat::Unknown
@@ -224,7 +224,20 @@ bool QAudioFormat::isValid() const
}
/*!
- Sets the frequency to \a frequency.
+ Sets the sample rate to \a samplerate Hertz.
+
+ \since 4.7
+*/
+
+void QAudioFormat::setSampleRate(int samplerate)
+{
+ d->frequency = samplerate;
+}
+
+/*!
+ \obsolete
+
+ Use setSampleRate() instead.
*/
void QAudioFormat::setFrequency(int frequency)
@@ -233,7 +246,20 @@ void QAudioFormat::setFrequency(int frequency)
}
/*!
- Returns the current frequency value.
+ Returns the current sample rate in Hertz.
+
+ \since 4.7
+*/
+
+int QAudioFormat::sampleRate() const
+{
+ return d->frequency;
+}
+
+/*!
+ \obsolete
+
+ Use sampleRate() instead.
*/
int QAudioFormat::frequency() const
@@ -242,7 +268,20 @@ int QAudioFormat::frequency() const
}
/*!
- Sets the channels to \a channels.
+ Sets the channel count to \a channels.
+
+ \since 4.7
+*/
+
+void QAudioFormat::setChannelCount(int channels)
+{
+ d->channels = channels;
+}
+
+/*!
+ \obsolete
+
+ Use setChannelCount() instead.
*/
void QAudioFormat::setChannels(int channels)
@@ -251,7 +290,20 @@ void QAudioFormat::setChannels(int channels)
}
/*!
- Returns the current channel value.
+ Returns the current channel count value.
+
+ \since 4.7
+*/
+
+int QAudioFormat::channelCount() const
+{
+ return d->channels;
+}
+
+/*!
+ \obsolete
+
+ Use channelCount() instead.
*/
int QAudioFormat::channels() const
diff --git a/src/multimedia/audio/qaudioformat.h b/src/multimedia/audio/qaudioformat.h
index cb58d1c..6c835b7 100644
--- a/src/multimedia/audio/qaudioformat.h
+++ b/src/multimedia/audio/qaudioformat.h
@@ -75,9 +75,13 @@ public:
void setFrequency(int frequency);
int frequency() const;
+ void setSampleRate(int sampleRate);
+ int sampleRate() const;
void setChannels(int channels);
int channels() const;
+ void setChannelCount(int channelCount);
+ int channelCount() const;
void setSampleSize(int sampleSize);
int sampleSize() const;
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index 6ea7ff3..6660c3f 100644
--- a/src/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
@@ -201,7 +201,7 @@ QAudioInput::~QAudioInput()
/*!
Uses the \a device as the QIODevice to transfer data.
- Passing a QIODevice allows the data to be transfered without any extra code.
+ Passing a QIODevice allows the data to be transferred without any extra code.
All that is required is to open the QIODevice.
If able to successfully get audio data from the systems audio device the
@@ -211,11 +211,7 @@ QAudioInput::~QAudioInput()
If a problem occurs during this process the error() is set to QAudio::OpenError,
state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
- In either case, the stateChanged() signal may be emitted either synchronously
- during execution of the start() function or asynchronously after start() has
- returned to the caller.
-
- \sa {Symbian Platform Security Requirements}
+ \l{QAudioInput#Symbian Platform Security Requirements}
\sa QIODevice
*/
@@ -237,11 +233,7 @@ void QAudioInput::start(QIODevice* device)
If a problem occurs during this process the error() is set to QAudio::OpenError,
state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
- In either case, the stateChanged() signal may be emitted either synchronously
- during execution of the start() function or asynchronously after start() has
- returned to the caller.
-
- \sa {Symbian Platform Security Requirements}
+ \l{QAudioInput#Symbian Platform Security Requirements}
\sa QIODevice
*/
@@ -286,8 +278,6 @@ void QAudioInput::reset()
Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and
emit stateChanged() signal.
-
- Note: signal will always be emitted during execution of the resume() function.
*/
void QAudioInput::suspend()
@@ -310,7 +300,7 @@ void QAudioInput::resume()
}
/*!
- Sets the audio buffer size to \a value bytes.
+ Sets the audio buffer size to \a value milliseconds.
Note: This function can be called anytime before start(), calls to this
are ignored after start(). It should not be assumed that the buffer size
@@ -325,7 +315,7 @@ void QAudioInput::setBufferSize(int value)
}
/*!
- Returns the audio buffer size in bytes.
+ Returns the audio buffer size in milliseconds.
If called before start(), returns platform default value.
If called before start() but setBufferSize() was called prior, returns value set by setBufferSize().
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index ddafa3d..5265915 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
@@ -482,19 +482,18 @@ int QAudioInputPrivate::bytesReady() const
qint64 QAudioInputPrivate::read(char* data, qint64 len)
{
- Q_UNUSED(len)
-
// Read in some audio data and write it to QIODevice, pull mode
if ( !handle )
return 0;
- bytesAvailable = checkBytesReady();
+ // bytesAvaiable is saved as a side effect of checkBytesReady().
+ int bytesToRead = checkBytesReady();
- if (bytesAvailable < 0) {
+ if (bytesToRead < 0) {
// bytesAvailable as negative is error code, try to recover from it.
- xrun_recovery(bytesAvailable);
- bytesAvailable = checkBytesReady();
- if (bytesAvailable < 0) {
+ xrun_recovery(bytesToRead);
+ bytesToRead = checkBytesReady();
+ if (bytesToRead < 0) {
// recovery failed must stop and set error.
close();
errorState = QAudio::IOError;
@@ -504,9 +503,11 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
}
}
+ bytesToRead = qMin<qint64>(len, bytesToRead);
+ bytesToRead -= bytesToRead % period_size;
int count=0, err = 0;
while(count < 5) {
- int chunks = bytesAvailable/period_size;
+ int chunks = bytesToRead/period_size;
int frames = chunks*period_frames;
if(frames > (int)buffer_frames)
frames = buffer_frames;
@@ -554,6 +555,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
emit stateChanged(deviceState);
}
} else {
+ bytesAvailable -= err;
totalTimeValue += err;
resuming = false;
if (deviceState != QAudio::ActiveState) {
@@ -566,6 +568,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
} else {
memcpy(data,audioBuffer,err);
+ bytesAvailable -= err;
totalTimeValue += err;
resuming = false;
if (deviceState != QAudio::ActiveState) {
@@ -661,7 +664,7 @@ bool QAudioInputPrivate::deviceReady()
{
if(pullMode) {
// reads some audio data and writes it to QIODevice
- read(0,0);
+ read(0, buffer_size);
} else {
// emits readyRead() so user will call read() on QIODevice to get some audio data
InputPrivate* a = qobject_cast<InputPrivate*>(audioSource);
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.h b/src/multimedia/audio/qaudioinput_alsa_p.h
index 191235e..52975a6 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.h
+++ b/src/multimedia/audio/qaudioinput_alsa_p.h
@@ -61,6 +61,7 @@
#include <QtCore/qtimer.h>
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
+#include <QtCore/qelapsedtimer.h>
#include <QtCore/qdatetime.h>
#include <QtMultimedia/qaudio.h>
@@ -117,8 +118,8 @@ private:
void drain();
QTimer* timer;
- QTime timeStamp;
- QTime clockStamp;
+ QElapsedTimer timeStamp;
+ QElapsedTimer clockStamp;
qint64 elapsedTimeOffset;
int intervalTime;
char* audioBuffer;
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp
index 225d2f1..0ec2492 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.cpp
+++ b/src/multimedia/audio/qaudioinput_win32_p.cpp
@@ -79,7 +79,7 @@ QAudioInputPrivate::~QAudioInputPrivate()
stop();
}
-void CALLBACK QAudioInputPrivate::waveInProc( HWAVEIN hWaveIn, UINT uMsg,
+void QT_WIN_CALLBACK QAudioInputPrivate::waveInProc( HWAVEIN hWaveIn, UINT uMsg,
DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 )
{
Q_UNUSED(dwParam1)
@@ -272,7 +272,7 @@ bool QAudioInputPrivate::open()
if(waveInGetDevCaps(ii, &wic, sizeof(WAVEINCAPS))
== MMSYSERR_NOERROR) {
QString tmp;
- tmp = QString::fromUtf16((const unsigned short*)wic.szPname);
+ tmp = QString((const QChar *)wic.szPname);
if(tmp.compare(QLatin1String(m_device)) == 0) {
devId = ii;
break;
@@ -400,9 +400,12 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
resuming = false;
}
} else {
+ l = qMin<qint64>(len, waveBlocks[header].dwBytesRecorded);
// push mode
- memcpy(p,waveBlocks[header].lpData,waveBlocks[header].dwBytesRecorded);
- l = waveBlocks[header].dwBytesRecorded;
+ memcpy(p, waveBlocks[header].lpData, l);
+
+ len -= l;
+
#ifdef DEBUG_AUDIO
qDebug()<<"IN: "<<waveBlocks[header].dwBytesRecorded<<", OUT: "<<l;
#endif
@@ -457,7 +460,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
mutex.lock();
if(!pullMode) {
- if(l+period_size > len && waveFreeBlockCount == buffer_size/period_size)
+ if(len < period_size || waveFreeBlockCount == buffer_size/period_size)
done = true;
} else {
if(waveFreeBlockCount == buffer_size/period_size)
@@ -568,7 +571,7 @@ bool QAudioInputPrivate::deviceReady()
if(pullMode) {
// reads some audio data and writes it to QIODevice
- read(0,0);
+ read(0, buffer_size);
} else {
// emits readyRead() so user will call read() on QIODevice to get some audio data
InputPrivate* a = qobject_cast<InputPrivate*>(audioSource);
diff --git a/src/multimedia/audio/qaudioinput_win32_p.h b/src/multimedia/audio/qaudioinput_win32_p.h
index 1737bb1..8a9b02b 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.h
+++ b/src/multimedia/audio/qaudioinput_win32_p.h
@@ -124,8 +124,7 @@ private:
int waveCurrentBlock;
QMutex mutex;
-
- static void CALLBACK waveInProc( HWAVEIN hWaveIn, UINT uMsg,
+ static void QT_WIN_CALLBACK waveInProc( HWAVEIN hWaveIn, UINT uMsg,
DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 );
WAVEHDR* allocateBlocks(int size, int count);
diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp
index cf3b79c..b71d48c 100644
--- a/src/multimedia/audio/qaudiooutput.cpp
+++ b/src/multimedia/audio/qaudiooutput.cpp
@@ -199,7 +199,7 @@ QAudioFormat QAudioOutput::format() const
/*!
Uses the \a device as the QIODevice to transfer data.
- Passing a QIODevice allows the data to be transfered without any extra code.
+ Passing a QIODevice allows the data to be transferred without any extra code.
All that is required is to open the QIODevice.
If able to successfully output audio data to the systems audio device the
diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.h b/src/multimedia/audio/qaudiooutput_alsa_p.h
index 802bc27..e6ac231 100644
--- a/src/multimedia/audio/qaudiooutput_alsa_p.h
+++ b/src/multimedia/audio/qaudiooutput_alsa_p.h
@@ -60,6 +60,7 @@
#include <QtCore/qtimer.h>
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
+#include <QtCore/qelapsedtimer.h>
#include <QtCore/qdatetime.h>
#include <QtMultimedia/qaudio.h>
@@ -133,8 +134,8 @@ private:
QTimer* timer;
QByteArray m_device;
int bytesAvailable;
- QTime timeStamp;
- QTime clockStamp;
+ QElapsedTimer timeStamp;
+ QElapsedTimer clockStamp;
qint64 elapsedTimeOffset;
char* audioBuffer;
snd_pcm_t* handle;
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index f038e51..1b054e5 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -315,7 +315,7 @@ bool QAudioOutputPrivate::open()
if(waveOutGetDevCaps(ii, &woc, sizeof(WAVEOUTCAPS))
== MMSYSERR_NOERROR) {
QString tmp;
- tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
+ tmp = QString((const QChar *)woc.szPname);
if(tmp.compare(QLatin1String(m_device)) == 0) {
devId = ii;
break;
@@ -586,7 +586,7 @@ bool QAudioOutputPrivate::deviceReady()
}
}
if ( out < l) {
- // Didnt write all data
+ // Didn't write all data
audioSource->seek(audioSource->pos()-(l-out));
}
if(startup)
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.h b/src/multimedia/audio/qaudiooutput_win32_p.h
index aab1064..2d19225 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.h
+++ b/src/multimedia/audio/qaudiooutput_win32_p.h
@@ -117,7 +117,7 @@ private:
qint64 totalTimeValue;
bool pullMode;
int intervalTime;
- static void CALLBACK waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
+ static void QT_WIN_CALLBACK waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 );
QMutex mutex;
diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro
index c729103..852322d 100644
--- a/src/multimedia/multimedia.pro
+++ b/src/multimedia/multimedia.pro
@@ -11,4 +11,6 @@ include(../qbase.pri)
include(audio/audio.pri)
include(video/video.pri)
-symbian: TARGET.UID3 = 0x2001E627 \ No newline at end of file
+symbian: {
+ TARGET.UID3 = 0x2001E627
+}
diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp
index 465a1e7..978636a 100644
--- a/src/multimedia/video/qabstractvideobuffer.cpp
+++ b/src/multimedia/video/qabstractvideobuffer.cpp
@@ -71,6 +71,9 @@ QT_BEGIN_NAMESPACE
\value NoHandle The buffer has no handle, its data can only be accessed by mapping the buffer.
\value GLTextureHandle The handle of the buffer is an OpenGL texture ID.
+ \value XvShmImageHandle The handle contains pointer to shared memory XVideo image.
+ \value CoreImageHandle The handle contains pointer to Mac OS X CIImage.
+ \value QPixmapHandle The handle of the buffer is a QPixmap.
\value UserHandle Start value for user defined handle types.
\sa handleType()
@@ -84,7 +87,7 @@ QT_BEGIN_NAMESPACE
\value NotMapped The video buffer has is not mapped to memory.
\value ReadOnly The mapped memory is populated with data from the video buffer when mapped, but
the content of the mapped memory may be discarded when unmapped.
- \value WriteOnly The mapped memory in unitialized when mapped, and the content will be used to
+ \value WriteOnly The mapped memory is uninitialized when mapped, and the content will be used to
populate the video buffer when unmapped.
\value ReadWrite The mapped memory is populated with data from the video buffer, and the
video buffer is repopulated with the content of the mapped memory.
diff --git a/src/multimedia/video/qabstractvideobuffer.h b/src/multimedia/video/qabstractvideobuffer.h
index 4ffa46f..98e12da 100644
--- a/src/multimedia/video/qabstractvideobuffer.h
+++ b/src/multimedia/video/qabstractvideobuffer.h
@@ -61,6 +61,9 @@ public:
{
NoHandle,
GLTextureHandle,
+ XvShmImageHandle,
+ CoreImageHandle,
+ QPixmapHandle,
UserHandle = 1000
};
diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp
index 2d66d9e..cd38f5e 100644
--- a/src/multimedia/video/qvideoframe.cpp
+++ b/src/multimedia/video/qvideoframe.cpp
@@ -665,6 +665,7 @@ QVideoFrame::PixelFormat QVideoFrame::pixelFormatFromImageFormat(QImage::Format
case QImage::Format_RGB16:
return Format_RGB565;
case QImage::Format_ARGB8565_Premultiplied:
+ return Format_ARGB8565_Premultiplied;
case QImage::Format_RGB666:
case QImage::Format_ARGB6666_Premultiplied:
return Format_Invalid;