Commit Graph

392 Commits

Author SHA1 Message Date
Nikolay Sivov d1662e4beb mf/session: Expose rate control interfaces.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 11:16:39 +01:00
Nikolay Sivov dab54bd849 mf/tests: Add some more tests for session rate control.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 11:16:38 +01:00
Nikolay Sivov f2bb763c9c mf/session: Get rid of some interface pointers casts.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Nikolay Sivov d8bbbfd589 mf/session: Implement IsRateSupported().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 10:49:26 +01:00
Andrew Eikum 43993feb2c mf/session: Forward MR_STREAM_VOLUME_SERVICE requests to SAR node.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-28 17:51:53 +02:00
Alexandre Julliard 088a787a2c makefiles: Make -mno-cygwin the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Nikolay Sivov b14ba22a2c mf/evr: Remove duplicated check in GetStreamSinkCount() (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Francois Gouget bc20705c29 mf: Remove WINAPI on static functions where not needed.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Michael Stefaniuc 3fa19c8c75 mf/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:50 +02:00
Nikolay Sivov d3b9ff2efd mf/tests: Add some tests for EVR stream services.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:57:38 +02:00
Nikolay Sivov b3e321dfd5 mf/session: Fail start requests when no topology was set.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:34 +02:00
Nikolay Sivov 10ba5a90fc mf/session: Add a helper to send events while completing commands.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:34 +02:00
Nikolay Sivov 64e1e4d62d mf/session: Use better failure code for rendering node service requests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:23:13 +02:00
Nikolay Sivov 8b6f276290 mf/session: Forward MR_POLICY_VOLUME_SERVICE service requests to the SAR node.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:23:11 +02:00
Nikolay Sivov 1a4136a9bc mf/evr: Query d3d device manager via MR_VIDEO_RENDER_SERVICE service.
Default presenter responds to MR_VIDEO_ACCELERATION_SERVICE as well, but we'll
have to be compatible to integrate with custom presenters.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 21:12:58 +02:00
Giovanni Mascellani adffa11609 mf/sar: Allow requesting more than a sample per period.
The IAudioClient implementation from both Windows and winepulse.drv
never sets the event more than once per period, which is usually
around 10 ms long. Some codecs produce audio samples shorter than
10 ms, so it is critical that the SAR is able to process more than
a sample per period.

This is not currently the case: a new sample is requested only in
audio_renderer_render, which is executed (at most) once per period.
This results in the SAR not being able to keep up with the audio
client, and eventually underrunning.

With this patch the SAR keeps a count of how many frames are
currently queued, and a new sample is immediately requested if
the internal queue has less than a buffer worth of frames.

This patch fixes audio stuttering problems in the logo videos
of Borderlands 3, Deep Rock Galactic and Mutant Year Zero.

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-07-06 17:49:21 +02:00
Nikolay Sivov 396df44c7b mf/session: Fix typo in a trace message.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-23 20:44:58 +02:00
Nikolay Sivov 7dba45f6ec mf/session: Treat only started/paused/stopped as valid states for start command.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-23 15:14:43 +02:00
Nikolay Sivov 5eec2141dc mf/session: Complete start command when called from invalid state.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-23 15:14:43 +02:00
Rémi Bernon d78e5d999c mf/session: Complete session_start command even if already started.
Seek is not implemented but not completing the command makes pending or
later queued commands to not be executed.

This partially fixes Guilty Gear Strive being stuck on character
selection screen.

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>
2021-06-23 15:14:43 +02:00
Nikolay Sivov 04a26628d1 mf/session: Fix pause command handling from invalid states.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-23 15:14:43 +02:00
Nikolay Sivov cba7616d1a mf/session: Send failed event when clearing topologies from closed state.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-23 15:14:43 +02:00
Giovanni Mascellani da171b8f90 mf/sar: Query for current padding before requesting sample buffer.
According to both MSDN and our impementation, GetBufferSize returns the
size of the buffer, but it doesn't guarantee that all of it is available.
In order to know how much of it is available, the caller must also call
GetCurrentPadding and subtract that number to the buffer size. Failing
to do so might result in GetBuffer returning an error.

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-22 17:57:47 +02:00
Nikolay Sivov bab4f2939e mf: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:01:37 +02:00
Nikolay Sivov 09bb5d949f mf/session: Reset topology status back to READY when stopped.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Nikolay Sivov f0ebd66189 mf/session: Reset per-node end of stream flags when stopped.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Giovanni Mascellani 6a68e345f8 mf/session: Reset END_OF_PRESENTATION flags when stopped.
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-15 20:42:25 +02:00
Nikolay Sivov 0b774df387 mf: Move presentation clock implementation to a separate file.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Giovanni Mascellani bcd2b99d95 mf/session: Fix computing fastest and slowest presentation rates.
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-08 22:28:44 +02:00
Giovanni Mascellani 6ac1cd51bd mf/samplegrabber: Handle paused state.
The following behaviors from Windows are implemented:
 * Transitions from STOPPED to PAUSED are forbidden;
 * Sample requests are only emitted for transitions from STOPPED to
   RUNNING (i.e., not when transitioning from PAUSED);
 * Transition events are emitted again when transitioning from a
   state to the same state, except when such state is PAUSED.

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-03 17:42:19 +02:00
Nikolay Sivov 33ea3fc806 mf/topology: Implement MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES connection method.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 17:53:51 +02:00
Nikolay Sivov 20a1eb3b25 mf/session: Do not drop pending commands when clearing current presentation.
Calling Start() short after SetTopology() has a good chance of getting lost,
because clearing logic will drop all pending commands. This is easy to reproduce
with IMFPMediaPlayer, which works reliably on Windows.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-28 21:53:07 +02:00
Nikolay Sivov 7d51f493b8 mf/evr: Implement Flush() for streams.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Nikolay Sivov 4992fddc00 mf/evr: Post sink marker events.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 18:53:48 +02:00
Nikolay Sivov 9d307bb3c2 mf/evr: Pass stream start/end messages to the mixer.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 18:53:48 +02:00
Alexandre Julliard 5d82baf974 winecrt0: Add a default implementation DllRegisterServer()/DllUnregisterServer().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Alexandre Julliard bd6b53740c winecrt0: Add a default implementation for DllCanUnloadNow().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Nikolay Sivov 51a0cdf52d mf/evr: Add slowest/fastest rate support methods.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 12:20:47 +02:00
Nikolay Sivov 71f8e0d328 mf/evr: Add IMFRateSupport stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 12:20:46 +02:00
Nikolay Sivov 2a6f0a4093 mf/evr: Handle mixer sample requests during sink state transitions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 12:20:44 +02:00
Nikolay Sivov b0118c7c7d mf/evr: Return current device manager as a service.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 12:20:42 +02:00
Nikolay Sivov f1fd0b46f9 mf/tests: Add some tests for EVR sink services.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Nikolay Sivov 0dbbe8da25 mf/evr: Set initial output window size for the presenter.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 20:08:48 +02:00
Nikolay Sivov 0e43ee2746 mf/evr: Return current clock for MR_VIDEO_RENDER_SERVICE requests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 22:39:46 +02:00
Nikolay Sivov 55110df7eb mf/evr: Reinitialize presenter on clock change.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 22:39:46 +02:00
Nikolay Sivov 079c51f692 mf/tests: Fix mediatype instance leak (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:35:11 +02:00
Nikolay Sivov 662095c6b3 mf/session: Forward more events to the application.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:35 +02:00
Nikolay Sivov 6ff7575ae8 mf/session: Forward MEReconnect* events to the application.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:33 +02:00
Nikolay Sivov a2728cdece mf/session: Handle shutdown state on GetService().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:31 +02:00
Nikolay Sivov aaf520cf5e mf/tests: Add some SAR supported interfaces checks.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:28 +02:00