Commit Graph

229 Commits

Author SHA1 Message Date
Zebediah Figura 540f2983a9 winegstreamer: Decommit the source allocator when cleaning up the stream.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:23:09 +01:00
Zebediah Figura 6745afd81d winegstreamer: Negotiate allocators per source pin.
In particular, pass the correct buffer size for the format we have chosen.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48570
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 20:49:19 +01:00
Zebediah Figura c90a36e38c winegstreamer: Read samples synchronously in push_data().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 20:49:16 +01:00
Zebediah Figura c366415360 strmbase: Merge enumpins.c into filter.c.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 09:45:56 +01:00
Zebediah Figura d263c4a366 winegstreamer: Get rid of the mp3 decoder.
In the unlikely event that we are hotplugging not from an IAsyncReader, we
already have the ACM wrapper and l3codeca.acm available to do the same thing.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 09:45:32 +01:00
Zebediah Figura 943b6564f5 winegstreamer: Get rid of the AudioConvert filter.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:25:38 +01:00
Zebediah Figura 1052d5cfb1 winegstreamer: Allow converting to 16-bit 2-channel PCM within the splitter filter.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:25:34 +01:00
Zebediah Figura 11b30ffc07 winegstreamer: Append an audioconvert element to raw audio streams.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:25:31 +01:00
Zebediah Figura aa7017510d winegstreamer: Correctly represent non-32-bit float types.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:25:27 +01:00
Zebediah Figura ec0d6323d0 winegstreamer: Report MEDIASUBTYPE_IEEE_FLOAT for float types.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:25:23 +01:00
Zebediah Figura 841502993f winegstreamer: Get rid of the YUV-to-(A)RGB converters.
This is handled by the splitter filter now.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:39:20 +01:00
Zebediah Figura f5a1e2bd87 winegstreamer: Support converting color spaces within the splitter filter.
The idea being firstly that it's more efficient to handle this all within one
GStreamer pipeline, especially since we may need to be converting color
spaces anyway (for videoflip), and secondly that this renders obsolete the
color space converter transform filters in gsttffilter.c.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:39:14 +01:00
Zebediah Figura 847d8970fe winegstreamer: Split the implementation of source_get_media_type().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:39:11 +01:00
Zebediah Figura 87e02cb5fc winegstreamer: Implement IPin::QueryAccept() for the MPEG splitter source.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:39:09 +01:00
Zebediah Figura 0401213770 winegstreamer: Implement IPin::QueryAccept() for the AVI splitter source.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 14:39:06 +01:00
Zebediah Figura 71967608a3 winegstreamer: Implement IPin::QueryAccept() for the WAVE parser source.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 17:23:01 +01:00
Zebediah Figura 0a9acdefe8 winegstreamer: Fix pin enumeration order for the AVI and WAVE parsers.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 17:22:56 +01:00
Zebediah Figura 0897293b99 winegstreamer: Rename the "cStreams" element of struct gstdemux to "source_count".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 17:22:54 +01:00
Zebediah Figura a9d6341290 winegstreamer: Rename the "ppPins" element of struct gstdemux to "sources".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 17:22:52 +01:00
Zebediah Figura a191a0c23a winegstreamer: Catch errors while waiting for pin connection.
In the event that the user is missing GStreamer plugins this may allow the
program to terminate gracefully rather than hanging in the init_gst() callback.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 19:16:02 +01:00
Zebediah Figura 826e2508e5 winegstreamer: Recognize the "video/x-cinepak" type.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39809
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-23 20:13:23 +01:00
Zebediah Figura 15e3adab4c winegstreamer: Clear the "reader" and "allocator" fields if connection fails.
This fixes a regression introduced by dafe81dfcb.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 11:57:33 +01:00
Zebediah Figura a6aea1cecd strmbase: Get rid of the "vtbl" parameter to strmbase_sink_init().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:57:00 +01:00
Zebediah Figura 5d2c3de55d winegstreamer: Use base sink streaming methods.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:57:00 +01:00
Zebediah Figura dafe81dfcb winegstreamer: Use base sink connection methods.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Zebediah Figura 02cb76c40c winegstreamer: Store the sink as a strmbase_sink structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Zebediah Figura 264c539ed6 strmbase: Combine the SetMediaType() and CompleteConnect() callbacks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 20:59:19 +01:00
Zebediah Figura 675e061142 strmbase: Get rid of the "vtbl" argument to strmbase_source_init().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:45 +01:00
Zebediah Figura 5c83561b33 winegstreamer: Use BasePinImpl_QueryInterface().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:45 +01:00
Zebediah Figura 18f561a783 strmbase: Get rid of the "vtbl" parameter to strmbase_filter_init().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-05 23:36:16 +01:00
Zebediah Figura 60680651d7 winegstreamer: Fix the timeout passed to gst_element_get_state().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 09:36:15 +01:00
Zebediah Figura 90ebc7e33b winegstreamer: Use strmbase state change methods.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Zebediah Figura 078ac0f764 winegstreamer: Also wait for the no-more-pads signal when pausing the filter.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Zebediah Figura 7a0d963df3 winegstreamer: Don't hold the filter lock from the pad-added or pad-removed callbacks.
These may be called from the streaming thread, so it's not safe to do so.

