Commit graph

119823 commits

Author SHA1 Message Date
Mathieu Duponchelle
3efd5a358e aggregator: fix start time selection first with force-live
When force-live is true, we don't want to wait for a first buffer
to select a start time.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1783

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7778>
2024-10-29 12:40:32 +00:00
Ognyan Tonchev
8c8cffe080 rtpmanager: skip RTPSources which are not ready in the RTCP generation
If a stream has an 'irregular' frame rate (e.g. metadata) RTCP SR
may be generated way too early, before the RTPSource has received
the first packet after Latency was configured in the pipeline.
We skip such RTPSources in the RTCP generation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7777>
2024-10-29 11:36:55 +00:00
Edward Hervey
91d987d6b7 playback: Improve stream list search
There is the possibility than an element/code/helper creates an identical
`GstStream` (same type and stream-id) instance instead of re-using a previous
one.

For those cases, when detecting whether a `GstStream` is already present in a
collection, we need to do more checks than just comparing the pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7764>
2024-10-28 13:15:41 +00:00
Edward Hervey
5d6a4565b0 urisourcebin: Aggregate collections from multiple parsebin
In the case where multiple parsebin are present (ex: from rtsp sources), we want
to aggregate the collections provided by the different parsebin and expose a
single "unified" collection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7764>
2024-10-28 13:15:41 +00:00
Edward Hervey
f7ab9f91e7 parsebin: Store caps on parsepad as early as possible
When analyzing a new pad, we can store the updated caps on the GstStream if they
are fixed.

If they are not fixed, this function will be called again once the element will
provide them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7764>
2024-10-28 13:15:40 +00:00
Edward Hervey
9641fac29f parsebin: Don't store bogus caps on GstStream
If we can't get the current caps when receiving a stream-start, that's fine,
they can/will be provided by other means at a later time.

