platform/upstream/gstreamer.git
2 years agoci: Run tests post merge
Thibault Saunier [Wed, 13 Oct 2021 01:35:38 +0000 (22:35 -0300)]
ci: Run tests post merge

This will make tracking new races much easier

Mark other jobs as manual when pipeline is running on master

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

2 years agoges:test: Document some GES failures
Thibault Saunier [Wed, 13 Oct 2021 03:17:27 +0000 (00:17 -0300)]
ges:test: Document some GES failures

Namely races in:
 * check.gst-editing-services.edit_while_seeked_with_stop_it
 * check.gst-editing-services.check_layer_activness_gaps_it

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/803
and https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/804

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

2 years agoges:tests: Create shorter assets to avoid timeouts
Thibault Saunier [Wed, 13 Oct 2021 03:07:20 +0000 (00:07 -0300)]
ges:tests: Create shorter assets to avoid timeouts

And use a simple GStreamer pipeline as testsrcbin with GstTranscoder
doesn't let us easily set the framerate of the source and we end up
having videorate dropping frames leading to the rendered file having
an unprecise duration.

This should fix races with `check.gst-editing-services.pythontests.pyunittest.python.test_assets.TestTimeline.test_reload_asset`

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

2 years agovalidate:launcher: Avoid spamming terminal when inspecting unit tests
Thibault Saunier [Wed, 13 Oct 2021 03:06:34 +0000 (00:06 -0300)]
validate:launcher: Avoid spamming terminal when inspecting unit tests

And redirect GStreamer logs when necessary

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

2 years agovalidate:launcher: Run validate unit tests as GstValidate tests
Thibault Saunier [Wed, 13 Oct 2021 02:05:20 +0000 (23:05 -0300)]
validate:launcher: Run validate unit tests as GstValidate tests

So we have all the features and we can properly document known issue
for them

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

2 years agocodecparsers: {h264,h265}parser: Fix typo around SEI nalu generator
Seungha Yang [Sat, 9 Oct 2021 16:56:32 +0000 (01:56 +0900)]
codecparsers: {h264,h265}parser: Fix typo around SEI nalu generator

Fix to create correct SEI nalu when the size of payloadType and/or
payloadType is larger than 255 (0xff)

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1601
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1106>

2 years agorebase-branch-from-old: few improvments
Stéphane Cerveau [Thu, 30 Sep 2021 10:33:35 +0000 (12:33 +0200)]
rebase-branch-from-old: few improvments

- Enhance the documentation
- Allow to revert cherry-pick
- coding style

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

2 years agovalidate: flow: Fix for line-ending mismatch issue on Windows
Seungha Yang [Thu, 7 Oct 2021 10:28:41 +0000 (19:28 +0900)]
validate: flow: Fix for line-ending mismatch issue on Windows

Unlike POSIX system, Windows distinguishes "w" and "wb" and when
a file is opened with text mode, OS will translate \n into \r\n.

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

2 years agovapostproc: Negotiate interlaced.
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 18:15:44 +0000 (20:15 +0200)]
vapostproc: Negotiate interlaced.

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

2 years agovapostproc: Copy missing fields at fixate.
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 18:15:09 +0000 (20:15 +0200)]
vapostproc: Copy missing fields at fixate.

When caps negotiation implies a caps feature change, some fields might
get lost. This patch brings them back from input caps.

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

2 years agovapostproc: Simplify size fixate.
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 18:15:09 +0000 (20:15 +0200)]
vapostproc: Simplify size fixate.

gst_va_vpp_fixate_size() returned the fixated caps, but that is not
needed since `othercaps` are modified inline.

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

2 years agovapostproc: Simplify fixate.
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 18:15:09 +0000 (20:15 +0200)]
vapostproc: Simplify fixate.

The first approach to fixate was simply a copy&paste of both
videoconvert and videoscale, trying to keep their logic as isolated
as possible. But that brought duplicated and sparse logic.

This patch merge both approaches simplifying the fixate operation.

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

2 years agova: filter, deinterlace, vpp: Add gst_va_buffer_get_surface_flags().
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 15:41:57 +0000 (17:41 +0200)]
va: filter, deinterlace, vpp: Add gst_va_buffer_get_surface_flags().

Add a helper function to get, from GstVideoInfo and GstBuffers flags,
the VA interlace surface flags. This is used currently by vainterlace
element, but it will be used in vapostproc too if it can process
interlaced frames.

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

2 years agobuild: Disable pygobject submodule if system version exists
Bastien Nocera [Wed, 13 Oct 2021 10:38:35 +0000 (12:38 +0200)]
build: Disable pygobject submodule if system version exists

If pygobject is available on the system, its version is new enough,
don't build the older pygobject and rely on that system one.

This fixes totem not being able to use libpeas' Python support.

