winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1016 discussions
Start a n
N
ew thread
Jactry Zeng : qcap/videocapture: Implement IAMStreamConfig::GetNumberOfCapabilities().
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: d8fd16f139292ec8e097a25476b60013c28fd255 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d8fd16f139292ec8e097a254…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Apr 28 11:55:19 2020 -0500 qcap/videocapture: Implement IAMStreamConfig::GetNumberOfCapabilities(). Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/capture.h | 1 + dlls/qcap/tests/videocapture.c | 18 ++++++++++++++++++ dlls/qcap/v4l.c | 11 +++++++++++ dlls/qcap/vfwcapture.c | 20 +++++++++++++------- 4 files changed, 43 insertions(+), 7 deletions(-) diff --git a/dlls/qcap/capture.h b/dlls/qcap/capture.h index fa48324dd6..e34c33fb0f 100644 --- a/dlls/qcap/capture.h +++ b/dlls/qcap/capture.h @@ -27,6 +27,7 @@ Capture *qcap_driver_init(struct strmbase_source *,USHORT) DECLSPEC_HIDDEN; HRESULT qcap_driver_destroy(Capture*) DECLSPEC_HIDDEN; HRESULT qcap_driver_check_format(Capture*,const AM_MEDIA_TYPE*) DECLSPEC_HIDDEN; HRESULT qcap_driver_set_format(Capture*,AM_MEDIA_TYPE*) DECLSPEC_HIDDEN; +LONG qcap_driver_get_caps_count(Capture *device) DECLSPEC_HIDDEN; HRESULT qcap_driver_get_format(const Capture*,AM_MEDIA_TYPE**) DECLSPEC_HIDDEN; HRESULT qcap_driver_get_prop_range(Capture*,VideoProcAmpProperty,LONG*,LONG*,LONG*,LONG*,LONG*) DECLSPEC_HIDDEN; HRESULT qcap_driver_get_prop(Capture*,VideoProcAmpProperty,LONG*,LONG*) DECLSPEC_HIDDEN; diff --git a/dlls/qcap/tests/videocapture.c b/dlls/qcap/tests/videocapture.c index 39535adece..ab9e19b461 100644 --- a/dlls/qcap/tests/videocapture.c +++ b/dlls/qcap/tests/videocapture.c @@ -66,6 +66,7 @@ static void test_stream_config(IPin *pin) AM_MEDIA_TYPE *format, *format2; IAMStreamConfig *stream_config; LONG depth, compression; + LONG count, size; HRESULT hr; hr = IPin_QueryInterface(pin, &IID_IAMStreamConfig, (void **)&stream_config); @@ -116,6 +117,23 @@ static void test_stream_config(IPin *pin) ok(hr == E_FAIL, "Got hr %#x.\n", hr); FreeMediaType(format); + count = 0xdeadbeef; + size = 0xdeadbeef; + /* Crash on Windows */ + if (0) + { + hr = IAMStreamConfig_GetNumberOfCapabilities(stream_config, &count, NULL); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); + + hr = IAMStreamConfig_GetNumberOfCapabilities(stream_config, NULL, &size); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); + } + + hr = IAMStreamConfig_GetNumberOfCapabilities(stream_config, &count, &size); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(count != 0xdeadbeef, "Got wrong count: %d.\n", count); + ok(size == sizeof(VIDEO_STREAM_CONFIG_CAPS), "Got wrong size: %d.\n", size); + IAMStreamConfig_Release(stream_config); } diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index ea4fe6b115..112c57e89b 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -624,6 +624,11 @@ error: return NULL; } +LONG qcap_driver_get_caps_count(Capture *device) +{ + return device->caps_count; +} + #else Capture *qcap_driver_init(struct strmbase_source *pin, USHORT card) @@ -698,4 +703,10 @@ void qcap_driver_cleanup_stream(Capture *device) ERR("v4l absent: shouldn't be called\n"); } +LONG qcap_driver_get_caps_count(Capture *device) +{ + ERR("v4l absent: shouldn't be called\n"); + return 0; +} + #endif /* defined(VIDIOCMCAPTURE) */ diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 6c9cc3ce51..8fb0c0d7bd 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -167,7 +167,6 @@ static const struct strmbase_filter_ops filter_ops = .filter_cleanup_stream = vfw_capture_cleanup_stream, }; -/* AMStreamConfig interface, we only need to implement {G,S}etFormat */ static HRESULT WINAPI AMStreamConfig_QueryInterface(IAMStreamConfig *iface, REFIID iid, void **out) { VfwCapture *filter = impl_from_IAMStreamConfig(iface); @@ -242,13 +241,20 @@ AMStreamConfig_GetFormat( IAMStreamConfig *iface, AM_MEDIA_TYPE **pmt ) return hr; } -static HRESULT WINAPI -AMStreamConfig_GetNumberOfCapabilities( IAMStreamConfig *iface, int *piCount, - int *piSize ) +static HRESULT WINAPI AMStreamConfig_GetNumberOfCapabilities(IAMStreamConfig *iface, + int *count, int *size) { - FIXME("%p: %p %p - stub, intentional\n", iface, piCount, piSize); - *piCount = 0; - return E_NOTIMPL; /* Not implemented for this interface */ + VfwCapture *filter = impl_from_IAMStreamConfig(iface); + + TRACE("filter %p, count %p, size %p.\n", filter, count, size); + + if (!count || !size) + return E_POINTER; + + *count = qcap_driver_get_caps_count(filter->driver_info); + *size = sizeof(VIDEO_STREAM_CONFIG_CAPS); + + return S_OK; } static HRESULT WINAPI
1
0
0
0
Ziqing Hui : windowscodecs: Add stub for DdsFrameDecode.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: db0f5027d713489aeb9c1c062a63bd23b0a63d25 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=db0f5027d713489aeb9c1c06…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Tue Apr 28 10:54:18 2020 +0800 windowscodecs: Add stub for DdsFrameDecode. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/ddsformat.c | 155 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 153 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index 19d5dd5a3f..212eedc7a2 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -94,6 +94,11 @@ typedef struct DdsDecoder { DDS_HEADER_DXT10 header_dxt10; } DdsDecoder; +typedef struct DdsFrameDecode { + IWICBitmapFrameDecode IWICBitmapFrameDecode_iface; + LONG ref; +} DdsFrameDecode; + static inline BOOL has_extended_header(DDS_HEADER *header) { return (header->ddspf.flags & DDPF_FOURCC) && @@ -105,6 +110,146 @@ static inline DdsDecoder *impl_from_IWICBitmapDecoder(IWICBitmapDecoder *iface) return CONTAINING_RECORD(iface, DdsDecoder, IWICBitmapDecoder_iface); } +static inline DdsFrameDecode *impl_from_IWICBitmapFrameDecode(IWICBitmapFrameDecode *iface) +{ + return CONTAINING_RECORD(iface, DdsFrameDecode, IWICBitmapFrameDecode_iface); +} + +static HRESULT WINAPI DdsFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface, REFIID iid, + void **ppv) +{ + DdsFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); + TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv); + + if (!ppv) return E_INVALIDARG; + + if (IsEqualIID(&IID_IUnknown, iid) || + IsEqualIID(&IID_IWICBitmapSource, iid) || + IsEqualIID(&IID_IWICBitmapFrameDecode, iid)) { + *ppv = &This->IWICBitmapFrameDecode_iface; + } else { + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI DdsFrameDecode_AddRef(IWICBitmapFrameDecode *iface) +{ + DdsFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) refcount=%u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI DdsFrameDecode_Release(IWICBitmapFrameDecode *iface) +{ + DdsFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) refcount=%u\n", iface, ref); + + if (ref == 0) HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI DdsFrameDecode_GetSize(IWICBitmapFrameDecode *iface, + UINT *puiWidth, UINT *puiHeight) +{ + FIXME("(%p,%p,%p): stub.\n", iface, puiWidth, puiHeight); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_GetPixelFormat(IWICBitmapFrameDecode *iface, + WICPixelFormatGUID *pPixelFormat) +{ + FIXME("(%p,%p): stub.\n", iface, pPixelFormat); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_GetResolution(IWICBitmapFrameDecode *iface, + double *pDpiX, double *pDpiY) +{ + FIXME("(%p,%p,%p): stub.\n", iface, pDpiX, pDpiY); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface, + IWICPalette *pIPalette) +{ + FIXME("(%p,%p): stub.\n", iface, pIPalette); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface, + const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) +{ + FIXME("(%p,%s,%u,%u,%p): stub.\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_GetMetadataQueryReader(IWICBitmapFrameDecode *iface, + IWICMetadataQueryReader **ppIMetadataQueryReader) +{ + FIXME("(%p,%p): stub.\n", iface, ppIMetadataQueryReader); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_GetColorContexts(IWICBitmapFrameDecode *iface, + UINT cCount, IWICColorContext **ppIColorContexts, UINT *pcActualCount) +{ + FIXME("(%p,%u,%p,%p): stub.\n", iface, cCount, ppIColorContexts, pcActualCount); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_GetThumbnail(IWICBitmapFrameDecode *iface, + IWICBitmapSource **ppIThumbnail) +{ + FIXME("(%p,%p): stub.\n", iface, ppIThumbnail); + + return E_NOTIMPL; +} + +static const IWICBitmapFrameDecodeVtbl DdsFrameDecode_Vtbl = { + DdsFrameDecode_QueryInterface, + DdsFrameDecode_AddRef, + DdsFrameDecode_Release, + DdsFrameDecode_GetSize, + DdsFrameDecode_GetPixelFormat, + DdsFrameDecode_GetResolution, + DdsFrameDecode_CopyPalette, + DdsFrameDecode_CopyPixels, + DdsFrameDecode_GetMetadataQueryReader, + DdsFrameDecode_GetColorContexts, + DdsFrameDecode_GetThumbnail +}; + +static HRESULT DdsFrameDecode_CreateInstance(DdsFrameDecode **frame_decode) +{ + DdsFrameDecode *result; + + result = HeapAlloc(GetProcessHeap(), 0, sizeof(*result)); + if (!result) return E_OUTOFMEMORY; + + result->IWICBitmapFrameDecode_iface.lpVtbl = &DdsFrameDecode_Vtbl; + result->ref = 1; + + *frame_decode = result; + return S_OK; +} + static HRESULT WINAPI DdsDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID iid, void **ppv) { @@ -325,9 +470,15 @@ static HRESULT WINAPI DdsDecoder_GetFrameCount(IWICBitmapDecoder *iface, static HRESULT WINAPI DdsDecoder_GetFrame(IWICBitmapDecoder *iface, UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) { - FIXME("(%p,%u,%p): stub.\n", iface, index, ppIBitmapFrame); + HRESULT hr; + DdsFrameDecode *frame_decode; - return E_NOTIMPL; + FIXME("(%p,%u,%p)\n", iface, index, ppIBitmapFrame); + + hr = DdsFrameDecode_CreateInstance(&frame_decode); + if (hr == S_OK) *ppIBitmapFrame = &frame_decode->IWICBitmapFrameDecode_iface; + + return hr; } static const IWICBitmapDecoderVtbl DdsDecoder_Vtbl = {
1
0
0
0
Jactry Zeng : qcap/videocapture: Remove code for resizing.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: 5df9f7b3528ea5b60ea8c91f53af65de3d97e597 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5df9f7b3528ea5b60ea8c91f…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Apr 28 11:55:18 2020 -0500 qcap/videocapture: Remove code for resizing. Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/v4l.c | 84 +++++++++++++-------------------------------------------- 1 file changed, 18 insertions(+), 66 deletions(-) diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index f6142e0744..ea4fe6b115 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -103,11 +103,9 @@ struct caps struct _Capture { - UINT outputwidth, outputheight; const struct caps *current_caps; struct caps *caps; LONG caps_count; - BOOL swresize; struct strmbase_source *pin; int fd, mmap; @@ -196,9 +194,6 @@ static BOOL set_caps(Capture *device, const struct caps *caps) } device->current_caps = caps; - device->outputwidth = width; - device->outputheight = height; - device->swresize = FALSE; return TRUE; } @@ -304,63 +299,26 @@ HRESULT qcap_driver_set_prop(Capture *device, VideoProcAmpProperty property, return S_OK; } -static void Resize(const Capture * capBox, LPBYTE output, const BYTE *input) +static void reverse_image(const Capture *device, LPBYTE output, const BYTE *input) { - UINT width, height, bitdepth, depth; + int inoffset, outoffset, pitch; + UINT width, height, depth; - width = capBox->current_caps->video_info.bmiHeader.biWidth; - height = capBox->current_caps->video_info.bmiHeader.biHeight; - bitdepth = capBox->current_caps->video_info.bmiHeader.biBitCount; - depth = bitdepth / 8; + width = device->current_caps->video_info.bmiHeader.biWidth; + height = device->current_caps->video_info.bmiHeader.biHeight; + depth = device->current_caps->video_info.bmiHeader.biBitCount / 8; /* the whole image needs to be reversed, because the dibs are messed up in windows */ - if (!capBox->swresize) - { - int inoffset = 0, outoffset = width * height * depth; - int ow = width * depth; - while (outoffset > 0) - { - int x; - outoffset -= ow; - for (x = 0; x < ow; x++) - output[outoffset + x] = input[inoffset + x]; - inoffset += ow; - } - } - else + outoffset = width * height * depth; + pitch = width * depth; + inoffset = 0; + while (outoffset > 0) { - HDC dc_s, dc_d; - HBITMAP bmp_s, bmp_d; - int inoffset = 0, outoffset = (capBox->outputheight) * capBox->outputwidth * depth; - int ow = capBox->outputwidth * depth; - LPBYTE myarray; - - /* FIXME: Improve software resizing: add error checks and optimize */ - - myarray = CoTaskMemAlloc(capBox->outputwidth * capBox->outputheight * depth); - dc_s = CreateCompatibleDC(NULL); - dc_d = CreateCompatibleDC(NULL); - bmp_s = CreateBitmap(width, height, 1, bitdepth, input); - bmp_d = CreateBitmap(capBox->outputwidth, capBox->outputheight, 1, bitdepth, NULL); - SelectObject(dc_s, bmp_s); - SelectObject(dc_d, bmp_d); - StretchBlt(dc_d, 0, 0, capBox->outputwidth, capBox->outputheight, - dc_s, 0, 0, width, height, SRCCOPY); - GetBitmapBits(bmp_d, capBox->outputwidth * capBox->outputheight * depth, myarray); - while (outoffset > 0) - { - int i; - - outoffset -= ow; - for (i = 0; i < ow; i++) - output[outoffset + i] = myarray[inoffset + i]; - inoffset += ow; - } - CoTaskMemFree(myarray); - DeleteObject(dc_s); - DeleteObject(dc_d); - DeleteObject(bmp_s); - DeleteObject(bmp_d); + int x; + outoffset -= pitch; + for (x = 0; x < pitch; x++) + output[outoffset + x] = input[inoffset + x]; + inoffset += pitch; } } @@ -394,10 +352,7 @@ static DWORD WINAPI ReadThread(LPVOID lParam) { int len; - if (!capBox->swresize) - len = width * height * depth; - else - len = capBox->outputheight * capBox->outputwidth * depth; + len = width * height * depth; IMediaSample_SetActualDataLength(pSample, len); len = IMediaSample_GetActualDataLength(pSample); @@ -414,7 +369,7 @@ static DWORD WINAPI ReadThread(LPVOID lParam) } } - Resize(capBox, pTarget, image_data); + reverse_image(capBox, pTarget, image_data); hr = IMemInputPin_Receive(capBox->pin->pMemInputPin, pSample); TRACE("%p -> Frame %u: %x\n", capBox, ++framecount, hr); IMediaSample_Release(pSample); @@ -436,10 +391,7 @@ void qcap_driver_init_stream(Capture *device) HRESULT hr; req_props.cBuffers = 3; - if (!device->swresize) - req_props.cbBuffer = device->current_caps->video_info.bmiHeader.biWidth * device->current_caps->video_info.bmiHeader.biHeight; - else - req_props.cbBuffer = device->outputwidth * device->outputheight; + req_props.cbBuffer = device->current_caps->video_info.bmiHeader.biWidth * device->current_caps->video_info.bmiHeader.biHeight; req_props.cbBuffer = (req_props.cbBuffer * device->current_caps->video_info.bmiHeader.biBitCount) / 8; req_props.cbAlign = 1; req_props.cbPrefix = 0;
1
0
0
0
Jactry Zeng : qcap/videocapture: Use formats from capabilities instead of hard coding.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: 9931952a8604732ddc94b7757a4cb6cb23370ecf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9931952a8604732ddc94b775…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Apr 28 11:55:17 2020 -0500 qcap/videocapture: Use formats from capabilities instead of hard coding. Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/tests/videocapture.c | 63 +++++++++++++ dlls/qcap/v4l.c | 203 ++++++++++++++++++----------------------- dlls/qcap/vfwcapture.c | 3 + 3 files changed, 154 insertions(+), 115 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=9931952a8604732ddc94…
1
0
0
0
Jactry Zeng : qcap/videocapture: Store capabilities information.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: 1990df851162bd720fcc965b77052442c58c7c72 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1990df851162bd720fcc965b…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Apr 28 11:55:16 2020 -0500 qcap/videocapture: Store capabilities information. Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/v4l.c | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 7 deletions(-) diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 6fe92d2d0a..810d31ff20 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -93,9 +93,19 @@ static BOOL video_init(void) #endif } +struct caps +{ + __u32 pixelformat; + AM_MEDIA_TYPE media_type; + VIDEOINFOHEADER video_info; + VIDEO_STREAM_CONFIG_CAPS config; +}; + struct _Capture { UINT width, height, bitDepth, fps, outputwidth, outputheight; + struct caps *caps; + LONG caps_count; BOOL swresize; struct strmbase_source *pin; @@ -116,13 +126,14 @@ static int xioctl(int fd, int request, void * arg) return r; } -HRESULT qcap_driver_destroy(Capture *capBox) +HRESULT qcap_driver_destroy(Capture *device) { - TRACE("%p\n", capBox); + if (device->fd != -1) + video_close(device->fd); + if (device->caps_count) + heap_free(device->caps); + heap_free(device); - if( capBox->fd != -1 ) - video_close(capBox->fd); - CoTaskMemFree(capBox); return S_OK; } @@ -495,18 +506,55 @@ void qcap_driver_cleanup_stream(Capture *device) ERR("Failed to decommit allocator, hr %#x.\n", hr); } + +static void fill_caps(__u32 pixelformat, __u32 width, __u32 height, + __u32 max_fps, __u32 min_fps, struct caps *caps) +{ + LONG depth = 24; + + caps->video_info.dwBitRate = width * height * depth * max_fps; + caps->video_info.bmiHeader.biSize = sizeof(caps->video_info.bmiHeader); + caps->video_info.bmiHeader.biWidth = width; + caps->video_info.bmiHeader.biHeight = height; + caps->video_info.bmiHeader.biPlanes = 1; + caps->video_info.bmiHeader.biBitCount = depth; + caps->video_info.bmiHeader.biCompression = BI_RGB; + caps->video_info.bmiHeader.biSizeImage = width * height * depth / 8; + caps->media_type.majortype = MEDIATYPE_Video; + caps->media_type.subtype = MEDIASUBTYPE_RGB24; + caps->media_type.bFixedSizeSamples = TRUE; + caps->media_type.bTemporalCompression = FALSE; + caps->media_type.lSampleSize = width * height * depth / 8; + caps->media_type.formattype = FORMAT_VideoInfo; + caps->media_type.pUnk = NULL; + caps->media_type.cbFormat = sizeof(VIDEOINFOHEADER); + /* We reallocate the caps array, so pbFormat has to be set after all caps + * have been enumerated. */ + caps->config.MaxFrameInterval = 10000000 * max_fps; + caps->config.MinFrameInterval = 10000000 * min_fps; + caps->config.MaxOutputSize.cx = width; + caps->config.MaxOutputSize.cy = height; + caps->config.MinOutputSize.cx = width; + caps->config.MinOutputSize.cy = height; + caps->config.guid = FORMAT_VideoInfo; + caps->config.MinBitsPerSecond = width * height * depth * min_fps; + caps->config.MaxBitsPerSecond = width * height * depth * max_fps; + caps->pixelformat = pixelformat; +} + Capture *qcap_driver_init(struct strmbase_source *pin, USHORT card) { + struct v4l2_frmsizeenum frmsize = {0}; struct v4l2_capability caps = {{0}}; struct v4l2_format format = {0}; Capture *device = NULL; BOOL have_libv4l2; char path[20]; - int fd; + int fd, i; have_libv4l2 = video_init(); - if (!(device = CoTaskMemAlloc(sizeof(*device)))) + if (!(device = heap_alloc_zero(sizeof(*device)))) return NULL; sprintf(path, "/dev/video%i", card); @@ -559,6 +607,70 @@ Capture *qcap_driver_init(struct strmbase_source *pin, USHORT card) goto error; } + format.fmt.pix.pixelformat = V4L2_PIX_FMT_BGR24; + if (xioctl(fd, VIDIOC_TRY_FMT, &format) == -1 + || format.fmt.pix.pixelformat != V4L2_PIX_FMT_BGR24) + { + ERR("This device doesn't support V4L2_PIX_FMT_BGR24 format.\n"); + goto error; + } + + frmsize.pixel_format = V4L2_PIX_FMT_BGR24; + while (xioctl(fd, VIDIOC_ENUM_FRAMESIZES, &frmsize) != -1) + { + struct v4l2_frmivalenum frmival = {0}; + __u32 max_fps = 30, min_fps = 30; + struct caps *new_caps; + + frmival.pixel_format = format.fmt.pix.pixelformat; + if (frmsize.type == V4L2_FRMSIZE_TYPE_DISCRETE) + { + frmival.width = frmsize.discrete.width; + frmival.height = frmsize.discrete.height; + } + else if (frmsize.type == V4L2_FRMSIZE_TYPE_STEPWISE) + { + frmival.width = frmsize.stepwise.max_width; + frmival.height = frmsize.stepwise.min_height; + } + else + { + FIXME("Unhandled frame size type: %d.\n", frmsize.type); + continue; + } + + if (xioctl(fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival) != -1) + { + if (frmival.type == V4L2_FRMIVAL_TYPE_DISCRETE) + { + max_fps = frmival.discrete.denominator / frmival.discrete.numerator; + min_fps = max_fps; + } + else if (frmival.type == V4L2_FRMIVAL_TYPE_STEPWISE + || frmival.type == V4L2_FRMIVAL_TYPE_CONTINUOUS) + { + max_fps = frmival.stepwise.max.denominator / frmival.stepwise.max.numerator; + min_fps = frmival.stepwise.min.denominator / frmival.stepwise.min.numerator; + } + } + else + ERR("Failed to get fps: %s.\n", strerror(errno)); + + new_caps = heap_realloc(device->caps, (device->caps_count + 1) * sizeof(*device->caps)); + if (!new_caps) + goto error; + device->caps = new_caps; + fill_caps(format.fmt.pix.pixelformat, frmsize.discrete.width, frmsize.discrete.height, + max_fps, min_fps, &device->caps[device->caps_count]); + device->caps_count++; + + frmsize.index++; + } + + /* We reallocate the caps array, so we have to delay setting pbFormat. */ + for (i = 0; i < device->caps_count; ++i) + device->caps[i].media_type.pbFormat = (BYTE *)&device->caps[i].video_info; + format.fmt.pix.pixelformat = V4L2_PIX_FMT_BGR24; if (xioctl(fd, VIDIOC_S_FMT, &format) == -1 || format.fmt.pix.pixelformat != V4L2_PIX_FMT_BGR24)
1
0
0
0
Ziqing Hui : windowscodecs: Add stub implementation for IWICDdsFrameDecode.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: 2531b927c7d34b0cc2e9daca5f8d57e1d2f9ba08 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2531b927c7d34b0cc2e9daca…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Tue Apr 28 10:56:54 2020 +0800 windowscodecs: Add stub implementation for IWICDdsFrameDecode. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/ddsformat.c | 62 ++++++++++++++++++++++++++++++++++++++++++ include/wincodec.idl | 28 +++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index cf8fadbce5..f096f94b6a 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -97,6 +97,7 @@ typedef struct DdsDecoder { typedef struct DdsFrameDecode { IWICBitmapFrameDecode IWICBitmapFrameDecode_iface; + IWICDdsFrameDecode IWICDdsFrameDecode_iface; LONG ref; } DdsFrameDecode; @@ -121,6 +122,11 @@ static inline DdsFrameDecode *impl_from_IWICBitmapFrameDecode(IWICBitmapFrameDec return CONTAINING_RECORD(iface, DdsFrameDecode, IWICBitmapFrameDecode_iface); } +static inline DdsFrameDecode *impl_from_IWICDdsFrameDecode(IWICDdsFrameDecode *iface) +{ + return CONTAINING_RECORD(iface, DdsFrameDecode, IWICDdsFrameDecode_iface); +} + static HRESULT WINAPI DdsFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface, REFIID iid, void **ppv) { @@ -133,6 +139,8 @@ static HRESULT WINAPI DdsFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface IsEqualIID(&IID_IWICBitmapSource, iid) || IsEqualIID(&IID_IWICBitmapFrameDecode, iid)) { *ppv = &This->IWICBitmapFrameDecode_iface; + } else if (IsEqualGUID(&IID_IWICDdsFrameDecode, iid)) { + *ppv = &This->IWICDdsFrameDecode_iface; } else { *ppv = NULL; return E_NOINTERFACE; @@ -242,6 +250,59 @@ static const IWICBitmapFrameDecodeVtbl DdsFrameDecode_Vtbl = { DdsFrameDecode_GetThumbnail }; +static HRESULT WINAPI DdsFrameDecode_Dds_QueryInterface(IWICDdsFrameDecode *iface, + REFIID iid, void **ppv) +{ + DdsFrameDecode *This = impl_from_IWICDdsFrameDecode(iface); + return DdsFrameDecode_QueryInterface(&This->IWICBitmapFrameDecode_iface, iid, ppv); +} + +static ULONG WINAPI DdsFrameDecode_Dds_AddRef(IWICDdsFrameDecode *iface) +{ + DdsFrameDecode *This = impl_from_IWICDdsFrameDecode(iface); + return DdsFrameDecode_AddRef(&This->IWICBitmapFrameDecode_iface); +} + +static ULONG WINAPI DdsFrameDecode_Dds_Release(IWICDdsFrameDecode *iface) +{ + DdsFrameDecode *This = impl_from_IWICDdsFrameDecode(iface); + return DdsFrameDecode_Release(&This->IWICBitmapFrameDecode_iface); +} + +static HRESULT WINAPI DdsFrameDecode_Dds_GetSizeInBlocks(IWICDdsFrameDecode *iface, + UINT *widthInBlocks, UINT *heightInBlocks) +{ + FIXME("(%p,%p,%p): stub.\n", iface, widthInBlocks, heightInBlocks); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_Dds_GetFormatInfo(IWICDdsFrameDecode *iface, + WICDdsFormatInfo *formatInfo) +{ + FIXME("(%p,%p): stub.\n", iface, formatInfo); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsFrameDecode_Dds_CopyBlocks(IWICDdsFrameDecode *iface, + const WICRect *boundsInBlocks, UINT stride, UINT bufferSize, + BYTE *buffer) +{ + FIXME("(%p,%p,%u,%u,%p): stub.\n", iface, boundsInBlocks, stride, bufferSize, buffer); + + return E_NOTIMPL; +} + +static const IWICDdsFrameDecodeVtbl DdsFrameDecode_Dds_Vtbl = { + DdsFrameDecode_Dds_QueryInterface, + DdsFrameDecode_Dds_AddRef, + DdsFrameDecode_Dds_Release, + DdsFrameDecode_Dds_GetSizeInBlocks, + DdsFrameDecode_Dds_GetFormatInfo, + DdsFrameDecode_Dds_CopyBlocks +}; + static HRESULT DdsFrameDecode_CreateInstance(DdsFrameDecode **frame_decode) { DdsFrameDecode *result; @@ -250,6 +311,7 @@ static HRESULT DdsFrameDecode_CreateInstance(DdsFrameDecode **frame_decode) if (!result) return E_OUTOFMEMORY; result->IWICBitmapFrameDecode_iface.lpVtbl = &DdsFrameDecode_Vtbl; + result->IWICDdsFrameDecode_iface.lpVtbl = &DdsFrameDecode_Dds_Vtbl; result->ref = 1; *frame_decode = result; diff --git a/include/wincodec.idl b/include/wincodec.idl index e5fdc15c64..e64d9ed3f1 100644 --- a/include/wincodec.idl +++ b/include/wincodec.idl @@ -371,6 +371,13 @@ typedef struct WICDdsParameters { WICDdsAlphaMode AlphaMode; } WICDdsParameters; +typedef struct WICDdsFormatInfo { + DXGI_FORMAT DxgiFormat; + UINT BytesPerBlock; + UINT BlockWidth; + UINT BlockHeight; +} WICDdsFormatInfo; + typedef UINT32 WICColor; interface ID2D1Device; @@ -1189,6 +1196,27 @@ interface IWICDdsDecoder : IUnknown [out, retval] IWICBitmapFrameDecode **bitmapFrame); }; +[ + object, + uuid(3d4c0c61-18a4-41e4-bd80-481a4fc9f464) +] +interface IWICDdsFrameDecode : IUnknown +{ + HRESULT GetSizeInBlocks( + [out] UINT *widthInBlocks, + [out] UINT *heightInBlocks); + + HRESULT GetFormatInfo( + [out] WICDdsFormatInfo *formatInfo); + + HRESULT CopyBlocks( + [in, unique] const WICRect *boundsInBlocks, + [in] UINT stride, + [in] UINT bufferSize, + [out, size_is(bufferSize)] BYTE *buffer); +}; + + cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);") cpp_quote("HRESULT WINAPI WICCreateBitmapFromSection(UINT width, UINT height, REFWICPixelFormatGUID format, HANDLE section, UINT stride, UINT offset, IWICBitmap **bitmap);") cpp_quote("HRESULT WINAPI WICCreateBitmapFromSectionEx(UINT width, UINT height, REFWICPixelFormatGUID format, HANDLE section, UINT stride, UINT offset, WICSectionAccessLevel access, IWICBitmap **bitmap);")
1
0
0
0
Ziqing Hui : windowscodecs: Add stub implementation for IWICDdsDecoder.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: d42946ea4392307004cd0f5d0ca5ff2ffae7d84e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d42946ea4392307004cd0f5d…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Tue Apr 28 10:55:04 2020 +0800 windowscodecs: Add stub implementation for IWICDdsDecoder. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/ddsformat.c | 60 ++++++++++++++++++++++++++++++++++++++---- include/wincodec.idl | 45 +++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index 212eedc7a2..cf8fadbce5 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -86,6 +86,7 @@ typedef struct { typedef struct DdsDecoder { IWICBitmapDecoder IWICBitmapDecoder_iface; + IWICDdsDecoder IWICDdsDecoder_iface; LONG ref; BOOL initialized; IStream *stream; @@ -110,6 +111,11 @@ static inline DdsDecoder *impl_from_IWICBitmapDecoder(IWICBitmapDecoder *iface) return CONTAINING_RECORD(iface, DdsDecoder, IWICBitmapDecoder_iface); } +static inline DdsDecoder *impl_from_IWICDdsDecoder(IWICDdsDecoder *iface) +{ + return CONTAINING_RECORD(iface, DdsDecoder, IWICDdsDecoder_iface); +} + static inline DdsFrameDecode *impl_from_IWICBitmapFrameDecode(IWICBitmapFrameDecode *iface) { return CONTAINING_RECORD(iface, DdsFrameDecode, IWICBitmapFrameDecode_iface); @@ -259,12 +265,11 @@ static HRESULT WINAPI DdsDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID if (!ppv) return E_INVALIDARG; if (IsEqualIID(&IID_IUnknown, iid) || - IsEqualIID(&IID_IWICBitmapDecoder, iid)) - { + IsEqualIID(&IID_IWICBitmapDecoder, iid)) { *ppv = &This->IWICBitmapDecoder_iface; - } - else - { + } else if (IsEqualIID(&IID_IWICDdsDecoder, iid)) { + *ppv = &This->IWICDdsDecoder_iface; + } else { *ppv = NULL; return E_NOINTERFACE; } @@ -498,6 +503,50 @@ static const IWICBitmapDecoderVtbl DdsDecoder_Vtbl = { DdsDecoder_GetFrame }; +static HRESULT WINAPI DdsDecoder_Dds_QueryInterface(IWICDdsDecoder *iface, + REFIID iid, void **ppv) +{ + DdsDecoder *This = impl_from_IWICDdsDecoder(iface); + return DdsDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv); +} + +static ULONG WINAPI DdsDecoder_Dds_AddRef(IWICDdsDecoder *iface) +{ + DdsDecoder *This = impl_from_IWICDdsDecoder(iface); + return DdsDecoder_AddRef(&This->IWICBitmapDecoder_iface); +} + +static ULONG WINAPI DdsDecoder_Dds_Release(IWICDdsDecoder *iface) +{ + DdsDecoder *This = impl_from_IWICDdsDecoder(iface); + return DdsDecoder_Release(&This->IWICBitmapDecoder_iface); +} + +static HRESULT WINAPI DdsDecoder_Dds_GetParameters(IWICDdsDecoder *iface, + WICDdsParameters *parameters) +{ + TRACE("(%p,%p): Stub.\n", iface, parameters); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DdsDecoder_Dds_GetFrame(IWICDdsDecoder *iface, + UINT arrayIndex, UINT mipLevel, UINT sliceIndex, + IWICBitmapFrameDecode **bitmapFrame) +{ + TRACE("(%p,%u,%u,%u,%p): Stub.\n", iface, arrayIndex, mipLevel, sliceIndex, bitmapFrame); + + return E_NOTIMPL; +} + +static const IWICDdsDecoderVtbl DdsDecoder_Dds_Vtbl = { + DdsDecoder_Dds_QueryInterface, + DdsDecoder_Dds_AddRef, + DdsDecoder_Dds_Release, + DdsDecoder_Dds_GetParameters, + DdsDecoder_Dds_GetFrame +}; + HRESULT DdsDecoder_CreateInstance(REFIID iid, void** ppv) { DdsDecoder *This; @@ -511,6 +560,7 @@ HRESULT DdsDecoder_CreateInstance(REFIID iid, void** ppv) if (!This) return E_OUTOFMEMORY; This->IWICBitmapDecoder_iface.lpVtbl = &DdsDecoder_Vtbl; + This->IWICDdsDecoder_iface.lpVtbl = &DdsDecoder_Dds_Vtbl; This->ref = 1; This->initialized = FALSE; This->stream = NULL; diff --git a/include/wincodec.idl b/include/wincodec.idl index b26e055394..e5fdc15c64 100644 --- a/include/wincodec.idl +++ b/include/wincodec.idl @@ -19,6 +19,7 @@ import "wtypes.idl"; import "propidl.idl"; import "ocidl.idl"; +import "dxgiformat.idl"; cpp_quote ("#include \"dcommon.h\"") @@ -195,6 +196,23 @@ typedef enum WICSectionAccessLevel { WICSectionAccessLevel_FORCE_DWORD = CODEC_FORCE_DWORD } WICSectionAccessLevel; +typedef enum WICDdsDimension { + WICDdsTexture1D = 0x00000000, + WICDdsTexture2D = 0x00000001, + WICDdsTexture3D = 0x00000002, + WICDdsTextureCube = 0x00000003, + WICDDSTEXTURE_FORCE_DWORD = CODEC_FORCE_DWORD +} WICDdsDimension; + +typedef enum WICDdsAlphaMode { + WICDdsAlphaModeUnknown = 0x00000000, + WICDdsAlphaModeStraight = 0x00000001, + WICDdsAlphaModePremultiplied = 0x00000002, + WICDdsAlphaModeOpaque = 0x00000003, + WICDdsAlphaModeCustom = 0x00000004, + WICDDSALPHAMODE_FORCE_DWORD = CODEC_FORCE_DWORD +} WICDdsAlphaMode; + typedef GUID WICPixelFormatGUID; typedef REFGUID REFWICPixelFormatGUID; @@ -342,6 +360,17 @@ typedef struct WICImageParameters UINT32 PixelHeight; } WICImageParameters; +typedef struct WICDdsParameters { + UINT Width; + UINT Height; + UINT Depth; + UINT MipLevels; + UINT ArraySize; + DXGI_FORMAT DxgiFormat; + WICDdsDimension Dimension; + WICDdsAlphaMode AlphaMode; +} WICDdsParameters; + typedef UINT32 WICColor; interface ID2D1Device; @@ -1144,6 +1173,22 @@ interface IWICEnumMetadataItem : IUnknown [out] IWICEnumMetadataItem **ppIEnumMetadataItem); } +[ + object, + uuid(409cd537-8532-40cb-9774-e2feb2df4e9c) +] +interface IWICDdsDecoder : IUnknown +{ + HRESULT GetParameters( + [out] WICDdsParameters *parameters); + + HRESULT GetFrame( + [in] UINT arrayIndex, + [in] UINT mipLevel, + [in] UINT sliceIndex, + [out, retval] IWICBitmapFrameDecode **bitmapFrame); +}; + cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);") cpp_quote("HRESULT WINAPI WICCreateBitmapFromSection(UINT width, UINT height, REFWICPixelFormatGUID format, HANDLE section, UINT stride, UINT offset, IWICBitmap **bitmap);") cpp_quote("HRESULT WINAPI WICCreateBitmapFromSectionEx(UINT width, UINT height, REFWICPixelFormatGUID format, HANDLE section, UINT stride, UINT offset, WICSectionAccessLevel access, IWICBitmap **bitmap);")
1
0
0
0
Zebediah Figura : ksproxy.ax: New stub DLL.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: 9caa3884e4909da23806ee94479b831be23f7c19 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9caa3884e4909da23806ee94…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Apr 27 18:15:18 2020 -0500 ksproxy.ax: New stub DLL. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47688
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 ++ configure.ac | 1 + dlls/ksproxy.ax/Makefile.in | 3 +++ dlls/ksproxy.ax/ksproxy.ax.spec | 10 ++++++++++ 4 files changed, 16 insertions(+) diff --git a/configure b/configure index 0b368610fa..b94c0ce7aa 100755 --- a/configure +++ b/configure @@ -1380,6 +1380,7 @@ enable_kerberos enable_kernel32 enable_kernelbase enable_ksecdd_sys +enable_ksproxy_ax enable_ksuser enable_ktmw32 enable_l3codeca_acm @@ -20701,6 +20702,7 @@ wine_fn_config_makefile dlls/kernelbase/tests enable_tests wine_fn_config_makefile dlls/keyboard.drv16 enable_win16 wine_fn_config_makefile dlls/krnl386.exe16 enable_win16 wine_fn_config_makefile dlls/ksecdd.sys enable_ksecdd_sys +wine_fn_config_makefile dlls/ksproxy.ax enable_ksproxy_ax wine_fn_config_makefile dlls/ksuser enable_ksuser wine_fn_config_makefile dlls/ktmw32 enable_ktmw32 wine_fn_config_makefile dlls/l3codeca.acm enable_l3codeca_acm diff --git a/configure.ac b/configure.ac index be3bc65175..3d0c88fd9d 100644 --- a/configure.ac +++ b/configure.ac @@ -3380,6 +3380,7 @@ WINE_CONFIG_MAKEFILE(dlls/kernelbase/tests) WINE_CONFIG_MAKEFILE(dlls/keyboard.drv16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/krnl386.exe16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/ksecdd.sys) +WINE_CONFIG_MAKEFILE(dlls/ksproxy.ax) WINE_CONFIG_MAKEFILE(dlls/ksuser) WINE_CONFIG_MAKEFILE(dlls/ktmw32) WINE_CONFIG_MAKEFILE(dlls/l3codeca.acm) diff --git a/dlls/ksproxy.ax/Makefile.in b/dlls/ksproxy.ax/Makefile.in new file mode 100644 index 0000000000..db6565855d --- /dev/null +++ b/dlls/ksproxy.ax/Makefile.in @@ -0,0 +1,3 @@ +MODULE = ksproxy.ax + +EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/ksproxy.ax/ksproxy.ax.spec b/dlls/ksproxy.ax/ksproxy.ax.spec new file mode 100644 index 0000000000..db7e2112f0 --- /dev/null +++ b/dlls/ksproxy.ax/ksproxy.ax.spec @@ -0,0 +1,10 @@ +@ stub DllCanUnloadNow +@ stub DllGetClassObject +@ stub DllRegisterServer +@ stub DllUnregisterServer +@ stub KsGetMediaType +@ stub KsGetMediaTypeCount +@ stub KsGetMultiplePinFactoryItems +@ stub KsOpenDefaultDevice +@ stub KsResolveRequiredAttributes +@ stub KsSynchronousDeviceControl
1
0
0
0
Christian Costa : d3dx9/tests: Remove useless '\n' within some ok() messages.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: c1cf13a7512387885616684130b605a7640f5187 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c1cf13a75123878856166841…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue Apr 28 13:42:41 2020 +0200 d3dx9/tests: Remove useless '\n' within some ok() messages. Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/tests/mesh.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index ae7c5f2010..81f902291d 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -10126,10 +10126,10 @@ static void test_clone_mesh(void) hr = mesh->lpVtbl->CloneMesh(mesh, tc[i].clone_options, tc[i].new_declaration, test_context->device, &mesh_clone); - ok(hr == D3D_OK, "CloneMesh test case %d failed. Got %x\n, expected D3D_OK\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); hr = mesh_clone->lpVtbl->GetDeclaration(mesh_clone, new_declaration); - ok(hr == D3D_OK, "GetDeclaration test case %d failed. Got %x\n, expected D3D_OK\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); /* Check declaration elements */ for (j = 0; tc[i].new_declaration[j].Stream != 0xFF; j++) { @@ -10315,8 +10315,7 @@ static void test_valid_mesh(void) } hr = D3DXValidMesh(mesh, tc[i].adjacency, &errors_and_warnings); - todo_wine ok(hr == tc[i].exp_hr, "D3DXValidMesh test case %d failed. " - "Got %x\n, expected %x\n", i, hr, tc[i].exp_hr); + todo_wine ok(hr == tc[i].exp_hr, "Test %u, got unexpected hr %#x, expected %#x.\n", i, hr, tc[i].exp_hr); /* Note errors_and_warnings is deliberately not checked because that * would require copying wast amounts of the text output. */ @@ -10459,8 +10458,7 @@ static void test_optimize_faces(void) hr = D3DXOptimizeFaces(tc[i].indices, tc[i].num_faces, tc[i].num_vertices, tc[i].indices_are_32bit, face_remap); - ok(hr == D3D_OK, "D3DXOptimizeFaces test case %d failed. " - "Got %x\n, expected D3D_OK\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); /* Compare face remap with expected face remap */ for (j = 0; j < tc[i].num_faces; j++) @@ -10477,15 +10475,13 @@ static void test_optimize_faces(void) hr = D3DXOptimizeFaces(tc[0].indices, tc[0].num_faces, tc[0].num_vertices, tc[0].indices_are_32bit, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeFaces passed NULL face_remap " - "pointer. Got %x\n, expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); /* Number of faces must be smaller than 2^15 */ hr = D3DXOptimizeFaces(tc[0].indices, 2 << 15, tc[0].num_vertices, FALSE, &smallest_face_remap); - ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeFaces should not accept 2^15 " - "faces when using 16-bit indices. Got %x\n, expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); } static HRESULT clear_normals(ID3DXMesh *mesh)
1
0
0
0
Alexandre Julliard : ntdll: Move TEB allocation to the common code.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: bd9a1e23f2a1eb97492ff977dcb0d96fde8ab2ad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bd9a1e23f2a1eb97492ff977…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 28 13:34:57 2020 +0200 ntdll: Move TEB allocation to the common code. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll_misc.h | 5 ++- dlls/ntdll/signal_arm.c | 17 +------- dlls/ntdll/signal_arm64.c | 18 +-------- dlls/ntdll/signal_i386.c | 95 ++++++++++++++++----------------------------- dlls/ntdll/signal_powerpc.c | 17 +------- dlls/ntdll/signal_x86_64.c | 17 +------- dlls/ntdll/thread.c | 34 ++-------------- dlls/ntdll/virtual.c | 54 +++++++++++++++++++++++++- 8 files changed, 102 insertions(+), 155 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=bd9a1e23f2a1eb97492f…
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
102
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Results per page:
10
25
50
100
200