Commit Graph

282 Commits

Author SHA1 Message Date
Gijs Vermeulen 4807a8f588 quartz: Only return S_FALSE in IEnumFilters::Skip() if count goes past the end of the sequence.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28332
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 22:11:17 +01:00
Gijs Vermeulen 68d03ba8bb quartz: Return E_INVALIDARG when cursor is NULL in IEnumFilters::Skip().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 22:07:56 +01:00
Gijs Vermeulen d918c6a482 quartz: Return VFW_E_ENUM_OUT_OF_SYNC in IEnumFilters::Skip() when enum version doesn't match graph version.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 22:07:53 +01:00
Zebediah Figura 627b6b29cd quartz: Correct return value handling in IMediaSeeking::GetDuration().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 21:05:04 +01:00
Zebediah Figura bd1174e125 quartz: Immediately return failure from IFilterGraph::RemoveFilter() if IPin::Disconnect() fails.
Do not try to stop the filter.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Zebediah Figura d19aac6edb quartz: Don't stop the filter in IFilterGraph::RemoveFilter().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Zebediah Figura c44173dd49 quartz: Don't hold an extra reference in async_run_cb().
We don't actually need to, because we'll wait for the callback when stopping the graph.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49907
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 10:52:34 +01:00
Zebediah Figura dfa4c07941 quartz: Treat a filter as supporting IMediaSeeking only if it supports TIME_FORMAT_MEDIA_TIME.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48715
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 23:20:24 +01:00
Zebediah Figura 78c2f08225 quartz: Return the paused timestamp from IMediaSeeking::GetCurrentPosition() if the graph is running asynchronously.
In this case "graph->stream_start" has not yet been set.

