Commit graph

3145 commits

Author SHA1 Message Date
Sebastian Dröge
1a03edd27d webrtc: Update to async-tungstenite 0.26
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1616>
2024-06-14 05:46:18 +00:00
Sebastian Dröge
61d2259b6b webrtchttp: Fix race condition when unlocking
It would be possible that there is no cancellable yet when unlock() is
called, then a new future is executed and it wouldn't have any
information that it is not supposed to run at all.

To solve this remember if cancellation should happen and reset this
later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1617>
2024-06-13 13:19:41 +00:00
Sebastian Dröge
d7b2f15df6 aws: Fix race condition when unlocking
It would be possible that there is no cancellable yet when unlock() is
called, then a new future is executed and it wouldn't have any
information that it is not supposed to run at all.

To solve this remember if unlock() was called and reset this in
unlock_stop().

Also implement actual unlocking in s3hlssink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1617>
2024-06-13 13:19:41 +00:00
Sebastian Dröge
c59be26b5c spotifyaudiosrc: Fix race condition when unlocking
It would be possible that there is no cancellable yet when unlock() is
called, then the setup task is started and it would simply run and being
waited on instead of not being run at all.

To solve this, remember if unlock() was called and reset this in
unlock_stop().

Also make sure to not keep the abort handle locked while waiting,
otherwise cancellation would never actually work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1617>
2024-06-13 13:19:41 +00:00
Sebastian Dröge
6fd184cc96 reqwesthttpsrc: Fix race condition when unlocking
It would be possible that there is no cancellable yet when unlock() is
called, then a new future is executed and it wouldn't have any
information that it is not supposed to run at all.

To solve this remember if unlock() was called and reset this in
unlock_stop().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1617>
2024-06-13 13:19:41 +00:00
Sebastian Dröge
ec26fcc65a ndi: Add support for loading NDI SDK v6
The library name and environment variable name have changed but the ABI
is completely compatible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1615>
2024-06-13 13:01:11 +00:00
Sebastian Dröge
ac79b52cff rtp: Don't restrict payload types for payloaders
WebRTC uses payload types 35-63 as dynamic payload types too to be able
to place more codec variants into the SDP offer.

Instead of allowing just certain payload types, completely remove any
restrictions and let the user decide. There's technically nothing wrong
with using any payload type, especially when using the encoding-name.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1595>
2024-06-13 12:37:52 +00:00
Francisco Javier Velázquez-García
205cc10e6e webrtcsink: Refactor value retrieval to avoid lock poisoning
When setting an incorrect property name in settings,
start_stream_discovery_if_needed would panic because it attempts to
unwrap a poisoned lock for settings.

This refactor avoids that situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1598>
2024-05-31 12:41:45 +03:00
Francisco Javier Velázquez-García
3cdb350626 webrtcsink: Fix typo in property name for av1enc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1598>
2024-05-31 12:41:45 +03:00
cdelguercio
88b8e35871 webrtcsink: Support av1 via nvav1enc, av1enc, and rav1enc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1597>
2024-05-31 11:18:08 +03:00
Sebastian Dröge
9c3182132e Update versions to 0.12.6 2024-05-23 17:20:54 +03:00
Sebastian Dröge
3c15b3109b Update CHANGELOG.md for 0.12.6 2024-05-23 17:20:31 +03:00
Sebastian Dröge
8e0f10196f Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:23:50 +03:00
cdelguercio
32b987d73e webrtcsink: Add VP9 parser after the encoder for VP9 too
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:21:54 +03:00
Sebastian Dröge
4be259035c deny: Update with itertool 0.12 override
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:21:45 +03:00
Sebastian Dröge
73158bf58b aws: Update to base32 0.5
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:21:25 +03:00
Robert Ayrapetyan
3036cadd20 webrtc: add support for insecure tls connections
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:19:26 +03:00
Mathieu Duponchelle
ea832a6726 examples/dash_vod: compare durations to the millisecond
Otherwise when the segment durations aren't as clean cut as in the
example, multiple segments with the exact same duration in milliseconds
will get output, even though they could have been repeated.

