When we receive a new alternative we want to avoid iterating out of
bounds, but the comparison between the current index and the length of
the alternative should not log an error when partial_index == length, as
Vec::drain(length..) is valid, and it is completely valid for AWS to
send us a new alternative with as many items as we have already
dequeued.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1751>
1c48d7065d was mistakenly merged too
early, and there were concerns about the implementation and API design:
The fact that the frontend had to expose a text area specifically for
sending over a mix matrix, and had to manually edit in floats into the
stringified JSON was suboptimal.
Said text area was always present even when remote control was not
enabled.
The sendControlRequest API was made more complex than needed by
accepting an optional stringifier callback.
This patch addresses all those concerns:
The deserialization code in webrtcsink is now made more clever and
robust by first having it pick a numerical type to coerce to when
deserializing arrays with numbers, then making sure it doesn't allow
mixed types in arrays (or arrays of arrays as those too must share
the same inner value type).
The frontend side simply sends over strings wrapped with a request
message envelope to the backend.
The request text area is only shown when remote control is enabled.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1725>
Allows you to switch output between folders without having to state change to READY to close the current playlist.
Closes the current playlist immediately and starts a new one at the currently set location.
Should be used after changing the relevant location properties.
Makes use of the send-headers signal in cmafmux.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1692>
webrtcsink was starting the negotiation process on Ready and concurrently
moving the consumer pipeline to Playing, but when answering the remote
description was set so fast that input streams were connected (and the time
format set on appsrc) before the state change to Paused had completed.
This meant gst_base_src_start was happening after that and setting the format
back to bytes, the time segment that was next coming in then caused:
basesrc gstbasesrc.c:4255:gst_base_src_push_segment:<video_0> segment format mismatched, ignore
And the consumer pipeline errored out.
The same issue existed in theory when webrtcsink was creating the offer,
but was much harder to trigger as it required that the remote answer
came in before the state change to Paused had completed.
This commit fixes the issue by simply waiting for the state to have
changed to Paused before negotiating.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1730>
Posts a simple 'hls-segment-added' message with the segment location, start running time and duration.
With hlssink2, it was possible to catch 'splitmuxsink-fragment-closed', but since hlssink3 doesn't forward that message
(and hlscmafsink doesn't even use that mux), the new one was added to allow for listening for new fragments being added.
I extended the existing tests to check whether this message is posted correctly.
They theoretically only cover hlssink3, but hlscmafsink uses the same base class so it should be alright for now.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1677>
This is one example of how a consumer might send over custom upstream
event requests to the producer.
As webrtcsink will deserialize numbers in priority as integers, we need
a custom stringifying function to ensure members of the matrix array are
indeed serialized with the floating point.
An optional stringifier parameter is thus added to the
sendControlRequest API.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1711>
.. and deprecate data channel navigation in favor of it.
A new property, "enable-data-channel-control" is exposed, when set to
TRUE a control data channel is offered, over which can be sent typed
upstream events.
This means further upstream events will be usable, for now only
navigation and custom upstream events are handled.
In addition, send response messages to notify the consumer of whether
its requests have been handled.
In the future this can also be extended to allow the consumer to send
queries, or seek events ..
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1711>
This makes the new payloaders closer to the old ones, and makes usage in
webrtcbin easier.
Also properly configure default PT of subclasses. Previously any PT that
was set for these subclasses via g_object_new() would be overridden by
the default one during construction.
Additionally, do SSRC collision handling while queueing output packets.
This is the more natural place as that's where the SSRC is actually
used, it happens potentially earlier and also allows to drain any
pending packets before the SSRC change in the caps.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/557
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
This commit adds support for raw payloads such as L24 audio to `webrtcsink` &
`webrtcsrc`.
Most changes take place within the `Codec` helper structure:
* A `Codec` can now advertise a depayloader. This also ensures that a format
not only can be decoded when necessary, but it can also be depayloaded in the
first place.
* It is possible to declare raw `Codec`s, meaning that their caps are compatible
with a payloader and a depayloader without the need for an encoder and decoder.
* Previous accessor `has_decoder` was renamed as `can_be_received` to account
for codecs which can be handled by an available depayloader with or without
the need for a decoder.
* New codecs were added for the following formats:
* L24, L16, L8 audio.
* RAW video.
The `webrtc-precise-sync` examples were updated to demonstrate streaming of raw
audio or video.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1501>
The certificate chain was incorrectly being passed the private key instead
of certificate. With rustls 0.23.11 version, this error was being caught
and reported. As stated in the 0.23.11 release, it has a new feature
"API for determining whether a CertifiedKey's certificate and private key
matches: keys_match(). This is called from existing fallible functions
that accept a private key and certificate (for example, with_single_cert())
so these functions now detect this misconfiguration."
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1666>