This fixes a regression with Blazblue Centralfiction, which incorrectly skipped
a video. The application called IMediaControl::Run() and
IMediaSeeking::GetCurrentPosition() in quick succession, received an incorrect
value for the latter, and consequently believed that the video had already
finished.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 10:50:36 +02:00
Zebediah Figura 0beda8a480 quartz: Reimplement AM_RENDEREX_RENDERTOEXISTINGRENDERERS by forbidding renderers from IFilterMapper2::EnumMatchingFilters().
Primarily to avoid unnecessarily creating filters like the VMR.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:30:09 +02:00
Zebediah Figura 41a9f82870 quartz: Don't pause the graph in IMediaSeeking::SetPositions if it hasn't finished running yet.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49604
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 18:26:18 +02:00
Zebediah Figura 11df839b69 quartz: Allow the arguments to IMediaSeeking::GetPositions() to be NULL.
This allows "UNDER NIGHT IN-BIRTH Exe:Late" to render video.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Zebediah Figura 8c9d60c308 quartz: Return the stop position from GetCurrentPosition() after all filters return EC_COMPLETE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:16:24 +02:00
Zebediah Figura 114832224f quartz: Run the graph asynchronously if necessary.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:44:08 +02:00
Zebediah Figura 9dd5aa17a0 quartz: Return an error code if a filter reports an incorrect state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:44:05 +02:00
Zebediah Figura a8a644c1b8 quartz: Always apply the 200 ms delay to presentation time.
This matches native (actually, native goes one step further and increases the
delay by 100 ms every time the filter is paused). Generally this makes sense,
too, as otherwise a graph that is paused and then resumed will suddenly find
itself 200 ms behind.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:44:03 +02:00
Zebediah Figura 735c8272f5 quartz: Increase the initial streaming delay to 200 ms.
This matches native, and gstreamer can be slow enough to start up that a bit of
extra time would be useful.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:43:59 +02:00
Zebediah Figura df8eabc00a quartz: Poll in IMediaFilter::GetState().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:43:55 +02:00
Zebediah Figura ac0eb57274 quartz: Don't sort the graph in IMediaFilter::GetState().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:43:48 +02:00
Zebediah Figura 0bad952999 quartz: Add more tracing to state change methods.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:43:44 +02:00
Zebediah Figura d93137e2e0 quartz: Get rid of the IFilterGraphImpl typedef.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 09:39:25 +02:00
Zebediah Figura 02485967d6 quartz: Use calloc() in filter_graph_common_create().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 09:39:23 +02:00
Zebediah Figura 15303e5401 quartz: Implement IFilterGraph2::RenderEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35215
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-16 11:25:05 +02:00
Zebediah Figura c603a5bfbc quartz: Combine IGraphBuilder::Render() and IGraphBuilder::Connect() into a single helper.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-16 11:25:00 +02:00
Zebediah Figura cdab25b03a quartz: Try to connect all source pins when autoplugging from the registry.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-16 11:24:38 +02:00
Anton Baskanov ff38669c1a quartz/filtergraph: Always sort filter list before use.
Some applications (e.g. Earth 2150) call IPin::Connect directly
instead of IFilterGraph::ConnectDirect.

Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 19:26:05 +02:00
Anton Baskanov e92c851d95 quartz/filtergraph: Count renderers in IMediaControl::Pause and ::Run.
Some filters (e.g. MediaStreamFilter) can become renderers when they are already in the graph.

Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 10:50:28 +02:00
Anton Baskanov 609a832a56 quartz/filtergraph: Always try to query IMediaSeeking if it's not cached yet.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 10:50:28 +02:00
Gijs Vermeulen 2680b076e3 quartz/filtergraph: Add a stub IVideoFrameStep interface.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42372
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-08 21:01:33 +02:00
Zebediah Figura fe5292bf50 quartz: Implement IMediaControl::StopWhenReady().
This allows The Bunker to exit cleanly.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-19 11:04:43 +02:00
Zebediah Figura 925e5ddefe quartz: Complain louder if a filter reports the wrong state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-19 11:04:41 +02:00
Zebediah Figura 11af7a02bf quartz/filtergraph: Get rid of tracing for outer IUnknown methods.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:09:20 +02:00
Gabriel Ivăncescu 0320f165c8 quartz: Cache IMediaSeeking for filters.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-08 21:47:00 +02:00
Zebediah Figura cb3dc98928 quartz: Implement proper DLL refcounting.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48734
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-13 09:42:49 +01:00
Zebediah Figura 56a6bc87ac quartz: Pass an IUnknown pointer to the object creation functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 10:12:03 +01:00
Zebediah Figura 05a8d45e8a quartz/filtergraph: Iterate over all filters in state change methods.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:23:09 +01:00
Zebediah Figura e0d5e16d7e quartz/filtergraph: Don't check for cyclic connections in IFilterGraph2::Connect().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:23:09 +01:00
Zebediah Figura 98a0c1dac1 quartz/filtergraph: Maintain a topologically sorted list of filters.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:23:09 +01:00
Zebediah Figura 7a392c55d6 quartz/filtergraph: Use IFilterGraph2::ConnectDirect() instead of calling IPin::Connect().
It will need to do some bookkeeping.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:23:09 +01:00
Zebediah Figura 570e0a0d3b quartz/filtergraph: Implement IFilterGraph2::ReconnectEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 09:32:58 +01:00
Zebediah Figura eea01d8e8b quartz: Introduce a helper to trace reference time.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:19:19 +01:00
Zebediah Figura 7770e0bbaf quartz: Use wide character string literals.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 09:27:00 +01:00
Zebediah Figura 228b8b984b quartz: Simplify FilterGraph2_AddFilter().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-22 10:21:07 +01:00
Francois Gouget 79ab06b295 quartz: Fix the name of a type in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:59:11 +01:00
Zebediah Figura 524783dfeb quartz/filtergraph: Clarify stream time tracking.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Zebediah Figura 13dbe644ce quartz/filtergraph: Pause the graph even if AM_SEEKING_NoFlush is used.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Zebediah Figura facbd0585c quartz/filtergraph: Set the current position in IMediaFilter::Stop().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Zebediah Figura 539fa6922b quartz/filtergraph: Store the current position and return it in IMediaSeeking::GetCurrentPosition().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Zebediah Figura 1c0985013e quartz/filtergraph: Iterate filters directly in IMediaSeeking::SetPositions().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Zebediah Figura 0705b0f182 quartz/filtergraph: Correctly handle AM_SEEKING_ReturnTime in IMediaSeeking::SetPositions().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 17:11:43 +02:00