whitespace fixes

remove trailing spaces & expand tabs.

Change-Id: I05ef110abed90f13b47752760ffb4567a11a6a5e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
This commit is contained in:
Oswald Buddenhagen
2014-01-17 19:27:51 +01:00
committed by The Qt Project
parent b690a4d902
commit 5980bc41cf
54 changed files with 160 additions and 160 deletions

View File

@@ -8,7 +8,7 @@ win32:INCLUDEPATH += $$PWD
HEADERS = \ HEADERS = \
audiorecorder.h \ audiorecorder.h \
qaudiolevel.h qaudiolevel.h
SOURCES = \ SOURCES = \
main.cpp \ main.cpp \
audiorecorder.cpp \ audiorecorder.cpp \

View File

@@ -301,7 +301,7 @@ void Camera::updateLockStatus(QCamera::LockStatus status, QCamera::LockChangeRea
ui->lockButton->setText(tr("Focusing...")); ui->lockButton->setText(tr("Focusing..."));
break; break;
case QCamera::Locked: case QCamera::Locked:
indicationColor = Qt::darkGreen; indicationColor = Qt::darkGreen;
ui->lockButton->setText(tr("Unlock")); ui->lockButton->setText(tr("Unlock"));
ui->statusbar->showMessage(tr("Focused"), 2000); ui->statusbar->showMessage(tr("Focused"), 2000);
break; break;
@@ -352,7 +352,7 @@ void Camera::updateCaptureMode()
void Camera::updateCameraState(QCamera::State state) void Camera::updateCameraState(QCamera::State state)
{ {
switch (state) { switch (state) {
case QCamera::ActiveState: case QCamera::ActiveState:
ui->actionStartCamera->setEnabled(false); ui->actionStartCamera->setEnabled(false);
ui->actionStopCamera->setEnabled(true); ui->actionStopCamera->setEnabled(true);

View File

@@ -71,24 +71,24 @@
slider) or the QVideoWidget object will update the other object. slider) or the QVideoWidget object will update the other object.
\code \code
connect(brightnessSlider, SIGNAL(sliderMoved(int)), videoWidget, connect(brightnessSlider, SIGNAL(sliderMoved(int)), videoWidget,
SLOT(setBrightness(int))); SLOT(setBrightness(int)));
connect(videoWidget, SIGNAL(brightnessChanged(int)), connect(videoWidget, SIGNAL(brightnessChanged(int)),
brightnessSlider, SLOT(setValue(int))); brightnessSlider, SLOT(setValue(int)));
connect(contrastSlider, SIGNAL(sliderMoved(int)), videoWidget, connect(contrastSlider, SIGNAL(sliderMoved(int)), videoWidget,
SLOT(setContrast(int))); SLOT(setContrast(int)));
connect(videoWidget, SIGNAL(contrastChanged(int)), contrastSlider, connect(videoWidget, SIGNAL(contrastChanged(int)), contrastSlider,
SLOT(setValue(int))); SLOT(setValue(int)));
connect(hueSlider, SIGNAL(sliderMoved(int)), videoWidget, connect(hueSlider, SIGNAL(sliderMoved(int)), videoWidget,
SLOT(setHue(int))); SLOT(setHue(int)));
connect(videoWidget, SIGNAL(hueChanged(int)), hueSlider, connect(videoWidget, SIGNAL(hueChanged(int)), hueSlider,
SLOT(setValue(int))); SLOT(setValue(int)));
connect(saturationSlider, SIGNAL(sliderMoved(int)), videoWidget, connect(saturationSlider, SIGNAL(sliderMoved(int)), videoWidget,
SLOT(setSaturation(int))); SLOT(setSaturation(int)));
connect(videoWidget, SIGNAL(saturationChanged(int)), connect(videoWidget, SIGNAL(saturationChanged(int)),
saturationSlider, SLOT(setValue(int))); saturationSlider, SLOT(setValue(int)));
\endcode \endcode

View File

@@ -95,7 +95,7 @@ Player::Player(QWidget *parent)
labelDuration = new QLabel(this); labelDuration = new QLabel(this);
connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(seek(int))); connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(seek(int)));
labelHistogram = new QLabel(this); labelHistogram = new QLabel(this);
labelHistogram->setText("Histogram:"); labelHistogram->setText("Histogram:");
histogram = new HistogramWidget(this); histogram = new HistogramWidget(this);

View File

@@ -49,6 +49,6 @@ int main(int argc, char **argv)
VideoPlayer player; VideoPlayer player;
player.show(); player.show();
return app.exec(); return app.exec();
} }

View File

@@ -100,7 +100,7 @@ QGstreamerVideoWidgetControl::QGstreamerVideoWidgetControl(QObject *parent)
, m_videoSink(0) , m_videoSink(0)
, m_widget(0) , m_widget(0)
, m_fullScreen(false) , m_fullScreen(false)
{ {
} }
QGstreamerVideoWidgetControl::~QGstreamerVideoWidgetControl() QGstreamerVideoWidgetControl::~QGstreamerVideoWidgetControl()

View File

@@ -166,11 +166,11 @@ bool QAudioDeviceInfoInternal::open()
QString shortName = device.mid(device.indexOf(QLatin1String("="),0)+1); QString shortName = device.mid(device.indexOf(QLatin1String("="),0)+1);
while(snd_card_get_name(idx,&name) == 0) { while (snd_card_get_name(idx,&name) == 0) {
if(dev.contains(QLatin1String(name))) if(dev.contains(QLatin1String(name)))
break; break;
idx++; idx++;
} }
dev = QString(QLatin1String("hw:%1,0")).arg(idx); dev = QString(QLatin1String("hw:%1,0")).arg(idx);
#endif #endif
} }

View File

