Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-04threadshare: Fix docs typosSebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1350>
2023-10-04generic: threadshare: macOS fixesFrançois Laignel
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1350>
2023-10-04generic: threadshare: port to polling 3.1.0François Laignel
Also use `rustix` & `std::ffi` instead of `libc`. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1350>
2023-10-04threadshare: fix warning for unused variableAndoni Morales Alastruey
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1350>
2023-07-11threadshare: Remove unnecessary call to `default()`Sebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1273>
2023-07-06Use re-exported once_cellBilal Elmoussaoui
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
2023-07-06Fix a couple of typosSebastian Dröge
2023-05-12use Pad builders for optional name definitionFrançois Laignel
Also, apply auto-naming in the following cases * When building from a non wildcard-named template, the name of the template is automatically assigned to the Pad. User can override with a specific name by calling `name()` on the `PadBuilder`. * When building with a target and no name was provided via the above, the GhostPad is named after the target. See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/448 Auto-naming discussion: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1255#note_1891181 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1197>
2023-04-10fix typosGuillaume Desmottes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1170>
2023-03-17threadshare: jitterbuffer: Rename C symbols to avoid conflicts with the same ↵Sebastian Dröge
symbols from the rtpmanager plugin Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/326 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1128>
2023-01-25Fix various new clippy warningsSebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1062>
2022-12-13Fix various new clippy warningsSebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1011>
2022-11-27Update for gst::Array / gst::List API improvementsSebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/985>
2022-11-09ts/udpsink: handle items in the PadSinkHandlerFrançois Laignel
... instead of forwarding them to a Task via a channel. This improves CPU usage by 5% according to `udpsrc-benchmark-sender` with the `tuning` feature using default audio test buffers and 400 streams on the same ts-context. It is expected to improve latency significantly. This is inferred from `ts-standalone`: latency shrinks from around 5ms to 1.5µs using the `task` sink compared to the `async-mutex` sink. The async Mutex is mandatory here as we need to hold the lock across await points.
2022-11-09ts: introduce ts-audiotestsrcFrançois Laignel
This makes it easy to generate "listenable" signals and to evaluate discontinuities. When the `tuning` feature is activated and the `main-elem` property is set, the element can log the parked duration in %, which is an image of the CPU usage for the ts-context. This commit adds a test mode to `udpsrc-benchmark-sender` which generates default audio buffers from `ts-audiotestsrc`. The `rtp` mode is modified so that it uses `ts-audiotestsrc`.
2022-11-01Fix various new clippy warningsSebastian Dröge
2022-10-24ts/pad: use `gst::Pad` in handlers trait functions...François Laignel
... instead of the `Pad{Src,Sink}Ref` wrappers: - In practice, only the `gst::Pad` is useful in these functions. Some of these which need a `Pad{Src,Sink}Ref`, but it's the one for the opposite stream direction. In those cases, it is accessed via the element's implementation. - It saves a few `clone`s. - The implementations usually use the `gst::Pad` for logging. They no longer need to access it via `pad.gst_pad()`.
2022-10-24ts/pad: don't pass self as ref in remaining handler traits functionsFrançois Laignel
- They are either unit types or `Clone` (in which case they are implemented as pointers). - Internally, we already use an owned version, so there's no need to get a reference. - It facilitates implementation if the handler must be moved into a closure or a `Future`.
2022-10-23Move from `imp.instance()` to `imp.obj()`Sebastian Dröge
It's doing the same thing and is shorter.
2022-10-23Remove `&` for `obj` in log macrosFrançois Laignel
This is no longer necessary. See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1137
2022-10-23Fix GObject type names, GStreamer debug category names and element factory namesSebastian Dröge
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/198
2022-10-21Take advantage of `Into<Option<_>>` argsFrançois Laignel
Commit 24b7cfc8 applied changes related to nullability as declared by gir. One consequence was that some functions signature ended up requiring users to pass `Some(val)` when they could use `val` before. This commit applies changes on `gstreamer-rs` which, will honoring the nullability stil allow users to pass `val` for the few affected functions. This commit also fixes the signature for `Element::request_new_pad` which was updated upstream.
2022-10-18Update for GStreamer API changesSebastian Dröge
2022-10-18Use new format constructorsFrançois Laignel
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1128
2022-10-12Update for pad default functions API changesSebastian Dröge
2022-10-12ts: better use of `imp` & `elem` args in `Pad{Sink,Src}Handler`sFrançois Laignel
This is a follow-up to commit 7ee4afac. This commit cleans up the `Pad{Sink,Src}Handler` by - Keeping arguments which are strictly necessary. - Passing arguments by value for the trait functions which return a `Future`. The arguments which were previously passed by reference were `clone`d internally and then `clone`d again in most implementations. There are unfortunate differences in trait function signatures between those which return a `Future` and the sync functions. This is due to the requirement for the arguments to be moved to the resulting `Future`, whereas sync functions can rely on references. One particular notable difference is the use of the `imp` in sync functions instead of the `elem` in functions returning a `Future`. Because the `imp` is not guaranteed to implement `Clone`, we can't move it to the resulting `Future`, so the `elem` is used.
2022-10-10Change *Impl trait methods to only take &self and not Self::Type in additionSebastian Dröge
2022-10-07Update for glib::Object::new() API changesSebastian Dröge
2022-09-21jitterbuffer: fix typo when calculating max_misorder_timeMathieu Duponchelle
2022-09-21ts-jitterbuffer: Declare `request-pt-map` signalMac Thi Kieu Van
2022-09-13ts/scheduler: fix shutdownFrançois Laignel
A strong handle reference was held in the `block_on_priv` `Result` handler in the thread for the `Scheduler::start` code path, which lead to the `Handler` strong count not dropping to 0 when it should, leading to the shutdown request not being triggered. Use an Arc<AtomicBool> instead of a oneshot channel for shutdown. The main Future is always polled and never relies on a waker, a `poll_fn` is cheap and does the job. Unpark the scheduler after posting a request to shutdown.
2022-09-13ts/scheduler: improve tasks / io & timers polling balanceFrançois Laignel
Set a limit to the nb of task checked before checking the reactor and the main future again.
2022-09-13ts/Task: don't drain sub tasks after state transition and iterationFrançois Laignel
Subtasks are used when current async processing needs to execute a `Future` via a sync function (eg. a call to a C function). In this case `Context::block_on` would block the whole `Context`, leading to a deadlock. The main use case for this is the `Pad{Src,Sink}` functions: when we `PadSrc::push` and the peer pad is a `PadSink`, we want `PadSrc::push` to complete after the async function on the `PadSink` completes. In this case the `PadSink` async function is added as a subtask of current scheduler task and `PadSrc::push` only returns when the subtask is executed. In `runtime::Task` (`Task` here is the execution Task with a state machine, not a scheduler task), we used to spawn state transition actions and iteration loop (leading to a new scheduler Task). At the time, it seemed convenient for the user to automatically drain sub tasks after a state transition action or an iteration. User wouldn't have to worry about this, similarly to the `Pad{Src,Sink}` case. In current implementation, the `Task` state machine now operates directly on the target `Context`. State transtions actions and the iteration loop are no longer spawned. It seems now useless to abstract the subtasks draining from the user. Either they transitively use a mechanism such as `Pad{Src,Sink}` which already handles this automatically, or they add substasks on purpose, in which case they know better when subtasks must be drained.
2022-09-13ts/executor: clear the reactor instead of closing it...François Laignel
... so that it can be reused on current thread for subsequent Scheduler instantiations (e.g. block_on) without the need to reallocate internal data structures.
2022-09-13ts/timers: multiple improvementsFrançois Laignel
This commit improves threadshare timers predictability by better making use of current time slice. Added a dedicate timer BTreeMap for after timers (those that are guaranteed to fire no sooner than the expected instant) so as to avoid previous workaround which added half the max throttling duration. These timers can now be checked against the reactor processing instant. Oneshot timers only need to be polled as `Future`s when intervals are `Stream`s. This also reduces the size for oneshot timers and make user call `next` on intervals. Intervals can also implement `FusedStream`, which can help when used in features such as `select!`. Also drop the `time` module, which was kepts for compatibility when the `executor` was migrated from tokio based to smol-like.
2022-09-13ts: add feature to add counters for performance evaluationFrançois Laignel
Add a `tuning` feature which adds counters that help with performance evaluation. The only counter added so far accumulates the duration a Scheduler has been parked, which is pretty accurate an indication of CPU usage of the Scheduler.
2022-09-13ts/standalone: multiple improvementsFrançois Laignel
- Reworked buffer push. - Reworked stats. - Make first elements logs stand out. This make it possible to follow what's going on with pipelines containing 1000s of elements. - Actually handle EOS. - Use more significant defaults. - Allow building without `clap` feature.
2022-09-12ts/jitterbuffer: extra robustness for Windows CIFrançois Laignel
jitterbuffer tests crash on Windows CI sometimes. Activating logs showed time values which are probably not expected in a regular environment, but which can happen there. Adding extra robustness to `next_wakeup` computation seems to fix the problem judging by the few runs I triggered.
2022-09-05Update for GLib ParamSpec builder API changesSebastian Dröge
2022-09-03tsjitterbuffer: Fix latency type when getting propertyThibault Saunier
2022-08-30Allow "unused_doc_comments" as we use hotdoc and not rustdocThibault Saunier
2022-08-30Generate plugins documentation using hotdocThibault Saunier
Which will automatically be integrated in gstreamer documentation
2022-08-22plugins: Simplify code using ParamSpecBuilderVivia Nikolaidou
2022-08-18ts/runtime: slight optimizations for sub tasks related operationsFrançois Laignel
Using callgrind with the standalone test showed opportunities for improvements for sub tasks addition and drain. All sub task additions were performed after making sure we were operating on a Context Task. The Context and Task were checked again when adding the sub task. Draining sub tasks was perfomed in a loop on every call places, checking whether there were remaining sub tasks first. This commit implements the loop and checks directly in `executor::Task::drain_subtasks`, saving one `Mutex` lock and one `thread_local` access per iteration when there are sub tasks to drain. The `PadSink` functions wrapper were performing redundant checks on the `Context` presence and were adding the delayed Future only when there were already sub tasks.
2022-08-17Fix build after glib SignalBuilder::param_types() API changeSebastian Dröge
2022-08-13ts/udpsink: move sync on buffer to try_nextFrançois Laignel
By moving sync on buffer ts to `try_next`, the resulting delay can be cancelled when a state transition occurs. To prevent item loss, this requires first peeking the incoming item from the channel without popping it. After the delay has elasped, we can pop the item as the last await point in `try_next`: either it will be cancelled before popping or the popped item will be passed on to `handle_item`. Also add `flush` which was missing from `stop` and `flush_start` transition actions.
2022-08-10ts: migrate elements to try_next / handle_itemFrançois Laignel
See previous commit for details. Also switched to panicking for some programming errors.
2022-08-10ts/Task: split iterate into try_next and handle_itemFrançois Laignel
Previous Task iteration model suffered from the following shortcomings: - When an iteration was engaged it could be cancelled at await points by Stop or Flush state transitions, which could lead to inconsistent states. - When an iteration was engaged it could not be cancelled by a Pause state transition so as to prevent data loss. This meant we couldn't block on the Pause request because the mechanism couldn't guarantee Paused would be reached in a timely manner. This commit split the Task iteration into: - `try_next`: this function returns a future that awaits for a new iteration to begin. The regular use case is to return an item to process. The item can be left to `()` if `try_next` acts as a tick generator. It can also return an error. This function can be cancelled at await points when a state transition request occurs. - `handle_item`: this function is called with the item returned by `try_next` and is guaranteed to run to completion even if a transition request is received. Note that this model plays well with the common Future cancellation pitfalls in Rust.
2022-08-10threadshare: Fix some new clippy beta warningsSebastian Dröge
warning: this expression borrows a value the compiler would automatically borrow --> generic/threadshare/src/runtime/executor/async_wrapper.rs:402:19 | 402 | match (&mut *self).get_mut().read(buf) { | ^^^^^^^^^^^^ help: change this to: `(*self)` | = note: `#[warn(clippy::needless_borrow)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
2022-08-09ts: update elements for new TransitionStatusFrançois Laignel
See previous commit