** (totem:544972): WARNING **: 12:04:05.407: Error initializing Python Plugin Loader: PyGObject initialization failed
ImportError: could not import gobject (version mismatch, 3.40.1 is required, found 3.38.1)

Closes: #806
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1135>

2 years agotests: Blacklist some tests that recently failed
Thibault Saunier [Sun, 26 Sep 2021 02:40:31 +0000 (23:40 -0300)]
tests: Blacklist some tests that recently failed

See:
    - https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/739
    - https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/740

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

2 years agogtkglsink: Avoid assertion when applying "auto" rotation method
Bastien Nocera [Wed, 13 Oct 2021 08:38:07 +0000 (10:38 +0200)]
gtkglsink: Avoid assertion when applying "auto" rotation method

Guard against the orientation not coming from an inexistant tag, nor
from the application (rotation set to "auto") which caused an assertion.

When the application requests the auto rotation method, make sure it is
resolved to a rotation that's applicable.

ERROR:gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstglwidget.c:745:gtk_gst_gl_widget_set_rotate_method: code should not be reached

Fixes: 103ceb853a5f7dade07a1ac4aa517e9df6ed5ded
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1134>

2 years agosoup: Runtime compatibility support for libsoup2 and libsoup3
Philippe Normand [Mon, 4 Oct 2021 08:31:02 +0000 (09:31 +0100)]
soup: Runtime compatibility support for libsoup2 and libsoup3

The src and sink elements no longer link against libsoup. It is now loaded at
runtime. If any version is resident already, it is used. Otherwise we first try
to load libsoup3 and if it's not found we fallback to libsoup2.

For the unit-tests, we now build one version of the test unit file per libsoup
version found. So if both libsoup2 and libsoup3 are available on the host, the
CI will cover them both.

Based on initial patch by Daniel Kolesa <dkolesa@igalia.com> and
Patrick Griffis <pgriffis@igalia.com>.

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

2 years agoexamples: playback-test: Fix for UI resize scenario on Windows
Seungha Yang [Mon, 2 Aug 2021 08:46:37 +0000 (17:46 +0900)]
examples: playback-test: Fix for UI resize scenario on Windows

Application needs to notify videosink element of video widget resize
via gst_video_overlay_set_render_rectangle() since WM_SIZE event
wouldn't be notified.

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

2 years agoaudio: Merge simd libs into the main one
Olivier Crête [Thu, 16 Apr 2020 03:41:52 +0000 (23:41 -0400)]
audio: Merge simd libs into the main one

Actually extract the .o objects from the convience libraries and put
them into the main one. Without this, they will just be referenced by
the .pc file, but it will be unusable because they are not installed.

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

2 years agoci: have the fedora docker build depend on the trigger job
Jordan Petridis [Tue, 12 Oct 2021 19:09:35 +0000 (22:09 +0300)]
ci: have the fedora docker build depend on the trigger job

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

2 years agomeson: Remove duplicate definition of 'examples' option
Nirbheek Chauhan [Tue, 12 Oct 2021 21:28:29 +0000 (02:58 +0530)]
meson: Remove duplicate definition of 'examples' option

This is a hard error starting with Meson 0.60.0rc1, due to
https://github.com/mesonbuild/meson/pull/9184#issuecomment-941603358

The upstream change might get reverted before release, but we should
of course fix this regardless.

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

2 years agortopuspay: Set marker bit inside RTP packet too
Olivier Crête [Fri, 10 Sep 2021 22:03:55 +0000 (18:03 -0400)]
rtopuspay: Set marker bit inside RTP packet too

At the end of a talk spurt, not only set the marker flag on the
GstBuffer, but also set the bit inside the RTP header as recommended
by the RFC.

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

2 years agogtksink: Fetch the default "widget" value in the docs
Bastien Nocera [Mon, 11 Oct 2021 12:27:24 +0000 (14:27 +0200)]
gtksink: Fetch the default "widget" value in the docs

There's really no interesting "widget" value that could be shown in the
docs, so use the GST_PARAM_DOC_SHOW_DEFAULT flag to avoid showing
another value.

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

2 years agogtksink: Avoid errors fetching widget property
Bastien Nocera [Mon, 11 Oct 2021 08:22:41 +0000 (10:22 +0200)]
gtksink: Avoid errors fetching widget property

Avoid errors when fetching the "widget" property and GTK initialisation
fails, such as when running in a non-graphical environment.

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

2 years agogtksink: Return reference to GtkWidget in the acquire function
Olivier Crête [Tue, 4 May 2021 17:27:30 +0000 (13:27 -0400)]
gtksink: Return reference to GtkWidget in the acquire function

This should ensure thread safety.

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

2 years agogtkglsink: Add rotate-method property
Olivier Crête [Thu, 3 Sep 2020 22:27:19 +0000 (18:27 -0400)]
gtkglsink: Add rotate-method property

This mostly just takes code out of glimagesink and applies it here.

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

2 years agoglutils: Export affine transformation functions for gtkglsink
Olivier Crête [Tue, 29 Aug 2017 21:21:05 +0000 (17:21 -0400)]
glutils: Export affine transformation functions for gtkglsink

Also remove duplicated copy of those functions from the gl plugin

With contributions from Bastien Nocera

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

2 years agoglvideoflip: Replace GstVideoFlipMethod -> GstVideoOrientationMethod
Olivier Crête [Tue, 4 May 2021 19:55:15 +0000 (15:55 -0400)]
glvideoflip: Replace GstVideoFlipMethod -> GstVideoOrientationMethod

It's the same enum, just drop the renamed copy. But keep the registered
GEnum as it is part of the API.

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

2 years agoglvideoflip: Use the API to parse the image orientation
Olivier Crête [Tue, 4 May 2021 19:51:36 +0000 (15:51 -0400)]
glvideoflip: Use the API to parse the image orientation

This will reduce the code duplication a little.

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

2 years agoglimagesink: Use the API to parse the image orientation
Olivier Crête [Tue, 4 May 2021 19:51:13 +0000 (15:51 -0400)]
glimagesink: Use the API to parse the image orientation

This will reduce the code duplication a little.

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

2 years agovideo: Add API to parse the image orientation from a GstTagList
Olivier Crête [Tue, 4 May 2021 19:50:59 +0000 (15:50 -0400)]
video: Add API to parse the image orientation from a GstTagList

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

2 years agoglimagesink: Replace GstGLRotateMethod with GstVideoOrientationMethod
Olivier Crête [Tue, 4 May 2021 19:39:29 +0000 (15:39 -0400)]
glimagesink: Replace GstGLRotateMethod with GstVideoOrientationMethod

It's the same enum, just drop the renamed copy. But keep the registered
GEnum as it is part of the API.

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

2 years agovideo: Put nicer documentation in GstVideoOrientationMethod
Olivier Crête [Tue, 4 May 2021 19:28:25 +0000 (15:28 -0400)]
video: Put nicer documentation in GstVideoOrientationMethod

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

2 years agosplitmuxsink: Don't assert on the input side if no GOP is available when shutting...
Sebastian Dröge [Tue, 12 Oct 2021 16:01:37 +0000 (19:01 +0300)]
splitmuxsink: Don't assert on the input side if no GOP is available when shutting down

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

2 years agomove-script: fix type in dateutil package name
Benjamin Gaignard [Fri, 1 Oct 2021 13:10:14 +0000 (15:10 +0200)]
move-script: fix type in dateutil package name

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

2 years agotests: Mark check.gstreamer.gst_gstbin.test_watch_for_state_change flaky
Thibault Saunier [Tue, 12 Oct 2021 13:10:05 +0000 (10:10 -0300)]
tests: Mark check.gstreamer.gst_gstbin.test_watch_for_state_change flaky

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

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

2 years agoges:tests: Mark check.gst-plugins-base.validate.giosrc.read-growing-file as flaky
Thibault Saunier [Mon, 11 Oct 2021 15:03:02 +0000 (12:03 -0300)]
ges:tests: Mark check.gst-plugins-base.validate.giosrc.read-growing-file as flaky

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

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

2 years agoges:tests: Mark ges 'check_edit_in_frames_with_framerate_mistmatch as flaky
Thibault Saunier [Mon, 11 Oct 2021 14:45:50 +0000 (11:45 -0300)]
ges:tests: Mark ges 'check_edit_in_frames_with_framerate_mistmatch as flaky

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

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

2 years agotests:webrtcbin: Make known flaky webrtcbin as such
Thibault Saunier [Mon, 11 Oct 2021 14:05:36 +0000 (11:05 -0300)]
tests:webrtcbin: Make known flaky webrtcbin as such

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

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

2 years agovalidate:launcher: Do not dump on failure test we will retry
Thibault Saunier [Fri, 8 Oct 2021 15:09:47 +0000 (12:09 -0300)]
validate:launcher: Do not dump on failure test we will retry

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

2 years agogst-env: Ignore SIGINT when running on the CI server
Thibault Saunier [Fri, 8 Oct 2021 14:54:22 +0000 (11:54 -0300)]
gst-env: Ignore SIGINT when running on the CI server

We get spurious sigint and this is just a small temporary workaround

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

2 years agotests: aggregator: Take `TIMEOUT_FACTOR` env var into account
Thibault Saunier [Sun, 26 Sep 2021 02:51:52 +0000 (23:51 -0300)]
tests: aggregator: Take `TIMEOUT_FACTOR` env var into account

This env var is set in the CI so we grow the timeout as required
(when running in valgrind for example).

Trying to avoid hitting wrong timeout in valgrind job like in:
https://gitlab.freedesktop.org/tpm/gstreamer/-/jobs/14009456

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

2 years agoci: Split base and core valgrind on different runners
Thibault Saunier [Fri, 8 Oct 2021 13:48:30 +0000 (10:48 -0300)]
ci: Split base and core valgrind on different runners

Those are very slow compared to other jobs and it should mitigate the problem

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

2 years agotests: Blacklist tests that are currently producing many CI failures
Thibault Saunier [Fri, 8 Oct 2021 13:44:50 +0000 (10:44 -0300)]
tests: Blacklist tests that are currently producing many CI failures

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

2 years agovalidate:launcher: Allow more flexible handling of flaky tests
Thibault Saunier [Fri, 8 Oct 2021 12:09:21 +0000 (09:09 -0300)]
validate:launcher: Allow more flexible handling of flaky tests

And retry twice flaky tests

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

2 years agovalidate:launcher: Fix progress reporting with --n-runs
Thibault Saunier [Fri, 8 Oct 2021 00:28:12 +0000 (21:28 -0300)]
validate:launcher: Fix progress reporting with --n-runs

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

2 years agovalidate:tests: Mark rtsp tests as generally flaky
Thibault Saunier [Thu, 7 Oct 2021 22:43:58 +0000 (19:43 -0300)]
validate:tests: Mark rtsp tests as generally flaky

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

2 years agoges:tests: Mark nested timelines as generally flaky
Thibault Saunier [Thu, 7 Oct 2021 22:43:30 +0000 (19:43 -0300)]
ges:tests: Mark nested timelines as generally flaky

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

2 years agovalidate:launcher: Support retry on failure when using --n-runs
Thibault Saunier [Thu, 7 Oct 2021 22:42:10 +0000 (19:42 -0300)]
validate:launcher: Support retry on failure when using --n-runs

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

2 years agovalidate:launcher: Fix potential invalid index access
Thibault Saunier [Thu, 7 Oct 2021 22:41:07 +0000 (19:41 -0300)]
validate:launcher: Fix potential invalid index access

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

2 years agovalidate:launcher: Fix adding logs to xunit
Thibault Saunier [Wed, 6 Oct 2021 20:21:58 +0000 (17:21 -0300)]
validate:launcher: Fix adding logs to xunit

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

2 years agogst-play: pick up minus and plus also from navigation events
Tim-Philipp Müller [Sun, 26 Sep 2021 17:05:31 +0000 (18:05 +0100)]
gst-play: pick up minus and plus also from navigation events

Makes it easier to test playback rate changes with the video
window being in focus.

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

2 years agolibsoup: Bump to 2.74 to fix gssapi build failure on macOS
Nirbheek Chauhan [Tue, 12 Oct 2021 06:13:16 +0000 (11:43 +0530)]
libsoup: Bump to 2.74 to fix gssapi build failure on macOS

See: https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/255

We also need to disable sysprof by default because it only builds on
native Linux. If someone really wants it, they can enable the option
on the command-line by passing -Dlibsoup:sysprof=enabled

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

2 years agomsdkenc: fix vp9enc initialization fail
Mengkejiergeli Ba [Wed, 22 Sep 2021 06:50:40 +0000 (14:50 +0800)]
msdkenc: fix vp9enc initialization fail

MediaSDK does not support to handle extbuff with id
MFX_EXTBUFF_VIDEO_SIGNAL_INFO for mjpegenc and vp9enc. Hence, need to
exclude mjpeg and vp9 when passing color properties to MediaSDK during
msdkenc initialization.

Fix issue: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/764

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

2 years agoexamples: d3d11: Add a desktop capture example
Seungha Yang [Sun, 10 Oct 2021 08:04:13 +0000 (17:04 +0900)]
examples: d3d11: Add a desktop capture example

... with d3d11 desktop capture device provider

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

2 years agod3d11: Add device provider for d3d11desktopdupsrc
Seungha Yang [Tue, 5 Oct 2021 12:49:38 +0000 (21:49 +0900)]
d3d11: Add device provider for d3d11desktopdupsrc

... and add support for multi-GPU/multi-monitor

By using newly added "monitor-handle" property, user can specify a
monitor to be captured via HMONITOR handle.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1673
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1103>

2 years agottml: fix log init
Stéphane Cerveau [Mon, 11 Oct 2021 13:23:08 +0000 (15:23 +0200)]
ttml: fix log init

The log system should be init before calling a log

Fix regression after:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038

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

2 years agomove-mrs-script: add url option
Stéphane Cerveau [Wed, 29 Sep 2021 12:41:31 +0000 (14:41 +0200)]
move-mrs-script: add url option

You can give as option:

--url
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1

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

2 years agomove-mrs-script: add a list only options
Stéphane Cerveau [Wed, 29 Sep 2021 11:35:09 +0000 (13:35 +0200)]
move-mrs-script: add a list only options

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

2 years agotests: va: Add VA buffer copy tests.
Víctor Manuel Jáquez Leal [Mon, 4 Oct 2021 11:30:37 +0000 (13:30 +0200)]
tests: va: Add VA buffer copy tests.

It should only work for raw buffers, but fails on dmabuf since it
should have a drm modifier.

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

2 years agova: allocator: dmabuf: Use GstVaSurfaceCopy, if possible.
Víctor Manuel Jáquez Leal [Wed, 6 Oct 2021 13:20:50 +0000 (15:20 +0200)]
va: allocator: dmabuf: Use GstVaSurfaceCopy, if possible.

If dmabuf-based buffer to copy contains only one memory, and there are
memories available in the allocator's pool, it's possible a fast
memory copy using GstVaSurfaceCopy, regardless the drm modifier.

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

2 years agova: allocator: Use GstVaSurfaceCopy.
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 13:21:01 +0000 (15:21 +0200)]
va: allocator: Use GstVaSurfaceCopy.

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

2 years agova: Add GstVaSurfaceCopy class.
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 11:36:56 +0000 (13:36 +0200)]
va: Add GstVaSurfaceCopy class.

This new class is a helper for fast/tricky copy of surfaces. First it
tries to copy using the function vaCopy in libva 1.12. If it fails, or
it's not available, a GstVaFilter is tried to be instantiated with the
allocator's parameters, and if succeed, it's used for copying the
source surface.

This is required for dmabuf surfaces with drm modifier.

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

2 years agova: filter: Enable to pass VASurfaceID in GstVaSample.
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 11:21:00 +0000 (13:21 +0200)]
va: filter: Enable to pass VASurfaceID in GstVaSample.

Initially GstVaSample processed its GstBuffer member to get the
VASurfaceID. But it might cases where we already have the VASurfaceID
to process by the filter.

This patch enables the possibility to pass the surfaces rather than
the buffers. In order to validate the surfaces a function to check
surfaces were added.

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

2 years agova: Split VA memory handling in different files.
Víctor Manuel Jáquez Leal [Thu, 7 Oct 2021 19:51:55 +0000 (21:51 +0200)]
va: Split VA memory handling in different files.

Take out the VA memory wrappers from gstvallocator.c to an external
file exposing the functions.

This is going to be needed for the copy helper object.

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

2 years agova: allocator: Add missing header file.
Víctor Manuel Jáquez Leal [Tue, 5 Oct 2021 04:54:25 +0000 (06:54 +0200)]
va: allocator: Add missing header file.

Added stdint.h because uintptr_t is used.

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

2 years agova: display: Add gst_va_display_has_vpp()
Víctor Manuel Jáquez Leal [Mon, 4 Oct 2021 19:31:53 +0000 (21:31 +0200)]
va: display: Add gst_va_display_has_vpp()

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

2 years agov4l2codecs: Align v4l2-controls header with kernel 5.15-rc3
Benjamin Gaignard [Thu, 30 Sep 2021 12:59:31 +0000 (14:59 +0200)]
v4l2codecs: Align v4l2-controls header with kernel 5.15-rc3

Update v4l2-controls to be aligned with kernel 5.15-rc3.
Fix VP8 decoder to use the correct field name.

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

2 years agoci: remove outdated rule for gstreamer-full-minimal
Jordan Petridis [Wed, 6 Oct 2021 10:25:12 +0000 (13:25 +0300)]
ci: remove outdated rule for gstreamer-full-minimal

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

2 years agoci: update rules that pointed to gst-ci subproject
Jordan Petridis [Wed, 6 Oct 2021 10:23:50 +0000 (13:23 +0300)]
ci: update rules that pointed to gst-ci subproject

The files are now moved into ci/ at the root of the repo.

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

2 years agouridecodebin3/urisourcebin: Reusability fixes
Jan Schmidt [Fri, 8 Oct 2021 18:39:38 +0000 (05:39 +1100)]
uridecodebin3/urisourcebin: Reusability fixes

Improvements to uridecodebin3 and urisourcebin so that they are
reusable across a PAUSED->READY->PAUSED transition.

Disconnect and release decodebin3 request pads when urisourcebin
removes src pads.

In urisourcebin, make sure to remove src pads that are exposed
directly (raw pads and static typefind srcpads) when
cleaning up.

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

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

2 years agoplaybin3: Always register 'playbin3' element.
Jan Schmidt [Sat, 9 Oct 2021 14:24:44 +0000 (01:24 +1100)]
playbin3: Always register 'playbin3' element.

If the USE_PLAYBIN3=1 env var is set, we want to replace
playbin with playbin3, but separate to that, we always
want to register the 'playbin3' element so that applications
which explicitly use playbin3 work regardless of the env var.

This fixes `USE_PLAYBIN3=1 gst-validate-launcher`, for example.

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

2 years agomediafoundation: mfvideoenc: Use DXGI adapter LUID
Seungha Yang [Fri, 8 Oct 2021 14:07:32 +0000 (23:07 +0900)]
mediafoundation: mfvideoenc: Use DXGI adapter LUID

