Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/mpegsplit.c | 44 +++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 28 deletions(-)
diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c index 0afdcbdf3b0..25e1b0d9d74 100644 --- a/dlls/quartz/mpegsplit.c +++ b/dlls/quartz/mpegsplit.c @@ -764,36 +764,9 @@ static HRESULT MPEGSplitter_first_request(LPVOID iface) return hr; }
-static HRESULT WINAPI MPEGSplitter_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv) -{ - MPEGSplitterImpl *This = impl_from_IBaseFilter(iface); - TRACE("(%s, %p)\n", qzdebugstr_guid(riid), ppv); - - *ppv = NULL; - - if ( IsEqualIID(riid, &IID_IUnknown) - || IsEqualIID(riid, &IID_IPersist) - || IsEqualIID(riid, &IID_IMediaFilter) - || IsEqualIID(riid, &IID_IBaseFilter) ) - *ppv = iface; - else if ( IsEqualIID(riid, &IID_IAMStreamSelect) ) - *ppv = &This->IAMStreamSelect_iface; - - if (*ppv) - { - IBaseFilter_AddRef(iface); - return S_OK; - } - - if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow)) - FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); - - return E_NOINTERFACE; -} - static const IBaseFilterVtbl MPEGSplitter_Vtbl = { - MPEGSplitter_QueryInterface, + BaseFilterImpl_QueryInterface, BaseFilterImpl_AddRef, BaseFilterImpl_Release, BaseFilterImpl_GetClassID, @@ -874,10 +847,25 @@ static void mpeg_splitter_destroy(BaseFilter *iface) Parser_Destroy(&filter->Parser); }
+static HRESULT mpeg_splitter_query_interface(BaseFilter *iface, REFIID iid, void **out) +{ + MPEGSplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); + + if (IsEqualGUID(iid, &IID_IAMStreamSelect)) + { + *out = &filter->IAMStreamSelect_iface; + IUnknown_AddRef((IUnknown *)*out); + return S_OK; + } + + return E_NOINTERFACE; +} + static const BaseFilterFuncTable mpeg_splitter_func_table = { .filter_get_pin = parser_get_pin, .filter_destroy = mpeg_splitter_destroy, + .filter_query_interface = mpeg_splitter_query_interface, };
HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/avimux.c | 53 ++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 30 deletions(-)
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index bf10fe3a355..6a3a40b6859 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -155,9 +155,31 @@ static void avi_mux_destroy(BaseFilter *iface) ObjectRefCount(FALSE); }
+static HRESULT avi_mux_query_interface(BaseFilter *iface, REFIID iid, void **out) +{ + AviMux *filter = impl_from_BaseFilter(iface); + + if (IsEqualGUID(iid, &IID_IConfigAviMux)) + *out = &filter->IConfigAviMux_iface; + else if (IsEqualGUID(iid, &IID_IConfigInterleaving)) + *out = &filter->IConfigInterleaving_iface; + else if (IsEqualGUID(iid, &IID_IMediaSeeking)) + *out = &filter->IMediaSeeking_iface; + else if (IsEqualGUID(iid, &IID_IPersistMediaPropertyBag)) + *out = &filter->IPersistMediaPropertyBag_iface; + else if (IsEqualGUID(iid, &IID_ISpecifyPropertyPages)) + *out = &filter->ISpecifyPropertyPages_iface; + else + return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown *)*out); + return S_OK; +} + static const BaseFilterFuncTable filter_func_table = { .filter_get_pin = avi_mux_get_pin, .filter_destroy = avi_mux_destroy, + .filter_query_interface = avi_mux_query_interface, };
static inline AviMux* impl_from_IBaseFilter(IBaseFilter *iface) @@ -166,35 +188,6 @@ static inline AviMux* impl_from_IBaseFilter(IBaseFilter *iface) return impl_from_BaseFilter(filter); }
-static HRESULT WINAPI AviMux_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv) -{ - AviMux *This = impl_from_IBaseFilter(iface); - - TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); - - if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPersist) || - IsEqualIID(riid, &IID_IMediaFilter) || IsEqualIID(riid, &IID_IBaseFilter)) - *ppv = &This->filter.IBaseFilter_iface; - else if(IsEqualIID(riid, &IID_IConfigAviMux)) - *ppv = &This->IConfigAviMux_iface; - else if(IsEqualIID(riid, &IID_IConfigInterleaving)) - *ppv = &This->IConfigInterleaving_iface; - else if(IsEqualIID(riid, &IID_IMediaSeeking)) - *ppv = &This->IMediaSeeking_iface; - else if(IsEqualIID(riid, &IID_IPersistMediaPropertyBag)) - *ppv = &This->IPersistMediaPropertyBag_iface; - else if(IsEqualIID(riid, &IID_ISpecifyPropertyPages)) - *ppv = &This->ISpecifyPropertyPages_iface; - else { - FIXME("no interface for %s\n", debugstr_guid(riid)); - *ppv = NULL; - return E_NOINTERFACE; - } - - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; -} - static HRESULT out_flush(AviMux *This) { ULONG written; @@ -710,7 +703,7 @@ static HRESULT WINAPI AviMux_Run(IBaseFilter *iface, REFERENCE_TIME tStart) }
static const IBaseFilterVtbl AviMuxVtbl = { - AviMux_QueryInterface, + BaseFilterImpl_QueryInterface, BaseFilterImpl_AddRef, BaseFilterImpl_Release, BaseFilterImpl_GetClassID,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53107
Your paranoid android.
=== debian9 (build log) ===
../../../wine/dlls/quartz/mpegsplit.c:868:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:680: recipe for target 'mpegsplit.o' failed Makefile:8688: recipe for target 'dlls/quartz' failed ../../../wine/dlls/qcap/avimux.c:182:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:258: recipe for target 'avimux.o' failed Makefile:8688: recipe for target 'dlls/qcap' failed Task: The win32 build failed
=== debian9 (build log) ===
../../../wine/dlls/quartz/mpegsplit.c:868:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:671: recipe for target 'mpegsplit.o' failed Makefile:8431: recipe for target 'dlls/quartz' failed ../../../wine/dlls/qcap/avimux.c:182:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:258: recipe for target 'avimux.o' failed Makefile:8431: recipe for target 'dlls/qcap' failed Task: The wow64 build failed
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gstdemux.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 8bb22981fd5..41945caaf7d 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1303,34 +1303,6 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *pUnkOuter, HRESULT *phr) return obj; }
-static HRESULT WINAPI GST_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv) -{ - GSTImpl *This = impl_from_IBaseFilter(iface); - - TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); - - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IPersist) || - IsEqualIID(riid, &IID_IMediaFilter) || - IsEqualIID(riid, &IID_IBaseFilter)) - { - *ppv = &This->filter.IBaseFilter_iface; - } - - if (*ppv) { - IUnknown_AddRef((IUnknown *)(*ppv)); - return S_OK; - } - - if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow) && - !IsEqualIID(riid, &IID_IAMFilterMiscFlags)) - FIXME("No interface for %s!\n", debugstr_guid(riid)); - - return E_NOINTERFACE; -} - static HRESULT WINAPI GST_Stop(IBaseFilter *iface) { GSTImpl *This = impl_from_IBaseFilter(iface); @@ -1452,7 +1424,7 @@ static HRESULT WINAPI GST_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, }
static const IBaseFilterVtbl GST_Vtbl = { - GST_QueryInterface, + BaseFilterImpl_QueryInterface, BaseFilterImpl_AddRef, BaseFilterImpl_Release, BaseFilterImpl_GetClassID,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53108
Your paranoid android.
=== debian9 (build log) ===
../../../wine/dlls/quartz/mpegsplit.c:868:5: error: unknown field ‘filter_query_interface’ specified in initializer ../../../wine/dlls/qcap/avimux.c:182:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:680: recipe for target 'mpegsplit.o' failed Makefile:258: recipe for target 'avimux.o' failed Makefile:8688: recipe for target 'dlls/quartz' failed Makefile:8688: recipe for target 'dlls/qcap' failed Task: The win32 build failed
=== debian9 (build log) ===
../../../wine/dlls/quartz/mpegsplit.c:868:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:671: recipe for target 'mpegsplit.o' failed Makefile:8431: recipe for target 'dlls/quartz' failed ../../../wine/dlls/qcap/avimux.c:182:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:258: recipe for target 'avimux.o' failed Makefile:8431: recipe for target 'dlls/qcap' failed Task: The wow64 build failed
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/renderer.c | 24 +++++++++++++++++++++++- include/wine/strmbase.h | 1 + 2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 7a69d98367c..5308cd39ec5 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -200,10 +200,32 @@ static void renderer_destroy(BaseFilter *iface) filter->pFuncsTable->renderer_destroy(filter); }
-static const BaseFilterFuncTable RendererBaseFilterFuncTable = +static HRESULT renderer_query_interface(BaseFilter *iface, REFIID iid, void **out) { + BaseRenderer *filter = impl_from_BaseFilter(iface); + HRESULT hr; + + if (filter->pFuncsTable->renderer_query_interface + && SUCCEEDED(hr = filter->pFuncsTable->renderer_query_interface(filter, iid, out))) + { + return hr; + } + + if (IsEqualIID(iid, &IID_IMediaSeeking) || IsEqualIID(iid, &IID_IMediaPosition)) + return IUnknown_QueryInterface(filter->pPosition, iid, out); + else if (IsEqualIID(iid, &IID_IQualityControl)) + { + *out = &filter->qcimpl->IQualityControl_iface; + IUnknown_AddRef((IUnknown *)*out); + return S_OK; + } + return E_NOINTERFACE; +} + +static const BaseFilterFuncTable RendererBaseFilterFuncTable = { .filter_get_pin = renderer_get_pin, .filter_destroy = renderer_destroy, + .filter_query_interface = renderer_query_interface, };
static HRESULT WINAPI BaseRenderer_Input_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE * pmt) diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 1d36f133d3d..e192e98b56d 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -606,6 +606,7 @@ typedef struct BaseRendererFuncTable { BaseRenderer_BeginFlush pfnBeginFlush; BaseRenderer_EndFlush pfnEndFlush; void (*renderer_destroy)(BaseRenderer *iface); + HRESULT (*renderer_query_interface)(BaseRenderer *iface, REFIID iid, void **out); } BaseRendererFuncTable;
HRESULT WINAPI BaseRendererImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53109
Your paranoid android.
=== debian9 (build log) ===
../../../wine/dlls/strmbase/renderer.c:228:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:580: recipe for target 'renderer.o' failed Makefile:8688: recipe for target 'dlls/strmbase' failed Task: The win32 build failed
=== debian9 (build log) ===
../../../wine/dlls/strmbase/renderer.c:228:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:571: recipe for target 'renderer.o' failed Makefile:8431: recipe for target 'dlls/strmbase' failed Task: The wow64 build failed
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/dsoundrender.c | 59 ++++++++++++++------------------------ 1 file changed, 22 insertions(+), 37 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 2b50eaef9f9..4c339f8bb59 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -611,6 +611,23 @@ static void dsound_render_destroy(BaseRenderer *iface) CoTaskMemFree(filter); }
+static HRESULT dsound_render_query_interface(BaseRenderer *iface, REFIID iid, void **out) +{ + DSoundRenderImpl *filter = impl_from_BaseRenderer(iface); + + if (IsEqualGUID(iid, &IID_IBasicAudio)) + *out = &filter->basicAudio.IBasicAudio_iface; + else if (IsEqualGUID(iid, &IID_IReferenceClock)) + *out = &filter->IReferenceClock_iface; + else if (IsEqualGUID(iid, &IID_IAMDirectSound)) + *out = &filter->IAMDirectSound_iface; + else + return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown *)*out); + return S_OK; +} + static const BaseRendererFuncTable BaseFuncTable = { DSoundRender_CheckMediaType, DSoundRender_DoRenderSample, @@ -632,6 +649,7 @@ static const BaseRendererFuncTable BaseFuncTable = { DSoundRender_BeginFlush, DSoundRender_EndFlush, dsound_render_destroy, + dsound_render_query_interface, };
HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv) @@ -705,39 +723,6 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv) return hr; }
-static HRESULT WINAPI DSoundRender_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv) -{ - DSoundRenderImpl *This = impl_from_IBaseFilter(iface); - TRACE("(%p, %p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv); - - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IBasicAudio)) - *ppv = &This->basicAudio.IBasicAudio_iface; - else if (IsEqualIID(riid, &IID_IReferenceClock)) - *ppv = &This->IReferenceClock_iface; - else if (IsEqualIID(riid, &IID_IAMDirectSound)) - *ppv = &This->IAMDirectSound_iface; - else - { - HRESULT hr; - hr = BaseRendererImpl_QueryInterface(iface, riid, ppv); - if (SUCCEEDED(hr)) - return hr; - } - - if (*ppv) - { - IUnknown_AddRef((IUnknown *)(*ppv)); - return S_OK; - } - - if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow)) - FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); - - return E_NOINTERFACE; -} - static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface) { DSoundRenderImpl *This = impl_from_IBaseFilter(iface); @@ -770,7 +755,7 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface)
static const IBaseFilterVtbl DSoundRender_Vtbl = { - DSoundRender_QueryInterface, + BaseFilterImpl_QueryInterface, BaseFilterImpl_AddRef, BaseFilterImpl_Release, BaseFilterImpl_GetClassID, @@ -795,7 +780,7 @@ static HRESULT WINAPI Basicaudio_QueryInterface(IBasicAudio *iface,
TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
- return DSoundRender_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); + return BaseFilterImpl_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); }
static ULONG WINAPI Basicaudio_AddRef(IBasicAudio *iface) { @@ -989,7 +974,7 @@ static HRESULT WINAPI ReferenceClock_QueryInterface(IReferenceClock *iface,
TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
- return DSoundRender_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); + return BaseFilterImpl_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); }
static ULONG WINAPI ReferenceClock_AddRef(IReferenceClock *iface) @@ -1157,7 +1142,7 @@ static HRESULT WINAPI AMDirectSound_QueryInterface(IAMDirectSound *iface,
TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
- return DSoundRender_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); + return BaseFilterImpl_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); }
static ULONG WINAPI AMDirectSound_AddRef(IAMDirectSound *iface)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53110
Your paranoid android.
=== debian9 (build log) ===
../../../wine/dlls/strmbase/renderer.c:228:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:580: recipe for target 'renderer.o' failed Makefile:8688: recipe for target 'dlls/strmbase' failed Task: The win32 build failed
=== debian9 (build log) ===
../../../wine/dlls/strmbase/renderer.c:228:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:571: recipe for target 'renderer.o' failed Makefile:8431: recipe for target 'dlls/strmbase' failed Task: The wow64 build failed
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53106
Your paranoid android.
=== debian9 (build log) ===
../../../wine/dlls/quartz/mpegsplit.c:868:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:680: recipe for target 'mpegsplit.o' failed Makefile:8688: recipe for target 'dlls/quartz' failed Task: The win32 build failed
=== debian9 (build log) ===
../../../wine/dlls/quartz/mpegsplit.c:868:5: error: unknown field ‘filter_query_interface’ specified in initializer Makefile:671: recipe for target 'mpegsplit.o' failed Makefile:8431: recipe for target 'dlls/quartz' failed Task: The wow64 build failed