Fix this so that people copying this code don't encounter the bug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:19:20 +03:00
Martin Nordholts
d0dc85293d rtpgccbwe: Also log self.measure in overuse_filter()
Also log `self.measure` in overuse_filter() since tracking
`self.measure` over time help a lot in making sense of
`self.estimate` (and `amplified_estimate`).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:18:01 +03:00
Martin Nordholts
be72988545 rtpgccbwe: Rename variable t to amplified_estimate
We normally multiply `self.estimate` with `MAX_DELTAS` (60).
Rename the variables that holds the result of this
calculation to `amplified_estimate` to make the distinction
clearer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:17:56 +03:00
Sebastian Dröge
64949458ef gtk4: Fix Python example in the non-GL code path
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:17:50 +03:00
Sebastian Dröge
9b166691ad gtk4: Clean up Python example
It's not more or less equivalent to the Rust example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:15:22 +03:00
Rafael Caricio
6c67c00113 fmp4mux: Support AV1 packaging in the fragmented mp4 plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:15:05 +03:00
135de50918 fmp4mux: Add language from tags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:14:54 +03:00
Martin Nordholts
536601e65d rtpgccbwe: Log effective bitrate in more places
While monitoring and debugging rtpgccbwe, it is very helpful
to get continuous values of what it considers the effective
bitrate. Right now such prints will stop coming once the
algorithm stabilizes. Print it in more places so it keeps
coming. Use the same format to make it simpler to extract
the values by parsing the logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:14:20 +03:00
Martin Nordholts
26f63c5e1e rtpgccbwe: Add mising 'ps' suffix to 'kbps' of 'effective bitrate'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:14:13 +03:00
Martin Nordholts
3a6c663f3c rtpgccbwe: Log delay and loss target bitrates separately
When debugging rtpgccbwe it is helpful to know if it is
delay based or loss based band-width estimation that puts a
bound on the current target bitrate, so add logs for that.

To minimize the time we need to hold the state lock, perform
the logging after we have released the state lock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:13:53 +03:00
Sebastian Dröge
cfbefb9b9e gtk4: Fix description of the plugin
A paintable is not a widget and that aspect does not belong in the short
description anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:13:47 +03:00
Mathieu Duponchelle
e72e361b63 webrtcsink: improve error when no discovery pipeline runs
If for instance no encoder was found or the RTP plugin was missing,
it is possible that no discovery pipeline will run for a given stream.

Provide a more helpful error message for that case.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/534
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:13:42 +03:00
Sebastian Dröge
1bee96ccb4 Fix new Rust 1.78 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:13:15 +03:00
Robert Mader
143baf9562 gtk4paintablesink: Add some documentation
And sync with `README.md` in order to make the environment variables
`GST_GTK4_WINDOW` and `GST_GTK4_WINDOW_FULLSCREEN` discoverable - and
because it's generally useful.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:09:55 +03:00
Robert Mader
82fd7ef48d gtk4paintablesink: Also create window for gst-play
So it can be easily tested with
```
gst-play-1.0 --videosink=gtk4paintablesink ...
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:09:51 +03:00
Robert Mader
659d5955c9 gtk4paintablesink: Add env var to fullscreen window
For testing purposes with e.g. gst-launch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1582>
2024-05-23 16:09:42 +03:00
Sebastian Dröge
d51226dce5 Update CHANGELOG.md for 0.12.5 2024-04-29 13:41:49 +03:00
Sebastian Dröge
44e1919f8e Update version to 0.12.5 2024-04-29 13:38:01 +03:00
Sebastian Dröge
2113905394 deny: Remove syn override
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 12:48:51 +03:00
Sebastian Dröge
45c04447cb Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 12:48:51 +03:00
Maksym Khomenko
a49581222a hrtfrender: use bitmask, not int, to prevent a capsnego failure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:52:24 +03:00
Sebastian Dröge
081b249c75 gtk4paintablesink: Update README.md with all the new features
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:52:17 +03:00
Sebastian Dröge
0f5002ca64 gtk4paintablesink: meson: Add auto-detection of GTK4 versions and dmabuf feature
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:52:10 +03:00
Sebastian Dröge
b225020bfb gtk4paintablesink: Improve scaling logic
If force-aspect-ratio=false then make sure to fully fill the given
width/height with the video frame and avoid rounding errors. This makes
sure that the video is rendered in the exact position selected by the
caller and that graphics offloading is going to work more likely.

In other cases and for all overlays, make sure that the calculated
positions are staying inside (0, 0, width, height) as rendering outside
is not allowed by GTK.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:52:03 +03:00
Sebastian Dröge
ced8040701 gtk4paintablesink: Add force-aspect-ratio property like in other video sinks
Unlike in other sinks this defaults to false as generally every user of
GDK paintables already ensures that the aspect ratio is kept and the
paintable is layed out in the most optimal way based on the context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:51:57 +03:00
Sebastian Dröge
3deae30442 gtk4paintablesink: Implement child proxy interface
This allows setting properties on the paintable from gst-launch-1.0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:51:49 +03:00
Sebastian Dröge
dad5b4e670 gtk4: Implement support for directly importing dmabufs
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/441

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:51:40 +03:00
Sebastian Dröge
b498c44df5 rtpgccbwe: Move away from deprecated time::Instant to std::time::Instant
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:50:29 +03:00
François Laignel
e1b8b8befd webrtcsink: don't panic if input CAPS are not supported
If a user constrained the supported CAPS, for instance using `video-caps`:

```shell
gst-launch-1.0 videotestsrc ! video/x-raw,format=I420 ! x264enc \
    ! webrtcsink video-caps=video/x-vp8
