Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- include/Makefile.in | 1 + include/amva.h | 74 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 include/amva.h
diff --git a/include/Makefile.in b/include/Makefile.in index 047e7ff9146..c76e2ec7d0d 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -14,6 +14,7 @@ SOURCES = \ amaudio.h \ amsi.idl \ amstream.idl \ + amva.h \ amvideo.idl \ appcompatapi.h \ appmgmt.h \ diff --git a/include/amva.h b/include/amva.h new file mode 100644 index 00000000000..faf103270fc --- /dev/null +++ b/include/amva.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2022 Zebediah Figura for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __AMVA_INCLUDED__ +#define __AMVA_INCLUDED__ + +typedef struct _tag_AMVABeginFrameInfo +{ + DWORD dwDestSurfaceIndex; + void *pInputData; + DWORD dwSizeInputData; + void *pOutputData; + DWORD dwSizeOutputData; +} AMVABeginFrameInfo, *LPAMVABeginFrameInfo; + +typedef struct _tag_AMVABUFFERINFO +{ + DWORD dwTypeIndex; + DWORD dwBufferIndex; + DWORD dwDataOffset; + DWORD dwDataSize; +} AMVABUFFERINFO, *LPAMVABUFFERINFO; + +typedef struct _tag_AMVACompBufferInfo +{ + DWORD dwNumCompBuffers; + DWORD dwWidthToCreate; + DWORD dwHeightToCreate; + DWORD dwBytesToAllocate; + DDSCAPS2 ddCompCaps; + DDPIXELFORMAT ddPixelFormat; +} AMVACompBufferInfo, *LPAMVACompBufferInfo; + +typedef struct _tag_AMVAEndFrameInfo +{ + DWORD dwSizeMiscData; + void *pMiscData; +} AMVAEndFrameInfo, *LPAMVAEndFrameInfo; + +typedef struct _tag_AMVAInternalMemInfo +{ + DWORD dwScratchMemAlloc; +} AMVAInternalMemInfo, *LPAMVAInternalMemInfo; + +typedef struct _tag_AMVAUncompBufferInfo +{ + DWORD dwMinNumSurfaces; + DWORD dwMaxNumSurfaces; + DDPIXELFORMAT ddUncompPixelFormat; +} AMVAUncompBufferInfo, *LPAMVAUncompBufferInfo; + +typedef struct _tag_AMVAUncompDataInfo +{ + DWORD dwUncompWidth; + DWORD dwUncompHeight; + DDPIXELFORMAT ddUncompPixelFormat; +} AMVAUncompDataInfo, *LPAMVAUncompDataInfo; + +#endif
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- include/Makefile.in | 1 + include/videoacc.idl | 126 +++++++++++++++++++++++++++++++++++++++ libs/strmiids/strmiids.c | 1 + 3 files changed, 128 insertions(+) create mode 100644 include/videoacc.idl
diff --git a/include/Makefile.in b/include/Makefile.in index c76e2ec7d0d..dff2f341568 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -747,6 +747,7 @@ SOURCES = \ verrsrc.h \ vfw.h \ vfwmsgs.h \ + videoacc.idl \ virtdisk.h \ vmr9.idl \ vmrender.idl \ diff --git a/include/videoacc.idl b/include/videoacc.idl new file mode 100644 index 00000000000..af380e4b3c8 --- /dev/null +++ b/include/videoacc.idl @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2022 Zebediah Figura for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; + +interface IMediaSample; + +cpp_quote("#if 0") + +typedef struct _DDSCAPS2 +{ + DWORD dwCaps; + DWORD dwCaps2; + DWORD dwCaps3; + union + { + DWORD dwCaps4; + DWORD dwVolumeDepth; + } DUMMYUNIONNAME1; +} DDSCAPS2; + +typedef struct _DDPIXELFORMAT +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwFourCC; + union + { + DWORD dwRGBBitCount; + DWORD dwYUVBitCount; + DWORD dwZBufferBitDepth; + DWORD dwAlphaBitDepth; + DWORD dwLuminanceBitCount; + DWORD dwBumpBitCount; + DWORD dwPrivateFormatBitCount; + } DUMMYUNIONNAME1; + union + { + DWORD dwRBitMask; + DWORD dwYBitMask; + DWORD dwStencilBitDepth; + DWORD dwLuminanceBitMask; + DWORD dwBumpDuBitMask; + DWORD dwOperations; + } DUMMYUNIONNAME2; + union + { + DWORD dwGBitMask; + DWORD dwUBitMask; + DWORD dwZBitMask; + DWORD dwBumpDvBitMask; + struct + { + WORD wFlipMSTypes; + WORD wBltMSTypes; + } MultiSampleCaps; + } DUMMYUNIONNAME3; + union + { + DWORD dwBBitMask; + DWORD dwVBitMask; + DWORD dwStencilBitMask; + DWORD dwBumpLuminanceBitMask; + } DUMMYUNIONNAME4; + union + { + DWORD dwRGBAlphaBitMask; + DWORD dwYUVAlphaBitMask; + DWORD dwLuminanceAlphaBitMask; + DWORD dwRGBZBitMask; + DWORD dwYUVZBitMask; + } DUMMYUNIONNAME5; +} DDPIXELFORMAT; + +import "amva.h"; + +cpp_quote("#endif") + +[ + local, + uuid(256a6a22-fbad-11d1-82bf-00a0c9696c8f), +] +interface IAMVideoAccelerator : IUnknown +{ + HRESULT GetVideoAcceleratorGUIDs(DWORD *count, GUID *accelerators); + HRESULT GetUncompFormatsSupported(const GUID *accelerator, DWORD *count, DDPIXELFORMAT *formats); + HRESULT GetInternalMemInfo(const GUID *accelerator, + const AMVAUncompDataInfo *format_info, AMVAInternalMemInfo *mem_info); + HRESULT GetCompBufferInfo(const GUID *accelerator, const AMVAUncompDataInfo *uncompressed_info, + DWORD *compressed_info_count, AMVACompBufferInfo *compressed_infos); + HRESULT GetInternalCompBufferInfo(DWORD *count, AMVACompBufferInfo *infos); + HRESULT BeginFrame(const AMVABeginFrameInfo *info); + HRESULT EndFrame(const AMVAEndFrameInfo *info); + HRESULT GetBuffer(DWORD type_index, DWORD buffer_index, BOOL read_only, void **buffer, LONG *stride); + HRESULT ReleaseBuffer(DWORD type_index, DWORD buffer_index); + HRESULT Execute(DWORD function, void *in_data, DWORD in_size, void *out_data, + DWORD out_size, DWORD buffer_count, const AMVABUFFERINFO *buffers); + HRESULT QueryRenderStatus(DWORD type_index, DWORD buffer_index, DWORD flags); + HRESULT DisplayFrame(DWORD index, IMediaSample *sample); +} + +[ + local, + uuid(256a6a21-fbad-11d1-82bf-00a0c9696c8f), +] +interface IAMVideoAcceleratorNotify : IUnknown +{ + HRESULT GetUncompSurfacesInfo(const GUID *accelerator, AMVAUncompBufferInfo *info); + HRESULT SetUncompSurfacesInfo(DWORD allocated_count); + HRESULT GetCreateVideoAcceleratorData(const GUID *accelerator, DWORD *size, void **data); +} diff --git a/libs/strmiids/strmiids.c b/libs/strmiids/strmiids.c index a257a23e9a4..1a7005bde3c 100644 --- a/libs/strmiids/strmiids.c +++ b/libs/strmiids/strmiids.c @@ -39,3 +39,4 @@ #include "amstream.h" #include "qedit.h" #include "vmr9.h" +#include "videoacc.h"
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/tests/vmr7.c | 71 ++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 47 deletions(-)
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 2cff39a867c..9049f8d726b 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -219,17 +219,13 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO IUnknown_Release(unk); }
-static void test_interfaces(void) +static void test_common_interfaces(IBaseFilter *filter) { - IBaseFilter *filter = create_vmr7(0); - ULONG ref; IPin *pin;
check_interface(filter, &IID_IAMCertifiedOutputProtection, TRUE); check_interface(filter, &IID_IAMFilterMiscFlags, TRUE); check_interface(filter, &IID_IBaseFilter, TRUE); - check_interface(filter, &IID_IBasicVideo, TRUE); - todo_wine check_interface(filter, &IID_IBasicVideo2, TRUE); todo_wine check_interface(filter, &IID_IKsPropertySet, TRUE); check_interface(filter, &IID_IMediaFilter, TRUE); check_interface(filter, &IID_IMediaPosition, TRUE); @@ -238,12 +234,10 @@ static void test_interfaces(void) check_interface(filter, &IID_IQualityControl, TRUE); todo_wine check_interface(filter, &IID_IQualProp, TRUE); check_interface(filter, &IID_IUnknown, TRUE); - check_interface(filter, &IID_IVideoWindow, TRUE); todo_wine check_interface(filter, &IID_IVMRAspectRatioControl, TRUE); todo_wine check_interface(filter, &IID_IVMRDeinterlaceControl, TRUE); check_interface(filter, &IID_IVMRFilterConfig, TRUE); todo_wine check_interface(filter, &IID_IVMRMixerBitmap, TRUE); - check_interface(filter, &IID_IVMRMonitorConfig, TRUE);
check_interface(filter, &IID_IBasicAudio, FALSE); check_interface(filter, &IID_IDirectDrawVideo, FALSE); @@ -254,12 +248,9 @@ static void test_interfaces(void) check_interface(filter, &IID_IVMRDeinterlaceControl9, FALSE); check_interface(filter, &IID_IVMRFilterConfig9, FALSE); check_interface(filter, &IID_IVMRMixerBitmap9, FALSE); - check_interface(filter, &IID_IVMRMixerControl, FALSE); check_interface(filter, &IID_IVMRMixerControl9, FALSE); check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); - check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE); check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE); - check_interface(filter, &IID_IVMRWindowlessControl, FALSE); check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin); @@ -275,8 +266,27 @@ static void test_interfaces(void) check_interface(pin, &IID_IMediaSeeking, FALSE);
IPin_Release(pin); +} + +static void test_interfaces(void) +{ + IBaseFilter *filter = create_vmr7(0); + ULONG ref; + + test_common_interfaces(filter); + + check_interface(filter, &IID_IBasicVideo, TRUE); + todo_wine check_interface(filter, &IID_IBasicVideo2, TRUE); + check_interface(filter, &IID_IVideoWindow, TRUE); + check_interface(filter, &IID_IVMRMonitorConfig, TRUE); + + check_interface(filter, &IID_IVMRMixerControl, FALSE); + check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE); + check_interface(filter, &IID_IVMRWindowlessControl, FALSE); + + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
- IBaseFilter_Release(filter); filter = create_vmr7(VMRMode_Windowless);
check_interface(filter, &IID_IVMRMonitorConfig, TRUE); @@ -285,28 +295,12 @@ static void test_interfaces(void) todo_wine check_interface(filter, &IID_IBasicVideo, FALSE); check_interface(filter, &IID_IBasicVideo2, FALSE); todo_wine check_interface(filter, &IID_IVideoWindow, FALSE); - check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE); - check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE); check_interface(filter, &IID_IVMRMixerControl, FALSE); - check_interface(filter, &IID_IVMRMixerControl9, FALSE); - check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); - check_interface(filter, &IID_IVMRWindowlessControl9, FALSE); + check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
- IBaseFilter_FindPin(filter, L"VMR Input0", &pin); + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
- check_interface(pin, &IID_IMemInputPin, TRUE); - check_interface(pin, &IID_IOverlay, TRUE); - check_interface(pin, &IID_IPin, TRUE); - todo_wine check_interface(pin, &IID_IQualityControl, TRUE); - check_interface(pin, &IID_IUnknown, TRUE); - - check_interface(pin, &IID_IKsPropertySet, FALSE); - check_interface(pin, &IID_IMediaPosition, FALSE); - check_interface(pin, &IID_IMediaSeeking, FALSE); - - IPin_Release(pin); - - IBaseFilter_Release(filter); filter = create_vmr7(VMRMode_Renderless);
check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, TRUE); @@ -316,24 +310,7 @@ static void test_interfaces(void) todo_wine check_interface(filter, &IID_IVideoWindow, FALSE); check_interface(filter, &IID_IVMRMixerControl, FALSE); todo_wine check_interface(filter, &IID_IVMRMonitorConfig, FALSE); - check_interface(filter, &IID_IVMRMonitorConfig9, FALSE); - check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE); check_interface(filter, &IID_IVMRWindowlessControl, FALSE); - check_interface(filter, &IID_IVMRWindowlessControl9, FALSE); - - IBaseFilter_FindPin(filter, L"VMR Input0", &pin); - - check_interface(pin, &IID_IMemInputPin, TRUE); - check_interface(pin, &IID_IOverlay, TRUE); - check_interface(pin, &IID_IPin, TRUE); - todo_wine check_interface(pin, &IID_IQualityControl, TRUE); - check_interface(pin, &IID_IUnknown, TRUE); - - check_interface(pin, &IID_IKsPropertySet, FALSE); - check_interface(pin, &IID_IMediaPosition, FALSE); - check_interface(pin, &IID_IMediaSeeking, FALSE); - - IPin_Release(pin);
ref = IBaseFilter_Release(filter); ok(!ref, "Got outstanding refcount %ld.\n", ref);
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/tests/videorenderer.c | 3 +++ dlls/quartz/tests/vmr7.c | 3 +++ dlls/quartz/tests/vmr9.c | 3 +++ 3 files changed, 9 insertions(+)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 282d1ef7b12..c76dae15e91 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -20,6 +20,7 @@
#define COBJMACROS #include "dshow.h" +#include "videoacc.h" #include "wine/strmbase.h" #include "wine/test.h"
@@ -89,6 +90,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IVideoWindow, TRUE);
check_interface(filter, &IID_IAMFilterMiscFlags, FALSE); + check_interface(filter, &IID_IAMVideoAccelerator, FALSE); check_interface(filter, &IID_IBasicAudio, FALSE); check_interface(filter, &IID_IDispatch, FALSE); check_interface(filter, &IID_IOverlay, FALSE); @@ -105,6 +107,7 @@ static void test_interfaces(void) todo_wine check_interface(pin, &IID_IQualityControl, TRUE); check_interface(pin, &IID_IUnknown, TRUE);
+ check_interface(pin, &IID_IAMVideoAccelerator, FALSE); check_interface(pin, &IID_IAsyncReader, FALSE); check_interface(pin, &IID_IMediaPosition, FALSE); check_interface(pin, &IID_IMediaSeeking, FALSE); diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 9049f8d726b..5e8866de5a2 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -23,6 +23,7 @@ #include "dshow.h" #include "d3d9.h" #include "vmr9.h" +#include "videoacc.h" #include "wine/strmbase.h" #include "wine/test.h"
@@ -239,6 +240,7 @@ static void test_common_interfaces(IBaseFilter *filter) check_interface(filter, &IID_IVMRFilterConfig, TRUE); todo_wine check_interface(filter, &IID_IVMRMixerBitmap, TRUE);
+ check_interface(filter, &IID_IAMVideoAccelerator, FALSE); check_interface(filter, &IID_IBasicAudio, FALSE); check_interface(filter, &IID_IDirectDrawVideo, FALSE); check_interface(filter, &IID_IPersistPropertyBag, FALSE); @@ -255,6 +257,7 @@ static void test_common_interfaces(IBaseFilter *filter)
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
+ todo_wine check_interface(pin, &IID_IAMVideoAccelerator, TRUE); check_interface(pin, &IID_IMemInputPin, TRUE); check_interface(pin, &IID_IOverlay, TRUE); check_interface(pin, &IID_IPin, TRUE); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 151c68cf6af..4fd8f35d4f8 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -27,6 +27,7 @@ #include "qedit.h" #include "d3d9.h" #include "vmr9.h" +#include "videoacc.h" #include "wmcodecdsp.h" #include "wine/strmbase.h" #include "wine/test.h" @@ -246,6 +247,7 @@ static void test_common_interfaces(IBaseFilter *filter) check_interface(filter, &IID_IVMRFilterConfig9, TRUE); check_interface(filter, &IID_IVMRMixerBitmap9, TRUE);
+ check_interface(filter, &IID_IAMVideoAccelerator, FALSE); check_interface(filter, &IID_IBasicAudio, FALSE); check_interface(filter, &IID_IDirectDrawVideo, FALSE); check_interface(filter, &IID_IPersistPropertyBag, FALSE); @@ -262,6 +264,7 @@ static void test_common_interfaces(IBaseFilter *filter)
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
+ todo_wine check_interface(pin, &IID_IAMVideoAccelerator, TRUE); check_interface(pin, &IID_IMemInputPin, TRUE); check_interface(pin, &IID_IOverlay, TRUE); check_interface(pin, &IID_IPin, TRUE);
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/tests/vmr7.c | 2 +- dlls/quartz/tests/vmr9.c | 2 +- dlls/quartz/vmr9.c | 141 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 142 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 5e8866de5a2..88c82bec0d3 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -257,7 +257,7 @@ static void test_common_interfaces(IBaseFilter *filter)
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
- todo_wine check_interface(pin, &IID_IAMVideoAccelerator, TRUE); + check_interface(pin, &IID_IAMVideoAccelerator, TRUE); check_interface(pin, &IID_IMemInputPin, TRUE); check_interface(pin, &IID_IOverlay, TRUE); check_interface(pin, &IID_IPin, TRUE); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 4fd8f35d4f8..405f7ee89ba 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -264,7 +264,7 @@ static void test_common_interfaces(IBaseFilter *filter)
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
- todo_wine check_interface(pin, &IID_IAMVideoAccelerator, TRUE); + check_interface(pin, &IID_IAMVideoAccelerator, TRUE); check_interface(pin, &IID_IMemInputPin, TRUE); check_interface(pin, &IID_IOverlay, TRUE); check_interface(pin, &IID_IPin, TRUE); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 4b213d57426..2330f8fc0c9 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -33,6 +33,7 @@ #include "ddraw.h" #include "dvdmedia.h" #include "d3d9.h" +#include "videoacc.h" #include "vmr9.h"
#include "wine/debug.h" @@ -78,6 +79,7 @@ struct quartz_vmr * Native uses a separate reference count for IVMRSurfaceAllocatorNotify9. */ LONG IVMRSurfaceAllocatorNotify9_refcount;
+ IAMVideoAccelerator IAMVideoAccelerator_iface; IOverlay IOverlay_iface;
IVMRSurfaceAllocator9 *allocator; @@ -610,7 +612,9 @@ static HRESULT vmr_pin_query_interface(struct strmbase_renderer *iface, REFIID i { struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
- if (IsEqualGUID(iid, &IID_IOverlay)) + if (IsEqualGUID(iid, &IID_IAMVideoAccelerator)) + *out = &filter->IAMVideoAccelerator_iface; + else if (IsEqualGUID(iid, &IID_IOverlay)) *out = &filter->IOverlay_iface; else return E_NOINTERFACE; @@ -2430,6 +2434,139 @@ static const IVMRAspectRatioControl9Vtbl aspect_ratio_control9_vtbl = aspect_ratio_control9_SetAspectRatioMode, };
+static struct quartz_vmr *impl_from_IAMVideoAccelerator(IAMVideoAccelerator *iface) +{ + return CONTAINING_RECORD(iface, struct quartz_vmr, IAMVideoAccelerator_iface); +} + +static HRESULT WINAPI video_accelerator_QueryInterface(IAMVideoAccelerator *iface, REFIID iid, void **out) +{ + struct quartz_vmr *filter = impl_from_IAMVideoAccelerator(iface); + return IPin_QueryInterface(&filter->renderer.sink.pin.IPin_iface, iid, out); +} + +static ULONG WINAPI video_accelerator_AddRef(IAMVideoAccelerator *iface) +{ + struct quartz_vmr *filter = impl_from_IAMVideoAccelerator(iface); + return IPin_AddRef(&filter->renderer.sink.pin.IPin_iface); +} + +static ULONG WINAPI video_accelerator_Release(IAMVideoAccelerator *iface) +{ + struct quartz_vmr *filter = impl_from_IAMVideoAccelerator(iface); + return IPin_Release(&filter->renderer.sink.pin.IPin_iface); +} + +static HRESULT WINAPI video_accelerator_GetVideoAcceleratorGUIDs( + IAMVideoAccelerator *iface, DWORD *count, GUID *accelerators) +{ + FIXME("iface %p, count %p, accelerators %p, stub!\n", iface, count, accelerators); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_GetUncompFormatsSupported(IAMVideoAccelerator *iface, + const GUID *accelerator, DWORD *count, DDPIXELFORMAT *formats) +{ + FIXME("iface %p, accelerator %s, count %p, formats %p, stub!\n", + iface, debugstr_guid(accelerator), count, formats); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_GetInternalMemInfo(IAMVideoAccelerator *iface, + const GUID *accelerator, const AMVAUncompDataInfo *format_info, AMVAInternalMemInfo *mem_info) +{ + FIXME("iface %p, accelerator %s, format_info %p, mem_info %p, stub!\n", + iface, debugstr_guid(accelerator), format_info, mem_info); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_GetCompBufferInfo(IAMVideoAccelerator *iface, + const GUID *accelerator, const AMVAUncompDataInfo *uncompressed_info, + DWORD *compressed_info_count, AMVACompBufferInfo *compressed_infos) +{ + FIXME("iface %p, accelerator %s, uncompressed_info %p, compressed_info_count %p, compressed_infos %p, stub!\n", + iface, debugstr_guid(accelerator), uncompressed_info, compressed_info_count, compressed_infos); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_GetInternalCompBufferInfo( + IAMVideoAccelerator *iface, DWORD *count, AMVACompBufferInfo *infos) +{ + FIXME("iface %p, count %p, infos %p, stub!\n", iface, count, infos); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_BeginFrame(IAMVideoAccelerator *iface, const AMVABeginFrameInfo *info) +{ + FIXME("iface %p, info %p, stub!\n", iface, info); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_EndFrame(IAMVideoAccelerator *iface, const AMVAEndFrameInfo *info) +{ + FIXME("iface %p, info %p, stub!\n", iface, info); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_GetBuffer(IAMVideoAccelerator *iface, + DWORD type_index, DWORD buffer_index, BOOL read_only, void **buffer, LONG *stride) +{ + FIXME("iface %p, type_index %lu, buffer_index %lu, read_only %d, buffer %p, stride %p, stub!\n", + iface, type_index, buffer_index, read_only, buffer, stride); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_ReleaseBuffer( + IAMVideoAccelerator *iface, DWORD type_index, DWORD buffer_index) +{ + FIXME("iface %p, type_index %lu, buffer_index %lu, stub!\n", iface, type_index, buffer_index); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_Execute(IAMVideoAccelerator *iface, + DWORD function, void *in_data, DWORD in_size, void *out_data, + DWORD out_size, DWORD buffer_count, const AMVABUFFERINFO *buffers) +{ + FIXME("iface %p, function %#lx, in_data %p, in_size %lu," + " out_data %p, out_size %lu, buffer_count %lu, buffers %p, stub!\n", + iface, function, in_data, in_size, out_data, out_size, buffer_count, buffers); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_QueryRenderStatus(IAMVideoAccelerator *iface, + DWORD type_index, DWORD buffer_index, DWORD flags) +{ + FIXME("iface %p, type_index %lu, buffer_index %lu, flags %#lx, stub!\n", + iface, type_index, buffer_index, flags); + return E_NOTIMPL; +} + +static HRESULT WINAPI video_accelerator_DisplayFrame( + IAMVideoAccelerator *iface, DWORD index, IMediaSample *sample) +{ + FIXME("iface %p, index %lu, sample %p, stub!\n", iface, index, sample); + return E_NOTIMPL; +} + +static const IAMVideoAcceleratorVtbl video_accelerator_vtbl = +{ + video_accelerator_QueryInterface, + video_accelerator_AddRef, + video_accelerator_Release, + video_accelerator_GetVideoAcceleratorGUIDs, + video_accelerator_GetUncompFormatsSupported, + video_accelerator_GetInternalMemInfo, + video_accelerator_GetCompBufferInfo, + video_accelerator_GetInternalCompBufferInfo, + video_accelerator_BeginFrame, + video_accelerator_EndFrame, + video_accelerator_GetBuffer, + video_accelerator_ReleaseBuffer, + video_accelerator_Execute, + video_accelerator_QueryRenderStatus, + video_accelerator_DisplayFrame, +}; + static inline struct quartz_vmr *impl_from_IOverlay(IOverlay *iface) { return CONTAINING_RECORD(iface, struct quartz_vmr, IOverlay_iface); @@ -2567,6 +2704,8 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) object->IVMRSurfaceAllocatorNotify9_iface.lpVtbl = &VMR9_SurfaceAllocatorNotify_Vtbl; object->IVMRWindowlessControl_iface.lpVtbl = &VMR7_WindowlessControl_Vtbl; object->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl; + + object->IAMVideoAccelerator_iface.lpVtbl = &video_accelerator_vtbl; object->IOverlay_iface.lpVtbl = &overlay_vtbl;
video_window_init(&object->window, &IVideoWindow_VTable,