Nor does it seem necessary. We expect that no streaming thread should ever
call methods on our pad or pin, and as long as we hold the filter lock and
wait for the no-more-pads signal when connecting or starting the stream, we
cannot race with application threads.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Zebediah Figura 4008aba453 strmbase: Use a separate critical section for the SourceSeeking structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Zebediah Figura bdc09fb8b4 winegstreamer/gsttffilter: Don't drop the streaming lock in Gstreamer_transform_ProcessEnd().
This sort of reverts 096da45036. The deadlock
mentioned there is not spelled out in detail, but likely results from the
streaming thread trying to acquire the filter lock while a main thread which
is holding the filter lock waits for the streaming thread to finish. However,
DirectShow documentation (and manual testing) suggests that the correct way
to avoid this problem is simply to never take the filter lock from the
streaming thread. Since we currently don't do this anymore, it should be safe
to reinstate this lock.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 10:42:13 +01:00
Zebediah Figura 3a7f54947e strmbase/transform: Hold the streaming lock for the entirety of Receive().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 10:42:10 +01:00
Zebediah Figura 1b3d163208 winegstreamer/gsttffilter: Call IMemInputPin::Receive() directly.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 22:49:03 +01:00
Zebediah Figura bd83b11a23 strmbase: Return a strmbase_pin pointer from the filter_get_pin() callback.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Zebediah Figura 03f0479c34 strmbase: Rename the "mtCurrent" field of struct strmbase_pin to "mt".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 09:23:09 +01:00
Zebediah Figura 6c8cb0abac winegstreamer: Use strmbase_dump_media_type() where appropriate.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 10:00:58 +02:00
Zebediah Figura b3e325f36b strmbase: Move tracking of the stream start time to the renderer.
Only renderers should ever need to care about this.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-04 23:16:25 +02:00
Zebediah Figura f65cb89cbc winegstreamer: Initialize COM on the callback dispatcher thread.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47822
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:25 +02:00
Zebediah Figura c7a447b67a strmbase: Rename "pConnectedTo" to "peer".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 13:26:52 +02:00
Zebediah Figura b0e47ab9e7 strmbase: Pass an unsigned index to pin_get_media_type().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 16:27:57 +02:00
Zebediah Figura f46fe6d371 strmbase: Rename pfnGetMediaType() to pin_get_media_type().
And remove the unnecessary calling convention.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 16:27:54 +02:00
Zebediah Figura 9f1909be89 strmbase: Rename pfnCheckMediaType() to pin_query_accept().
And remove the unnecessary calling convention.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 16:27:51 +02:00
Zebediah Figura 8619eb9838 strmbase: Get rid of the BasePin typedef.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-24 09:08:20 +02:00
Zebediah Figura 40a4c782b7 winegstreamer: Reimplement the MPEG splitter on top of the mpegaudioparse plugin.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 10:10:04 +02:00
Zebediah Figura 5de712b5d8 winegstreamer: Reimplement the AVI splitter on top of the avidemux plugin.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-20 12:47:22 +02:00