Commit graph

386 commits

Author SHA1 Message Date
Sebastian Dröge
e79221f386 rtpav1depay: Fix error handling
Don't error out immediately on errors anymore but try again with the
next packet.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:13:19 +02:00
Sebastian Dröge
dc47b35536 rtpav1depay: Set DISCONT flag on buffers following a corrupted packet
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:13:13 +02:00
Sebastian Dröge
3520fc67de rtpav1depay: Don't output full TUs but just OBUs as they come
Simplifies state tracking and potentially reduces latency as it's not
necessary to wait until all fragments of an OBU are received.

The last OBU of a TU is marked with the marker flag to allow parsers to
detect this without first seeing the beginning of the next TU.

Also use a simple `Vec` for collecting complete OBUs instead of a
`gst_base::Adapter` as this reduces the number of allocations.

And also handle invalid packets a little bit more gracefully.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:13:06 +02:00
Arun Raghavan
f3b8288ef9 aws: s3hlssink: Fix the name of the hlssink child element
It's easier to set child element properties if the name doesn't depend
on the factory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:05:58 +02:00
Sebastian Dröge
5c2582d105 Update version to 0.9.8 2023-01-23 11:30:27 +02:00
Sebastian Dröge
4ba452dcc3 Update versions to 0.9.7 2023-01-19 19:06:43 +02:00
Sebastian Dröge
c818a575b4 Update versions to 0.9.6 2023-01-18 17:19:17 +02:00
Sebastian Dröge
d02508a7d0 aws: Update to AWS SDK 0.53/0.23
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1050>
2023-01-18 16:56:10 +02:00
Mathieu Duponchelle
53ae335d22 webrtcsink: fix panic on pre-bwe request error
We dispose of consumer pipelines asynchronously, potentially after the
session objects have been disposed of.

As session objects are the owner of the cc element, it is entirely
possible for the bwe-request signal to get emitted after cc has been
disposed of, as the closure only takes a weak reference to it.

Fix by simply checking if cc is None

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1045>
2023-01-11 18:38:13 +02:00
Sebastian Dröge
2a8a90f76f Update versions to 0.9.5 2023-01-07 16:06:17 +02:00
Sebastian Dröge
4b936950c2 aws: Update to test-with 0.9
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:25:37 +02:00
rajneeshksoni
698ab100b3 awss3hlssink: Add stats property.
application can monitor the progress of hls segment generation
and upload progress.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:25:31 +02:00
Philippe Normand
517dc286d0 rtpav1depay: Implement srcpad set_caps
Without this auto-pluggers such as decodebin or parsebin will be unable to
process AV1 RTP payloads.

Tested with: `videotestsrc num-buffers=50 ! videoconvert ! av1enc ! av1parse ! rtpav1pay ! queue ! decodebin3 ! videoconvert ! queue ! autovideosink`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:25:15 +02:00
Sebastian Dröge
b0bd55c4d2 Update versions to 0.9.4 2022-12-27 13:14:59 +02:00
Sebastian Dröge
deeff67f94 aws: Update to AWS SDK 0.52/0.22
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1027>
2022-12-27 12:39:56 +02:00
Sebastian Dröge
bae5294e8f Update versions to 0.9.3 2022-12-16 20:22:17 +02:00
Mathieu Duponchelle
fffd7dc542 webrtc/README: update command to run the signalling server
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/277

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1017>
2022-12-16 18:51:08 +02:00
Sebastian Dröge
b4185134d1 Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1017>
2022-12-16 18:51:00 +02:00
Sebastian Dröge
7b1ee9f948 webrtchttp: Remove unnecessary clippy warning override
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 14:31:33 +02:00
Sebastian Dröge
8c27aefe76 net: Update to async-tungstenite 0.19
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:39:38 +02:00
Sebastian Dröge
412c191fc2 whipsink: Handle offer creation errors more gracefully
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:39:16 +02:00
Sebastian Dröge
e46d2dfa54 webrtchttp: Fix missing import for docs build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:39:10 +02:00
Sebastian Dröge
e4788662b9 webrtchttp: Don't use let-else for now
We still support Rust 1.63.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:39:04 +02:00
Sebastian Dröge
cab5410782 webrtchttp: Fix formatting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:38:59 +02:00
Sanchayan Maity
8ac5632561 webrtchttp: Use tokio runtime for spawning thread used for candidate offer
While at it, we had a bug in whepsrc where for redirect we were
incorrectly calling initial_post_request instead of do_post. Fix
that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:38:53 +02:00
Sanchayan Maity
4f67623c22 webrtchttp: Use a proper Rust type name for ICE transport policy
We don't need to namespace here but can just use the Rust namespaces.
Only the GType name has to stay like it is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:38:48 +02:00
Sanchayan Maity
1d4d9b3bdb webrtchttp: Do not import element_imp_error
element_imp_error and such macros should not be imported but rather
only be accessed via gst namespace.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:38:41 +02:00
Sanchayan Maity
3202c4dc39 webrtchttp: Do not block webrtcbin signal handlers for sending candidates
While at it, drop the OPTIONS request in WHIP sink. This was not really
required. See section 4.4 of the spec
https://www.ietf.org/archive/id/draft-ietf-wish-whip-01.html#name-stun-turn-server-configurat

