Commit Graph

325 Commits

Author SHA1 Message Date
Zebediah Figura c38fcd19b3 winegstreamer: Explicitly store a GstCaps pointer in the parser_source structure.
gst_pad_get_current_caps() is not guaranteed to return the updated caps when
GST_EVENT_CAPS is handled by the event handler, or even after
gst_pad_event_default(). The actual implementation of gst_pad_send_event() in
fact sets it later. Avoid a potential race condition by using our own caps
pointer.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:36 +01:00
Zebediah Figura 85d81ae9a9 winegstreamer: Avoid leaking GstEvent objects.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:36 +01:00
Zebediah Figura b554086282 winegstreamer: Unify the decodebin parser definitions under the name "decodebin_parser".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:36 +01:00
Zebediah Figura 6f18c09978 winegstreamer: Rename gstdemux to parser.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:36 +01:00
Zebediah Figura b39bbeb9e0 winegstreamer: Rename gstdemux_source to parser_source.
"gstdemux" is not a very specific name, or accurate (it does not always demux,
nor is it the only object which may demux using GStreamer). Also, while it
does not risk colliding with GStreamer definitions as-is (lacking an
underscore), I am inclined to avoid using "gst" or "gstreamer" as a prefix for
our definitions, simply for the sake of clarity.

"parser" is the common term for both DirectShow filters and GStreamer elements
which "drive" the pipeline, i.e. explicitly pull data from upstream and push
data downstream. While it's arguably still not specific enough (i.e. should be
specifically identified as a DirectShow parser), I think that the differing
terminology in Media Foundation (where the counterpart is a "media source")
makes the choice of a shorter name justifiable.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:36 +01:00
Zebediah Figura 20beb7abbe winegstreamer: Don't bother setting the GStreamer pipeline to PLAYING.
It's entirely unnecessary; only renderers and live sources care about this.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 16:14:35 +01:00
Zebediah Figura 3bf543589d winegstreamer: Don't force autoplug_blacklist() onto a Wine thread.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 16:14:33 +01:00
Zebediah Figura c59bd77679 winegstreamer: Avoid using Wine debug functions in autoplug_blacklist().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 16:14:07 +01:00
Zebediah Figura 0d570d63a9 winegstreamer: Get rid of the unknown_type() callback.
This information is already printed by GStreamer via GST_MESSAGE_ERROR.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 16:14:01 +01:00
Anton Baskanov 2752029e92 winegstreamer: Split audio data to fit in the sample buffer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50355
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-01-05 10:19:01 +01:00
Anton Baskanov 291d5a9c10 winegstreamer: Move sample sending to a helper function.
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-01-05 10:18:58 +01:00
Anton Baskanov 472adf6509 winegstreamer: Unmap and unref the buffer and release the sample before returning.
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-01-02 14:37:07 +01:00
Zebediah Figura 6f15875443 winegstreamer: Remove the color matrix setting for the other videoconvert as well.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49535
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-09 10:29:18 +01:00
Zebediah Figura 43a5234bd9 winegstreamer: Clean up a newly allocated buffer on error in bytestream_wrapper_pull().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-07 22:35:29 +01:00
Zebediah Figura 251262a44a Revert "winegstreamer: Avoid performing color matrix conversions in videoconvert.".
This reverts commit fd25ba65e0.

The relevant commit breaks visual correctness in many applications, for the sake
of performance. As such I am rather inclined to revert it for 6.0, especially as
a full solution will probably involve a revert of this patch along with upstream
changes to GStreamer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49535
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-07 11:09:05 +01:00
Derek Lesho f7230992cc winegstreamer: Implement Get(Input/Output)CurrentType functions for audio converter transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 10:18:45 +01:00
Derek Lesho 8771d06b94 winegstreamer: Implement ::SetOutputType for audio conversion transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 10:18:20 +01:00
Derek Lesho c880e5b1a0 winegstreamer: Implement ::SetInputType for audio conversion transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 10:18:18 +01:00
Derek Lesho c7345a51f7 winegstreamer: Implement ::ProcessMessage for audio conversion MFT.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:39 +01:00
Derek Lesho 8e6a4b239a winegstreamer: Implement ::GetOutputAvailableType for audio conversion transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:39 +01:00
Derek Lesho 8aa77a4450 winegstreamer: Implement ::GetInputAvailableType for audio conversion transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:39 +01:00
Derek Lesho 508b124f80 winegstreamer: Register the audio conversion transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:39 +01:00
Derek Lesho 35c0da85ef winegstreamer: Introduce audio conversion transform.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:39 +01:00
Derek Lesho d52f2a0f99 winegstreamer: Use gst_audio_info_to_caps for media type translation.
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>
2020-12-03 20:18:39 +01:00
Nikolay Sivov 8315486d64 winegstreamer: Fix possible leak on error path (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:24 +01:00
Gijs Vermeulen 3bcabb2422 winegstreamer: Initialise type_handler to NULL in media_stream_init_desc().
Otherwise it is used uninitialised if a failure occurs.

Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 21:39:18 +01:00
Zebediah Figura 54d74a053b winegstreamer: Don't query the pad position in IMediaSeeking::SetPositions().
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 1bb7ef1c1a winegstreamer: Return the seeking start time from IMediaSeeking::GetCurrentPosition().
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 ef7dcc7d51 winegstreamer: Don't fail parser_init_stream() if a source pin is not connected.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 19:36:40 +01:00
Zebediah Figura 60814198fe winegstreamer: Don't fail state change methods if the sink pin is not connected.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 19:36:38 +01:00
Derek Lesho 59c55e96f5 winegstreamer: Set MF_PD_DURATION on source's presentation descriptor.
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-11-09 21:38:06 +01:00
Derek Lesho e12b7d2104 winegstreamer: Implement IMFMediaSource::GetCharacteristics.
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-11-09 21:38:06 +01:00
Derek Lesho 964cf9cfce winegstreamer: Require media source's IMFByteStream to be seekable.
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-11-09 21:38:06 +01:00
Derek Lesho 96097c072b winegstreamer: Implement IMFMediaStream::GetMediaSource.
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-11-06 12:00:17 +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 12f1afbffe winegstreamer: Implement IMFMediaSource::Start.
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
Derek Lesho f26e81cf38 winegstreamer: Replace gst_pad_get_current_caps with gst_pad_query_caps.
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>
2020-10-28 20:36:29 +01:00
Derek Lesho 93107c08f5 winegstreamer: Insert audioconvert into decoded audio streams.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 22:25:06 +01:00
Derek Lesho 528e6870ad winegstreamer: Insert videoconvert into decoded-video streams.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 22:24:47 +01:00
Zebediah Figura 63cf882e39 winegstreamer: DirectShow and GStreamer proportions are inverted with respect to each other.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Zebediah Figura 458dfcb95a winegstreamer: Respect integer promotion rules when clamping timestamp + diff.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Anton Baskanov 0542a34c24 winegstreamer: Expose 15/16-bit RGB formats.
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-10-07 10:15:49 +02:00
Anton Baskanov e484056171 winegstreamer: Add a second videoconvert to handle 15/16-bit RGB formats.
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-10-07 10:15:47 +02:00
Anton Baskanov 9afc5ed72e winegstreamer: Fix RGB565 conversion in amt_from_gst_video_info().
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-10-07 10:15:46 +02:00
Anton Baskanov e47b45e2f5 winegstreamer: Use RGB15/16 formats instead of BGR15/16.
Gstreamer stores the first component in the most significant bits, same as DirectShow.

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-10-07 10:15:43 +02:00
Derek Lesho 4228016b0c winegstreamer: Implement IMFMediaStream::GetStreamDescriptor.
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-09-29 12:02:17 +02:00
Derek Lesho 7d4395a00e winegstreamer: Use decodebin to initialize media streams.
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-09-29 12:02:15 +02:00
Derek Lesho a4d6ad6d49 winegstreamer: Add a GstPad wrapping the media source's bytestream.
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-09-29 12:02:12 +02:00
Zebediah Figura 025b3de29c winegstreamer: Avoid leaking a newly allocated buffer on failure in request_buffer_src().
According to the GStreamer documentation, the contents of "buffer" should be
considered undefined on failure, which means that the caller has no way of
freeing a newly allocated buffer.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-25 10:48:40 +02:00