summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-03 11:30:03 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-03 11:31:22 (GMT)
commit1f61ac3f28e8d2a765d12dea0f364cdd8082b7e1 (patch)
treecd5e02ce4db051781be5e0b5db2edb69ef19d9a9 /src
parent128717b171f01c82e5f0fb83f5923d4f7b9cfc10 (diff)
downloadQt-1f61ac3f28e8d2a765d12dea0f364cdd8082b7e1.zip
Qt-1f61ac3f28e8d2a765d12dea0f364cdd8082b7e1.tar.gz
Qt-1f61ac3f28e8d2a765d12dea0f364cdd8082b7e1.tar.bz2
Fixed warnings on phonon/ds9 with mingw (gcc 4)
Reviewed-by: Trustme
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/ds9/abstractvideorenderer.cpp4
-rw-r--r--src/3rdparty/phonon/ds9/fakesource.cpp2
-rw-r--r--src/3rdparty/phonon/ds9/iodevicereader.cpp2
-rw-r--r--src/3rdparty/phonon/ds9/mediagraph.cpp8
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.cpp7
-rw-r--r--src/3rdparty/phonon/ds9/qbasefilter.cpp7
-rw-r--r--src/3rdparty/phonon/ds9/qmeminputpin.cpp7
-rw-r--r--src/3rdparty/phonon/ds9/qpin.cpp8
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_soft.cpp6
9 files changed, 28 insertions, 23 deletions
diff --git a/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp b/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp
index e932e70..a9d0694 100644
--- a/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp
+++ b/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp
@@ -99,8 +99,8 @@ namespace Phonon
m_dstX = m_dstY = 0;
if (ratio > 0) {
- if (realWidth / realHeight > ratio && scaleMode == Phonon::VideoWidget::FitInView
- || realWidth / realHeight < ratio && scaleMode == Phonon::VideoWidget::ScaleAndCrop) {
+ if ((realWidth / realHeight > ratio && scaleMode == Phonon::VideoWidget::FitInView)
+ || (realWidth / realHeight < ratio && scaleMode == Phonon::VideoWidget::ScaleAndCrop)) {
//the height is correct, let's change the width
m_dstWidth = qRound(realHeight * ratio);
m_dstX = qRound((realWidth - realHeight * ratio) / 2.);
diff --git a/src/3rdparty/phonon/ds9/fakesource.cpp b/src/3rdparty/phonon/ds9/fakesource.cpp
index a4d4640..4dce138 100644
--- a/src/3rdparty/phonon/ds9/fakesource.cpp
+++ b/src/3rdparty/phonon/ds9/fakesource.cpp
@@ -29,7 +29,7 @@ namespace Phonon
namespace DS9
{
static WAVEFORMATEX g_defaultWaveFormat = {WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, 0};
- static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, {sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0} };
+ static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, {0}, 0, {sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0} };
static const AM_MEDIA_TYPE g_fakeAudioType = {MEDIATYPE_Audio, MEDIASUBTYPE_PCM, 0, 0, 2, FORMAT_WaveFormatEx, 0, sizeof(WAVEFORMATEX), reinterpret_cast<BYTE*>(&g_defaultWaveFormat)};
static const AM_MEDIA_TYPE g_fakeVideoType = {MEDIATYPE_Video, MEDIASUBTYPE_RGB32, TRUE, FALSE, 0, FORMAT_VideoInfo2, 0, sizeof(VIDEOINFOHEADER2), reinterpret_cast<BYTE*>(&g_defaultVideoInfo)};
diff --git a/src/3rdparty/phonon/ds9/iodevicereader.cpp b/src/3rdparty/phonon/ds9/iodevicereader.cpp
index 38c983b..a885a69 100644
--- a/src/3rdparty/phonon/ds9/iodevicereader.cpp
+++ b/src/3rdparty/phonon/ds9/iodevicereader.cpp
@@ -167,7 +167,7 @@ namespace Phonon
oldSize = currentBufferSize();
}
- DWORD bytesRead = qMin(currentBufferSize(), int(length));
+ int bytesRead = qMin(currentBufferSize(), int(length));
{
QWriteLocker locker(&m_lock);
qMemCopy(buffer, m_buffer.data(), bytesRead);
diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp
index 31a0622..7b10176 100644
--- a/src/3rdparty/phonon/ds9/mediagraph.cpp
+++ b/src/3rdparty/phonon/ds9/mediagraph.cpp
@@ -68,6 +68,8 @@ namespace Phonon
return ret;
}
+
+/*
static HRESULT saveToFile(Graph graph, const QString &filepath)
{
const WCHAR wszStreamName[] = L"ActiveMovieGraph";
@@ -103,7 +105,7 @@ namespace Phonon
return hr;
}
-
+*/
MediaGraph::MediaGraph(MediaObject *mo, short index) :
m_graph(CLSID_FilterGraph, IID_IGraphBuilder),
@@ -537,7 +539,7 @@ namespace Phonon
const QList<OutputPin> outputs = BackendNode::pins(filter, PINDIR_OUTPUT);
for(int i = 0; i < outputs.count(); ++i) {
const OutputPin &pin = outputs.at(i);
- if (VFW_E_NOT_CONNECTED == pin->ConnectedTo(inPin.pparam())) {
+ if (HRESULT(VFW_E_NOT_CONNECTED) == pin->ConnectedTo(inPin.pparam())) {
return SUCCEEDED(pin->Connect(newIn, 0));
}
}
@@ -809,7 +811,7 @@ namespace Phonon
for (int i = 0; i < outputs.count(); ++i) {
const OutputPin &out = outputs.at(i);
InputPin pin;
- if (out->ConnectedTo(pin.pparam()) == VFW_E_NOT_CONNECTED) {
+ if (out->ConnectedTo(pin.pparam()) == HRESULT(VFW_E_NOT_CONNECTED)) {
m_decoderPins += out; //unconnected outputs can be decoded outputs
}
}
diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp
index df42011..10782c2 100644
--- a/src/3rdparty/phonon/ds9/mediaobject.cpp
+++ b/src/3rdparty/phonon/ds9/mediaobject.cpp
@@ -786,15 +786,16 @@ namespace Phonon
case Phonon::PausedState:
pause();
break;
- case Phonon::StoppedState:
- stop();
- break;
case Phonon::PlayingState:
play();
break;
case Phonon::ErrorState:
setState(Phonon::ErrorState);
break;
+ case Phonon::StoppedState:
+ default:
+ stop();
+ break;
}
}
}
diff --git a/src/3rdparty/phonon/ds9/qbasefilter.cpp b/src/3rdparty/phonon/ds9/qbasefilter.cpp
index 95cab92..c950c41 100644
--- a/src/3rdparty/phonon/ds9/qbasefilter.cpp
+++ b/src/3rdparty/phonon/ds9/qbasefilter.cpp
@@ -92,8 +92,8 @@ namespace Phonon
return E_POINTER;
}
- int nbfetched = 0;
- while (nbfetched < int(count) && m_index < m_pins.count()) {
+ uint nbfetched = 0;
+ while (nbfetched < count && m_index < m_pins.count()) {
IPin *current = m_pins[m_index];
current->AddRef();
ret[nbfetched] = current;
@@ -211,7 +211,8 @@ namespace Phonon
}
else if (iid == IID_IMediaPosition || iid == IID_IMediaSeeking) {
if (inputPins().isEmpty()) {
- if (*out = getUpStreamInterface(iid)) {
+ *out = getUpStreamInterface(iid);
+ if (*out) {
return S_OK; //we return here to avoid adding a reference
} else {
hr = E_NOINTERFACE;
diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.cpp b/src/3rdparty/phonon/ds9/qmeminputpin.cpp
index dca99db..865b8af 100644
--- a/src/3rdparty/phonon/ds9/qmeminputpin.cpp
+++ b/src/3rdparty/phonon/ds9/qmeminputpin.cpp
@@ -137,7 +137,8 @@ namespace Phonon
return E_POINTER;
}
- if (*alloc = memoryAllocator(true)) {
+ *alloc = memoryAllocator(true);
+ if (*alloc) {
return S_OK;
}
@@ -294,7 +295,7 @@ namespace Phonon
LONG length = sample->GetActualDataLength();
HRESULT hr = alloc->Commit();
- if (hr == VFW_E_SIZENOTSET) {
+ if (hr == HRESULT(VFW_E_SIZENOTSET)) {
ALLOCATOR_PROPERTIES prop = getDefaultAllocatorProperties();
prop.cbBuffer = qMax(prop.cbBuffer, length);
ALLOCATOR_PROPERTIES actual;
@@ -324,7 +325,7 @@ namespace Phonon
{
LONGLONG start, end;
hr = sample->GetMediaTime(&start, &end);
- if (hr != VFW_E_MEDIA_TIME_NOT_SET) {
+ if (hr != HRESULT(VFW_E_MEDIA_TIME_NOT_SET)) {
hr = out->SetMediaTime(&start, &end);
Q_ASSERT(SUCCEEDED(hr));
}
diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp
index 68a4ec0..d14876b 100644
--- a/src/3rdparty/phonon/ds9/qpin.cpp
+++ b/src/3rdparty/phonon/ds9/qpin.cpp
@@ -91,8 +91,8 @@ namespace Phonon
return E_INVALIDARG;
}
- int nbFetched = 0;
- while (nbFetched < int(count) && m_index < m_pin->mediaTypes().count()) {
+ uint nbFetched = 0;
+ while (nbFetched < count && m_index < m_pin->mediaTypes().count()) {
//the caller will deallocate the memory
*out = static_cast<AM_MEDIA_TYPE *>(::CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)));
const AM_MEDIA_TYPE original = m_pin->mediaTypes().at(m_index);
@@ -145,9 +145,9 @@ namespace Phonon
QPin::QPin(QBaseFilter *parent, PIN_DIRECTION dir, const QVector<AM_MEDIA_TYPE> &mt) :
- m_memAlloc(0), m_parent(parent), m_refCount(1), m_connected(0),
+ m_parent(parent), m_flushing(false), m_refCount(1), m_connected(0),
m_direction(dir), m_mediaTypes(mt), m_connectedType(defaultMediaType),
- m_flushing(false)
+ m_memAlloc(0)
{
Q_ASSERT(m_parent);
m_parent->addPin(this);
diff --git a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
index 2112267..cf5ce96 100644
--- a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
+++ b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp
@@ -194,8 +194,8 @@ namespace Phonon
m_sampleBuffer = ComPointer<IMediaSample>();
#ifndef QT_NO_OPENGL
freeGLResources();
-#endif // QT_NO_OPENGL
m_textureUploaded = false;
+#endif // QT_NO_OPENGL
}
void endOfStream()
@@ -314,7 +314,6 @@ namespace Phonon
REFERENCE_TIME m_start;
HANDLE m_renderEvent, m_receiveCanWait; // Signals sample to render
QSize m_size;
- bool m_textureUploaded;
//mixer settings
qreal m_brightness,
@@ -356,6 +355,7 @@ namespace Phonon
bool m_checkedPrograms;
bool m_usingOpenGL;
+ bool m_textureUploaded;
GLuint m_program[2];
GLuint m_texture[3];
#endif
@@ -436,7 +436,7 @@ namespace Phonon
QBaseFilter(CLSID_NULL), m_inputPin(new VideoRendererSoftPin(this)),
m_renderer(renderer), m_start(0)
#ifndef QT_NO_OPENGL
- ,m_usingOpenGL(false), m_checkedPrograms(false), m_textureUploaded(false)
+ , m_checkedPrograms(false), m_usingOpenGL(false), m_textureUploaded(false)
#endif
{
m_renderEvent = ::CreateEvent(0, 0, 0, 0);