Commit 23a656a0 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat: Implement MFCreateDXSurfaceBuffer().

parent 74ea8d8c
......@@ -46,6 +46,7 @@
@ stub MFCreateAudioMediaType
@ stdcall MFCreateCollection(ptr)
@ stdcall MFCreateDXGIDeviceManager(ptr ptr)
@ stdcall MFCreateDXSurfaceBuffer(ptr ptr long ptr)
@ stdcall MFCreateEventQueue(ptr)
@ stdcall MFCreateFile(long long long wstr ptr)
@ stub MFCreateLegacyMediaBufferOnMFMediaBuffer
......
......@@ -5649,7 +5649,7 @@ static void test_MFCreateDXSurfaceBuffer(void)
if (!pMFCreateDXSurfaceBuffer)
{
skip("MFCreateDXSurfaceBuffer is not available.\n");
win_skip("MFCreateDXSurfaceBuffer is not available.\n");
return;
}
......@@ -5671,6 +5671,9 @@ static void test_MFCreateDXSurfaceBuffer(void)
IDirect3DSwapChain9_Release(swapchain);
hr = pMFCreateDXSurfaceBuffer(&IID_IUnknown, (IUnknown *)backbuffer, FALSE, &buffer);
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
hr = pMFCreateDXSurfaceBuffer(&IID_IDirect3DSurface9, (IUnknown *)backbuffer, FALSE, &buffer);
ok(hr == S_OK, "Failed to create a buffer, hr %#x.\n", hr);
......@@ -5764,6 +5767,12 @@ static void test_MFCreateDXSurfaceBuffer(void)
ok(data[0] == 0xab, "Unexpected leading byte.\n");
IMF2DBuffer2_Unlock2D(_2dbuffer2);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(data[0] == 0xab, "Unexpected leading byte.\n");
hr = IMFMediaBuffer_Unlock(buffer);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_ReadWrite, &data, &pitch, &data2, &length);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IMF2DBuffer2_Unlock2D(_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