From 91c7d4f909eeff585892d112f37bd5fc0e90aab8 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 19 May 2010 12:55:49 +0200 Subject: [PATCH] qcap: Use the proper types. --- dlls/qcap/capture.h | 6 +++--- dlls/qcap/v4l.c | 30 ++++++++++++++++++------------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/dlls/qcap/capture.h b/dlls/qcap/capture.h index 42eed5735d..0d8062def1 100644 --- a/dlls/qcap/capture.h +++ b/dlls/qcap/capture.h @@ -30,9 +30,9 @@ Capture *qcap_driver_init(IPin*,USHORT); HRESULT qcap_driver_destroy(Capture*); HRESULT qcap_driver_set_format(Capture*,AM_MEDIA_TYPE*); HRESULT qcap_driver_get_format(const Capture*,AM_MEDIA_TYPE**); -HRESULT qcap_driver_get_prop_range(Capture*,LONG,LONG*,LONG*,LONG*,LONG*,LONG*); -HRESULT qcap_driver_get_prop(Capture*,LONG,LONG*,LONG*); -HRESULT qcap_driver_set_prop(Capture*,long,long,long); +HRESULT qcap_driver_get_prop_range(Capture*,VideoProcAmpProperty,LONG*,LONG*,LONG*,LONG*,LONG*); +HRESULT qcap_driver_get_prop(Capture*,VideoProcAmpProperty,LONG*,LONG*); +HRESULT qcap_driver_set_prop(Capture*,VideoProcAmpProperty,LONG,LONG); HRESULT qcap_driver_run(Capture*,FILTER_STATE*); HRESULT qcap_driver_pause(Capture*,FILTER_STATE*); HRESULT qcap_driver_stop(Capture*,FILTER_STATE*); diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 91dd8f4adf..31808040a2 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -351,8 +351,9 @@ HRESULT qcap_driver_get_format(const Capture *capBox, AM_MEDIA_TYPE ** mT) return S_OK; } -HRESULT qcap_driver_get_prop_range( Capture *capBox, LONG Property, LONG *pMin, - LONG *pMax, LONG *pSteppingDelta, LONG *pDefault, LONG *pCapsFlags ) +HRESULT qcap_driver_get_prop_range( Capture *capBox, + VideoProcAmpProperty Property, LONG *pMin, LONG *pMax, + LONG *pSteppingDelta, LONG *pDefault, LONG *pCapsFlags ) { TRACE("%p -> %d %p %p %p %p %p\n", capBox, Property, pMin, pMax, pSteppingDelta, pDefault, pCapsFlags); @@ -382,7 +383,8 @@ HRESULT qcap_driver_get_prop_range( Capture *capBox, LONG Property, LONG *pMin, return S_OK; } -HRESULT qcap_driver_get_prop( Capture *capBox, LONG Property, LONG *lValue, LONG *Flags ) +HRESULT qcap_driver_get_prop( Capture *capBox, + VideoProcAmpProperty Property, LONG *lValue, LONG *Flags ) { TRACE("%p -> %d %p %p\n", capBox, Property, lValue, Flags); @@ -408,9 +410,10 @@ HRESULT qcap_driver_get_prop( Capture *capBox, LONG Property, LONG *lValue, LONG return S_OK; } -HRESULT qcap_driver_set_prop(Capture *capBox, long Property, long lValue, long Flags) +HRESULT qcap_driver_set_prop(Capture *capBox, VideoProcAmpProperty Property, + LONG lValue, LONG Flags) { - TRACE("%p -> %ld %ld %ld\n", capBox, Property, lValue, Flags); + TRACE("%p -> %d %d %d\n", capBox, Property, lValue, Flags); switch (Property) { @@ -427,7 +430,7 @@ HRESULT qcap_driver_set_prop(Capture *capBox, long Property, long lValue, long F capBox->pict.colour = lValue; break; default: - FIXME("Not implemented %ld\n", Property); + FIXME("Not implemented %d\n", Property); return E_NOTIMPL; } @@ -598,7 +601,7 @@ static DWORD WINAPI ReadThread(LPVOID lParam) Capture * capBox = lParam; HRESULT hr; IMediaSample *pSample = NULL; - unsigned long framecount = 0; + ULONG framecount = 0; unsigned char *pTarget, *pInput, *pOutput; hr = V4l_Prepare(capBox); @@ -636,7 +639,7 @@ static DWORD WINAPI ReadThread(LPVOID lParam) capBox->renderer(capBox, pOutput, pInput); Resize(capBox, pTarget, pOutput); hr = OutputPin_SendSample((OutputPin *)capBox->pOut, pSample); - TRACE("%p -> Frame %lu: %x\n", capBox, ++framecount, hr); + TRACE("%p -> Frame %u: %x\n", capBox, ++framecount, hr); IMediaSample_Release(pSample); V4l_FreeFrame(capBox); } @@ -960,18 +963,21 @@ HRESULT qcap_driver_get_format(const Capture *capBox, AM_MEDIA_TYPE ** mT) FAIL_WITH_ERR; } -HRESULT qcap_driver_get_prop_range( Capture *capBox, LONG Property, LONG *pMin, - LONG *pMax, LONG *pSteppingDelta, LONG *pDefault, LONG *pCapsFlags ) +HRESULT qcap_driver_get_prop_range( Capture *capBox, + VideoProcAmpProperty Property, LONG *pMin, LONG *pMax, + LONG *pSteppingDelta, LONG *pDefault, LONG *pCapsFlags ) { FAIL_WITH_ERR; } -HRESULT qcap_driver_get_prop(Capture *capBox, LONG Property, LONG *lValue, LONG *Flags) +HRESULT qcap_driver_get_prop(Capture *capBox, + VideoProcAmpProperty Property, LONG *lValue, LONG *Flags) { FAIL_WITH_ERR; } -HRESULT qcap_driver_set_prop(Capture *capBox, long Property, long lValue, long Flags) +HRESULT qcap_driver_set_prop(Capture *capBox, VideoProcAmpProperty Property, + LONG lValue, LONG Flags) { FAIL_WITH_ERR; }