Commit graph

352 commits

Author SHA1 Message Date
Thibault Saunier
4b867d27fe Add a webrtcsrc element
Updating the docker image to include:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3236

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1117>
2023-03-02 14:56:30 -03:00
Sebastian Dröge
9a779607c7 Update versions to 0.9.10 2023-03-02 13:18:00 +02:00
Vivia Nikolaidou
a0fe1aba5f ndisinkcombiner: Properly handle caps changes
We are caching one video buffer, so previously we were changing the src
caps one buffer too early.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1116>
2023-03-02 11:01:18 +02:00
Thibault Saunier
e4c9ba43df webrtc: Enhance debug messages when using unknown peer ID
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1116>
2023-03-02 11:01:18 +02:00
Matthew Waters
0d3dc25414 webrtcsink: also support nvvidconv in lieu of nvvideoconvert
nvvideoconvert may not exist and nvvidconv might on some Jetson
platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1116>
2023-03-02 10:53:19 +02:00
Arun Raghavan
611c7d6cd3 hlssink3: Allow GIOStream signal handlers to return None
If creating a playlist or fragment stream fails (disk is full, the
directory is removed, ...), we will currently crash because the signal
handler expects a non-None GIOStream. The actual callback is allowed to
return None values and we handle this in the caller, so let's not have
this restriction on the signal handler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1098>
2023-02-21 16:17:45 +02:00
Seungha Yang
562b429388 rtpav1pay: Fix Leb128Bytes size parsing
There are multiple ways of encoding the value, and don't assume
that bitstream used the way used in this plugin. Instead, count
the number of used bytes.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/312
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1092>
2023-02-11 19:44:51 +02:00
Sebastian Dröge
eb3d3b3088 Update versions to 0.9.9 2023-02-09 22:08:17 +02:00
rajneeshksoni
01d3b0f9da awss3sink: Add properties to set content-Type and content-disposition.
for uploaded object default content-type is set to binary/octet-stream,
which is correct.
metadata cannot be used to set content-type and content-disposition as
setting metadata add a prefix x-amz-meta to key
e.g. setting metadate "content-type=video/mp4" actually set value as
x-amz-meta-content-type. So these has to be seaprate property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:43:57 +02:00
rajneeshksoni
f96b64e1c1 hlssink3: Allow setting i-frame-only playlist.
HLS allows manifest where all segments are single ifames.
This manifest requires `EXT-X-I-FRAMES-ONLY` tag in the
manifest.
I-FRAMES-ONLY playlist segments are video only segments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:43:57 +02:00
Sebastian Dröge
5f70c0f5fe rtpgccbwe: Don't use clamp() if there's no clear min/max value
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/305

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:43:57 +02:00
Sanchayan Maity
0e55e19d57 aws/s3hlssink: Fix deadlock on EOS
In state change to NULL, we take state lock and call stop. When stop
is called, we will try to upload queued segments in S3 request thread.
That tries to take the state lock again and deadlocks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:14:06 +02:00
Sanchayan Maity
7a8ecb5343 aws/s3hlssink: Use factory name when checking name of child element
Commit ad3f1cf fixed the name of hlssink child element to be the same
for hlssink2 and hlssink3. However, we rely on element name to return
boolean in case of hlssink3 or None in case of hlssink2 as the return
value of the delete-fragment closure.

Fix this by using the factory name instead of the element name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:14:01 +02:00
Sebastian Dröge
17dec1cb26 rtpav1pay: Add support for tu/frame aligned input
In this case every buffer can be sent out immediately and makes up a
whole frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:13:40 +02:00
Sebastian Dröge
ba0904630d rtpav1pay: Consider the marker flag to output packets immediately at the end of a frame
Otherwise it is necessary to wait for the beginning of the following
frame, which unnecessarily increases the latency.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:13:33 +02:00
Sebastian Dröge
af0e6281d2 rtpav1depay: Fix depayloading of packets starting with a leading OBU fragment followed by more OBUs
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/288

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:13:26 +02:00
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