wine-bug: https://bugs.winehq.org/show_bug.cgi?id=42372 Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/quartz/filtergraph.c | 64 ++++++++++++++++++++++++++++++++- dlls/quartz/tests/filtergraph.c | 1 + include/axextend.idl | 13 +++++++ 3 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 6217516db1..db2f922bc1 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -181,7 +181,7 @@ typedef struct _IFilterGraphImpl { /* IRegisterServiceProvider */ /* IResourceManager */ /* IServiceProvider */ - /* IVideoFrameStep */ + IVideoFrameStep IVideoFrameStep_iface;
IUnknown *outer_unk; LONG ref; @@ -454,6 +454,9 @@ static HRESULT WINAPI FilterGraphInner_QueryInterface(IUnknown *iface, REFIID ri } else if (IsEqualGUID(&IID_IGraphVersion, riid)) { *ppvObj = &This->IGraphVersion_iface; TRACE(" returning IGraphVersion interface (%p)\n", *ppvObj); + } else if (IsEqualGUID(&IID_IVideoFrameStep, riid)) { + *ppvObj = &This->IVideoFrameStep_iface; + TRACE(" returning IVideoFrameStep interface (%p)\n", *ppvObj); } else { *ppvObj = NULL; FIXME("unknown interface %s\n", debugstr_guid(riid)); @@ -5638,6 +5641,64 @@ static const IGraphVersionVtbl IGraphVersion_VTable = GraphVersion_QueryVersion, };
+static inline IFilterGraphImpl *impl_from_IVideoFrameStep(IVideoFrameStep *iface) +{ + return CONTAINING_RECORD(iface, IFilterGraphImpl, IVideoFrameStep_iface); +} + +static HRESULT WINAPI VideoFrameStep_QueryInterface(IVideoFrameStep *iface, REFIID riid, void **ppv) +{ + IFilterGraphImpl *This = impl_from_IVideoFrameStep(iface); + + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); +} + +static ULONG WINAPI VideoFrameStep_AddRef(IVideoFrameStep *iface) +{ + IFilterGraphImpl *This = impl_from_IVideoFrameStep(iface); + + return IUnknown_AddRef(This->outer_unk); +} + +static ULONG WINAPI VideoFrameStep_Release(IVideoFrameStep *iface) +{ + IFilterGraphImpl *This = impl_from_IVideoFrameStep(iface); + + return IUnknown_Release(This->outer_unk); +} + +static HRESULT WINAPI VideoFrameStep_Step(IVideoFrameStep *iface, DWORD frames, IUnknown *stepobj) +{ + IFilterGraphImpl *This = impl_from_IVideoFrameStep(iface); + FIXME("(%p)->(%d %p): stub!\n", This, frames, stepobj); + return E_NOTIMPL; +} + +static HRESULT WINAPI VideoFrameStep_CanStep(IVideoFrameStep *iface, LONG multiple, IUnknown *stepobj) +{ + IFilterGraphImpl *This = impl_from_IVideoFrameStep(iface); + FIXME("(%p)->(%d %p): stub!\n", This, multiple, stepobj); + return E_NOTIMPL; +} + +static HRESULT WINAPI VideoFrameStep_CancelStep(IVideoFrameStep *iface) +{ + IFilterGraphImpl *This = impl_from_IVideoFrameStep(iface); + FIXME("(%p)->(): stub!\n", This); + return E_NOTIMPL; +} + + +static const IVideoFrameStepVtbl IVideoFrameStep_VTable = +{ + VideoFrameStep_QueryInterface, + VideoFrameStep_AddRef, + VideoFrameStep_Release, + VideoFrameStep_Step, + VideoFrameStep_CanStep, + VideoFrameStep_CancelStep +}; + static const IUnknownVtbl IInner_VTable = { FilterGraphInner_QueryInterface, @@ -5668,6 +5729,7 @@ static HRESULT filter_graph_common_create(IUnknown *outer, IUnknown **out, BOOL fimpl->IMediaPosition_iface.lpVtbl = &IMediaPosition_VTable; fimpl->IObjectWithSite_iface.lpVtbl = &IObjectWithSite_VTable; fimpl->IGraphVersion_iface.lpVtbl = &IGraphVersion_VTable; + fimpl->IVideoFrameStep_iface.lpVtbl = &IVideoFrameStep_VTable; fimpl->ref = 1; list_init(&fimpl->filters); list_init(&fimpl->sorted_filters); diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index f0aa084192..a3378efe0b 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -125,6 +125,7 @@ static void test_interfaces(void) check_interface(graph, &IID_IMediaPosition, TRUE); check_interface(graph, &IID_IMediaSeeking, TRUE); check_interface(graph, &IID_IObjectWithSite, TRUE); + check_interface(graph, &IID_IVideoFrameStep, TRUE); check_interface(graph, &IID_IVideoWindow, TRUE);
check_interface(graph, &IID_IBaseFilter, FALSE); diff --git a/include/axextend.idl b/include/axextend.idl index 8b46d665b5..8303166721 100644 --- a/include/axextend.idl +++ b/include/axextend.idl @@ -1471,3 +1471,16 @@ interface IAMTVTuner : IAMTuner HRESULT get_VideoFrequency([out] long *freq); HRESULT get_AudioFrequency([out] long *freq); } + +[ + local, + object, + uuid(e46a9787-2b71-444d-a4b5-1fab7b708d6a), + pointer_default(unique), +] +interface IVideoFrameStep : IUnknown +{ + HRESULT Step(DWORD dwFrames, [in] IUnknown *pStepObject); + HRESULT CanStep(long bMultiple, [in] IUnknown *pStepObject); + HRESULT CancelStep(); +}