Commit Graph

597 Commits

Author SHA1 Message Date
Derek Lesho 1aa359a100 winegstreamer: Replace source pad interface with GstAppSrc.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Derek Lesho 8b7390f80d winegstreamer: Allocate source media buffers in the PE components.
This necessitates an extra blit for the input data, but this is necessary for
both WoW64 support and an internal rework of the source path in wg_parser to use
GstAppSrc. Since source data is usually compressed and not a bottleneck, we
don't expect this to affect performance.

Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Derek Lesho 67734bfce3 winegstreamer: Duplicate source shutdown path into constructor with leak fixes.
Instead of having mixing together IMFMediaSource::Shutdown() and the
constructors' failure paths, creating confusion about what should be released
where, designate ::Shutdown/::Release to shutting down fully initialized objects
without checks, and keep the partially-created object cleanup code in the
constructor.

Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Zebediah Figura 721b1eb2eb winegstreamer: Properly clean up from failure in wg_parser_connect().
In particular, unset the sink_connected value, and make sure that subsequent
wg_parser_get_read_request calls don't hang.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Zebediah Figura 830efe873a winegstreamer: Factor out more of the init_gst callback into wg_parser_connect().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Zebediah Figura d90ab0805f winegstreamer: Always return S_FALSE from DllCanUnloadNow().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 09:34:28 +02:00
Paul Gofman f49b8602e3 winegstreamer: Create media source read thread after initializing wg_parser.
Fixes race condition as wg_parser is used right away in the created
thread.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 18:27:42 +02:00
Zebediah Figura ddf3b93ac1 winegstreamer: Don't try to convert duration from byte length.
This effectively reverts 613446d018.

Duration and convert queries, in general, appear to be handled by the first
upstream element that knows how. If two different elements respond to each
query, we may treat the byte duration of the whole file as if it were the
duration of a single stream, or treat an undecoded byte duration as if it were a
decoded byte duration.

The aforementioned commit was written in order to ensure that we receive a valid
duration for test.mp3 in quartz_test.exe, and is obviated by the previous
patches which retry duration queries until successful (or EOS).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51126
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:16:47 +02:00
Anton Baskanov e0a281102b winegstreamer: Continue polling if duration is unavailable after duration-changed.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:16:44 +02:00
Anton Baskanov 8efac25a0a winegstreamer: Always wait for duration-changed when querying for duration.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51126
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:16:42 +02:00
Anton Baskanov 08041f9cb4 winegstreamer: Inline query_duration() into wg_parser_connect().
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:16:39 +02:00
Nikolay Sivov 04ebeff225 winegstreamer: Use consistent trace format for MF objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:30:19 +02:00
Zebediah Figura 82c3205c26 winegstreamer: Switch to the quartz debug channel.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:16:12 +02:00
Zebediah Figura e36e384cb4 winegstreamer: Avoid using Wine debugging functions at all in the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:16:10 +02:00
Zebediah Figura 4d2c94e1dd winegstreamer: Factor out create_element().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:16:06 +02:00
Zebediah Figura bcc19e88fb winegstreamer: Avoid using WARN_ON from a GStreamer callback.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:16:03 +02:00
Giovanni Mascellani a9db6c050d winegstreamer: Set MF_MT_ALL_SAMPLES_INDEPENDENT for audio types.
The stricter checks imposed by commit
ac39b313b6, while being valid in general,
require that media source attaches to media types the attributes that
application can request.

This patch exposes the MF_MT_ALL_SAMPLES_INDEPENDENT attribute to audio
streams (similarly to what is already done for video streams), which is
for example requested by The Medium.

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-07-06 17:49:12 +02:00
Zebediah Figura 5b156eecba winegstreamer: Change the formatting of error and warning messages a bit.
The TestBot treats anything containing the string ": error: " as a compiler
error. It may be possible for the TestBot to be smarter, but it seems easier
just to tweak winegstreamer.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 22:43:21 +02:00
Giovanni Mascellani 997074224a winegstreamer: Expose the MF_MT_VIDEO_ROTATION attribute.
The stricter checks imposed by commit
ac39b313b6, while being valid in general,
require that media source attaches to media types the attributes that
application can request.

