This reverts commit 00211db0d08d60ee9a0e40206bf7cf9b5b88987b, which
introduced a lot of test failures and is taking some time to be
reworked properly.
--
v2: mmdevapi/tests: Mark a wrong error code by IsFormatSupported() as todo.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8662
See also the linked bug report, but the short description is that some wine-only fake device was removed at some point, and winecfg's audio tab was never updated to handle that situation. This MR fixes that problem by using real devices and filling in some data structures to make that work.
I'm marking this as a draft so that others can suggest improvements or alternatives, as I'm not sure if this means of doing it is acceptable to Wine.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58204
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8679
On Thu Jul 31 05:43:48 2025 +0000, Tim Clem wrote:
> Does this need to force `stream-format=byte-stream`? That seems to break
> h.264 decoding on macOS with the [vtdec
> element](https://gstreamer.freedesktop.org/documentation/applemedia/vtdec.h…,
> which only accepts `stream-format=avc`.
I never did get to the bottom of why this was required for `avdec_h264`, after all, GStreamer plays the test file just fine without the need for a `capsfilter` between `h264parse` and `avdec_h264`. So I dug a bit deeper this morning.
It seems it fails under wine as a result of the `GST_EVENT_SEGMENT_DONE` event sent within `complete_drain`. When `h264parse` receives this event, it fixates its caps to `AVC` and then forwards its data buffers to `avdec_h264` without ever providing `codec_data` (which is required for AVC).
Simply removing all the events sent in `complete_drain` fixes this problem but unsurprisingly causes a couple of other test failures (along with one fix!). You can see an example of what I mean here:
https://gitlab.winehq.org/redmcg/wine/-/merge_requests/7
But I'm not sure yet if this is a bug in `h264parse` or in our draining logic.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8532#note_111591