Commit 31b88c38 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat: Implement GetContiguousLength() for d3d9 buffer.

parent 264732a8
......@@ -697,13 +697,6 @@ static HRESULT WINAPI d3d9_surface_buffer_GetScanline0AndPitch(IMF2DBuffer2 *ifa
return hr;
}
static HRESULT WINAPI d3d9_surface_buffer_GetContiguousLength(IMF2DBuffer2 *iface, DWORD *length)
{
FIXME("%p, %p.\n", iface, length);
return E_NOTIMPL;
}
static HRESULT WINAPI d3d9_surface_buffer_Lock2DSize(IMF2DBuffer2 *iface, MF2DBuffer_LockFlags flags, BYTE **scanline0,
LONG *pitch, BYTE **buffer_start, DWORD *buffer_length)
{
......@@ -748,7 +741,7 @@ static const IMF2DBuffer2Vtbl d3d9_surface_buffer_vtbl =
d3d9_surface_buffer_Unlock2D,
d3d9_surface_buffer_GetScanline0AndPitch,
memory_2d_buffer_IsContiguousFormat,
d3d9_surface_buffer_GetContiguousLength,
memory_2d_buffer_GetContiguousLength,
memory_2d_buffer_ContiguousCopyTo,
memory_2d_buffer_ContiguousCopyFrom,
d3d9_surface_buffer_Lock2DSize,
......
......@@ -5895,6 +5895,10 @@ static void test_MFCreateDXSurfaceBuffer(void)
hr = pMFCreateDXSurfaceBuffer(&IID_IDirect3DSurface9, (IUnknown *)backbuffer, FALSE, &buffer);
ok(hr == S_OK, "Failed to create a buffer, hr %#x.\n", hr);
check_interface(buffer, &IID_IMF2DBuffer, TRUE);
check_interface(buffer, &IID_IMF2DBuffer2, TRUE);
check_interface(buffer, &IID_IMFGetService, TRUE);
/* Surface is accessible. */
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFGetService, (void **)&gs);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
......@@ -5977,6 +5981,12 @@ static void test_MFCreateDXSurfaceBuffer(void)
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(!value, "Unexpected return value %d.\n", value);
hr = IMF2DBuffer_GetContiguousLength(_2dbuffer, NULL);
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
hr = IMF2DBuffer_GetContiguousLength(_2dbuffer, &length);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(length == max_length, "Unexpected length %u.\n", length);
IMF2DBuffer_Release(_2dbuffer);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer2, (void **)&_2dbuffer2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment