qcap: Constify some variables

Andrew Talbot andrew.talbot at talbotville.com
Mon Aug 6 15:10:02 CDT 2007


Changelog:
    qcap: Constify some variables.

diff -urN a/dlls/qcap/capture.h b/dlls/qcap/capture.h
--- a/dlls/qcap/capture.h	2006-05-23 13:48:27.000000000 +0100
+++ b/dlls/qcap/capture.h	2007-08-06 20:16:06.000000000 +0100
@@ -29,7 +29,7 @@
 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 -urN a/dlls/qcap/pin.c b/dlls/qcap/pin.c
--- a/dlls/qcap/pin.c	2007-01-22 13:06:49.000000000 +0000
+++ b/dlls/qcap/pin.c	2007-08-06 20:15:34.000000000 +0100
@@ -223,7 +223,9 @@
     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 -urN a/dlls/qcap/pin.h b/dlls/qcap/pin.h
--- a/dlls/qcap/pin.h	2006-11-13 12:43:34.000000000 +0000
+++ b/dlls/qcap/pin.h	2007-08-06 20:15:47.000000000 +0100
@@ -59,7 +59,9 @@
 } 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 -urN a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
--- a/dlls/qcap/v4l.c	2007-03-12 13:30:40.000000000 +0000
+++ b/dlls/qcap/v4l.c	2007-08-06 20:15:56.000000000 +0100
@@ -73,7 +73,7 @@
 
 #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 @@
     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 @@
     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 @@
     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_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 @@
     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 @@
     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;
 }



More information about the wine-patches mailing list