Commit graph

19 commits

Author SHA1 Message Date
Sebastian Dröge 3b4c48d9f5 Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1062>
2023-01-25 10:31:19 +02:00
François Laignel 86776be58c Remove & for obj in log macros
This is no longer necessary.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1137
2022-10-23 21:22:31 +02:00
François Laignel 33e601d33e ts: migrate elements to try_next / handle_item
See previous commit for details.

Also switched to panicking for some programming errors.
2022-08-10 20:10:08 +02:00
François Laignel 422ea740ca Update to gst::_log_macro_
See the details:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/980
2022-02-21 20:50:01 +01:00
Sebastian Dröge 51f8e963d6 Add SPDX-License-Identifier to all file headers 2022-01-15 21:18:47 +02:00
François Laignel 6163589ac7 ts/executor: replace tokio with smol-like implementation
The threadshare executor was based on a modified version of tokio
which implemented the throttling strategy in the BasicScheduler.
Upstream tokio codebase has significantly diverged from what it
was when the throttling strategy was implemented making it hard
to follow. This means that we can hardly get updates from the
upstream project and when we cherry pick fixes, we can't reflect
the state of the project on our fork's version. As a consequence,
tools such as cargo-deny can't check for RUSTSEC fixes in our fork.

The smol ecosystem makes it quite easy to implement and maintain
a custom async executor. This MR imports the smol parts that
need modifications to comply with the threadshare model and implements
a throttling executor in place of the tokio fork.

Networking tokio specific types are replaced with Async wrappers
in the spirit of [smol-rs/async-io]. Note however that the Async
wrappers needed modifications in order to use the per thread
Reactor model. This means that higher level upstream networking
crates such as [async-net] can not be used with our Async
implementation.

Based on the example benchmark with ts-udpsrc, performances seem on par
with what we achieved using the tokio fork.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/118

Related to https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/604
2021-12-25 11:25:56 +00:00
François Laignel 27b9f0d868 Improve usability thanks to opt-ops
The crate option-operations simplifies usage when dealing with
`Option`s, which is often the case with `ClockTime`.
2021-10-18 15:09:47 +02:00
François Laignel 8f81cb8812 generic: migrate to new ClockTime design 2021-06-05 10:36:21 +02:00
François Laignel 8dfc872544 use gst::glib where applicable 2021-06-03 20:53:16 +02:00
François Laignel 06accc8d98 fix-getters-{def,calls} pass 2021-04-12 15:57:19 +02:00
Sebastian Dröge 7e1181ab84 threadshare: Return a proper error type instead of () 2020-12-29 17:29:27 +02:00
Sebastian Dröge 3d617371af Update for macro renames 2020-12-20 20:43:45 +02:00
Sebastian Dröge 1c9c22df0c generic: Update to 2018 edition 2020-11-23 10:28:33 +02:00
Seungha Yang 5cba2b002b threadshare/socket: Fix build error on Windows
error[E0412]: cannot find type `Error` in this scope
   --> generic\threadshare\src\socket.rs:237:56
    |
237 |     pub fn set_tos(&self, qos_dscp: i32) -> Result<(), Error> {
    |                                                        ^^^^^ not found in this scope
2020-10-01 01:40:08 +09:00
Sebastian Dröge 60321edb8c Update for new_with_XXX/new_from_XXX function renaming 2020-06-16 11:56:48 +03:00
François Laignel 1bea2ad279 threadshare: introduce TaskImpl trait
TaskImpl is the trait for specific Task behaviour. It is the basis
of a new Task model. The main motivation for this model is to ease
threadsafe implementations of state transitions.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/298
2020-05-25 18:31:48 +02:00
Sebastian Dröge 5a7fcfad7f Fix various new clippy warnings with clippy 1.43 2020-04-24 13:55:01 +03:00
Sebastian Dröge 577c980a6d threadshare/socket: Implement Drop on the non-refcounted inner part of the socket
We don't want to run it every time a strong reference is dropped but
only at the very end. Otherwise dropping the socket stream will cause a
panic because the socket itself is still running.
2020-04-08 15:39:35 +03:00
Arun Raghavan dc3c8fd049 Drop gst-plugin- prefix in plugin directory name 2020-04-05 19:10:47 +00:00
Renamed from generic/gst-plugin-threadshare/src/socket.rs (Browse further)