Commit Graph

1730 Commits

Author SHA1 Message Date
Gijs Vermeulen 5e1753f04d quartz: Close hfile when GetFileSizeEx fails in IFileSourceFilter::Load() (Coverity).
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-08-20 18:47:23 +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 eedbfe0c0d quartz/tests: Fix a test in test_basic_video().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-03 10:22:55 +02:00
Zebediah Figura 1ce2cae3e9 quartz/vmr9: Allow AdviseSurfaceAllocator() to be called multiple times.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47161
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 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 79129db1cd quartz/dsoundrender: Clear the DirectSound buffer on EOS.
"Zero Escape: Nine Hours, Nine Persons, Nine Doors" does not stop or destroy the
graph after it is finished running, so the last second of audio repeats
otherwise.

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 ead0e8e5cf quartz: Correctly convert reference time to REFTIME in IBasicVideo::get_AvgTimePerFrame().
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 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 7f0347bb04 quartz/vmr9: Return E_INVALIDARG if both texture and offscreen flags are passed to AllocateSurfaceHelper().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 12:11:31 +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 a6d539381e quartz/tests: Add tests for IMediaSeeking::GetCurrentPosition() and EC_COMPLETE interaction.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:16:20 +02:00
Zebediah Figura d3ef27f756 quartz/vmr9: Signal state change completion only after PresentImage() has been called.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:16:17 +02:00
Zebediah Figura 9f467402df quartz/dsoundrender: Reimplement the DirectSound renderer directly on top of the strmbase filter.
The DirectSound renderer does a lot of things differently. To a large degree
this is to be expected; it's an audio renderer and therefore needs to buffer
much farther in advance. However, it also doesn't participate in quality
management, doesn't block in Receive(), and has a few other mild differences in
behaviour. Weighing the features implemented by the base renderer against the
quirks necessary for the DirectSound renderer leads me to believe that it would
be easier not to use that framework.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 20:17:19 +02:00
Zebediah Figura b9063c4b7e quartz/vmr9: Render preroll samples.
The documentation specifies that preroll samples shouldn't be rendered, but
the VMR9 renders them anyway.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 20:17:17 +02:00
Zebediah Figura 72f9472492 quartz/videorenderer: Render preroll samples.
The documentation specifies that preroll samples shouldn't be rendered, but
the video renderer renders them anyway.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 20:17:15 +02:00
Zebediah Figura f6f1983be8 quartz/dsoundrender: Do not send quality messages.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:17:01 +02:00
Zebediah Figura 98390d9c2d quartz/tests: Add tests for DirectSound renderer filter state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:59 +02:00
Zebediah Figura aca967b8a5 quartz/tests: Add some tests for allocator negotiation on the DirectSound renderer.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-16 09:30:03 +02:00
Zebediah Figura 52862838db quartz/tests: Add some tests for pin connection on the DirectSound renderer.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-16 09:30:03 +02:00
Zebediah Figura 3d54a77af8 quartz/dsoundrender: Don't check the subtype in DSoundRender_CheckMediaType().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-16 09:30:03 +02:00
Zebediah Figura 1af01ac917 quartz/tests: Add some tests for media types for the DirectSound renderer.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-16 09:30:03 +02:00
Zebediah Figura 88d2afb79c quartz/tests: Test previous filter states.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-16 09:30:03 +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 23ef268663 quartz/tests: Add more tests for asynchronous state change.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 09:43:53 +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 44c0e69137 quartz/vmr9: Auto-show the window when pausing, not when running.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 09:39:30 +02:00
Zebediah Figura 4d580796bc quartz/vmr9: Show the window only if auto-show is enabled.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 09:39:28 +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 f7265d97ee quartz: Try to create the VMR7 in video_renderer_default_create().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:00:19 +02:00
Zebediah Figura 90f8a1b876 quartz/vmr9: Set the destination rect to the whole client area when connecting.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:00:17 +02:00
Zebediah Figura 8725564f68 quartz/videorenderer: Set the destination rect to the whole client area when connecting.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:00:15 +02:00
Zebediah Figura 79c3a24a08 quartz: Don't register the VMR7.
Oddly, Windows doesn't either.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:51:09 +02:00
Zebediah Figura 667af9a2c2 quartz: Change the merit of the default video renderer to 0x800001.
To match Windows.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:51:07 +02:00
Zebediah Figura 8fcdca9dd5 quartz/vmr9: Support YUV formats in the VMR7.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:51:04 +02:00
Zebediah Figura 7595461f77 quartz/vmr9: Return VFW_E_TYPE_NOT_ACCEPTED when connection fails.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 09:51:00 +02:00
Zebediah Figura 6e8b2dcc26 quartz/vmr9: Remove support for 16-bit RGB from the VMR7.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 10:11:51 +02:00
Zebediah Figura 530cb0da4d quartz/vmr9: Remove support for 15-bit RGB from the VMR7.
This was never correct; 15-bit RGB has a biBitCount of 16.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 10:11:48 +02:00
Zebediah Figura ceceba2ec2 quartz/vmr9: Remove support for 8-bit RGB from the VMR7.
This was never correct; 8-bit RGB is always palettized.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 10:11:45 +02:00
Zebediah Figura 339dbc586a quartz/vmr9: Allow connecting with YUV formats.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-20 14:40:57 +02:00
Zebediah Figura 4eb58312d6 quartz/vmr9: Avoid leaking the surface array on connection failure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-20 14:40:57 +02:00
Zebediah Figura c4f92087af quartz/vmr9: Invert only RGB video.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-20 14:40:57 +02:00
Zebediah Figura 46a6dd0824 quartz/vmr9: The source pitch is the width of the Y plane for planar 4:2:0 formats.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-20 14:40:57 +02:00
Zebediah Figura d417802015 quartz/vmr9: Align the source pitch to a multiple of 4.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-20 14:40:57 +02:00
Zebediah Figura 717784efc9 quartz/vmr9: Merge VMR9_SendSampleData() into VMR9_DoRenderSample().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-20 14:40:57 +02:00