Make use of new DXGI adapter LUID based device context sharing.
Note that we were using DXGI adapter LUID to open MFT already.

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

2 years agod3d11: d3d11decoder: Use DXGI adapter LUID
Seungha Yang [Fri, 8 Oct 2021 13:37:20 +0000 (22:37 +0900)]
d3d11: d3d11decoder: Use DXGI adapter LUID

... instead of index of DXGI adapter.

The order of IDXGIAdapter1 enumerated via IDXGIFactory1::EnumAdapters1
can be varying even there's no rebooting in case that GPU preference order
is updated by user (for example, it can be done by using NVIDIA Control Panel
in case of multi-GPU laptop system) and eGPU is another possible case.

So, for an element which requires fixed target GPU requirement,
index based device enumeration is unreliable.

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

2 years agod3d11: d3d11utils: Add support for DXGI Adapter LUID based D3D11 device context sharing
Seungha Yang [Fri, 8 Oct 2021 12:39:44 +0000 (21:39 +0900)]
d3d11: d3d11utils: Add support for DXGI Adapter LUID based D3D11 device context sharing

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

2 years agod3d11: d3d11device: Add gst_d3d11_device_new_{for_adapter_luid,wrapped}
Seungha Yang [Fri, 8 Oct 2021 10:41:22 +0000 (19:41 +0900)]
d3d11: d3d11device: Add gst_d3d11_device_new_{for_adapter_luid,wrapped}

* gst_d3d11_device_new_for_adapter_luid()
  Used for creating D3D11 device for a DXGI adapter (i.e., GPU)
  corresponding to a LUID (Locally Unique Identifier).
  This method can be useful for interop with other APIs such as
  Direct3D12, MediaFoundation, CUDA, etc.
* gst_d3d11_device_new_wrapped()
  Allows creating a new GstD3D11Device object by using already
  configured ID3D11Device. This is conceptually equivalent to
  gst_gl_context_new_wrapped()

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

2 years agod3d11: d3d11device: Remove "allow-tearing" property
Seungha Yang [Fri, 8 Oct 2021 08:16:02 +0000 (17:16 +0900)]
d3d11: d3d11device: Remove "allow-tearing" property

Plugin can query DXGI_FEATURE_PRESENT_ALLOW_TEARING without d3d11device
help

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

2 years agowebrtcbin: Use the same promise reply structure name everywhere
Sebastian Dröge [Fri, 8 Oct 2021 18:14:52 +0000 (21:14 +0300)]
webrtcbin: Use the same promise reply structure name everywhere

This was an inconsistent mix of different names in the past. The name
has no meaning at all so let's set all to "application/x-gst-promise".

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

2 years agoplaybin3: Avoid group deactivation deadlock.
Jan Schmidt [Mon, 4 Oct 2021 18:43:13 +0000 (05:43 +1100)]
playbin3: Avoid group deactivation deadlock.

Change locking around group deactivation to avoid deadlocks
when shutting down exactly as a buffering message arrives.

The PLAYBIN3_LOCK now protects the active field of the
source group. Everything else is still protected by the
source-group-lock.

Also properly protect group switching operations with
the PLAYBIN3_LOCK everywhere.

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

2 years agochopmydata: Fix FIXMEs in gst_element_class_set_static_metadata
Vivia Nikolaidou [Fri, 8 Oct 2021 12:44:37 +0000 (15:44 +0300)]
chopmydata: Fix FIXMEs in gst_element_class_set_static_metadata

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

2 years agoFAQ: add mention to downstream cherry-pick
Stéphane Cerveau [Fri, 8 Oct 2021 11:20:37 +0000 (13:20 +0200)]
FAQ: add mention to downstream cherry-pick

Give an help to cherry-pick an upstream patch to
downstream repository (old stable version)

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

2 years agod3d11: d3d11desktopdupsrc: Add support for non-D3D11 downstream element
Seungha Yang [Tue, 5 Oct 2021 18:19:30 +0000 (03:19 +0900)]
d3d11: d3d11desktopdupsrc: Add support for non-D3D11 downstream element

By this commit, application doesn't need to configure d3d11download
element for software pipeline which will make things simpler

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

2 years agovalidate:scenario: Allow waiting signal searching for element factory
Thibault Saunier [Tue, 5 Oct 2021 21:50:21 +0000 (18:50 -0300)]
validate:scenario: Allow waiting signal searching for element factory

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

2 years agojpegdec: Support libjpeg-turbo colorspace conversion
Marek Vasut [Fri, 5 Jun 2020 14:20:18 +0000 (16:20 +0200)]
jpegdec: Support libjpeg-turbo colorspace conversion

The libjpeg-turbo has a built-in support for performing colorspace
conversion. The performance of this conversion is much better than
doing the same separately using videoconvert. Implement support for
this conversion to RGBx/xRGB/BGRx/xBGR formats. Other formats can
be easily added later.

- The decoding of various pixel formats can be tested and compared to
  non-libjpeg-turbo decoding as follows:
  for gfmt in {RGB,BGR}{,x} x{RGB,BGR} ; do
      echo "$gfmt"
      gst-launch-1.0 -q \
          videotestsrc pattern=colors ! \
          video/x-raw,format=${gfmt} ! \
          fakesink dump=true | \
  head -n 200 | tail -n 1
      gst-launch-1.0 -q --gst-plugin-path=build/ext/jpeg/ \
          videotestsrc pattern=colors ! \
          video/x-raw,format=${gfmt} ! \
  jpegenc ! \
  jpegdec ! \
  video/x-raw,format=${gfmt} ! \
  fakesink dump=true | \
  head -n 200 | tail -n 1
      done
  Result looks as follows, i.e. comparable:
  RGB
  00000c70 (0x7f7736fbdd10): 05 33 19 05 33 26 05 33 33 05 33 40 05 33 4c 05  .3..3&.33.3@.3L.
  00000c70 (0x7f389e8f7d10): 05 32 17 04 32 22 04 32 31 04 32 3e 04 32 4a 04  .2..2".21.2>.2J.
  RGBx
  00000c70 (0x7f79efd0ad10): cc 07 22 ff d9 07 22 ff e6 07 22 ff f3 07 22 ff  .."..."..."...".
  00000c70 (0x7fb6989f3d10): cd 06 22 00 d9 06 22 00 e6 06 22 00 f4 06 22 00  .."..."..."...".
  BGR
  00000c70 (0x7fa0a6c42d10): 05 0c 33 05 19 33 05 26 33 05 33 33 05 40 33 05  ..3..3.&3.33.@3.
  00000c70 (0x7fc74165fd10): 05 08 32 04 17 32 04 22 32 04 31 32 04 3e 32 04  ..2..2."2.12.>2.
  BGRx
  00000c70 (0x7fbf399f1d10): 22 07 cc ff 22 07 d9 ff 22 07 e6 ff 22 07 f3 ff  "..."..."..."...
  00000c70 (0x7f50e3d1cd10): 22 06 cd 00 22 06 d9 00 22 06 e6 00 22 06 f4 00  "..."..."..."...
  xRGB
  00000c70 (0x7f0b950a2d10): ff cc 07 22 ff d9 07 22 ff e6 07 22 ff f3 07 22  ..."..."..."..."
  00000c70 (0x7f4416b8dd10): 00 cd 06 22 00 d9 06 22 00 e6 06 22 00 f4 06 22  ..."..."..."..."
  xBGR
  00000c70 (0x7f237d74dd10): ff 22 07 cc ff 22 07 d9 ff 22 07 e6 ff 22 07 f3  ."..."..."..."..
  00000c70 (0x7f095547dd10): 00 22 06 cd 00 22 06 d9 00 22 06 e6 00 22 06 f4  ."..."..."..."..
                             ^^          ^^          ^^          ^^
  Notice how the alpha channel is set to arbitrary value in case of the
  libjpeg-turbo decoding into RGBx/BGRx/xRGB/xBGR pixel formats. This is
  documented in libjpeg-turbo README.md as follows:
    "
    When using the RGBX, BGRX, XBGR, and XRGB colorspaces during decompression, the
    X byte is undefined, and in order to ensure the best performance, libjpeg-turbo
    can set that byte to whatever value it wishes.
    "

- The interlaced num_fields=2 mjpeg stream can be generated and
  tested as follows (this does require mjpegtools):
  $ gst-launch-1.0 videotestsrc num-buffers=10 ! jpegenc ! multifilesink location=in%04d.jpg
  $ jpeg2yuv -f 25 -I t -L 0 -j in%04d.jpg | yuv2lav -f avi -o result.avi
  ...
  $ gst-launch-1.0 --gst-plugin-path=build/ext/jpeg/ filesrc location=result.avi ! \
       avidemux ! jpegdec ! video/x-raw,format=RGBx ! videoconvert ! autovideosink

Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1091>

2 years agortsp-media: Unprepare suspended medias too
Sebastian Dröge [Thu, 7 Oct 2021 10:00:10 +0000 (13:00 +0300)]
rtsp-media: Unprepare suspended medias too

Previously suspended medias immediately reached the UNPREPARED state
without going through the media's unprepare() vfunc. This didn't allow
the media subclass to do any additional cleanup, and for example the
shutdown-eos property of GstRTSPMedia was ignored.

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

2 years agotests: gstmeta: Fix failure on Windows
Seungha Yang [Fri, 1 Oct 2021 14:36:39 +0000 (23:36 +0900)]
tests: gstmeta: Fix failure on Windows

