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
November 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
1 participants
851 discussions
Start a n
N
ew thread
Nikolay Sivov : evr/sample: Reset attributes, timestamps, and flags on ::Clear().
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: 35d7dc9040698767e06552fd619798850b3bb433 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=35d7dc9040698767e06552fd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 16 17:50:20 2020 +0300 evr/sample: Reset attributes, timestamps, and flags on ::Clear(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/sample.c | 74 ++++++++++++++++++++++++++++++++++++++++------------ dlls/evr/tests/evr.c | 39 +++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 17 deletions(-) diff --git a/dlls/evr/sample.c b/dlls/evr/sample.c index 7764ec945d2..aedf19b9fd4 100644 --- a/dlls/evr/sample.c +++ b/dlls/evr/sample.c @@ -61,6 +61,13 @@ struct surface_buffer ULONG length; }; +enum sample_prop_flags +{ + SAMPLE_PROP_HAS_DURATION = 1 << 0, + SAMPLE_PROP_HAS_TIMESTAMP = 1 << 1, + SAMPLE_PROP_HAS_DESIRED_PROPS = 1 << 2, +}; + struct video_sample { IMFSample IMFSample_iface; @@ -73,9 +80,12 @@ struct video_sample IMFAsyncResult *tracked_result; LONG tracked_refcount; - LONGLONG desired_time; + LONGLONG timestamp; + LONGLONG duration; + LONGLONG desired_timestamp; LONGLONG desired_duration; - BOOL desired_set; + unsigned int flags; + CRITICAL_SECTION cs; }; static struct video_sample *impl_from_IMFSample(IMFSample *iface) @@ -931,6 +941,7 @@ static ULONG WINAPI video_sample_Release(IMFSample *iface) video_sample_stop_tracking_thread(); if (sample->sample) IMFSample_Release(sample->sample); + DeleteCriticalSection(&sample->cs); heap_free(sample); } @@ -1229,10 +1240,18 @@ static HRESULT WINAPI video_sample_SetSampleFlags(IMFSample *iface, DWORD flags) static HRESULT WINAPI video_sample_GetSampleTime(IMFSample *iface, LONGLONG *timestamp) { struct video_sample *sample = impl_from_IMFSample(iface); + HRESULT hr = S_OK; TRACE("%p, %p.\n", iface, timestamp); - return IMFSample_GetSampleTime(sample->sample, timestamp); + EnterCriticalSection(&sample->cs); + if (sample->flags & SAMPLE_PROP_HAS_TIMESTAMP) + *timestamp = sample->timestamp; + else + hr = MF_E_NO_SAMPLE_TIMESTAMP; + LeaveCriticalSection(&sample->cs); + + return hr; } static HRESULT WINAPI video_sample_SetSampleTime(IMFSample *iface, LONGLONG timestamp) @@ -1241,16 +1260,29 @@ static HRESULT WINAPI video_sample_SetSampleTime(IMFSample *iface, LONGLONG time TRACE("%p, %s.\n", iface, debugstr_time(timestamp)); - return IMFSample_SetSampleTime(sample->sample, timestamp); + EnterCriticalSection(&sample->cs); + sample->timestamp = timestamp; + sample->flags |= SAMPLE_PROP_HAS_TIMESTAMP; + LeaveCriticalSection(&sample->cs); + + return S_OK; } static HRESULT WINAPI video_sample_GetSampleDuration(IMFSample *iface, LONGLONG *duration) { struct video_sample *sample = impl_from_IMFSample(iface); + HRESULT hr = S_OK; TRACE("%p, %p.\n", iface, duration); - return IMFSample_GetSampleDuration(sample->sample, duration); + EnterCriticalSection(&sample->cs); + if (sample->flags & SAMPLE_PROP_HAS_DURATION) + *duration = sample->duration; + else + hr = MF_E_NO_SAMPLE_DURATION; + LeaveCriticalSection(&sample->cs); + + return hr; } static HRESULT WINAPI video_sample_SetSampleDuration(IMFSample *iface, LONGLONG duration) @@ -1259,7 +1291,12 @@ static HRESULT WINAPI video_sample_SetSampleDuration(IMFSample *iface, LONGLONG TRACE("%p, %s.\n", iface, debugstr_time(duration)); - return IMFSample_SetSampleDuration(sample->sample, duration); + EnterCriticalSection(&sample->cs); + sample->duration = duration; + sample->flags |= SAMPLE_PROP_HAS_DURATION; + LeaveCriticalSection(&sample->cs); + + return S_OK; } static HRESULT WINAPI video_sample_GetBufferCount(IMFSample *iface, DWORD *count) @@ -1468,15 +1505,15 @@ static HRESULT WINAPI desired_video_sample_GetDesiredSampleTimeAndDuration(IMFDe if (!sample_time || !sample_duration) return E_POINTER; - IMFSample_LockStore(sample->sample); - if (sample->desired_set) + EnterCriticalSection(&sample->cs); + if (sample->flags & SAMPLE_PROP_HAS_DESIRED_PROPS) { - *sample_time = sample->desired_time; + *sample_time = sample->desired_timestamp; *sample_duration = sample->desired_duration; } else hr = MF_E_NOT_AVAILABLE; - IMFSample_UnlockStore(sample->sample); + LeaveCriticalSection(&sample->cs); return hr; } @@ -1488,11 +1525,11 @@ static void WINAPI desired_video_sample_SetDesiredSampleTimeAndDuration(IMFDesir TRACE("%p, %s, %s.\n", iface, debugstr_time(sample_time), debugstr_time(sample_duration)); - IMFSample_LockStore(sample->sample); - sample->desired_set = TRUE; - sample->desired_time = sample_time; + EnterCriticalSection(&sample->cs); + sample->flags |= SAMPLE_PROP_HAS_DESIRED_PROPS; + sample->desired_timestamp = sample_time; sample->desired_duration = sample_duration; - IMFSample_UnlockStore(sample->sample); + LeaveCriticalSection(&sample->cs); } static void WINAPI desired_video_sample_Clear(IMFDesiredSample *iface) @@ -1501,9 +1538,11 @@ static void WINAPI desired_video_sample_Clear(IMFDesiredSample *iface) TRACE("%p.\n", iface); - IMFSample_LockStore(sample->sample); - sample->desired_set = FALSE; - IMFSample_UnlockStore(sample->sample); + EnterCriticalSection(&sample->cs); + sample->flags = 0; + IMFSample_SetSampleFlags(sample->sample, 0); + IMFSample_DeleteAllItems(sample->sample); + LeaveCriticalSection(&sample->cs); } static const IMFDesiredSampleVtbl desired_video_sample_vtbl = @@ -1693,6 +1732,7 @@ HRESULT WINAPI MFCreateVideoSampleFromSurface(IUnknown *surface, IMFSample **sam object->IMFTrackedSample_iface.lpVtbl = &tracked_video_sample_vtbl; object->IMFDesiredSample_iface.lpVtbl = &desired_video_sample_vtbl; object->refcount = 1; + InitializeCriticalSection(&object->cs); if (FAILED(hr = MFCreateSample(&object->sample))) { diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index 882d61b9d37..f1831b58f89 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -790,6 +790,45 @@ static void test_surface_sample(void) ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(!count, "Unexpected attribute count %u.\n", count); + /* Attributes are cleared. */ + hr = IMFSample_SetUnknown(sample, &MFSampleExtension_Token, NULL); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFSample_GetCount(sample, &count); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(count == 1, "Unexpected attribute count %u.\n", count); + + hr = IMFSample_SetSampleTime(sample, 0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFSample_GetSampleTime(sample, &time1); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFSample_SetSampleDuration(sample, 0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFSample_GetSampleDuration(sample, &duration); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFSample_SetSampleFlags(sample, 0x1); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + IMFDesiredSample_Clear(desired_sample); + + hr = IMFSample_GetCount(sample, &count); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!count, "Unexpected attribute count %u.\n", count); + + hr = IMFSample_GetSampleTime(sample, &time1); + ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr); + + hr = IMFSample_GetSampleDuration(sample, &duration); + ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr); + + hr = IMFSample_GetSampleFlags(sample, &flags); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(flags == 0, "Unexpected flags %#x.\n", flags); + IMFDesiredSample_Release(desired_sample); hr = IMFSample_GetCount(sample, &count);
1
0
0
0
Nikolay Sivov : mfplat: Add EVRConfig_* attributes to tracing.
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: 600c8186282d826b057d3f2f39112c690f3b12be URL:
https://source.winehq.org/git/wine.git/?a=commit;h=600c8186282d826b057d3f2f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 16 17:50:19 2020 +0300 mfplat: Add EVRConfig_* attributes to tracing. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 1c51fafff1e..44f29522487 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -33,6 +33,7 @@ #include "ole2.h" #include "propsys.h" #include "dxgi.h" +#include "uuids.h" #include "wine/debug.h" #include "wine/list.h" @@ -1543,18 +1544,28 @@ const char *debugstr_attr(const GUID *guid) X(MF_TOPONODE_MARKIN_HERE), X(MF_MT_H264_SUPPORTED_SYNC_FRAME_TYPES), X(MF_TOPONODE_MARKOUT_HERE), + X(EVRConfig_ForceBob), X(MF_TOPONODE_DECODER), + X(EVRConfig_AllowDropToBob), X(MF_TOPOLOGY_PROJECTSTART), + X(EVRConfig_ForceThrottle), X(MF_VIDEO_MAX_MB_PER_SEC), X(MF_TOPOLOGY_PROJECTSTOP), X(MF_SINK_WRITER_ENCODER_CONFIG), + X(EVRConfig_AllowDropToThrottle), X(MF_TOPOLOGY_NO_MARKIN_MARKOUT), + X(EVRConfig_ForceHalfInterlace), + X(EVRConfig_AllowDropToHalfInterlace), + X(EVRConfig_ForceScaling), X(MF_MT_H264_CAPABILITIES), + X(EVRConfig_AllowScaling), X(MF_SOURCE_READER_ENABLE_TRANSCODE_ONLY_TRANSFORMS), X(MFT_PREFERRED_ENCODER_PROFILE), + X(EVRConfig_ForceBatching), + X(EVRConfig_AllowBatching), X(MF_TOPOLOGY_DYNAMIC_CHANGE_NOT_ALLOWED), - X(MF_MT_MPEG2_PROFILE), X(MF_MT_VIDEO_PROFILE), + X(MF_MT_MPEG2_PROFILE), X(MF_MT_DV_AAUX_CTRL_PACK_1), X(MF_MT_ALPHA_MODE), X(MF_MT_MPEG2_TIMECODE), @@ -1743,8 +1754,8 @@ const char *debugstr_attr(const GUID *guid) X(MF_TOPONODE_DISABLE_PREROLL), X(MF_MT_VIDEO_3D_FORMAT), X(MF_EVENT_STREAM_METADATA_KEYDATA), - X(MF_SOURCE_READER_D3D_MANAGER), X(MF_SINK_WRITER_D3D_MANAGER), + X(MF_SOURCE_READER_D3D_MANAGER), X(MFSampleExtension_3DVideo), X(MF_MT_H264_USAGE), X(MF_MEDIA_ENGINE_EME_CALLBACK),
1
0
0
0
Nikolay Sivov : include: Guard MFVideoNormalizedRect definition in mfmediaengine.idl.
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: a2eb9995499a4591212cae2ba6ea265970062b57 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a2eb9995499a4591212cae2b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 16 17:50:18 2020 +0300 include: Guard MFVideoNormalizedRect definition in mfmediaengine.idl. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/mfmediaengine.idl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/mfmediaengine.idl b/include/mfmediaengine.idl index b914cb3600b..c00e364116e 100644 --- a/include/mfmediaengine.idl +++ b/include/mfmediaengine.idl @@ -76,6 +76,8 @@ typedef enum MF_MEDIA_ENGINE_CANPLAY MF_MEDIA_ENGINE_CANPLAY_PROBABLY, } MF_MEDIA_ENGINE_CANPLAY; +cpp_quote("#ifndef _MFVideoNormalizedRect_") +cpp_quote("#define _MFVideoNormalizedRect_") typedef struct MFVideoNormalizedRect { float left; @@ -83,6 +85,7 @@ typedef struct MFVideoNormalizedRect float right; float bottom; } MFVideoNormalizedRect; +cpp_quote("#endif") typedef enum MF_MEDIA_ENGINE_CREATEFLAGS {
1
0
0
0
Nikolay Sivov : mfplat/tests: Add a helper to check for supported interfaces.
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: bf7e6d1773a87d375965d61f7cf442fa37242380 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf7e6d1773a87d375965d61f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 16 17:50:17 2020 +0300 mfplat/tests: Add a helper to check for supported interfaces. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/tests/mfplat.c | 90 +++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 54 deletions(-) diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index c9a01644c6b..474d6281f5f 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -70,6 +70,21 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line) ok_(__FILE__,line)(rc == ref, "Unexpected refcount %d, expected %d.\n", rc, ref); } +#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c) +static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported) +{ + IUnknown *iface = iface_ptr; + HRESULT hr, expected_hr; + IUnknown *unk; + + expected_hr = supported ? S_OK : E_NOINTERFACE; + + hr = IUnknown_QueryInterface(iface, iid, (void **)&unk); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + if (SUCCEEDED(hr)) + IUnknown_Release(unk); +} + static HRESULT (WINAPI *pD3D11CreateDevice)(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, ID3D11Device **device_out, D3D_FEATURE_LEVEL *obtained_feature_level, ID3D11DeviceContext **immediate_context); @@ -867,8 +882,8 @@ if(0) hr = MFCreateMediaType(&mediatype); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - hr = IMFMediaType_QueryInterface(mediatype, &IID_IMFVideoMediaType, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + check_interface(mediatype, &IID_IMFVideoMediaType, FALSE); + hr = IMFMediaType_QueryInterface(mediatype, &IID_IUnknown, (void **)&unk); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(unk == (IUnknown *)mediatype, "Unexpected pointer.\n"); @@ -899,13 +914,9 @@ if(0) hr = MFCreateVideoMediaTypeFromSubtype(&MFVideoFormat_RGB555, &video_type); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - hr = IMFVideoMediaType_QueryInterface(video_type, &IID_IMFMediaType, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - IUnknown_Release(unk); - hr = IMFVideoMediaType_QueryInterface(video_type, &IID_IMFVideoMediaType, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - IUnknown_Release(unk); + check_interface(video_type, &IID_IMFMediaType, TRUE); + check_interface(video_type, &IID_IMFVideoMediaType, TRUE); /* Major and subtype are set on creation. */ hr = IMFVideoMediaType_GetCount(video_type, &count); @@ -917,8 +928,7 @@ if(0) hr = IMFVideoMediaType_GetCount(video_type, &count); ok(!count, "Unexpected attribute count %#x.\n", hr); - hr = IMFVideoMediaType_QueryInterface(video_type, &IID_IMFVideoMediaType, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + check_interface(video_type, &IID_IMFVideoMediaType, FALSE); IMFVideoMediaType_Release(video_type); @@ -928,8 +938,8 @@ if(0) hr = MFCreateMediaType(&mediatype); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - hr = IMFMediaType_QueryInterface(mediatype, &IID_IMFAudioMediaType, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + check_interface(mediatype, &IID_IMFAudioMediaType, FALSE); + hr = IMFMediaType_QueryInterface(mediatype, &IID_IUnknown, (void **)&unk); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(unk == (IUnknown *)mediatype, "Unexpected pointer.\n"); @@ -1620,17 +1630,10 @@ static void test_MFCreateMFByteStreamOnStream(void) ref = IMFByteStream_Release(bytestream2); ok(ref == 2, "got %u\n", ref); - hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFByteStreamBuffering, (void **)&unknown); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); - - hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFByteStreamCacheControl, (void **)&unknown); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); - - hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFMediaEventGenerator, (void **)&unknown); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); - - hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFGetService, (void **)&unknown); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + check_interface(bytestream, &IID_IMFByteStreamBuffering, FALSE); + check_interface(bytestream, &IID_IMFByteStreamCacheControl, FALSE); + check_interface(bytestream, &IID_IMFMediaEventGenerator, FALSE); + check_interface(bytestream, &IID_IMFGetService, FALSE); hr = IMFByteStream_GetCapabilities(bytestream, &caps); ok(hr == S_OK, "Failed to get stream capabilities, hr %#x.\n", hr); @@ -1666,7 +1669,6 @@ static void test_file_stream(void) WCHAR pathW[MAX_PATH]; DWORD caps, count; WCHAR *filename; - IUnknown *unk; HRESULT hr; WCHAR *str; BOOL eos; @@ -1680,18 +1682,10 @@ static void test_file_stream(void) MF_FILEFLAGS_NONE, filename, &bytestream); ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFByteStreamBuffering, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); - - hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFByteStreamCacheControl, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); - - hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFMediaEventGenerator, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); - - hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFGetService, (void **)&unk); - ok(hr == S_OK, "Failed to get interface pointer, hr %#x.\n", hr); - IUnknown_Release(unk); + check_interface(bytestream, &IID_IMFByteStreamBuffering, FALSE); + check_interface(bytestream, &IID_IMFByteStreamCacheControl, FALSE); + check_interface(bytestream, &IID_IMFMediaEventGenerator, FALSE); + check_interface(bytestream, &IID_IMFGetService, TRUE); hr = IMFByteStream_GetCapabilities(bytestream, &caps); ok(hr == S_OK, "Failed to get stream capabilities, hr %#x.\n", hr); @@ -1818,7 +1812,6 @@ static void test_system_memory_buffer(void) HRESULT hr; DWORD length, max; BYTE *data, *data2; - IUnknown *unk; hr = MFCreateMemoryBuffer(1024, NULL); ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08x\n", hr); @@ -1837,8 +1830,7 @@ static void test_system_memory_buffer(void) hr = MFCreateMemoryBuffer(1024, &buffer); ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFGetService, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + check_interface(buffer, &IID_IMFGetService, FALSE); hr = IMFMediaBuffer_GetMaxLength(buffer, NULL); ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08x\n", hr); @@ -4443,7 +4435,6 @@ static void test_create_property_store(void) PROPVARIANT value = {0}; PROPERTYKEY key; ULONG refcount; - IUnknown *unk; DWORD count; HRESULT hr; @@ -4458,10 +4449,8 @@ static void test_create_property_store(void) ok(store2 != store, "Expected different store objects.\n"); IPropertyStore_Release(store2); - hr = IPropertyStore_QueryInterface(store, &IID_IPropertyStoreCache, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); - hr = IPropertyStore_QueryInterface(store, &IID_IPersistSerializedPropStorage, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + check_interface(store, &IID_IPropertyStoreCache, FALSE); + check_interface(store, &IID_IPersistSerializedPropStorage, FALSE); hr = IPropertyStore_GetCount(store, NULL); ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); @@ -5195,7 +5184,6 @@ static void test_MFCreate2DMediaBuffer(void) IMF2DBuffer *_2dbuffer; IMFMediaBuffer *buffer; int i, pitch, pitch2; - IUnknown *unk; HRESULT hr; BOOL ret; @@ -5218,9 +5206,7 @@ static void test_MFCreate2DMediaBuffer(void) hr = pMFCreate2DMediaBuffer(2, 3, MAKEFOURCC('N','V','1','2'), FALSE, &buffer); ok(hr == S_OK, "Failed to create a buffer, hr %#x.\n", hr); - hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFGetService, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - IUnknown_Release(unk); + check_interface(buffer, &IID_IMFGetService, TRUE); /* Full backing buffer size, with 64 bytes per row alignment. */ hr = IMFMediaBuffer_GetMaxLength(buffer, &max_length); @@ -5450,7 +5436,6 @@ static void test_MFCreateMediaBufferFromMediaType(void) HRESULT hr; IMFMediaType *media_type; unsigned int i; - IUnknown *unk; if (!pMFCreateMediaBufferFromMediaType) { @@ -5483,8 +5468,7 @@ static void test_MFCreateMediaBufferFromMediaType(void) if (FAILED(hr)) break; - hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFGetService, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + check_interface(buffer, &IID_IMFGetService, FALSE); hr = IMFMediaBuffer_GetMaxLength(buffer, &length); ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); @@ -5827,7 +5811,6 @@ done: static void test_MFCreateTrackedSample(void) { IMFTrackedSample *tracked_sample; - IMFDesiredSample *desired_sample; IMFSample *sample; IUnknown *unk; HRESULT hr; @@ -5852,8 +5835,7 @@ static void test_MFCreateTrackedSample(void) IMFSample_Release(sample); - hr = IMFTrackedSample_QueryInterface(tracked_sample, &IID_IMFDesiredSample, (void **)&desired_sample); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + check_interface(tracked_sample, &IID_IMFDesiredSample, FALSE); IMFTrackedSample_Release(tracked_sample); }
1
0
0
0
Nikolay Sivov : comctl32: Use wide-char string literals.
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: 564d5804b1f7d4506c076a0a008421cf67b35871 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=564d5804b1f7d4506c076a0a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 16 17:26:34 2020 +0300 comctl32: Use wide-char string literals. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/combo.c | 22 ++++++---------------- dlls/comctl32/comboex.c | 16 ++++++---------- dlls/comctl32/commctrl.c | 6 ++---- dlls/comctl32/datetime.c | 2 +- dlls/comctl32/edit.c | 9 +++------ dlls/comctl32/listbox.c | 12 ++++-------- dlls/comctl32/listview.c | 2 +- dlls/comctl32/progress.c | 2 +- dlls/comctl32/status.c | 2 +- dlls/comctl32/taskdialog.c | 5 ++--- dlls/comctl32/theme_dialog.c | 2 +- dlls/comctl32/theming.c | 10 +++------- dlls/comctl32/toolbar.c | 2 +- dlls/comctl32/trackbar.c | 5 ++--- dlls/comctl32/treeview.c | 2 +- dlls/comctl32/updown.c | 9 +++------ 16 files changed, 38 insertions(+), 70 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=564d5804b1f7d4506c07…
1
0
0
0
Alex Henrie : urlmon: Remove unused variable has_ipv6.
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: 621ed4b61d33c729154863eaea31be92d26c2cb9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=621ed4b61d33c729154863ea…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Nov 16 00:29:20 2020 -0700 urlmon: Remove unused variable has_ipv6. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/urlmon/uri.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index 7f5dc155027..b16ad07d6a8 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -173,7 +173,6 @@ typedef struct { DWORD host_len; Uri_HOST_TYPE host_type; - BOOL has_ipv6; ipv6_address ipv6_address; BOOL has_port; @@ -1699,7 +1698,6 @@ static BOOL parse_ipv6address(const WCHAR **ptr, parse_data *data) { } data->host_type = Uri_HOST_IPV6; - data->has_ipv6 = TRUE; data->ipv6_address = ip; TRACE("(%p %p): Found valid IPv6 literal %s len=%d\n", ptr, data, debugstr_wn(start, *ptr-start), (int)(*ptr-start));
1
0
0
0
Alexandre Julliard : msvcrt: Reimplement _chgsign().
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: dbda71f74d10325a78288fd418d1990e5046a044 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dbda71f74d10325a78288fd4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 16 15:04:00 2020 +0100 msvcrt: Reimplement _chgsign(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 6ed8a50330d..8e8324b8fbe 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -170,8 +170,9 @@ int CDECL MSVCRT__set_FMA3_enable(int flag) */ float CDECL MSVCRT__chgsignf( float num ) { - /* FIXME: +-infinity,Nan not tested */ - return -num; + union { float f; UINT32 i; } u = { num }; + u.i ^= 0x80000000; + return u.f; } /********************************************************************* @@ -1786,8 +1787,9 @@ double CDECL MSVCRT__cabs(struct MSVCRT__complex num) */ double CDECL MSVCRT__chgsign(double num) { - /* FIXME: +-infinity,Nan not tested */ - return -num; + union { double f; UINT64 i; } u = { num }; + u.i ^= 1ull << 63; + return u.f; } /*********************************************************************
1
0
0
0
Alexandre Julliard : msvcrt: Reimplement _dsign().
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: 4619140b1c3fa4f5e5f9ed1439400d0abe115073 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4619140b1c3fa4f5e5f9ed14…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 16 12:21:16 2020 +0100 msvcrt: Reimplement _dsign(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 4b33630b438..6ed8a50330d 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -3873,7 +3873,8 @@ double CDECL MSVCR120_fdim(double x, double y) */ int CDECL MSVCR120__fdsign(float x) { - return signbit(x) ? 0x8000 : 0; + union { float f; UINT32 i; } u = { x }; + return (u.i >> 16) & 0x8000; } /********************************************************************* @@ -3881,7 +3882,8 @@ int CDECL MSVCR120__fdsign(float x) */ int CDECL MSVCR120__dsign(double x) { - return signbit(x) ? 0x8000 : 0; + union { double f; UINT64 i; } u = { x }; + return (u.i >> 48) & 0x8000; }
1
0
0
0
Alexandre Julliard : msvcrt: Reimplement _isnan().
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: d6476e0097948107088df9d73904c0be1c70d510 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d6476e0097948107088df9d7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 16 12:18:03 2020 +0100 msvcrt: Reimplement _isnan(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 94a20e663fe..4b33630b438 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -242,12 +242,10 @@ int CDECL MSVCRT__finitef( float num ) /********************************************************************* * _isnanf (MSVCRT.@) */ -INT CDECL MSVCRT__isnanf( float num ) +int CDECL MSVCRT__isnanf( float num ) { - /* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1. - * Do the same, as the result may be used in calculations - */ - return isnan(num) != 0; + union { float f; UINT32 i; } u = { num }; + return (u.i & 0x7fffffff) > 0x7f800000; } /********************************************************************* @@ -2234,12 +2232,10 @@ int CDECL MSVCRT_fesetenv(const MSVCRT_fenv_t *env) /********************************************************************* * _isnan (MSVCRT.@) */ -INT CDECL MSVCRT__isnan(double num) +int CDECL MSVCRT__isnan(double num) { - /* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1. - * Do the same, as the result may be used in calculations - */ - return isnan(num) != 0; + union { double f; UINT64 i; } u = { num }; + return (u.i & ~0ull >> 1) > 0x7ffull << 52; } /*********************************************************************
1
0
0
0
Alexandre Julliard : msvcrt: Reimplement _finite().
by Alexandre Julliard
16 Nov '20
16 Nov '20
Module: wine Branch: master Commit: 9f088d019bc838946b1a500e41a34c48aae93469 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9f088d019bc838946b1a500e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 16 12:17:52 2020 +0100 msvcrt: Reimplement _finite(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index aa0c6f2f3de..94a20e663fe 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -235,7 +235,8 @@ int CDECL MSVCRT__fpclassf( float num ) */ int CDECL MSVCRT__finitef( float num ) { - return finitef(num) != 0; /* See comment for _isnan() */ + union { float f; UINT32 i; } u = { num }; + return (u.i & 0x7fffffff) < 0x7f800000; } /********************************************************************* @@ -2138,7 +2139,8 @@ double CDECL MSVCRT__copysign(double num, double sign) */ int CDECL MSVCRT__finite(double num) { - return isfinite(num) != 0; /* See comment for _isnan() */ + union { double f; UINT64 i; } u = { num }; + return (u.i & ~0ull >> 1) < 0x7ffull << 52; } /*********************************************************************
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
86
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
Results per page:
10
25
50
100
200