Commit graph

2569 commits

Author SHA1 Message Date
Sebastian Dröge dfe2442c92 webrtc/signalling: Allow unknown clippy lints
tracing is adding some that require a newer Rust version than used here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 20:37:53 +03:00
Sebastian Dröge 84d6298729 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:08:02 +03:00
Mathieu Duponchelle 82f3910453 webrtcsink: don't try to use cudaconvert if not present
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:03:04 +03:00
François Laignel 460d6e1a74 mp4, fmp4: fix byte order for opus extension
The "Encapsulation of Opus in ISO Base Media File Format" [1] specifications,
§ 4.3.2 Opus Specific Box, indicates that data must be stored as big-endian.

In `write_dops`, `to_le_bytes` variants were used.

Related to [2].

[1] https://opus-codec.org/docs/opus_in_isobmff.html#4.3.2
[2] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4875

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:02:55 +03:00
Mathieu Duponchelle 55a6609fdb webrtcsrc: add twcc extension to codec-preferences when present
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:02:48 +03:00
Seungha Yang 9f6b0d426c mccparse: Map timecode to PTS directly without offset
Assumes that caption stream's timeline starts from zero,
and maps timecode time_since_daily_jam() to PTS directly without
subtracting the first seen timecode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:02:40 +03:00
Guillaume Desmottes 6f75243c8f fallbackswitch: add 'stop-on-eos' property
Fix the following use case:
- main input of fallbackswitch is finite (a media file)
- fallback input is infinite (videotestsrc)
- main input is done and send eos, which is propagated downstream
- fallbackswitch switches to fallback, sending STREAM_START which reset
  EOS downstream (aggregator does that)
- fallback input keeps pushing buffers forever.

Solve it by adding a 'stop-on-eos' property so fallbackswitch stops
pushing property once the main input is eos.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:02:33 +03:00
Guillaume Desmottes 68faccdacf fallbackswitch: remove unused SinkState::eos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:02:28 +03:00
Guillaume Desmottes aa1d89aa9f fallbackswitch: log when handling events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:02:23 +03:00
Sebastian Dröge 05b2caec74 webrtc: Update to fastrand 2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:02:16 +03:00
Sebastian Dröge c9b2c88469 Use MPL as license specifier for plugins only requiring GStreamer < 1.20
And use MPL-2.0 for all that require GStreamer 1.20 or newer. The new
string is only allowed in 1.20 or newer and using it in older versions
causes failure to load the plugin.

All affected plugins are of course still MPL-2.0 licensed.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1249>
2023-06-19 19:01:52 +03:00
Sebastian Dröge 530aab7af6 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 23:46:16 +03:00
Mathieu Duponchelle e64e12e478 net/aws/transcriber: track discont offset in input stream
and add it up to subsequent transcripts.

This ensures synchronization is maintained even after the input stream
experiences a discontinuity and a gap in its timestamps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 23:45:05 +03:00
Guillaume Desmottes 3a98bacd39 uriplaylistbin: use thiserror
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:54:34 +03:00
Guillaume Desmottes e33543dbfa uriplaylistbin: example: display iterations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:53:51 +03:00
Guillaume Desmottes 0285cb1339 uriplaylistbin: example display when leaving because of eos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:53:45 +03:00
Guillaume Desmottes 9b97e68da3 uriplaylistbin: prevent deadlock when notifying property changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:53:40 +03:00
Sebastian Dröge 9ae514f986 fmp4mux: Don't wait for more data if a stream has no GOP starting before fragment end
Simply don't output anything for this stream and only include it in the
future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:53:28 +03:00
Sebastian Dröge e8bd521154 fmp4mux: Consider a stream filled if the earliest GOP starts after the current chunk
There's not going to be any buffer to output for this stream in the
current chunk.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:53:19 +03:00
Edward Hervey 60ae3fc0b9 rtpgccbwe: Improve packet handling
Both the delay-based *and* loss-based estimates should be computed instead of
just one. This ensures faster adaptation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:53:07 +03:00
Sebastian Dröge 2002c54582 whipsink: Request pads with webrtcbin's pad templates and not our own
It's invalid to request pads with a pad template that is not part of the
element, and results in a critical warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:52:53 +03:00
Mathieu Duponchelle 8248425905 webrtcsink: further refactor connection to stats signals
- Stop passing webrtcbin around without using it

- Stop using glib::closure as clippy complains when using a unit type
  default-return

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:52:43 +03:00
Mathieu Duponchelle e9d32fb221 webrtcsink: fix stats_sigid logic
First off, we just created the session, we know stats_sigid is None
at this point.

Second, don't first assign the result of connecting on-new-ssrc to the
field, then the result of connection twcc-stats, that simply doesn't
make sense.

