--
v4: winegstreamer: Output compressed samples from the media source.
winegstreamer: Stop on unparsed H.264 in autoplug-continue.
winegstreamer: Explicitly append an H.264 parser for H.264.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5988
As discussed in !8402. @cmccarthy what do you think of this? I think queueing an event right before shutting down the queue is enough to get the media session notified? It won't get the actual event but it will be able to see the MF_E_SHUTDOWN error after calling `EndGetEvent`?
--
v5: include: Remove now unnecessary IMFMediaShutdownNotify interface.
mf/session: Remove now unnecessary IMFMediaShutdownNotify.
winegstreamer: Remove now unnecessary IMFMediaShutdownNotify.
mf/session: Handle an optional MEError event from sources on shutdown.
winegstreamer: Queue an event before shutting down the event queues.
mfsrcsnk: Queue an event before shutting down the event queues.
mfplat/tests: Add more tests for event queue shutdown.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8415
Follow-up to !8184.
This also adds a bunch of helpers for writing media source tests (without involving the mf session) in mfsrcsnk, these could be helpful for more tests of this kind in the future. I'm somewhat unsure as to why we haven't done tests for source behavior so far: while those are plugins, applications rely on a bunch of things in the builtin sources that microsoft provides.
Since this affects both mfsrcsnk and winegstreamer sources, tests should be run both with `HKCU\\Software\\Wine\\MediaFoundation\\DisableGstByteStreamHandler` enabled and disabled. Due to this I figured it'd make sense to implement everything first and then remove the test todo_wine's and the statements rejecting the thin parameter in a single commit ("Allow thinning"). Perhaps this could be solved more nicely by setting the registry key in the tests themselves? I'm unsure if that is something we do in tests, generally.
`MEStreamThinMode` events need to be emitted between the last sample using the outdated thinning parameter and the first sample using the updated thinning parameter. The winegstreamer implementation for this turned out a bit complex, if there is a simpler way to do this please let me know.
Regarding winegstreamer, note that buffers need to be intercepted before the decoder because decoders often discard `GST_BUFFER_FLAG_DELTA_UNIT` flags (which is already annoying in itself - it causes all samples to be marked as `MFSampleExtension_CleanPoint`, this should potentially be worked around in the future). But even besides that, intercepting before the decoder is the "proper" implementation, since the point of thinning is increasing decoding speed by skipping delta frames, tho there are some games that rely on the semantics as well.
--
v2: mfsrcsnk: Emit MEStreamThinMode event.
mfsrcsnk: Move media_source_send_sample.
mfsrcsnk: Implement thinning.
winedmo: Implement thinning.
winedmo: Generate timestamps if missing.
winegstreamer: Implement thinning in media source.
winegstreamer: Implement thinning in wg_parser.
mfsrcsnk/tests: Add tests for thinning.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8505
This prevents a deadlock when the streaming thread is waiting for a buffer in avi_decompressor_sink_Receive(). Reproducible in Earth 2150 - Escape from the Blue Planet (GOG) when trying to skip the intro video and in Commandos 2 - Men of Courage (GOG).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8520
This fixes a looping audio issue during seek in VRChat. The issue is that on Windows the stop request in handled immediately thus the AVPro MFT (which loops the audio) can be immediately flushed. Wine currently waits for a pending sample request to be completed before handling the stop request. As a result, the AVPro MFT loops audio whilst it waits for another sample (or to be flushed).
This MR releases the source CS before calling `wg_parser_stream_get_buffer` so it does not delay the handling of the stop request. This appears to be safe as the Unix side of `wg_parser_stream_get_buffer` has its own set of primitives.
--
v3: winegstreamer: Don't hold lock during wg_parser_stream_get_buffer.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8282
--
v2: setupapi: Support additional built-in properties for device instances.
ntoskrnl.exe/tests: Add tests for built-in properties for PnP device instances.
setupapi: Support getting the instance id and class GUID as in-built properties in SetupDiGetDevicePropertyW and CM_Get_DevNode_Property_ExW.
setupapi/tests: Add tests for getting "in-built" properties from SetupDiGetDevicePropertyW and SetupDiGetDevicePropertyKeys.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8515
The test now consistently fails, probably since the docker image update, with x264enc failing to allocate memory. The failure seem to happen only if some tests are run before it, but that seem to come from memory fragmentation rather than leaks. Except for the leaks fixed here, I couldn't find any other through Valgrind or GStreamer leak checkers.
--
v2: mf/tests: Skip memory-hungry H264 encoder tests on 32bit.
mf/tests: Avoid leaking D3D resources through IMFTrackedSample.
mf/tests: Fix some leaks in transform tests.
winegstreamer: Fix some video decoder media type leaks.
mp3dmod: Avoid uninitialized variable access.
mp3dmod: Fix some media type leaks.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8527