From 63512e8e98457fd3ba33423a6760c02267c4a352 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 20 May 2010 01:14:09 +0200 Subject: [PATCH] quartz: Avoid using the long type. --- dlls/quartz/acmwrapper.c | 2 +- dlls/quartz/avidec.c | 2 +- dlls/quartz/avisplit.c | 2 +- dlls/quartz/dsoundrender.c | 12 ++++++------ dlls/quartz/filtergraph.c | 16 ++++++++-------- dlls/quartz/memallocator.c | 2 +- dlls/quartz/pin.c | 2 +- dlls/quartz/pin.h | 2 +- dlls/quartz/tests/referenceclock.c | 4 ++-- dlls/quartz/videorenderer.c | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index c275d833979..a0323911707 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -105,7 +105,7 @@ static HRESULT ACMWrapper_ProcessSampleData(InputPin *pin, IMediaSample *pSample tMed = tStart; - TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, (long)cbSrcStream); + TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream); hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt); if (FAILED(hr)) diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 8469bbc9f29..b7d45e93890 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -101,7 +101,7 @@ static HRESULT AVIDec_ProcessSampleData(InputPin *pin, IMediaSample *pSample) cbSrcStream = IMediaSample_GetActualDataLength(pSample); - TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, (long)cbSrcStream); + TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream); hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt); if (FAILED(hr)) { diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index 3d567d29de1..61078805903 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -770,7 +770,7 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE { const AVISUPERINDEX *pIndex = (const AVISUPERINDEX *)pChunk; DWORD x; - long rest = pIndex->cb - sizeof(AVISUPERINDEX) + sizeof(RIFFCHUNK) + sizeof(pIndex->aIndex[0]) * ANYSIZE_ARRAY; + UINT rest = pIndex->cb - sizeof(AVISUPERINDEX) + sizeof(RIFFCHUNK) + sizeof(pIndex->aIndex[0]) * ANYSIZE_ARRAY; if (pIndex->cb < sizeof(AVISUPERINDEX) - sizeof(RIFFCHUNK)) { diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 115577ced35..b327c00da9b 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -78,8 +78,8 @@ typedef struct DSoundRenderImpl HANDLE state_change, blocked; - long volume; - long pan; + LONG volume; + LONG pan; } DSoundRenderImpl; /* Seeking is not needed for a renderer, rely on newsegment for the appropriate changes */ @@ -238,7 +238,7 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) { DSoundRenderImpl *This = iface; LPBYTE pbSrcStream = NULL; - long cbSrcStream = 0; + LONG cbSrcStream = 0; REFERENCE_TIME tStart, tStop; HRESULT hr; AM_MEDIA_TYPE *amt; @@ -344,7 +344,7 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) } cbSrcStream = IMediaSample_GetActualDataLength(pSample); - TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, cbSrcStream); + TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream); #if 0 /* For debugging purpose */ { @@ -877,11 +877,11 @@ static HRESULT WINAPI DSoundRender_InputPin_ReceiveConnection(IPin * iface, IPin { hr = IDirectSoundBuffer_SetVolume(DSImpl->dsbuffer, DSImpl->volume); if (FAILED(hr)) - ERR("Can't set volume to %ld (%x)\n", DSImpl->volume, hr); + ERR("Can't set volume to %d (%x)\n", DSImpl->volume, hr); hr = IDirectSoundBuffer_SetPan(DSImpl->dsbuffer, DSImpl->pan); if (FAILED(hr)) - ERR("Can't set pan to %ld (%x)\n", DSImpl->pan, hr); + ERR("Can't set pan to %d (%x)\n", DSImpl->pan, hr); DSImpl->write_pos = 0; hr = S_OK; diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 66a9a959fdd..18bf97c392b 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -45,14 +45,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct { - HWND hWnd; /* Target window */ - long msg; /* User window message */ - long instance; /* User data */ - int disabled; /* Disabled messages posting */ + HWND hWnd; /* Target window */ + UINT msg; /* User window message */ + LONG_PTR instance; /* User data */ + int disabled; /* Disabled messages posting */ } WndNotify; typedef struct { - long lEventCode; /* Event code */ + LONG lEventCode; /* Event code */ LONG_PTR lParam1; /* Param1 */ LONG_PTR lParam2; /* Param2 */ } Event; @@ -120,7 +120,7 @@ static int EventsQueue_PutEvent(EventsQueue* omr, const Event* evt) return TRUE; } -static int EventsQueue_GetEvent(EventsQueue* omr, Event* evt, long msTimeOut) +static int EventsQueue_GetEvent(EventsQueue* omr, Event* evt, LONG msTimeOut) { if (WaitForSingleObject(omr->msg_event, msTimeOut) != WAIT_OBJECT_0) return FALSE; @@ -182,7 +182,7 @@ typedef struct _IFilterGraphImpl { LPWSTR * pFilterNames; int nFilters; int filterCapacity; - long nameIndex; + LONG nameIndex; IReferenceClock *refClock; EventsQueue evqueue; HANDLE hEventCompletion; @@ -4970,7 +4970,7 @@ static HRESULT WINAPI MediaEvent_SetNotifyWindow(IMediaEventEx *iface, This->notif.hWnd = (HWND)hwnd; This->notif.msg = lMsg; - This->notif.instance = (long) lInstanceData; + This->notif.instance = lInstanceData; return S_OK; } diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index 16b94e3244c..a1c4473238f 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -785,7 +785,7 @@ static HRESULT StdMemAllocator_Alloc(IMemAllocator * iface) StdMemAllocator *This = (StdMemAllocator *)iface; StdMediaSample2 * pSample = NULL; SYSTEM_INFO si; - long i; + LONG i; assert(list_empty(&This->base.free_list)); diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index ca34d9331c5..fd0d5a2e522 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -1834,7 +1834,7 @@ HRESULT InputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinI return E_FAIL; } -HRESULT OutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, long outputpin_size, const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin) +HRESULT OutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin) { OutputPin * pPinImpl; diff --git a/dlls/quartz/pin.h b/dlls/quartz/pin.h index 2cbaddba0f9..e356ef32f53 100644 --- a/dlls/quartz/pin.h +++ b/dlls/quartz/pin.h @@ -143,7 +143,7 @@ typedef struct PullPin /*** Constructors ***/ HRESULT InputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo, SAMPLEPROC_PUSH pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, CLEANUPPROC pCleanUp, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin); -HRESULT OutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, long outputpin_size, const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin); +HRESULT OutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin); HRESULT PullPin_Construct(const IPinVtbl *PullPin_Vtbl, const PIN_INFO * pPinInfo, SAMPLEPROC_PULL pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, CLEANUPPROC pCleanUp, STOPPROCESSPROC, REQUESTPROC pCustomRequest, LPCRITICAL_SECTION pCritSec, IPin ** ppPin); /**************************/ diff --git a/dlls/quartz/tests/referenceclock.c b/dlls/quartz/tests/referenceclock.c index 164fc3d89f8..ddce02eaa72 100644 --- a/dlls/quartz/tests/referenceclock.c +++ b/dlls/quartz/tests/referenceclock.c @@ -54,7 +54,7 @@ static void test_IReferenceClock_methods(const char * clockdesc, IReferenceClock HRESULT hr; REFERENCE_TIME time1; REFERENCE_TIME time2; - signed long diff; + LONG diff; /* Test response from invalid (NULL) argument */ hr = IReferenceClock_GetTime(pClock, NULL); @@ -86,7 +86,7 @@ static void test_IReferenceClock_methods(const char * clockdesc, IReferenceClock /* FIXME: How much deviation should be allowed after a sleep? */ /* 0.3% is common, and 0.4% is sometimes observed. */ diff = time2 - time1; - ok (9940000 <= diff && diff <= 10240000, "%s - Expected difference around 10000000, got %lu\n", clockdesc, diff); + ok (9940000 <= diff && diff <= 10240000, "%s - Expected difference around 10000000, got %u\n", clockdesc, diff); } diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 40b1acbfc6d..268373f1888 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -343,7 +343,7 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) { VideoRendererImpl *This = iface; LPBYTE pbSrcStream = NULL; - long cbSrcStream = 0; + LONG cbSrcStream = 0; REFERENCE_TIME tStart, tStop; HRESULT hr; @@ -395,7 +395,7 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) cbSrcStream = IMediaSample_GetActualDataLength(pSample); - TRACE("val %p %ld\n", pbSrcStream, cbSrcStream); + TRACE("val %p %d\n", pbSrcStream, cbSrcStream); #if 0 /* For debugging purpose */ {