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
Henri Verbeet : wined3d: Make the adapter responsible for compute dispatch.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: e46b69475b020cc91f6f93022b4e40e0b39abe4c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e46b69475b020cc91f6f9302…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Apr 28 02:46:24 2020 +0430 wined3d: Make the adapter responsible for compute dispatch. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 61 +++++++++++++++++++------------------- dlls/wined3d/adapter_vk.c | 67 +++++++++++++++++++++++------------------- dlls/wined3d/cs.c | 2 +- dlls/wined3d/directx.c | 67 +++++++++++++++++++++++------------------- dlls/wined3d/wined3d_private.h | 2 ++ 5 files changed, 108 insertions(+), 91 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e46b69475b020cc91f6f…
1
0
0
0
Henri Verbeet : wined3d: Implement depth/stencil clears in the Vulkan blitter.
by Alexandre Julliard
28 Apr '20
28 Apr '20
Module: wine Branch: master Commit: f793f4446c4e1f01afc2cc47354f65c7049eb38b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f793f4446c4e1f01afc2cc47…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Apr 28 02:46:23 2020 +0430 wined3d: Implement depth/stencil clears in the Vulkan blitter. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context_vk.c | 54 +++++++++++++++++++++++++++++---- dlls/wined3d/texture.c | 68 +++++++++++++++++++++++++++++++++++++++--- dlls/wined3d/wined3d_private.h | 5 +++- 3 files changed, 117 insertions(+), 10 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f793f4446c4e1f01afc2…
1
0
0
0
Gabriel Ivăncescu : qedit: Implement IMediaDet::get_StreamLength().
by Alexandre Julliard
27 Apr '20
27 Apr '20
Module: wine Branch: master Commit: 28ec2795186c7db83637b3b17e4fa95095ebb77d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=28ec2795186c7db83637b3b1…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Apr 27 14:14:05 2020 -0500 qedit: Implement IMediaDet::get_StreamLength(). Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/mediadet.c | 32 +++++++- dlls/qedit/tests/mediadet.c | 185 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 213 insertions(+), 4 deletions(-) diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index 5a19268985..d32679b6bb 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -524,11 +524,35 @@ static HRESULT WINAPI MediaDet_get_StreamTypeB(IMediaDet *iface, BSTR *bstr) return hr; } -static HRESULT WINAPI MediaDet_get_StreamLength(IMediaDet* iface, double *pVal) +static HRESULT WINAPI MediaDet_get_StreamLength(IMediaDet *iface, double *length) { - MediaDetImpl *This = impl_from_IMediaDet(iface); - FIXME("(%p): stub!\n", This); - return VFW_E_INVALIDMEDIATYPE; + MediaDetImpl *detector = impl_from_IMediaDet(iface); + IMediaSeeking *seeking; + HRESULT hr; + + TRACE("detector %p, length %p.\n", detector, length); + + if (!length) + return E_POINTER; + + if (!detector->cur_pin) + return E_INVALIDARG; + + if (SUCCEEDED(hr = IPin_QueryInterface(detector->cur_pin, + &IID_IMediaSeeking, (void **)&seeking))) + { + LONGLONG duration; + + if (SUCCEEDED(hr = IMediaSeeking_GetDuration(seeking, &duration))) + { + /* Windows assumes the time format is TIME_FORMAT_MEDIA_TIME + and does not check it nor convert it, as tests show. */ + *length = (REFTIME)duration / 10000000; + } + IMediaSeeking_Release(seeking); + } + + return hr; } static HRESULT WINAPI MediaDet_get_Filename(IMediaDet* iface, BSTR *pVal) diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index 32861476dd..9bf6c43a2a 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -135,6 +135,7 @@ struct testfilter { struct strmbase_filter filter; struct strmbase_source source; + IMediaSeeking IMediaSeeking_iface; }; static inline struct testfilter *impl_from_strmbase_filter(struct strmbase_filter *iface) @@ -163,6 +164,11 @@ static const struct strmbase_filter_ops testfilter_ops = .filter_destroy = testfilter_destroy, }; +static inline struct testfilter *impl_from_strmbase_pin(struct strmbase_pin *iface) +{ + return CONTAINING_RECORD(iface, struct testfilter, source.pin); +} + static HRESULT testsource_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { static const VIDEOINFOHEADER source_format = @@ -192,6 +198,19 @@ static HRESULT testsource_get_media_type(struct strmbase_pin *iface, unsigned in return S_OK; } +static HRESULT testsource_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) +{ + struct testfilter *filter = impl_from_strmbase_pin(iface); + + if (IsEqualGUID(iid, &IID_IMediaSeeking)) + *out = &filter->IMediaSeeking_iface; + else + return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown*)*out); + return S_OK; +} + static HRESULT WINAPI testsource_DecideAllocator(struct strmbase_source *iface, IMemInputPin *peer, IMemAllocator **allocator) { @@ -201,10 +220,164 @@ static HRESULT WINAPI testsource_DecideAllocator(struct strmbase_source *iface, static const struct strmbase_source_ops testsource_ops = { .base.pin_get_media_type = testsource_get_media_type, + .base.pin_query_interface = testsource_query_interface, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideAllocator = testsource_DecideAllocator, }; +static inline struct testfilter *impl_from_IMediaSeeking(IMediaSeeking *iface) +{ + return CONTAINING_RECORD(iface, struct testfilter, IMediaSeeking_iface); +} + +static HRESULT WINAPI testseek_QueryInterface(IMediaSeeking *iface, REFIID iid, void **out) +{ + struct testfilter *filter = impl_from_IMediaSeeking(iface); + return IPin_QueryInterface(&filter->source.pin.IPin_iface, iid, out); +} + +static ULONG WINAPI testseek_AddRef(IMediaSeeking *iface) +{ + struct testfilter *filter = impl_from_IMediaSeeking(iface); + return IPin_AddRef(&filter->source.pin.IPin_iface); +} + +static ULONG WINAPI testseek_Release(IMediaSeeking *iface) +{ + struct testfilter *filter = impl_from_IMediaSeeking(iface); + return IPin_Release(&filter->source.pin.IPin_iface); +} + +static HRESULT WINAPI testseek_GetCapabilities(IMediaSeeking *iface, DWORD *caps) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_CheckCapabilities(IMediaSeeking *iface, DWORD *caps) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_IsFormatSupported(IMediaSeeking *iface, const GUID *format) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_QueryPreferredFormat(IMediaSeeking *iface, GUID *format) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_GetTimeFormat(IMediaSeeking *iface, GUID *format) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_IsUsingTimeFormat(IMediaSeeking *iface, const GUID *format) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_SetTimeFormat(IMediaSeeking *iface, const GUID *format) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_GetDuration(IMediaSeeking *iface, LONGLONG *duration) +{ + if (winetest_debug > 1) trace("IMediaSeeking_GetDuration()\n"); + + *duration = 42000000; + return S_OK; +} + +static HRESULT WINAPI testseek_GetStopPosition(IMediaSeeking *iface, LONGLONG *stop) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *current) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_ConvertTimeFormat(IMediaSeeking *iface, LONGLONG *target, + const GUID *target_format, LONGLONG source, const GUID *source_format) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_SetPositions(IMediaSeeking *iface, LONGLONG *current, + DWORD current_flags, LONGLONG *stop, DWORD stop_flags) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_GetPositions(IMediaSeeking *iface, LONGLONG *current, LONGLONG *stop) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_GetAvailable(IMediaSeeking *iface, LONGLONG *earliest, LONGLONG *latest) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_SetRate(IMediaSeeking *iface, double rate) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_GetRate(IMediaSeeking *iface, double *rate) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI testseek_GetPreroll(IMediaSeeking *iface, LONGLONG *preroll) +{ + ok(0, "Unexpected call.\n"); + return E_NOTIMPL; +} + +static const IMediaSeekingVtbl testseek_vtbl = +{ + testseek_QueryInterface, + testseek_AddRef, + testseek_Release, + testseek_GetCapabilities, + testseek_CheckCapabilities, + testseek_IsFormatSupported, + testseek_QueryPreferredFormat, + testseek_GetTimeFormat, + testseek_IsUsingTimeFormat, + testseek_SetTimeFormat, + testseek_GetDuration, + testseek_GetStopPosition, + testseek_GetCurrentPosition, + testseek_ConvertTimeFormat, + testseek_SetPositions, + testseek_GetPositions, + testseek_GetAvailable, + testseek_SetRate, + testseek_GetRate, + testseek_GetPreroll +}; + static void testfilter_init(struct testfilter *filter) { static const GUID clsid = {0xabacab}; @@ -212,6 +385,7 @@ static void testfilter_init(struct testfilter *filter) memset(filter, 0, sizeof(*filter)); strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops); strmbase_source_init(&filter->source, &filter->filter, L"", &testsource_ops); + filter->IMediaSeeking_iface.lpVtbl = &testseek_vtbl; } static WCHAR test_avi_filename[MAX_PATH]; @@ -571,6 +745,7 @@ static void test_put_filter(void) IMediaDet *detector; LONG index, count; AM_MEDIA_TYPE mt; + double duration; IUnknown *unk; BSTR filename; HRESULT hr; @@ -586,6 +761,12 @@ static void test_put_filter(void) hr = IMediaDet_get_Filter(detector, NULL); ok(hr == E_POINTER, "Got hr %#x.\n", hr); + hr = IMediaDet_get_StreamLength(detector, NULL); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); + + hr = IMediaDet_get_StreamLength(detector, &duration); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + testfilter_init(&testfilter); hr = IMediaDet_put_Filter(detector, &testfilter.filter.IUnknown_inner); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -639,6 +820,10 @@ static void test_put_filter(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ok(!filename, "Got filename %s.\n", debugstr_w(filename)); + hr = IMediaDet_get_StreamLength(detector, &duration); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(duration == 4.2, "Got duration %.16e.\n", duration); + ref = IMediaDet_Release(detector); ok(!ref, "Got outstanding refcount %d.\n", ref); ref = IBaseFilter_Release(&testfilter2.filter.IBaseFilter_iface);
1
0
0
0
Gabriel Ivăncescu : qedit: Use the pin's media type instead of querying for IFileSourceFilter.
by Alexandre Julliard
27 Apr '20
27 Apr '20
Module: wine Branch: master Commit: 11fd2092054a7af57382dc465ac416b3db779516 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=11fd2092054a7af57382dc46…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Apr 27 14:14:04 2020 -0500 qedit: Use the pin's media type instead of querying for IFileSourceFilter. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/mediadet.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index 3c00a85b9e..5a19268985 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -124,12 +124,10 @@ static HRESULT get_pin_media_type(IPin *pin, AM_MEDIA_TYPE *out) static HRESULT find_splitter(MediaDetImpl *detector) { IPin *source_pin, *splitter_pin; - IFileSourceFilter *file_source; IEnumMoniker *enum_moniker; IFilterMapper2 *mapper; IBaseFilter *splitter; IEnumPins *enum_pins; - LPOLESTR filename; AM_MEDIA_TYPE mt; IMoniker *mon; GUID type[2]; @@ -137,25 +135,6 @@ static HRESULT find_splitter(MediaDetImpl *detector) HRESULT hr; GUID clsid; - if (FAILED(hr = IBaseFilter_QueryInterface(detector->source, - &IID_IFileSourceFilter, (void **)&file_source))) - { - ERR("Failed to get file source interface.\n"); - return hr; - } - - hr = IFileSourceFilter_GetCurFile(file_source, &filename, &mt); - IFileSourceFilter_Release(file_source); - CoTaskMemFree(filename); - if (FAILED(hr)) - { - ERR("Failed to get current file, hr %#x.\n", hr); - return hr; - } - type[0] = mt.majortype; - type[1] = mt.subtype; - FreeMediaType(&mt); - if (FAILED(hr = IBaseFilter_EnumPins(detector->source, &enum_pins))) { ERR("Failed to enumerate source pins, hr %#x.\n", hr); @@ -169,6 +148,17 @@ static HRESULT find_splitter(MediaDetImpl *detector) return hr; } + if (FAILED(hr = get_pin_media_type(source_pin, &mt))) + { + ERR("Failed to get media type, hr %#x.\n", hr); + IPin_Release(source_pin); + return hr; + } + + type[0] = mt.majortype; + type[1] = mt.subtype; + FreeMediaType(&mt); + if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (void **)&mapper))) {
1
0
0
0
Gabriel Ivăncescu : qedit: Retrieve the pin media type using a helper function.
by Alexandre Julliard
27 Apr '20
27 Apr '20
Module: wine Branch: master Commit: ef00425a9c73e92da7bd1129d0c188243eba3c93 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef00425a9c73e92da7bd1129…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Apr 27 14:14:03 2020 -0500 qedit: Retrieve the pin media type using a helper function. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/mediadet.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index 392320560b..3c00a85b9e 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -103,6 +103,24 @@ static HRESULT get_filter_info(IMoniker *moniker, GUID *clsid, VARIANT *var) return hr; } +static HRESULT get_pin_media_type(IPin *pin, AM_MEDIA_TYPE *out) +{ + IEnumMediaTypes *enummt; + AM_MEDIA_TYPE *pmt; + HRESULT hr; + + if (FAILED(hr = IPin_EnumMediaTypes(pin, &enummt))) + return hr; + hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); + IEnumMediaTypes_Release(enummt); + if (hr != S_OK) + return E_NOINTERFACE; + + *out = *pmt; + CoTaskMemFree(pmt); + return S_OK; +} + static HRESULT find_splitter(MediaDetImpl *detector) { IPin *source_pin, *splitter_pin; @@ -611,9 +629,6 @@ static HRESULT WINAPI MediaDet_get_StreamMediaType(IMediaDet* iface, AM_MEDIA_TYPE *pVal) { MediaDetImpl *This = impl_from_IMediaDet(iface); - IEnumMediaTypes *types; - AM_MEDIA_TYPE *pmt; - HRESULT hr; TRACE("(%p)\n", This); @@ -623,22 +638,7 @@ static HRESULT WINAPI MediaDet_get_StreamMediaType(IMediaDet* iface, if (!This->cur_pin) return E_INVALIDARG; - hr = IPin_EnumMediaTypes(This->cur_pin, &types); - if (SUCCEEDED(hr)) - { - hr = (IEnumMediaTypes_Next(types, 1, &pmt, NULL) == S_OK - ? S_OK - : E_NOINTERFACE); - IEnumMediaTypes_Release(types); - } - - if (SUCCEEDED(hr)) - { - *pVal = *pmt; - CoTaskMemFree(pmt); - } - - return hr; + return get_pin_media_type(This->cur_pin, pVal); } static HRESULT WINAPI MediaDet_GetSampleGrabber(IMediaDet* iface,
1
0
0
0
Dmitry Timoshkov : windowscodecs/tests: Add the tests for GIF encoder and decoder.
by Alexandre Julliard
27 Apr '20
27 Apr '20
Module: wine Branch: master Commit: c1d02a5fdf8995dba607530df0f79ef502d24185 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c1d02a5fdf8995dba607530d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Apr 27 10:32:40 2020 +0800 windowscodecs/tests: Add the tests for GIF encoder and decoder. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/tests/converter.c | 61 +++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index 0a7e7238aa..7936c5e653 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -1132,6 +1132,40 @@ static void check_png_format(IStream *stream, const WICPixelFormatGUID *format) ok(0, "unknown PNG pixel format %s\n", wine_dbgstr_guid(format)); } +static void check_gif_format(IStream *stream, const WICPixelFormatGUID *format) +{ +#include "pshpack1.h" + struct logical_screen_descriptor + { + char signature[6]; + USHORT width; + USHORT height; + BYTE packed; + /* global_color_table_flag : 1; + * color_resolution : 3; + * sort_flag : 1; + * global_color_table_size : 3; + */ + BYTE background_color_index; + BYTE pixel_aspect_ratio; + } lsd; +#include "poppack.h" + UINT color_resolution; + HRESULT hr; + + memset(&lsd, 0, sizeof(lsd)); + hr = IStream_Read(stream, &lsd, sizeof(lsd), NULL); + ok(hr == S_OK, "IStream_Read error %#x\n", hr); + + ok(!memcmp(lsd.signature, "GIF89a", 6), "wrong GIF signature %.6s\n", lsd.signature); + + ok(lsd.width == 32, "wrong width %u\n", lsd.width); + ok(lsd.height == 2, "wrong height %u\n", lsd.height); + color_resolution = 1 << (((lsd.packed >> 4) & 0x07) + 1); + ok(color_resolution == 256, "wrong color resolution %u\n", color_resolution); + ok(lsd.pixel_aspect_ratio == 0, "wrong pixel_aspect_ratio %u\n", lsd.pixel_aspect_ratio); +} + static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WICPixelFormatGUID *format) { HRESULT hr; @@ -1147,6 +1181,8 @@ static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WIC check_bmp_format(stream, format); else if (IsEqualGUID(encoder, &CLSID_WICTiffEncoder)) check_tiff_format(stream, format); + else if (IsEqualGUID(encoder, &CLSID_WICGifEncoder)) + check_gif_format(stream, format); else ok(0, "unknown encoder %s\n", wine_dbgstr_guid(encoder)); @@ -1241,6 +1277,8 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls container_format = &GUID_ContainerFormatTiff; else if (IsEqualGUID(clsid_encoder, &CLSID_WICJpegEncoder)) container_format = &GUID_ContainerFormatJpeg; + else if (IsEqualGUID(clsid_encoder, &CLSID_WICGifEncoder)) + container_format = &GUID_ContainerFormatGif; else ok(0, "Unknown encoder %s.\n", wine_dbgstr_guid(clsid_encoder)); @@ -1265,7 +1303,7 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls hr = CoCreateInstance(clsid_encoder, NULL, CLSCTX_INPROC_SERVER, &IID_IWICBitmapEncoder, (void**)&encoder); - ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); + ok(SUCCEEDED(hr), "CoCreateInstance(%s) failed, hr=%x\n", wine_dbgstr_guid(clsid_encoder), hr); if (SUCCEEDED(hr)) { hglobal = GlobalAlloc(GMEM_MOVEABLE, 0); @@ -1290,7 +1328,10 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls if (palette) { hr = IWICBitmapEncoder_SetPalette(encoder, palette); - ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "wrong error %#x\n", hr); + if (IsEqualGUID(clsid_encoder, &CLSID_WICGifEncoder)) + ok(hr == S_OK, "SetPalette failed, hr=%#x\n", hr); + else + ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "wrong error %#x\n", hr); hr = S_OK; } @@ -1429,13 +1470,19 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls ok(hr == S_OK, "CreatePalette error %#x\n", hr); hr = IWICBitmapDecoder_CopyPalette(decoder, frame_palette); - ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "wrong error %#x\n", hr); + if (IsEqualGUID(clsid_decoder, &CLSID_WICGifDecoder)) + ok(hr == WINCODEC_ERR_WRONGSTATE, "wrong error %#x\n", hr); + else + ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "wrong error %#x\n", hr); hr = IWICBitmapDecoder_Initialize(decoder, stream, WICDecodeMetadataCacheOnDemand); ok(SUCCEEDED(hr), "Initialize failed, hr=%x\n", hr); hr = IWICBitmapDecoder_CopyPalette(decoder, frame_palette); - ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "wrong error %#x\n", hr); + if (IsEqualGUID(clsid_decoder, &CLSID_WICGifDecoder)) + ok(hr == S_OK || broken(hr == WINCODEC_ERR_FRAMEMISSING) /* XP */, "CopyPalette failed, hr=%#x\n", hr); + else + ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "wrong error %#x\n", hr); hr = S_OK; i=0; @@ -1495,7 +1542,8 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls } } else if (IsEqualGUID(clsid_decoder, &CLSID_WICBmpDecoder) || - IsEqualGUID(clsid_decoder, &CLSID_WICTiffDecoder)) + IsEqualGUID(clsid_decoder, &CLSID_WICTiffDecoder) || + IsEqualGUID(clsid_decoder, &CLSID_WICGifDecoder)) { if (IsEqualGUID(&pixelformat, &GUID_WICPixelFormatBlackWhite) || IsEqualGUID(&pixelformat, &GUID_WICPixelFormat8bppIndexed)) @@ -1845,6 +1893,9 @@ START_TEST(converter) test_default_converter(); test_converter_8bppIndexed(); + test_encoder(&testdata_8bppIndexed, &CLSID_WICGifEncoder, + &testdata_8bppIndexed, &CLSID_WICGifDecoder, "GIF encoder 8bppIndexed"); + test_encoder(&testdata_BlackWhite, &CLSID_WICPngEncoder, &testdata_BlackWhite, &CLSID_WICPngDecoder, "PNG encoder BlackWhite"); test_encoder(&testdata_1bppIndexed, &CLSID_WICPngEncoder,
1
0
0
0
Dmitry Timoshkov : windowscodecs: Fix IWICBitmapDecoder::CopyPalette for a not initialized case in the GIF decoder.
by Alexandre Julliard
27 Apr '20
27 Apr '20
Module: wine Branch: master Commit: 18a915ef3ca9cd9ad76b97f2646bf32651e045d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=18a915ef3ca9cd9ad76b97f2…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Apr 27 10:32:38 2020 +0800 windowscodecs: Fix IWICBitmapDecoder::CopyPalette for a not initialized case in the GIF decoder. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/gifformat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index fc8f4b1c3e..5d5a3a07a2 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -1187,6 +1187,9 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet TRACE("(%p,%p)\n", iface, palette); + if (!This->gif) + return WINCODEC_ERR_WRONGSTATE; + cm = This->gif->SColorMap; if (cm) {
1
0
0
0
Dmitry Timoshkov : windowscodecs: Add initial implementation of the GIF encoder.
by Alexandre Julliard
27 Apr '20
27 Apr '20
Module: wine Branch: master Commit: 7eb1f5d6ad4205c22d933d0bb417fb4ef6a035ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7eb1f5d6ad4205c22d933d0b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Apr 27 10:32:36 2020 +0800 windowscodecs: Add initial implementation of the GIF encoder. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/tests/image.c | 14 +- dlls/windowscodecs/clsfactory.c | 1 + dlls/windowscodecs/gifformat.c | 1012 ++++++++++++++++++++++++- dlls/windowscodecs/regsvr.c | 10 + dlls/windowscodecs/wincodecs_private.h | 1 + dlls/windowscodecs/windowscodecs_wincodec.idl | 7 + 6 files changed, 1003 insertions(+), 42 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7eb1f5d6ad4205c22d93…
1
0
0
0
Zebediah Figura : ddraw/tests: Test vtbl protection.
by Alexandre Julliard
27 Apr '20
27 Apr '20
Module: wine Branch: master Commit: b95fe88ff5606df702ccd1048621bd2e13e8d574 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b95fe88ff5606df702ccd104…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Apr 27 11:29:04 2020 -0500 ddraw/tests: Test vtbl protection. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw1.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 0e1f4ce85c..4e27ecfb79 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -13410,6 +13410,75 @@ done: DestroyWindow(window); } +static void check_vtbl_protection_(int line, const void *vtbl, SIZE_T size) +{ + MEMORY_BASIC_INFORMATION info; + SIZE_T ret = VirtualQuery(vtbl, &info, size); + ok_(__FILE__, line)(ret == sizeof(info), "Failed to query memory.\n"); + ok_(__FILE__, line)(info.Protect & (PAGE_READWRITE | PAGE_WRITECOPY), "Got protection %#x.\n", info.Protect); +} +#define check_vtbl_protection(a) check_vtbl_protection_(__LINE__, a, sizeof(*(a))) + +static void test_vtbl_protection(void) +{ + PALETTEENTRY palette_entries[256]; + IDirectDrawSurface7 *surface7; + IDirectDrawSurface4 *surface4; + IDirectDrawSurface3 *surface3; + IDirectDrawSurface2 *surface2; + IDirectDrawSurface *surface1; + IDirectDrawPalette *palette; + DDSURFACEDESC surface_desc; + IDirectDraw *ddraw; + ULONG refcount; + HWND window; + HRESULT hr; + + window = create_window(); + ddraw = create_ddraw(); + ok(!!ddraw, "Failed to create a ddraw object.\n"); + hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + surface_desc.dwFlags = DDSD_CAPS; + surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface1, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface2, (void **)&surface2); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface3, (void **)&surface3); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface4, (void **)&surface4); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDrawSurface_QueryInterface(surface1, &IID_IDirectDrawSurface7, (void **)&surface7); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + + memset(palette_entries, 0, sizeof(palette_entries)); + hr = IDirectDraw_CreatePalette(ddraw, DDPCAPS_8BIT | DDPCAPS_ALLOW256, + palette_entries, &palette, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + + check_vtbl_protection(ddraw->lpVtbl); + check_vtbl_protection(palette->lpVtbl); + check_vtbl_protection(surface1->lpVtbl); + check_vtbl_protection(surface2->lpVtbl); + check_vtbl_protection(surface3->lpVtbl); + check_vtbl_protection(surface4->lpVtbl); + check_vtbl_protection(surface7->lpVtbl); + + IDirectDrawPalette_Release(palette); + IDirectDrawSurface_Release(surface1); + IDirectDrawSurface2_Release(surface2); + IDirectDrawSurface3_Release(surface3); + IDirectDrawSurface4_Release(surface4); + IDirectDrawSurface7_Release(surface7); + refcount = IDirectDraw_Release(ddraw); + ok(!refcount, "%u references left.\n", refcount); + DestroyWindow(window); +} + START_TEST(ddraw1) { DDDEVICEIDENTIFIER identifier; @@ -13523,4 +13592,5 @@ START_TEST(ddraw1) test_caps(); test_d32_support(); test_cursor_clipping(); + test_vtbl_protection(); }
1
0
0
0
Alistair Leslie-Hughes : ddraw: Make palette and remaining surface vtbls writable.
by Alexandre Julliard
27 Apr '20
27 Apr '20
Module: wine Branch: master Commit: 0b55384f0dc5382998bb2cc39c317d393ff7657a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0b55384f0dc5382998bb2cc3…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sun Apr 26 22:58:28 2020 -0500 ddraw: Make palette and remaining surface vtbls writable. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46949
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/palette.c | 3 ++- dlls/ddraw/surface.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/palette.c b/dlls/ddraw/palette.c index 980c62b60b..68fb3a5320 100644 --- a/dlls/ddraw/palette.c +++ b/dlls/ddraw/palette.c @@ -215,7 +215,8 @@ static HRESULT WINAPI ddraw_palette_GetEntries(IDirectDrawPalette *iface, return hr; } -static const struct IDirectDrawPaletteVtbl ddraw_palette_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawPaletteVtbl ddraw_palette_vtbl = { /*** IUnknown ***/ ddraw_palette_QueryInterface, diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 4423083835..ba56fad964 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5406,7 +5406,8 @@ static HRESULT WINAPI d3d_texture1_Load(IDirect3DTexture *iface, IDirect3DTextur * The VTable *****************************************************************************/ -static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl = { /* IUnknown */ ddraw_surface7_QueryInterface, @@ -5465,7 +5466,8 @@ static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl = ddraw_surface7_GetLOD, }; -static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl = { /* IUnknown */ ddraw_surface4_QueryInterface, @@ -5519,7 +5521,8 @@ static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl = ddraw_surface4_ChangeUniquenessValue, }; -static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl = { /* IUnknown */ ddraw_surface3_QueryInterface, @@ -5567,7 +5570,8 @@ static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl = ddraw_surface3_SetSurfaceDesc, }; -static const struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl = { /* IUnknown */ ddraw_surface2_QueryInterface,
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
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