Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- loader/wine.inf.in | 1 + 1 file changed, 1 insertion(+)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in index b838756ecdf..4ccf58a3bdb 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -2639,6 +2639,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,mshtml.dll,1 11,,msisip.dll,1 11,,qcap.dll,1 +11,,qedit.dll,1 11,,urlmon.dll,1 11,,windowscodecs.dll,1 11,,winegstreamer.dll,1
From: Zebediah Figura z.figura12@gmail.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/main.c | 16 ++++++++-------- dlls/qedit/mediadet.c | 3 ++- dlls/qedit/nullrenderer.c | 2 +- dlls/qedit/qedit_private.h | 8 ++++---- dlls/qedit/samplegrabber.c | 2 +- dlls/qedit/timeline.c | 2 +- 6 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/dlls/qedit/main.c b/dlls/qedit/main.c index 3797d96dcf3..f4d1bbb0613 100644 --- a/dlls/qedit/main.c +++ b/dlls/qedit/main.c @@ -42,7 +42,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) typedef struct { IClassFactory IClassFactory_iface; LONG ref; - HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); + HRESULT (*create_instance)(IUnknown *outer, IUnknown **out); } IClassFactoryImpl;
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) @@ -53,15 +53,15 @@ static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) struct object_creation_info { const CLSID *clsid; - HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); + HRESULT (*create_instance)(IUnknown *outer, IUnknown **out); };
static const struct object_creation_info object_creation[] = { - { &CLSID_AMTimeline, AMTimeline_create }, - { &CLSID_MediaDet, MediaDet_create }, - { &CLSID_NullRenderer, NullRenderer_create }, - { &CLSID_SampleGrabber, SampleGrabber_create }, + {&CLSID_AMTimeline, timeline_create}, + {&CLSID_MediaDet, media_detector_create}, + {&CLSID_NullRenderer, null_renderer_create}, + {&CLSID_SampleGrabber, sample_grabber_create}, };
static HRESULT WINAPI DSCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj) @@ -109,7 +109,7 @@ static HRESULT WINAPI DSCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter if (pOuter && !IsEqualGUID(&IID_IUnknown, riid)) return E_NOINTERFACE;
- hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk); + hres = This->create_instance(pOuter, &punk); if (SUCCEEDED(hres)) { hres = IUnknown_QueryInterface(punk, riid, ppobj); IUnknown_Release(punk); @@ -186,7 +186,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) factory->IClassFactory_iface.lpVtbl = &DSCF_Vtbl; factory->ref = 1;
- factory->pfnCreateInstance = object_creation[i].pfnCreateInstance; + factory->create_instance = object_creation[i].create_instance;
*ppv = &factory->IClassFactory_iface; return S_OK; diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index d5c01aff6b2..ecfafc44cbb 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -637,7 +637,8 @@ static const IMediaDetVtbl IMediaDet_VTable = MediaDet_EnterBitmapGrabMode, };
-HRESULT MediaDet_create(IUnknown * pUnkOuter, LPVOID * ppv) { +HRESULT media_detector_create(IUnknown *pUnkOuter, IUnknown **ppv) +{ MediaDetImpl* obj = NULL;
TRACE("(%p,%p)\n", pUnkOuter, ppv); diff --git a/dlls/qedit/nullrenderer.c b/dlls/qedit/nullrenderer.c index 575ecea89b0..cbebadfd180 100644 --- a/dlls/qedit/nullrenderer.c +++ b/dlls/qedit/nullrenderer.c @@ -62,7 +62,7 @@ static const struct strmbase_renderer_ops renderer_ops = .renderer_destroy = null_renderer_destroy, };
-HRESULT NullRenderer_create(IUnknown *outer, void **out) +HRESULT null_renderer_create(IUnknown *outer, IUnknown **out) { HRESULT hr; NullRendererImpl *pNullRenderer; diff --git a/dlls/qedit/qedit_private.h b/dlls/qedit/qedit_private.h index 96f21bcb3ba..7011c9f70dd 100644 --- a/dlls/qedit/qedit_private.h +++ b/dlls/qedit/qedit_private.h @@ -33,9 +33,9 @@ #include "dshow.h" #include "qedit.h"
-HRESULT AMTimeline_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; -HRESULT MediaDet_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; -HRESULT NullRenderer_create(IUnknown *outer, void **out) DECLSPEC_HIDDEN; -HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; +HRESULT timeline_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT media_detector_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT null_renderer_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
#endif /* __QEDIT_PRIVATE_INCLUDED__ */ diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 9492620d045..7e29154762b 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -634,7 +634,7 @@ static const struct strmbase_source_ops source_ops = .pfnDecideAllocator = sample_grabber_source_DecideAllocator, };
-HRESULT SampleGrabber_create(IUnknown *outer, void **out) +HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out) { SG_Impl* obj = NULL; ISeekingPassThru *passthru; diff --git a/dlls/qedit/timeline.c b/dlls/qedit/timeline.c index 5d3fb461ff0..a00ccdbefb5 100644 --- a/dlls/qedit/timeline.c +++ b/dlls/qedit/timeline.c @@ -421,7 +421,7 @@ static const IAMTimelineVtbl IAMTimeline_VTable = Timeline_IAMTimeline_GetDefaultEffectB, };
-HRESULT AMTimeline_create(IUnknown *pUnkOuter, LPVOID *ppv) +HRESULT timeline_create(IUnknown *pUnkOuter, IUnknown **ppv) { TimelineImpl* obj = NULL;
From: Zebediah Figura z.figura12@gmail.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/acmwrapper.c | 2 +- dlls/quartz/avidec.c | 2 +- dlls/quartz/dsoundrender.c | 5 ++--- dlls/quartz/filesource.c | 2 +- dlls/quartz/filtergraph.c | 10 +++------ dlls/quartz/filtermapper.c | 26 +++------------------- dlls/quartz/main.c | 42 ++++++++++++++++++------------------ dlls/quartz/memallocator.c | 6 ++---- dlls/quartz/quartz_private.h | 27 +++++++++++------------ dlls/quartz/systemclock.c | 2 +- dlls/quartz/videorenderer.c | 6 +++--- dlls/quartz/vmr9.c | 10 ++++----- 12 files changed, 56 insertions(+), 84 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index df55f094d57..b354ae4009a 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -519,7 +519,7 @@ static const struct strmbase_filter_ops filter_ops = .filter_cleanup_stream = acm_wrapper_cleanup_stream, };
-HRESULT ACMWrapper_create(IUnknown *outer, void **out) +HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out) { ISeekingPassThru *passthrough; ACMWrapperImpl *object; diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 4abc715be12..7b6838e466d 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -531,7 +531,7 @@ static const struct strmbase_filter_ops filter_ops = .filter_cleanup_stream = avi_decompressor_cleanup_stream, };
-HRESULT AVIDec_create(IUnknown *outer, void **out) +HRESULT avi_dec_create(IUnknown *outer, IUnknown **out) { AVIDecImpl *object; ISeekingPassThru *passthrough; diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 2aa9d7ca249..8dc93abd628 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -805,7 +805,7 @@ static const IAMDirectSoundVtbl IAMDirectSound_Vtbl = AMDirectSound_GetFocusWindow };
-HRESULT dsound_render_create(IUnknown *outer, void **out) +HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) { static const DSBUFFERDESC buffer_desc = { .dwSize = sizeof(DSBUFFERDESC), @@ -827,8 +827,7 @@ HRESULT dsound_render_create(IUnknown *outer, void **out) return hr; }
- if (FAILED(hr = QUARTZ_CreateSystemClock(&object->renderer.filter.IUnknown_inner, - (void **)&object->system_clock))) + if (FAILED(hr = system_clock_create(&object->renderer.filter.IUnknown_inner, &object->system_clock))) { strmbase_renderer_cleanup(&object->renderer); CoTaskMemFree(object); diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 53d9528d26a..09ab5e51fea 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -412,7 +412,7 @@ static DWORD CALLBACK io_thread(void *arg) return 0; }
-HRESULT AsyncReader_create(IUnknown *outer, void **out) +HRESULT async_reader_create(IUnknown *outer, IUnknown **out) { AsyncReader *object;
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 5acd0729527..dfda734d8a9 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -5675,7 +5675,7 @@ static const IUnknownVtbl IInner_VTable = FilterGraphInner_Release };
-static HRESULT filter_graph_common_create(IUnknown *outer, void **out, BOOL threaded) +static HRESULT filter_graph_common_create(IUnknown *outer, IUnknown **out, BOOL threaded) { IFilterGraphImpl *fimpl; HRESULT hr; @@ -5755,16 +5755,12 @@ static HRESULT filter_graph_common_create(IUnknown *outer, void **out, BOOL thre return S_OK; }
-HRESULT filter_graph_create(IUnknown *outer, void **out) +HRESULT filter_graph_create(IUnknown *outer, IUnknown **out) { - TRACE("outer %p, out %p.\n", outer, out); - return filter_graph_common_create(outer, out, TRUE); }
-HRESULT filter_graph_no_thread_create(IUnknown *outer, void **out) +HRESULT filter_graph_no_thread_create(IUnknown *outer, IUnknown **out) { - TRACE("outer %p, out %p.\n", outer, out); - return filter_graph_common_create(outer, out, FALSE); } diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index 67576268070..0d1403b5168 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -1386,12 +1386,10 @@ static const IAMFilterDataVtbl AMFilterDataVtbl = { AMFilterData_CreateFilterData };
-HRESULT FilterMapper2_create(IUnknown *pUnkOuter, LPVOID *ppObj) +HRESULT filter_mapper_create(IUnknown *pUnkOuter, IUnknown **out) { FilterMapper3Impl * pFM2impl;
- TRACE("(%p, %p)\n", pUnkOuter, ppObj); - pFM2impl = CoTaskMemAlloc(sizeof(*pFM2impl)); if (!pFM2impl) return E_OUTOFMEMORY; @@ -1407,25 +1405,7 @@ HRESULT FilterMapper2_create(IUnknown *pUnkOuter, LPVOID *ppObj) else pFM2impl->outer_unk = &pFM2impl->IUnknown_inner;
- *ppObj = &pFM2impl->IUnknown_inner; - - TRACE("-- created at %p\n", pFM2impl); - + TRACE("Created filter mapper %p.\n", pFM2impl); + *out = &pFM2impl->IUnknown_inner; return S_OK; } - -HRESULT FilterMapper_create(IUnknown *pUnkOuter, LPVOID *ppObj) -{ - FilterMapper3Impl *pFM2impl; - HRESULT hr; - - TRACE("(%p, %p)\n", pUnkOuter, ppObj); - - hr = FilterMapper2_create(pUnkOuter, (LPVOID*)&pFM2impl); - if (FAILED(hr)) - return hr; - - *ppObj = &pFM2impl->IFilterMapper_iface; - - return hr; -} diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 678bc0f9633..9c61dd50d76 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -35,9 +35,9 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) return QUARTZ_DllMain( hInstDLL, fdwReason, lpv ); }
-static HRESULT SeekingPassThru_create(IUnknown *pUnkOuter, LPVOID *ppObj) +static HRESULT seeking_passthrough_create(IUnknown *outer, IUnknown **out) { - return PosPassThru_Construct(pUnkOuter,ppObj); /* from strmbase */ + return PosPassThru_Construct(outer, (void **)out); }
/****************************************************************************** @@ -46,7 +46,7 @@ static HRESULT SeekingPassThru_create(IUnknown *pUnkOuter, LPVOID *ppObj) typedef struct { IClassFactory IClassFactory_iface; LONG ref; - HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); + HRESULT (*create_instance)(IUnknown *outer, IUnknown **out); } IClassFactoryImpl;
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) @@ -57,27 +57,27 @@ static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) struct object_creation_info { const CLSID *clsid; - HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); + HRESULT (*create_instance)(IUnknown *outer, IUnknown **out); };
static const struct object_creation_info object_creation[] = { - { &CLSID_SeekingPassThru, SeekingPassThru_create }, + { &CLSID_ACMWrapper, acm_wrapper_create }, + { &CLSID_AsyncReader, async_reader_create }, + { &CLSID_AudioRender, dsound_render_create }, + { &CLSID_AVIDec, avi_dec_create }, + { &CLSID_DSoundRender, dsound_render_create }, { &CLSID_FilterGraph, filter_graph_create }, { &CLSID_FilterGraphNoThread, filter_graph_no_thread_create }, - { &CLSID_FilterMapper, FilterMapper_create }, - { &CLSID_FilterMapper2, FilterMapper2_create }, - { &CLSID_AsyncReader, AsyncReader_create }, - { &CLSID_MemoryAllocator, StdMemAllocator_create }, - { &CLSID_VideoRenderer, VideoRenderer_create }, - { &CLSID_VideoMixingRenderer, VMR7Impl_create }, - { &CLSID_VideoMixingRenderer9, VMR9Impl_create }, - { &CLSID_VideoRendererDefault, VideoRendererDefault_create }, - { &CLSID_DSoundRender, dsound_render_create }, - { &CLSID_AudioRender, dsound_render_create }, - { &CLSID_AVIDec, AVIDec_create }, - { &CLSID_SystemClock, QUARTZ_CreateSystemClock }, - { &CLSID_ACMWrapper, ACMWrapper_create }, + { &CLSID_FilterMapper, filter_mapper_create }, + { &CLSID_FilterMapper2, filter_mapper_create }, + { &CLSID_MemoryAllocator, mem_allocator_create }, + { &CLSID_SeekingPassThru, seeking_passthrough_create }, + { &CLSID_SystemClock, system_clock_create }, + { &CLSID_VideoRenderer, video_renderer_create }, + { &CLSID_VideoMixingRenderer, vmr7_create }, + { &CLSID_VideoMixingRenderer9, vmr9_create }, + { &CLSID_VideoRendererDefault, video_renderer_default_create }, };
static HRESULT WINAPI DSCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj) @@ -126,8 +126,8 @@ static HRESULT WINAPI DSCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter if(pOuter && !IsEqualGUID(&IID_IUnknown, riid)) return E_NOINTERFACE;
- hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk); - if (SUCCEEDED(hres)) { + if (SUCCEEDED(hres = This->create_instance(pOuter, &punk))) + { hres = IUnknown_QueryInterface(punk, riid, ppobj); IUnknown_Release(punk); } @@ -189,7 +189,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) factory->IClassFactory_iface.lpVtbl = &DSCF_Vtbl; factory->ref = 1;
- factory->pfnCreateInstance = object_creation[i].pfnCreateInstance; + factory->create_instance = object_creation[i].create_instance;
*ppv = &factory->IClassFactory_iface; return S_OK; diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index fab0f2d1c44..531fbe874cf 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -913,13 +913,11 @@ static void StdMemAllocator_Destroy(IMemAllocator *iface) CoTaskMemFree(This); }
-HRESULT StdMemAllocator_create(LPUNKNOWN lpUnkOuter, LPVOID * ppv) +HRESULT mem_allocator_create(IUnknown *lpUnkOuter, IUnknown **out) { StdMemAllocator * pMemAlloc; HRESULT hr;
- *ppv = NULL; - if (lpUnkOuter) return CLASS_E_NOAGGREGATION;
@@ -932,7 +930,7 @@ HRESULT StdMemAllocator_create(LPUNKNOWN lpUnkOuter, LPVOID * ppv) pMemAlloc->pMemory = NULL;
if (SUCCEEDED(hr = BaseMemAllocator_Init(StdMemAllocator_Alloc, StdMemAllocator_Free, NULL, NULL, NULL, StdMemAllocator_Destroy, &pMemAlloc->csState, &pMemAlloc->base))) - *ppv = pMemAlloc; + *out = (IUnknown *)&pMemAlloc->base.IMemAllocator_iface; else CoTaskMemFree(pMemAlloc);
diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 3431a5836ff..98ca63d858e 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -60,20 +60,19 @@ static inline const char *debugstr_time(REFERENCE_TIME time) #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) #define BYTES_FROM_MEDIATIME(time) ((time) / 10000000)
-HRESULT dsound_render_create(IUnknown *outer, void **out) DECLSPEC_HIDDEN; -HRESULT filter_graph_create(IUnknown *outer, void **out) DECLSPEC_HIDDEN; -HRESULT filter_graph_no_thread_create(IUnknown *outer, void **out) DECLSPEC_HIDDEN; -HRESULT FilterMapper2_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; -HRESULT FilterMapper_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; -HRESULT AsyncReader_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN; -HRESULT StdMemAllocator_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN; -HRESULT AVIDec_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN; -HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN; -HRESULT VideoRendererDefault_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN; -HRESULT QUARTZ_CreateSystemClock(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN; -HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN; -HRESULT VMR7Impl_create(IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN; -HRESULT VMR9Impl_create(IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN; +HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT avi_dec_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT async_reader_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT filter_graph_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT filter_graph_no_thread_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT filter_mapper_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT mem_allocator_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT system_clock_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT video_renderer_default_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT vmr7_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; +HRESULT vmr9_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT EnumMonikerImpl_Create(IMoniker ** ppMoniker, ULONG nMonikerCount, IEnumMoniker ** ppEnum) DECLSPEC_HIDDEN;
diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 51e96c82e68..8ccd6df47ce 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -327,7 +327,7 @@ static const IReferenceClockVtbl SystemClock_vtbl = SystemClockImpl_Unadvise };
-HRESULT QUARTZ_CreateSystemClock(IUnknown *outer, void **out) +HRESULT system_clock_create(IUnknown *outer, IUnknown **out) { struct system_clock *object;
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 4383f66e443..3bd93dbb864 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -697,7 +697,7 @@ static const IOverlayVtbl overlay_vtbl = overlay_Unadvise, };
-HRESULT VideoRenderer_create(IUnknown *outer, void **out) +HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) { HRESULT hr; VideoRendererImpl * pVideoRenderer; @@ -745,8 +745,8 @@ fail: return hr; }
-HRESULT VideoRendererDefault_create(IUnknown * pUnkOuter, LPVOID * ppv) +HRESULT video_renderer_default_create(IUnknown *outer, IUnknown **out) { /* TODO: Attempt to use the VMR-7 renderer instead when possible */ - return VideoRenderer_create(pUnkOuter, ppv); + return video_renderer_create(outer, out); } diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index bc2a905650c..8503a7b2806 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2208,7 +2208,7 @@ static const IOverlayVtbl overlay_vtbl = overlay_Unadvise, };
-static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid) +static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) { HRESULT hr; struct quartz_vmr* pVMR; @@ -2278,14 +2278,14 @@ fail: return hr; }
-HRESULT VMR7Impl_create(IUnknown *outer_unk, LPVOID *ppv) +HRESULT vmr7_create(IUnknown *outer, IUnknown **out) { - return vmr_create(outer_unk, ppv, &CLSID_VideoMixingRenderer); + return vmr_create(outer, out, &CLSID_VideoMixingRenderer); }
-HRESULT VMR9Impl_create(IUnknown *outer_unk, LPVOID *ppv) +HRESULT vmr9_create(IUnknown *outer, IUnknown **out) { - return vmr_create(outer_unk, ppv, &CLSID_VideoMixingRenderer9); + return vmr_create(outer, out, &CLSID_VideoMixingRenderer9); }
The only filters that expose IVideoWindow live in quartz.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/Makefile.in | 3 +- dlls/quartz/quartz_private.h | 91 +++++++++++++++++++++++++++++ dlls/quartz/videorenderer.c | 2 +- dlls/quartz/vmr9.c | 2 +- dlls/{strmbase => quartz}/window.c | 16 ++--- dlls/strmbase/Makefile.in | 3 +- include/wine/strmbase.h | 94 ------------------------------ 7 files changed, 104 insertions(+), 107 deletions(-) rename dlls/{strmbase => quartz}/window.c (97%)
diff --git a/dlls/quartz/Makefile.in b/dlls/quartz/Makefile.in index b79bed1949c..4ba8edf5fe8 100644 --- a/dlls/quartz/Makefile.in +++ b/dlls/quartz/Makefile.in @@ -18,7 +18,8 @@ C_SRCS = \ regsvr.c \ systemclock.c \ videorenderer.c \ - vmr9.c + vmr9.c \ + window.c
RC_SRCS = quartz.rc
diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 98ca63d858e..cbf5da4c096 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -83,4 +83,95 @@ extern void video_unregister_windowclass(void) DECLSPEC_HIDDEN;
BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID *source_clsid) DECLSPEC_HIDDEN;
+typedef struct tagBaseWindow +{ + HWND hWnd; + LONG Width; + LONG Height; + + const struct BaseWindowFuncTable* pFuncsTable; +} BaseWindow; + +typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This); +typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width); + +typedef struct BaseWindowFuncTable +{ + /* Required */ + BaseWindow_GetDefaultRect pfnGetDefaultRect; + /* Optional, WinProc Related */ + BaseWindow_OnSize pfnOnSize; +} BaseWindowFuncTable; + +HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseWindow_Destroy(BaseWindow *pBaseWindow) DECLSPEC_HIDDEN; + +HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This) DECLSPEC_HIDDEN; + +typedef struct tagBaseControlWindow +{ + BaseWindow baseWindow; + IVideoWindow IVideoWindow_iface; + + BOOL AutoShow; + HWND hwndDrain; + HWND hwndOwner; + struct strmbase_filter *pFilter; + struct strmbase_pin *pPin; +} BaseControlWindow; + +HRESULT video_window_init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl, + struct strmbase_filter *filter, struct strmbase_pin *pin, const BaseWindowFuncTable *func_table) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow) DECLSPEC_HIDDEN; + +BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN; + +HRESULT WINAPI BaseControlWindowImpl_QueryInterface(IVideoWindow *iface, REFIID iid, void **out) DECLSPEC_HIDDEN; +ULONG WINAPI BaseControlWindowImpl_AddRef(IVideoWindow *iface) DECLSPEC_HIDDEN; +ULONG WINAPI BaseControlWindowImpl_Release(IVideoWindow *iface) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow *iface, UINT *pctinfo) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo(IVideoWindow *iface, UINT iTInfo, LCID lcid, ITypeInfo**ppTInfo) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID riid, LPOLESTR*rgszNames, UINT cNames, LCID lcid, DISPID*rgDispId) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS*pDispParams, VARIANT*pVarResult, EXCEPINFO*pExepInfo, UINT*puArgErr) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_Caption(IVideoWindow *iface, BSTR strCaption) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_Caption(IVideoWindow *iface, BSTR *strCaption) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG WindowStyle) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle(IVideoWindow *iface, LONG *WindowStyle) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_WindowStyleEx(IVideoWindow *iface, LONG WindowStyleEx) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_WindowStyleEx(IVideoWindow *iface, LONG *WindowStyleEx) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_AutoShow(IVideoWindow *iface, LONG AutoShow) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_AutoShow(IVideoWindow *iface, LONG *AutoShow) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_WindowState(IVideoWindow *iface, LONG WindowState) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *WindowState) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_BackgroundPalette(IVideoWindow *iface, LONG BackgroundPalette) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_BackgroundPalette(IVideoWindow *iface, LONG *pBackgroundPalette) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_Visible(IVideoWindow *iface, LONG Visible) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_Visible(IVideoWindow *iface, LONG *pVisible) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_Left(IVideoWindow *iface, LONG Left) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_Left(IVideoWindow *iface, LONG *pLeft) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_Width(IVideoWindow *iface, LONG Width) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_Width(IVideoWindow *iface, LONG *pWidth) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_Top(IVideoWindow *iface, LONG Top) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_Top(IVideoWindow *iface, LONG *pTop) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_Height(IVideoWindow *iface, LONG Height) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_Height(IVideoWindow *iface, LONG *pHeight) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_Owner(IVideoWindow *iface, OAHWND Owner) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_Owner(IVideoWindow *iface, OAHWND *Owner) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_MessageDrain(IVideoWindow *iface, OAHWND Drain) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_MessageDrain(IVideoWindow *iface, OAHWND *Drain) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_BorderColor(IVideoWindow *iface, LONG *Color) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_BorderColor(IVideoWindow *iface, LONG Color) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_get_FullScreenMode(IVideoWindow *iface, LONG *FullScreenMode) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_put_FullScreenMode(IVideoWindow *iface, LONG FullScreenMode) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LONG Focus) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition(IVideoWindow *iface, LONG Left, LONG Top, LONG Width, LONG Height) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_GetWindowPosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_NotifyOwnerMessage(IVideoWindow *iface, OAHWND hwnd, LONG uMsg, LONG_PTR wParam, LONG_PTR lParam) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_GetMinIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_GetMaxIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_HideCursor(IVideoWindow *iface, LONG HideCursor) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *CursorHidden) DECLSPEC_HIDDEN; + #endif /* __QUARTZ_PRIVATE_INCLUDED__ */ diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 3bd93dbb864..52d4b1aa623 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -720,7 +720,7 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) if (FAILED(hr)) goto fail;
- hr = strmbase_window_init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, + hr = video_window_init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.sink.pin, &renderer_BaseWindowFuncTable); if (FAILED(hr)) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 8503a7b2806..c457f31e4e8 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2249,7 +2249,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) if (FAILED(hr)) goto fail;
- hr = strmbase_window_init(&pVMR->baseControlWindow, &IVideoWindow_VTable, + hr = video_window_init(&pVMR->baseControlWindow, &IVideoWindow_VTable, &pVMR->renderer.filter, &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable); if (FAILED(hr)) goto fail; diff --git a/dlls/strmbase/window.c b/dlls/quartz/window.c similarity index 97% rename from dlls/strmbase/window.c rename to dlls/quartz/window.c index 963c7f2b027..6e1a60086f5 100644 --- a/dlls/strmbase/window.c +++ b/dlls/quartz/window.c @@ -1,5 +1,5 @@ /* - * Generic Implementation of strmbase window classes + * Common implementation of IVideoWindow * * Copyright 2012 Aric Stewart, CodeWeavers * @@ -18,9 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "strmbase_private.h" +#include "quartz_private.h"
-WINE_DEFAULT_DEBUG_CHANNEL(strmbase); +WINE_DEFAULT_DEBUG_CHANNEL(quartz); + +static const WCHAR class_name[] = L"wine_quartz_window";
static inline BaseControlWindow *impl_from_IVideoWindow( IVideoWindow *iface) { @@ -104,21 +106,19 @@ HRESULT WINAPI BaseWindow_Destroy(BaseWindow *This)
HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This) { - static const WCHAR class_nameW[] = {'w','i','n','e','_','s','t','r','m','b','a','s','e','_','w','i','n','d','o','w',0}; - static const WCHAR windownameW[] = { 'A','c','t','i','v','e','M','o','v','i','e',' ','W','i','n','d','o','w',0 }; WNDCLASSW winclass = {0};
winclass.lpfnWndProc = WndProcW; winclass.cbWndExtra = sizeof(BaseWindow*); winclass.hbrBackground = GetStockObject(BLACK_BRUSH); - winclass.lpszClassName = class_nameW; + winclass.lpszClassName = class_name; if (!RegisterClassW(&winclass) && GetLastError() != ERROR_CLASS_ALREADY_EXISTS) { ERR("Unable to register window class: %u\n", GetLastError()); return E_FAIL; }
- This->hWnd = CreateWindowExW(0, class_nameW, windownameW, + This->hWnd = CreateWindowExW(0, class_name, L"ActiveMovie Window", WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL); @@ -151,7 +151,7 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This) return S_OK; }
-HRESULT WINAPI strmbase_window_init(BaseControlWindow *pControlWindow, +HRESULT video_window_init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner, struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable) { diff --git a/dlls/strmbase/Makefile.in b/dlls/strmbase/Makefile.in index 0832b3e6213..607ce235bb7 100644 --- a/dlls/strmbase/Makefile.in +++ b/dlls/strmbase/Makefile.in @@ -10,5 +10,4 @@ C_SRCS = \ qualitycontrol.c \ renderer.c \ seeking.c \ - video.c \ - window.c + video.c diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 2a7d642986c..f874a441862 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -242,32 +242,6 @@ VOID WINAPI OutputQueue_EOS(OutputQueue *pOutputQueue); VOID WINAPI OutputQueue_SendAnyway(OutputQueue *pOutputQueue); DWORD WINAPI OutputQueueImpl_ThreadProc(OutputQueue *pOutputQueue);
-typedef struct tagBaseWindow -{ - HWND hWnd; - LONG Width; - LONG Height; - - const struct BaseWindowFuncTable* pFuncsTable; -} BaseWindow; - -typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This); -typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width); - -typedef struct BaseWindowFuncTable -{ - /* Required */ - BaseWindow_GetDefaultRect pfnGetDefaultRect; - /* Optional, WinProc Related */ - BaseWindow_OnSize pfnOnSize; -} BaseWindowFuncTable; - -HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable); -HRESULT WINAPI BaseWindow_Destroy(BaseWindow *pBaseWindow); - -HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This); -HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This); - enum strmbase_type_id { IBasicAudio_tid, @@ -281,74 +255,6 @@ enum strmbase_type_id
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo);
-#ifdef __IVideoWindow_FWD_DEFINED__ -typedef struct tagBaseControlWindow -{ - BaseWindow baseWindow; - IVideoWindow IVideoWindow_iface; - - BOOL AutoShow; - HWND hwndDrain; - HWND hwndOwner; - struct strmbase_filter *pFilter; - struct strmbase_pin *pPin; -} BaseControlWindow; - -HRESULT WINAPI strmbase_window_init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl, - struct strmbase_filter *filter, struct strmbase_pin *pin, const BaseWindowFuncTable *func_table); -HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow); - -BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam); - -HRESULT WINAPI BaseControlWindowImpl_QueryInterface(IVideoWindow *iface, REFIID iid, void **out); -ULONG WINAPI BaseControlWindowImpl_AddRef(IVideoWindow *iface); -ULONG WINAPI BaseControlWindowImpl_Release(IVideoWindow *iface); -HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow *iface, UINT*pctinfo); -HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo(IVideoWindow *iface, UINT iTInfo, LCID lcid, ITypeInfo**ppTInfo); -HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID riid, LPOLESTR*rgszNames, UINT cNames, LCID lcid, DISPID*rgDispId); -HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS*pDispParams, VARIANT*pVarResult, EXCEPINFO*pExepInfo, UINT*puArgErr); -HRESULT WINAPI BaseControlWindowImpl_put_Caption(IVideoWindow *iface, BSTR strCaption); -HRESULT WINAPI BaseControlWindowImpl_get_Caption(IVideoWindow *iface, BSTR *strCaption); -HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG WindowStyle); -HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle(IVideoWindow *iface, LONG *WindowStyle); -HRESULT WINAPI BaseControlWindowImpl_put_WindowStyleEx(IVideoWindow *iface, LONG WindowStyleEx); -HRESULT WINAPI BaseControlWindowImpl_get_WindowStyleEx(IVideoWindow *iface, LONG *WindowStyleEx); -HRESULT WINAPI BaseControlWindowImpl_put_AutoShow(IVideoWindow *iface, LONG AutoShow); -HRESULT WINAPI BaseControlWindowImpl_get_AutoShow(IVideoWindow *iface, LONG *AutoShow); -HRESULT WINAPI BaseControlWindowImpl_put_WindowState(IVideoWindow *iface, LONG WindowState); -HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *WindowState); -HRESULT WINAPI BaseControlWindowImpl_put_BackgroundPalette(IVideoWindow *iface, LONG BackgroundPalette); -HRESULT WINAPI BaseControlWindowImpl_get_BackgroundPalette(IVideoWindow *iface, LONG *pBackgroundPalette); -HRESULT WINAPI BaseControlWindowImpl_put_Visible(IVideoWindow *iface, LONG Visible); -HRESULT WINAPI BaseControlWindowImpl_get_Visible(IVideoWindow *iface, LONG *pVisible); -HRESULT WINAPI BaseControlWindowImpl_put_Left(IVideoWindow *iface, LONG Left); -HRESULT WINAPI BaseControlWindowImpl_get_Left(IVideoWindow *iface, LONG *pLeft); -HRESULT WINAPI BaseControlWindowImpl_put_Width(IVideoWindow *iface, LONG Width); -HRESULT WINAPI BaseControlWindowImpl_get_Width(IVideoWindow *iface, LONG *pWidth); -HRESULT WINAPI BaseControlWindowImpl_put_Top(IVideoWindow *iface, LONG Top); -HRESULT WINAPI BaseControlWindowImpl_get_Top(IVideoWindow *iface, LONG *pTop); - -HRESULT WINAPI BaseControlWindowImpl_put_Height(IVideoWindow *iface, LONG Height); -HRESULT WINAPI BaseControlWindowImpl_get_Height(IVideoWindow *iface, LONG *pHeight); -HRESULT WINAPI BaseControlWindowImpl_put_Owner(IVideoWindow *iface, OAHWND Owner); -HRESULT WINAPI BaseControlWindowImpl_get_Owner(IVideoWindow *iface, OAHWND *Owner); -HRESULT WINAPI BaseControlWindowImpl_put_MessageDrain(IVideoWindow *iface, OAHWND Drain); -HRESULT WINAPI BaseControlWindowImpl_get_MessageDrain(IVideoWindow *iface, OAHWND *Drain); -HRESULT WINAPI BaseControlWindowImpl_get_BorderColor(IVideoWindow *iface, LONG *Color); -HRESULT WINAPI BaseControlWindowImpl_put_BorderColor(IVideoWindow *iface, LONG Color); -HRESULT WINAPI BaseControlWindowImpl_get_FullScreenMode(IVideoWindow *iface, LONG *FullScreenMode); -HRESULT WINAPI BaseControlWindowImpl_put_FullScreenMode(IVideoWindow *iface, LONG FullScreenMode); -HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LONG Focus); -HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition(IVideoWindow *iface, LONG Left, LONG Top, LONG Width, LONG Height); -HRESULT WINAPI BaseControlWindowImpl_GetWindowPosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight); -HRESULT WINAPI BaseControlWindowImpl_NotifyOwnerMessage(IVideoWindow *iface, OAHWND hwnd, LONG uMsg, LONG_PTR wParam, LONG_PTR lParam); -HRESULT WINAPI BaseControlWindowImpl_GetMinIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight); -HRESULT WINAPI BaseControlWindowImpl_GetMaxIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight); -HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight); -HRESULT WINAPI BaseControlWindowImpl_HideCursor(IVideoWindow *iface, LONG HideCursor); -HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *CursorHidden); -#endif - #ifdef __IBasicVideo_FWD_DEFINED__ #ifdef __amvideo_h__ typedef struct tagBaseControlVideo
The only filters that expose IBasicVideo live in quartz.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/Makefile.in | 1 + dlls/quartz/quartz_private.h | 39 ++++++++++++++++++++++++++++ dlls/{strmbase => quartz}/video.c | 8 +++--- dlls/quartz/videorenderer.c | 2 +- dlls/quartz/vmr9.c | 2 +- dlls/strmbase/Makefile.in | 3 +-- include/wine/strmbase.h | 43 ------------------------------- 7 files changed, 47 insertions(+), 51 deletions(-) rename dlls/{strmbase => quartz}/video.c (98%)
diff --git a/dlls/quartz/Makefile.in b/dlls/quartz/Makefile.in index 4ba8edf5fe8..858b9578792 100644 --- a/dlls/quartz/Makefile.in +++ b/dlls/quartz/Makefile.in @@ -17,6 +17,7 @@ C_SRCS = \ memallocator.c \ regsvr.c \ systemclock.c \ + video.c \ videorenderer.c \ vmr9.c \ window.c diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index cbf5da4c096..20dcd5f16a5 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -174,4 +174,43 @@ HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition(IVideoWindow *iface, LON HRESULT WINAPI BaseControlWindowImpl_HideCursor(IVideoWindow *iface, LONG HideCursor) DECLSPEC_HIDDEN; HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *CursorHidden) DECLSPEC_HIDDEN;
+typedef struct tagBaseControlVideo +{ + IBasicVideo IBasicVideo_iface; + + struct strmbase_filter *pFilter; + struct strmbase_pin *pPin; + + const struct BaseControlVideoFuncTable *pFuncsTable; +} BaseControlVideo; + +typedef HRESULT (WINAPI *BaseControlVideo_GetSourceRect)(BaseControlVideo* This, RECT *pSourceRect) DECLSPEC_HIDDEN; +typedef HRESULT (WINAPI *BaseControlVideo_GetStaticImage)(BaseControlVideo* This, LONG *pBufferSize, LONG *pDIBImage) DECLSPEC_HIDDEN; +typedef HRESULT (WINAPI *BaseControlVideo_GetTargetRect)(BaseControlVideo* This, RECT *pTargetRect) DECLSPEC_HIDDEN; +typedef VIDEOINFOHEADER* (WINAPI *BaseControlVideo_GetVideoFormat)(BaseControlVideo* This) DECLSPEC_HIDDEN; +typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultSourceRect)(BaseControlVideo* This) DECLSPEC_HIDDEN; +typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultTargetRect)(BaseControlVideo* This) DECLSPEC_HIDDEN; +typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultSourceRect)(BaseControlVideo* This) DECLSPEC_HIDDEN; +typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultTargetRect)(BaseControlVideo* This) DECLSPEC_HIDDEN; +typedef HRESULT (WINAPI *BaseControlVideo_SetSourceRect)(BaseControlVideo* This, RECT *pSourceRect) DECLSPEC_HIDDEN; +typedef HRESULT (WINAPI *BaseControlVideo_SetTargetRect)(BaseControlVideo* This, RECT *pTargetRect) DECLSPEC_HIDDEN; + +typedef struct BaseControlVideoFuncTable +{ + BaseControlVideo_GetSourceRect pfnGetSourceRect; + BaseControlVideo_GetStaticImage pfnGetStaticImage; + BaseControlVideo_GetTargetRect pfnGetTargetRect; + BaseControlVideo_GetVideoFormat pfnGetVideoFormat; + BaseControlVideo_IsDefaultSourceRect pfnIsDefaultSourceRect; + BaseControlVideo_IsDefaultTargetRect pfnIsDefaultTargetRect; + BaseControlVideo_SetDefaultSourceRect pfnSetDefaultSourceRect; + BaseControlVideo_SetDefaultTargetRect pfnSetDefaultTargetRect; + BaseControlVideo_SetSourceRect pfnSetSourceRect; + BaseControlVideo_SetTargetRect pfnSetTargetRect; +} BaseControlVideoFuncTable; + +HRESULT basic_video_init(BaseControlVideo *video, struct strmbase_filter *filter, + struct strmbase_pin *pin, const BaseControlVideoFuncTable *func_table) DECLSPEC_HIDDEN; +HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo) DECLSPEC_HIDDEN; + #endif /* __QUARTZ_PRIVATE_INCLUDED__ */ diff --git a/dlls/strmbase/video.c b/dlls/quartz/video.c similarity index 98% rename from dlls/strmbase/video.c rename to dlls/quartz/video.c index 081794e9b31..f59c2dee0cc 100644 --- a/dlls/strmbase/video.c +++ b/dlls/quartz/video.c @@ -1,5 +1,5 @@ /* - * Generic Implementation of strmbase video classes + * Common implementation of IBasicVideo * * Copyright 2012 Aric Stewart, CodeWeavers * @@ -18,9 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "strmbase_private.h" +#include "quartz_private.h"
-WINE_DEFAULT_DEBUG_CHANNEL(strmbase); +WINE_DEFAULT_DEBUG_CHANNEL(quartz);
static inline BaseControlVideo *impl_from_IBasicVideo(IBasicVideo *iface) { @@ -647,7 +647,7 @@ static const IBasicVideoVtbl basic_video_vtbl = basic_video_IsUsingDefaultDestination };
-HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter, +HRESULT basic_video_init(BaseControlVideo *video, struct strmbase_filter *filter, struct strmbase_pin *pin, const BaseControlVideoFuncTable *func_table) { video->IBasicVideo_iface.lpVtbl = &basic_video_vtbl; diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 52d4b1aa623..1b5e68e7d5b 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -726,7 +726,7 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) if (FAILED(hr)) goto fail;
- hr = strmbase_video_init(&pVideoRenderer->baseControlVideo, &pVideoRenderer->renderer.filter, + hr = basic_video_init(&pVideoRenderer->baseControlVideo, &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.sink.pin, &renderer_BaseControlVideoFuncTable); if (FAILED(hr)) goto fail; diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index c457f31e4e8..b8cf0698ecd 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2257,7 +2257,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) if (FAILED(hr = BaseWindowImpl_PrepareWindow(&pVMR->baseControlWindow.baseWindow))) goto fail;
- hr = strmbase_video_init(&pVMR->baseControlVideo, &pVMR->renderer.filter, + hr = basic_video_init(&pVMR->baseControlVideo, &pVMR->renderer.filter, &pVMR->renderer.sink.pin, &renderer_BaseControlVideoFuncTable); if (FAILED(hr)) goto fail; diff --git a/dlls/strmbase/Makefile.in b/dlls/strmbase/Makefile.in index 607ce235bb7..ec13acccf40 100644 --- a/dlls/strmbase/Makefile.in +++ b/dlls/strmbase/Makefile.in @@ -9,5 +9,4 @@ C_SRCS = \ pospass.c \ qualitycontrol.c \ renderer.c \ - seeking.c \ - video.c + seeking.c diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index f874a441862..0bcac13ebbc 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -255,49 +255,6 @@ enum strmbase_type_id
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo);
-#ifdef __IBasicVideo_FWD_DEFINED__ -#ifdef __amvideo_h__ -typedef struct tagBaseControlVideo -{ - IBasicVideo IBasicVideo_iface; - - struct strmbase_filter *pFilter; - struct strmbase_pin *pPin; - - const struct BaseControlVideoFuncTable* pFuncsTable; -} BaseControlVideo; - -typedef HRESULT (WINAPI *BaseControlVideo_GetSourceRect)(BaseControlVideo* This, RECT *pSourceRect); -typedef HRESULT (WINAPI *BaseControlVideo_GetStaticImage)(BaseControlVideo* This, LONG *pBufferSize, LONG *pDIBImage); -typedef HRESULT (WINAPI *BaseControlVideo_GetTargetRect)(BaseControlVideo* This, RECT *pTargetRect); -typedef VIDEOINFOHEADER* (WINAPI *BaseControlVideo_GetVideoFormat)(BaseControlVideo* This); -typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultSourceRect)(BaseControlVideo* This); -typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultTargetRect)(BaseControlVideo* This); -typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultSourceRect)(BaseControlVideo* This); -typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultTargetRect)(BaseControlVideo* This); -typedef HRESULT (WINAPI *BaseControlVideo_SetSourceRect)(BaseControlVideo* This, RECT *pSourceRect); -typedef HRESULT (WINAPI *BaseControlVideo_SetTargetRect)(BaseControlVideo* This, RECT *pTargetRect); - -typedef struct BaseControlVideoFuncTable { - /* Required */ - BaseControlVideo_GetSourceRect pfnGetSourceRect; - BaseControlVideo_GetStaticImage pfnGetStaticImage; - BaseControlVideo_GetTargetRect pfnGetTargetRect; - BaseControlVideo_GetVideoFormat pfnGetVideoFormat; - BaseControlVideo_IsDefaultSourceRect pfnIsDefaultSourceRect; - BaseControlVideo_IsDefaultTargetRect pfnIsDefaultTargetRect; - BaseControlVideo_SetDefaultSourceRect pfnSetDefaultSourceRect; - BaseControlVideo_SetDefaultTargetRect pfnSetDefaultTargetRect; - BaseControlVideo_SetSourceRect pfnSetSourceRect; - BaseControlVideo_SetTargetRect pfnSetTargetRect; -} BaseControlVideoFuncTable; - -HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter, - struct strmbase_pin *pin, const BaseControlVideoFuncTable *func_table); -HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo); -#endif -#endif - struct strmbase_renderer { struct strmbase_filter filter;
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48734 Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/main.c | 7 ++++--- dlls/quartz/quartz_private.h | 1 + dlls/quartz/window.c | 6 ++++++ 3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 9c61dd50d76..284f2cacaea 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -29,10 +29,11 @@ extern BOOL WINAPI QUARTZ_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN;
static LONG server_locks = 0;
-/* For the moment, do nothing here. */ -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) +BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) { - return QUARTZ_DllMain( hInstDLL, fdwReason, lpv ); + if (reason == DLL_PROCESS_DETACH) + video_window_unregister_class(); + return QUARTZ_DllMain(instance, reason, reserved); }
static HRESULT seeking_passthrough_create(IUnknown *outer, IUnknown **out) diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 20dcd5f16a5..f2dbaa04faa 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -123,6 +123,7 @@ typedef struct tagBaseControlWindow
HRESULT video_window_init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl, struct strmbase_filter *filter, struct strmbase_pin *pin, const BaseWindowFuncTable *func_table) DECLSPEC_HIDDEN; +void video_window_unregister_class(void) DECLSPEC_HIDDEN; HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow) DECLSPEC_HIDDEN;
BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN; diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c index 6e1a60086f5..0b0df136f2c 100644 --- a/dlls/quartz/window.c +++ b/dlls/quartz/window.c @@ -741,3 +741,9 @@ HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *C
return S_OK; } + +void video_window_unregister_class(void) +{ + if (!UnregisterClassW(class_name, NULL) && GetLastError() != ERROR_CLASS_DOES_NOT_EXIST) + ERR("Failed to unregister class, error %u.\n", GetLastError()); +}