@@ -344,7 +344,7 @@ void QAudioDeviceInfoInternal::updateLists()
|| (fmt & WAVE_FORMAT_96S08) || (fmt & WAVE_FORMAT_96S08)
) { ) {
sizez.append(8); sizez.append(8);
} }
if ((fmt & WAVE_FORMAT_1M16) if ((fmt & WAVE_FORMAT_1M16)
|| (fmt & WAVE_FORMAT_1S16) || (fmt & WAVE_FORMAT_1S16)
|| (fmt & WAVE_FORMAT_2M16) || (fmt & WAVE_FORMAT_2M16)
@@ -357,51 +357,51 @@ void QAudioDeviceInfoInternal::updateLists()
|| (fmt & WAVE_FORMAT_96S16) || (fmt & WAVE_FORMAT_96S16)
) { ) {
sizez.append(16); sizez.append(16);
} }
if ((fmt & WAVE_FORMAT_1M08) if ((fmt & WAVE_FORMAT_1M08)
|| (fmt & WAVE_FORMAT_1S08) || (fmt & WAVE_FORMAT_1S08)
|| (fmt & WAVE_FORMAT_1M16) || (fmt & WAVE_FORMAT_1M16)
|| (fmt & WAVE_FORMAT_1S16)) { || (fmt & WAVE_FORMAT_1S16)) {
sampleRatez.append(11025); sampleRatez.append(11025);
} }
if ((fmt & WAVE_FORMAT_2M08) if ((fmt & WAVE_FORMAT_2M08)
|| (fmt & WAVE_FORMAT_2S08) || (fmt & WAVE_FORMAT_2S08)
|| (fmt & WAVE_FORMAT_2M16) || (fmt & WAVE_FORMAT_2M16)
|| (fmt & WAVE_FORMAT_2S16)) { || (fmt & WAVE_FORMAT_2S16)) {
sampleRatez.append(22050); sampleRatez.append(22050);
} }
if ((fmt & WAVE_FORMAT_4M08) if ((fmt & WAVE_FORMAT_4M08)
|| (fmt & WAVE_FORMAT_4S08) || (fmt & WAVE_FORMAT_4S08)
|| (fmt & WAVE_FORMAT_4M16) || (fmt & WAVE_FORMAT_4M16)
|| (fmt & WAVE_FORMAT_4S16)) { || (fmt & WAVE_FORMAT_4S16)) {
sampleRatez.append(44100); sampleRatez.append(44100);
} }
if ((fmt & WAVE_FORMAT_48M08) if ((fmt & WAVE_FORMAT_48M08)
|| (fmt & WAVE_FORMAT_48S08) || (fmt & WAVE_FORMAT_48S08)
|| (fmt & WAVE_FORMAT_48M16) || (fmt & WAVE_FORMAT_48M16)
|| (fmt & WAVE_FORMAT_48S16)) { || (fmt & WAVE_FORMAT_48S16)) {
sampleRatez.append(48000); sampleRatez.append(48000);
} }
if ((fmt & WAVE_FORMAT_96M08) if ((fmt & WAVE_FORMAT_96M08)
|| (fmt & WAVE_FORMAT_96S08) || (fmt & WAVE_FORMAT_96S08)
|| (fmt & WAVE_FORMAT_96M16) || (fmt & WAVE_FORMAT_96M16)
|| (fmt & WAVE_FORMAT_96S16)) { || (fmt & WAVE_FORMAT_96S16)) {
sampleRatez.append(96000); sampleRatez.append(96000);
} }
channelz.append(1); channelz.append(1);
channelz.append(2); channelz.append(2);
if (mode == QAudio::AudioOutput) { if (mode == QAudio::AudioOutput) {
channelz.append(4); channelz.append(4);
channelz.append(6); channelz.append(6);
channelz.append(8); channelz.append(8);
} }
byteOrderz.append(QAudioFormat::LittleEndian); byteOrderz.append(QAudioFormat::LittleEndian);
typez.append(QAudioFormat::SignedInt); typez.append(QAudioFormat::SignedInt);
typez.append(QAudioFormat::UnSignedInt); typez.append(QAudioFormat::UnSignedInt);
codecz.append(QLatin1String("audio/pcm")); codecz.append(QLatin1String("audio/pcm"));
} }
if (sampleRatez.count() > 0) if (sampleRatez.count() > 0)
sampleRatez.prepend(8000); sampleRatez.prepend(8000);

View File