Windows doesn't support fork so every test will be performed in
one process. So the test_meta_custom_transform() is being
failed because "test-custom" custom meta is being used/defined in
another test test_meta_custom() as well.

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

2 years agocodecs: Use GST_VIDEO_DECODER_ERROR() only for decoding error case
Seungha Yang [Wed, 6 Oct 2021 13:06:44 +0000 (22:06 +0900)]
codecs: Use GST_VIDEO_DECODER_ERROR() only for decoding error case

The GST_VIDEO_DECODER_ERROR() should be used only for robust/error-resilient
decoding purpose. Any other error codes such as not-negotiated or flushing
should be returned without modified for upstream to be able to handle
it immediately. (for example, application might want to try other
decoder element on not-negotiated)

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

2 years agocodecs: h264decoder: Update for remaining gboolean to GstFlowReturn port
Seungha Yang [Wed, 6 Oct 2021 16:54:29 +0000 (01:54 +0900)]
codecs: h264decoder: Update for remaining gboolean to GstFlowReturn port

Fix for spurious/spammy warning and wrong function return type

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

2 years agortsp-media: Only unprepare a media if it was not already unpreparing anyway
Sebastian Dröge [Wed, 6 Oct 2021 15:19:29 +0000 (18:19 +0300)]
rtsp-media: Only unprepare a media if it was not already unpreparing anyway

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

2 years agomeson: Fix gst-launch build on UWP
Nirbheek Chauhan [Thu, 23 Sep 2021 11:37:09 +0000 (17:07 +0530)]
meson: Fix gst-launch build on UWP

The APIs we need from WinMM for higher timer resolution are only
available for non-UWP apps. The winmm library itself is still
available, so we need to disable the check.

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

2 years agomeson: Fix build with -Dopenjpeg=disabled
Nirbheek Chauhan [Thu, 23 Sep 2021 12:06:20 +0000 (17:36 +0530)]
meson: Fix build with -Dopenjpeg=disabled

tests/check/meson.build uses the openjpeg_dep variable
unconditionally, and the subdir_done() is useless anyway, since the
plugin is only built if openjpeg_dep.found() is true. Fixes:

..\tests\check\meson.build:23:0: ERROR: Unknown variable "openjpeg_dep".

In particular, this fixes the build on UWP since we disable openjpeg
explicitly in Cerbero when building for UWP.

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

2 years agobad: gs: update README
Guillaume Desmottes [Fri, 1 Oct 2021 12:35:06 +0000 (14:35 +0200)]
bad: gs: update README

- add one missing dep
- change install path to match monorepo
- fix current dirs

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

2 years agortsp-client: make sure sessmedia will not get freed while used
Ognyan Tonchev [Sun, 3 Oct 2021 21:25:23 +0000 (23:25 +0200)]
rtsp-client: make sure sessmedia will not get freed while used

handle_*_request() functions were all retrieving the session media from
the session by calling gst_rtsp_session_get_media () which is a transfer-none
call. If a session timeout happens at that time, the session media may get freed
making the pointer invalid..

Fixes #757

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

2 years agovalidate:launcher: Sync asset only when passing --sync
Thibault Saunier [Sat, 2 Oct 2021 14:58:56 +0000 (11:58 -0300)]
validate:launcher: Sync asset only when passing --sync

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

2 years agoci: Fix typo in cerbero trigger
Xavier Claessens [Tue, 5 Oct 2021 15:47:17 +0000 (11:47 -0400)]
ci: Fix typo in cerbero trigger

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

2 years agotrigger_cerbero_pipeline.py: Do not hardcode gitlab instance
Xavier Claessens [Tue, 5 Oct 2021 15:20:32 +0000 (11:20 -0400)]
trigger_cerbero_pipeline.py: Do not hardcode gitlab instance

When GStreamer is forked into a private GitLab instance we should
trigger cerbero into that private instance too. Otherwise the token
won't be accepted.

Also do not hardcode the cerbero project ID because it is instance
specific.

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

2 years agova: Use macro rather than VAMemory feature string.
Víctor Manuel Jáquez Leal [Fri, 17 Sep 2021 11:02:38 +0000 (13:02 +0200)]
va: Use macro rather than VAMemory feature string.

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

2 years agoci: remove duplicate stage key in documentation job
Jordan Petridis [Tue, 5 Oct 2021 20:28:57 +0000 (23:28 +0300)]
ci: remove duplicate stage key in documentation job

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

2 years agoci: Remove "check allow-edit" job because gitlab does it by default
Xavier Claessens [Tue, 5 Oct 2021 00:44:15 +0000 (20:44 -0400)]
ci: Remove "check allow-edit" job because gitlab does it by default

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

2 years agoci: Update fedora image for cerbero trigger
Xavier Claessens [Tue, 5 Oct 2021 00:24:58 +0000 (20:24 -0400)]
ci: Update fedora image for cerbero trigger

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