Commit graph

2254 commits

Author SHA1 Message Date
Sebastian Dröge 31a32a7e2e fmp4mux: Add support for writing out multiple tracks in the serialization code
Not yet exposed from the element.
2022-05-12 18:31:02 +03:00
Sebastian Dröge c09b7b9e41 fmp4mux: Port to aggregator as base class as preparation for supporting multiple streams 2022-05-12 18:31:02 +03:00
Sebastian Dröge 23cc00ce4b fmp4mux: Write sample flags in tfhd if there's only a single sample
Instead of declaring them to be in the `tfhd` but not writing them into
the `tfhd` but also not the `trun`.
2022-05-12 18:31:02 +03:00
Jan Alexander Steffens (heftig) d27e279272
fallbackswitch: Move active_sinkpad out of State into its own Mutex
As described in issue #200, we hold the srcpad's stream lock in some
situations where we notify the `active-pad` property.

If there's a handler installed it will most likely attempt to read the
property, which had to take the `state` lock. Another thread could
already be holding this lock and attempting to obtain the srcpad's
stream lock. This resulted in a deadlock.

To avoid this, move the `active_sinkpad` field into its own Mutex, which
we never hold for long.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/200
2022-05-12 16:52:07 +02:00
Arun Raghavan 557917b92a dav1ddec: Write src_query() in match syntax for easier extensibility
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:02:27 -04:00
Arun Raghavan 2c3514a5a1 dav1ddec: Deal with the possibilty of 0/1 fps in latency math
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:02:10 -04:00
Arun Raghavan 7eb67de34c dav1ddec: Use sink_pad() convenience accessor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:01:51 -04:00
Arun Raghavan 3250675e78 dav1ddec: Move state to Mutex from Arc
This is needed because we may now access state concurrently with and
outside of the streaming thread during a LATENCY query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:01:51 -04:00
Arun Raghavan 5d01bfcb79 dav1ddec: Move decoder init from start() to set_format()
We need a successful LATENCY query to be able to correctly initialise
max frame delay, so let's defer decoder init until we know upstream is
readier for it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:01:51 -04:00
Arun Raghavan 05258756ce dav1ddec: Report latency based on frame delay
This is not strictly correct as we might not use the same mechanism that
dav1d is using to detect the number of CPUs. We can drop the num_cpus
based approach once
https://code.videolan.org/videolan/dav1d/-/merge_requests/1407 is merged
upstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 08:29:48 -04:00
Arun Raghavan 7d681c5ce4 dav1ddec: Expose a couple of decoder settings as properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 08:29:16 -04:00
Arun Raghavan ea98a0b596 dav1ddec: Bump dependency for dav1d 1.0.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 08:29:15 -04:00
Mathieu Duponchelle 943a138d49 ts-jitterbuffer: set jbuf delay when instantiating it
The internal (C) jitterbuffer needs to know about the configured
latency when calculating a PTS, as it otherwise may consider that
the packet is too late, trigger a resync and cause the element to
discard the packet altogether.

I could not identify when this was broken, but the net effect was
that in the current state, ts-jitterbuffer was discarding up to
half of all the incoming packets.
2022-05-11 06:29:22 +00:00
Mathieu Duponchelle 05ece5560e tttocea608: expose roll-up timeout property
In roll-up mode, when no more timed text comes in, the closed
captions may remain displayed on screen indefinitely (unless the
decoder implements a timeout, but that is not mandatory).

Expose a property to erase the display memory after a configurable
amount of time has elapsed instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/754>
2022-05-11 01:47:52 +02:00
Mathieu Duponchelle 6b80fdc270 cea608overlay: handle CLEAR status
+ log errors

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/754>
2022-05-10 18:52:56 +02:00
Mathieu Duponchelle 7425b31173 onvifaggregator: always push current media buffer on timeout
Even when aggregator.meta_frames is empty

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/751>
2022-05-10 14:35:50 +00:00
Sebastian Dröge e93544cfc6 tutorial/sinesrc: Use pushsrc as direct superclass in the glib::wrapper macro too 2022-05-10 10:05:48 +00:00
Jordan Petridis a4aa45d27f ci: remove the david checkot after install
Makes the docker image slightly smaller
2022-05-10 12:34:03 +03:00
Jimmi Holst Christensen c02a0d8757 vp9enc takes target-bitrate as a i32 and not u32 2022-05-10 12:02:31 +03:00
Vivienne Watermeier eca3fa9308 Add touch events and modifier states 2022-05-09 22:49:24 +02:00
Vivienne Watermeier f091e90b24 Depend on gstreamer-rs main to add a feature for v1_22 2022-05-09 22:49:24 +02:00
Sebastian Dröge ce50a3003c textahead: PadTemplate::caps() returns a caps reference now 2022-05-08 13:31:10 +03:00
Sebastian Dröge 2f16b5dd3e threadshare: Use into_glib_ptr() instead of into_ptr() 2022-05-08 13:31:10 +03:00
Sebastian Dröge 817231b4d0 hlssink3: PadTemplate::name_template() returns a &str now instead of Option<String> 2022-05-08 13:31:10 +03:00
Sebastian Dröge 92c66be943 onvifaggregator: Update for minor PadTemplate API changes
`PadTemplate::caps()` returns a reference to the caps now instead of a
new strong reference, so keeping the template in scope as long as the
caps reference is required.
2022-05-08 13:31:03 +03:00
Mathieu Duponchelle a4a5caec53 net/onvif: implement ONVIF metadata processing elements
- RTP payloader and depayloader

