platform/upstream/gstreamer.git
2 years agovaapi: Disable Wayland if no libdrm
Víctor Manuel Jáquez Leal [Sun, 30 Jan 2022 08:38:48 +0000 (09:38 +0100)]
vaapi: Disable Wayland if no libdrm

Platform wise, is not possible, as far as I known, to have Wayland
without kernel's DRM. Though, it's possible to configure
gstreamer-vaapi without DRM but Wayland support, with the enhanced
handling of dmabuf in vaapisink for Wayland, vaapisink will always
fail. Given both issues, configuration with no DRM but Wayland, makes
things more complex, and a simpler approach is to refuse that
configuration.

This patch disables Wayland support if there isn't DRM support. Also,
it disables the display test for Wayland, relying only on DRM and
X11.

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

2 years agovaapi: libs: video-format: Check if formats map is not NULL.
Víctor Manuel Jáquez Leal [Sun, 30 Jan 2022 06:10:09 +0000 (07:10 +0100)]
vaapi: libs: video-format: Check if formats map is not NULL.

Formats map is instantiated at the end of the display
instantiation. The problem is the Wayland display which looks for a
format in a callback, before the map is populated.

If user compiles gstreamer-vaapi with DRM support, the map is
populated with a DRM display at GStreamer plugin registration. But if
not, or a VA driver is not available, the plugin will try with a
Wayland driver, which cause the NULL de-reference.

Nevertheless, in the case of no DRM support, and if the Wayland
display doesn't get a reply from the format conversion is not a
problem.

So the solution is the trivial one, check if the format map is already
populated before de-reference it.

Fixes: #977
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1606>

2 years agogstreamer-full: warn if version-script not available
Stéphane Cerveau [Tue, 19 Oct 2021 10:32:32 +0000 (12:32 +0200)]
gstreamer-full: warn if version-script not available

Instead of error out, warn user that the platform does not support
the version script.

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

2 years agowpe: Support wpe-webkit-1.1
Jan Alexander Steffens (heftig) [Fri, 14 Jan 2022 10:26:42 +0000 (11:26 +0100)]
wpe: Support wpe-webkit-1.1

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

2 years agowpe: Install WebExtension in pkglibdir
Philippe Normand [Sat, 29 Jan 2022 10:24:36 +0000 (10:24 +0000)]
wpe: Install WebExtension in pkglibdir

The uninstalled WebExtension takes precedence over the installed one, so that
audio support works in local developer builds as well.

Fixes #975

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

2 years agodocs: Rename "OS X" to "macOS" in some documentation
Nirbheek Chauhan [Sun, 30 Jan 2022 13:36:29 +0000 (19:06 +0530)]
docs: Rename "OS X" to "macOS" in some documentation

No one uses the term "Mac OS X" anymore, it's "macOS". "OS X" is even
worse, because people will usually start the search with "mac".

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

2 years agoosxaudio: Document GstOsxAudioElement interface
Nirbheek Chauhan [Sat, 29 Jan 2022 22:26:14 +0000 (03:56 +0530)]
osxaudio: Document GstOsxAudioElement interface

This is listed as a public interface implemented by osxaudio, so we
need to mark it as a plugin API so that it's listed in the
documentation correctly.

This is an ancient symbol, so add it to the symbol index too.

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

2 years agoapplemedia: Document vtenc / vtdec elements
Nirbheek Chauhan [Fri, 28 Jan 2022 17:45:28 +0000 (23:15 +0530)]
applemedia: Document vtenc / vtdec elements

Also preserve-alpha property should only be exposed on the
vtenc_prores element since h264 does not support transparency.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/issues/94

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

2 years agodocs: Update symbol index with old macOS plugin symbols
Nirbheek Chauhan [Fri, 28 Jan 2022 17:07:38 +0000 (22:37 +0530)]
docs: Update symbol index with old macOS plugin symbols

These symbols from macOS plugins osxaudio, osxvideo, and applemedia
have been present for a very long time but were never documented.

This allows us to document these, and also add Since: markers for new
features (symbols) there were added in 1.20

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

2 years agosoup: Don't store a strong reference to the logging object
Sebastian Dröge [Sat, 29 Jan 2022 10:56:22 +0000 (12:56 +0200)]
soup: Don't store a strong reference to the logging object

Otherwise this causes a reference cycle between the session, the logger
and the logging object (i.e. the sink element or session wrapper).

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

2 years agosouphttpsrc: Always abort the session once its last user is gone
Sebastian Dröge [Sat, 29 Jan 2022 10:55:30 +0000 (12:55 +0200)]
souphttpsrc: Always abort the session once its last user is gone

And wait until there are no pending GSources on the main context anymore
afterwards.

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

2 years agosouphttpsrc: Post context message after setting up the context from the source's...
Sebastian Dröge [Sat, 29 Jan 2022 10:54:23 +0000 (12:54 +0200)]
souphttpsrc: Post context message after setting up the context from the source's thread