Also introduce a new error type and distinguish between a future being
aborted or returning an error.

We call abort only during shutdown and hence except for the DELETE
resource request being aborted, other waits on future should not
be fatal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:38:36 +02:00
Alba Mendez
3bc9df7e71 webrtchttp: whipsink: construct TURN URL correctly
Right now the code manually pieces together the components
in a String for efficiency. When credentials contain special
characters this can result in invalid URLs, so do it the proper
way (with Url::parse + format) to make sure components are escaped
as needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:38:29 +02:00
Sanchayan Maity
929c48e19a webrtchttp: Drop unused dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:38:20 +02:00
Sanchayan Maity
4e9ec324e1 webrtchttp: Implement timeout for waiting on futures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:37:47 +02:00
Sanchayan Maity
3fc0326084 webrtchttp: whipsink: Add candidates when sending the offer
WHIP endpoint providers like Cloudflare do not support Trickle ICE
and need candidates to be send along with the initial offer. Instead
of sending the offer in create-offer promise, send it once the ICE
candidates have been gathered.

While at it add properties to set STUN and TURN server along with the
ICE transport policy as at least when testing the Cloudflare WHIP
endpoint seems unreachable without it. This has also been observed
with Cloudflare provided demos.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:37:43 +02:00
Sanchayan Maity
420716fb63 webrtchttp: whipsink: Miscellaneous clean up
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:37:35 +02:00
Sanchayan Maity
baf3da86cc webrtchttp: Factor out the common bits for WHIP and WHEP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:37:30 +02:00
Sanchayan Maity
2e529fa152 Add a WebRTC WHEP source element
This implements WHEP specification based on
https://datatracker.ietf.org/doc/html/draft-murillo-whep-00

and has been tested with Cloudflare.

Server offers are likely to be removed from the WHEP specification
in upcoming revisions, to avoid compatibility issues. None of the
commercial services implementing WHEP support server initiated offers.
So we only support client side initiated offers.

Follows session setup and tear down as covered in Figure 1, Section 3
of the specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:37:13 +02:00
Raphael Dürscheid
184f879bf7 webrtcsink: Support nvv4l2vp9enc
Naive support for nvv4l2vp9enc by assuming configuration is equivalent
to existing nvv4l2vp8enc. Validated to have relevant properties.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:37:00 +02:00
Jordan Petridis
bfe62488f4 net/ndi: fix build with --no-default-features
doc_show_default() is only available with gst/v1_18

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:30:57 +02:00
Vivia Nikolaidou
a59a0340cf ndisrc: Use actual number of channels in positions_from_mask
Otherwise it fails for mono and stereo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/992>
2022-11-29 12:19:26 +02:00
Vivia Nikolaidou
cadf36ff01 ndisrc: Use default channel mask for audio output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/989>
2022-11-28 17:10:08 +02:00
Sebastian Dröge
1f4a035dc0 Update versions to 0.9.2 2022-11-28 11:44:33 +02:00
Sebastian Dröge
931917e559 aws: Update to env_logger 0.10 for the tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/986>
2022-11-27 20:53:13 +02:00
Arun Raghavan
b015688447 aws: s3sink: Treat stopping without EOS as an error for multipart upload
This allows us to try to clean up based on configuration (abort /
complete / do nothing) if the pipeline is shut down without an EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/986>
2022-11-27 20:44:15 +02:00
Sebastian Dröge
e434fd19ca Update versions to 0.9.1 2022-11-13 20:23:47 +02:00
Guillaume Desmottes
331d053516 webrtc: README: fix couple of links
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977>
2022-11-12 15:52:50 +00:00
Mathieu Duponchelle
5c9bc03eab webrtcsink: improve debug
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977>
2022-11-12 15:52:50 +00:00
Sebastian Dröge
2e3373647a Add missing doc features to WebRTC plugins
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977>
2022-11-12 15:52:50 +00:00
Jan Beich
bdb423e2b9 ndi: provide Unix fallback after 3fe9e4a207
error[E0425]: cannot find value `LIBRARY_NAME` in this scope
   --> net/ndi/src/ndisys.rs:336:23
    |
