Bernhard Kölbl
f19a0fb6c2
mf: Don't leak sink in session_get_renderer_node_service().
...
Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
2023-06-15 10:03:08 +02:00
Bernhard Kölbl
bea37208fe
mf: Clear queued topologies on session shutdown.
...
Programs might expect objects inside the queued toplogy to be freed,
before they eventually call release on the session itself.
This fixes reference leaks to stored objects in queued topology nodes,
even when IMFMediaSession_Shutdown() was called.
Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
2023-06-15 10:03:06 +02:00
Santino Mazza
a65d0e1fe7
mf/session: Reset presentation flags when session_clear_presentation is called.
...
This prevents hangs when a program sets a new topology after stopping the current
topology, because if we don't reset the flags to 0 the session will not subscribe
to the events of the new topology sources.
2023-05-03 16:48:41 +02:00
Santino Mazza
dd6b2f9ab5
mf/session: Handle error when a source fails to start.
2023-04-11 16:16:51 +02:00
Santino Mazza
74b64eab20
mf/session: Handle errors when subscribing to source's events.
2023-04-11 16:16:50 +02:00
Paul Gofman
9070f0d572
mf/session: Avoid dropping samples delivered from transform in session_request_sample_from_node().
...
session_request_sample() calls session_request_sample_from_node() and increments sink.requests
only if that succeeds. But session_request_sample_from_node() calls session_deliver_sample_to_node()
synchronously for MF_TOPOLOGY_TRANSFORM_NODE if there are output samples available. Then,
if sink.requests is zero before this session_request_sample() call that sample is silently dropped.
2023-02-11 00:04:24 +01:00
Bernhard Kölbl
ae3c9e3272
mf: Set media types for output nodes in the media session.
...
Instead of the topology loader.
2022-11-08 20:07:51 +01:00
Rémi Bernon
49d87a5c92
mf: Add some topology source node checks in IMFMediaSession_SetTopology.
2022-11-08 20:07:51 +01:00
Nikolay Sivov
de1d2223c4
mf/session: Add support for MESessionScrubSampleComplete event.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-03 18:33:09 +01:00
Rémi Bernon
16d975fc12
mf: Avoid clearing media session command list while it is running.
...
This fixes a random crash with mfmediaengine tests, which quickly starts
then shuts down a media session.
2022-10-10 11:03:04 +02:00
Rémi Bernon
e741f49aa3
mf: Notify quality manager of topology change in session_set_topology.
2022-09-02 17:52:51 +02:00
Rémi Bernon
5af9f06e5c
mf: Use the SESSION_FLAG_PENDING_COMMAND to delay further commands.
...
Instead of keeping the command ahead of the command list, making the
SESSION_CMD_END internal command unnecessary.
2022-09-02 17:52:49 +02:00
Rémi Bernon
156aa87c57
mf: Delay media session command processing when presentation is ending.
2022-09-02 17:52:49 +02:00
Rémi Bernon
76f7236b57
mf: Use a dedicated interface for sample allocator ready callbacks.
2022-09-02 17:52:49 +02:00
Rémi Bernon
6d64e40776
mf: Increase min_buffer_size to MF_MT_AUDIO_AVG_BYTES_PER_SECOND.
...
When it is specified. The Resampler transform exposes the block
alignment in its output stream info cbSize, and the session then
otherwise reads data one audio frame at a time.
2022-08-01 15:26:22 +02:00
Nikolay Sivov
048e21d22e
mf/session: Do not request more samples when SA sample becomes available.
...
The issue here is that upstream nodes get their request counters increased
while sink hasn't requested any. This causes desync between sink request
counters and upstream node counters, potentially causing sample drops and
sink waiting forever for samples that will never come. Case like that
is easy to reproduce with mfplay-based player, where occasionally
end-of-presentation condition does not trigger, but new samples are coming in.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-11 11:37:28 +02:00
Nikolay Sivov
27f13a37a0
mf/session: Use correct format specifier for start position.
...
Fixup for 3f84ee1eb6
.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 23:07:20 +02:00
Nikolay Sivov
3f84ee1eb6
mf/session: Trace seek position in Start().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:21:47 +02:00
Nikolay Sivov
9c12ca85e5
mf/session: Initial implementation of playback rate change.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 22:59:53 +01:00
Nikolay Sivov
72afc3f27d
mf/session: Use nameless union for command structure.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 22:59:53 +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
Eric Pouech
ef825f49da
mf: Build without -DWINE_NO_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-02-09 18:37:33 +01:00
Eric Pouech
8b17e3e821
mf: Use correct integral 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-02-03 10:50:31 +01:00
Nikolay Sivov
84f0f11568
mf: Move standard quality manager stub to a separate file.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:55 +01:00
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
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
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
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
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
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
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
Derek Lesho
706fd3dcce
mf/session: Prefer transform-provided sample path.
...
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-04-01 18:34:06 +02:00
Nikolay Sivov
4634fd4ccb
mf/session: Handle MF_TOPONODE_DISABLE_PREROLL on sink nodes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 09:26:28 +02:00