platform/upstream/gstreamer.git
5 months agoMerge branch 'upstream/1.24.9' into tizen_gst_1.24.9 33/315933/6 tizen_gst_1.24.9
Gilbok Lee [Tue, 24 Dec 2024 02:03:06 +0000 (11:03 +0900)]
Merge branch 'upstream/1.24.9' into tizen_gst_1.24.9

Change-Id: I20e783a9005d385a154a2e166ad9721c29a92e4a

6 months agoFix build error due to upgrade to ffmpeg 7.1 36/321036/2 accepted/tizen/unified/20241202.132936 accepted/tizen/unified/x/20241218.032649 accepted/tizen/unified/x/asan/20241224.004417
hjkim [Wed, 27 Nov 2024 01:18:33 +0000 (10:18 +0900)]
Fix build error due to upgrade to ffmpeg 7.1

All patches are from gst-libav-1.24.9

Change-Id: I02fdb4e79ad3a5a47948a67f1164a763dcc41b42

6 months agojpegparse: Change plugin rank GST_RANK_NONE to GST_RANK_SECONDARY 84/320584/4 accepted/tizen/unified/20241121.162155
Gilbok Lee [Tue, 19 Nov 2024 03:34:52 +0000 (12:34 +0900)]
jpegparse: Change plugin rank GST_RANK_NONE to GST_RANK_SECONDARY

- In order to use v4l2jpegdec, plugin need a parsed:true caps.
  During autoplugin, it is GST_RANK_NONE, so parsebin can't find
  jpegparse and therefore can't use v4l2jpegdec
- Increase the rank of the jpegparse plugin to use v4l2jpegdec

Change-Id: Icd89c177836580d91d0b730e31731cc8b383c23a

7 months agoRelease 1.24.9 upstream/1.24.9 1.24.9
Tim-Philipp Müller [Wed, 30 Oct 2024 20:33:30 +0000 (20:33 +0000)]
Release 1.24.9

7 months agoflvmux: Consider timestamps before segment start to map to segment start
Sebastian Dröge [Tue, 29 Oct 2024 15:39:02 +0000 (17:39 +0200)]
flvmux: Consider timestamps before segment start to map to segment start

Instead of mapping them to running time 0, which is wrong if e.g. the segment
base is not equal to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7798>

7 months agoflvmux: Use first running time on the initial header instead of 0
Sebastian Dröge [Tue, 29 Oct 2024 13:30:59 +0000 (15:30 +0200)]
flvmux: Use first running time on the initial header instead of 0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7798>

7 months agosrt: Don't attempt to reconnect on authentication failures
Edward Hervey [Tue, 29 Oct 2024 10:29:05 +0000 (11:29 +0100)]
srt: Don't attempt to reconnect on authentication failures

This is a fatal issue which can't be recovered

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7797>

7 months agomultiqueue: Do not unref the query we get in pad->query
Thibault Saunier [Mon, 28 Oct 2024 13:41:08 +0000 (10:41 -0300)]
multiqueue: Do not unref the query we get in pad->query

We do not own any ref to queries when running them.

If we end up processing the query from the streaming thread, it means that it was
a serialized query, and the query is being waited to be processed on the sinkpad
streaming thread, thread which owns the reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7796>

7 months agotwcc: Handle wrapping of reference time
Johan Sternerup [Thu, 8 Aug 2024 12:28:11 +0000 (12:28 +0000)]
twcc: Handle wrapping of reference time

Previously the wrapping of the 24-bit reference time was not handled
correctly when transforming it into GstClockTime. Given the unit of 64ms
the span that could be represented by 24 bits is 12 days and depending
on the start value we could get a wrapping problem anytime within this
time frame. This turned out to be particularly problematic for the GCC
algorithm in gst-plugins-rs which tried to evict old packages based on
the "oldest" timestamp, which due to wrapping problems could be in the
future. Thus, the container managing the packets could grow without
limits for a long time thereby creating both CPU and memory problems.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7792>

