François Laignel
d9cd48287e
threadshare/appsrc: Port appsrc to new API
2020-03-15 13:17:26 +02:00
Sebastian Dröge
f5eb91ebe2
threadshare/udpsrc: Port udpsrc to new API
2020-03-15 13:17:26 +02:00
Sebastian Dröge
e729324cce
threadshare: Refactor infrastructure
...
The biggest changes are
- Many functions are not asynchronous anymore as it would be difficult
to run them correctly with our mix of synchronous C code and Rust
code.
- The pad context and its corresponding custom event are gone and
instead thread local storage and task local storage are used. This
makes it easier to correctly pass it through the different layers
of Rust and C code and back.
- Sink events have a different function for serialized and oob events,
src events are handled correctly by default now by simply forwarding
them.
- Task::prepare() has a separate variant that takes a preparation
function as this is a very common task.
- The task loop function can signal via its return value if it wants to
be called again or not.
2020-03-15 13:17:26 +02:00
Mathieu Duponchelle
382b9f118c
threadshare: Initial version of a UDP sink
2020-03-15 12:38:20 +02:00
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
Sebastian Dröge
1e778e9827
Update for Seqnum/GroupId API changes
2020-01-25 01:21:22 +02:00
François Laignel
e2add3f2c8
ts-jitterbuffer: add dedicated functions for state transitions + tests
...
fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/95
2020-01-23 19:10:21 +01:00
François Laignel
a15d60105b
ts: fix FlushStart / FlushStop events handling
2020-01-16 00:44:45 +01:00
François Laignel
3eed2f69d9
ts: have block_on panic if running on a Context thread
2020-01-16 00:18:16 +01:00
Sebastian Dröge
9772adbfbf
Fix various new clippy warnings from 1.40
2019-12-22 11:35:01 +02:00
François Laignel
0221524a10
Update to tokio release 0.2.5 + throttling
2019-12-21 08:56:43 +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
Mathieu Duponchelle
2c7775125a
tests/appsrc: remove unrelated jitterbuffer "tests"
...
This was mistakenly staged during development for !161
2019-09-06 21:13:37 +02:00
Mathieu Duponchelle
b7e55836c1
WIP: thread-sharing jitterbuffer
...
Actual thread-sharing will follow!
2019-09-06 14:33:39 +00: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
Sebastian Dröge
8486fb0b41
threadshare/tcpclientsrc: Fix build of test with changes gst::Sample API
2019-04-23 21:35:51 +03:00
Sebastian Dröge
a2582afed3
ts-udpsrc: Fix build on Windows
...
By disabling socket sharing there. This is blocked by PRs to mio/tokio
currently.
2019-02-07 10:31:47 +02:00
Sebastian Dröge
d7fc5ca272
Set caps on the harness in tests before pushing the first buffer
...
Otherwise there will be warnings about data flow before segment events,
as harness is only sending the segment event together with the caps.
2019-01-21 17:34:44 +02: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
8b7f0b40ea
ts-appsrc: Rewrite test around Harness
2018-11-13 18:58:06 +02:00
Sebastian Dröge
bcc0bb0d7d
ts-udpsrc: Add unit test for socket re-use and the socket/used-socket properties
2018-11-13 18:58:06 +02:00
Sebastian Dröge
941b83a1d6
ts-udpsrc: Rewrite unit test around gst_check::Harness
2018-11-13 18:50:54 +02: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
73a7be5ef5
Run gst-plugin-threadshare through cargo fmt
2018-11-05 13:43:38 +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
LEE Dongjun
6827b9509e
threadshare: Add TcpClient elements and unit test.
2018-11-05 13:36:47 +02:00
Sebastian Dröge
eab6537094
threadshare: Add test for queue
2018-11-05 13:36:20 +02:00
Sebastian Dröge
3e82b5a14e
threadshare: Add test for udpsrc
2018-11-05 13:36:20 +02:00
Sebastian Dröge
34acbcc6a1
threadshare: Add simple test for proxysrc/sink
2018-11-05 13:36:20 +02:00
Sebastian Dröge
28100d3a63
threadshare: Add test for single and multi-threaded appsrc
2018-11-05 13:36:20 +02:00
Sebastian Dröge
d52f1d49dd
threadshare: Add a sample appsrc-like element plus test
2018-11-05 13:36:20 +02:00