Zebediah Figura : qcap: Make video capture functions CDECL.
Alexandre Julliard
julliard at winehq.org
Fri Nov 27 16:04:38 CST 2020
Module: wine
Branch: master
Commit: 786d81d802a5e90497ff6421156a66d15b98df97
URL: https://source.winehq.org/git/wine.git/?a=commit;h=786d81d802a5e90497ff6421156a66d15b98df97
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Nov 26 22:34:32 2020 -0600
qcap: Make video capture functions CDECL.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/qcap/qcap_private.h | 26 ++++++++++++++------------
dlls/qcap/v4l.c | 24 ++++++++++++------------
2 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/dlls/qcap/qcap_private.h b/dlls/qcap/qcap_private.h
index 046821142d2..7c27c689677 100644
--- a/dlls/qcap/qcap_private.h
+++ b/dlls/qcap/qcap_private.h
@@ -44,21 +44,23 @@ HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
struct video_capture_funcs
{
- struct video_capture_device *(*create)(USHORT index);
- void (*destroy)(struct video_capture_device *device);
- HRESULT (*check_format)(struct video_capture_device *device, const AM_MEDIA_TYPE *mt);
- HRESULT (*set_format)(struct video_capture_device *device, const AM_MEDIA_TYPE *mt);
- void (*get_format)(struct video_capture_device *device, AM_MEDIA_TYPE *mt, VIDEOINFOHEADER *format);
- HRESULT (*get_media_type)(struct video_capture_device *device,
+ struct video_capture_device *(CDECL *create)(USHORT index);
+ void (CDECL *destroy)(struct video_capture_device *device);
+ HRESULT (CDECL *check_format)(struct video_capture_device *device, const AM_MEDIA_TYPE *mt);
+ HRESULT (CDECL *set_format)(struct video_capture_device *device, const AM_MEDIA_TYPE *mt);
+ void (CDECL *get_format)(struct video_capture_device *device, AM_MEDIA_TYPE *mt, VIDEOINFOHEADER *format);
+ HRESULT (CDECL *get_media_type)(struct video_capture_device *device,
unsigned int index, AM_MEDIA_TYPE *mt, VIDEOINFOHEADER *format);
- void (*get_caps)(struct video_capture_device *device, LONG index, AM_MEDIA_TYPE *mt,
+ void (CDECL *get_caps)(struct video_capture_device *device, LONG index, AM_MEDIA_TYPE *mt,
VIDEOINFOHEADER *format, VIDEO_STREAM_CONFIG_CAPS *caps);
- LONG (*get_caps_count)(struct video_capture_device *device);
- HRESULT (*get_prop_range)(struct video_capture_device *device, VideoProcAmpProperty property,
+ LONG (CDECL *get_caps_count)(struct video_capture_device *device);
+ HRESULT (CDECL *get_prop_range)(struct video_capture_device *device, VideoProcAmpProperty property,
LONG *min, LONG *max, LONG *step, LONG *default_value, LONG *flags);
- HRESULT (*get_prop)(struct video_capture_device *device, VideoProcAmpProperty property, LONG *value, LONG *flags);
- HRESULT (*set_prop)(struct video_capture_device *device, VideoProcAmpProperty property, LONG value, LONG flags);
- BOOL (*read_frame)(struct video_capture_device *device, BYTE *data);
+ HRESULT (CDECL *get_prop)(struct video_capture_device *device,
+ VideoProcAmpProperty property, LONG *value, LONG *flags);
+ HRESULT (CDECL *set_prop)(struct video_capture_device *device,
+ VideoProcAmpProperty property, LONG value, LONG flags);
+ BOOL (CDECL *read_frame)(struct video_capture_device *device, BYTE *data);
};
#endif
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index fd2c087640f..da09b2b26d6 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -119,7 +119,7 @@ static int xioctl(int fd, int request, void * arg)
return r;
}
-static void v4l_device_destroy(struct video_capture_device *device)
+static void CDECL v4l_device_destroy(struct video_capture_device *device)
{
if (device->fd != -1)
video_close(device->fd);
@@ -149,7 +149,7 @@ static const struct caps *find_caps(struct video_capture_device *device, const A
return NULL;
}
-static HRESULT v4l_device_check_format(struct video_capture_device *device, const AM_MEDIA_TYPE *mt)
+static HRESULT CDECL v4l_device_check_format(struct video_capture_device *device, const AM_MEDIA_TYPE *mt)
{
TRACE("device %p, mt %p.\n", device, mt);
@@ -203,7 +203,7 @@ static HRESULT set_caps(struct video_capture_device *device, const struct caps *
return S_OK;
}
-static HRESULT v4l_device_set_format(struct video_capture_device *device, const AM_MEDIA_TYPE *mt)
+static HRESULT CDECL v4l_device_set_format(struct video_capture_device *device, const AM_MEDIA_TYPE *mt)
{
const struct caps *caps;
@@ -217,13 +217,13 @@ static HRESULT v4l_device_set_format(struct video_capture_device *device, const
return set_caps(device, caps);
}
-static void v4l_device_get_format(struct video_capture_device *device, AM_MEDIA_TYPE *mt, VIDEOINFOHEADER *format)
+static void CDECL v4l_device_get_format(struct video_capture_device *device, AM_MEDIA_TYPE *mt, VIDEOINFOHEADER *format)
{
*mt = device->current_caps->media_type;
*format = device->current_caps->video_info;
}
-static HRESULT v4l_device_get_media_type(struct video_capture_device *device,
+static HRESULT CDECL v4l_device_get_media_type(struct video_capture_device *device,
unsigned int index, AM_MEDIA_TYPE *mt, VIDEOINFOHEADER *format)
{
unsigned int caps_count = (device->current_caps) ? 1 : device->caps_count;
@@ -262,7 +262,7 @@ static __u32 v4l2_cid_from_qcap_property(VideoProcAmpProperty property)
}
}
-static HRESULT v4l_device_get_prop_range(struct video_capture_device *device, VideoProcAmpProperty property,
+static HRESULT CDECL v4l_device_get_prop_range(struct video_capture_device *device, VideoProcAmpProperty property,
LONG *min, LONG *max, LONG *step, LONG *default_value, LONG *flags)
{
struct v4l2_queryctrl ctrl;
@@ -283,7 +283,7 @@ static HRESULT v4l_device_get_prop_range(struct video_capture_device *device, Vi
return S_OK;
}
-static HRESULT v4l_device_get_prop(struct video_capture_device *device,
+static HRESULT CDECL v4l_device_get_prop(struct video_capture_device *device,
VideoProcAmpProperty property, LONG *value, LONG *flags)
{
struct v4l2_control ctrl;
@@ -302,7 +302,7 @@ static HRESULT v4l_device_get_prop(struct video_capture_device *device,
return S_OK;
}
-static HRESULT v4l_device_set_prop(struct video_capture_device *device,
+static HRESULT CDECL v4l_device_set_prop(struct video_capture_device *device,
VideoProcAmpProperty property, LONG value, LONG flags)
{
struct v4l2_control ctrl;
@@ -338,7 +338,7 @@ static void reverse_image(struct video_capture_device *device, LPBYTE output, co
}
}
-static BOOL v4l_device_read_frame(struct video_capture_device *device, BYTE *data)
+static BOOL CDECL v4l_device_read_frame(struct video_capture_device *device, BYTE *data)
{
while (video_read(device->fd, device->image_data, device->image_size) < 0)
{
@@ -389,7 +389,7 @@ static void fill_caps(__u32 pixelformat, __u32 width, __u32 height,
caps->pixelformat = pixelformat;
}
-static void v4l_device_get_caps(struct video_capture_device *device, LONG index,
+static void CDECL v4l_device_get_caps(struct video_capture_device *device, LONG index,
AM_MEDIA_TYPE *type, VIDEOINFOHEADER *format, VIDEO_STREAM_CONFIG_CAPS *vscc)
{
*vscc = device->caps[index].config;
@@ -397,12 +397,12 @@ static void v4l_device_get_caps(struct video_capture_device *device, LONG index,
*format = device->caps[index].video_info;
}
-static LONG v4l_device_get_caps_count(struct video_capture_device *device)
+static LONG CDECL v4l_device_get_caps_count(struct video_capture_device *device)
{
return device->caps_count;
}
-struct video_capture_device *v4l_device_create(USHORT index)
+struct video_capture_device * CDECL v4l_device_create(USHORT index)
{
struct v4l2_frmsizeenum frmsize = {0};
struct video_capture_device *device;
More information about the wine-cvs
mailing list