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
September 2019
----- 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
629 discussions
Start a n
N
ew thread
Nikolay Sivov : mf: Remove fixme trace for partially handled functionality.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: df5463f3aa02bcc9d6a87baed60b19ca99eb8cec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=df5463f3aa02bcc9d6a87bae…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 24 12:02:01 2019 +0300 mf: Remove fixme trace for partially handled functionality. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/session.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 9042c1288a..6fdf773702 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -768,10 +768,7 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses struct media_session *object; HRESULT hr; - TRACE("(%p, %p)\n", config, session); - - if (config) - FIXME("session configuration ignored\n"); + TRACE("%p, %p.\n", config, session); object = heap_alloc_zero(sizeof(*object)); if (!object)
1
0
0
0
Nikolay Sivov : mf: Create quality manager on session creation.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: c64f919b09c66f7563b21f9ddf315eb3ff27c1fa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c64f919b09c66f7563b21f9d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 24 12:02:00 2019 +0300 mf: Create quality manager on session creation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/session.c | 22 ++++++++++++++++++++++ dlls/mf/tests/mf.c | 8 ++++++++ 2 files changed, 30 insertions(+) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 89128b7b6a..9042c1288a 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -70,6 +70,7 @@ struct media_session IMFPresentationClock *clock; IMFRateControl *clock_rate_control; IMFTopoLoader *topo_loader; + IMFQualityManager *quality_manager; struct list topologies; enum session_state state; CRITICAL_SECTION cs; @@ -332,6 +333,8 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface) IMFRateControl_Release(session->clock_rate_control); if (session->topo_loader) IMFTopoLoader_Release(session->topo_loader); + if (session->quality_manager) + IMFQualityManager_Release(session->quality_manager); DeleteCriticalSection(&session->cs); heap_free(session); } @@ -761,6 +764,7 @@ static const IMFRateControlVtbl session_rate_control_vtbl = */ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session) { + BOOL without_quality_manager = FALSE; struct media_session *object; HRESULT hr; @@ -806,11 +810,29 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses WARN("Failed to create custom topology loader, hr %#x.\n", hr); } } + + if (SUCCEEDED(IMFAttributes_GetGUID(config, &MF_SESSION_QUALITY_MANAGER, &clsid))) + { + if (!(without_quality_manager = IsEqualGUID(&clsid, &GUID_NULL))) + { + if (FAILED(hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IMFQualityManager, + (void **)&object->quality_manager))) + { + WARN("Failed to create custom quality manager, hr %#x.\n", hr); + } + } + } } if (!object->topo_loader && FAILED(hr = MFCreateTopoLoader(&object->topo_loader))) goto failed; + if (!object->quality_manager && !without_quality_manager && + FAILED(hr = MFCreateStandardQualityManager(&object->quality_manager))) + { + goto failed; + } + *session = &object->IMFMediaSession_iface; return S_OK; diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 64329846cd..4eba79e120 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -1055,6 +1055,14 @@ todo_wine ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr); IMFMediaSession_Release(session); + /* Disabled quality manager. */ + hr = IMFAttributes_SetGUID(attributes, &MF_SESSION_QUALITY_MANAGER, &GUID_NULL); + ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + + hr = MFCreateMediaSession(attributes, &session); + ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr); + IMFMediaSession_Release(session); + IMFAttributes_Release(attributes); hr = MFShutdown();
1
0
0
0
Nikolay Sivov : mf: Create topology loader of session creation.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: 76a347a53eba882d28b2a0868a45ae22405200ab URL:
https://source.winehq.org/git/wine.git/?a=commit;h=76a347a53eba882d28b2a086…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 24 12:01:59 2019 +0300 mf: Create topology loader of session creation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/session.c | 20 ++++++++++++++++++++ dlls/mf/tests/mf.c | 14 ++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index ecee112c3f..89128b7b6a 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -69,6 +69,7 @@ struct media_session IMFMediaEventQueue *event_queue; IMFPresentationClock *clock; IMFRateControl *clock_rate_control; + IMFTopoLoader *topo_loader; struct list topologies; enum session_state state; CRITICAL_SECTION cs; @@ -329,6 +330,8 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface) IMFPresentationClock_Release(session->clock); if (session->clock_rate_control) IMFRateControl_Release(session->clock_rate_control); + if (session->topo_loader) + IMFTopoLoader_Release(session->topo_loader); DeleteCriticalSection(&session->cs); heap_free(session); } @@ -791,6 +794,23 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses goto failed; } + if (config) + { + GUID clsid; + + if (SUCCEEDED(IMFAttributes_GetGUID(config, &MF_SESSION_TOPOLOADER, &clsid))) + { + if (FAILED(hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IMFTopoLoader, + (void **)&object->topo_loader))) + { + WARN("Failed to create custom topology loader, hr %#x.\n", hr); + } + } + } + + if (!object->topo_loader && FAILED(hr = MFCreateTopoLoader(&object->topo_loader))) + goto failed; + *session = &object->IMFMediaSession_iface; return S_OK; diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 00dc2daed5..64329846cd 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -954,6 +954,7 @@ static void test_media_session(void) IMFRateControl *rate_control, *rate_control2; MFCLOCK_PROPERTIES clock_props; IMFRateSupport *rate_support; + IMFAttributes *attributes; IMFMediaSession *session; IMFGetService *gs; IMFClock *clock; @@ -1043,6 +1044,19 @@ todo_wine IMFMediaSession_Release(session); + /* Custom topology loader, GUID is not registered. */ + hr = MFCreateAttributes(&attributes, 1); + ok(hr == S_OK, "Failed to create attributes, hr %#x.\n", hr); + + hr = IMFAttributes_SetGUID(attributes, &MF_SESSION_TOPOLOADER, &MF_SESSION_TOPOLOADER); + ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + + hr = MFCreateMediaSession(attributes, &session); + ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr); + IMFMediaSession_Release(session); + + IMFAttributes_Release(attributes); + hr = MFShutdown(); ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); }
1
0
0
0
Nikolay Sivov : mf: Add stub implementation for standard quality manager.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: 000a552d4f25bfe49c73df8fc965777e4c6d47b9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=000a552d4f25bfe49c73df8f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 24 12:01:58 2019 +0300 mf: Add stub implementation for standard quality manager. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/mf.spec | 2 +- dlls/mf/session.c | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/mf/tests/mf.c | 12 +++++ include/mfidl.idl | 24 ++++++++++ 4 files changed, 167 insertions(+), 1 deletion(-) diff --git a/dlls/mf/mf.spec b/dlls/mf/mf.spec index 6e64404ba6..f13a2451fb 100644 --- a/dlls/mf/mf.spec +++ b/dlls/mf/mf.spec @@ -58,7 +58,7 @@ @ stub MFCreateSequencerSourceRemoteStream @ stub MFCreateSimpleTypeHandler @ stdcall MFCreateSourceResolver(ptr) mfplat.MFCreateSourceResolver -@ stub MFCreateStandardQualityManager +@ stdcall MFCreateStandardQualityManager(ptr) @ stdcall MFCreateTopoLoader(ptr) @ stdcall MFCreateTopology(ptr) @ stdcall MFCreateTopologyNode(long ptr) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 1276f2ec92..ecee112c3f 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -133,6 +133,12 @@ struct presentation_clock CRITICAL_SECTION cs; }; +struct quality_manager +{ + IMFQualityManager IMFQualityManager_iface; + LONG refcount; +}; + static inline struct media_session *impl_from_IMFMediaSession(IMFMediaSession *iface) { return CONTAINING_RECORD(iface, struct media_session, IMFMediaSession_iface); @@ -193,6 +199,11 @@ static struct sink_notification *impl_from_IUnknown(IUnknown *iface) return CONTAINING_RECORD(iface, struct sink_notification, IUnknown_iface); } +static struct quality_manager *impl_from_IMFQualityManager(IMFQualityManager *iface) +{ + return CONTAINING_RECORD(iface, struct quality_manager, IMFQualityManager_iface); +} + static HRESULT WINAPI session_op_QueryInterface(IUnknown *iface, REFIID riid, void **obj) { if (IsEqualIID(riid, &IID_IUnknown)) @@ -1542,3 +1553,122 @@ HRESULT WINAPI MFCreatePresentationClock(IMFPresentationClock **clock) return S_OK; } + +static HRESULT WINAPI standard_quality_manager_QueryInterface(IMFQualityManager *iface, REFIID riid, void **out) +{ + TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), out); + + if (IsEqualIID(riid, &IID_IMFQualityManager) || + IsEqualIID(riid, &IID_IUnknown)) + { + *out = iface; + IMFQualityManager_AddRef(iface); + return S_OK; + } + + WARN("Unsupported %s.\n", debugstr_guid(riid)); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI standard_quality_manager_AddRef(IMFQualityManager *iface) +{ + struct quality_manager *manager = impl_from_IMFQualityManager(iface); + ULONG refcount = InterlockedIncrement(&manager->refcount); + + TRACE("%p, refcount %u.\n", iface, refcount); + + return refcount; +} + +static ULONG WINAPI standard_quality_manager_Release(IMFQualityManager *iface) +{ + struct quality_manager *manager = impl_from_IMFQualityManager(iface); + ULONG refcount = InterlockedDecrement(&manager->refcount); + + TRACE("%p, refcount %u.\n", iface, refcount); + + if (!refcount) + { + heap_free(manager); + } + + return refcount; +} + +static HRESULT WINAPI standard_quality_manager_NotifyTopology(IMFQualityManager *iface, IMFTopology *topology) +{ + FIXME("%p, %p stub.\n", iface, topology); + + return E_NOTIMPL; +} + +static HRESULT WINAPI standard_quality_manager_NotifyPresentationClock(IMFQualityManager *iface, + IMFPresentationClock *clock) +{ + FIXME("%p, %p stub.\n", iface, clock); + + return E_NOTIMPL; +} + +static HRESULT WINAPI standard_quality_manager_NotifyProcessInput(IMFQualityManager *iface, IMFTopologyNode *node, + LONG input_index, IMFSample *sample) +{ + FIXME("%p, %p, %d, %p stub.\n", iface, node, input_index, sample); + + return E_NOTIMPL; +} + +static HRESULT WINAPI standard_quality_manager_NotifyProcessOutput(IMFQualityManager *iface, IMFTopologyNode *node, + LONG output_index, IMFSample *sample) +{ + FIXME("%p, %p, %d, %p stub.\n", iface, node, output_index, sample); + + return E_NOTIMPL; +} + +static HRESULT WINAPI standard_quality_manager_NotifyQualityEvent(IMFQualityManager *iface, IUnknown *object, + IMFMediaEvent *event) +{ + FIXME("%p, %p, %p stub.\n", iface, object, event); + + return E_NOTIMPL; +} + +static HRESULT WINAPI standard_quality_manager_Shutdown(IMFQualityManager *iface) +{ + FIXME("%p stub.\n", iface); + + return E_NOTIMPL; +} + +static IMFQualityManagerVtbl standard_quality_manager_vtbl = +{ + standard_quality_manager_QueryInterface, + standard_quality_manager_AddRef, + standard_quality_manager_Release, + standard_quality_manager_NotifyTopology, + standard_quality_manager_NotifyPresentationClock, + standard_quality_manager_NotifyProcessInput, + standard_quality_manager_NotifyProcessOutput, + standard_quality_manager_NotifyQualityEvent, + standard_quality_manager_Shutdown, +}; + +HRESULT WINAPI MFCreateStandardQualityManager(IMFQualityManager **manager) +{ + struct quality_manager *object; + + TRACE("%p.\n", manager); + + object = heap_alloc_zero(sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + object->IMFQualityManager_iface.lpVtbl = &standard_quality_manager_vtbl; + object->refcount = 1; + + *manager = &object->IMFQualityManager_iface; + + return S_OK; +} diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 0a8a88d6c3..00dc2daed5 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -2398,6 +2398,17 @@ failed: CoUninitialize(); } +static void test_quality_manager(void) +{ + IMFQualityManager *manager; + HRESULT hr; + + hr = MFCreateStandardQualityManager(&manager); + ok(hr == S_OK, "Failed to create quality manager, hr %#x.\n", hr); + + IMFQualityManager_Release(manager); +} + START_TEST(mf) { test_topology(); @@ -2409,4 +2420,5 @@ START_TEST(mf) test_presentation_clock(); test_sample_grabber(); test_video_processor(); + test_quality_manager(); } diff --git a/include/mfidl.idl b/include/mfidl.idl index f40f16e480..ab6d0d9984 100644 --- a/include/mfidl.idl +++ b/include/mfidl.idl @@ -577,6 +577,7 @@ cpp_quote("HRESULT WINAPI MFCreateSampleGrabberSinkActivate(IMFMediaType *media_ cpp_quote(" IMFSampleGrabberSinkCallback *callback, IMFActivate **activate);") cpp_quote("HRESULT WINAPI MFCreateSequencerSource(IUnknown *reserved, IMFSequencerSource **seq_source);" ) cpp_quote("HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);") +cpp_quote("HRESULT WINAPI MFCreateStandardQualityManager(IMFQualityManager **manager);") cpp_quote("HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD cMediaTypes,") cpp_quote(" IMFMediaType **types, IMFStreamDescriptor **descriptor);") cpp_quote("HRESULT WINAPI MFCreateSystemTimeSource(IMFPresentationTimeSource **time_source);") @@ -738,6 +739,29 @@ interface IMFShutdown : IUnknown HRESULT GetShutdownStatus([out] MFSHUTDOWN_STATUS *status); } +[ + object, + uuid(8d009d86-5b9f-4115-b1fc-9f80d52ab8ab), + local +] +interface IMFQualityManager : IUnknown +{ + HRESULT NotifyTopology([in] IMFTopology *topology); + HRESULT NotifyPresentationClock([in] IMFPresentationClock *clock); + HRESULT NotifyProcessInput( + [in] IMFTopologyNode *node, + [in] LONG input_index, + [in] IMFSample *sample); + HRESULT NotifyProcessOutput( + [in] IMFTopologyNode *node, + [in] LONG output_index, + [in] IMFSample *sample); + HRESULT NotifyQualityEvent( + [in] IUnknown *object, + [in] IMFMediaEvent *event); + HRESULT Shutdown(); +} + cpp_quote("#define MF_RESOLUTION_MEDIASOURCE 0x00000001") cpp_quote("#define MF_RESOLUTION_BYTESTREAM 0x00000002") cpp_quote("#define MF_RESOLUTION_CONTENT_DOES_NOT_HAVE_TO_MATCH_EXTENSION_OR_MIME_TYPE 0x00000010")
1
0
0
0
Nikolay Sivov : mfplat: Add Media Session attributes for tracing.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: 27901739f5564e8f47fbbcca6f6a090a161008ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27901739f5564e8f47fbbcca…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 24 12:01:57 2019 +0300 mfplat: Add Media Session attributes for tracing. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 8 ++++++++ include/mfidl.idl | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 5cbf1212f7..30810daa44 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -630,6 +630,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_SOURCE_READER_ENABLE_TRANSCODE_ONLY_TRANSFORMS), X(MF_TOPOLOGY_DYNAMIC_CHANGE_NOT_ALLOWED), X(MF_MT_ALPHA_MODE), + X(MF_PMP_SERVER_CONTEXT), X(MF_TOPOLOGY_PLAYBACK_MAX_DIMS), X(MF_LOW_LATENCY), X(MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS), @@ -638,6 +639,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_MT_WRAPPED_TYPE), X(MF_MT_AVG_BITRATE), X(MF_SOURCE_READER_ENABLE_ADVANCED_VIDEO_PROCESSING), + X(MF_SESSION_APPROX_EVENT_OCCURRENCE_TIME), X(MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_MAX_BUFFERS), X(MF_MT_AUDIO_BLOCK_ALIGNMENT), X(MF_PD_PMPHOST_CONTEXT), @@ -693,6 +695,10 @@ const char *debugstr_attr(const GUID *guid) X(MF_SD_LANGUAGE), X(MF_MT_AUDIO_WMADRC_AVGTARGET), X(MF_SD_PROTECTED), + X(MF_SESSION_TOPOLOADER), + X(MF_SESSION_GLOBAL_TIME), + X(MF_SESSION_QUALITY_MANAGER), + X(MF_SESSION_CONTENT_PROTECTION_MANAGER), X(MF_READWRITE_MMCSS_PRIORITY_AUDIO), X(MF_BYTESTREAM_ORIGIN_NAME), X(MF_BYTESTREAM_CONTENT_TYPE), @@ -710,6 +716,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_MT_MAJOR_TYPE), X(MF_EVENT_SOURCE_CHARACTERISTICS), X(MF_EVENT_SOURCE_CHARACTERISTICS_OLD), + X(MF_SESSION_SERVER_CONTEXT), X(MF_MT_VIDEO_3D_FIRST_IS_LEFT), X(MF_PD_ADAPTIVE_STREAMING), X(MFSampleExtension_Timestamp), @@ -781,6 +788,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_EVENT_MFT_CONTEXT), X(MF_MT_FORWARD_CUSTOM_SEI), X(MF_TOPONODE_CONNECT_METHOD), + X(MF_SESSION_REMOTE_SOURCE_MODE), X(MF_MT_DEPTH_VALUE_UNIT), X(MF_MT_AUDIO_NUM_CHANNELS), X(MF_TOPOLOGY_DXVA_MODE), diff --git a/include/mfidl.idl b/include/mfidl.idl index 5f8913384c..f40f16e480 100644 --- a/include/mfidl.idl +++ b/include/mfidl.idl @@ -842,4 +842,13 @@ cpp_quote("EXTERN_GUID(MF_RATE_CONTROL_SERVICE, 0x866fa297, 0xb802, 0x4bf8, 0x9d cpp_quote("EXTERN_GUID(MF_SAMPLEGRABBERSINK_SAMPLE_TIME_OFFSET, 0x62e3d776, 0x8100, 0x4e03, 0xa6, 0xe8, 0xbd, 0x38, 0x57, 0xac, 0x9c, 0x47);") cpp_quote("EXTERN_GUID(MF_SAMPLEGRABBERSINK_IGNORE_CLOCK, 0x0efda2c0, 0x2b69, 0x4e2e, 0xab, 0x8d, 0x46, 0xdc, 0xbf, 0xf7, 0xd2, 0x5d);") +cpp_quote("EXTERN_GUID(MF_SESSION_TOPOLOADER, 0x1e83d482, 0x1f1c, 0x4571, 0x84, 0x05, 0x88, 0xf4, 0xb2, 0x18, 0x1f, 0x71);") +cpp_quote("EXTERN_GUID(MF_SESSION_GLOBAL_TIME, 0x1e83d482, 0x1f1c, 0x4571, 0x84, 0x05, 0x88, 0xf4, 0xb2, 0x18, 0x1f, 0x72);") +cpp_quote("EXTERN_GUID(MF_SESSION_QUALITY_MANAGER, 0x1e83d482, 0x1f1c, 0x4571, 0x84, 0x05, 0x88, 0xf4, 0xb2, 0x18, 0x1f, 0x73);") +cpp_quote("EXTERN_GUID(MF_SESSION_CONTENT_PROTECTION_MANAGER, 0x1e83d482, 0x1f1c, 0x4571, 0x84, 0x05, 0x88, 0xf4, 0xb2, 0x18, 0x1f, 0x74);") +cpp_quote("EXTERN_GUID(MF_SESSION_SERVER_CONTEXT, 0xafe5b291, 0x50fa, 0x46e8, 0xb9, 0xbe, 0x0c, 0x0c, 0x3c, 0xe4, 0xb3, 0xa5);") +cpp_quote("EXTERN_GUID(MF_SESSION_REMOTE_SOURCE_MODE, 0xf4033ef4, 0x9bb3, 0x4378, 0x94, 0x1f, 0x85, 0xa0, 0x85, 0x6b, 0xc2, 0x44);") +cpp_quote("EXTERN_GUID(MF_SESSION_APPROX_EVENT_OCCURRENCE_TIME, 0x190e852f, 0x6238, 0x42d1, 0xb5, 0xaf, 0x69, 0xea, 0x33, 0x8e, 0xf8, 0x50);") +cpp_quote("EXTERN_GUID(MF_PMP_SERVER_CONTEXT, 0x2f00c910, 0xd2cf, 0x4278, 0x8b, 0x6a, 0xd0, 0x77, 0xfa, 0xc3, 0xa2, 0x5f);") + cpp_quote("EXTERN_GUID(CLSID_VideoProcessorMFT, 0x88753b26, 0x5b24, 0x49bd, 0xb2, 0xe7, 0xc, 0x44, 0x5c, 0x78, 0xc9, 0x82);")
1
0
0
0
Brendan Shanks : user32: Fix behavior of GetWindowInfo(0, NULL).
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: c8dbb0c4c1ec4cc7979715a6ebc02ece90ae220e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c8dbb0c4c1ec4cc7979715a6…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Sep 23 10:41:07 2019 -0700 user32: Fix behavior of GetWindowInfo(0, NULL). Windows doesn't do a NULL check on the WINDOWINFO pointer. Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/win.c | 2 +- dlls/user32/win.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 6b600cb1bc..784849b2ba 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -1007,7 +1007,7 @@ static void test_window_info(const char *hook, HWND hwnd) if (0) { /* crashes on XP, 2003 */ SetLastError(0xdeadbeef); ok(!pGetWindowInfo(0, NULL), "GetWindowInfo should fail\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, + ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); } diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 3582262b7d..3323ed3e41 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -3845,9 +3845,13 @@ UINT WINAPI GetWindowModuleFileNameW( HWND hwnd, LPWSTR module, UINT size ) */ BOOL WINAPI DECLSPEC_HOTPATCH GetWindowInfo( HWND hwnd, PWINDOWINFO pwi) { + RECT rcWindow, rcClient; + + if (!WIN_GetRectangles( hwnd, COORDS_SCREEN, &rcWindow, &rcClient )) return FALSE; if (!pwi) return FALSE; - if (!WIN_GetRectangles( hwnd, COORDS_SCREEN, &pwi->rcWindow, &pwi->rcClient )) return FALSE; + pwi->rcWindow = rcWindow; + pwi->rcClient = rcClient; pwi->dwStyle = GetWindowLongW(hwnd, GWL_STYLE); pwi->dwExStyle = GetWindowLongW(hwnd, GWL_EXSTYLE); pwi->dwWindowStatus = ((GetActiveWindow() == hwnd) ? WS_ACTIVECAPTION : 0);
1
0
0
0
Brendan Shanks : user32/tests: Test GetWindowInfo error conditions and incorrect cbSize.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: 38dd9faf96eb8ea464ee095c92faa83761c032ca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=38dd9faf96eb8ea464ee095c…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Sep 23 10:41:06 2019 -0700 user32/tests: Test GetWindowInfo error conditions and incorrect cbSize. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47783
Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/win.c | 75 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index c6fbd7c12a..6b600cb1bc 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -24,6 +24,7 @@ #define _WIN32_WINNT 0x0501 #include <assert.h> +#include <limits.h> #include <stdlib.h> #include <stdarg.h> #include <stdio.h> @@ -996,6 +997,61 @@ if (0) "wrong wCreatorVersion %04x for %p in hook %s\n", info->wCreatorVersion, hwnd, hook); } +static void test_window_info(const char *hook, HWND hwnd) +{ + WINDOWINFO info, info2; + + if (0) /* crashes on Win10 */ + ok(!pGetWindowInfo(hwnd, NULL), "GetWindowInfo should fail\n"); + + if (0) { /* crashes on XP, 2003 */ + SetLastError(0xdeadbeef); + ok(!pGetWindowInfo(0, NULL), "GetWindowInfo should fail\n"); + todo_wine ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, + "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); + } + + SetLastError(0xdeadbeef); + ok(!pGetWindowInfo(0, &info), "GetWindowInfo should fail\n"); + ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, + "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); + + info.cbSize = sizeof(WINDOWINFO); + ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n"); + verify_window_info(hook, hwnd, &info); + + /* test different cbSize values. + * Windows ignores it (except for Win98, according to an old comment). + */ + memset(&info, 0xcc, sizeof(WINDOWINFO)); + memset(&info2, 0xcc, sizeof(WINDOWINFO)); + + info.cbSize = sizeof(WINDOWINFO); + info2.cbSize = sizeof(WINDOWINFO); + + ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n"); + ok(pGetWindowInfo(hwnd, &info2), "GetWindowInfo should not fail\n"); + ok(memcmp(&info, &info2, sizeof(WINDOWINFO)) == 0, "identical GetWindowInfo calls produce different result\n"); + + memset(&info2, 0xcc, sizeof(WINDOWINFO)); + info2.cbSize = 0; + ok(pGetWindowInfo(hwnd, &info2), "GetWindowInfo should not fail\n"); + info2.cbSize = sizeof(WINDOWINFO); + ok(memcmp(&info, &info2, sizeof(WINDOWINFO)) == 0, "GetWindowInfo cbSize should be ignored\n"); + + memset(&info2, 0xcc, sizeof(WINDOWINFO)); + info2.cbSize = sizeof(WINDOWINFO)/2; + ok(pGetWindowInfo(hwnd, &info2), "GetWindowInfo should not fail\n"); + info2.cbSize = sizeof(WINDOWINFO); + ok(memcmp(&info, &info2, sizeof(WINDOWINFO)) == 0, "GetWindowInfo cbSize should be ignored\n"); + + memset(&info2, 0xcc, sizeof(WINDOWINFO)); + info2.cbSize = UINT_MAX; + ok(pGetWindowInfo(hwnd, &info2), "GetWindowInfo should not fail\n"); + info2.cbSize = sizeof(WINDOWINFO); + ok(memcmp(&info, &info2, sizeof(WINDOWINFO)) == 0, "GetWindowInfo cbSize should be ignored\n"); +} + static void FixedAdjustWindowRectEx(RECT* rc, LONG style, BOOL menu, LONG exstyle) { AdjustWindowRectEx(rc, style, menu, exstyle); @@ -1172,12 +1228,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) ok(createwnd->hwndInsertAfter == HWND_TOP, "hwndInsertAfter should be always HWND_TOP\n"); if (pGetWindowInfo) - { - WINDOWINFO info; - info.cbSize = sizeof(WINDOWINFO); - ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n"); - verify_window_info(code_name, hwnd, &info); - } + test_window_info(code_name, hwnd); /* WS_VISIBLE should be turned off yet */ style = createwnd->lpcs->style & ~WS_VISIBLE; @@ -1238,17 +1289,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) case HCBT_MINMAX: case HCBT_ACTIVATE: if (pGetWindowInfo && IsWindow(hwnd)) - { - WINDOWINFO info; - - /* Win98 actually does check the info.cbSize and doesn't allow - * it to be anything except sizeof(WINDOWINFO), while Win95, Win2k, - * WinXP do not check it at all. - */ - info.cbSize = sizeof(WINDOWINFO); - ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n"); - verify_window_info(code_name, hwnd, &info); - } + test_window_info(code_name, hwnd); break; /* window state is undefined */ case HCBT_SETFOCUS:
1
0
0
0
Zebediah Figura : strmbase: Get rid of the BasePin typedef.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: 8619eb9838f7cc35ed402fe6eea5f1c04dd413c7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8619eb9838f7cc35ed402fe6…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Sep 23 19:33:24 2019 -0500 strmbase: Get rid of the BasePin typedef. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/avico.c | 16 +++++++-------- dlls/qcap/avimux.c | 14 ++++++------- dlls/qcap/smartteefilter.c | 30 +++++++++++++-------------- dlls/qcap/vfwcapture.c | 10 ++++----- dlls/quartz/filesource.c | 10 ++++----- dlls/strmbase/mediatype.c | 4 ++-- dlls/strmbase/pin.c | 30 +++++++++++++-------------- dlls/strmbase/renderer.c | 2 +- dlls/strmbase/strmbase_private.h | 2 +- dlls/strmbase/transform.c | 6 +++--- dlls/strmbase/video.c | 2 +- dlls/strmbase/window.c | 2 +- dlls/winegstreamer/gstdemux.c | 14 ++++++------- dlls/wineqtdecoder/qtsplitter.c | 12 +++++------ include/wine/strmbase.h | 44 +++++++++++++++++++--------------------- 15 files changed, 97 insertions(+), 101 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=8619eb9838f7cc35ed40…
1
0
0
0
Zebediah Figura : strmbase: Get rid of the "enumMediaFunction" field from IEnumMediaTypesImpl.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: 750efd19a75c8b3259baee45795c1a9e94fbaf7b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=750efd19a75c8b3259baee45…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Sep 23 19:33:23 2019 -0500 strmbase: Get rid of the "enumMediaFunction" field from IEnumMediaTypesImpl. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/mediatype.c | 20 +++++--------------- dlls/strmbase/pin.c | 2 +- dlls/strmbase/strmbase_private.h | 3 +-- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/dlls/strmbase/mediatype.c b/dlls/strmbase/mediatype.c index bb59a81584..af6832a571 100644 --- a/dlls/strmbase/mediatype.c +++ b/dlls/strmbase/mediatype.c @@ -82,7 +82,6 @@ typedef struct IEnumMediaTypesImpl IEnumMediaTypes IEnumMediaTypes_iface; LONG refCount; BasePin *basePin; - BasePin_GetMediaType enumMediaFunction; ULONG count; ULONG uIndex; } IEnumMediaTypesImpl; @@ -94,11 +93,9 @@ static inline IEnumMediaTypesImpl *impl_from_IEnumMediaTypes(IEnumMediaTypes *if static const struct IEnumMediaTypesVtbl IEnumMediaTypesImpl_Vtbl; -HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType enumFunc, IEnumMediaTypes **ppEnum) +HRESULT enum_media_types_create(BasePin *basePin, IEnumMediaTypes **ppEnum) { - ULONG i; IEnumMediaTypesImpl * pEnumMediaTypes = CoTaskMemAlloc(sizeof(IEnumMediaTypesImpl)); - AM_MEDIA_TYPE amt; *ppEnum = NULL; @@ -108,18 +105,11 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e pEnumMediaTypes->IEnumMediaTypes_iface.lpVtbl = &IEnumMediaTypesImpl_Vtbl; pEnumMediaTypes->refCount = 1; pEnumMediaTypes->uIndex = 0; - pEnumMediaTypes->enumMediaFunction = enumFunc; IPin_AddRef(&basePin->IPin_iface); pEnumMediaTypes->basePin = basePin; - i = 0; - while (enumFunc(basePin, i, &amt) == S_OK) - { - FreeMediaType(&amt); - i++; - } + IEnumMediaTypes_Reset(&pEnumMediaTypes->IEnumMediaTypes_iface); - pEnumMediaTypes->count = i; *ppEnum = &pEnumMediaTypes->IEnumMediaTypes_iface; return S_OK; } @@ -179,7 +169,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Next(IEnumMediaTypes *iface, for (i = 0; i < count && enummt->uIndex + i < enummt->count; i++) { if (!(mts[i] = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE))) - || FAILED(enummt->enumMediaFunction(enummt->basePin, enummt->uIndex + i, mts[i]))) + || FAILED(enummt->basePin->pFuncsTable->pfnGetMediaType(enummt->basePin, enummt->uIndex + i, mts[i]))) { while (i--) DeleteMediaType(mts[i]); @@ -216,7 +206,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Reset(IEnumMediaTypes * iface) TRACE("(%p)->()\n", iface); i = 0; - while (This->enumMediaFunction(This->basePin, i, &amt) == S_OK) + while (This->basePin->pFuncsTable->pfnGetMediaType(This->basePin, i, &amt) == S_OK) { FreeMediaType(&amt); i++; @@ -234,7 +224,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Clone(IEnumMediaTypes * iface, IEnumMe TRACE("(%p)->(%p)\n", iface, ppEnum); - hr = EnumMediaTypes_Construct(This->basePin, This->enumMediaFunction, ppEnum); + hr = enum_media_types_create(This->basePin, ppEnum); if (FAILED(hr)) return hr; return IEnumMediaTypes_Skip(*ppEnum, This->uIndex); diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 7991fdc547..e8fcbf90f1 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -301,7 +301,7 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_me TRACE("iface %p, enum_media_types %p.\n", iface, enum_media_types); - return EnumMediaTypes_Construct(pin, pin->pFuncsTable->pfnGetMediaType, enum_media_types); + return enum_media_types_create(pin, enum_media_types); } HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin) diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index b5e6d4bd18..98a5a25d71 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -63,8 +63,7 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s void QualityControlRender_EndRender(QualityControlImpl *This); HRESULT enum_pins_create(struct strmbase_filter *filter, IEnumPins **enum_pins); -HRESULT WINAPI EnumMediaTypes_Construct(BasePin *pin, BasePin_GetMediaType enumFunc, - IEnumMediaTypes **enum_media_types) DECLSPEC_HIDDEN; +HRESULT enum_media_types_create(BasePin *pin, IEnumMediaTypes **enum_media_types) DECLSPEC_HIDDEN; HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start); HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface);
1
0
0
0
Zebediah Figura : strmbase: Get rid of the version fields from IEnumMediaTypesImpl.
by Alexandre Julliard
24 Sep '19
24 Sep '19
Module: wine Branch: master Commit: bf01248ccb93f0e6af931390fce1a0538e8c4684 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf01248ccb93f0e6af931390…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Sep 23 19:33:22 2019 -0500 strmbase: Get rid of the version fields from IEnumMediaTypesImpl. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/mediatype.c | 15 ++------------- dlls/strmbase/pin.c | 8 +------- dlls/strmbase/strmbase_private.h | 2 +- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/dlls/strmbase/mediatype.c b/dlls/strmbase/mediatype.c index 393264c094..bb59a81584 100644 --- a/dlls/strmbase/mediatype.c +++ b/dlls/strmbase/mediatype.c @@ -83,8 +83,6 @@ typedef struct IEnumMediaTypesImpl LONG refCount; BasePin *basePin; BasePin_GetMediaType enumMediaFunction; - BasePin_GetMediaTypeVersion mediaVersionFunction; - LONG currentVersion; ULONG count; ULONG uIndex; } IEnumMediaTypesImpl; @@ -96,7 +94,7 @@ static inline IEnumMediaTypesImpl *impl_from_IEnumMediaTypes(IEnumMediaTypes *if static const struct IEnumMediaTypesVtbl IEnumMediaTypesImpl_Vtbl; -HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes ** ppEnum) +HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType enumFunc, IEnumMediaTypes **ppEnum) { ULONG i; IEnumMediaTypesImpl * pEnumMediaTypes = CoTaskMemAlloc(sizeof(IEnumMediaTypesImpl)); @@ -111,7 +109,6 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e pEnumMediaTypes->refCount = 1; pEnumMediaTypes->uIndex = 0; pEnumMediaTypes->enumMediaFunction = enumFunc; - pEnumMediaTypes->mediaVersionFunction = versionFunc; IPin_AddRef(&basePin->IPin_iface); pEnumMediaTypes->basePin = basePin; @@ -124,7 +121,6 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e pEnumMediaTypes->count = i; *ppEnum = &pEnumMediaTypes->IEnumMediaTypes_iface; - pEnumMediaTypes->currentVersion = versionFunc(basePin); return S_OK; } @@ -180,9 +176,6 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Next(IEnumMediaTypes *iface, TRACE("iface %p, count %u, mts %p, ret_count %p.\n", iface, count, mts, ret_count); - if (enummt->currentVersion != enummt->mediaVersionFunction(enummt->basePin)) - return VFW_E_ENUM_OUT_OF_SYNC; - for (i = 0; i < count && enummt->uIndex + i < enummt->count; i++) { if (!(mts[i] = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE))) @@ -209,9 +202,6 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Skip(IEnumMediaTypes *iface, ULONG cou TRACE("iface %p, count %u.\n", iface, count); - if (enummt->currentVersion != enummt->mediaVersionFunction(enummt->basePin)) - return VFW_E_ENUM_OUT_OF_SYNC; - enummt->uIndex += count; return enummt->uIndex > enummt->count ? S_FALSE : S_OK; @@ -232,7 +222,6 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Reset(IEnumMediaTypes * iface) i++; } This->count = i; - This->currentVersion = This->mediaVersionFunction(This->basePin); This->uIndex = 0; return S_OK; @@ -245,7 +234,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Clone(IEnumMediaTypes * iface, IEnumMe TRACE("(%p)->(%p)\n", iface, ppEnum); - hr = EnumMediaTypes_Construct(This->basePin, This->enumMediaFunction, This->mediaVersionFunction, ppEnum); + hr = EnumMediaTypes_Construct(This->basePin, This->enumMediaFunction, ppEnum); if (FAILED(hr)) return hr; return IEnumMediaTypes_Skip(*ppEnum, This->uIndex); diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 2fb9cf012f..7991fdc547 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -160,11 +160,6 @@ HRESULT WINAPI BasePinImpl_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_ return VFW_S_NO_MORE_ITEMS; } -LONG WINAPI BasePinImpl_GetMediaTypeVersion(BasePin *iface) -{ - return 1; -} - ULONG WINAPI BasePinImpl_AddRef(IPin *iface) { BasePin *pin = impl_from_IPin(iface); @@ -306,8 +301,7 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_me TRACE("iface %p, enum_media_types %p.\n", iface, enum_media_types); - return EnumMediaTypes_Construct(pin, pin->pFuncsTable->pfnGetMediaType, - BasePinImpl_GetMediaTypeVersion, enum_media_types); + return EnumMediaTypes_Construct(pin, pin->pFuncsTable->pfnGetMediaType, enum_media_types); } HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin) diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index 4b94735eb6..b5e6d4bd18 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -64,7 +64,7 @@ void QualityControlRender_EndRender(QualityControlImpl *This); HRESULT enum_pins_create(struct strmbase_filter *filter, IEnumPins **enum_pins); HRESULT WINAPI EnumMediaTypes_Construct(BasePin *pin, BasePin_GetMediaType enumFunc, - BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes **enum_media_types) DECLSPEC_HIDDEN; + IEnumMediaTypes **enum_media_types) DECLSPEC_HIDDEN; HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start); HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface);
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
63
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
Results per page:
10
25
50
100
200