Module: wine Branch: master Commit: 48dcc3fc04cb5e6c735c0160ddea85c4e0088d90 URL: http://source.winehq.org/git/wine.git/?a=commit;h=48dcc3fc04cb5e6c735c0160dd...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Mon Aug 6 20:25:31 2007 +0100
qcap: Constify some variables.
---
dlls/qcap/capture.h | 2 +- dlls/qcap/pin.c | 4 +++- dlls/qcap/pin.h | 4 +++- dlls/qcap/v4l.c | 16 ++++++++-------- 4 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/dlls/qcap/capture.h b/dlls/qcap/capture.h index b5c707a..626bc05 100644 --- a/dlls/qcap/capture.h +++ b/dlls/qcap/capture.h @@ -29,7 +29,7 @@ typedef struct _Capture Capture; 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(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); diff --git a/dlls/qcap/pin.c b/dlls/qcap/pin.c index 09c3c5d..28d2f1a 100644 --- a/dlls/qcap/pin.c +++ b/dlls/qcap/pin.c @@ -223,7 +223,9 @@ static HRESULT OutputPin_ConnectSpecific(IPin * iface, IPin * pReceivePin, const return hr; }
-HRESULT OutputPin_Init(const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES * props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, OutputPin * pPinImpl) +HRESULT OutputPin_Init(const PIN_INFO * pPinInfo, const ALLOCATOR_PROPERTIES * props, + LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, + LPCRITICAL_SECTION pCritSec, OutputPin * pPinImpl) { TRACE("\n");
diff --git a/dlls/qcap/pin.h b/dlls/qcap/pin.h index 5dba694..316d3d6 100644 --- a/dlls/qcap/pin.h +++ b/dlls/qcap/pin.h @@ -59,7 +59,9 @@ typedef struct OutputPin } OutputPin;
/*** Initializers ***/ -HRESULT OutputPin_Init(const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, OutputPin * pPinImpl); +HRESULT OutputPin_Init(const PIN_INFO * pPinInfo, const ALLOCATOR_PROPERTIES *props, + LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, + LPCRITICAL_SECTION pCritSec, OutputPin * pPinImpl);
/* Common */ HRESULT WINAPI IPinImpl_ConnectedTo(IPin * iface, IPin ** ppPin); diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index babf2cf..0742968 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -73,7 +73,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap_v4l);
#ifdef HAVE_LINUX_VIDEODEV_H
-typedef void (* Renderer)(Capture *, LPBYTE bufferin, LPBYTE stream); +typedef void (* Renderer)(const Capture *, LPBYTE bufferin, const BYTE *stream);
struct _Capture { @@ -111,8 +111,8 @@ struct renderlist Renderer renderer; };
-static void renderer_RGB(Capture *capBox, LPBYTE bufferin, LPBYTE stream); -static void renderer_YUV(Capture *capBox, LPBYTE bufferin, LPBYTE stream); +static void renderer_RGB(const Capture *capBox, LPBYTE bufferin, const BYTE *stream); +static void renderer_YUV(const Capture *capBox, LPBYTE bufferin, const BYTE *stream);
static const struct renderlist renderlist_V4l[] = { { 0, "NULL renderer", NULL }, @@ -279,7 +279,7 @@ HRESULT qcap_driver_set_format(Capture *capBox, AM_MEDIA_TYPE * mT) return S_OK; }
-HRESULT qcap_driver_get_format(Capture *capBox, AM_MEDIA_TYPE ** mT) +HRESULT qcap_driver_get_format(const Capture *capBox, AM_MEDIA_TYPE ** mT) { VIDEOINFOHEADER *vi;
@@ -412,7 +412,7 @@ HRESULT qcap_driver_set_prop(Capture *capBox, long Property, long lValue, long F return S_OK; }
-static void renderer_RGB(Capture *capBox, LPBYTE bufferin, LPBYTE stream) +static void renderer_RGB(const Capture *capBox, LPBYTE bufferin, const BYTE *stream) { int depth = renderlist_V4l[capBox->pict.palette].depth; int size = capBox->height * capBox->width * depth / 8; @@ -443,7 +443,7 @@ static void renderer_RGB(Capture *capBox, LPBYTE bufferin, LPBYTE stream) } }
-static void renderer_YUV(Capture *capBox, LPBYTE bufferin, LPBYTE stream) +static void renderer_YUV(const Capture *capBox, LPBYTE bufferin, const BYTE *stream) { enum YUV_Format format;
@@ -478,7 +478,7 @@ static void renderer_YUV(Capture *capBox, LPBYTE bufferin, LPBYTE stream) YUV_To_RGB24(format, bufferin, stream, capBox->width, capBox->height); }
-static void Resize(Capture * capBox, LPBYTE output, LPBYTE input) +static void Resize(const Capture * capBox, LPBYTE output, const BYTE *input) { /* the whole image needs to be reversed, because the dibs are messed up in windows */ @@ -927,7 +927,7 @@ HRESULT qcap_driver_set_format(Capture *capBox, AM_MEDIA_TYPE * mT) FAIL_WITH_ERR; }
-HRESULT qcap_driver_get_format(Capture *capBox, AM_MEDIA_TYPE ** mT) +HRESULT qcap_driver_get_format(const Capture *capBox, AM_MEDIA_TYPE ** mT) { FAIL_WITH_ERR; }