7 months agowebrtcbin: Clean up bin elements when datachannel is removed
Emil Ljungdahl [Mon, 14 Oct 2024 09:26:20 +0000 (11:26 +0200)]
webrtcbin: Clean up bin elements when datachannel is removed

When a datachannel within a session is removed after proper close,
reference to the error_ignore_bin elements of the datachannel
appsrc/appsink were left in webrtcbin.

This caused the bin-objects to be left and not freed until the whole
webrtc session was terminated. Among other things that includes a thread
from the appsrc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7791>

7 months agoci: Set SUBPROJECTS_CACHE_DIR variable
Jordan Petridis [Thu, 29 Aug 2024 19:52:25 +0000 (22:52 +0300)]
ci: Set SUBPROJECTS_CACHE_DIR variable

It's used in the build script and it fails if it's undefined.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7789>

7 months agowayland: Add NV15 support
Nicolas Dufresne [Tue, 24 Sep 2024 17:55:39 +0000 (13:55 -0400)]
wayland: Add NV15 support

This format, which maps to NV12_10LE40 in GStreamer is produced by Rockchip
video decoders when decoding 4:2:0 10 bit content.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7789>

7 months agoci: Update fluster VP8 result
Seungha Yang [Tue, 29 Oct 2024 15:08:07 +0000 (00:08 +0900)]
ci: Update fluster VP8 result

Updating vp80-03-segmentation-1425 and vp80-03-segmentation-1436
results

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7787>

7 months agovp8decoder: Fix resolution change handling
Seungha Yang [Tue, 22 Oct 2024 14:41:13 +0000 (23:41 +0900)]
vp8decoder: Fix resolution change handling

Do not store resolution in set_format() so that resolution change
can be detected on keyframe as intended.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3928
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7787>

7 months agortmp2sink: Initialize base_ts / last_ts with the actual first observed timestamp
Sebastian Dröge [Fri, 25 Oct 2024 13:37:15 +0000 (16:37 +0300)]
rtmp2sink: Initialize base_ts / last_ts with the actual first observed timestamp

Initializing it with zero can falsely trigger the overflow / underflow detection
code if the first observed timestamp is a big integer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7786>

7 months agortppassthrough: fix rtp-stats message compatibility with GstRTPBasePayload
Tim-Philipp Müller [Tue, 29 Oct 2024 16:43:33 +0000 (16:43 +0000)]
rtppassthrough: fix rtp-stats message compatibility with GstRTPBasePayload

"clock-rate" and "pt" are G_TYPE_UINT in the base class, so let's
keep them like that here too, since the entire purposes of the
passthrough element is to fake being a payloader. The types in the
message don't have to be consistent with the types in the caps.

Reverts part of commit a6fa53b7 of !7526

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7552#note_2576653

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7784>

7 months agompegtsdemux: Handle PTS/DTS wraparound with ignore-pcr=true
Sebastian Dröge [Mon, 30 Sep 2024 12:51:04 +0000 (15:51 +0300)]
mpegtsdemux: Handle PTS/DTS wraparound with ignore-pcr=true

The wraparound handling code assumes that the PCR gets updated regularly for
being able to detect wraparounds. With ignore-pcr=true that was not the case and
it stayed initialized at 1h forever.

To avoid this problem, update the fake PCR whenever the PTS advanced by more
than 5s, and also detect wraparounds in these fake PCRs.

Problem can be reproduced with

  $ gst-launch-1.0 videotestsrc pattern=black ! video/x-raw,framerate=1/5 ! \
    x264enc speed-preset=ultrafast tune=zerolatency ! mpegtsmux ! \
    tsdemux ignore-pcr=true ! fakesink

which restarts timestamps at 0 after around 26h30m.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7763>

7 months agoplay: Improve play message API inconsistencies
Sebastian Dröge [Sat, 26 Oct 2024 08:42:48 +0000 (11:42 +0300)]
play: Improve play message API inconsistencies

  * Check for the correct message type when parsing
  * Use correct field name for warning message details

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7779>

