[PATCH 5/7] mfplat/tests: Use synchronous API to get media events.

Nikolay Sivov nsivov at codeweavers.com
Wed Sep 8 07:13:25 CDT 2021



On 9/6/21 6:11 PM, Giovanni Mascellani wrote:
> An asynchronous media event request cannot be cancelled. This means that
> we cannot test for no event firing within a certain timeout, because
> if we did we would leave a pending thread that will spoil future tests.
> Using synchronous APIs and repeated requests, we can wait for an even
> with a certain timeout, without doing damages if the timeout is reached.

I believe we talked about this at some point. Synchronous GetEvent() is
a problem because it will block forever if something goes wrong. I don't
see how doing NO_WAIT a couple of times solves anything, if didn't get
your event doing this batch of calls, it doesn't mean you won't get it
during following tests, unless you use new source instance every time.
Then again, nothing stops you from filtering unrelated events in async
callback, so they don't interfere with tests to follow.

Apparently there are some crashes on Windows 7 still, after 5/7, so hard
to tell if this change helped anything. For pausing, I think some manual
testing with higher level API, like mfplay, and audio-only pipeline for
simplicity, should be enough.



More information about the wine-devel mailing list