Finally, actually check that stats_sigid *is* None before connecting
twcc-stats, as I understand it this must have been the original
intention / behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:52:34 +03:00
Mathieu Duponchelle 8ff2c6609c webrtcsink: don't panic in twcc-stats callback
If webrtcbin was disposed of at this point, simply return

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/345
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:52:22 +03:00
Arun Raghavan d2947ed1f3 Revert "fmp4: Return a running time in get_next_time()"
This reverts commit 04bb7b4db0.

As Sebastian points out, the chunk PTS is already in running time, so
this was wrong from the start.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/363
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1234>
2023-06-06 22:52:02 +03:00
Sebastian Dröge df22c37268 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1216>
2023-05-18 19:09:42 +03:00
Thibault Saunier 0b65a2f8af webrtcsrc: Do not pass raw caps in the transceiver
That was not making sense.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1216>
2023-05-18 18:30:08 +03:00
Thibault Saunier 482ff879a4 webrtcsrc: Fix caps used when creating transceiver
We used to pass all media keys and attributes to the caps which
incorrect. Instead we should be using only the keys from the map
and remove all information related to rtcp which is irrelevant
to create the transceiver.

This also simplifies the code.

New caps look like:

```
Caps(
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 96,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "VP8",
    },
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 102,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "H264",
        packetization-mode: (gchararray) "1",
        profile: (gchararray) "baseline",
    },
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 104,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "H264",
        packetization-mode: (gchararray) "0",
        profile: (gchararray) "baseline",
    },
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 106,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "H264",
        packetization-mode: (gchararray) "1",
        profile: (gchararray) "constrained-baseline",
    },
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 108,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "H264",
        packetization-mode: (gchararray) "0",
        profile: (gchararray) "constrained-baseline",
    },
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 127,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "H264",
        packetization-mode: (gchararray) "1",
        profile: (gchararray) "main",
    },
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 39,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "H264",
        packetization-mode: (gchararray) "0",
        profile: (gchararray) "main",
    },
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 98,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "VP9",
        profile-id: (gchararray) "0",
    },
    application/x-rtp(memory:SystemMemory) {
        media: (gchararray) "video",
        payload: (gint) 100,
        clock-rate: (gint) 90000,
        encoding-name: (gchararray) "VP9",
        profile-id: (gchararray) "2",
    },
)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1216>
2023-05-18 18:30:08 +03:00
Seungha Yang cc59ff9052 fallbacksrc: Don't apply fallback-audio-caps to the main audio stream
Intended behavior is configuring audio convert/resample elements
only for the fallback stream and also fallback-audio-caps is set.
Video and image stream are doing it as intended already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1216>
2023-05-18 18:28:29 +03:00
Guillaume Desmottes 015edb7d37 fallbackswitch: document the pad priority ordering
I just wasted lots of time trying to figure out why my higher priority
pad wasn't used...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1216>
2023-05-18 18:28:24 +03:00
Sanchayan Maity e632d24dda videofx: border: Do not advertise I420 for non-zero border radius
In certain cases, roundedcorners would negotiate to I420 even when user
supplied a non-zero border radius.

For example, the below pipeline leads to I420 being negotiated even
though a non-zero border radius was given. Ideally, this pipeline
should have failed at the negotiation stage.

```bash
gst-launch-1.0 -v \
   videotestsrc num-buffers=1000 pattern=white ! \
   video/x-raw,width=320,height=180 ! \
   roundedcorners border-radius-px=10 ! videobox border-alpha=0 top=-10 left=-10 right=-10 bottom=-10 fill=yellow ! \
   compositor name=comp sink_0::xpos=960   sink_0::ypos=0  sink_0::width=320 sink_0::height=180 sink_0::alpha=1.0 sink_1::xpos=960 sink_1::ypos=180  sink_1::width=320 sink_1::height=180 sink_1::alpha=1.0  \
   sink_2::xpos=960 sink_2::ypos=360  sink_2::width=320 sink_2::height=180 sink_2::alpha=1.0 sink_3::xpos=0 sink_3::ypos=0  sink_3::width=960 sink_3::height=720 sink_3::alpha=1.0 ! \
   video/x-raw,width=1280,height=720! x264enc ! mp4mux ! filesink location=test.mp4 \
   videotestsrc num-buffers=1000 pattern=red ! \
   video/x-raw,width=320,height=180 ! roundedcorners border-radius-px=10 ! comp. \
      videotestsrc num-buffers=1000 pattern=blue ! \
   video/x-raw,width=320,height=180 ! roundedcorners border-radius-px=10 ! comp. \
      videotestsrc num-buffers=1000 pattern=green ! \
   video/x-raw,width=960,height=720 ! roundedcorners border-radius-px=10 ! comp.
