Commit graph

2254 commits

Author SHA1 Message Date
Raphael Dürscheid
55d30db53b Add property to specify certificate authority
Under certain circumstances one would like to use a self signed
certificate without the obstacles many browsers implement to
safeguard their users. One approach is to create a certificate
authority. One can now add this to the OS certificate store, or simply
add it to the browser. In the latter case one also needs to specify the
new authority on the webrtcsink. This commit enables this.
2022-03-31 15:23:11 +02:00
Vivia Nikolaidou
d48d732038 .gitlab-ci.yml: Fix deprecated -Zinstrument-coverage switch 2022-03-30 16:16:25 +03:00
Samuel Alonso Rodriguez
08b52ffd2f
Merge pull request #96 from ubifred/master
Drop NdiSrcMeta after ndisrcdemux
2022-03-28 19:11:06 +02:00
Guillaume Desmottes
5dab4bc502 uriplaylistbin: handle waiting items no longer being set
ab96219c19 broke some assertions as
waiting items are now unset when shutting down the element.
2022-03-28 13:02:40 +02:00
Sebastian Dröge
518e43fc5f cea608tott: Don't zero-pad SRT indices but zero-pad hours to at least two digits
Zero-padding is not specified for the indices but all time components
need to be zero-padded (3 digits for fractional seconds, 2 digits for
everything else).
2022-03-28 12:17:34 +03:00
François Laignel
59ca466081 ts: log max throttling when creating Context 2022-03-28 08:47:32 +00:00
François Laignel
1ef9ae6398 ts/jitterbuffer: don't wake up immediately...
... when next wakeup delay is shorter than the max throttling duration.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/169
2022-03-28 08:47:32 +00:00
François Laignel
8eb8ea0e7d ts/rt/Task: use light weight executor blocking on ack or join handle
Previous version used the Context::block_on_or_add_sub_task which
spawns a full-fledged executor with timer and io Reactor for no
reason when we just need to wait for a Receiver or JoinHandle.
2022-03-28 08:47:32 +00:00
François Laignel
c1615d01e6 ts/rt/Task: awake the iteration loop when it needs to be aborted
When the iteration loop is throttling, the call to `abort` on the
`loop_abort_handle` returns immediately, but the actual `Future`
for the iteration loop is aborted only when the scheduler throttling
completes. State transitions which requires the loop to be aborted &
which are serialized at the pipeline level can incur long delays.

This commit makes sure the Task Context's scheduler is awaken as soon
as the task loop is aborted.
2022-03-28 08:47:32 +00:00
François Laignel
97985d6442 ts/examples: add rtp mode with jitter-buffer & trace stop duration 2022-03-28 08:47:32 +00:00
Guillaume Desmottes
ab96219c19 uriplaylistbin: fix deadlock when shutting down
The probes on srcpad was not removed which was preventing the element to
reach the NULL state.
2022-03-28 10:10:42 +02:00
Mathieu Duponchelle
f6eb967cbe webrtcsink: address Sebastian's latest comments
+ refactor encoder-setup signal emission
+ document unused fields in navigation event handler
2022-03-26 00:16:29 +01:00
Guillaume Desmottes
e0d05353e8 uriplaylistbin: fix race when handling topology change
Keep the state mutex during the whole decodebin pad-added callback.
Fix a race when we were checking if state.waiting_for_ss_eos was set and
it was removed before we actually processed the item.

Fix #184
2022-03-25 14:33:02 +01:00
Frédéric Chanal
71dd5182f3 Drop NdiSrcMeta after ndisrcdemux
The NdiSrcMeta is no longer needed after the demux and if kept, it
generates many errors as the transform_func() always false.
2022-03-25 10:36:16 +01:00
Mathieu Duponchelle
b80cf1fb8e webrtcsink: turn NavigationEventHandler into a tuple wrapper
More elegant way of not bumping into the unused fields warning
than prefixing with _
2022-03-25 02:46:45 +01:00
Mathieu Duponchelle
983fcf2fbd webrtcsink: expose signal for initial encoder configuration
+ Update README
2022-03-25 02:34:53 +01:00
Mathieu Duponchelle
b5443c5966 webrtcsink: don't set msid-appdata on transceivers
The change was merged inadvertently alongside the display-name
API extension, we will probably eventually expose API on webrtcsink
pads to control that, but we won't just set it to pad.name() anyway.