7 months agoaggregator: fix start time selection first with force-live
Mathieu Duponchelle [Fri, 25 Oct 2024 17:12:17 +0000 (19:12 +0200)]
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>

7 months agortpmanager: skip RTPSources which are not ready in the RTCP generation
Ognyan Tonchev [Fri, 25 Oct 2024 10:02:54 +0000 (12:02 +0200)]
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>

7 months agoplayback: Improve stream list search
Edward Hervey [Wed, 23 Oct 2024 13:39:17 +0000 (15:39 +0200)]
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>

7 months agourisourcebin: Aggregate collections from multiple parsebin
Edward Hervey [Wed, 23 Oct 2024 13:17:22 +0000 (15:17 +0200)]
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>

7 months agoparsebin: Store caps on parsepad as early as possible
Edward Hervey [Wed, 23 Oct 2024 12:25:52 +0000 (14:25 +0200)]
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>

7 months agoparsebin: Don't store bogus caps on GstStream
Edward Hervey [Wed, 23 Oct 2024 12:24:36 +0000 (14:24 +0200)]
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>

7 months agoparsebin: Minor debug statement updates
Edward Hervey [Wed, 23 Oct 2024 12:24:18 +0000 (14:24 +0200)]
parsebin: Minor debug statement updates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7764>

7 months agogl: Fix configure error when libdrm is a subproject
Xavier Claessens [Mon, 19 Aug 2024 14:33:23 +0000 (10:33 -0400)]
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>

7 months agogl: Fix libdrm dependency detection and usage
Nirbheek Chauhan [Mon, 27 May 2024 22:53:01 +0000 (04:23 +0530)]
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>

7 months agomsdk: Fix libdrm dependency detection and usage
Nirbheek Chauhan [Mon, 27 May 2024 22:44:15 +0000 (04:14 +0530)]
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>

7 months agolibdrm.wrap: Bump to latest 2.4.120
Nirbheek Chauhan [Mon, 27 May 2024 13:27:23 +0000 (18:57 +0530)]
libdrm.wrap: Bump to latest 2.4.120

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>

7 months agolibva.wrap: Bump to latest release 2.21.0, move to wrap-file
Nirbheek Chauhan [Mon, 27 May 2024 13:22:29 +0000 (18:52 +0530)]
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>

7 months agomeson: Don't use fallback: kwarg for libva deps
Nirbheek Chauhan [Mon, 27 May 2024 13:20:23 +0000 (18:50 +0530)]
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>

7 months agova: Fix libdrm include
Nirbheek Chauhan [Mon, 27 May 2024 13:13:33 +0000 (18:43 +0530)]
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>

7 months agoencodebasebin: Fix parser selection
Philippe Normand [Tue, 15 Oct 2024 14:58:53 +0000 (15:58 +0100)]
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>

7 months agoencodebasebin: Fix parser cleanup
Philippe Normand [Tue, 15 Oct 2024 14:57:06 +0000 (15:57 +0100)]
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>

7 months agotests: Blacklist more netsim test
Edward Hervey [Fri, 18 Oct 2024 11:53:11 +0000 (13:53 +0200)]
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>

7 months agortsp-server: Remove pointless assertions that can happen if client provides invalid...
Sebastian Dröge [Thu, 24 Oct 2024 17:12:55 +0000 (20:12 +0300)]
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>

7 months agocodectimestamper: Fix gint wraparound in pts_compare_func
Peter Stensson [Wed, 23 Oct 2024 12:28:30 +0000 (14:28 +0200)]
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>

7 months agovtdec: add support for level 6 6.1 and 6.2
Andoni Morales Alastruey [Thu, 24 Oct 2024 12:40:23 +0000 (14:40 +0200)]
vtdec: add support for level 6 6.1 and 6.2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7735>

7 months agovalidate: Ignore flaky dash playbin3 issue
Edward Hervey [Wed, 9 Oct 2024 17:31:30 +0000 (19:31 +0200)]
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>