This patch exposes the MF_MT_VIDEO_ROTATION attribute, which is for
example requested by Legend of Keepers.

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-06-17 20:01:53 +02:00
Nikolay Sivov 457258e7df winegstreamer: Let async command handle request token.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Giovanni Mascellani 8a506ea9b2 winegstreamer: Improve reported supported rates values for the media source.
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-06-04 20:00:30 +02:00
Nikolay Sivov 0393a0e2b5 winegstreamer: Fix assert condition.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:00:30 +02:00
Zebediah Figura 3c7bcb830f winegstreamer: Make the file_size field of struct parser into a local variable.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 09:56:33 +02:00
Zebediah Figura 2e26556643 winegstreamer: Shut down the read thread before releasing the IMFByteStream.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 09:56:31 +02:00
Giovanni Mascellani 02325ccb67 winegstreamer: Advertise support for thinned or reverse playback.
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-17 18:49:09 +02:00
Zebediah Figura cf02b0bdfa winegstreamer: Use a static buffer to enumerate stream types in media_stream_init_desc().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02: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
Alexandre Julliard 1331a8ea0f winecrt0: Determine the registration module handle directly in __wine_register_resources().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Connor McAdams 2c5314d007 winegstreamer: Delay duration query until caps have been acquired.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 10:34:18 +02:00
Anton Baskanov d7fecebe93 winegstreamer: Allow setting the stop position to the stream duration.
Since we no longer stop the GStreamer pipeline, it does not reset the stop position for us. Fixes a hang during intro video playback in RC Cars.

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>
2021-04-26 21:34:02 +02:00
Anton Baskanov ad5342b87c winegstreamer: Fix integer overflow in scale_uint64.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 21:34:02 +02:00
Anton Baskanov d57d8bbc35 winegstreamer: Add missing RGB16 format to wg_video_format_from_gst.
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>
2021-04-12 19:33:51 +02:00
Nikolay Sivov 800103d127 winegstreamer: Set MF_MT_ALL_SAMPLES_INDEPENDENT for video types.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 12:14:31 +02:00
Connor McAdams aa20f3c084 winegstreamer: Add corresponding 'IYUV' type alongside 'I420'.
Add references the 'IYUV' mediatype wherever 'I420' is referenced, as
they are identical.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Giovanni Mascellani 767c200f47 winegstreamer: Implement a stub IMFRateControl for the media source.
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 6e4c7d4dba winegstreamer: Implement a stub IMFRateSupport for the media source.
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 0a0bf3cf21 winegstreamer: Implement a stub IMFGetService for the media source.
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
Jacek Caban ab044d1b9f winegstreamer: Use nameless unions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:48:21 +01:00
Jacek Caban b39b9eea39 include: Don't default to WINE_NO_NAMELESS_EXTENSION for Wine build.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 21:48:38 +01:00
Andrew Eikum 9152bdcef3 winegstreamer: Set specific large buffer sizes for decodebin.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Zebediah Figura 5e222064ab winegstreamer: Convert timestamps to running time in wg_parser_stream_notify_qos().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50733
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 10:12:38 +01:00
Zebediah Figura 11612cd3a8 winegstreamer: Don't invert the proportion twice in wg_parser_stream_notify_qos().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 10:12:36 +01:00
Nikolay Sivov 773329e3bb winegstreamer: Remove attributes pointer from static registration data.
We should store actual key/value pairs in there, if we ever needed this part of
registration information.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 20:35:40 +01:00
Zebediah Figura 1649389edc winegstreamer: Rename gst_base_src_perform_seek() to src_perform_seek().
Avoid polluting the GStreamer namespace.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Zebediah Figura 2492bda6e1 winegstreamer: Don't make the pad caps writable in pad_added_cb().
There is no need.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Zebediah Figura e4922b930b winegstreamer: Inline init_new_decoded_pad() into pad_added_cb().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Zebediah Figura 2741b6ca33 winegstreamer: Rename some callbacks to explicitly show they are callbacks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Zebediah Figura 39c97f4c29 winegstreamer: Rename some callbacks to more closely match GStreamer terminology.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Zebediah Figura da28c6bb4b winegstreamer: Link to strmbase.
This reverts abdaa6f21f.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 09:58:31 +01:00
Zebediah Figura 3f5df70ec6 winegstreamer: Rename gstdemux.c to quartz_parser.c.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 09:57:39 +01:00
Zebediah Figura 0058ab07e5 winegstreamer: Don't export DllMain().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 09:56:55 +01:00
Zebediah Figura 18b6115d53 winegstreamer: Remove some redundant includes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 09:56:47 +01:00
Zebediah Figura 672272e95a winegstreamer: Use malloc() instead of HeapAlloc().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 09:56:31 +01:00
Zebediah Figura 1fb0b500b4 winegstreamer: Use wide-char string literals.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 09:56:16 +01:00
Nikolay Sivov e162e7ea7f winegstreamer: Fully initialize MF object creation context.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 19:59:20 +01:00
Zebediah Figura 8abcae5475 winegstreamer: Build with msvcrt.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:08:10 +01:00
Zebediah Figura 9638a5092e winegstreamer: Use ULONGLONG instead of uint64_t in Unix library interface structures.
The latter has inconsistent alignment between the Unix and Win32 sides.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:08:05 +01:00
Zebediah Figura f9c43fc9fa winegstreamer: Reimplement the media source on top of the wg_parser object.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 09:24:44 +01:00
Derek Lesho 6f785fa7ce winegstreamer: Implement IMFMediaSource::Stop.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 09:24:41 +01:00
Zebediah Figura 8697c6c0db winegstreamer: Explicitly translate the channel mask.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 09:24:36 +01:00
Zebediah Figura b44d3a3908 winegstreamer: Manage our own thread for read requests in the media source.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 09:24:33 +01:00
Zebediah Figura 38330678a0 winegstreamer: Manually track read offsets in the media source.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 09:24:30 +01:00
Zebediah Figura 51f1ab47a7 winegstreamer: Move the wg_parser and wg_parser_stream definitions to wg_parser.c.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:10:55 +01:00
Zebediah Figura 13ca106693 winegstreamer: Avoid accessing "parser->container" from gstdemux.c.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:10:53 +01:00
Zebediah Figura 82d4fa9f96 winegstreamer: Access the stream duration through a Unix library function.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:10:51 +01:00
Zebediah Figura 9a6aa56cd8 winegstreamer: Map the read buffer in the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:10:49 +01:00
Zebediah Figura 491945ee41 winegstreamer: Move the EOS handling from read_buffer() to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:10:47 +01:00
Zebediah Figura e9800b1cbc winegstreamer: Move GST_BUFFER_OFFSET_NONE handling to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:10:45 +01:00
Zebediah Figura 86333a20c8 winegstreamer: Retrieve and complete read requests through Unix library functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:11:09 +01:00
Zebediah Figura 1babfe7d49 winegstreamer: Avoid using gst_util_uint64_scale() in send_sample().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:11:07 +01:00
Zebediah Figura e848a00d26 winegstreamer: Map the output sample buffer in the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:11:06 +01:00
Zebediah Figura e103c75ab3 winegstreamer: Use wg_parser_stream_seek() in GST_ChangeRate().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:11:04 +01:00
Zebediah Figura 5167b8c39a winegstreamer: Move videoflip configuration to wg_parser_stream_set_current_format().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:11:04 +01:00
Zebediah Figura ccc6c98075 winegstreamer: Move seeking to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:10:52 +01:00
Zebediah Figura 8547ee3513 winegstreamer: Move QoS notification to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:52:34 +01:00
Zebediah Figura 7a5224beb6 winegstreamer: Move wg_parser flushing to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:52:32 +01:00
Zebediah Figura aa695e2125 winegstreamer: Move get_stream_event() to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:52:29 +01:00
Zebediah Figura 563ccc4df5 winegstreamer: Set the stream's current format and connected state through Unix library functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:52:26 +01:00
Zebediah Figura 442c9d43c8 winegstreamer: Retrieve the preferred format through a Unix library function.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:52:20 +01:00
Zebediah Figura 408c178d11 winegstreamer: Do not compare FPS in wg_format_compare().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50667
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 10:55:40 +01:00
Zebediah Figura f98722fe3b winegstreamer: Retrieve wg_parser streams through Unix library functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 10:55:12 +01:00
Zebediah Figura 507ba18d08 winegstreamer: Move wg_parser sink disconnection code to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 10:55:05 +01:00
Zebediah Figura 6c67a0a6be winegstreamer: Move GST_Connect() to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 10:54:58 +01:00
Zebediah Figura c5c40f2260 winegstreamer: Move filter initialization out of GST_Connect().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 10:54:47 +01:00
Zebediah Figura c3d76ec9d6 winegstreamer: Pass the wg_parser object to gst_bus_set_sync_handler().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 10:54:43 +01:00
Zebediah Figura 9147fefbb2 winegstreamer: Move wg_parser_destroy() to the Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 14:51:59 +01:00
Zebediah Figura 10dde32dc6 winegstreamer: Move GStreamer library initialization to __wine_init_unix_lib().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 14:51:57 +01:00
Zebediah Figura dbd927f4ad winegstreamer: Move wg_parser object creation to a new Unix library.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 14:51:55 +01:00
Zebediah Figura db8746ffe9 winegstreamer: Separate parser and filter initialization.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 14:51:53 +01:00
Zebediah Figura 2d8add43a7 winegstreamer: Don't force existing_new_pad() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 10:11:32 +01:00
Zebediah Figura 070612814b winegstreamer: Avoid using Wine debug functions in existing_new_pad().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 10:11:30 +01:00
Zebediah Figura 68f0cc4a7b winegstreamer: Pass a wg_parser pointer to signal callbacks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 10:11:28 +01:00
Zebediah Figura c46505c0ab winegstreamer: Defer source pin creation until after all pads are exposed.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 10:11:25 +01:00
Zebediah Figura fd7c07ea34 winegstreamer: Separate parser_source and wg_parser_stream allocation.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 10:11:23 +01:00
Zebediah Figura d5a2599140 winegstreamer: Store the wg_parser_stream pointers as our sink pads' private data.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 10:11:21 +01:00
Zebediah Figura d355fa7988 winegstreamer: Don't force query_sink() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 09:14:01 +01:00
Zebediah Figura 29cea50d27 winegstreamer: Avoid using Wine debug functions in query_sink().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 09:13:59 +01:00
Zebediah Figura d028217a56 winegstreamer: Use amt_to_wg_format() in decodebin_parser_source_query_accept().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 09:13:57 +01:00
Zebediah Figura f0a0b9404e winegstreamer: Use wg_format_to_caps() in GST_QUERY_CAPS.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 09:13:54 +01:00
Zebediah Figura 897800fd44 winegstreamer: Compare wg_format structures in GST_QUERY_ACCEPT_CAPS.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 09:13:52 +01:00
Zebediah Figura 5bff63621e winegstreamer: Store the current stream format in the wg_parser_stream structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 09:13:49 +01:00
Zebediah Figura dfeafc7417 winegstreamer: Handle MPEG-1 audio formats in amt_to_wg_format().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 09:13:43 +01:00
Zebediah Figura 5a3dad108b winegstreamer: Store the preferred stream format as a wg_format structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 11:13:23 +01:00
Zebediah Figura 7fa0855fa1 winegstreamer: Use struct wg_format to convert from AM_MEDIA_TYPE to GstCaps.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 11:13:16 +01:00
Zebediah Figura fb096d54a8 winegstreamer: Introduce an intermediate media format structure.
The fundamental idea here is to provide a type which can be used in the unixlib
interface. Obviously GstCaps can't be used from PE, and while AM_MEDIA_TYPE can
in theory be used from the Unix library, allocation of the format block makes
things a little tricky. Moreover, we'd ideally like to use the same backend for
DirectShow and Media Foundation, and while it wouldn't be a problem currently,
in general AM_MEDIA_TYPE is not quite expressive enough to translate from
GstCaps to IMFMediaType, and the latter can't be used from the Unix library.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 11:13:13 +01:00
Zebediah Figura a3e7cfd4d7 winegstreamer: Do not use gst_segment_to_running_time().
It fails if samples lie outside of the current segment, but DirectShow filters
(in particular, the native AVI splitter) will happily set timestamps outside of
the current segment.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 11:13:04 +01:00
Zebediah Figura 41e53a122d winegstreamer: Factor out free_stream().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00
Zebediah Figura 45ebc26dcf winegstreamer: Use the "streams" array in wg_parser code.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00
Zebediah Figura 42dc1e93b2 winegstreamer: Store the stream duration also in the wg_parser_stream structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00
Zebediah Figura a03f7350b3 winegstreamer: Store the wg_parser_stream pointers also in struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00
Zebediah Figura a2ce39394e winegstreamer: Store the wg_parser pointer as our source pad's private data.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00
Zebediah Figura c0b087e4e9 winegstreamer: Reset the push offset in parser_init_stream().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:01 +01:00
Zebediah Figura 87daa41eb3 winegstreamer: Avoid accessing the DirectShow peer from GStreamer callbacks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:01 +01:00
Zebediah Figura cb7fb16147 winegstreamer: Move the "flushing" field to struct wg_parser_stream.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:01 +01:00
Zebediah Figura c711724074 winegstreamer: Move the "eos" field to struct wg_parser_stream.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:01 +01:00
Zebediah Figura 763806843b winegstreamer: Move the stream event fields to struct wg_parser_stream.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:01 +01:00
Zebediah Figura 7fe5f2755d winegstreamer: Move the "caps" field to struct wg_parser_stream.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:13:48 +01:00
Zebediah Figura c6d85fc217 winegstreamer: Move the "flip" field to struct wg_parser_stream.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:13:46 +01:00
Zebediah Figura b00e25a2e8 winegstreamer: Move the GstPad fields to struct wg_parser_stream.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:13:44 +01:00
Zebediah Figura 457f3a96c2 winegstreamer: Move the "segment" field of struct parser_source to a new "wg_parser_stream" object.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:13:41 +01:00
Zebediah Figura 84b64da8fc winegstreamer: Move the "mutex" field to struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:13:36 +01:00
Zebediah Figura cd27f3ca00 winegstreamer: Duplicate the "sink_connected" field in struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:00:43 +01:00
Zebediah Figura 5736cb23ac winegstreamer: Move the "flushing" field to struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:00:40 +01:00
Zebediah Figura 6e5af4fc7d winegstreamer: Move the read request fields to struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:00:38 +01:00
Zebediah Figura eb37e5ba6b winegstreamer: Move the playback initialization fields to struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:00:34 +01:00
Zebediah Figura 8a15c811ba winegstreamer: Move the "push_thread" field to struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:00:31 +01:00
Zebediah Figura cde11289bf winegstreamer: Duplicate the file size into struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 10:50:52 +01:00
Zebediah Figura c45d4bcec3 winegstreamer: Move the push offset tracking fields to struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 10:50:50 +01:00
Zebediah Figura 69bd54a53d winegstreamer: Move the "my_src" and "their_sink" fields to struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 10:50:48 +01:00
Zebediah Figura d4bb0c4639 winegstreamer: Move the "element" field to struct wg_parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 10:50:46 +01:00
Zebediah Figura f5969e1e02 winegstreamer: Move the "bus" field of struct parser to a new "wg_parser" object.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 10:50:44 +01:00
Zebediah Figura 8c13dde595 winegstreamer: Don't force activate_mode() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 10:17:00 +01:00
Zebediah Figura 1dc7015cdb winegstreamer: Avoid using Wine debug functions in activate_mode().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 10:16:58 +01:00
Zebediah Figura 8e84f16066 winegstreamer: Don't grab filter_cs in activate_push().
There's no good reason to do this; we're not protecting anything that isn't
already protected by GStreamer locks.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 10:16:55 +01:00
Zebediah Figura 5482400a4e winegstreamer: Do not flush the upstream source pin in activate_push().
We don't do this in pull mode (and in general never have; avidemux and wavparse
are two examples of GStreamer elements that don't flush the upstream pad when
deactivating).

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 10:16:52 +01:00
Zebediah Figura ed3ed4d8ab winegstreamer: Make push_data() into a POSIX thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 09:42:05 +01:00
Zebediah Figura f7825f81b6 winegstreamer: Avoid using Wine debug functions in push_data().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 09:42:03 +01:00
Zebediah Figura b5f0b7901a winegstreamer: Use request_buffer_src() in push_data().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 09:42:01 +01:00
Zebediah Figura 4a4ac2730e winegstreamer: Use the "filesize" field in push_data().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 09:41:58 +01:00
Zebediah Figura ad6a3e7534 winegstreamer: Don't force request_buffer_src() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 10:22:13 +01:00
Zebediah Figura 3b885fb5f3 winegstreamer: Manage our own thread for read requests.
Synchronization around flushing (on both sides) is tricky here, and the
solution used by this patch means that a "kernel" thread can be blocked on a
"user" thread. However, since it's not a real kernel thread and can't bring
down the rest of the "kernel", I don't think this is a concern.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 10:22:06 +01:00
Zebediah Figura 2e41e3be57 winegstreamer: Don't force removed_decoded_pad() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 10:22:03 +01:00
Zebediah Figura cfce5054ac winegstreamer: Avoid using Wine debug functions in removed_decoded_pad().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 10:22:00 +01:00
Zebediah Figura 6e21a8cc31 winegstreamer: Don't force query_function() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 09:01:16 +01:00
Zebediah Figura e9a1366028 winegstreamer: Avoid using Wine debugging functions in query_function().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 09:01:12 +01:00
Zebediah Figura 1655dd4593 winegstreamer: Don't force event_src() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 09:01:08 +01:00
Zebediah Figura 3ed270206a winegstreamer: Avoid using Wine debugging functions in event_src().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 09:01:04 +01:00
Zebediah Figura 72a05ba397 winegstreamer: Don't force event_sink() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 09:00:58 +01:00
Zebediah Figura 16898714b1 winegstreamer: Avoid using Wine debug functions in event_sink().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 09:00:54 +01:00
Zebediah Figura 3d7486d66b winegstreamer: Don't force got_data_sink() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-25 09:59:12 +01:00