This simplifies the code and especially the locking a bit, and makes
sure we only export the session after it is fully set up.

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

2 years agov4l2codecs: h264: Improve ABI check
Nicolas Dufresne [Fri, 28 Jan 2022 19:39:35 +0000 (14:39 -0500)]
v4l2codecs: h264: Improve ABI check

This moves the ABI check to the registration, so we don't expose
decoders with the wrong ABI or that are just broken somehow. It
also makes few enhancement:

- Handle missing, but required controls
- Prints the controls macro name instead of id

This should fix RK3399 support with a currently release minor
regression in the Hantro driver that cause errors.

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

2 years agowebrtc: Expose RTCError enum
Philippe Normand [Fri, 28 Jan 2022 17:11:41 +0000 (17:11 +0000)]
webrtc: Expose RTCError enum

The error codes not complying with the spec are now notified with the
GST_WEBRTC_ERROR_INTERNAL_FAILURE code.

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

2 years agod3d11decoder: Fix typo in doc
Seungha Yang [Fri, 28 Jan 2022 19:46:24 +0000 (04:46 +0900)]
d3d11decoder: Fix typo in doc

s/elemenet/element/g

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

2 years agoRelease 1.19.90
Tim-Philipp Müller [Fri, 28 Jan 2022 14:28:35 +0000 (14:28 +0000)]
Release 1.19.90

2 years agoUpdate ChangeLogs for 1.19.90
Tim-Philipp Müller [Fri, 28 Jan 2022 14:28:28 +0000 (14:28 +0000)]
Update ChangeLogs for 1.19.90

2 years agosouphttpsink: Protect against spurious wakeups during startup
Sebastian Dröge [Fri, 28 Jan 2022 13:47:44 +0000 (15:47 +0200)]
souphttpsink: Protect against spurious wakeups during startup

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

2 years agosouphttpsrc: Don't use the source element after setup from the session thread
Sebastian Dröge [Fri, 28 Jan 2022 13:33:04 +0000 (15:33 +0200)]
souphttpsrc: Don't use the source element after setup from the session thread

The source element might be gone already if the session is shared with
other source elements.

As a consequence, do all logging via the session object instead of using
the source element.

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

2 years agosouphttpsrc: Don't abort all pending operations on the session if shutting down a...
Sebastian Dröge [Fri, 28 Jan 2022 13:31:55 +0000 (15:31 +0200)]
souphttpsrc: Don't abort all pending operations on the session if shutting down a source with a shared session

Only do it for a non-shared session. Other sources would otherwise get
their requests cancelled unexpectedly.

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

2 years agosouphttpsrc: Don't set boolean to FALSE right after checking that it is FALSE
Sebastian Dröge [Fri, 28 Jan 2022 13:31:25 +0000 (15:31 +0200)]
souphttpsrc: Don't set boolean to FALSE right after checking that it is FALSE

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

2 years agosouphttpsrc: soup_session_new_with_options() can't fail with NULL
Sebastian Dröge [Fri, 28 Jan 2022 13:30:56 +0000 (15:30 +0200)]
souphttpsrc: soup_session_new_with_options() can't fail with NULL

So don't check for it.

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

2 years agotests: Mark adaptivedemux tests as sometimes timing out
Sebastian Dröge [Fri, 28 Jan 2022 10:18:18 +0000 (12:18 +0200)]
tests: Mark adaptivedemux tests as sometimes timing out

... in addition to all the other issues that were ignored for them
already.

At least the reverse playback test regularly times out, waiting for a
download to finish that has already finished successfully.

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

2 years agoautodetect: fix debug init category
Stéphane Cerveau [Thu, 27 Jan 2022 15:28:48 +0000 (16:28 +0100)]
autodetect: fix debug init category

Since the split of elements, the debug category
was default for autodetect.

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

2 years agosoup: move libsoup session into its own thread
Daniel Kolesa [Fri, 21 Jan 2022 15:09:30 +0000 (16:09 +0100)]
soup: move libsoup session into its own thread

Starting with libsoup3, there is no attempt to handle thread safety
inside the library, and it was never considered fully safe before
either. Therefore, move all session handling into its own thread.

The libsoup thread has its own context and main loop. When some
request is made or a response needs to be read, an idle source
is created to issue that; the gstreamer thread issuing that waits
for that to be complete. There is a per-src condition variable to
deal with that.

Since the thread/loop needs to be longer-lived than the soup
session itself, a wrapper object is provided to contain them. The
soup session only has a single reference, owned by the wrapper
object.

It is no longer possible to force an external session, since this
does not seem to be used anywhere within gstreamer and would be
tricky to implement; this is because one would not have to provide
just a session, but also the complete thread arrangement made in
the same way as the system currently does internally, in order to
be safe.