7 months agoci: Add a gdk-pixbuf file-based wrap for gtk4
Nirbheek Chauhan [Thu, 24 Oct 2024 10:22:15 +0000 (15:52 +0530)]
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>

7 months agoaggregator: fix live query when force-live is TRUE
Mathieu Duponchelle [Wed, 23 Oct 2024 14:14:45 +0000 (16:14 +0200)]
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>

7 months agoexiftag: Check the result of gst_date_time_new_local_time
James Cowgill [Tue, 22 Oct 2024 12:23:05 +0000 (13:23 +0100)]
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>

7 months agoglcontext: egl: Unrestrict the support base DRM formats
Nicolas Dufresne [Fri, 18 Oct 2024 18:41:44 +0000 (14:41 -0400)]
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>

7 months agoh26xbitwriter: false have_space if aligning fails on aud
Víctor Manuel Jáquez Leal [Fri, 11 Oct 2024 15:58:37 +0000 (11:58 -0400)]
h26xbitwriter: false have_space if aligning fails on aud

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7697>

7 months agovaav1enc: Do not enable palette mode by default
He Junyan [Tue, 15 Oct 2024 08:44:27 +0000 (16:44 +0800)]
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>

7 months agokmssink: Add IMX-DCSS auto-detection
Benjamin Gaignard [Fri, 27 Sep 2024 16:01:53 +0000 (18:01 +0200)]
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>

7 months agosrtsink: Add guard for null error when SRT open fails
Francisco Javier Velázquez-García [Wed, 9 Oct 2024 16:32:34 +0000 (12:32 -0400)]
srtsink: Add guard for null error when SRT open fails

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7687>

7 months agosrtsink: Register SRT listen callback before binding socket
Francisco Javier Velázquez-García [Wed, 9 Oct 2024 16:08:10 +0000 (12:08 -0400)]
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>

7 months agourisourcebin: Don't remove probe if not present
Edward Hervey [Wed, 16 Oct 2024 15:20:46 +0000 (17:20 +0200)]
urisourcebin: Don't remove probe if not present

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7682>

7 months agourisourcebin: Set pad probe before linking pad
Edward Hervey [Thu, 3 Oct 2024 15:16:25 +0000 (17:16 +0200)]
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>

7 months agourisourcebin: Streamline event forwarding code
Edward Hervey [Thu, 3 Oct 2024 15:16:08 +0000 (17:16 +0200)]
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>

7 months agoparsebin: Set stream collection on pad before exposing it
Edward Hervey [Thu, 3 Oct 2024 15:09:13 +0000 (17:09 +0200)]
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>

7 months agouridecodebin3: Use lock when checking input/output items
Edward Hervey [Thu, 3 Oct 2024 15:07:59 +0000 (17:07 +0200)]
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>

7 months agodecodebin3: Free pending events on input pads when unlinking
Edward Hervey [Thu, 3 Oct 2024 15:05:15 +0000 (17:05 +0200)]
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>

7 months agocodecparsers: add debug categories to bitwriters
Víctor Manuel Jáquez Leal [Fri, 11 Oct 2024 16:07:27 +0000 (12:07 -0400)]
codecparsers: add debug categories to bitwriters

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7667>

7 months agotests: va: fix vapostproc test for DMABuf
Víctor Manuel Jáquez Leal [Wed, 9 Oct 2024 21:16:46 +0000 (17:16 -0400)]
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>

7 months agoaudioconvert: fix setting of mix matrix at run time
Mathieu Duponchelle [Wed, 14 Aug 2024 14:09:06 +0000 (16:09 +0200)]
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>

7 months agoscenechange: fix memory leak
Stéphane Cerveau [Mon, 14 Oct 2024 13:31:54 +0000 (15:31 +0200)]
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>

7 months agoqtdemux: fix parsing of matrix with 180 rotation
Andoni Morales Alastruey [Thu, 3 Oct 2024 10:48:31 +0000 (12:48 +0200)]
qtdemux: fix parsing of matrix with 180 rotation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7665>