- Aggregator to pair per-frame metadata with media frames

- Overlay to render detected shapes
2022-05-06 11:17:04 +03:00
machenmusik ee950499d5 start_bitrate property, to allow specifying initial (video) bitrate 2022-05-05 22:28:23 +02:00
Thibault Saunier 075a625305 Make our "loss based control" algorithm closer to what is defined in [GCC]
As specified in Google Congestion Control we should run the packet loss
estimation algorithm "every time feedback from the receiver is
received".

And, also as defined by GCC, we now have 2 different estimated bitrates,
one for the delay-based controller value and one for the loss-based one,
and we use the minimum value between those 2 as our current estimation.

[GCC]: https://datatracker.ietf.org/doc/html/draft-ietf-rmcat-gcc-02
2022-05-03 15:21:20 +02:00
Sebastian Dröge 4a2c93299e mccparse/sccparse: Don't log gst::FlowError::Flushing or Eos as error to the debug logs 2022-05-03 15:32:07 +03:00
Nils Kattenbeck 3c81afa7b2 Set constant bitrate rate-control for VAAPI encoder 2022-04-28 18:55:41 +02:00
Nils Kattenbeck e4846d0d53 Add support for VAAPI VP8 encoder 2022-04-28 18:55:41 +02:00
Nils Kattenbeck 843875e95d Add support for VAAPI h264 encoder 2022-04-28 18:55:41 +02:00
Julien Vary f908cbaffd fmp4mux: adding headers when data resumes after EOS 2022-04-28 11:39:55 -04:00
Nils K f104ffd251 Remove cd in usage instructions 2022-04-28 16:12:10 +02:00
Nils Kattenbeck 3b04a3c06d Remove is_video field from Codec struct
Instead add it as a function and get the value from the encoder type.
This removes the necessity for any manual bookkeeping.
2022-04-28 16:02:09 +02:00
Tim-Philipp Müller 90c203857a threadshare: fix build on Windows 2022-04-27 00:13:46 +01:00
Philippe Normand 5aa1b7cd3b README: Mention the colordetect element 2022-04-26 14:59:45 +01:00
Sebastian Dröge 3e10efa134 rusoto: Update to crc 3 and rusoto 0.48 2022-04-26 11:22:24 +03:00
Mathieu Duponchelle b51cdb9de0 webrtcsink: call recalculate_latency on LATENCY messages 2022-04-23 02:03:42 +02:00
Raphael Dürscheid ee200326ef Implemente clippy suggestions 2022-04-22 20:01:56 +03:00
Raphael Dürscheid b66db922d8 Remove erranous unwrap() on use_clock 2022-04-22 20:01:56 +03:00
Raphael Dürscheid 3e5fa04379 Consumer pipeline should use_clock 2022-04-22 18:37:46 +03:00
Sebastian Dröge 5feca3f74b deny: Update 2022-04-22 13:18:26 +00:00
Sebastian Dröge ae32cc7f2b closedcaption: Update to uuid 1.0 2022-04-22 13:18:26 +00:00
Guillaume Desmottes d69b4edfbc uriplaylistbin: fix number of streaming items
One more item than intended was allowed.
2022-04-22 14:50:42 +02:00
Guillaume Desmottes 03fcc2cb9a uriplaylistbin: implement Debug on State
Help debugging.
2022-04-22 14:50:28 +02:00
Thibault Saunier f11260aeb5 webrtcsink: Fix a race starting the signaller
1. Working scenario:

T1 -> Caps event (all caps have been received)
T1     -> Start discovering
T2 -> Change state to Playing
T2        -> The signaller is not started as:
                - Sink current_state() == Paused as it will be set to
                  playing after the change_state vmethod returns
                - Discovery is not done anyway
T1 -> Discovery is done
        => The signaller is started, and **everything works well**.

2. Failing scenario:

T1 -> Caps event (all caps have been received)
T1     -> Start discovering
T1 -> Discovery is done
T1        -> The signaller is not started as:
                - Current state == Paused (it will be set to playing
                  after the change_state vmethod returns)
                - Discovery is not done anyway
T2 -> Change state to Playing
T2        -> The signaller is not started as:
                - Sink current_state == Paused  as it will be set to
                  playing after the we return from the change_state
                  vmethod

In that case the signaller never starts.
2022-04-20 18:47:24 +02:00
Thibault Saunier 7ff998f925 meson: Cleanup our meson integration
Writing a proper "depfile" to follow depending files, based on depfiles
generated by rustc.

This is based on work done while working on gobject-examples-rs
2022-04-20 10:21:59 -04:00
Vivia Nikolaidou 385a983e5f fallbackswitch: Fix racy manual switching test
The element has a small race condition where it might output two buffers
with the same running time during e.g. a manual switch. In practice this
is not a problem, so the test takes this race into account.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/195
2022-04-18 16:13:00 +03:00
Philippe Normand b423febfbe videofx: Add colordetect video filter
This new video filter is able to detect the dominant color in a video frame.
When the color has changed from the previous frame the filter posts an Element
message on the bus, the associated structure is named `colordetect` and has two
fields:

* a string field named `dominant-color`
* a list field containing the whole color palette, stored as uint values, sorted
  by dominance, with more dominant colors first
2022-04-16 17:40:34 +01:00