Fixes #33
2022-03-24 17:46:51 +01:00
Sebastian Dröge
88edc93a8a reqwest: Don't unnecessarily borrow dereferenced values explicitly
warning: this expression borrows a value the compiler would automatically borrow
   --> net/reqwest/tests/reqwesthttpsrc.rs:126:56
    |
126 |                     async move { Ok::<_, hyper::Error>((&mut *http_func.lock().unwrap())(req)) }
    |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*http_func.lock().unwrap())`
    |
    = note: `#[warn(clippy::needless_borrow)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
2022-03-24 12:50:47 +02:00
Mathieu Duponchelle
70e6227c9a webrtcsink: reduce latency with vpx encoders
The lag-in-frames property needs to be explicitly set to 0
2022-03-23 02:44:25 +01:00
Mathieu Duponchelle
bd560fa9f9 protocol: allow registering with a display name
While the signalling server will allocate unique identifiers for
each peer, users may want to also pass their own identifiers.
2022-03-23 01:35:10 +01:00
Vivia Nikolaidou
c6feb31207 Revert "fallbackswitch: Forward custom downstream events from active sinkpad"
This reverts commit 9ebbae9d27.

It works even without the change.
2022-03-22 13:11:00 +02:00
Vivia Nikolaidou
9ebbae9d27 fallbackswitch: Forward custom downstream events from active sinkpad
This will allow us to forward e.g. SCTE-35 events
2022-03-21 15:30:36 +02:00
Sebastian Dröge
4874c7eb1f Correctly check for the DISCONT buffer flag to be set 2022-03-20 20:11:28 +02:00
Arun Raghavan
09a697faef rusoto: s3sink: Expose property to control all timeout/retry durations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-18 16:03:11 +05:30
Arun Raghavan
94c5cbbfb8 rusoto: s3sink: Make remaining requests bounded in time
This implements a default timeout and retry duration for the remaining
S3 requests that were still able to be blocked indefinitely. There are 3
classes of operations: multipart upload creation/abort (should not take
too long), uploads (duration depends on part size), multipart upload
completion (can take several minutes according to documentation).

We currently only expose the part upload times as configurable, and hard
code the rest. If it seems sensible, we can expose the other two sets of
parameters as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-18 16:03:10 +05:30
Arun Raghavan
5fe95afe87 s3src: Consolidate stream reading into get object retries
Previously, the actual reading from the streaming body of a GetObject
request was not within the same timeout/retry path as the dispatch of
the HTTP request itself. We consolidate these two into a single async
block and create a sum type to encapsulate the rusoto and std library
error paths within that future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-18 16:02:20 +05:30
Arun Raghavan
22bb6ec74a rusoto: s3src: Implement timeout and retries
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-18 15:17:37 +05:30
Mathieu Duponchelle
bd88395859 signalling: update protocol, reimplement in rust 2022-03-17 18:31:54 +01:00
Sebastian Dröge
4a54001aed fallbacksrc: Flush source before restarting on errors
It might still be blocked downstream for a while, e.g. in the clocksync.

Flushing does not cause any problems as fallbackswitch is not going to
forward it and will only unblock everything up to there.
2022-03-17 16:12:34 +00:00
Arun Raghavan
e973d41bac rusoto: s3sink, s3src: Retry on server errors
We can retry in the case of 500/503/other errors that might occur that
might be recoverable, instead of bailing.
2022-03-17 04:51:00 +00:00
Ray Tiley
a3db85d869 awstranscribe - increase presisigned url duration to 5 mins from 60s
Have seen a few times where machines that are in perfect time sync with a good source the requests fail with `RequestExpired` errors.

https://docs.aws.amazon.com/transcribe/latest/dg/CommonErrors.html