```

If border radius is non-zero, we should not really allow negotiation
to select I420. Fix this by returning only A420 for border-radius > 0
in `transform_caps` instead of returning both like earlier.

Another example of a simpler pipeline like below which would earlier work

```bash
gst-launch-1.0 videotestsrc pattern=red ! videoconvert ! video/x-raw,width=1923,height=1087,format=I420 ! roundedcorners border-radius-px=40 ! video/x-raw,format=I420 ! videoconvert ! gtksink
```

now fails with

```bash
WARNING: erroneous pipeline: could not link roundedcorners0 to videoconvert1, roundedcorners0 can't handle caps video/x-raw, format=(string)I420
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1216>
2023-05-18 18:28:17 +03:00
Antonio Kevo 5bbbd7bd23 fmp4: Use updated start_pts when checking stream filled
After calculating the earliest pts, the fragment_start_pts and
chunk_start_pts in State are updated. However, when checking if the
stream is filled, the previous start_pts (set to None) is used instead.
This means that chunk_filled and fragment_filled will be false the first
time aggregate() is called, assuming timeout is false, all_eos is false,
and the sinkpad is not EOS. This requires aggregate() having to be
called a second time before the first fragment is sent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1216>
2023-05-18 18:28:08 +03:00
Sebastian Dröge 25fce80de6 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1204>
2023-05-09 18:31:20 +03:00
Sebastian Dröge 3c58f495ab deny: Update
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1204>
2023-05-09 16:56:41 +03:00
Nick Steel adfceaea77 spotify: check cached creds username before use
If a username was specified, only use cached credentials that match
that username.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1204>
2023-05-09 16:55:38 +03:00
Jan Beich fc5ff9503d gtk4: unbreak wayland, x11egl, x11glx features on non-Linux
As the features are non-default leave the responsibility to filter by
platform to consumers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1204>
2023-05-09 16:50:43 +03:00
Sebastian Dröge e31fd2dcc5 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1190>
2023-04-22 12:44:42 +03:00
Lily Foster 790383313d meson: support rust cross-compiling with cargo wrapper
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1190>
2023-04-22 12:44:42 +03:00
John King a434607515 spotify: fix credentials cache
Cache Spotify response instead of username and password.
This should resolve frequent "New login to Spotify" emails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1190>
2023-04-22 12:44:42 +03:00
Lily Foster 57fe64b748 meson: avoid passing the --features flag to wrapper when empty
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1190>
2023-04-22 12:10:55 +03:00
Edward Hervey f4a565d4ea rtpgccbwe: Don't process empty lists
The structure parsing could result in an empty vector. Don't do any processing
since the loss code assumes it's non-empty for average estimates which would
result in weird/invalid results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1190>
2023-04-22 12:10:43 +03:00
Arun Raghavan 5462ed0e95 ffv1dec: Drop rank for now
We'll keep the rank lower than avdec_ffv1, at least until we're
comfortable with support for the entire range of possible inputs working
well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1190>
2023-04-22 12:10:28 +03:00
Sebastian Dröge d67eb1d405 meson: Update version 2023-04-06 16:47:04 +03:00
Sebastian Dröge 1b007178af Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1161>
2023-04-05 19:55:38 +03:00
Sebastian Dröge e0a7c93d46 ndisrc: Fix copying of raw video frames with different NDI/GStreamer strides
And also don't copy each line twice for single-plane formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1161>
2023-04-05 18:17:31 +03:00
Sebastian Dröge 00d1c73ff1 deny: Update for older versions of the windows bindings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1161>
2023-04-05 18:17:26 +03:00
Tim-Philipp Müller 2d56989f5c git: replace LICENSE file symlinks with copies
Git will de-duplicate the contents for us anyway, and
symlinks can cause problems with some versions of git
and also on Windows.

https://github.com/mesonbuild/meson/issues/11646
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4326

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1161>
2023-04-05 18:17:16 +03:00
Sebastian Dröge f7c81e78f5 fallbacksrc: Don't check caps when linking to the fallbackswitch
Downstream might have different caps requirements and linking might
fail. Instead of having linking fail, give upstream an opportunity to
reconfigure and otherwise have a normal negotiation error during data
flow.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1161>
2023-04-05 18:17:10 +03:00
Guillaume Desmottes 25e9fc55b7 uriplaylistbin: example: add queues
Prevent pipeline starvation with some media such as
https://assets.onestream.live/studio/Videos/1080p/osl-interval-1080p-8.mp4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1161>
2023-04-05 18:17:05 +03:00
Vivia Nikolaidou f56f40a943 livesync: Actually assume zero upstream latency when query fails
The code said "assuming zero" but left latency at None instead of
Some(0), failing to unwrap the value later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1161>
2023-04-05 18:16:16 +03:00