Commit Graph

91 Commits

Author SHA1 Message Date
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
Derek Lesho 2fb948e0ea mfreadwrite/reader: Add recognition of ftypemp42 mp4 header.
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-05-18 15:08:05 +02:00
Nikolay Sivov 855c9bd648 mfreadwrite/reader: Consider end-of-stream state when picking stream for MF_SOURCE_READER_ANY_STREAM requests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 17:33:41 +02:00
Derek Lesho a2794b5eae mfreadwrite: Clear STREAM_FLAG_SAMPLE_REQUESTED flag on MEEndOfStream event.
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-04-17 21:05:38 +02:00
Nikolay Sivov f540d1615f mfreadwrite: Add support for seeking in Source Reader.
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 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 42edc14e04 mfreadwrite: Move source shutdown mode to reader flags.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 20:16:33 +02:00
Nikolay Sivov eb927dbb31 mfreadwrite: Handle async reads when flush is in progress.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 20:16:30 +02:00
Nikolay Sivov e81d2cf5bc mfreadwrite: Use default queue so submit flush commands.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 20:16:21 +02:00
Nikolay Sivov 10c6120910 mfreadwrite: Add stream index validation for Flush().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 20:16:00 +02:00
Derek Lesho 8e1761adc0 mfreadwrite: Fix flushing on MF_SOURCE_READER_ALL_STREAMS.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 22:19:40 +02:00
Nikolay Sivov 7186b2c4ab mfreadwrite: Pack stream selection state as flags.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:27:34 +02:00
Nikolay Sivov ce38c5c897 mfreadwrite: Implement MF_SOURCE_READER_ANY_STREAM for async mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:27:31 +02:00
Nikolay Sivov 4e72ea0f4a mfreadwrite: Use single reader lock for all streams.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:27:26 +02:00
Nikolay Sivov c362ce20ef mfreadwrite: Do not call async reader callback if source failed to start up.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 23:10:06 +02:00
Nikolay Sivov 120505ed6b mfreadwrite: Move Sink Writer stubs to separate file.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 21:19:15 +01:00
Nikolay Sivov 88299b0edc mfreadwrite: Forward some source events to async reader callback.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 21:19:11 +01:00
Nikolay Sivov 3ac77317b8 mfreadwrite: Autodetect ftyp(isom) as .mp4.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:25:41 +01:00
Nikolay Sivov 954ed23648 mfreadwrite: Implement reader flushing.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:25:39 +01:00
Nikolay Sivov 7998801440 mfreadwrite: Implement async reader mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:25:37 +01:00
Nikolay Sivov 767744513e mfreadwrite: Request one sample at a time from the stream.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:25:35 +01:00
Nikolay Sivov 63e0b3a71a mfreadwrite: Handle MEStreamTick event in source reader.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:25:32 +01:00
Nikolay Sivov 66de5a8ee8 mfreadwrite: Make pending response reader structure more generic.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:25:30 +01:00
Derek Lesho 915e1c782e mfreadwrite: Pass source samples through decoder as they arrive.
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-03-24 19:43:36 +01:00
Derek Lesho ecf70b83e2 mfreadwrite: Configure stream decoder on SetCurrentMediaType() if necessary.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:32:58 +01: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 9cb55ea30d mfreadwrite: Return earlier on ReadSample() is stream is deselected.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:16:04 +01:00
Nikolay Sivov a095d15769 mfreadwrite: Track source state in reader.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:16:00 +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
Michael Stefaniuc 7bc4e49f11 mfreadwrite: Use wchar string literals instead of temp variables.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-30 09:11:59 +01:00
Nikolay Sivov 9681e8ca58 mfreadwrite: Remove unnecessary typedef.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 12:17:21 +02:00
Nikolay Sivov b182ba882c mfreadwrite: Add MFCreateSinkWriterFromURL() stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 17:44:03 +02:00
Alexandre Julliard 3db44e9940 mfreadwrite: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 08:26:09 +02:00
Nikolay Sivov 10bbe1111b mfreadwrite: Wake waiting threads on stream states changes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:07:04 +02:00
Nikolay Sivov 2be769d648 mfreadwrite: Return sample timestamp from ReadSample().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 18:46:25 +02:00
Nikolay Sivov f8fff8b297 mfreadwrite: Handle some of stream state change events.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:22:01 +02:00
Nikolay Sivov 279f6dbd0c mfreadwrite: Wake also on new streams.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:21:58 +02:00
Nikolay Sivov 56bb596711 mfreadwrite: Handle failure path in GetNativeMediaType().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:21:56 +02: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 fcf8cbfb2a mfreadwrite: Handle MEMediaSample event.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:03:14 +02:00
Nikolay Sivov 002010e31a mfreadwrite: Add a helper to get stream identifier.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:03:12 +02:00
Nikolay Sivov 5dfe477618 mfreadwrite: Add a helper to get associated event object value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:03:10 +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 3e8b14adb3 mfreadwrite: Output warning for uninitialized stream descriptor.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-18 18:47:15 +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