Commit Graph

218 Commits

Author SHA1 Message Date
Andrew Eikum 0416d2f167 mfplat/tests: Add tests for IMFByteStream position.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-20 12:24:38 +02:00
Nikolay Sivov e3f226fde0 mfplat: Allow NULL size pointer in IMFAttributes::GetAllocatedBlob().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-12 12:34:17 +02:00
Andrew Eikum ca10760d2e mfplat: Allow NULL length pointer in IMFAttributes::GetAllocatedString.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-11 11:38:09 +02:00
Nikolay Sivov b159edc679 mfplat: Fix alignment used by audio buffers created with MFCreateMediaBufferFromMediaType().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 17:34:48 +02:00
Giovanni Mascellani 135bdc21e8 mfplat: Fix buffer reading with IMF2DBuffer::Lock().
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-17 10:48:32 +01:00
Giovanni Mascellani 8adb6d80d5 mfplat/tests: Check that Lock() and Lock2D() see the same content.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-17 10:48:32 +01:00
Giovanni Mascellani 4b36913660 mfplat: Properly align memory allocated by IMF2DBuffer.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:31:14 +01:00
Giovanni Mascellani 0ecde5505c mfplat: Properly align system memory buffers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-10 18:27:44 +01:00
Eric Pouech 02c3bc5fc5 mfplat/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-04 10:06:01 +01:00
Eric Pouech de243ad218 mfplat/tests: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-04 10:06:01 +01:00
Nikolay Sivov 6971e7e021 mfplat: Fix playback rate handling in system time source.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 18:58:36 +01:00
Giovanni Mascellani 3a0eb8bde9 mfplat: Fix MFGetPlaneSize() behavior for invalid formats.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:42 +01:00
Nikolay Sivov ee8ddf37c9 mfplat/tests: Add a separate test function for MFGetPlaneSize().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:42 +01:00
Rémi Bernon 899ae42b20 mf: Handle MESourceSeeked and MEStreamSeeked state change events.
If a session is paused then started again, or if a start position is
provided we wait forever for the source to send a MESourceStarted event,
when it sends a MESourceSeeked instead.

This causes a deadlock in Bright Memory: Infinite as the game then waits
for the Start command to complete, while the session is stuck in the
SESSION_STATE_STARTING_SOURCES state.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:42 +01:00
Nikolay Sivov 381c2a9ae1 mfplat: Implement MFAverageTimePerFrameToFrameRate().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:44:10 +01:00
Fabian Maurer 93eda568b9 mfplat/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 15:57:48 +01:00
Nikolay Sivov 0054435178 mfplat: Implement MFTGetInfo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 16:27:10 +01:00
Nikolay Sivov 1e1e946311 mfplat/tests: Handle ResetDevice() failure when used with D3D12 device.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52165
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 12:05:15 +01:00
Nikolay Sivov 77f5966596 mfplat/tests: Fix test crash on old Windows 10 systems.
MFCreateDXGISurfaceBuffer() rejects unsupported riid argument.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52166
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 10:52:38 +01:00
Nikolay Sivov 4b69a997e9 mfplat/tests: Allocate test callbacks.
It's not safe to use stack variables for async callbacks.
Diagnosed by Bernhard Übelacker.

Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 10:51:57 +01:00
Nikolay Sivov 6f8debb11f mfplat/tests: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 10:51:55 +01:00
Gijs Vermeulen fbce38c5da mfplat/tests: Skip test_d3d11_surface_buffer if D3D11 device can't be created.
Lets tests run successfully on macOS.

Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-06 10:57:23 +01:00
Nikolay Sivov cabc045427 mfplat/tests: Add a test for buffers created for d3d12 resources.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:47 +01:00
Nikolay Sivov f03933fbb7 mfplat/tests: Add some tests for video sample allocator using D3D12 device.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:09:03 +01:00
Nikolay Sivov c568a200bb mfplat/tests: Split video sample allocator tests per device type.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:09:01 +01:00
Esme Povirk 3a7830615a mfplat: Allow deleting open files.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 19:54:17 +01:00
Nikolay Sivov f8b8c3ed41 mfplat/tests: Remove unnecessary check (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:07:19 +02:00
Michael Stefaniuc 2a08366997 mfplat/tests: Avoid cast from COM object to interface.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 10:39:46 +02:00
Nikolay Sivov 600ed80b9b mfplat/allocator: Handle D3D11 resource sharing mode configuration attributes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-30 13:46:34 +02:00
Giovanni Mascellani 997074224a winegstreamer: Expose the MF_MT_VIDEO_ROTATION attribute.
The stricter checks imposed by commit
ac39b313b6, while being valid in general,
require that media source attaches to media types the attributes that
application can request.

This patch exposes the MF_MT_VIDEO_ROTATION attribute, which is for
example requested by Legend of Keepers.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:01:53 +02:00
Nikolay Sivov dddd5a5f5e mfplat/buffer: Fix maximum length for YV12 format.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-08 22:28:44 +02:00
Derek Lesho 7dff5809ef mfplat: Copy all image planes in buffer copies.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:25:05 +02:00
Giovanni Mascellani 8a506ea9b2 winegstreamer: Improve reported supported rates values for the media source.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:00:30 +02:00
Nikolay Sivov 31f4ad064e mfplat: Implement MFInitVideoFormat_RGB().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 17:54:12 +02:00
Nikolay Sivov def07b3f69 mfplat: Implement shared device manager API.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 23:21:27 +02:00
Nikolay Sivov 3e3490be39 mfplat: Add MFllMulDiv().
Implementation is based on similar gstreamer utility code,
adjusted for signed arguments, and with platform optimizations removed.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 23:21:27 +02:00
Francois Gouget 730b30aacf mfplat/tests: Fix an event queue refcounting test on Vista.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:07 +02:00
Connor McAdams 7dc454be85 mfplat: Add MFCreateWaveFormatExFromMFMediaType AudioFormat_Float test.
Add test for MFAudioFormat_Float subtype being passed to
MFCreateWaveFormatExFromMFMediaType.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 21:00:33 +02:00
Michael Stefaniuc 2ef900eb81 mfplat/tests: Test the correct variable.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:09 +02:00
Nikolay Sivov ce37290a5a mfplat: Release queue subscriber on queue release.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Connor McAdams 55228c2b2c mfplat: Add corresponding 'IYUV' type alongside 'I420'.
Add references the 'IYUV' mediatype wherever 'I420' is referenced, as
they are identical.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 19:20:46 +02:00
Nikolay Sivov 8511670b37 mfplat/tests: Add some more tests for IsCompressedFormat().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 12:14:31 +02:00
Nikolay Sivov 0d383fe182 mfplat: Add Lock()/Unlock() for d3d11 buffers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Giovanni Mascellani 767c200f47 winegstreamer: Implement a stub IMFRateControl for the media source.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:48:30 +01:00
Giovanni Mascellani 6e4c7d4dba winegstreamer: Implement a stub IMFRateSupport for the media source.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:48:30 +01:00
Giovanni Mascellani 0a0bf3cf21 winegstreamer: Implement a stub IMFGetService for the media source.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:48:30 +01:00
Nikolay Sivov 49886f0312 mfplat/tests: Add media source rate service tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:48:30 +01:00
Nikolay Sivov d1d1e3f56f rtworkq: Partially implement shared queues.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 17:56:55 +01:00
Nikolay Sivov 01059d5946 mfplat: Implement GetScanline0AndPitch() for d3d11 buffers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 12:48:48 +01:00
Nikolay Sivov 9932a1943b mfplat: Implement Lock2D()/Unlock2D() for d3d11 buffer.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 12:48:48 +01:00