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

mfplat: Implement MFCreateDXSurfaceBuffer().

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