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
Zebediah Figura
2cdb12b08e
winegstreamer: Avoid using Wine debug functions in got_data_sink().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-25 09:59:08 +01:00
Zebediah Figura
13ea906985
winegstreamer: Factor out get_stream_event().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-25 09:59:05 +01:00
Zebediah Figura
54e012b5b7
winegstreamer: Use pthread condition variables to queue stream events.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-25 09:59:02 +01:00
Zebediah Figura
e785880a96
winegstreamer: Don't force no_more_pads() 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:58:58 +01:00
Zebediah Figura
7875d8dd87
winegstreamer: Avoid using Wine debug functions in no_more_pads().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-25 09:58:55 +01:00
Zebediah Figura
4782f67bca
winegstreamer: Don't force watch_bus() onto a Wine thread.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 11:12:21 +01:00
Zebediah Figura
871c5673d9
winegstreamer: Avoid using Wine debug functions in watch_bus().
...
They depend on a valid TEB and can't be called from non-Wine threads.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 11:12:21 +01:00
Zebediah Figura
1f7ab818d8
winegstreamer: Use a pthread condition variable to wait for filter initialization.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 11:12:21 +01:00
Zebediah Figura
2546ad8115
winegstreamer: Store the segment parameters in the parser_event structure.
...
Instead of the segment event.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 11:12:20 +01:00
Zebediah Figura
911bc74a1e
winegstreamer: Move pin duration and caps retrieval to GST_Connect().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 11:12:20 +01:00
Zebediah Figura
275b222662
winegstreamer: Use the "flushing" field to unblock the streaming thread when stopping.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:27:24 +01:00
Zebediah Figura
90107bba94
winegstreamer: Keep the stream in paused state for its entire lifetime.
...
This noticeably improves stream startup time. The process of typefinding and
negotiation takes about 70 ms for a simple test file on one machine, and this
is currently done twice. This patch replaces the second instance with a simple
seek, which takes less than 10 ms.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:27:21 +01:00
Zebediah Figura
36a7dd93d7
winegstreamer: Do not return GST_FLOW_NOT_LINKED if the DirectShow pin is not connected.
...
This is a fatal error condition for GStreamer, but should not cause errors for
DirectShow.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:27:18 +01:00
Zebediah Figura
b3e2009b5e
winegstreamer: Consistently use GST_STATE_PAUSED for test-play.
...
It does not matter whether we use PAUSED or PLAYING, but we should at least be
consistent.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:27:15 +01:00
Zebediah Figura
ef79e902a6
winegstreamer: Flush connected pins directly in SetPositions().
...
Instead of propagating GStreamer flush events to corresponding DirectShow pins.
This is mainly to avoid more callbacks from GStreamer and further separate the
Win32 and Unix code.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 10:27:07 +01:00
Zebediah Figura
9c138562fe
winegstreamer: Manage our own streaming thread.
...
This is a rather large and complex change. It comprises several parts:
(1) Instead of directly sending EOS, segment, and sample events to the
downstream DirectShow sink, first queue them in a local buffer (i.e.
"pin->event").
(2) Spawn a separate thread per source pin (i.e. "stream_thread") which consumes
said events and sends them downstream.
(3) When flushing or stopping, explicitly wait for this thread to pause or stop
(respectively).
There are a few reasons for this:
(1) It reduces the number of Unix -> PE callbacks we need to make, easing PE
conversion. This is not a great advantage *a priori*, and may not be worth a
similar dedicated "handler" thread for most modules, but winegstreamer is
different—we were already marshalling these calls onto another thread, and
now that marshalling can go away (almost).
(2) Because GStreamer can only do pad negotiation (and hence autoplugging) while
running (in contrast to DirectShow, which can do it while stopped), we
currently have to renegotiate every time the pipeline is started. Most
applications don't start the graph more than once, but even that requires
two negotiations, and startup time is demonstrably too high. It would be
nice to keep the graph in PAUSED state all of the time, but this is
difficult to do without more fine-grained control over the streaming thread.
[In particular, we cannot reliably wait for all samples to be delivered
except by stopping the GStreamer pipeline.]
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 11:20:57 +01:00
Derek Lesho
41e49d4596
winegstreamer: Reformat type-setting functions to prevent the need for a conditionally initialized variable.
...
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-01-19 21:44:17 +01:00
Derek Lesho
aae9333cd2
winegstreamer: Correct mistaken enum value in ProcessMessage.
...
This is the message session relies on succeeding.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:17 +01:00
Giovanni Mascellani
cc116548fd
winegstreamer: Wait on error conditions when initializing GStreamer.
...
GStreamer doesn't necessarily signal all error when setting the
PLAYING or PAUSED state. If Wine just waits on no-more-pads, it risks
a deadlock if an error is signaled after gst_element_get_state was
called.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 20:21:40 +01:00
Zebediah Figura
690afb42f6
strmbase: Rename csFilter to filter_cs.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 08:52:32 +01:00
Zebediah Figura
6fdfacb5bf
winegstreamer: Do not call gst_pad_event_default().
...
This matches the behaviour of GstBaseSrc and GstBaseSink. In particular, we
now return FALSE for unhandled source events.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 08:52:29 +01:00
Zebediah Figura
0529fe3168
winegstreamer: Do not handle GST_EVENT_TAG in event_src().
...
GST_EVENT_TAG is a downstream-only event.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 08:52:26 +01:00