Commit graph

508 commits

Author SHA1 Message Date
Rémi Bernon 177046a137 mf: Use topology_node_get_type_handler in MFGetTopoNodeCurrentType.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-12 22:51:29 +02:00
Rémi Bernon 6c2b8fd3a4 mf: Move and rename topology_loader_get_node_type_handler.
To topology_node_get_type_handler.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-12 22:51:29 +02:00
Rémi Bernon fb513fcc07 mf/tests: Add more topology loader connect method tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-12 22:51:29 +02:00
Rémi Bernon 142e6e7861 mf/tests: Add more topology loader media types tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-12 22:51:29 +02:00
Rémi Bernon 2db8a0a94e mf/tests: Simplify topology loader tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-12 22:51:29 +02:00
Rémi Bernon 7b79e3a87b winegstreamer: Check H264 ProcessOutput sample against actual image size.
Instead of maximum output sample size returned from GetOutputStreamInfo.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-08 22:51:18 +02:00
Rémi Bernon 51bd7f86b6 winegstreamer: Use H264 input media type frame size when specified.
Updating the internal stream format frame size accordingly.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-08 22:51:14 +02:00
Rémi Bernon e15af49029 winegstreamer: Implement H264 SetOutputType by reconfiguring the pipeline.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-08 22:51:14 +02:00
Rémi Bernon 7187965a75 mf/tests: Add todo_wine for newer FFmpeg versions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-07 11:19:54 +02:00
Nikolay Sivov ec097bc1b0 mf/samplegrabber: Consistently check for shutdown flag within a lock.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-05 12:34:03 +02:00
Nikolay Sivov 568b4bc902 mf/sar: Consistently check for shutdown flag within a lock.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-05 12:34:03 +02:00
Nikolay Sivov 5981f2ed73 mf/evr: Consistently check for shutdown flag within a lock.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-05 12:34:03 +02:00
Rémi Bernon 4676273b88 mf: Add error cases for MFGetTopoNodeCurrentType.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-05 12:34:03 +02:00
Rémi Bernon b43e4a54e2 mf/tests: Add more MFGetTopoNodeCurrentType tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-05 12:34:03 +02:00
Rémi Bernon 90696fe884 mf: Uninitialize renderer before creating mixer and presenter.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-29 23:23:41 +02:00
Rémi Bernon 98c9aff086 mf: Release video renderer services before re-initializing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-29 23:23:41 +02:00
Rémi Bernon d21fee129b mf: Avoid leaking nodes in IMFTopoLoader_Load.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-29 23:23:41 +02:00
Rémi Bernon d7c3aac296 mf/tests: Add some missing IMFActivate_ShutdownObject calls.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-29 23:23:41 +02:00
Rémi Bernon e71fe80c3a mf/tests: Add more consistent reference count checks.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-29 23:23:41 +02:00
Rémi Bernon 41184e9de9 winegstreamer: Implement ColorConvertDMO transform.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-16 19:29:10 +02:00
Rémi Bernon 5b178b2fa9 winegstreamer: Register stub ColorConvertDMO transform.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-16 19:29:10 +02:00
Rémi Bernon d33cb57e7d winegstreamer: Implement ResamplerMediaObject transform.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-16 19:29:10 +02:00
Rémi Bernon b6a7a02159 winegstreamer: Register stub ResamplerMediaObject transform.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-16 19:29:10 +02:00
Rémi Bernon c40ab0f9a6 winegstreamer: Support zero-copy in wg_transform_push_data.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-09 10:46:50 +02:00
Rémi Bernon 7a8254fd05 winegstreamer: Enforce frame size in H264 decoder SetOutputType.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 22:32:18 +02:00
Rémi Bernon 9c711ba748 winegstreamer: Support mapping of MF_MT_MINIMUM_DISPLAY_APERTURE.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 22:32:18 +02:00
Rémi Bernon 24266121f1 winegstreamer: Request native buffer alignment using video pool meta.
To support VA-API plugins we need to implement video frame copy as well,
as the plugins simply ignore downstream buffer alignment requirements.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 22:32:16 +02:00
Rémi Bernon 99ce6e87a3 winegstreamer: Expose output media type attributes from the stream format.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-05-25 23:38:30 +02:00
Rémi Bernon 8abbc0096d winegstreamer: Support wg_transform output format change events.
Adding an info structure to the sample when the caps have changed,
removing if once it has been reported to the caller, and optionally
returning the new stream format.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-05-25 23:38:30 +02:00
Rémi Bernon 7adcdb6ff8 winegstreamer: Only filter video caps attributes when format uses 0.
In wg_transform we only want to remove width/height/framerate if the
transform supports format change, and we want to keep the caps fixed
otherwise so we can use gst_caps_is_always_compatible to monitor caps
changes.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-05-25 23:38:30 +02:00
Rémi Bernon f14018f7ed mf/tests: Move WMA decoder aggregation tests from wmadmod.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-18 17:30:33 +02:00
Rémi Bernon b7fa00be65 mf/tests: Update a broken IMFMediaSink_AddStreamSink result check.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-11 11:38:41 +02:00
Rémi Bernon bd527c1946 mf/tests: Tweak topology loader tests results based on the video processor presence.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-11 11:38:41 +02:00
Nikolay Sivov 048e21d22e mf/session: Do not request more samples when SA sample becomes available.
The issue here is that upstream nodes get their request counters increased
while sink hasn't requested any. This causes desync between sink request
counters and upstream node counters, potentially causing sample drops and
sink waiting forever for samples that will never come. Case like that
is easy to reproduce with mfplay-based player, where occasionally
end-of-presentation condition does not trigger, but new samples are coming in.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-11 11:37:28 +02:00
Rémi Bernon 7144bf27b9 winegstreamer: Support the MFSampleExtension_CleanPoint sample attribute.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-06 12:06:50 +02:00
Rémi Bernon d906277844 winegstreamer: Add timestamp and duration to struct wg_sample.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-06 12:06:50 +02:00
Rémi Bernon 573deb17e6 mf/tests: Add tests for the ColorConvertDMO video transform.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 21:27:25 +02:00
Rémi Bernon 1a2cc84686 mf/tests: Check VideoProcessorMFT transform media types.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 21:27:25 +02:00
Rémi Bernon e21fe9e14f mf/tests: Add tests for the ResamplerMediaObject audio transform.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 21:27:25 +02:00
Rémi Bernon 6f49156bbc mf/tests: Add more DMO class name, media type and interface checks.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 21:27:25 +02:00
Rémi Bernon 86bd692456 mf/tests: Check expected class GUID in create_transform.
Calling MFEnum still makes sure the transform match the given input
and output types, and the category.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 21:27:25 +02:00
Rémi Bernon 1e3ae78a69 mf/tests: Expect identical major types for transform info.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 11:29:12 +02:00
Rémi Bernon 29c67fb3ae mf/tests: Add tests changing the H264 decoder output video format.
The h264data.bin source has been re-generated with a static pattern to
avoid differences between the nv12 and i420 frames. The output format
changes apparently drops some decoded frames in a way that's not really
relevant and may make the GStreamer implementation harder:

gst-launch-1.0 videotestsrc num-buffers=60 pattern=smpte100 ! \
    video/x-raw,format=I420,width=82,height=84,framerate=30000/1001 ! \
    videoconvert ! x264enc ! filesink location=dlls/mf/tests/h264data.bin

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 11:29:08 +02:00
Rémi Bernon 6e2ac3b617 mf/tests: Add some IMFTransform output sample attribute tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 11:27:24 +02:00
Rémi Bernon 77c25c86af mf/tests: Use real audio data for WMA encoder / decoder tests.
Instead of silent data. This shows some difference in the FFmpeg decoded
data, with the data delayed by half a buffer, explaining the additional
data we decode.

The audiodata.bin resource has been generated with:

  gst-launch-1.0 audiomixer name=mix ! \
    audio/x-raw,format=F32LE,rate=22050,channels=2 ! \
      filesink location=dlls/winegstreamer/tests/audiodata.bin \
    audiotestsrc freq=400 volume=0.2 num-buffers=1 \
      samplesperbuffer=22050 ! mix. \
    audiotestsrc freq=600 volume=0.2 num-buffers=1 \
      samplesperbuffer=22050 timestamp-offset=20000000 ! mix.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 11:27:21 +02:00
Rémi Bernon ab12039992 mf/tests: Skip todo_wine tests with a goto statement.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 11:27:18 +02:00
Rémi Bernon 4455f0c354 mf/tests: Only check sample data when length matches.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 22:38:58 +02:00
Rémi Bernon e7a3cf7baf mf/tests: Add more tests for the H264 decoder output media type.
Checking that some attributes are kept while some, frame size related,
are enforced by the stream properties.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 22:38:53 +02:00
Rémi Bernon a7c6062315 winegstreamer: Implement H264 decoder GetOutputCurrentType.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 22:38:39 +02:00
Rémi Bernon 3f1036b61b mf/tests: Add some H264 decoder GetOutputCurrentType tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 22:38:34 +02:00