What we definitely should not do is provide the starting caps of the chain,
which are potentially completely different from the end ones (like for example
`application/x-rtp`)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7764>
2024-10-28 13:15:40 +00:00
Edward Hervey
a556cf6826 parsebin: Minor debug statement updates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7764>
2024-10-28 13:15:40 +00:00
Xavier Claessens
625d8890cb gl: Fix configure error when libdrm is a subproject
When libdrm is a subproject it cannot be used in a configure time check:
  ERROR: Dependencies must be external dependencies

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7761>
2024-10-27 14:44:02 +00:00
Nirbheek Chauhan
dc39ebcd74 gl: Fix libdrm dependency detection and usage
drm_fourcc.h should be picked up via the pkgconfig dep, not the system
includedir directly. All this allows it to be picked up consistently
(via the subproject, for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>
2024-10-27 12:29:08 +00:00
Nirbheek Chauhan
da86a92a2d msdk: Fix libdrm dependency detection and usage
drm_fourcc.h should be picked up via the pkgconfig include, not the
system includedir directly.

Also consolidate the libdrm usage in va and msdk.

All this allows it to be picked up consistently (via the subproject,
for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>
2024-10-27 12:29:08 +00:00
Nirbheek Chauhan
e892b0d63d libdrm.wrap: Bump to latest 2.4.120
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>
2024-10-27 12:29:08 +00:00
Nirbheek Chauhan
cf2a258ef5 libva.wrap: Bump to latest release 2.21.0, move to wrap-file
Since we no longer require a pre-release git commit, we an use
a tarball which is faster and easier to update/cache.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>
2024-10-27 12:29:08 +00:00
Nirbheek Chauhan
d88db7ea2a meson: Don't use fallback: kwarg for libva deps
This will cause a fallback even when the `va` option is `auto`, not
giving the user a chance to provide the dependency via the system, and
likely building this feature unnecessarily.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>
2024-10-27 12:29:08 +00:00
Nirbheek Chauhan
7ae9cf8136 va: Fix libdrm include
The libdrm/ prefix should not be used, it will be provided by the
pkgconfig file. Also HAVE_LIBDRM is necessary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>
2024-10-27 12:29:08 +00:00
Philippe Normand
892bea99cd encodebasebin: Fix parser selection
If an encoder supports multiple codecs (a bin wrapping/auto-plugging encoders)
then its src pad template caps might list the supported codecs. Without this
patch the selected parser would be the one corresponding to the first codec,
leading to caps negotiation error later on. The proposed fix is to check the
media type on the parser candidates sink pad templates according to the
requested encoded format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7756>
2024-10-26 11:56:23 +01:00
Philippe Normand
31a697dd06 encodebasebin: Fix parser cleanup
When removing the parser from the stream group, it might not be linked to a
combiner so this needs to be checked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7756>
2024-10-26 11:56:23 +01:00
Edward Hervey
7e89aa7bdf tests: Blacklist more netsim test
They are know to be racy/failing

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/792

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7751>
2024-10-25 17:05:59 +01:00
Sebastian Dröge
cd8aede9f3 rtsp-server: Remove pointless assertions that can happen if client provides invalid rates
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3731
Fixes CVE-2024-44331

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7738>
2024-10-25 10:40:20 +00:00
Peter Stensson
516e422231 codectimestamper: Fix gint wraparound in pts_compare_func
The diff between compared timestamps might be outside the gint range
resulting in wrong sorting results. This patch corrects that by
comparing the timestamps and then returning -1, 0 or 1 depending on the
result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7737>
2024-10-25 10:18:56 +01:00
Andoni Morales Alastruey
908b79d168 vtdec: add support for level 6 6.1 and 6.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7735>
2024-10-25 02:09:30 +00:00
Edward Hervey
ba6cec3c13 validate: Ignore flaky dash playbin3 issue
It was already ignored for legacy dashdemux. The return value is slightly
different with new demuxers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7734>
2024-10-25 02:33:55 +01:00
Nirbheek Chauhan
3201edc382 ci: Add a gdk-pixbuf file-based wrap for gtk4
gtk4 ships a git wrap, which causes our CI to fail when GNOME gitlab
has downtime.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7730>
2024-10-24 13:53:19 +01:00
Mathieu Duponchelle
edb1d48c40 aggregator: fix live query when force-live is TRUE
When force-live is TRUE, aggregator will correctly change its state with
NO_PREROLL, but unless something upstream is live did not previously set
live to TRUE on the latency query.

Fix this by or'ing force_live into the result.

Also improve debug

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7723>
2024-10-24 00:03:02 +01:00
James Cowgill
8131c3eb1d exiftag: Check the result of gst_date_time_new_local_time
Fixes a critical warning when parsing a JPEG containing a malformed
`DateTime` tag (like `0000:00:00 00:00:00`).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7713>
2024-10-23 09:19:18 +00:00
Nicolas Dufresne
6604421cba glcontext: egl: Unrestrict the support base DRM formats
There is no requirement for a base DRM format to be supported by libgstvideo
in order to be uploaded to. Don't limite to DRM fourcc that have a libgstvideo
format mapping. This notably enabled AFBC support, which uses an opaque based
format that does not have a linear definition. This also adds R8/RG88 and
simimlar other formats that are not yet mapped in libgstvideo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7699>
2024-10-20 10:37:49 +00:00
Víctor Manuel Jáquez Leal
50093806a8 h26xbitwriter: false have_space if aligning fails on aud
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7697>
2024-10-19 23:41:20 +00:00
He Junyan
4c0209ceee vaav1enc: Do not enable palette mode by default
Palette mode should only be enabled only when we know that the content
of the picture is simple. For example, only white letters on black
screen in SCC mode. So, by default, we need to disable it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7696>
2024-10-19 19:34:32 +00:00
Benjamin Gaignard
aac462fa89 kmssink: Add IMX-DCSS auto-detection
Add IMX DCSS display controller into list of
auto-detected modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7695>
2024-10-19 18:42:37 +00:00
Francisco Javier Velázquez-García
7473d6a510 srtsink: Add guard for null error when SRT open fails
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7687>
2024-10-18 21:42:46 +00:00
Francisco Javier Velázquez-García
c3776ad621 srtsink: Register SRT listen callback before binding socket
This change https://github.com/Haivision/srt/pull/2683 forces us to
call `srt_listen_callback` before `srt_listen`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7687>
2024-10-18 21:42:46 +00:00
Edward Hervey
b36d8de28c urisourcebin: Don't remove probe if not present
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7682>
2024-10-18 10:13:13 +00:00
Edward Hervey
1e6506cc09 urisourcebin: Set pad probe before linking pad
We want to grab all events that pass through, so we need to set the
probe **before** the pad is linked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7682>
2024-10-18 10:13:13 +00:00
Edward Hervey
15b8a05d1a urisourcebin: Streamline event forwarding code
Instead of two different functions for copying events and rewriting the
stream-start event, just have a single one.

This is needed, since we want to do both of those in one go, with the pad lock
taken.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7682>
2024-10-18 10:13:13 +00:00
Edward Hervey
cb00dd3ba6 parsebin: Set stream collection on pad before exposing it
We want to ensure the stream-collection is present on the pad (as a sticky
event) before we expose the pad.

This is more reliable since it will ensure it is present before any other event
is pushed through.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7682>
2024-10-18 10:13:13 +00:00
Edward Hervey
f197bc01a2 uridecodebin3: Use lock when checking input/output items
Otherwise there is the risk that the play items list could have changed in
between

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7682>
2024-10-18 10:13:13 +00:00
Edward Hervey
a92f4be40c decodebin3: Free pending events on input pads when unlinking
Otherwise we could end up with *old* events leaking through on the next linking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7682>
2024-10-18 10:13:13 +00:00
Víctor Manuel Jáquez Leal
396a04417e codecparsers: add debug categories to bitwriters
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7667>
2024-10-17 12:55:05 +00:00
Víctor Manuel Jáquez Leal
b4b06cd6f0 tests: va: fix vapostproc test for DMABuf
Now it picks the first format in the template srcpad list and do
the convertion. Also the format size is reduced because not all
drives support 4K as DMABuf (radeonsi).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7654>
2024-10-17 11:52:25 +00:00
Mathieu Duponchelle
8be82ad9e5 audioconvert: fix setting of mix matrix at run time
There were two main issues:

The mix matrix was not protected with the object lock

The code was mistakenly assuming that after updating the mix matrix
a reconfigure event sent upstream would be enough to cause upstream to
send caps again, and the converter was only reconstructed in ->set_caps.

That was not actually enough, as if the new matrix didn't affect the
number of input / output channels there was no reason for upstream to do
anything after getting the unchanged caps.

The fix for this was to have ->transform also recreate the converter
when needed, with the added subtlety that depending on the mix matrix
the element could be set to passthrough. This means that when setting
the mix matrix the converter also had to be recreated immediately to
check if the element had to be switched back to non-passthrough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7399>
2024-10-17 10:44:53 +00:00
Stéphane Cerveau
b736ac5bb4 scenechange: fix memory leak
A reference to the last buffer(oldbuf) was kept
leading to a memory leak on stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7666>
2024-10-15 08:59:36 +00:00
Andoni Morales Alastruey
d71dd64717 qtdemux: fix parsing of matrix with 180 rotation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7665>
2024-10-15 08:50:51 +01:00
Nirbheek Chauhan
119e624f73 meson: Explicitly use cpp_std=c++11 for dxva
dxva is built unconditionally on all platforms where introspection is
enabled, so let's fix the build on macOS so that introspection can be
enabled there: https://gitlab.freedesktop.org/nirbheek/cerbero/-/jobs/65009118

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7661>
2024-10-14 10:44:48 +01:00
Jordan Petridis
bd305ab52e tests/lc3: Allocate the same size for the buffer and the data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7640>
2024-10-10 08:45:43 -04:00
Corentin Damman
d9ef7fddc6 macos: Fix race conditions
This commit fixes two issues:
- The event must be posted *after* calling stop, otherwise a race condition can occur and the app never stops
- isFinishedLaunching and applicationDidFinishLaunching are not always synchronized, causing sometimes
  a deadlock on the g_cond_wait never catching the g_cond_signal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7608>
2024-10-03 15:21:05 +01:00
Nirbheek Chauhan
279fbb2ca2 Revert "meson: Fix invalid include flag in uninstalled gl pc file"
This reverts commit 9d719b9937.

The old pkg-config implementation errors out if a variable specified
in the pkgconfig file is not defined, so this actually broke
uninstalled pc files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7606>
2024-10-03 12:05:42 +01:00
Théo Maillart
1d86761712 decodebin3: do not attempt to remove a null stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7605>
2024-10-03 09:42:03 +00:00
Théo Maillart
bb05e78349 decodebin3: protect internal reset with SELECTION_LOCK
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7605>
2024-10-03 09:42:03 +00:00
Théo Maillart
3b6f6073e4 decodebin3: remove output event probe on remove input stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7605>
2024-10-03 09:42:03 +00:00
Edward Hervey
94c393341c urisourcebin: Ensure all stream-start are handled
In order to ensure all initial events (stream-start, caps, ..) are present on
pads that we expose, those various sticky events are propagated (from parsebin
to multiqueue output, from multiqueue output to exposed pads).

The problem was that the "hack" in `urisourcebin` to inform downstream elements
that the stream is parsed data and a collection will be present was only done in
one place : a probe on the output of parsebin ... but the stream-start could
potentially have already been propagated to the output pads before that.

In order to fix that, we make sure any pending sticky stream-start event is
updated before being propagated.

Fixes #3788

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7604>
2024-10-03 00:56:25 +00:00
Edward Hervey
7e438dfaa7 urisourcebin: Allow more cases for posting stream-collection
Previously urisourcebin only allows stream-collections messages from adaptive
demuxers or sources to be posted.

This commit also allows the case where they come from a single parsebin. We
still want to prevent it in the case where they are multiple parsebins, since
that would require some form of aggregation to show a single/unified collection.

In order to avoid a regression with uridecodebin3 behavior, we also implement
support for GST_QUERY_SELECTABLE, so that uridecodebin3 can figure out whether
it should let GST_MESSAGE_STREAM_COLLECTION flow upwards (because app/user could
react on it) or whether it drops it in order for decodebin3 to do the collection
aggregation and posting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7603>
2024-10-02 23:04:42 +00:00