While not perfect, bumping to five minutes gives more a chance that the signed requests to start streaming won't be expired.
2022-03-16 11:45:49 +00:00
Ray Tiley
dd028ce97e [transcriberbin] - make audioqueue leaky
If transcription runs slow or has issues the queue can fill up and block
all audio processing. This gives the queue a sufficent buffer and allows
it to drop audio if it eventually fills up. This was most noticable with
bad internet connections using the `awstrnascriber` where it would take
quite a while for the websocket to eventually timeout and the bin to
enter `passthrough=true`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/688>
2022-03-15 20:27:02 +00:00
Sebastian Dröge
22585a0383 deny: Ignore duplicated wasi dependency 2022-03-14 11:49:04 +02:00
Sebastian Dröge
6cf7d28481 Use SPDX license format in Cargo.toml 2022-03-14 10:23:16 +02:00
Seungha Yang
aac7e52d87 transcriberbin: Don't notify signal inside lock
That can potentially cause deadlock
2022-03-10 20:10:30 +09:00
Seungha Yang
9e6fc2983f transcriberbin: Add caption-source property
By using this new property, application can select exclusive caption
source. There are three source types
- Both: Inband and transcription captions are combined if exist.
  This is default behavior.
- Inband: Transcription buffers will be dropped
- Transcription: Caption meta of each video buffer will be dropped

In this version, transcriberbin doesn't provide any hint
for application to help caption source decision. That can be done
by application's strategy, passthrough status or probing inband
caption meta for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/684>
2022-03-08 23:51:28 +09:00
Seungha Yang
ecf03d0e5c transcriberbin: Fix deadlock
Fix race between latency query handler and setup_transcription()
method.

Locking order of setup_transcription() is
state lock -> setup_transcription() -> settings lock
So taking state lock inside of setting lock in src_query()
can cause deadlock.
2022-03-08 22:38:55 +09:00
Guillaume Desmottes
8389bff7d8 fallbackswitch: properly handle GAP events
Handle GAP events from the active pad as activity and forward
downstream.
2022-03-03 11:48:26 +01:00
Guillaume Desmottes
7b109785be fallbackswitch: factor out handle_main_timed_item()
No semantic change, I'll re-use this to handle GAP events.
2022-03-03 10:01:59 +01:00
Guillaume Desmottes
31864c9a9d fallbackswitch: add support for buffers without pts
Re-use the previously seen PTS.

Fix #186
2022-03-02 13:32:06 +01:00
Mathieu Duponchelle
526f34d98b fmp4mux: HLS live example
Producing two audio playlists, a video playlist and a super
manifest, and implementing basic trimming of old segments.
2022-03-02 10:01:38 +00:00
Mathieu Duponchelle
35d9247487 fmp4mux: HLS VOD example
Producing two audio playlists, a video playlist and a super
manifest
2022-03-02 10:01:38 +00:00
Guillaume Desmottes
73cfb357c6 fallbackswitch: export GEnum used in properties
Rust applications will be able to use those directly.
2022-03-01 14:44:16 +01:00
Mathieu Duponchelle
7f000ea42b webrtcsink: trigger negotiation manually
We no longer connect to on-negotiation-needed, this in order to call the
consumer-added signal without holding the state lock:

Going to Ready triggers synchronous emission of the on-negotiation-needed
signal, during which time the application may add a data channel, causing
renegotiation, which we do not support at this time.

This is completely safe, as we know that at that point all conditions are
gathered: webrtcbin is in the Ready state, and all its transceivers have
codec_preferences.
2022-03-01 02:32:50 +01:00
Mathieu Duponchelle
3a5e05f2ab webrtcsink: emit consumer-added with webrtcbin in the Ready state
In order for applications to potentially create data channels at
the correct moment
2022-03-01 02:32:50 +01:00
Samuel Alonso Rodriguez
83797e9df3
Merge pull request #94 from seungha-yang/audio-discont
Set discont flag on the first audio buffer correctly
2022-02-28 19:15:10 +01:00
Sebastian Dröge
b38f6cc731 Remove now unnecessary Send+Sync impls for element/etc subclasses
This is now automatically implemented.
2022-02-28 18:56:58 +02:00
Guillaume Desmottes
d9f3e8e9e7 uriplaylistbin: disable test deadlocking 2022-02-28 16:48:13 +01:00
Seungha Yang
b682833cca Set discont flag on the first audio buffer correctly
Fixing typo which should check audio buffer not video
2022-02-28 22:16:45 +09:00
Sebastian Dröge
04648546d1 rusoto: Update async-tungstenite dependency to 0.17 2022-02-28 09:31:58 +02:00