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
@@ -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