Messages are still built gstreamer-side. It is safe to do so until
the message is sent on the session. Headers are also processed on
the gstreamer side, which should likewise be safe.

All requests as well as reads on the libsoup thread are issued
asynchronously. That allows libsoup to schedule things with as
little blocking as possible, and means that concurrent access
to the session is possible, when sharing the session.

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

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

2 years agovapostproc: Make cb max values symmetrical to their min values.
Víctor Manuel Jáquez Leal [Thu, 27 Jan 2022 10:22:54 +0000 (11:22 +0100)]
vapostproc: Make cb max values symmetrical to their min values.

Intel drivers expose some colorbalance's maximum values much more
bigger than their minimum values, given their middle values (default
value). This means, in practice, that the real middle point between
the maximum and minimum values implies a major change in the color
balance, which is not expected by the GStreamer color balance logic.

This patch makes the given maximum value symmetrical to the minimum
value, given the middle one (default value).

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

2 years agoci: Add a Windows native cross-arm64 job with a new image
Nirbheek Chauhan [Thu, 27 Jan 2022 05:55:53 +0000 (11:25 +0530)]
ci: Add a Windows native cross-arm64 job with a new image

Needed an update to the windows Dockerfile to:

1. Install the 'UniversalBuildTools' workload for Cerbero
2. Install ARM and ARM64 workloads for cross-uwp-universal in Cerbero
3. Install VS 2019 since we need that for ARM64 NEON support in Opus

We can't test UWP in gstreamer.git because glib needs custom patches
for that. It will be tested in Cerbero.

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

2 years agoci: Remove windows-sdk-8.1 from docker image
Nirbheek Chauhan [Thu, 27 Jan 2022 09:21:45 +0000 (14:51 +0530)]
ci: Remove windows-sdk-8.1 from docker image

We don't need this, we use the Windows 10 SDK provided by Visual
Studio Build Tools.

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

2 years agosubprojects/pcre: Add the wrap so it's cached in the image
Nirbheek Chauhan [Thu, 27 Jan 2022 09:20:54 +0000 (14:50 +0530)]
subprojects/pcre: Add the wrap so it's cached in the image

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

2 years agogst-devtools: Add a cairo option for the cairo dep
Nirbheek Chauhan [Thu, 27 Jan 2022 05:55:00 +0000 (11:25 +0530)]
gst-devtools: Add a cairo option for the cairo dep

So that it can be explicitly disabled to avoid pulling in pixman which
doesn't build on Windows ARM64 yet.

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

2 years agosubprojects/lame: Update to latest wrap
Nirbheek Chauhan [Thu, 27 Jan 2022 05:54:01 +0000 (11:24 +0530)]
subprojects/lame: Update to latest wrap

Fixes an issue with xmmintrin on non-x86 machines:

https://github.com/mesonbuild/wrapdb/pull/295

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

2 years agosubprojects/libpng: Update to latest wrap file
Nirbheek Chauhan [Thu, 27 Jan 2022 05:57:36 +0000 (11:27 +0530)]
subprojects/libpng: Update to latest wrap file

It was getting pulled in automatically via cairo, but the version
there is too old for us. We need the latest to fix Windows ARM64 NEON
support:

> ERROR: No specified compiler can handle file subprojects\libpng-1.6.37\arm/filter_neon.S

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

2 years agov4l2codecs: Fix debug assertion in register functions
Nicolas Dufresne [Thu, 27 Jan 2022 16:49:53 +0000 (11:49 -0500)]
v4l2codecs: Fix debug assertion in register functions

As now, we warn if the decoder have no support src pixel format, but that
warning is called before the type (hence the debug category) is initialized.
Fix this by moving the debug category init out of the type initialization,
into the register funcitons.

This will fix an assertion that occures in the register function and allow
relevant log to be seen by the users.

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

2 years agowebrtcbin: Chain up to parent constructed method
Jakub Adam [Thu, 27 Jan 2022 16:56:29 +0000 (17:56 +0100)]
webrtcbin: Chain up to parent constructed method

Failing to do so makes GstWebRTCBin invisible to the leaks tracer.

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

2 years agoaggregator: don't forward reconfigure events
Mathieu Duponchelle [Wed, 22 Dec 2021 23:24:03 +0000 (00:24 +0100)]
aggregator: don't forward reconfigure events

Those will cause us to renegotiate at the next aggregate cycle,
and while at that point we may decide to reconfigure upstream
branches (in practice we don't as this is inherently racy,
and that's the reason why mixer subclasses perform conversion
internally), we certainly don't want to just forward the event
willy-nilly to all our sinkpads.

An actual issue this is fixing is when caps downstream of a
compositor are changed at every samples-selected signal emission,
for the purpose of interpolating the output geometry, and the
compositor has a non-zero latency, the reconfigure events were
forwarded to basesrc, which triggered an allocation query, which
in turn caused aggregator to have to drain (thus not being able
to queue <latency> frames), leading to disastrous effects
(choppy output as compositor couldn't consume frames fast enough,
the higher the latency the choppier the output)

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