7 months agomeson: Explicitly use cpp_std=c++11 for dxva
Nirbheek Chauhan [Sun, 13 Oct 2024 17:34:58 +0000 (23:04 +0530)]
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>

8 months agotests/lc3: Allocate the same size for the buffer and the data
Jordan Petridis [Wed, 9 Oct 2024 17:37:10 +0000 (20:37 +0300)]
tests/lc3: Allocate the same size for the buffer and the data

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7640>

8 months agomacos: Fix race conditions
Corentin Damman [Tue, 1 Oct 2024 12:26:40 +0000 (12:26 +0000)]
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>

8 months agoRevert "meson: Fix invalid include flag in uninstalled gl pc file"
Nirbheek Chauhan [Fri, 19 Jul 2024 14:44:29 +0000 (20:14 +0530)]
Revert "meson: Fix invalid include flag in uninstalled gl pc file"

This reverts commit 9d719b9937e2ef476cf18f800f54ccac1feea8ee.

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>

8 months agodecodebin3: do not attempt to remove a null stream
Théo Maillart [Fri, 27 Sep 2024 13:09:38 +0000 (15:09 +0200)]
decodebin3: do not attempt to remove a null stream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7605>

8 months agodecodebin3: protect internal reset with SELECTION_LOCK
Théo Maillart [Thu, 26 Sep 2024 09:29:08 +0000 (11:29 +0200)]
decodebin3: protect internal reset with SELECTION_LOCK

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7605>

8 months agodecodebin3: remove output event probe on remove input stream
Théo Maillart [Wed, 25 Sep 2024 13:32:20 +0000 (15:32 +0200)]
decodebin3: remove output event probe on remove input stream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7605>

8 months agourisourcebin: Ensure all stream-start are handled
Edward Hervey [Wed, 2 Oct 2024 09:29:38 +0000 (11:29 +0200)]
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>

8 months agourisourcebin: Allow more cases for posting stream-collection
Edward Hervey [Wed, 2 Oct 2024 08:34:57 +0000 (10:34 +0200)]
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>

8 months agodecodebin3: Make update/posting of collection messages atomic
Edward Hervey [Tue, 1 Oct 2024 15:17:01 +0000 (17:17 +0200)]
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>

8 months agodecodebin3: check and send selected stream message even if no decoder is selected
Elliot Chen [Fri, 27 Sep 2024 10:45:06 +0000 (19:45 +0900)]
decodebin3: check and send selected stream message even if no decoder is selected

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7601>

8 months agoallocators: drmdump: Add NV15 supports
Nicolas Dufresne [Fri, 27 Sep 2024 13:23:26 +0000 (09:23 -0400)]
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>

8 months agoallocators: drmdumb: Fix bpp value for P010
Nicolas Dufresne [Fri, 27 Sep 2024 13:20:37 +0000 (09:20 -0400)]
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>

8 months agogldownload: use gst_gl_sync_meta_wait_cpu()
Jakub Adam [Wed, 29 May 2024 17:12:21 +0000 (19:12 +0200)]
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>

8 months agoavviddec: Unlock video decoder stream lock temporarily while finishing frames
Sebastian Dröge [Thu, 26 Sep 2024 12:48:54 +0000 (15:48 +0300)]
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>

8 months agoqtdemux: Check fourcc of a second CEA608 atom instead of assuming it's cdt2
Sebastian Dröge [Thu, 26 Sep 2024 06:15:34 +0000 (09:15 +0300)]
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>

8 months agoavfdeviceprovider: Fix caps leak
Weijian Pan [Thu, 30 May 2024 07:34:22 +0000 (07:34 +0000)]
avfdeviceprovider: Fix caps leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7577>

8 months agokmsallocator: fix stride with planar formats
Hugues Fruchet [Tue, 24 Sep 2024 15:01:10 +0000 (17:01 +0200)]
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>

