evr/sample: Implement GetService() for surface buffers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
208520f8d9
commit
0ff8a57257
|
@ -1075,9 +1075,14 @@ static ULONG WINAPI surface_buffer_gs_Release(IMFGetService *iface)
|
|||
|
||||
static HRESULT WINAPI surface_buffer_gs_GetService(IMFGetService *iface, REFGUID service, REFIID riid, void **obj)
|
||||
{
|
||||
FIXME("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj);
|
||||
struct surface_buffer *buffer = impl_from_IMFGetService(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj);
|
||||
|
||||
if (IsEqualGUID(service, &MR_BUFFER_SERVICE))
|
||||
return IUnknown_QueryInterface(buffer->surface, riid, obj);
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static const IMFGetServiceVtbl surface_buffer_gs_vtbl =
|
||||
|
|
|
@ -718,7 +718,7 @@ todo_wine
|
|||
|
||||
static void test_surface_sample(void)
|
||||
{
|
||||
IDirect3DSurface9 *backbuffer = NULL;
|
||||
IDirect3DSurface9 *backbuffer = NULL, *surface;
|
||||
IMFDesiredSample *desired_sample;
|
||||
IMFMediaBuffer *buffer, *buffer2;
|
||||
LONGLONG duration, time1, time2;
|
||||
|
@ -870,6 +870,16 @@ static void test_surface_sample(void)
|
|||
ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
|
||||
ok(!count, "Unexpected attribute count.\n");
|
||||
|
||||
hr = MFGetService((IUnknown *)buffer, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, (void **)&surface);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(surface == backbuffer, "Unexpected instance.\n");
|
||||
IDirect3DSurface9_Release(surface);
|
||||
|
||||
hr = MFGetService((IUnknown *)buffer, &MR_BUFFER_SERVICE, &IID_IUnknown, (void **)&surface);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(surface == backbuffer, "Unexpected instance.\n");
|
||||
IDirect3DSurface9_Release(surface);
|
||||
|
||||
IMFMediaBuffer_Release(buffer);
|
||||
|
||||
hr = IMFSample_GetSampleFlags(sample, &flags);
|
||||
|
|
Loading…
Reference in New Issue