Commit graph

2228 commits

Author SHA1 Message Date
François Laignel 625fce3934 ts/Task: spawn StateMachine on ts Context
Task state machines used to execute in an executor from the Futures
crate. State transitions actions and iteration functions were then
spawned on the target threadshare Context.

This commit directly spawns the task state machine on the threadshare
Context. This simplifies code a bit and paves the way for the changes
described in [1].

Also introduces struct `StateMachineHandle`, which gather together
fields to communicate and synchronize with the StateMachine. Renamed
`StateMachine::run` as `spawn` and return `StateMachineHandle`.

[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/793#note_1464400
2022-08-09 19:48:06 +02:00
François Laignel 0858dfedb4 ts-udpsrc: align default port with C counterpart
... and also with the default settings for ts-udpsink.
2022-08-09 17:42:53 +02:00
Sebastian Dröge 05207cafea raptorq: Derive Eq for some more structs
warning: you are deriving `PartialEq` and can implement `Eq`
  --> net/raptorq/src/fecscheme.rs:13:24
   |
13 | #[derive(Clone, Debug, PartialEq)]
   |                        ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
   |
   = note: `#[warn(clippy::derive_partial_eq_without_eq)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

warning: you are deriving `PartialEq` and can implement `Eq`
  --> net/raptorq/src/fecscheme.rs:38:24
   |
38 | #[derive(Clone, Debug, PartialEq)]
   |                        ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
2022-08-09 13:40:39 +00:00
Sebastian Dröge cbb55c2322 hlssink3: Update to m3u8-rs 5 2022-08-09 13:40:39 +00:00
Sebastian Dröge d058c96596 fmp4: Update to m3u8-rs 5 2022-08-09 13:40:39 +00:00
Sebastian Dröge 8b11aee04d aws: Update to aws 0.17/0.47 2022-08-09 13:40:39 +00:00
François Laignel 28a62e622e ts/scheduler: rename awake / wake_up as unpark 2022-08-09 13:17:21 +00:00
François Laignel 833331ab66 ts/Task: wake up after the triggering event is pushed
The scheduler is awaken when aborting a task loop, but not after
a triggering event is pushed. This can cause throttling to induce
long state transitions for pipelines with many streams.

Observed for Unprepare with:

GST_DEBUG=ts-benchmark:4 ../../target/debug/examples/benchmark 2000 ts-udpsrc 2 20 5000
2022-08-09 13:17:21 +00:00
François Laignel 374671cb6f ts/udpsink: fix default clients not leading to socket configuration
During MR !793, the socket configuration mechanism was changed to
use commands passed to the Task via a channel. This worked properly
for user changes via settings and signals, however the default
clients setting was not used.

A simple solution could have been to send a command at initialization
to add the default clients, but it was considered a better solution
to just wait for the Task preparation to configure the sockets based
on the value of settings.clients at that time, thus avoiding
unnecessary successive removals and additions of clients which could
have happened before preparation.

Of course, users can still add or remove clients as before, before
and after Task preparation.

See also https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/793
2022-08-09 12:43:36 +00:00
Mathieu Duponchelle f646cabb3d aws_transcriber: expose filtering related properties
- vocabulary-filter-name allows picking a vocabulary to filter words
- vocabulary-filter-method allows controlling how words are filtered
2022-08-09 12:14:31 +00:00
Seungha Yang a9a41a54be tracers: Enable PipelineSnapshot only for unix target
This implementation does not support the other targets
(it uses SIGUSR1 which does not exist on Windows)
and would not be compiled
2022-08-09 11:47:02 +00:00
Guillaume Desmottes 7eea27aefc tracers: buffer_lateness.py: cycle colors
Fix crash when drawing more dataset than the number of colors.

Fix #221
2022-08-09 13:13:14 +02:00
Thibault Saunier b8767fa18f sink: Move the homegrown congestion controller in it own file 2022-08-05 03:13:05 +02:00
Thibault Saunier c399b1f0c6 Use rtprtxsend stuffing when available and congestion control is enabled
Depends on https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2273/
2022-08-05 03:13:05 +02:00
Thibault Saunier 64f664c859 plugin: Implement bandwidth estimator based on the Google Congestion Control algorithm
See https://datatracker.ietf.org/doc/html/draft-ietf-rmcat-gcc-02

This commit implements the bandwidth estimation as a GStreamer element
that is then used in webrtcbin through the new `request-bandwidth-estimator`
signal.

This keeps our Homegrown congestion controller but removes the possibility
to switch CC algorithm at runtime.
2022-08-05 03:13:05 +02:00
Thibault Saunier 287e76847a plugin: Fix some clippy issues
And minor reformat
2022-08-05 03:13:05 +02:00
Sanchayan Maity d240bbc4e2 aws_transcriber: Fix regression with credentials mechanism
A regression was introduced during the migration to AWS SDK. One used
to be able to provide credentials in multiple ways with the earlier
Rusoto ChainProvider (config file / environment variables). Now one
has to explicitly set the properties.

Use the DefaultCredentialsChain from AWS SDK to restore the previous
functionality.

See
https://docs.rs/aws-config/0.46.0/aws_config/default_provider/credentials/struct.DefaultCredentialsChain.html.
2022-08-04 12:15:32 +00:00
Sanchayan Maity a4893f30c8 net/aws: Add support for specifying endpoint
Allow specifying an endpoint to be used for S3 requests. This makes
it possible to use integrations providing object storage based on S3
API like MinIO.

When the endpoint-uri property is specified, the endpoint resolver to
use will be overridden when making S3 requests.
2022-08-04 10:37:37 +05:30
Thibault Saunier c53e5b8bb2 Allow passing free form metadatas about consumers/producers/listenners
In some applications people might need to be able to pass more metadata
than the only "display-name" this commit allow that by adding a field in
all signalling structure where it is free form json and removing the
"display-name" as the free form `meta` field allows application to pass
this kind of information without any problem.

On the "webrtcsink" side this commit adds a `meta` property as a
gst::Structure which will be passed as a json string to the signalling
server so we enforce data to be structured.
2022-07-27 16:57:20 +02:00
Bilal Elmoussaoui 52973d975e Update per glib::SignalBuilder changes 2022-07-21 20:03:13 +02:00
Sebastian Dröge 7d666ce517 tracers: queue-levels: Fix analysis script if only a single plot should be created 2022-07-21 12:26:22 +03:00
Sebastian Dröge a45443251b tracers: queue-levels: Add support for multiqueue and queue2
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/218
2022-07-21 12:26:22 +03:00
Sebastian Dröge 5ba1c98ae7 README.md: Add various new plugins 2022-07-20 19:32:04 +03:00
François Laignel 18f85a1543 generic/fmp4: use opt_ops 2022-07-20 15:56:04 +00:00
François Laignel 6a2df92453 Revert "fmp4mux: Dequeue as many buffers as are available in each aggregate call"
This reverts commit 402500f79c.

This commit introduces race conditions. It was intended as solving
an issue with some pipelines which had their queues filling up,
causing the streams to stall. It is reverted as this solution is
considered a workaround for another issue.

See discussion in:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/803
2022-07-20 15:56:04 +00:00
Guillaume Desmottes fe210a5715 tracers: queue_levels: log when file is being written
Help debugging when nothing is generated.
2022-07-20 17:05:29 +02:00
Guillaume Desmottes bdd47d69ce tracers: buffer_lateness: log when file is being written
Help debugging when nothing is generated.
2022-07-20 16:37:49 +02:00
Tomasz Andrzejak 14160d1d31 Add RaptorQ RTP FEC plugins 2022-07-20 13:34:58 +00:00
Sebastian Dröge 02990f8fcc tracers: queue-levels: Output bytes/buffers/time graphs in separate plots
Much easier to read.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/220
2022-07-20 16:03:51 +03:00
Sebastian Dröge 065bc72bfe ci: Update to cargo-c 0.9.11 2022-07-19 18:16:19 +03:00
Sebastian Dröge 320cb73527 tracers: Add new tracer for logging the lateness of each buffer when it leaves a pad 2022-07-19 18:03:40 +03:00
Sebastian Dröge 2f987b09ee tracers: Add queue levels tracer and Python script for plotting 2022-07-19 18:03:40 +03:00
François Laignel 44b05b4285 generic/fmp4: update Signed return type
See: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1068
2022-07-19 15:40:43 +02:00
Sebastian Dröge 42b6c32f34 onvif: Update to minidom 0.15 2022-07-18 11:21:04 +03:00
François Laignel 5c5c15d36a Simplify Formatted value handling
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1059
2022-07-11 21:21:54 +02:00
Sebastian Dröge a1b87669f2 deny: Update 2022-07-11 18:30:54 +03:00
François Laignel 907d89c998 ts/tests/pad: minor ckeanups 2022-07-09 17:03:21 +00:00
François Laignel d6a9106ffa ts/tcpclientsrc: reduce sync primitives in async hot path 2022-07-09 17:03:21 +00:00
François Laignel 7e826385c7 ts: Queue & Proxy: minor cleanups 2022-07-09 17:03:21 +00:00
François Laignel 5720faa808 ts/appsrc: reduce sync primitives in async hot path 2022-07-09 17:03:21 +00:00
François Laignel a1b89c1fb9 ts/udpsrc: reduce sync primitives in async hot path
- Moved UdpSrcPadHandlerState and related funtions to UdpSrcTask.
- Moved Socket preparation in UdpSrcTask. No longer need for
  Context::enter.
2022-07-09 17:03:21 +00:00
François Laignel 885d3de7bb ts/udpsink: reduce sync primitives in async hot path
The way the runtime::Task is implemented, UdpSinkTask is available
as a mutable ref in all the TaskImpl functions, which offers the
opportunity to avoid using Mutexes.

Main higlights:

- Removed the back and forth calls between UdpSinkPadHandler
  and UdpSinkTask.
- Udp sockets are now part of UdpSinkTask, which is also in
  charge of preparing them instead of leaving this to UdpSink.
  This removed the need for Context::enter since
  TaskImpl::prepare already operates under the target Context.
- In order for the clients list to be visible from the UdpSink,
  this list was maintained by UdpSinkPadHandler which was also
  in charge of (un)configuring the Udp sockets. The sockets are
  now part of UdpSinkTask, which is also in charge of the
  (un)configuration. Add/remove/replace requests are passed as
  commands to the UdpSinkTask via a channel.
- The clients list visible to the UdpSink is now part of the
  Settings (it is also a read/write property). Since the actual
  socket (un)configuration is asynchronously handled by the Task,
  the clients list is updated by the add/remove/replace signals
  and set_property("clients", ..). Should a problem occur during
  the async (un)configuration, and only in this case, the
  UdpSinkTask would update the clients lists in Settings
  accordingly so that it stays consistent with the internal state.
- The function clear_clients was renamed as replace_with_clients.
- clients is now based on a BTreeSet instead of a Vec. All the
  managing functions perform some sort of lookup prior to updating
  the collection. It also ease implementation.
- Removed the UdpSinkPadHandler RwLock. Using flume channels, we
  are able to clone the Receiver so it can be stored in UdpSink
  and reused when preparing the UdpSinkTask.
2022-07-09 17:03:21 +00:00
Rafael Caricio adde6fc4e3
hlssink3: convert playlist type to an enum
Change the property `playlist-type` to an enum. We also expose the
new enum externally from the crate so users of Rust can directly use it.
2022-07-08 11:24:32 +02:00
Rajneesh Soni 08c6ab29e1 hlssink3: Put EXT-X-ENDLIST for vod playlist-type.
Ideally, when player encounter PLAYLIST-TYPE is VOD, player should
not reload the playlist. For playlist-type=vod, initially we put
PLAYLIST-TYPE=EVENT, and later change it to VOD, which confuse some
players so we shold put ENDLIST here.
In any case putting ENDLIST is right thing to do to indicate no new
segment will be added to playlist.
2022-07-04 15:15:20 +00:00
Rajneesh Soni 4ff2c8f1bc hlssink3: Dont reset end_list after stop is called.
in current implementation EXT-X-ENDLIST is never set for any playlist-type.
After calling playlist.stop(), during write_final_playlist() is called.
in final playlist write, segment is not added but update_playlist is called.
and update_playlist reset end_list again, so plugin never put ENDLIST.
2022-07-04 15:15:20 +00:00
Sebastian Dröge 88bb91a5cb aws: Update to aws 0.15/0.45 2022-07-04 10:20:43 +03:00
Sebastian Dröge dda125edb5 ci: Update image version 2022-07-01 10:40:06 +03:00
Philippe Normand c6238a6a9f roundedcorners: Ensure alpha_mem is mutable when updating radius
The `get_mut()` function can return None when the memory is not writable, so
instead, make sure the memory is writable by using `make_mut()`.

Fixes #214
2022-06-30 17:10:13 +00:00
Philippe Normand d867ef9dee roundedcorners: Logging improvement
Cache the new border radius only after logging it, otherwise the same value
appears as old and new.
2022-06-30 17:10:13 +00:00
Sebastian Dröge 8e90abfebb fmp4mux: Handle PTS<segment.start when requesting keyframes 2022-06-30 16:51:03 +03:00