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:
committed by
The Qt Project
parent
b690a4d902
commit
5980bc41cf
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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%;
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ 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";
|
||||||
@@ -466,7 +466,7 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user