8 months agodoc: good: Update documentation cache
Nicolas Dufresne [Mon, 23 Sep 2024 20:48:26 +0000 (16:48 -0400)]
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>

8 months agov4l2object: Fix a gvalue leak on error
Nicolas Dufresne [Wed, 18 Sep 2024 17:14:32 +0000 (13:14 -0400)]
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>

8 months agov4l2: dec/enc: Flag leaked caps
Nicolas Dufresne [Tue, 17 Sep 2024 18:27:46 +0000 (14:27 -0400)]
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>

8 months agov4l2: object: Fix condition check to emit error
Nicolas Dufresne [Thu, 15 Aug 2024 20:54:25 +0000 (16:54 -0400)]
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>

8 months agov4l2object: Always tell capture queue that we want to set the CSC
Nicolas Dufresne [Tue, 17 Sep 2024 17:28:45 +0000 (13:28 -0400)]
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>

8 months agov4l2: object: Fix support for format:Interlaced in caps probe
Nicolas Dufresne [Thu, 15 Aug 2024 20:01:03 +0000 (16:01 -0400)]
v4l2: object: Fix support for format:Interlaced in caps probe

This notably follow the way we order the template and keeps the
format:Interlaced caps at the end. This change also fixes
an early skip check, that would skip if a driver only supports
alternate interlacing for a specific format. It also fixes
a bug where only the last resolution of a discrete frame size
was allowed to use format:Interlaced. Finally, similar to template
caps code, simplify the caps for earch featurs, making the debug output
manageable and (marginally) improve negotiation speed.

This change will make it easier to introduce memory:DMABuf.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>

8 months agov4l2: Move M2M template caps probe into v4l2object
Nicolas Dufresne [Thu, 15 Aug 2024 17:07:31 +0000 (13:07 -0400)]
v4l2: Move M2M template caps probe into v4l2object

This allow reusing the code that produces output and capture devices
templates. This fixes the lack of Interlaced caps feature for M2M
devices such as decoder, encoder or converters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>

8 months agov4l2: object: Remove over indentation
Nicolas Dufresne [Wed, 14 Aug 2024 19:26:58 +0000 (15:26 -0400)]
v4l2: object: Remove over indentation

This is a style fix, no functional changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>

8 months agov4l2: object: Map GST/V4L2 formats in a C array
Nicolas Dufresne [Wed, 14 Aug 2024 19:21:44 +0000 (15:21 -0400)]
v4l2: object: Map GST/V4L2 formats in a C array

This makes it easier to add new format in the future without
forgetting to update one of the numerous switch case. This
will also help mapping DRM formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>

8 months agov4l2object: Expose convertion from v4l2 fourcc to GstVideoFormat
Nicolas Dufresne [Wed, 14 Aug 2024 14:13:44 +0000 (10:13 -0400)]
v4l2object: Expose convertion from v4l2 fourcc to GstVideoFormat

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>

8 months agov4l2object: Change dimensions format desc field to flag
Nicolas Dufresne [Wed, 14 Aug 2024 13:52:54 +0000 (09:52 -0400)]
v4l2object: Change dimensions format desc field to flag

The boolean naming wasn't obvious, and having this as a flag makes
the structure a little more compact.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7563>

8 months agov4l2object: append non colorimetry structure to probed caps
Shengqi Yu [Mon, 29 Jul 2024 01:07:40 +0000 (09:07 +0800)]
v4l2object: append non colorimetry structure to probed caps

If the stream has a special colorimetry that is not in the colorimetry
list, it will cause negotiation to fail. We should allow passing any
colorimetry, so add an extra structure without the colorimetry field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7570>

8 months agoqtdemux: Skip zero-sized boxes instead of stopping to look at further boxes
Sebastian Dröge [Tue, 24 Sep 2024 06:50:34 +0000 (09:50 +0300)]
qtdemux: Skip zero-sized boxes instead of stopping to look at further boxes

A zero-sized box is not really a problem and can be skipped to look at any
possibly following ones.