336 |             path.push(LIBRARY_NAME);
    |                       ^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `LIBRARY_NAME` in this scope
   --> net/ndi/src/ndisys.rs:339:33
    |
339 |             path::PathBuf::from(LIBRARY_NAME)
    |                                 ^^^^^^^^^^^^ not found in this scope

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977>
2022-11-12 15:52:49 +00:00
Arun Raghavan
6b3f0f764e aws: Skip s3 test on Windows until we figure out why it times out
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977>
2022-11-12 15:52:49 +00:00
Sebastian Dröge
07f3b0f504 Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977>
2022-11-12 15:52:49 +00:00
Sebastian Dröge
f2f0eb30e0 webrtc: Update to human_bytes 0.4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977>
2022-11-12 15:52:49 +00:00
Sebastian Dröge
b596b407f6 aws: Update to aws 0.21/0.51
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977>
2022-11-12 15:52:49 +00:00
Sebastian Dröge
790453364d whipsink: Add object to debug logs 2022-10-27 15:34:52 +03:00
Guillaume Desmottes
15955758b6 aws: fix title in README
The title was not matching the actual plugin name which was confusing.
2022-10-27 15:34:52 +03:00
Sebastian Dröge
ba5270d30a Update to release versions of gtk-rs and gstreamer-rs 2022-10-24 19:28:41 +03:00
Sebastian Dröge
2ff40142db Update versions to 0.9.0 2022-10-24 18:25:05 +03:00
Sebastian Dröge
b64f951160 Update to async-tungstenite 0.18 2022-10-24 18:03:33 +03:00
Sebastian Dröge
9a68f6e221 Move from imp.instance() to imp.obj()
It's doing the same thing and is shorter.
2022-10-23 23:08:46 +03: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
Sebastian Dröge
f045099fc1 Fix GObject type names, GStreamer debug category names and element factory names
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/198
2022-10-23 20:46:08 +03:00
Sebastian Dröge
5d44e0eb3c rtp: Move GCC bandwidth estimation element from webrtc to rtp plugin 2022-10-23 20:25:08 +03:00
Sebastian Dröge
20ad9175d8 Make GStreamer plugin/crate/library/directory names and descriptions consistent
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/238
2022-10-23 20:25:08 +03:00
Sebastian Dröge
45168639e9 Rename rtpav1 plugin to just rtp
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/243
2022-10-23 20:04:43 +03:00
Sebastian Dröge
f058a5e229 Various minor cleanups 2022-10-22 19:50:24 +03:00
François Laignel
6319d104a8 Take advantage of Into<Option<_>> args
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-21 11:54:24 +02:00
Sebastian Dröge
7b5d887c5b onvifmetadatacombiner: On timeout don't wait for metadata to arrive anymore but output the current video frame
Otherwise it will be too late downstream.
2022-10-21 07:08:46 +00:00
Sebastian Dröge
09ffeaf04e onvifmetadatacombiner: Add a lot of trace debug output 2022-10-21 07:08:46 +00:00
Thibault Saunier
5c89c3db69 webrtc: Rename and add to meson build the signalling server
The binary was only called `server` it has been renamed to
`gst-webrtc-signalling-server` and is installed in meson.
2022-10-20 18:20:15 +00:00
Thibault Saunier
cbdd3a7f26 webrtc: Enhance documentation 2022-10-20 12:04:43 +00:00
Sebastian Dröge
c0bf05d4bb webrtc: Minor cleanup 2022-10-20 13:20:32 +03:00
Thibault Saunier
71ed04d89b webrtc: Rename signaller and protocol crates 2022-10-20 13:32:31 +02:00
Thibault Saunier
25bda89ac8 webrtc: Update an unify rust-version and edition
So it all matches the rest of the plugins
2022-10-20 13:32:31 +02:00
Thibault Saunier
4942a916a8 webrtc: Uniformise GType names 2022-10-20 13:32:31 +02:00
Thibault Saunier
37c0239aff webrtc: Port to new ElementBuilder API 2022-10-20 13:32:31 +02:00
Thibault Saunier
ad78936365 webrtc: Enable more documentation 2022-10-20 13:32:31 +02:00
Thibault Saunier
0f0dec7fa9 webrtc: Fix fmt issues 2022-10-20 11:51:59 +02:00
Thibault Saunier
5ab7be6124 webrtc: Add SDPX license header on every file 2022-10-20 11:51:58 +02:00
Thibault Saunier
39c0dcb0d4 Plug webrtc in 2022-10-20 11:51:58 +02:00
Thibault Saunier
b164daf510 webrtc: Fix clippy issues 2022-10-20 11:51:58 +02:00
Thibault Saunier
87fd49a9bf webrtc:signalling: Remove short option for 'host' in the cli
It clashes with `--help`
2022-10-20 11:51:58 +02:00
Thibault Saunier
eb9d0bb824 Merge 'webrtcsink' from 020c7e2900 2022-10-20 11:51:58 +02:00
Sebastian Dröge
12400b6b87 Update everything for element factory builder API changes
And set properties as part of object construction wherever it makes
sense.
2022-10-19 19:43:29 +03:00
Sebastian Dröge
9ce8e93c63 rtpav1pay: Track last known upstream PTS/DTS in case not all OBUs are properly timestamped 2022-10-19 15:42:48 +03:00
Sebastian Dröge
36861edf9a rtpav1pay: Use a VecDeque instead of a Vec for the queued OBUs
And use a `Vec` plus offset for consuming partial byte buffers.
Removing the first element from a `Vec` repeatedly is not very cheap.