2 years agortphdrext: Return non-floating references from `gst_rtp_header_extension_create_from_...
Sebastian Dröge [Thu, 27 Jan 2022 12:22:26 +0000 (14:22 +0200)]
rtphdrext: Return non-floating references from `gst_rtp_header_extension_create_from_uri()`

The header extension objects are never getting a parent object and using
floating references only complicates usage, especially via dynamic API
like signals.

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

2 years agortphdrext: Use `set_metadata()` instead of `set_static_metadata()`
Sebastian Dröge [Thu, 27 Jan 2022 12:26:26 +0000 (14:26 +0200)]
rtphdrext: Use `set_metadata()` instead of `set_static_metadata()`

The latter needs a static string.

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

2 years agoVideoInfo, AudioInfo: fix usage with python bindings
Mathieu Duponchelle [Tue, 25 Jan 2022 23:02:49 +0000 (00:02 +0100)]
VideoInfo, AudioInfo: fix usage with python bindings

* Expose an actual constructor from caps

* Error out in overrides for code that was using the "manual
  allocation" pattern which only worked by chance. Direct
  the script writer to the new_from_caps constructor instead.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/-/issues/47

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

2 years agodocs: Updates to contributing guide
Brad Hards [Thu, 27 Jan 2022 04:54:28 +0000 (10:24 +0530)]
docs: Updates to contributing guide

Mostly some modifications for handling security issues.

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

2 years agodocs: Explain how to open a merge request with screenshots
Nirbheek Chauhan [Fri, 19 Nov 2021 07:15:13 +0000 (12:45 +0530)]
docs: Explain how to open a merge request with screenshots

The merge request workflow can be confusing to people unfamiliar with
it, so add screenshots.

Also add a new section on how to revise merge requests, since a lot of
people tend to open new merge requests to make any changes.

Eliminate the separate "How to Prepare a Merge Request for Submission"
section -- merge it with the main section.

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

2 years agogst-plugins-bad: update translations
Tim-Philipp Müller [Thu, 27 Jan 2022 01:40:17 +0000 (01:40 +0000)]
gst-plugins-bad: update translations

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

2 years agogst-plugins-ugly: update translations
Tim-Philipp Müller [Thu, 27 Jan 2022 01:39:28 +0000 (01:39 +0000)]
gst-plugins-ugly: update translations

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

2 years agogst-plugins-good: update translations
Tim-Philipp Müller [Thu, 27 Jan 2022 01:38:39 +0000 (01:38 +0000)]
gst-plugins-good: update translations

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

2 years agogst-plugins-base: update translations
Tim-Philipp Müller [Thu, 27 Jan 2022 01:38:12 +0000 (01:38 +0000)]
gst-plugins-base: update translations

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

2 years agogstreamer: update translations
Tim-Philipp Müller [Thu, 27 Jan 2022 01:37:18 +0000 (01:37 +0000)]
gstreamer: update translations

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

2 years agod3d11av1dec: Fix typo in debug message
Seungha Yang [Wed, 26 Jan 2022 18:10:39 +0000 (03:10 +0900)]
d3d11av1dec: Fix typo in debug message

Fixing copy and paste mistake, It's AV1 decoder not VP8

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

2 years agortspsrc: Fix critical while serializing timeout element message
Nirbheek Chauhan [Wed, 26 Jan 2022 05:52:31 +0000 (11:22 +0530)]
rtspsrc: Fix critical while serializing timeout element message

The "cause" field wasn't registered as a GEnumValue, so do that.

Fixes this critical in gst_structure_to_string():

`gst_value_serialize: assertion 'G_IS_VALUE (value)' failed`

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

2 years agoaudioaggregator: Return NOT_NEGOTIATED when the configuration is invalid
Vivia Nikolaidou [Mon, 24 Jan 2022 10:26:25 +0000 (12:26 +0200)]
audioaggregator: Return NOT_NEGOTIATED when the configuration is invalid

Otherwise we just end up outputting garbage.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/957

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

2 years agovideoaggregator: Remove extra semicolon in macro usage
Nirbheek Chauhan [Wed, 26 Jan 2022 05:42:34 +0000 (11:12 +0530)]
videoaggregator: Remove extra semicolon in macro usage

This is usually necessary to allow gst-indent to treat it as
a statement, but we do not run gst-indent on headers and we do not
have extra semicolons in other places that this macro is used in the
header. Fixes warnings when using the header:

```
In file included from gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/video.h:185,
                 from XYZ:9001:
gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.h:206:78: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
  206 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoAggregatorConvertPad, gst_object_unref);
      |                                                                              ^
gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.h:214:181: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
  214 | G_DECLARE_DERIVABLE_TYPE (GstVideoAggregatorParallelConvertPad, gst_video_aggregator_parallel_convert_pad, GST, VIDEO_AGGREGATOR_PARALLEL_CONVERT_PAD, GstVideoAggregatorConvertPad);
      |                                                                                                                                                                                     ^
```

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

2 years agogstplugin: Fix for UWP build
Seungha Yang [Tue, 25 Jan 2022 17:46:49 +0000 (02:46 +0900)]
gstplugin: Fix for UWP build

SetThreadErrorMode() API is available on UWP but flag values
are desktop API only. Since error dialogs don't exist on UWP,
we don't need to suppress it

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

2 years agova: basetransform: Pass component index not plane index.
Víctor Manuel Jáquez Leal [Tue, 25 Jan 2022 11:32:50 +0000 (12:32 +0100)]
va: basetransform: Pass component index not plane index.

This is an issue detected and fixed in commit 3897b24f for other
libraries and elements.

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

2 years agosplitmuxsink: Warn when calculating the next fragment time in timecode mode fails
Sebastian Dröge [Mon, 24 Jan 2022 08:45:33 +0000 (10:45 +0200)]
splitmuxsink: Warn when calculating the next fragment time in timecode mode fails

But only if timecode mode is enabled as it will fail all the time
otherwise.

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

2 years agoqt: Retain compatibility with Qt 5.9
Nirbheek Chauhan [Tue, 25 Jan 2022 09:35:47 +0000 (15:05 +0530)]
qt: Retain compatibility with Qt 5.9

QSharedPointer.get() was added in Qt 5.11, and it does the same thing
as .data()

https://doc.qt.io/qt-5/qsharedpointer.html#get

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

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

2 years agomeson: Update subprojects to fix warnings
Nirbheek Chauhan [Tue, 25 Jan 2022 08:55:19 +0000 (14:25 +0530)]
meson: Update subprojects to fix warnings

glib-2-70 commit 359a837e
meson: fix warnings for extract_all_objects

libdrm-2.4.109 commit 05b0a955
man: convert to reStructuredText
Fixes warning about run_command() check: kwarg

pixman commit adc07d46
meson: Fix warning about extract_all_objects usage

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

2 years agoges: Include ges-image-source.h in the installed headers
Sebastian Dröge [Mon, 24 Jan 2022 17:44:32 +0000 (19:44 +0200)]
ges: Include ges-image-source.h in the installed headers

It's referenced by `ges.h` and was previously available, so removing it
is an API change.

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

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

2 years agova: filter & postproc: Match color with caps features.
Víctor Manuel Jáquez Leal [Mon, 24 Jan 2022 10:14:14 +0000 (11:14 +0100)]
va: filter & postproc: Match color with caps features.

When fixating color, there might be "other caps" with color spaces not
supported by the caps features exposed in the vapostproc's source pad
caps template (perhaps it's a bug somewhere else in GStreamer).

This solution checks if the proposed format exists in the filter
within the caps feature associated with the proposed format.

The check is done with the new filter's function
gst_va_filter_has_video_format().

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

2 years agotsmux: Allow specifying PMT order via the prog-map
Jan Alexander Steffens (heftig) [Mon, 10 Jan 2022 12:34:21 +0000 (13:34 +0100)]
tsmux: Allow specifying PMT order via the prog-map

Look for an entry `PMT_<PID>` in the `prog-map`, which specifies the
relative index of the stream in the PMT.

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

2 years agotsmux: Deterministically order program streams by PID
Jan Alexander Steffens (heftig) [Mon, 10 Jan 2022 13:16:28 +0000 (14:16 +0100)]
tsmux: Deterministically order program streams by PID

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

2 years agotsmux: Deterministically order PAT programs by number
Jan Alexander Steffens (heftig) [Mon, 10 Jan 2022 11:59:58 +0000 (12:59 +0100)]
tsmux: Deterministically order PAT programs by number

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

2 years agotsmux: Remove program_array_index
Jan Alexander Steffens (heftig) [Mon, 10 Jan 2022 12:03:11 +0000 (13:03 +0100)]
tsmux: Remove program_array_index

It's only used for removal. Let's just scan the array.

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

2 years agotsmux: Replace streams GArray with GPtrArray
Jan Alexander Steffens (heftig) [Mon, 10 Jan 2022 11:31:42 +0000 (12:31 +0100)]
tsmux: Replace streams GArray with GPtrArray

This is more appropriate.

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

2 years agoaudiotestsrc: Produce a default channel mask if possible
Vivia Nikolaidou [Mon, 24 Jan 2022 10:57:10 +0000 (12:57 +0200)]
audiotestsrc: Produce a default channel mask if possible

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/957

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

2 years agovideo-converter: Fix for broken gamma remap with high bitdepth YUV output
Seungha Yang [Fri, 10 Dec 2021 11:09:42 +0000 (20:09 +0900)]
video-converter: Fix for broken gamma remap with high bitdepth YUV output

Scale down the matrix before calculating RGB -> YUV matrix
otherwise offset values will be wrong

Fixing pipeline
videotestsrc ! video/x-raw,format=ARGB ! videoconvert gamma-mode=remap ! \
  video/x-raw,format=P010_10LE,colorimetry="bt2020"

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

2 years agogst-rtsp-server: Fix leak in appsrc2 example
Michael Gruner [Thu, 20 Jan 2022 23:13:36 +0000 (17:13 -0600)]
gst-rtsp-server: Fix leak in appsrc2 example

In the need-data appsrc callback, a buffer is pulled from the
appsink. This buffer is then copied so that metadata is writable.
The copy is pushed to the appsrc but it doesn't take ownership
of the buffer so we need to manually unref it. The original buffer
is finally unreffed when the sample is freed.

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

2 years agovideodecoder: Fix property description for new properties
Sebastian Dröge [Sun, 23 Jan 2022 11:38:37 +0000 (13:38 +0200)]
videodecoder: Fix property description for new properties

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

2 years agowebrtc: Fix memory leaks
Sangchul Lee [Wed, 19 Jan 2022 14:17:23 +0000 (23:17 +0900)]
webrtc: Fix memory leaks

Redundant condition and unreachable codes are also removed.

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

2 years agov4l2codecs: Unify the src template caps format
Nicolas Dufresne [Tue, 14 Jul 2020 15:11:11 +0000 (11:11 -0400)]
v4l2codecs: Unify the src template caps format

Notably NV12_4L4 ended up being applied to only VP9 decoder. This fixes the
situation by using a central define for all static src pad templated formats.

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

2 years agov4l2codecs: Sync kernel headers against 5.16.0
Nicolas Dufresne [Fri, 21 Jan 2022 19:13:39 +0000 (14:13 -0500)]
v4l2codecs: Sync kernel headers against 5.16.0

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

2 years agovideo4linux2: Sync kernel headers against 5.16.0
Nicolas Dufresne [Fri, 21 Jan 2022 19:13:12 +0000 (14:13 -0500)]
video4linux2: Sync kernel headers against 5.16.0

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

2 years agov4l2videdec: Fix race condition between drain and state changes
Nicolas Dufresne [Mon, 17 Jan 2022 16:44:47 +0000 (11:44 -0500)]
v4l2videdec: Fix race condition between drain and state changes

This is due to an unsafe usage of the pad task. We didn't ensure proper
ownership of the task. That race involved the task being released too early,
and was detected, luckily, by the glib mutex implementationt that
reported the mutex being disposed while being locked.

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

2 years agomsdk: Avoid noisy registry when no MSDK device.
Víctor Manuel Jáquez Leal [Fri, 21 Jan 2022 10:13:55 +0000 (11:13 +0100)]
msdk: Avoid noisy registry when no MSDK device.

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

2 years agova: libs: Avoid noisy registry when no VA device.
Víctor Manuel Jáquez Leal [Fri, 21 Jan 2022 09:53:21 +0000 (10:53 +0100)]
va: libs: Avoid noisy registry when no VA device.

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

2 years agosoup: Reintroduce compile-time libsoup dependency for static builds
Philippe Normand [Sun, 16 Jan 2022 14:41:41 +0000 (14:41 +0000)]
soup: Reintroduce compile-time libsoup dependency for static builds

On Android (especially) and for static builds in general it is safer to link
against libsoup and have the dynamic custom loading disabled. For those cases we
can safely assume the application will use either libsoup2 or libsoup3 and not
both.

Fixes #939

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

2 years agosoup: Initialize debug category before use
Philippe Normand [Sun, 16 Jan 2022 14:40:11 +0000 (14:40 +0000)]
soup: Initialize debug category before use

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

2 years agosoup: Fix return types for a couple VTable functions
Philippe Normand [Sun, 16 Jan 2022 14:39:42 +0000 (14:39 +0000)]
soup: Fix return types for a couple VTable functions

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

2 years agomeson: Build cairo subproject when unavailable on the system
Nirbheek Chauhan [Fri, 14 Jan 2022 14:23:29 +0000 (19:53 +0530)]
meson: Build cairo subproject when unavailable on the system

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

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

2 years agodecodebin2: raise multiqueue max-size-bytes
Mathieu Duponchelle [Wed, 19 Jan 2022 01:42:35 +0000 (02:42 +0100)]
decodebin2: raise multiqueue max-size-bytes

The earlier size of 2 MB was set back in 2009, it doesn't
seem unreasonable to raise it to 8 MB these days. The use
case at hand is matroskademux containing both a video stream
with a very low amount of compression but no decoding latency,
and a H265 stream.

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

2 years agoimagefreeze: Fix example launch line format issue
Aleksandar Topic [Thu, 20 Jan 2022 16:59:30 +0000 (17:59 +0100)]
imagefreeze: Fix example launch line format issue

The currently shown example launch line will not run, because it
cannot handle png images.

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

2 years agoRevert "videodecoder: Forward hdr-format info downstream"
Seungha Yang [Sun, 26 Dec 2021 18:35:29 +0000 (03:35 +0900)]
Revert "videodecoder: Forward hdr-format info downstream"

This reverts commit 9b852181d8a1fa2fb1bf3ba898c6ffa04eea3fd4.

It's leftover commit which should've been reverted as a part of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1148

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

2 years agowasapi2: Fix for device open failure on old OS
Seungha Yang [Wed, 19 Jan 2022 20:59:36 +0000 (05:59 +0900)]
wasapi2: Fix for device open failure on old OS

To open automatic stream routing aware device,
at least Windows10 Anniversary Update is required.

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

2 years agogstreamer: capsfeatures: Fix docs of `gst_caps_features_new_single()`
Sebastian Dröge [Thu, 20 Jan 2022 08:59:56 +0000 (10:59 +0200)]
gstreamer: capsfeatures: Fix docs of `gst_caps_features_new_single()`

They were just a copy of the `new_any()` docs before.

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

2 years agotools: gst-play: Enable Windows high-resolution clock
Seungha Yang [Wed, 19 Jan 2022 18:17:58 +0000 (03:17 +0900)]
tools: gst-play: Enable Windows high-resolution clock

Apply https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/817
to gst-play as well, especially for better high-framerate
(60fps or higher) video support, because
15ms default clock precision (actual value is system dependent)
is not sufficient for such scenario.

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

2 years agogstplugin: Better warnings on plugin load failure on Windows
Nirbheek Chauhan [Wed, 19 Jan 2022 15:28:36 +0000 (20:58 +0530)]
gstplugin: Better warnings on plugin load failure on Windows

It is an extremely common mistake on Windows to have incorrect PATH
values when loading a plugin, and the error from g_module_error()
(which just calls FormatMessageW()) is very confusing in this case:

 The specified module could not be found.

 https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-#ERROR_MOD_NOT_FOUND

It implies the plugin itself could not be found. The actual issue is
that a DLL dependency could not be found. We need to detect this case
and print a more useful error message.

We should still print the error fetched from FormatMessage() so that
people are able to google for it.

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

2 years agoAdd FEC SDP message test
Tomasz Andrzejak [Sat, 15 Jan 2022 18:03:33 +0000 (19:03 +0100)]
Add FEC SDP message test

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

2 years agosdpmessage: fix mapping single char fmtp params
Tomasz Andrzejak [Sat, 15 Jan 2022 16:02:52 +0000 (17:02 +0100)]
sdpmessage: fix mapping single char fmtp params

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

2 years agocodec-utils: Mark various string return values as `nullable`
Sebastian Dröge [Wed, 19 Jan 2022 09:05:26 +0000 (11:05 +0200)]
codec-utils: Mark various string return values as `nullable`

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

2 years agortphdrext: increase GstRTPHeaderExtensionClass padding to LARGE
Tim-Philipp Müller [Tue, 18 Jan 2022 23:17:49 +0000 (23:17 +0000)]
rtphdrext: increase GstRTPHeaderExtensionClass padding to LARGE

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/748#note_1223253

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

2 years agopbutils: Define one debug category per module
Philippe Normand [Sat, 15 Jan 2022 10:06:23 +0000 (10:06 +0000)]
pbutils: Define one debug category per module

Follow-up of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1505

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

2 years agowasapi2ringbuffer: Fix for desynced buffer-size and segsize
Seungha Yang [Mon, 17 Jan 2022 18:03:30 +0000 (03:03 +0900)]
wasapi2ringbuffer: Fix for desynced buffer-size and segsize

GstAudioRingBufferSpec::segsize has been configured by using
device period but GstWasapi2RingBuffer was referencing the
buffer size returned by IAudioClient::GetBufferSize()
which is most likely larger than device period.
Fixing to sync them.

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

2 years agowaylandsink: Ensure correct mapping of area_surface
Robert Mader [Thu, 30 Dec 2021 15:52:17 +0000 (16:52 +0100)]
waylandsink: Ensure correct mapping of area_surface

If the `area_surface` got unmapped when changing to the `READY` or
`NULL` state, we currently don't remap it when playback resumes and
`wp_viewporter` is supported. Without `wp_viewporter` we do remap
it, but rather unintentionally and also when not wanted.

On Weston this has not been a big problem as it so far wrongly maps
subsurfaces of unmapped surfaces anyway - i.e. only the black
background was missing on resume. On other compositors and future
Weston this prevents the `video_surface` to get remapped.

Shuffle things around to ensure `area_surface` is mapped in the
right situations and do some minor cleanup.

See also https://gitlab.freedesktop.org/wayland/weston/-/issues/426

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

2 years agogst-libav: fix build with ffmpeg-5.0.0
Xi Ruoyao [Sun, 16 Jan 2022 17:33:47 +0000 (01:33 +0800)]
gst-libav: fix build with ffmpeg-5.0.0

Latest ffmpeg has removed avcodec_get_context_defaults(), and its
documentation says a new AVCodecContext should be allocated for this
purpose.  The pointer returned by avcodec_find_decoder() is now
const-qualified so we also need to adjust for it.  And, AVCOL_RANGE_MPEG
is now rejected with strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL.

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

2 years agod3d11deinterlace: Do not restrict minimum resolution to 64x64
Seungha Yang [Sat, 15 Jan 2022 17:21:43 +0000 (02:21 +0900)]
d3d11deinterlace: Do not restrict minimum resolution to 64x64

The value 64 was completely arbitrary one, and this element
will be able to support smaller resolutions

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

2 years agopluginfeature: Fix object leak
Seungha Yang [Thu, 13 Jan 2022 19:45:08 +0000 (04:45 +0900)]
pluginfeature: Fix object leak

Need to release GstPluginFeature object after use

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

2 years agocompositor: Always draw if all input buffers are GAP
Seungha Yang [Fri, 7 Jan 2022 09:25:00 +0000 (18:25 +0900)]
compositor: Always draw if all input buffers are GAP

Otherwise output buffers will contain random scene
(previously rendered or arbitrary initial values) since we don't
draw onto output buffer at all.

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

2 years agovideoaggregator: Don't pass GAP buffer to prepare_frame_start()
Seungha Yang [Thu, 6 Jan 2022 13:10:18 +0000 (22:10 +0900)]
videoaggregator: Don't pass GAP buffer to prepare_frame_start()

Likewise we do check the same condition in prepare_frames_finish(),
ignore GAP buffer (zero size with GST_BUFFER_FLAG_GAP flag) without
any further processing.

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

2 years agod3d11compositor: Don't try to read empty buffer
Seungha Yang [Thu, 6 Jan 2022 13:00:11 +0000 (22:00 +0900)]
d3d11compositor: Don't try to read empty buffer

The queued buffer may not be readable buffer in case that
upstream sends GAP event or so.

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

2 years agowaylandsink: Fix alpha value for the test pattern in example
Robert Mader [Thu, 13 Jan 2022 13:17:09 +0000 (14:17 +0100)]
waylandsink: Fix alpha value for the test pattern in example

The background-color property is in big-endian ARGB, resulting in
a alpha value of `0`. This accidentally used to work on all common
compositors, but on Weston this now correctly results in a black
background.

See also https://gitlab.freedesktop.org/wayland/weston/-/issues/577

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

2 years agowaylandsink: Use wl_surface_damage_buffer() instead of wl_surface_damage()
Robert Mader [Mon, 13 Dec 2021 12:16:06 +0000 (13:16 +0100)]
waylandsink: Use wl_surface_damage_buffer() instead of wl_surface_damage()

The later, doing damage in surface coordinates instead of buffer
coordinates, has been deprecated. The reason for that is that it
is more prone to bugs, both on the client and the compositor side,
especially when paired with buffer scale, `wp_viewporter` or
buffer transforms.

Unfortunately, on Weston this risks running into
https://gitlab.freedesktop.org/wayland/weston/-/issues/446
(which causes trouble for several other projects as well). However,
that bug only affects cases where we run in sync mode, i.e. only
during resizes. In practise I haven't been able to observe the
issue.

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

2 years agowaylandsink: Use G_MAXINT32 for surface damage
Robert Mader [Mon, 13 Dec 2021 11:21:06 +0000 (12:21 +0100)]
waylandsink: Use G_MAXINT32 for surface damage

Each time we call `wl_surface_damage()` we want to do full surface
damage. Like Mesa, just use `G_MAXINT32` to ensure we always do
full damage, reducing the need to track the right dimensions.

`window->video_rectangle` is now unused, but we keep it around for
now as we may need it again in the future.

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

2 years agowaylandsink: Only call wl_surface_damage() when buffer content changed
Robert Mader [Thu, 30 Dec 2021 17:14:24 +0000 (18:14 +0100)]
waylandsink: Only call wl_surface_damage() when buffer content changed

From the spec:
> This request is used to describe the regions where the pending
> buffer is different from the current surface contents

We currently also call `wl_surface_damage()` on surfaces without
new or still compositor-hold buffers, e.g. when resizing the window.
In that case we call it on `area_surface_wrapper`, even though it
gets resized via `wp_viewport_set_destination()`, in which case
the compositor is in charge of repainting the area on screen.

Doing so is currently not forbidden by the spec, however it might
be in the future, see
https://gitlab.freedesktop.org/wayland/wayland/-/issues/267

Thus lets stay close to the spec and only call `wl_surface_damage()`
when we just attached a buffer.

Right now this prevents runtime assertions in Mutter.

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