BMD ATEM devices specifically write a zero-sized bmdc box in the sample
description, followed by the avcC box in case of h264. Previously the avcC box
would simply not be read at all and the file would be unplayable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7565>

8 months agogstreamer: parse: Use child proxy for deferred property setting
Arun Raghavan [Mon, 16 Sep 2024 12:48:47 +0000 (08:48 -0400)]
gstreamer: parse: Use child proxy for deferred property setting

We use that mechanism for the non-deferred path, and this makes sure we are
consistent for deferred set too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7561>

8 months agogstreamer: parse: Minor whitespace fixups
Arun Raghavan [Sun, 15 Sep 2024 10:39:40 +0000 (06:39 -0400)]
gstreamer: parse: Minor whitespace fixups

Mostly replacing some tabs with spaces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7561>

8 months agogstreamer: parse: Make sure children are bins before recursing in
Arun Raghavan [Fri, 13 Sep 2024 17:55:27 +0000 (13:55 -0400)]
gstreamer: parse: Make sure children are bins before recursing in

A deferred set of the form parentbin::childelement::pad works in the
non-deferred property setting path, but the deferred path assumes that all
non-root non-leaf children specify bins. We already have a bin check on the
root, so let's add one for other non-leaves to avoid a critical.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3806
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7561>

8 months agoqml6glsrc: Reduce capture delay
Nicolas Dufresne [Tue, 13 Aug 2024 19:07:07 +0000 (15:07 -0400)]
qml6glsrc: Reduce capture delay

In qml6glsrc, we capture the application by copying the back buffer into
our own FBO. The afterRendering() signal is too soon as from the apitrace, the
application has been rendered into a QT internal buffer, to be used as a cache
for refresh.

Use afterFrameEnd() signal instead. This works with no delay on GLES. With GL
it seems to reduce from 2 to 1 frame delay (this may be platform specific). A
different recording technique would need to be used to completely remove this
delay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7562>

8 months agoges: Fix name of GESFrameCompositionMeta API type
Jan Alexander Steffens (heftig) [Thu, 19 Sep 2024 23:44:53 +0000 (01:44 +0200)]
ges: Fix name of GESFrameCompositionMeta API type

g-ir-scanner 1.82.0 failed with a fatal error due to the wrong
namespace.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3800
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7556>

8 months agortppassthroughpay: Fix reading clock-rate and payload type from caps
Piotr Brzeziński [Wed, 18 Sep 2024 10:34:39 +0000 (12:34 +0200)]
rtppassthroughpay: Fix reading clock-rate and payload type from caps

They were using wrong types - while uint is correct technically, for compatibility reasons caps have them as signed int.
Values are now correctly read + added simple guards just to be sure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7552>

8 months agoBack to development after 1.24.8
Tim-Philipp Müller [Thu, 19 Sep 2024 10:12:53 +0000 (12:12 +0200)]
Back to development after 1.24.8

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7549>

8 months agoRelease 1.24.8
Tim-Philipp Müller [Thu, 19 Sep 2024 10:01:21 +0000 (12:01 +0200)]
Release 1.24.8

8 months agov4l2codecs: h265: Minimize memory allocation
Benjamin Gaignard [Tue, 17 Sep 2024 12:48:03 +0000 (14:48 +0200)]
v4l2codecs: h265: Minimize memory allocation

Be smarter when allocating sink and source memory pools to reduce the
memory footprint. Use gst_v4l2_decoder_get_render_delay() to know the
need number of buffers for downstream element.

Handle errors in case of memory allocation failures.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7546>

8 months agov4l2: encoder: Add dynamic framerate support
Nicolas Dufresne [Tue, 13 Aug 2024 20:38:37 +0000 (16:38 -0400)]
v4l2: encoder: Add dynamic framerate support

This is not trully supported in V4L2, but we can emulate this similar to
what other elements do. In this patch we ensure that 0/1 is supported by
encoders (caps query),and uses a default of 30fps whenever we need to
set a framerate into the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7545>