Commit Graph

36 Commits

Author SHA1 Message Date
Nikolay Sivov 33208d8a65 mfreadwrite/tests: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 18:15:02 +01:00
Derek Lesho 865bbff0d9 winegstreamer: Ensure that the source reports both PCM and floating point audio formats.
The patch is originally by Derek Lesho, with some changes by
Giovanni Mascellani and Nikolay Sivov.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 20:56:02 +02:00
Giovanni Mascellani ac39b313b6 mfreadwrite: Accept new media type only when format data are equal.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Giovanni Mascellani aef6a2343c mfreadwrite/tests: Test setting a non-native bit depth on the reader.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Giovanni Mascellani c35adbac8f mfreadwrite/tests: Fix testing of a source with one stream.
Even when a lower stream count was requested, most of the implementation
still used ARRAY_SIZE(source->streams) as actual count, so the
implemented behaviour was not the desired one. Also, it implied
undefined behaviour.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Giovanni Mascellani 06366bd16b mfreadwrite: Simplify iteration through streams.
This also fixes a bug happening when the reader has only one stream,
in which case the iteration body was not even executed once.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:48:30 +01:00
Giovanni Mascellani 1a7be75656 mfreadwrite: Unset seeking flag also on SourceStarted and SourceStopped.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Nikolay Sivov beb9c6578a mfreadwrite/reader: Create sample allocator for video streams.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 20:04:59 +01:00
Nikolay Sivov cf4fe13a41 mfreadwrite/reader: Keep a reference to configuration attributes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 20:04:51 +01:00
Nikolay Sivov 1fceb12139 mfreadwrite/reader: Alternate between selected streams for MF_SOURCE_READER_ANY_STREAM requests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 21:05:05 +01:00
Nikolay Sivov 28dcc19dfd mfreadwrite/tests: And some more tests for ReadSample() and failing requests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 16:01:23 +01:00
Derek Lesho 03eaa2cc93 winegstreamer: Implement IMFMediaStream::RequestSample.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-30 22:14:11 +01:00
Derek Lesho 9d7f98ee7f mfreadwrite: Abort ReadSample when unable to request any samples.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-30 22:14:11 +01:00
Derek Lesho e2893c3452 winegstreamer: Implement IMFMediaSource::CreatePresentationDescriptor.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-28 20:36:32 +01:00
Nikolay Sivov 82584160d4 mfreadwrite/tests: Add return value test (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-30 15:51:02 +02:00
Nikolay Sivov 978d497d95 mfreadwrite: Implement MF_SOURCE_READER_ANY_STREAM for synchronous case.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Nikolay Sivov ee7b317293 mfreadwrite: Block recurring flush calls in async mode when flush is pending.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 20:16:35 +02:00
Nikolay Sivov b8a846a5d1 mfreadwrite/tests: Add some missing checks (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Nikolay Sivov 979847e3a2 mfreadwrite/tests: Add a test for reading from delected stream.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Nikolay Sivov 8f0570b3d7 mfreadwrite: Start media source when stream selection changes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Nikolay Sivov 0cd9878a40 mfreadwrite: Use separate helpers for sync/async ReadSample().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:15:55 +01:00
Nikolay Sivov 9d14077e29 mfreadwrite/tests: Add some tests for "any"-stream requests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:50:38 +01:00
Nikolay Sivov 020d2202ea mfreadwrite: Add partial implementation of ReadSample().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:21:54 +02:00
Nikolay Sivov 2ca469f818 mfreadwrite/tests: Add some tests for ReadSample().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:03:16 +02:00
Nikolay Sivov 5b3fdc26b7 mfreadwrite: Duplicate media type returned with GetNativeMediaType().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:03:07 +02:00
Nikolay Sivov dabb0bc25f mfreadwrite/tests: Remove broken test.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 18:52:30 +02:00
Nikolay Sivov 1d2567e03a mfreadwrite/tests: Add some tests for source reader.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Nikolay Sivov ea76c97ccd mfreadwrite/tests: Remove some null checks.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 09:55:22 +02:00
Nikolay Sivov a8a4a8d2a5 mfreadwrite/tests: Add missing return value check (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 09:55:22 +02:00
Nikolay Sivov 13e7887162 mfreadwrite: Subscribe to source events on reader creation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:31:43 +01:00
Jactry Zeng e00bfc4c91 mfplat: Add support for string attributes.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 15:58:02 +01:00
Jactry Zeng c127fab80e mfplat: Add support for integer attribute values.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 15:58:02 +01:00
Nikolay Sivov db8a6df46f mfuuid: Define Media Platform guids.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 17:54:08 +01:00
Nikolay Sivov 4bca67bd47 mfreadwrite/tests: Initialize COM only for tests that need it.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:06:28 +01:00
Nikolay Sivov b91fbb1c28 mfreadwrite: Add MFReadWriteClassFactory stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:06:25 +01:00
Alistair Leslie-Hughes 2e4afec590 mfreadwrite: Add initial tests.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 17:12:13 +01:00