Commit graph

11 commits

Author SHA1 Message Date
Mathieu Duponchelle
53e948b8da proxy: fix blocking upwards state change
ProxySink previously blocked on receiving the source pad
of ProxySrc in its ReadyToPaused transition, which meant
ProxySrc had to transition to Ready at the same time.

The usual use case is for the source and sink to reside in
two separate pipelines, and such an arrangement easily led
to deadlocks, as examplified by the new test case.

Instead we now maintain two more global hash maps holding
per-context sink pads and src pads weak references, and
forward events to those when needed.

As ProxySink may not have a source pad context to run
a future on when receiving FlushStart, gst::Element::call_async
is used instead, with a simple oneshot channel used to synchronize
flush start and flush stop handling.
2020-02-05 21:35:11 +01:00
François Laignel
e8f5191ee7 ts: Pad wrapper for async processing
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/merge_requests/170#note_276334
and https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/merge_requests/204
2019-12-21 08:56:43 +01:00
François Laignel
8eec141517 threadsharing: migrate to async/await and tokio 0.2.0-alpha.6
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/merge_requests/164
2019-12-19 20:44:00 +01:00
François Laignel
0e11ac87d3 Update for new {Value, StructureRef}::get signature
See https://github.com/gtk-rs/glib/pull/513
and https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/merge_requests/310
2019-08-13 15:29:28 +02:00
Sebastian Dröge
f149f8f1b5 Don't use ONCE_INIT anymore now that Once::new() is const 2019-07-11 16:41:42 +03:00
François Laignel
f5a398b21e Update gstreamer-rs/gstreamer bool to Result changes 2019-01-18 10:00:45 +02:00
François Laignel
e930133bdf Update for gstreamer-rs MR 200
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/merge_requests/200
2019-01-12 18:00:04 +01:00
Sebastian Dröge
4fb18382c2 threadshare: register plugin static in integration test
After a `cargo clean` the shared library is not yet present if the test is started with `cargo test`.
2018-11-05 13:47:34 +02:00
Sebastian Dröge
fbc0a04cff threadshare: Run everything through rustfmt again 2018-11-05 13:36:47 +02:00
Sebastian Dröge
55f9b84008 threadshare: Drop support for multi-threaded runtime as it is consistently slower
And switch to the new built-in spawning support of CurrentThread
2018-11-05 13:36:47 +02:00
Sebastian Dröge
34acbcc6a1 threadshare: Add simple test for proxysrc/sink 2018-11-05 13:36:20 +02:00