On Thu Mar 20 06:46:14 2025 +0000, Nikolay Sivov wrote:
We have session_flush_nodes() that flushes transforms and sinks, and it's called on SESSION_STATE_RESTARTING_SOURCES. These changes look to scattered to me to make sense, but it should also be possible to test manually in which order things happen, e.g. when, or if, we should flush relative to source restart for example.
I tested in Windows by swapping the vtbl in a sample copier transform, and in the media source. Windows sends `MFT_MESSAGE_COMMAND_FLUSH` after a seeking unpause (before calling `Start()` on the source), but not after unpause at the current position, which is in line with our expectations. Wine sends `MFT_MESSAGE_NOTIFY_START_OF_STREAM` after every start, but Windows only sends it once, before calling `Start()`. That would be a separate MR though. Windows also sends `MFT_MESSAGE_NOTIFY_BEGIN_STREAMING`, which is not necessary according to spec, but we might do that too in case something depends on it.
I changed this MR to use `session_flush_nodes()` when unpausing with a seek. Flush messaging now matches that in Windows.