```

... a panic would occur which was internally caught without the user being
informed except for the following message which was written to stderr:

> thread 'tokio-runtime-worker' panicked at net/webrtc/src/webrtcsink/imp.rs:3533:22:
>   expected audio or video raw caps: video/x-h264, [...] <br>
> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The pipeline kept running.

This commit converts the panic into an `Error` which bubbles up as an element
`StreamError::CodecNotFound` which can be handled by the application.
With the above `gst-launch`, this terminates the pipeline with:

> [...] ERROR  webrtcsink net/webrtc/src/webrtcsink/imp.rs:3771:gstrswebrtc::
>   webrtcsink:👿:BaseWebRTCSink::start_stream_discovery_if_needed::{{closure}}:<webrtcsink0>
> Error running discovery: Unsupported caps: video/x-h264, [...] <br>
> ERROR: from element /GstPipeline:pipeline0/GstWebRTCSink:webrtcsink0:
>   There is no codec present that can handle the stream's type. <br>
> Additional debug info: <br>
> net/webrtc/src/webrtcsink/imp.rs(3772): gstrswebrtc::webrtcsink:👿:BaseWebRTCSink::
> start_stream_discovery_if_needed::{{closure}} (): /GstPipeline:pipeline0/GstWebRTCSink:webrtcsink0:
> Failed to look up output caps: Unsupported caps: video/x-h264, [...] <br>
> Execution ended after 0:00:00.055716661 <br>
> Setting pipeline to NULL ...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:50:12 +03:00
François Laignel
47429e2ed8 gccbwe: don't log an error when handling a buffer list while stopping
When `webrtcsink` was stopped, `gccbwe` could log an error if it was handling a
buffer list. This commit logs an error only if `push_list()` returned an error
other than `Flushing`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:49:21 +03:00
Sanchayan Maity
6d36b9160a aws: Introduce a property to use path-style addressing
AWS SDK switched to virtual addressing as default instead of path
style earlier. While MinIO supports virtual host style requests,
path style requests are the default.

Introduce a property to allow the use of path style addressing if
required.

For more information, see
https://github.com/minio/minio/blob/master/docs/config/README.md#domain
https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:49:04 +03:00
François Laignel
0c55ac9e31 webrtcsink: don't panic with bitrate handling unsupported encoders
When an encoder was not supported by the `VideoEncoder` `bitrate` accessors, an
`unimplemented` panic would occur which would poison `state` & `settings`
`Mutex`s resulting in other threads panicking, notably entering `end_session()`,
which lead to many failures in `BinImplExt::parent_remove_element()` until a
segmentation fault ended the process. This was observed using `vaapivp9enc`.

This commit logs a warning if an encoder isn't supported by the `bitrate`
accessors and silently by-passes `bitrate`-related operations when unsupported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:48:41 +03:00
Simonas Kazlauskas
18a51c360d mp4/fmp4: support flac inside the iso (f)mp4 container
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:48:33 +03:00