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
Sebastian Dröge
873d177322
threadshare: Update for GLib API changes
2019-01-16 17:30:26 +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
04955f61d7
Update to reqwest 0.9, rand 0.6 and parking_lot 0.7
2018-12-19 14:32:03 +02:00
Sebastian Dröge
f374d7fedf
Remove unneeded ObjectSubclass::new() functions where not needed
2018-12-19 13:23:02 +02:00
Sebastian Dröge
fb741f26f3
Update for glib property API changes
2018-12-18 11:23:45 +02:00
Sebastian Dröge
0792fe4f1a
ts-appsrc: Fix deadlock during shutdown
...
The IO Context has to be alive longer than the other parts
of the state. Otherwise a deadlock can happen between shutting down
the IO context (thread join while the state lock is held) and stuff
happening on the IO context (which might take the state lock).
2018-12-13 17:13:40 +02:00
Sebastian Dröge
e64a9b4a1a
Port threadshare plugin to new subclassing API
2018-12-06 13:03:04 +02:00
Sebastian Dröge
4d87c11293
Run everything through latest rustfmt again
2018-12-04 19:01:40 +02:00
Sebastian Dröge
3026e56cfb
ts-udpsrc: Creating a gio::Socket from a raw fd/socket is unsafe
...
So put it into an unsafe block.
2018-12-03 13:02:35 +02:00
Sebastian Dröge
9750195caa
ts-udpsrc: Dup the socket so that both tokio and GIO can take ownership of it
...
Otherwise both would be closing the same socket, which a) breaks the
second user of the socket if any and b) could on the second close cause
a completely unrelated socket to be closed.
Windows part of the code is untested.
2018-11-30 19:39:39 +02:00
Sebastian Dröge
40426a2cf6
Use new boxed type support from the GLib bindings
2018-11-29 21:01:02 +02:00
Sebastian Dröge
32265412f3
Change all links/mentions from gst-plugin-rs to gst-plugins-rs
2018-11-26 11:52:09 +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
ab08cbd412
ts-udpsrc: Implement socket and used-socket properties like in udpsrc
2018-11-13 14:13:23 +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
6c32b702f0
Fix build with gst-plugin-rs API changes
2018-11-05 13:43:11 +02:00
Sebastian Dröge
20bec35c68
Merge gst-plugin-threadshare into gst-plugin-rs
2018-11-05 13:40:43 +02:00
Sebastian Dröge
132986cf71
threadshare: Fix deprecation warnings and move to released versions of tokio
2018-11-05 13:36:47 +02:00
Sebastian Dröge
4e8c6fd293
threadshare: Change gobject-subclass repository URI
2018-11-05 13:36:47 +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
20149c7293
threadshare: Rename udpsrc_benchmark.rs to benchmark.rs.
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
LEE Dongjun
df86b67117
threadshare: Rename udpsocket file to socket file
2018-11-05 13:36:47 +02:00
LEE Dongjun
1ac85c91e5
threadshare: Generalize UdpSocket to Socket.
2018-11-05 13:36:47 +02:00
Sebastian Dröge
ec3e0875a1
threadshare: Use downcast_ref() instead of downcast()
2018-11-05 13:36:47 +02:00
Sebastian Dröge
987f78de42
threadshare: Move to tokio_threadpool and tokio_current_thread crates
2018-11-05 13:36:47 +02:00
Sebastian Dröge
23b25b210b
threadshare: Update to rand 0.5
2018-11-05 13:36:47 +02:00
Sebastian Dröge
8cdb47e61e
threadshare: Also set reuse address/port settings for non-multicast sockets
...
And share more code between unicast/multicast socket creation
2018-11-05 13:36:47 +02:00
Sebastian Dröge
9adf663073
threadshare: Add property to udpsrc for allowing port/address reuse
2018-11-05 13:36:47 +02:00
Sebastian Dröge
c5d901609f
threadshare: Try pushing pending items immediately if we did not schedule a future for it yet
...
It might not be necessary to first go through a future, we might
directly be able to push them now.
2018-11-05 13:36:47 +02:00
Sebastian Dröge
7ac9534322
threadshare: Don't drain the queue when trying to push pending items
...
Otherwise we'll have to collect all failed items and push them back.
Instead pop items one by one, and if one fails just push that single
item back to the front.
The previous code would've lost all items after the first one that
failed
2018-11-05 13:36:47 +02:00
Sebastian Dröge
51aa06d013
threadshare: Schedule the pending queue in queue/proxysink only on EOS or the first buffer/buffer list
...
We will get the custom sticky downstream event with the IO context only
after stream-start and others, so would potentially block the current
thread from another futures executor, which then panics. Instead let's
just queue up those events for the time being until a later time.
2018-11-05 13:36:47 +02:00
Sebastian Dröge
3a8ce35e60
threadshare: Revert "Push io-context sharing event before stream-start and anything else"
...
This reverts commit 083948e8ea1471f1d8a013a225200729cfcef2a9.
This has no effect because core is reordering events to have
stream-start and others always first.
2018-11-05 13:36:47 +02:00
Sebastian Dröge
135ec5ee7d
threadshare: Push io-context sharing event before stream-start and anything else
2018-11-05 13:36:47 +02:00
Sebastian Dröge
0b54cdb8ea
threadshare: Use default query handling
...
While this will still drop most queries, it at least implements some
sane default handling for CAPS/ACCEPT_CAPS queries.
2018-11-05 13:36:47 +02:00
Sebastian Dröge
be0403ce24
threadshare: Switch to gobject-subclass
2018-11-05 13:36:47 +02:00
Sebastian Dröge
8f9a42f486
threadshare: Switch back to main tokio now that the CurrentThread PR is merged
2018-11-05 13:36:47 +02:00
Sebastian Dröge
da8390ef7b
threadshare: Update for tokio API changes
2018-11-05 13:36:47 +02:00
Sebastian Dröge
2dfca38977
threadshare: Turn the single-threaded executor until no futures are left to be run before waiting
...
Otherwise in e.g. a pipeline like
ts-udpsrc ! ts-queue ! fakesink
the first turn would only get a packet and queue it up, then we would
wait due to throttling and only then we would forward the packet from
the queue (but not poll the socket again), wait again due to throttling
and only then poll and get the next packet.
See https://github.com/tokio-rs/tokio/issues/310
2018-11-05 13:36:47 +02:00
Sebastian Dröge
b56e1a9873
threadshare: Update udpsrc benchmark a bit
2018-11-05 13:36:47 +02:00
Sebastian Dröge
7939f95861
threadshare: Add very simple udpsrc/tonesrc benchmark application
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