@@ -505,7 +505,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
deviceState = QAudio::ActiveState; deviceState = QAudio::ActiveState;
emit stateChanged(deviceState); emit stateChanged(deviceState);
} }
resuming = false; resuming = false;
} }
} else { } else {
l = qMin<qint64>(len, waveBlocks[header].dwBytesRecorded - waveBlockOffset); l = qMin<qint64>(len, waveBlocks[header].dwBytesRecorded - waveBlockOffset);
@@ -523,7 +523,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
deviceState = QAudio::ActiveState; deviceState = QAudio::ActiveState;
emit stateChanged(deviceState); emit stateChanged(deviceState);
} }
resuming = false; resuming = false;
} }
} else { } else {
//no data, not ready yet, next time //no data, not ready yet, next time
@@ -583,7 +583,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
mutex.unlock(); mutex.unlock();
} }
written+=l; written+=l;
} }
#ifdef DEBUG_AUDIO #ifdef DEBUG_AUDIO
qDebug()<<"read in len="<<written; qDebug()<<"read in len="<<written;
@@ -611,7 +611,7 @@ void QAudioInputPrivate::resume()
mutex.unlock(); mutex.unlock();
header = 0; header = 0;
resuming = true; resuming = true;
waveBlockOffset = 0; waveBlockOffset = 0;
waveInStart(hWaveIn); waveInStart(hWaveIn);
QTimer::singleShot(20,this,SLOT(feedback())); QTimer::singleShot(20,this,SLOT(feedback()));
@@ -689,8 +689,8 @@ bool QAudioInputPrivate::deviceReady()
read(0, buffer_size); read(0, buffer_size);
} else { } else {
// emits readyRead() so user will call read() on QIODevice to get some audio data // emits readyRead() so user will call read() on QIODevice to get some audio data
InputPrivate* a = qobject_cast<InputPrivate*>(audioSource); InputPrivate* a = qobject_cast<InputPrivate*>(audioSource);
a->trigger(); a->trigger();
} }
if(intervalTime && (timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) { if(intervalTime && (timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) {

View File

@@ -343,11 +343,11 @@ bool QAudioOutputPrivate::open()
QString shortName = QLatin1String(m_device.mid(m_device.indexOf('=',0)+1).constData()); QString shortName = QLatin1String(m_device.mid(m_device.indexOf('=',0)+1).constData());
while(snd_card_get_name(idx,&name) == 0) { while (snd_card_get_name(idx,&name) == 0) {
if(qstrncmp(shortName.toLocal8Bit().constData(),name,shortName.length()) == 0) if(qstrncmp(shortName.toLocal8Bit().constData(),name,shortName.length()) == 0)
break; break;
idx++; idx++;
} }
dev = QString(QLatin1String("hw:%1,0")).arg(idx); dev = QString(QLatin1String("hw:%1,0")).arg(idx);
#endif #endif
} }

View File

@@ -153,7 +153,7 @@ void CALLBACK QAudioOutputPrivate::waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
case WOM_DONE: case WOM_DONE:
if(qAudio->finished || qAudio->buffer_size == 0 || qAudio->period_size == 0) { if(qAudio->finished || qAudio->buffer_size == 0 || qAudio->period_size == 0) {
return; return;
} }
qAudio->waveFreeBlockCount++; qAudio->waveFreeBlockCount++;
if(qAudio->waveFreeBlockCount >= qAudio->buffer_size/qAudio->period_size) if(qAudio->waveFreeBlockCount >= qAudio->buffer_size/qAudio->period_size)
qAudio->waveFreeBlockCount = qAudio->buffer_size/qAudio->period_size; qAudio->waveFreeBlockCount = qAudio->buffer_size/qAudio->period_size;
@@ -590,28 +590,28 @@ bool QAudioOutputPrivate::deviceReady()
#endif #endif
bool startup = false; bool startup = false;
if(totalTimeValue == 0) if(totalTimeValue == 0)
startup = true; startup = true;
bool full=false; bool full=false;
mutex.lock(); mutex.lock();
if(waveFreeBlockCount==0) full = true; if (waveFreeBlockCount==0) full = true;
mutex.unlock(); mutex.unlock();
if (full){ if (full) {
#ifdef DEBUG_AUDIO #ifdef DEBUG_AUDIO
qDebug() << "Skipping data as unable to write"; qDebug() << "Skipping data as unable to write";
#endif #endif
if((timeStamp.elapsed() + elapsedTimeOffset) > intervalTime ) { if ((timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) {
emit notify(); emit notify();
elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime; elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime;
timeStamp.restart(); timeStamp.restart();
} }
return true; return true;
} }
if(startup) if(startup)
waveOutPause(hWaveOut); waveOutPause(hWaveOut);
int input = period_size*chunks; int input = period_size*chunks;
int l = audioSource->read(audioBuffer,input); int l = audioSource->read(audioBuffer,input);
if(l > 0) { if(l > 0) {
@@ -626,8 +626,8 @@ bool QAudioOutputPrivate::deviceReady()
// Didn't write all data // Didn't write all data
audioSource->seek(audioSource->pos()-(l-out)); audioSource->seek(audioSource->pos()-(l-out));
} }
if(startup) if (startup)
waveOutRestart(hWaveOut); waveOutRestart(hWaveOut);
} else if(l == 0) { } else if(l == 0) {
bytesAvailable = bytesFree(); bytesAvailable = bytesFree();
@@ -654,7 +654,7 @@ bool QAudioOutputPrivate::deviceReady()
int buffered; int buffered;
mutex.lock(); mutex.lock();
buffered = waveFreeBlockCount; buffered = waveFreeBlockCount;
mutex.unlock(); mutex.unlock();
if (buffered >= buffer_size/period_size && deviceState == QAudio::ActiveState) { if (buffered >= buffer_size/period_size && deviceState == QAudio::ActiveState) {
@@ -670,7 +670,7 @@ bool QAudioOutputPrivate::deviceReady()
if(intervalTime && (timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) { if(intervalTime && (timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) {
emit notify(); emit notify();
elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime; elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime;
timeStamp.restart(); timeStamp.restart();
} }

View File

@@ -59,7 +59,7 @@ class Q_MULTIMEDIA_EXPORT QCameraFlashControl : public QMediaControl
public: public:
~QCameraFlashControl(); ~QCameraFlashControl();
virtual QCameraExposure::FlashModes flashMode() const = 0; virtual QCameraExposure::FlashModes flashMode() const = 0;
virtual void setFlashMode(QCameraExposure::FlashModes mode) = 0; virtual void setFlashMode(QCameraExposure::FlashModes mode) = 0;
virtual bool isFlashModeSupported(QCameraExposure::FlashModes mode) const = 0; virtual bool isFlashModeSupported(QCameraExposure::FlashModes mode) const = 0;

View File

@@ -57,7 +57,7 @@ class Q_MULTIMEDIA_EXPORT QCameraLocksControl : public QMediaControl
Q_OBJECT Q_OBJECT
public: public:
~QCameraLocksControl(); ~QCameraLocksControl();
virtual QCamera::LockTypes supportedLocks() const = 0; virtual QCamera::LockTypes supportedLocks() const = 0;
virtual QCamera::LockStatus lockStatus(QCamera::LockType lock) const = 0; virtual QCamera::LockStatus lockStatus(QCamera::LockType lock) const = 0;

View File

@@ -64,7 +64,7 @@ class Q_MULTIMEDIA_EXPORT QImageEncoderControl : public QMediaControl
Q_OBJECT Q_OBJECT
public: public:
virtual ~QImageEncoderControl(); virtual ~QImageEncoderControl();
virtual QStringList supportedImageCodecs() const = 0; virtual QStringList supportedImageCodecs() const = 0;
virtual QString imageCodecDescription(const QString &codecName) const = 0; virtual QString imageCodecDescription(const QString &codecName) const = 0;

View File

@@ -34,44 +34,44 @@ hr {
} }
table.valuelist { table.valuelist {
border-width: 1px 1px 1px 1px; border-width: 1px 1px 1px 1px;
border-style: solid; border-style: solid;
border-color: #dddddd; border-color: #dddddd;
border-collapse: collapse; border-collapse: collapse;
background-color: #f0f0f0; background-color: #f0f0f0;
} }
table.indextable { table.indextable {
border-width: 1px 1px 1px 1px; border-width: 1px 1px 1px 1px;
border-style: solid; border-style: solid;
border-collapse: collapse; border-collapse: collapse;
background-color: #f0f0f0; background-color: #f0f0f0;
border-color:#555; border-color:#555;
font-size: 100%; font-size: 100%;
} }
table td.largeindex { table td.largeindex {
border-width: 1px 1px 1px 1px; border-width: 1px 1px 1px 1px;
border-collapse: collapse; border-collapse: collapse;
background-color: #f0f0f0; background-color: #f0f0f0;
border-color:#555; border-color:#555;
font-size: 120%; font-size: 120%;
} }
table.valuelist th { table.valuelist th {
border-width: 1px 1px 1px 2px; border-width: 1px 1px 1px 2px;
padding: 4px; padding: 4px;
border-style: solid; border-style: solid;
border-color: #666; border-color: #666;
color:white; color:white;
background-color:#666; background-color:#666;
} }
th.titleheader { th.titleheader {
border-width: 1px 0px 1px 0px; border-width: 1px 0px 1px 0px;
padding: 2px; padding: 2px;
border-style: solid; border-style: solid;
border-color: #666; border-color: #666;
color:white; color:white;
background-color:#555; background-color:#555;
background-image:url('images/gradient.png')}; background-image:url('images/gradient.png')};
@@ -81,10 +81,10 @@ th.titleheader {
th.largeheader { th.largeheader {
border-width: 1px 0px 1px 0px; border-width: 1px 0px 1px 0px;
padding: 4px; padding: 4px;
border-style: solid; border-style: solid;
border-color: #444; border-color: #444;
color:white; color:white;
background-color:#555555; background-color:#555555;
font-size: 120%; font-size: 120%;
@@ -143,7 +143,7 @@ table.generic, table.annotated
{ {
border-width: 1px; border-width: 1px;
border-color:#bbb; border-color:#bbb;
border-style:solid; border-style:solid;
border-collapse:collapse; border-collapse:collapse;
} }

View File

@@ -57,7 +57,7 @@ class QGstreamerVideoRenderer : public QVideoRendererControl, public QGstreamerV
public: public:
QGstreamerVideoRenderer(QObject *parent = 0); QGstreamerVideoRenderer(QObject *parent = 0);
virtual ~QGstreamerVideoRenderer(); virtual ~QGstreamerVideoRenderer();
QAbstractVideoSurface *surface() const; QAbstractVideoSurface *surface() const;
void setSurface(QAbstractVideoSurface *surface); void setSurface(QAbstractVideoSurface *surface);
@@ -73,7 +73,7 @@ signals:
private slots: private slots:
void handleFormatChange(); void handleFormatChange();
private: private:
QVideoSurfaceGstSink *m_videoSink; QVideoSurfaceGstSink *m_videoSink;
QPointer<QAbstractVideoSurface> m_surface; QPointer<QAbstractVideoSurface> m_surface;
}; };

View File

@@ -150,7 +150,7 @@ public:
int bufferStatus() const; int bufferStatus() const;
bool isSeekable() const; bool isSeekable() const;
qreal playbackRate() const; qreal playbackRate() const;
Error error() const; Error error() const;
QString errorString() const; QString errorString() const;

View File

@@ -68,7 +68,7 @@ public:
QGraphicsVideoItem(QGraphicsItem *parent = 0); QGraphicsVideoItem(QGraphicsItem *parent = 0);
~QGraphicsVideoItem(); ~QGraphicsVideoItem();
QMediaObject *mediaObject() const; QMediaObject *mediaObject() const;
Qt::AspectRatioMode aspectRatioMode() const; Qt::AspectRatioMode aspectRatioMode() const;
void setAspectRatioMode(Qt::AspectRatioMode mode); void setAspectRatioMode(Qt::AspectRatioMode mode);

View File

@@ -841,7 +841,7 @@ QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
painter->fillRect(target, Qt::black); painter->fillRect(target, Qt::black);
return QAbstractVideoSurface::NoError; return QAbstractVideoSurface::NoError;
} }
const QAbstractVideoBuffer::HandleType h = m_frame.handleType(); const QAbstractVideoBuffer::HandleType h = m_frame.handleType();
if (h == QAbstractVideoBuffer::NoHandle || h == QAbstractVideoBuffer::GLTextureHandle) { if (h == QAbstractVideoBuffer::NoHandle || h == QAbstractVideoBuffer::GLTextureHandle) {
bool stencilTestEnabled = glIsEnabled(GL_STENCIL_TEST); bool stencilTestEnabled = glIsEnabled(GL_STENCIL_TEST);

View File

@@ -67,9 +67,9 @@ class Q_MULTIMEDIAWIDGETS_EXPORT QVideoWidget : public QWidget, public QMediaBin
public: public:
QVideoWidget(QWidget *parent = 0); QVideoWidget(QWidget *parent = 0);
~QVideoWidget(); ~QVideoWidget();
QMediaObject *mediaObject() const; QMediaObject *mediaObject() const;
#ifdef Q_QDOC #ifdef Q_QDOC
bool isFullScreen() const; bool isFullScreen() const;

View File

@@ -230,7 +230,7 @@ public:
QVideoWidgetPrivate() QVideoWidgetPrivate()
: q_ptr(0) : q_ptr(0)
, mediaObject(0) , mediaObject(0)
, service(0) , service(0)
, widgetBackend(0) , widgetBackend(0)
, windowBackend(0) , windowBackend(0)
, rendererBackend(0) , rendererBackend(0)

View File

@@ -81,7 +81,7 @@ public:
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject) STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject)
{ {
if (NULL == ppvObject) if (NULL == ppvObject)
return E_POINTER; return E_POINTER;
if (riid == IID_IUnknown /*__uuidof(IUnknown) */ ) { if (riid == IID_IUnknown /*__uuidof(IUnknown) */ ) {
*ppvObject = static_cast<IUnknown*>(this); *ppvObject = static_cast<IUnknown*>(this);
@@ -380,9 +380,9 @@ QSize DSCameraSession::frameSize() const
void DSCameraSession::setFrameSize(const QSize& s) void DSCameraSession::setFrameSize(const QSize& s)
{ {
if (supportedResolutions(pixelF).contains(s)) if (supportedResolutions(pixelF).contains(s))
m_windowSize = s; m_windowSize = s;
else else
qWarning() << "frame size if not supported for current pixel format, no change"; qWarning() << "frame size if not supported for current pixel format, no change";
} }
@@ -465,8 +465,8 @@ void DSCameraSession::setPixelFormat(QVideoFrame::PixelFormat fmt)
QList<QSize> DSCameraSession::supportedResolutions(QVideoFrame::PixelFormat format) QList<QSize> DSCameraSession::supportedResolutions(QVideoFrame::PixelFormat format)
{ {
if (!resolutions.contains(format)) if (!resolutions.contains(format))
return QList<QSize>(); return QList<QSize>();
return resolutions.value(format); return resolutions.value(format);
} }

View File

@@ -120,7 +120,7 @@ DSVideoWidgetControl::DSVideoWidgetControl(DSCameraSession* session, QObject *pa
m_widget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); m_widget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_widget->setAlignment(Qt::AlignCenter); m_widget->setAlignment(Qt::AlignCenter);
m_widget->setAttribute(Qt::WA_NoSystemBackground, true); m_widget->setAttribute(Qt::WA_NoSystemBackground, true);
surface = new DSVideoWidgetSurface(m_widget); surface = new DSVideoWidgetSurface(m_widget);
QPalette palette; QPalette palette;
@@ -157,7 +157,7 @@ bool DSVideoWidgetControl::eventFilter(QObject *object, QEvent *e)
case QEvent::PolishRequest: case QEvent::PolishRequest:
m_widget->ensurePolished(); m_widget->ensurePolished();
break; break;
default: default:
// Do nothing // Do nothing
break; break;

View File

@@ -82,15 +82,15 @@ class DSVideoWidgetSurface : public QAbstractVideoSurface
class DSVideoWidgetControl : public QVideoWidgetControl class DSVideoWidgetControl : public QVideoWidgetControl
{ {
Q_OBJECT Q_OBJECT
DSVideoWidgetSurface* surface; DSVideoWidgetSurface* surface;
public: // Constructor & Destructor public: // Constructor & Destructor
DSVideoWidgetControl(DSCameraSession* session, QObject *parent = 0); DSVideoWidgetControl(DSCameraSession* session, QObject *parent = 0);
virtual ~DSVideoWidgetControl(); virtual ~DSVideoWidgetControl();
public: // QVideoWidgetControl public: // QVideoWidgetControl
QWidget *videoWidget(); QWidget *videoWidget();
// Aspect Ratio // Aspect Ratio
@@ -118,10 +118,10 @@ public: // QVideoWidgetControl
void setSaturation(int saturation); void setSaturation(int saturation);
public: // Internal public: // Internal
bool eventFilter(QObject *object, QEvent *event); bool eventFilter(QObject *object, QEvent *event);
/* /*
Q_SIGNALS: // QVideoWidgetControl Q_SIGNALS: // QVideoWidgetControl
void fullScreenChanged(bool fullScreen); void fullScreenChanged(bool fullScreen);

View File

@@ -94,7 +94,7 @@ void DirectShowEventLoop::wait(QMutex *mutex)
HANDLE handles[] = { m_eventHandle, m_waitHandle }; HANDLE handles[] = { m_eventHandle, m_waitHandle };
while (::WaitForMultipleObjects(2, handles, false, INFINITE) == WAIT_OBJECT_0) while (::WaitForMultipleObjects(2, handles, false, INFINITE) == WAIT_OBJECT_0)
processEvents(); processEvents();
mutex->lock(); mutex->lock();
} }

View File

@@ -76,7 +76,7 @@ DECLARE_INTERFACE_(IFilterGraph2 ,IGraphBuilder)
STDMETHOD(ReconnectEx)(THIS_ IPin *, const AM_MEDIA_TYPE *) PURE; STDMETHOD(ReconnectEx)(THIS_ IPin *, const AM_MEDIA_TYPE *) PURE;
STDMETHOD(RenderEx)(IPin *, DWORD, DWORD *) PURE; STDMETHOD(RenderEx)(IPin *, DWORD, DWORD *) PURE;
}; };
#undef INTERFACE #undef INTERFACE
#endif #endif
#ifndef __IAMFilterMiscFlags_INTERFACE_DEFINED__ #ifndef __IAMFilterMiscFlags_INTERFACE_DEFINED__
@@ -89,7 +89,7 @@ DECLARE_INTERFACE_(IAMFilterMiscFlags ,IUnknown)
STDMETHOD_(ULONG,Release)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD_(ULONG,GetMiscFlags)(THIS) PURE; STDMETHOD_(ULONG,GetMiscFlags)(THIS) PURE;
}; };
#undef INTERFACE #undef INTERFACE
#endif #endif
#ifndef __IFileSourceFilter_INTERFACE_DEFINED__ #ifndef __IFileSourceFilter_INTERFACE_DEFINED__
@@ -103,7 +103,7 @@ DECLARE_INTERFACE_(IFileSourceFilter ,IUnknown)
STDMETHOD(Load)(THIS_ LPCOLESTR, const AM_MEDIA_TYPE *) PURE; STDMETHOD(Load)(THIS_ LPCOLESTR, const AM_MEDIA_TYPE *) PURE;
STDMETHOD(GetCurFile)(THIS_ LPOLESTR *ppszFileName, AM_MEDIA_TYPE *) PURE; STDMETHOD(GetCurFile)(THIS_ LPOLESTR *ppszFileName, AM_MEDIA_TYPE *) PURE;
}; };
#undef INTERFACE #undef INTERFACE
#endif #endif
#ifndef __IAMOpenProgress_INTERFACE_DEFINED__ #ifndef __IAMOpenProgress_INTERFACE_DEFINED__
@@ -117,7 +117,7 @@ DECLARE_INTERFACE_(IAMOpenProgress ,IUnknown)
STDMETHOD(QueryProgress)(THIS_ LONGLONG *, LONGLONG *) PURE; STDMETHOD(QueryProgress)(THIS_ LONGLONG *, LONGLONG *) PURE;
STDMETHOD(AbortOperation)(THIS) PURE; STDMETHOD(AbortOperation)(THIS) PURE;
}; };
#undef INTERFACE #undef INTERFACE
#endif #endif
#ifndef __IFilterChain_INTERFACE_DEFINED__ #ifndef __IFilterChain_INTERFACE_DEFINED__
@@ -133,7 +133,7 @@ DECLARE_INTERFACE_(IFilterChain ,IUnknown)
STDMETHOD(StopChain)(IBaseFilter *, IBaseFilter *) PURE; STDMETHOD(StopChain)(IBaseFilter *, IBaseFilter *) PURE;
STDMETHOD(RemoveChain)(IBaseFilter *, IBaseFilter *) PURE; STDMETHOD(RemoveChain)(IBaseFilter *, IBaseFilter *) PURE;
}; };
#undef INTERFACE #undef INTERFACE
#endif #endif
#endif #endif

View File

@@ -259,7 +259,7 @@ HRESULT DirectShowIOReader::SyncReadAligned(IMediaSample *pSample)
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
pSample->SetActualDataLength(bytesRead); pSample->SetActualDataLength(bytesRead);
return hr; return hr;
} else { } else {
m_synchronousPosition = position; m_synchronousPosition = position;

View File

@@ -336,7 +336,7 @@ HRESULT DirectShowIOSource::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
return VFW_E_NOT_STOPPED; return VFW_E_NOT_STOPPED;
} else if (m_peerPin) { } else if (m_peerPin) {
return VFW_E_ALREADY_CONNECTED; return VFW_E_ALREADY_CONNECTED;
} else { } else {
HRESULT hr = VFW_E_TYPE_NOT_ACCEPTED; HRESULT hr = VFW_E_TYPE_NOT_ACCEPTED;
m_peerPin = pReceivePin; m_peerPin = pReceivePin;
@@ -424,7 +424,7 @@ HRESULT DirectShowIOSource::tryConnect(IPin *pin, const AM_MEDIA_TYPE *type)
|| m_allocator->GetProperties(&properties) == S_OK) { || m_allocator->GetProperties(&properties) == S_OK) {
if (properties.cbAlign == 0) if (properties.cbAlign == 0)
properties.cbAlign = 1; properties.cbAlign = 1;
ALLOCATOR_PROPERTIES actualProperties; ALLOCATOR_PROPERTIES actualProperties;
if (SUCCEEDED(hr = m_allocator->SetProperties(&properties, &actualProperties))) if (SUCCEEDED(hr = m_allocator->SetProperties(&properties, &actualProperties)))
hr = memPin->NotifyAllocator(m_allocator, TRUE); hr = memPin->NotifyAllocator(m_allocator, TRUE);
@@ -435,7 +435,7 @@ HRESULT DirectShowIOSource::tryConnect(IPin *pin, const AM_MEDIA_TYPE *type)
} }
} }
memPin->Release(); memPin->Release();
} }
if (!SUCCEEDED(hr)) if (!SUCCEEDED(hr))
pin->Disconnect(); pin->Disconnect();
} }

View File

@@ -255,7 +255,7 @@ static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key)
WORD word; WORD word;
if (header->GetAttributeByName( if (header->GetAttributeByName(
&streamNumber, &streamNumber,
key, key,
&type, &type,
reinterpret_cast<BYTE *>(&word), reinterpret_cast<BYTE *>(&word),
&size) == S_OK) { &size) == S_OK) {

View File

@@ -79,7 +79,7 @@ public:
bool isVideoAvailable() const; bool isVideoAvailable() const;
bool isSeekable() const; bool isSeekable() const;
QMediaTimeRange availablePlaybackRanges() const; QMediaTimeRange availablePlaybackRanges() const;
qreal playbackRate() const; qreal playbackRate() const;
@@ -140,7 +140,7 @@ private:
bool m_seekable; bool m_seekable;
QMediaContent m_media; QMediaContent m_media;
QString m_errorString; QString m_errorString;
}; };
#endif #endif

View File

@@ -563,7 +563,7 @@ void DirectShowPlayerService::releaseGraph()
} }
m_graph->Abort(); m_graph->Abort();
} }
m_pendingTasks = ReleaseGraph; m_pendingTasks = ReleaseGraph;
::SetEvent(m_taskHandle); ::SetEvent(m_taskHandle);
@@ -803,7 +803,7 @@ void DirectShowPlayerService::doStop(QMutexLocker *locker)
m_pendingTasks |= Seek; m_pendingTasks |= Seek;
m_executedTasks &= ~(Play | Pause); m_executedTasks &= ~(Play | Pause);
QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange))); QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
} }
@@ -852,7 +852,7 @@ void DirectShowPlayerService::doSetRate(QMutexLocker *locker)
seeking->Release(); seeking->Release();
} else if (m_rate != 1.0) { } else if (m_rate != 1.0) {
m_rate = 1.0; m_rate = 1.0;
} }
QCoreApplication::postEvent(this, new QEvent(QEvent::Type(RateChange))); QCoreApplication::postEvent(this, new QEvent(QEvent::Type(RateChange)));
} }
@@ -980,7 +980,7 @@ void DirectShowPlayerService::setAudioOutput(IBaseFilter *filter)
m_loop->wait(&m_mutex); m_loop->wait(&m_mutex);
} }
m_audioOutput->Release(); m_audioOutput->Release();
} }
m_audioOutput = filter; m_audioOutput = filter;

View File

@@ -308,10 +308,10 @@ void DirectShowSampleScheduler::run(REFERENCE_TIME startTime)
for (DirectShowTimedSample *sample = m_head; sample; sample = sample->nextSample()) { for (DirectShowTimedSample *sample = m_head; sample; sample = sample->nextSample()) {
sample->schedule(m_clock, m_startTime, m_timeoutEvent); sample->schedule(m_clock, m_startTime, m_timeoutEvent);
} }
if (!(m_state & Flushing)) if (!(m_state & Flushing))
::ResetEvent(m_flushEvent); ::ResetEvent(m_flushEvent);
if (!m_head) if (!m_head)
::SetEvent(m_timeoutEvent); ::SetEvent(m_timeoutEvent);
@@ -338,7 +338,7 @@ void DirectShowSampleScheduler::stop()
for (DirectShowTimedSample *sample = m_head; sample; sample = sample->remove()) { for (DirectShowTimedSample *sample = m_head; sample; sample = sample->remove()) {
sample->unschedule(m_clock); sample->unschedule(m_clock);
m_semaphore.release(1); m_semaphore.release(1);
} }

View File

@@ -81,7 +81,7 @@ VideoSurfaceFilter::~VideoSurfaceFilter()
} }
HRESULT VideoSurfaceFilter::QueryInterface(REFIID riid, void **ppvObject) HRESULT VideoSurfaceFilter::QueryInterface(REFIID riid, void **ppvObject)
{ {
// 2dd74950-a890-11d1-abe8-00a0c905f375 // 2dd74950-a890-11d1-abe8-00a0c905f375
static const GUID iid_IAmFilterMiscFlags = { static const GUID iid_IAmFilterMiscFlags = {
0x2dd74950, 0xa890, 0x11d1, {0xab, 0xe8, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75} }; 0x2dd74950, 0xa890, 0x11d1, {0xab, 0xe8, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75} };

View File

@@ -66,7 +66,7 @@ public:
bool isFlashReady() const; bool isFlashReady() const;
private: private:
CameraBinSession *m_session; CameraBinSession *m_session;
}; };
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@@ -113,7 +113,7 @@ public:
void setCaptureMode(QCamera::CaptureModes mode); void setCaptureMode(QCamera::CaptureModes mode);
QUrl outputLocation() const; QUrl outputLocation() const;
bool setOutputLocation(const QUrl& sink); bool setOutputLocation(const QUrl& sink);
QDir defaultDir(QCamera::CaptureModes mode) const; QDir defaultDir(QCamera::CaptureModes mode) const;
QString generateFileName(const QString &prefix, const QDir &dir, const QString &ext) const; QString generateFileName(const QString &prefix, const QDir &dir, const QString &ext) const;

View File

@@ -65,7 +65,7 @@ CameraButtonListener::~CameraButtonListener()
void CameraButtonListener::handleQmKeyEvent(MeeGo::QmKeys::Key key, MeeGo::QmKeys::State state) void CameraButtonListener::handleQmKeyEvent(MeeGo::QmKeys::Key key, MeeGo::QmKeys::State state)
{ {
if (key == MeeGo::QmKeys::Camera) { if (key == MeeGo::QmKeys::Camera) {
QWidget *window = QApplication::focusWidget(); QWidget *window = QApplication::focusWidget();
bool focusPressed = (state == MeeGo::QmKeys::KeyHalfDown) || bool focusPressed = (state == MeeGo::QmKeys::KeyHalfDown) ||
(state == MeeGo::QmKeys::KeyDown); (state == MeeGo::QmKeys::KeyDown);

View File

@@ -491,7 +491,7 @@ void QGstreamerPlayerSession::setVideoRenderer(QObject *videoOutput)
} }
} }
QGstreamerVideoRendererInterface* renderer = qobject_cast<QGstreamerVideoRendererInterface*>(videoOutput); QGstreamerVideoRendererInterface* renderer = qobject_cast<QGstreamerVideoRendererInterface*>(videoOutput);
m_renderer = renderer; m_renderer = renderer;
@@ -646,7 +646,7 @@ void QGstreamerPlayerSession::finishVideoOutputChange()
m_pendingVideoSink = 0; m_pendingVideoSink = 0;
gst_object_unref(GST_OBJECT(srcPad)); gst_object_unref(GST_OBJECT(srcPad));
return; return;
} }
if (m_usingColorspaceElement) { if (m_usingColorspaceElement) {
gst_element_set_state(m_colorSpace, GST_STATE_NULL); gst_element_set_state(m_colorSpace, GST_STATE_NULL);

View File

@@ -51,7 +51,7 @@ QT_USE_NAMESPACE
QT7PlayerControl::QT7PlayerControl(QObject *parent) QT7PlayerControl::QT7PlayerControl(QObject *parent)
: QMediaPlayerControl(parent) : QMediaPlayerControl(parent)
{ {
} }
QT7PlayerControl::~QT7PlayerControl() QT7PlayerControl::~QT7PlayerControl()

View File

@@ -73,7 +73,7 @@ public:
protected: protected:
virtual bool event(QEvent *); virtual bool event(QEvent *);
private: private:
CVDisplayLinkRef m_displayLink; CVDisplayLinkRef m_displayLink;
QMutex m_displayLinkMutex; QMutex m_displayLinkMutex;

View File

@@ -80,7 +80,7 @@ public:
private Q_SLOTS: private Q_SLOTS:
void updateVideoFrame(const CVTimeStamp &ts); void updateVideoFrame(const CVTimeStamp &ts);
private: private:
void setupVideoOutput(); void setupVideoOutput();
bool createPixelBufferVisualContext(); bool createPixelBufferVisualContext();
@@ -92,7 +92,7 @@ private:
QCvDisplayLink *m_displayLink; QCvDisplayLink *m_displayLink;
#ifdef QUICKTIME_C_API_AVAILABLE #ifdef QUICKTIME_C_API_AVAILABLE
QTVisualContextRef m_visualContext; QTVisualContextRef m_visualContext;
bool m_usingGLContext; bool m_usingGLContext;
const QGLContext *m_currentGLContext; const QGLContext *m_currentGLContext;
QSize m_pixelBufferContextGeometry; QSize m_pixelBufferContextGeometry;

View File

@@ -95,7 +95,7 @@ public:
private Q_SLOTS: private Q_SLOTS:
void updateVideoFrame(const CVTimeStamp &ts); void updateVideoFrame(const CVTimeStamp &ts);
private: private:
void setupVideoOutput(); void setupVideoOutput();
bool createVisualContext(); bool createVisualContext();
@@ -108,7 +108,7 @@ private:
QCvDisplayLink *m_displayLink; QCvDisplayLink *m_displayLink;
#ifdef QUICKTIME_C_API_AVAILABLE #ifdef QUICKTIME_C_API_AVAILABLE
QTVisualContextRef m_visualContext; QTVisualContextRef m_visualContext;
#endif #endif
bool m_fullscreen; bool m_fullscreen;

View File

@@ -76,7 +76,7 @@ public:
m_nativeSize(640,480), m_nativeSize(640,480),
m_aspectRatioMode(Qt::KeepAspectRatio) m_aspectRatioMode(Qt::KeepAspectRatio)
{ {
setAutoFillBackground(false); setAutoFillBackground(false);
} }
void initializeGL() void initializeGL()
@@ -151,7 +151,7 @@ public:
void setNativeSize(const QSize &size) void setNativeSize(const QSize &size)
{ {
m_nativeSize = size; m_nativeSize = size;
} }
void setAspectRatioMode(Qt::AspectRatioMode mode) void setAspectRatioMode(Qt::AspectRatioMode mode)
@@ -184,8 +184,8 @@ private:
QT7MovieVideoWidget::QT7MovieVideoWidget(QObject *parent) QT7MovieVideoWidget::QT7MovieVideoWidget(QObject *parent)
:QT7VideoWidgetControl(parent), :QT7VideoWidgetControl(parent),
m_movie(0), m_movie(0),
m_videoWidget(0), m_videoWidget(0),
m_fullscreen(false), m_fullscreen(false),
m_aspectRatioMode(Qt::KeepAspectRatio), m_aspectRatioMode(Qt::KeepAspectRatio),
m_brightness(0), m_brightness(0),
@@ -325,7 +325,7 @@ bool QT7MovieVideoWidget::isFullScreen() const
void QT7MovieVideoWidget::setFullScreen(bool fullScreen) void QT7MovieVideoWidget::setFullScreen(bool fullScreen)
{ {
m_fullscreen = fullScreen; m_fullscreen = fullScreen;
} }
QSize QT7MovieVideoWidget::nativeSize() const QSize QT7MovieVideoWidget::nativeSize() const
@@ -341,7 +341,7 @@ Qt::AspectRatioMode QT7MovieVideoWidget::aspectRatioMode() const
void QT7MovieVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode) void QT7MovieVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode)
{ {
m_aspectRatioMode = mode; m_aspectRatioMode = mode;
m_videoWidget->setAspectRatioMode(mode); m_videoWidget->setAspectRatioMode(mode);
} }
int QT7MovieVideoWidget::brightness() const int QT7MovieVideoWidget::brightness() const
@@ -410,7 +410,7 @@ void QT7MovieVideoWidget::updateColors()
void QT7MovieVideoWidget::updateVideoFrame(const CVTimeStamp &ts) void QT7MovieVideoWidget::updateVideoFrame(const CVTimeStamp &ts)
{ {
#ifdef QUICKTIME_C_API_AVAILABLE #ifdef QUICKTIME_C_API_AVAILABLE
AutoReleasePool pool; AutoReleasePool pool;
// check for new frame // check for new frame
if (m_visualContext && QTVisualContextIsNewImageAvailable(m_visualContext, &ts)) { if (m_visualContext && QTVisualContextIsNewImageAvailable(m_visualContext, &ts)) {
CVOpenGLTextureRef currentFrame = NULL; CVOpenGLTextureRef currentFrame = NULL;

View File

@@ -91,7 +91,7 @@ public:
int saturation() const; int saturation() const;
void setSaturation(int saturation); void setSaturation(int saturation);
private: private:
void setupVideoOutput(); void setupVideoOutput();

View File

@@ -166,7 +166,7 @@ QT7MovieViewOutput::QT7MovieViewOutput(QObject *parent)
m_contrast(0), m_contrast(0),
m_hue(0), m_hue(0),
m_saturation(0) m_saturation(0)
{ {
} }
QT7MovieViewOutput::~QT7MovieViewOutput() QT7MovieViewOutput::~QT7MovieViewOutput()

View File

@@ -278,7 +278,7 @@ QT7MovieViewRenderer::QT7MovieViewRenderer(QObject *parent)
m_fbo(0), m_fbo(0),
m_ciContext(0), m_ciContext(0),
m_pendingRenderEvent(false) m_pendingRenderEvent(false)
{ {
} }
QT7MovieViewRenderer::~QT7MovieViewRenderer() QT7MovieViewRenderer::~QT7MovieViewRenderer()

View File

@@ -47,10 +47,10 @@ QT_USE_NAMESPACE
/* /*
QT7VideoOutputControl::QT7VideoOutputControl(QObject *parent) QT7VideoOutputControl::QT7VideoOutputControl(QObject *parent)
:QVideoOutputControl(parent), :QVideoOutputControl(parent),
m_session(0), m_session(0),
m_output(QVideoOutputControl::NoOutput) m_output(QVideoOutputControl::NoOutput)
{ {
} }
QT7VideoOutputControl::~QT7VideoOutputControl() QT7VideoOutputControl::~QT7VideoOutputControl()

View File

@@ -274,7 +274,7 @@ void tst_QCamera::testSimpleCameraExposure()
cameraExposure->setAutoShutterSpeed(); cameraExposure->setAutoShutterSpeed();
QVERIFY(cameraExposure->shutterSpeed() < 0); QVERIFY(cameraExposure->shutterSpeed() < 0);
cameraExposure->setManualShutterSpeed(1/128.0); cameraExposure->setManualShutterSpeed(1/128.0);
QVERIFY(cameraExposure->shutterSpeed() < 0); QVERIFY(cameraExposure->shutterSpeed() < 0);
} }
void tst_QCamera::testSimpleCameraFocus() void tst_QCamera::testSimpleCameraFocus()
@@ -292,7 +292,7 @@ void tst_QCamera::testSimpleCameraFocus()
QCOMPARE(cameraFocus->focusMode(), QCameraFocus::AutoFocus); QCOMPARE(cameraFocus->focusMode(), QCameraFocus::AutoFocus);
QTest::ignoreMessage(QtWarningMsg, "Focus mode selection is not supported"); QTest::ignoreMessage(QtWarningMsg, "Focus mode selection is not supported");
cameraFocus->setFocusMode(QCameraFocus::ContinuousFocus); cameraFocus->setFocusMode(QCameraFocus::ContinuousFocus);
QCOMPARE(cameraFocus->focusMode(), QCameraFocus::AutoFocus); QCOMPARE(cameraFocus->focusMode(), QCameraFocus::AutoFocus);
QCOMPARE(cameraFocus->maximumOpticalZoom(), 1.0); QCOMPARE(cameraFocus->maximumOpticalZoom(), 1.0);
QCOMPARE(cameraFocus->maximumDigitalZoom(), 1.0); QCOMPARE(cameraFocus->maximumDigitalZoom(), 1.0);
@@ -459,7 +459,7 @@ void tst_QCamera::testCameraCapture()
QVERIFY(!imageCapture.isReadyForCapture()); QVERIFY(!imageCapture.isReadyForCapture());
QSignalSpy capturedSignal(&imageCapture, SIGNAL(imageCaptured(int,QImage))); QSignalSpy capturedSignal(&imageCapture, SIGNAL(imageCaptured(int,QImage)));
QSignalSpy errorSignal(&imageCapture, SIGNAL(error(int, QCameraImageCapture::Error,QString))); QSignalSpy errorSignal(&imageCapture, SIGNAL(error(int, QCameraImageCapture::Error,QString)));
imageCapture.capture(QString::fromLatin1("/dev/null")); imageCapture.capture(QString::fromLatin1("/dev/null"));

View File

@@ -271,7 +271,7 @@ void tst_QGraphicsVideoItem::serviceDestroyed()
object.testService = 0; object.testService = 0;
delete service; delete service;
QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(&object)); QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(&object));
QVERIFY(item.boundingRect().isEmpty()); QVERIFY(item.boundingRect().isEmpty());
} }
@@ -330,7 +330,7 @@ void tst_QGraphicsVideoItem::setMediaObject()
} }
void tst_QGraphicsVideoItem::show() void tst_QGraphicsVideoItem::show()
{ {
QtTestVideoObject object(new QtTestRendererControl); QtTestVideoObject object(new QtTestRendererControl);
QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem; QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
object.bind(item); object.bind(item);
@@ -630,7 +630,7 @@ void tst_QGraphicsVideoItem::paint()
QtTestVideoObject object(new QtTestRendererControl); QtTestVideoObject object(new QtTestRendererControl);
QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem; QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
object.bind(item); object.bind(item);
QGraphicsScene graphicsScene; QGraphicsScene graphicsScene;
graphicsScene.addItem(item); graphicsScene.addItem(item);
QGraphicsView graphicsView(&graphicsScene); QGraphicsView graphicsView(&graphicsScene);

View File

@@ -560,7 +560,7 @@ void tst_QMediaPlaylist::readOnlyPlaylist()
buffer.seek(0); buffer.seek(0);
QSignalSpy errorSignal(&playlist, SIGNAL(loadFailed())); QSignalSpy errorSignal(&playlist, SIGNAL(loadFailed()));
playlist.load(&buffer, "m3u"); playlist.load(&buffer, "m3u");
QCOMPARE(errorSignal.size(), 1); QCOMPARE(errorSignal.size(), 1);
QCOMPARE(playlist.error(), QMediaPlaylist::AccessDeniedError); QCOMPARE(playlist.error(), QMediaPlaylist::AccessDeniedError);
QVERIFY(!playlist.errorString().isEmpty()); QVERIFY(!playlist.errorString().isEmpty());

View File

@@ -96,7 +96,7 @@ void tst_QMediaServiceProvider::initTestCase()
void tst_QMediaServiceProvider::testDefaultProviderAvailable() void tst_QMediaServiceProvider::testDefaultProviderAvailable()
{ {
// Must always be a default provider available // Must always be a default provider available
QVERIFY(QMediaServiceProvider::defaultServiceProvider() != 0); QVERIFY(QMediaServiceProvider::defaultServiceProvider() != 0);
} }

View File

@@ -269,7 +269,7 @@ void tst_QMediaTimeRange::testEarliestLatest()
} }
void tst_QMediaTimeRange::testContains() void tst_QMediaTimeRange::testContains()
{ {
// Test over a single interval // Test over a single interval
QMediaTimeRange x(10, 20); QMediaTimeRange x(10, 20);
@@ -282,7 +282,7 @@ void tst_QMediaTimeRange::testContains()
// Test over multiple intervals // Test over multiple intervals
x.addInterval(40, 50); x.addInterval(40, 50);
QVERIFY(!x.isEmpty()); QVERIFY(!x.isEmpty());
QVERIFY(!x.isContinuous()); QVERIFY(!x.isContinuous());
QVERIFY(x.contains(15)); QVERIFY(x.contains(15));

View File

@@ -102,7 +102,7 @@ public:
{ {
glGenTextures(1, &m_textureId); glGenTextures(1, &m_textureId);
} }
~QtTestGLVideoBuffer() ~QtTestGLVideoBuffer()
{ {
glDeleteTextures(1, &m_textureId); glDeleteTextures(1, &m_textureId);
@@ -114,7 +114,7 @@ public:
uchar *map(MapMode, int *, int *) { return 0; } uchar *map(MapMode, int *, int *) { return 0; }
void unmap() {} void unmap() {}
MapMode mapMode() const { return NotMapped; } MapMode mapMode() const { return NotMapped; }
private: private:
GLuint m_textureId; GLuint m_textureId;
@@ -131,7 +131,7 @@ public:
uchar *map(MapMode, int *, int *) { return 0; } uchar *map(MapMode, int *, int *) { return 0; }
void unmap() {} void unmap() {}
MapMode mapMode() const { return NotMapped; } MapMode mapMode() const { return NotMapped; }
}; };
void tst_QPainterVideoSurface::colors() void tst_QPainterVideoSurface::colors()

View File

@@ -112,7 +112,7 @@ void tst_QRadioTuner::initTestCase()
QSignalSpy stateSpy(radio, SIGNAL(stateChanged(QRadioTuner::State))); QSignalSpy stateSpy(radio, SIGNAL(stateChanged(QRadioTuner::State)));
QCOMPARE(radio->state(), QRadioTuner::StoppedState); QCOMPARE(radio->state(), QRadioTuner::StoppedState);
radio->start(); radio->start();
QVERIFY(radio->availability() == QMultimedia::Available); QVERIFY(radio->availability() == QMultimedia::Available);
QCOMPARE(radio->state(), QRadioTuner::ActiveState); QCOMPARE(radio->state(), QRadioTuner::ActiveState);

View File

@@ -799,7 +799,7 @@ void tst_QVideoWidget::aspectRatioRendererControl()
void tst_QVideoWidget::sizeHint_data() void tst_QVideoWidget::sizeHint_data()
{ {
QTest::addColumn<QSize>("size"); QTest::addColumn<QSize>("size");
QTest::newRow("720x576") QTest::newRow("720x576")
<< QSize(720, 576); << QSize(720, 576);
} }