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
@@ -100,7 +100,7 @@ QGstreamerVideoWidgetControl::QGstreamerVideoWidgetControl(QObject *parent)
|
||||
, m_videoSink(0)
|
||||
, m_widget(0)
|
||||
, m_fullScreen(false)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
QGstreamerVideoWidgetControl::~QGstreamerVideoWidgetControl()
|
||||
|
||||
@@ -166,11 +166,11 @@ bool QAudioDeviceInfoInternal::open()
|
||||
|
||||
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)))
|
||||
break;
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
dev = QString(QLatin1String("hw:%1,0")).arg(idx);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ void QAudioDeviceInfoInternal::updateLists()
|
||||
|| (fmt & WAVE_FORMAT_96S08)
|
||||
) {
|
||||
sizez.append(8);
|
||||
}
|
||||
}
|
||||
if ((fmt & WAVE_FORMAT_1M16)
|
||||
|| (fmt & WAVE_FORMAT_1S16)
|
||||
|| (fmt & WAVE_FORMAT_2M16)
|
||||
@@ -357,51 +357,51 @@ void QAudioDeviceInfoInternal::updateLists()
|
||||
|| (fmt & WAVE_FORMAT_96S16)
|
||||
) {
|
||||
sizez.append(16);
|
||||
}
|
||||
}
|
||||
if ((fmt & WAVE_FORMAT_1M08)
|
||||
|| (fmt & WAVE_FORMAT_1S08)
|
||||
|| (fmt & WAVE_FORMAT_1M16)
|
||||
|| (fmt & WAVE_FORMAT_1S16)) {
|
||||
sampleRatez.append(11025);
|
||||
}
|
||||
}
|
||||
if ((fmt & WAVE_FORMAT_2M08)
|
||||
|| (fmt & WAVE_FORMAT_2S08)
|
||||
|| (fmt & WAVE_FORMAT_2M16)
|
||||
|| (fmt & WAVE_FORMAT_2S16)) {
|
||||
sampleRatez.append(22050);
|
||||
}
|
||||
}
|
||||
if ((fmt & WAVE_FORMAT_4M08)
|
||||
|| (fmt & WAVE_FORMAT_4S08)
|
||||
|| (fmt & WAVE_FORMAT_4M16)
|
||||
|| (fmt & WAVE_FORMAT_4S16)) {
|
||||
sampleRatez.append(44100);
|
||||
}
|
||||
}
|
||||
if ((fmt & WAVE_FORMAT_48M08)
|
||||
|| (fmt & WAVE_FORMAT_48S08)
|
||||
|| (fmt & WAVE_FORMAT_48M16)
|
||||
|| (fmt & WAVE_FORMAT_48S16)) {
|
||||
sampleRatez.append(48000);
|
||||
}
|
||||
}
|
||||
if ((fmt & WAVE_FORMAT_96M08)
|
||||
|| (fmt & WAVE_FORMAT_96S08)
|
||||
|| (fmt & WAVE_FORMAT_96M16)
|
||||
|| (fmt & WAVE_FORMAT_96S16)) {
|
||||
sampleRatez.append(96000);
|
||||
}
|
||||
channelz.append(1);
|
||||
channelz.append(2);
|
||||
channelz.append(1);
|
||||
channelz.append(2);
|
||||
if (mode == QAudio::AudioOutput) {
|
||||
channelz.append(4);
|
||||
channelz.append(6);
|
||||
channelz.append(8);
|
||||
}
|
||||
|
||||
byteOrderz.append(QAudioFormat::LittleEndian);
|
||||
byteOrderz.append(QAudioFormat::LittleEndian);
|
||||
|
||||
typez.append(QAudioFormat::SignedInt);
|
||||
typez.append(QAudioFormat::UnSignedInt);
|
||||
typez.append(QAudioFormat::SignedInt);
|
||||
typez.append(QAudioFormat::UnSignedInt);
|
||||
|
||||
codecz.append(QLatin1String("audio/pcm"));
|
||||
codecz.append(QLatin1String("audio/pcm"));
|
||||
}
|
||||
if (sampleRatez.count() > 0)
|
||||
sampleRatez.prepend(8000);
|
||||
|
||||
@@ -505,7 +505,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
|
||||
deviceState = QAudio::ActiveState;
|
||||
emit stateChanged(deviceState);
|
||||
}
|
||||
resuming = false;
|
||||
resuming = false;
|
||||
}
|
||||
} else {
|
||||
l = qMin<qint64>(len, waveBlocks[header].dwBytesRecorded - waveBlockOffset);
|
||||
@@ -523,7 +523,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
|
||||
deviceState = QAudio::ActiveState;
|
||||
emit stateChanged(deviceState);
|
||||
}
|
||||
resuming = false;
|
||||
resuming = false;
|
||||
}
|
||||
} else {
|
||||
//no data, not ready yet, next time
|
||||
@@ -583,7 +583,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
written+=l;
|
||||
written+=l;
|
||||
}
|
||||
#ifdef DEBUG_AUDIO
|
||||
qDebug()<<"read in len="<<written;
|
||||
@@ -611,7 +611,7 @@ void QAudioInputPrivate::resume()
|
||||
mutex.unlock();
|
||||
|
||||
header = 0;
|
||||
resuming = true;
|
||||
resuming = true;
|
||||
waveBlockOffset = 0;
|
||||
waveInStart(hWaveIn);
|
||||
QTimer::singleShot(20,this,SLOT(feedback()));
|
||||
@@ -689,8 +689,8 @@ bool QAudioInputPrivate::deviceReady()
|
||||
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);
|
||||
a->trigger();
|
||||
InputPrivate* a = qobject_cast<InputPrivate*>(audioSource);
|
||||
a->trigger();
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
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)
|
||||
break;
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
dev = QString(QLatin1String("hw:%1,0")).arg(idx);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ void CALLBACK QAudioOutputPrivate::waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
|
||||
case WOM_DONE:
|
||||
if(qAudio->finished || qAudio->buffer_size == 0 || qAudio->period_size == 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
qAudio->waveFreeBlockCount++;
|
||||
if(qAudio->waveFreeBlockCount >= qAudio->buffer_size/qAudio->period_size)
|
||||
qAudio->waveFreeBlockCount = qAudio->buffer_size/qAudio->period_size;
|
||||
@@ -590,28 +590,28 @@ bool QAudioOutputPrivate::deviceReady()
|
||||
#endif
|
||||
bool startup = false;
|
||||
if(totalTimeValue == 0)
|
||||
startup = true;
|
||||
startup = true;
|
||||
|
||||
bool full=false;
|
||||
bool full=false;
|
||||
|
||||
mutex.lock();
|
||||
if(waveFreeBlockCount==0) full = true;
|
||||
if (waveFreeBlockCount==0) full = true;
|
||||
mutex.unlock();
|
||||
|
||||
if (full){
|
||||
if (full) {
|
||||
#ifdef DEBUG_AUDIO
|
||||
qDebug() << "Skipping data as unable to write";
|
||||
#endif
|
||||
if((timeStamp.elapsed() + elapsedTimeOffset) > intervalTime ) {
|
||||
if ((timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) {
|
||||
emit notify();
|
||||
elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime;
|
||||
timeStamp.restart();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime;
|
||||
timeStamp.restart();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if(startup)
|
||||
waveOutPause(hWaveOut);
|
||||
waveOutPause(hWaveOut);
|
||||
int input = period_size*chunks;
|
||||
int l = audioSource->read(audioBuffer,input);
|
||||
if(l > 0) {
|
||||
@@ -626,8 +626,8 @@ bool QAudioOutputPrivate::deviceReady()
|
||||
// Didn't write all data
|
||||
audioSource->seek(audioSource->pos()-(l-out));
|
||||
}
|
||||
if(startup)
|
||||
waveOutRestart(hWaveOut);
|
||||
if (startup)
|
||||
waveOutRestart(hWaveOut);
|
||||
} else if(l == 0) {
|
||||
bytesAvailable = bytesFree();
|
||||
|
||||
@@ -654,7 +654,7 @@ bool QAudioOutputPrivate::deviceReady()
|
||||
int buffered;
|
||||
|
||||
mutex.lock();
|
||||
buffered = waveFreeBlockCount;
|
||||
buffered = waveFreeBlockCount;
|
||||
mutex.unlock();
|
||||
|
||||
if (buffered >= buffer_size/period_size && deviceState == QAudio::ActiveState) {
|
||||
@@ -670,7 +670,7 @@ bool QAudioOutputPrivate::deviceReady()
|
||||
|
||||
if(intervalTime && (timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) {
|
||||
emit notify();
|
||||
elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime;
|
||||
elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime;
|
||||
timeStamp.restart();
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class Q_MULTIMEDIA_EXPORT QCameraFlashControl : public QMediaControl
|
||||
|
||||
public:
|
||||
~QCameraFlashControl();
|
||||
|
||||
|
||||
virtual QCameraExposure::FlashModes flashMode() const = 0;
|
||||
virtual void setFlashMode(QCameraExposure::FlashModes mode) = 0;
|
||||
virtual bool isFlashModeSupported(QCameraExposure::FlashModes mode) const = 0;
|
||||
|
||||
@@ -57,7 +57,7 @@ class Q_MULTIMEDIA_EXPORT QCameraLocksControl : public QMediaControl
|
||||
Q_OBJECT
|
||||
public:
|
||||
~QCameraLocksControl();
|
||||
|
||||
|
||||
virtual QCamera::LockTypes supportedLocks() const = 0;
|
||||
|
||||
virtual QCamera::LockStatus lockStatus(QCamera::LockType lock) const = 0;
|
||||
|
||||
@@ -64,7 +64,7 @@ class Q_MULTIMEDIA_EXPORT QImageEncoderControl : public QMediaControl
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
virtual ~QImageEncoderControl();
|
||||
virtual ~QImageEncoderControl();
|
||||
|
||||
virtual QStringList supportedImageCodecs() const = 0;
|
||||
virtual QString imageCodecDescription(const QString &codecName) const = 0;
|
||||
|
||||
@@ -34,44 +34,44 @@ hr {
|
||||
}
|
||||
|
||||
table.valuelist {
|
||||
border-width: 1px 1px 1px 1px;
|
||||
border-style: solid;
|
||||
border-color: #dddddd;
|
||||
border-collapse: collapse;
|
||||
background-color: #f0f0f0;
|
||||
border-width: 1px 1px 1px 1px;
|
||||
border-style: solid;
|
||||
border-color: #dddddd;
|
||||
border-collapse: collapse;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
table.indextable {
|
||||
border-width: 1px 1px 1px 1px;
|
||||
border-style: solid;
|
||||
border-collapse: collapse;
|
||||
background-color: #f0f0f0;
|
||||
border-width: 1px 1px 1px 1px;
|
||||
border-style: solid;
|
||||
border-collapse: collapse;
|
||||
background-color: #f0f0f0;
|
||||
border-color:#555;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
table td.largeindex {
|
||||
border-width: 1px 1px 1px 1px;
|
||||
border-collapse: collapse;
|
||||
background-color: #f0f0f0;
|
||||
border-width: 1px 1px 1px 1px;
|
||||
border-collapse: collapse;
|
||||
background-color: #f0f0f0;
|
||||
border-color:#555;
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
table.valuelist th {
|
||||
border-width: 1px 1px 1px 2px;
|
||||
padding: 4px;
|
||||
border-style: solid;
|
||||
border-color: #666;
|
||||
border-width: 1px 1px 1px 2px;
|
||||
padding: 4px;
|
||||
border-style: solid;
|
||||
border-color: #666;
|
||||
color:white;
|
||||
background-color:#666;
|
||||
}
|
||||
|
||||
th.titleheader {
|
||||
border-width: 1px 0px 1px 0px;
|
||||
padding: 2px;
|
||||
border-style: solid;
|
||||
border-color: #666;
|
||||
border-width: 1px 0px 1px 0px;
|
||||
padding: 2px;
|
||||
border-style: solid;
|
||||
border-color: #666;
|
||||
color:white;
|
||||
background-color:#555;
|
||||
background-image:url('images/gradient.png')};
|
||||
@@ -81,10 +81,10 @@ th.titleheader {
|
||||
|
||||
|
||||
th.largeheader {
|
||||
border-width: 1px 0px 1px 0px;
|
||||
padding: 4px;
|
||||
border-style: solid;
|
||||
border-color: #444;
|
||||
border-width: 1px 0px 1px 0px;
|
||||
padding: 4px;
|
||||
border-style: solid;
|
||||
border-color: #444;
|
||||
color:white;
|
||||
background-color:#555555;
|
||||
font-size: 120%;
|
||||
@@ -143,7 +143,7 @@ table.generic, table.annotated
|
||||
{
|
||||
border-width: 1px;
|
||||
border-color:#bbb;
|
||||
border-style:solid;
|
||||
border-style:solid;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class QGstreamerVideoRenderer : public QVideoRendererControl, public QGstreamerV
|
||||
public:
|
||||
QGstreamerVideoRenderer(QObject *parent = 0);
|
||||
virtual ~QGstreamerVideoRenderer();
|
||||
|
||||
|
||||
QAbstractVideoSurface *surface() const;
|
||||
void setSurface(QAbstractVideoSurface *surface);
|
||||
|
||||
@@ -73,7 +73,7 @@ signals:
|
||||
private slots:
|
||||
void handleFormatChange();
|
||||
|
||||
private:
|
||||
private:
|
||||
QVideoSurfaceGstSink *m_videoSink;
|
||||
QPointer<QAbstractVideoSurface> m_surface;
|
||||
};
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
int bufferStatus() const;
|
||||
|
||||
bool isSeekable() const;
|
||||
qreal playbackRate() const;
|
||||
qreal playbackRate() const;
|
||||
|
||||
Error error() const;
|
||||
QString errorString() const;
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
QGraphicsVideoItem(QGraphicsItem *parent = 0);
|
||||
~QGraphicsVideoItem();
|
||||
|
||||
QMediaObject *mediaObject() const;
|
||||
QMediaObject *mediaObject() const;
|
||||
|
||||
Qt::AspectRatioMode aspectRatioMode() const;
|
||||
void setAspectRatioMode(Qt::AspectRatioMode mode);
|
||||
|
||||
@@ -841,7 +841,7 @@ QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
|
||||
painter->fillRect(target, Qt::black);
|
||||
return QAbstractVideoSurface::NoError;
|
||||
}
|
||||
|
||||
|
||||
const QAbstractVideoBuffer::HandleType h = m_frame.handleType();
|
||||
if (h == QAbstractVideoBuffer::NoHandle || h == QAbstractVideoBuffer::GLTextureHandle) {
|
||||
bool stencilTestEnabled = glIsEnabled(GL_STENCIL_TEST);
|
||||
|
||||
@@ -67,9 +67,9 @@ class Q_MULTIMEDIAWIDGETS_EXPORT QVideoWidget : public QWidget, public QMediaBin
|
||||
|
||||
public:
|
||||
QVideoWidget(QWidget *parent = 0);
|
||||
~QVideoWidget();
|
||||
~QVideoWidget();
|
||||
|
||||
QMediaObject *mediaObject() const;
|
||||
QMediaObject *mediaObject() const;
|
||||
|
||||
#ifdef Q_QDOC
|
||||
bool isFullScreen() const;
|
||||
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
QVideoWidgetPrivate()
|
||||
: q_ptr(0)
|
||||
, mediaObject(0)
|
||||
, service(0)
|
||||
, service(0)
|
||||
, widgetBackend(0)
|
||||
, windowBackend(0)
|
||||
, rendererBackend(0)
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject)
|
||||
{
|
||||
if (NULL == ppvObject)
|
||||
if (NULL == ppvObject)
|
||||
return E_POINTER;
|
||||
if (riid == IID_IUnknown /*__uuidof(IUnknown) */ ) {
|
||||
*ppvObject = static_cast<IUnknown*>(this);
|
||||
@@ -380,9 +380,9 @@ QSize DSCameraSession::frameSize() const
|
||||
|
||||
void DSCameraSession::setFrameSize(const QSize& s)
|
||||
{
|
||||
if (supportedResolutions(pixelF).contains(s))
|
||||
if (supportedResolutions(pixelF).contains(s))
|
||||
m_windowSize = s;
|
||||
else
|
||||
else
|
||||
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)
|
||||
{
|
||||
if (!resolutions.contains(format))
|
||||
return QList<QSize>();
|
||||
if (!resolutions.contains(format))
|
||||
return QList<QSize>();
|
||||
return resolutions.value(format);
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ DSVideoWidgetControl::DSVideoWidgetControl(DSCameraSession* session, QObject *pa
|
||||
m_widget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
m_widget->setAlignment(Qt::AlignCenter);
|
||||
m_widget->setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
|
||||
|
||||
surface = new DSVideoWidgetSurface(m_widget);
|
||||
|
||||
QPalette palette;
|
||||
@@ -157,7 +157,7 @@ bool DSVideoWidgetControl::eventFilter(QObject *object, QEvent *e)
|
||||
case QEvent::PolishRequest:
|
||||
m_widget->ensurePolished();
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
// Do nothing
|
||||
break;
|
||||
|
||||
@@ -82,15 +82,15 @@ class DSVideoWidgetSurface : public QAbstractVideoSurface
|
||||
class DSVideoWidgetControl : public QVideoWidgetControl
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
DSVideoWidgetSurface* surface;
|
||||
public: // Constructor & Destructor
|
||||
|
||||
|
||||
DSVideoWidgetControl(DSCameraSession* session, QObject *parent = 0);
|
||||
virtual ~DSVideoWidgetControl();
|
||||
|
||||
public: // QVideoWidgetControl
|
||||
|
||||
|
||||
QWidget *videoWidget();
|
||||
|
||||
// Aspect Ratio
|
||||
@@ -118,10 +118,10 @@ public: // QVideoWidgetControl
|
||||
void setSaturation(int saturation);
|
||||
|
||||
public: // Internal
|
||||
|
||||
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
Q_SIGNALS: // QVideoWidgetControl
|
||||
|
||||
void fullScreenChanged(bool fullScreen);
|
||||
|
||||
@@ -94,7 +94,7 @@ void DirectShowEventLoop::wait(QMutex *mutex)
|
||||
HANDLE handles[] = { m_eventHandle, m_waitHandle };
|
||||
while (::WaitForMultipleObjects(2, handles, false, INFINITE) == WAIT_OBJECT_0)
|
||||
processEvents();
|
||||
|
||||
|
||||
mutex->lock();
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ DECLARE_INTERFACE_(IFilterGraph2 ,IGraphBuilder)
|
||||
STDMETHOD(ReconnectEx)(THIS_ IPin *, const AM_MEDIA_TYPE *) PURE;
|
||||
STDMETHOD(RenderEx)(IPin *, DWORD, DWORD *) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
#undef INTERFACE
|
||||
#endif
|
||||
|
||||
#ifndef __IAMFilterMiscFlags_INTERFACE_DEFINED__
|
||||
@@ -89,7 +89,7 @@ DECLARE_INTERFACE_(IAMFilterMiscFlags ,IUnknown)
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,GetMiscFlags)(THIS) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
#undef INTERFACE
|
||||
#endif
|
||||
|
||||
#ifndef __IFileSourceFilter_INTERFACE_DEFINED__
|
||||
@@ -103,7 +103,7 @@ DECLARE_INTERFACE_(IFileSourceFilter ,IUnknown)
|
||||
STDMETHOD(Load)(THIS_ LPCOLESTR, const AM_MEDIA_TYPE *) PURE;
|
||||
STDMETHOD(GetCurFile)(THIS_ LPOLESTR *ppszFileName, AM_MEDIA_TYPE *) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
#undef INTERFACE
|
||||
#endif
|
||||
|
||||
#ifndef __IAMOpenProgress_INTERFACE_DEFINED__
|
||||
@@ -117,7 +117,7 @@ DECLARE_INTERFACE_(IAMOpenProgress ,IUnknown)
|
||||
STDMETHOD(QueryProgress)(THIS_ LONGLONG *, LONGLONG *) PURE;
|
||||
STDMETHOD(AbortOperation)(THIS) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
#undef INTERFACE
|
||||
#endif
|
||||
|
||||
#ifndef __IFilterChain_INTERFACE_DEFINED__
|
||||
@@ -133,7 +133,7 @@ DECLARE_INTERFACE_(IFilterChain ,IUnknown)
|
||||
STDMETHOD(StopChain)(IBaseFilter *, IBaseFilter *) PURE;
|
||||
STDMETHOD(RemoveChain)(IBaseFilter *, IBaseFilter *) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
#undef INTERFACE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -259,7 +259,7 @@ HRESULT DirectShowIOReader::SyncReadAligned(IMediaSample *pSample)
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
pSample->SetActualDataLength(bytesRead);
|
||||
|
||||
|
||||
return hr;
|
||||
} else {
|
||||
m_synchronousPosition = position;
|
||||
|
||||
@@ -336,7 +336,7 @@ HRESULT DirectShowIOSource::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
||||
return VFW_E_NOT_STOPPED;
|
||||
} else if (m_peerPin) {
|
||||
return VFW_E_ALREADY_CONNECTED;
|
||||
} else {
|
||||
} else {
|
||||
HRESULT hr = VFW_E_TYPE_NOT_ACCEPTED;
|
||||
|
||||
m_peerPin = pReceivePin;
|
||||
@@ -424,7 +424,7 @@ HRESULT DirectShowIOSource::tryConnect(IPin *pin, const AM_MEDIA_TYPE *type)
|
||||
|| m_allocator->GetProperties(&properties) == S_OK) {
|
||||
if (properties.cbAlign == 0)
|
||||
properties.cbAlign = 1;
|
||||
|
||||
|
||||
ALLOCATOR_PROPERTIES actualProperties;
|
||||
if (SUCCEEDED(hr = m_allocator->SetProperties(&properties, &actualProperties)))
|
||||
hr = memPin->NotifyAllocator(m_allocator, TRUE);
|
||||
@@ -435,7 +435,7 @@ HRESULT DirectShowIOSource::tryConnect(IPin *pin, const AM_MEDIA_TYPE *type)
|
||||
}
|
||||
}
|
||||
memPin->Release();
|
||||
}
|
||||
}
|
||||
if (!SUCCEEDED(hr))
|
||||
pin->Disconnect();
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key)
|
||||
WORD word;
|
||||
if (header->GetAttributeByName(
|
||||
&streamNumber,
|
||||
key,
|
||||
key,
|
||||
&type,
|
||||
reinterpret_cast<BYTE *>(&word),
|
||||
&size) == S_OK) {
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
bool isVideoAvailable() const;
|
||||
|
||||
bool isSeekable() const;
|
||||
|
||||
|
||||
QMediaTimeRange availablePlaybackRanges() const;
|
||||
|
||||
qreal playbackRate() const;
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
bool m_seekable;
|
||||
QMediaContent m_media;
|
||||
QString m_errorString;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -563,7 +563,7 @@ void DirectShowPlayerService::releaseGraph()
|
||||
}
|
||||
m_graph->Abort();
|
||||
}
|
||||
|
||||
|
||||
m_pendingTasks = ReleaseGraph;
|
||||
|
||||
::SetEvent(m_taskHandle);
|
||||
@@ -803,7 +803,7 @@ void DirectShowPlayerService::doStop(QMutexLocker *locker)
|
||||
m_pendingTasks |= Seek;
|
||||
|
||||
m_executedTasks &= ~(Play | Pause);
|
||||
|
||||
|
||||
QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
|
||||
}
|
||||
|
||||
@@ -852,7 +852,7 @@ void DirectShowPlayerService::doSetRate(QMutexLocker *locker)
|
||||
|
||||
seeking->Release();
|
||||
} else if (m_rate != 1.0) {
|
||||
m_rate = 1.0;
|
||||
m_rate = 1.0;
|
||||
}
|
||||
QCoreApplication::postEvent(this, new QEvent(QEvent::Type(RateChange)));
|
||||
}
|
||||
@@ -980,7 +980,7 @@ void DirectShowPlayerService::setAudioOutput(IBaseFilter *filter)
|
||||
m_loop->wait(&m_mutex);
|
||||
}
|
||||
m_audioOutput->Release();
|
||||
}
|
||||
}
|
||||
|
||||
m_audioOutput = filter;
|
||||
|
||||
|
||||
@@ -308,10 +308,10 @@ void DirectShowSampleScheduler::run(REFERENCE_TIME startTime)
|
||||
for (DirectShowTimedSample *sample = m_head; sample; sample = sample->nextSample()) {
|
||||
sample->schedule(m_clock, m_startTime, m_timeoutEvent);
|
||||
}
|
||||
|
||||
|
||||
if (!(m_state & Flushing))
|
||||
::ResetEvent(m_flushEvent);
|
||||
|
||||
|
||||
if (!m_head)
|
||||
::SetEvent(m_timeoutEvent);
|
||||
|
||||
@@ -338,7 +338,7 @@ void DirectShowSampleScheduler::stop()
|
||||
|
||||
for (DirectShowTimedSample *sample = m_head; sample; sample = sample->remove()) {
|
||||
sample->unschedule(m_clock);
|
||||
|
||||
|
||||
m_semaphore.release(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ VideoSurfaceFilter::~VideoSurfaceFilter()
|
||||
}
|
||||
|
||||
HRESULT VideoSurfaceFilter::QueryInterface(REFIID riid, void **ppvObject)
|
||||
{
|
||||
{
|
||||
// 2dd74950-a890-11d1-abe8-00a0c905f375
|
||||
static const GUID iid_IAmFilterMiscFlags = {
|
||||
0x2dd74950, 0xa890, 0x11d1, {0xab, 0xe8, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75} };
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
bool isFlashReady() const;
|
||||
|
||||
private:
|
||||
CameraBinSession *m_session;
|
||||
CameraBinSession *m_session;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
void setCaptureMode(QCamera::CaptureModes mode);
|
||||
|
||||
QUrl outputLocation() const;
|
||||
bool setOutputLocation(const QUrl& sink);
|
||||
bool setOutputLocation(const QUrl& sink);
|
||||
|
||||
QDir defaultDir(QCamera::CaptureModes mode) const;
|
||||
QString generateFileName(const QString &prefix, const QDir &dir, const QString &ext) const;
|
||||
|
||||
@@ -65,7 +65,7 @@ CameraButtonListener::~CameraButtonListener()
|
||||
void CameraButtonListener::handleQmKeyEvent(MeeGo::QmKeys::Key key, MeeGo::QmKeys::State state)
|
||||
{
|
||||
if (key == MeeGo::QmKeys::Camera) {
|
||||
QWidget *window = QApplication::focusWidget();
|
||||
QWidget *window = QApplication::focusWidget();
|
||||
|
||||
bool focusPressed = (state == MeeGo::QmKeys::KeyHalfDown) ||
|
||||
(state == MeeGo::QmKeys::KeyDown);
|
||||
|
||||
@@ -491,7 +491,7 @@ void QGstreamerPlayerSession::setVideoRenderer(QObject *videoOutput)
|
||||
}
|
||||
}
|
||||
|
||||
QGstreamerVideoRendererInterface* renderer = qobject_cast<QGstreamerVideoRendererInterface*>(videoOutput);
|
||||
QGstreamerVideoRendererInterface* renderer = qobject_cast<QGstreamerVideoRendererInterface*>(videoOutput);
|
||||
|
||||
m_renderer = renderer;
|
||||
|
||||
@@ -646,7 +646,7 @@ void QGstreamerPlayerSession::finishVideoOutputChange()
|
||||
m_pendingVideoSink = 0;
|
||||
gst_object_unref(GST_OBJECT(srcPad));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_usingColorspaceElement) {
|
||||
gst_element_set_state(m_colorSpace, GST_STATE_NULL);
|
||||
|
||||
@@ -51,7 +51,7 @@ QT_USE_NAMESPACE
|
||||
|
||||
QT7PlayerControl::QT7PlayerControl(QObject *parent)
|
||||
: QMediaPlayerControl(parent)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
QT7PlayerControl::~QT7PlayerControl()
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
|
||||
|
||||
private:
|
||||
CVDisplayLinkRef m_displayLink;
|
||||
QMutex m_displayLinkMutex;
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
private Q_SLOTS:
|
||||
void updateVideoFrame(const CVTimeStamp &ts);
|
||||
|
||||
|
||||
private:
|
||||
void setupVideoOutput();
|
||||
bool createPixelBufferVisualContext();
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
|
||||
QCvDisplayLink *m_displayLink;
|
||||
#ifdef QUICKTIME_C_API_AVAILABLE
|
||||
QTVisualContextRef m_visualContext;
|
||||
QTVisualContextRef m_visualContext;
|
||||
bool m_usingGLContext;
|
||||
const QGLContext *m_currentGLContext;
|
||||
QSize m_pixelBufferContextGeometry;
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
|
||||
private Q_SLOTS:
|
||||
void updateVideoFrame(const CVTimeStamp &ts);
|
||||
|
||||
|
||||
private:
|
||||
void setupVideoOutput();
|
||||
bool createVisualContext();
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
QCvDisplayLink *m_displayLink;
|
||||
|
||||
#ifdef QUICKTIME_C_API_AVAILABLE
|
||||
QTVisualContextRef m_visualContext;
|
||||
QTVisualContextRef m_visualContext;
|
||||
#endif
|
||||
|
||||
bool m_fullscreen;
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
m_nativeSize(640,480),
|
||||
m_aspectRatioMode(Qt::KeepAspectRatio)
|
||||
{
|
||||
setAutoFillBackground(false);
|
||||
setAutoFillBackground(false);
|
||||
}
|
||||
|
||||
void initializeGL()
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
|
||||
void setNativeSize(const QSize &size)
|
||||
{
|
||||
m_nativeSize = size;
|
||||
m_nativeSize = size;
|
||||
}
|
||||
|
||||
void setAspectRatioMode(Qt::AspectRatioMode mode)
|
||||
@@ -184,8 +184,8 @@ private:
|
||||
|
||||
QT7MovieVideoWidget::QT7MovieVideoWidget(QObject *parent)
|
||||
:QT7VideoWidgetControl(parent),
|
||||
m_movie(0),
|
||||
m_videoWidget(0),
|
||||
m_movie(0),
|
||||
m_videoWidget(0),
|
||||
m_fullscreen(false),
|
||||
m_aspectRatioMode(Qt::KeepAspectRatio),
|
||||
m_brightness(0),
|
||||
@@ -325,7 +325,7 @@ bool QT7MovieVideoWidget::isFullScreen() const
|
||||
|
||||
void QT7MovieVideoWidget::setFullScreen(bool fullScreen)
|
||||
{
|
||||
m_fullscreen = fullScreen;
|
||||
m_fullscreen = fullScreen;
|
||||
}
|
||||
|
||||
QSize QT7MovieVideoWidget::nativeSize() const
|
||||
@@ -341,7 +341,7 @@ Qt::AspectRatioMode QT7MovieVideoWidget::aspectRatioMode() const
|
||||
void QT7MovieVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode)
|
||||
{
|
||||
m_aspectRatioMode = mode;
|
||||
m_videoWidget->setAspectRatioMode(mode);
|
||||
m_videoWidget->setAspectRatioMode(mode);
|
||||
}
|
||||
|
||||
int QT7MovieVideoWidget::brightness() const
|
||||
@@ -410,7 +410,7 @@ void QT7MovieVideoWidget::updateColors()
|
||||
void QT7MovieVideoWidget::updateVideoFrame(const CVTimeStamp &ts)
|
||||
{
|
||||
#ifdef QUICKTIME_C_API_AVAILABLE
|
||||
AutoReleasePool pool;
|
||||
AutoReleasePool pool;
|
||||
// check for new frame
|
||||
if (m_visualContext && QTVisualContextIsNewImageAvailable(m_visualContext, &ts)) {
|
||||
CVOpenGLTextureRef currentFrame = NULL;
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
int saturation() const;
|
||||
void setSaturation(int saturation);
|
||||
|
||||
|
||||
private:
|
||||
void setupVideoOutput();
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ QT7MovieViewOutput::QT7MovieViewOutput(QObject *parent)
|
||||
m_contrast(0),
|
||||
m_hue(0),
|
||||
m_saturation(0)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
QT7MovieViewOutput::~QT7MovieViewOutput()
|
||||
|
||||
@@ -278,7 +278,7 @@ QT7MovieViewRenderer::QT7MovieViewRenderer(QObject *parent)
|
||||
m_fbo(0),
|
||||
m_ciContext(0),
|
||||
m_pendingRenderEvent(false)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
QT7MovieViewRenderer::~QT7MovieViewRenderer()
|
||||
|
||||
@@ -47,10 +47,10 @@ QT_USE_NAMESPACE
|
||||
|
||||
/*
|
||||
QT7VideoOutputControl::QT7VideoOutputControl(QObject *parent)
|
||||
:QVideoOutputControl(parent),
|
||||
:QVideoOutputControl(parent),
|
||||
m_session(0),
|
||||
m_output(QVideoOutputControl::NoOutput)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
QT7VideoOutputControl::~QT7VideoOutputControl()
|
||||
|
||||
Reference in New Issue
Block a user