Also simplify calculation of the current packet by removing a mostly
unused type and keeping track of the calculations always locally instead
of sometimes storing it in the element state.
2022-10-19 15:23:10 +03:00
Sebastian Dröge
24b7cfc841 Update for GStreamer API changes 2022-10-18 19:26:52 +03:00
Arun Raghavan
03b03fe2dd whipsink: Log error body along with status code when POST fails 2022-10-18 17:01:36 +02:00
Thibault Saunier
5e7537953c webrtc: Move to net/webrtc 2022-10-18 15:18:53 +02:00
Sanchayan Maity
c63307e6d7 net/webrtc-http: whipsink: Return a proper error message & not panic
On a server error, we currently crash and panic. Return a proper error
message instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/914>
2022-10-18 10:38:57 +00:00
François Laignel
8011eadfd2 Use new format constructors
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1128
2022-10-18 10:36:59 +00:00
Arun Raghavan
e66378d254 aws: Add a test for s3src/s3sink
This does rely on AWS credentials being provided in the environment, but
the test will be ignored if those are missing.
2022-10-18 09:51:34 +00:00
Sebastian Dröge
e17688a2da Update for pango API changes 2022-10-17 20:02:02 +03:00
Vivia Nikolaidou
0ab965335f onvifmetadataoverlay, cea608overlay: Fix pangocairo::FontMap::new()
It doesn't return an Option anymore.
2022-10-14 18:12:33 +03:00
Vivia Nikolaidou
f11b0fa5eb plugins, examples, tutorials: Use AudioCapsBuilder and VideoCapsBuilder
Simplify caps creation code
2022-10-13 19:24:57 +00:00
Sebastian Dröge
862c2af1d9 ndi: Remove unnecessary explicit Send+Sync impls
These are automatically available now.
2022-10-13 17:54:08 +00:00
Vivia Nikolaidou
dbd5a44b90 hlssink3: Use #[cfg(feature = "doc")] on gst::prelude import
It otherwise gives a warning about the unused import
2022-10-13 14:22:36 +03:00
Sebastian Dröge
5f19639d0f ndi: Various code cleanup 2022-10-13 08:52:52 +00:00
Sebastian Dröge
b2ddb34258 onvif: Switch from minidom to xmltree for parsing ONVIF timed metadata
minidom doesn't handle various valid but suboptimal XML documents.
2022-10-12 21:00:13 +00:00
Sebastian Dröge
97e0852156 ndi: Add NDI plugin to the docs 2022-10-12 22:25:13 +03:00
Sebastian Dröge
53b02a82ae ndi: Re-organize code a bit and don't make internal modules public 2022-10-12 22:09:56 +03:00
Sebastian Dröge
0a2e6e47c9 ndi: Silence some more clippy warnings 2022-10-12 22:09:55 +03:00
Sebastian Dröge
db8037d16c ndi: Update for pad default functions API changes 2022-10-12 22:09:55 +03:00