Commit graph

119809 commits

Author SHA1 Message Date
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
Edward Hervey
9eacd54847 decodebin3: Make update/posting of collection messages atomic
The presence (or not) of a collection on an input will determine whether events
will be throttled so that there are only forwarded when that input gets a valid
collection.

Therefore the input lock should be used.

In addition to that, we want to ensure that the application/user has a chance to
reliably (i.e. synchronously) specify what streams it is interested in by
sending a GST_EVENT_SELECT_STREAMS.

But we cannot allow anything to go forward until that message posting has come
back, otherwise we run in various races.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7602>
2024-10-02 23:06:07 +01:00
Elliot Chen
f805aa2d60 decodebin3: check and send selected stream message even if no decoder is selected
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7601>
2024-10-02 12:59:54 +01:00
Nicolas Dufresne
b17f22bc68 allocators: drmdump: Add NV15 supports
This is a packed version of P010, names NV14_10LE40 in GStreamer. This
format is used on all Rockchip SoC variants.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7596>
2024-10-01 17:32:31 +00:00
Nicolas Dufresne
a0da8c6b53 allocators: drmdumb: Fix bpp value for P010
P010 uses 16 bits per pixel, with least significant being padding. This
code worked with Intel display driver since they roundup that value, but
does not work with the generic DRM helpers which also support NV15,
which does not have any padding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7596>
2024-10-01 17:32:31 +00:00
Jakub Adam
1250f6fc7e gldownload: use gst_gl_sync_meta_wait_cpu()
Simple gst_gl_sync_meta_wait() is not sufficient to ensure GL commands
are executed before dma-buf devices get to see the buffer.

This is the first step that should make the code behave correctly for
everybody, although there may be performance penalty. In the future we
should introduce a more general sync meta that would allow to move the
waiting from gldownload (the producer) to the sink elements (the
consumers).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7595>
2024-10-01 17:12:37 +01:00
Sebastian Dröge
6b18f02339 avviddec: Unlock video decoder stream lock temporarily while finishing frames
Temporarily release the video decoder stream lock so that other
threads can continue decoding (e.g. call get_frame()) while data
is being pushed downstream.

At this point it is locked twice, we release one, and then the base class
releases the last one just before pushing the data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7584>
2024-09-29 15:47:32 +01:00
Sebastian Dröge
cf09100e36 qtdemux: Check fourcc of a second CEA608 atom instead of assuming it's cdt2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7583>
2024-09-29 10:08:38 +01:00
Weijian Pan
451bdb901e avfdeviceprovider: Fix caps leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7577>
2024-09-26 13:52:39 +01:00
Hugues Fruchet
9edd02d4e1 kmsallocator: fix stride with planar formats
This fixes a regression introduced by the merge request
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801

The extrapolated stride was computed but not used, resulting in the same
stride being applied to all planes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7571>
2024-09-24 23:59:51 +00:00
Nicolas Dufresne
b0b4cf605a doc: good: Update documentation cache
video4linux2 plugin now maps RGB15 which his didn't before.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>
2024-09-24 20:19:12 +00:00
Nicolas Dufresne
68728dda4b v4l2object: Fix a gvalue leak on error
In case we failed enumerating the supported interlacing mode, we leaked the
gvalue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>
2024-09-24 20:19:12 +00:00
Nicolas Dufresne
d064914a98 v4l2: dec/enc: Flag leaked caps
We never free class held template caps, so flag the one that wasn't already
flagged.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>
2024-09-24 20:19:12 +00:00
Nicolas Dufresne
1149750769 v4l2: object: Fix condition check to emit error
The check was reversed, so we could only emit a pipeline error
if there was no element associated with the object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>
2024-09-24 20:19:12 +00:00
Nicolas Dufresne
625d1bf27f v4l2object: Always tell capture queue that we want to set the CSC
Not all drivers supports it, but in general we want to try and match the
negotiated caps, so lets always try to set the CSC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>
2024-09-24 20:19:12 +00:00