Current code attempts to copy a file to itself. File is not actually copied; instead, a file sharing error is received. This result is ugly and differs from native. Behavior now appears to be the same as native with changes in this MR .
--
v8: cmd/tests: Add tests for COPY to self.
cmd: Don't attempt to copy a file to itself.
cmd: Fix error parsing <NUL in the lexer.
xcopy/tests: Add test for XCOPY to self.
xcopy: Don't attempt to copy a file to itself.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9112
Follow up to !8505. Depends on !5988 to be merged first. Includes commits from both of these MRs.
Note how some sample times are still marked TODO for non-thinned mode, because seemingly after 5988, delta buffers no longer have pts. The corresponding samples are still assigned a bogus sample time, because `has_pts` isn't checked by `media_stream_send_sample`. This is probably something to address once/if 5988 gets merged.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9327
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.
--
v4: mfsrcsnk: Emit MEStreamThinMode event.
mfsrcsnk: Move media_source_send_sample.
mfsrcsnk: Implement thinning.
winedmo: Generate missing timestamps.
mfsrcsnk/tests: Add tests for thinning.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8505
Some applications rely on this behavior.
--
v7: kernel32/tests: Add more tests for waits on pseudo-handles.
ntdll: Reject pseudo-handles in NtWaitForMultipleObjects.
ntdll: Reimplement NtWaitForSingleObject without NtWaitForMultipleObjects.
ntdll: Add is_pseudo_handle() helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9305