platform/upstream/gstreamer.git
2 years agocodec-utils: Avoid out-of-bounds error
David Svensson Fors [Mon, 7 Feb 2022 08:30:58 +0000 (09:30 +0100)]
codec-utils: Avoid out-of-bounds error

For artificial input (in unit tests), all six bytes of
constraint_indicator_flags in hevc_caps_get_mime_codec() can be
zero. Add a guard against an out-of-bounds error that occurred in that
case. Change variables to signed int so comparison with -1 works.

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

2 years agov4l2codecs: vp9: Fix duplicating a duplicated picture
Nicolas Dufresne [Wed, 9 Feb 2022 20:05:14 +0000 (15:05 -0500)]
v4l2codecs: vp9: Fix duplicating a duplicated picture

Duplicating a picture what was already a dup was leading to a crash. Rename
the custom picture flags as HOLDS_BUFFER to make its meaning clear. Then save
then ref and store the picture as userdata, so it can be obtained when
duplicating. Finally, mark the doplicated as HOLDS_BUFFER to avoid thinking it
holds a request.

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

2 years agomfaudioenc: Handle empty IMFMediaBuffer
Seungha Yang [Wed, 9 Feb 2022 16:48:23 +0000 (01:48 +0900)]
mfaudioenc: Handle empty IMFMediaBuffer

IMFMediaBuffer may not hold encoded data, which seems to happen
while draining.

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

2 years agovideotestsrc: Don't re-render every frame when it's not needed.
Jan Schmidt [Fri, 17 Jul 2020 04:37:14 +0000 (14:37 +1000)]
videotestsrc: Don't re-render every frame when it's not needed.

When the pattern being rendered by videotestsrc doesn't have motion,
cache a rendered buffer and output it repeatedly with updated
metadata.

Based on a patch by Edward Hervey <edward@centricular.com>

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

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

2 years agova: decoder: Log profile name.
Víctor Manuel Jáquez Leal [Thu, 3 Feb 2022 09:10:44 +0000 (10:10 +0100)]
va: decoder: Log profile name.

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

2 years agova: filter: Log the added filter name.
Víctor Manuel Jáquez Leal [Mon, 24 Jan 2022 15:25:18 +0000 (16:25 +0100)]
va: filter: Log the added filter name.

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

2 years agovapostproc: Process HDR caps
Víctor Manuel Jáquez Leal [Mon, 25 Oct 2021 11:41:49 +0000 (13:41 +0200)]
vapostproc: Process HDR caps

This patch adds a new parameter: hdr-tone-mapping (same as
vaapipostproc), if the HDR capabilites are availabe in driver, and
it's disabled by default.

If hdr-tone-mapping is enabled then HDR fields in sink caps are
processed in frames from HDR to SDR, removing those hdr fields in
source pad caps too.

hdr-tone-mapping is not enabled if a color conversion is also
requested, since it fails to process in the iHD driver, so far.

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

2 years agobuild: Add libva dependency fallback.
Víctor Manuel Jáquez Leal [Thu, 30 Sep 2021 15:42:19 +0000 (17:42 +0200)]
build: Add libva dependency fallback.

Then libva can be subproject and used by either gstreamer-vaapi,
va and msdk in gst-plugins-bad.

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

2 years agowebrtcice: Fix memory leaks in gst_webrtc_ice_add_candidate()
Sangchul Lee [Sun, 6 Feb 2022 14:20:32 +0000 (23:20 +0900)]
webrtcice: Fix memory leaks in gst_webrtc_ice_add_candidate()

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

2 years agov4l2codecs: vp9: Make compressed hdr control optional
Nicolas Dufresne [Fri, 28 Jan 2022 19:49:42 +0000 (14:49 -0500)]
v4l2codecs: vp9: Make compressed hdr control optional

This is to supported by Mediatek VP9 driver. Mediatek handles
the forward probabilities in hardware hence does not need and
does not implement support for
V4L2_CID_STATELESS_VP9_COMPRESSED_HDR.

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

2 years agotutorials: vdpau is ababdoned
Krystian Wojtas [Wed, 1 Dec 2021 08:27:12 +0000 (09:27 +0100)]
tutorials: vdpau is ababdoned

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/828

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

2 years agotutorials: proper links description
Tim-Philipp Müller [Tue, 8 Feb 2022 18:15:34 +0000 (18:15 +0000)]
tutorials: proper links description

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

2 years agotutorials: links to monorepo
Krystian Wojtas [Wed, 1 Dec 2021 08:20:24 +0000 (09:20 +0100)]
tutorials: links to monorepo

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

2 years agotutorials: fixed described log level number to correspond with code
Krystian Wojtas [Tue, 8 Feb 2022 17:43:36 +0000 (18:43 +0100)]
tutorials: fixed described log level number to correspond with code

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

2 years agotutorials: fix typos
Krystian Wojtas [Wed, 1 Dec 2021 07:45:14 +0000 (08:45 +0100)]
tutorials: fix typos

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

2 years agotutorials: word hardware instead of h character
Krystian Wojtas [Wed, 1 Dec 2021 07:45:09 +0000 (08:45 +0100)]
tutorials: word hardware instead of h character

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

2 years agonavigation: Fix Since marker for mouse scroll
Thibault Saunier [Wed, 22 Dec 2021 18:46:44 +0000 (18:46 +0000)]
navigation: Fix Since marker for mouse scroll

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

2 years agoregistry: enable relocatable builds for anywhere with dladdr()
Matthew Waters [Tue, 8 Feb 2022 01:58:52 +0000 (12:58 +1100)]
registry: enable relocatable builds for anywhere with dladdr()

Such as Linux/BSD's.

Matches the Windows/macOS behaviour.

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

2 years agova: Fix and simplify build recipe.
Víctor Manuel Jáquez Leal [Mon, 7 Feb 2022 11:34:53 +0000 (12:34 +0100)]
va: Fix and simplify build recipe.

1. Use api_version variable rather than static string.
2. Remove pkgconfig generation since currently the library
   is not installed, only used internally.
3. Rely on dependency "required" to abort compilation.

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

2 years agova: Remove libgudev crumbs in library.
Víctor Manuel Jáquez Leal [Mon, 7 Feb 2022 10:27:57 +0000 (11:27 +0100)]
va: Remove libgudev crumbs in library.

In commit e699aaeb we moved linking of libgudev to the plugin rather
the library, because it's only used in the plugin. But the dependency
check is still done in library.

This patch removes the dependency check in library, and updates the
dependency check in plugin.

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

2 years agogstpluginloader: show the reason when spawning of gst-plugin-scanner fail
Jose Quaresma [Wed, 8 Dec 2021 22:13:15 +0000 (22:13 +0000)]
gstpluginloader: show the reason when spawning of gst-plugin-scanner fail

This fix helps in cross compiling when the meson tests runs using a qemu wraper

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

2 years agovideo-color: Fix for missing clipping in PQ EOTF function
Seungha Yang [Wed, 2 Feb 2022 16:04:40 +0000 (01:04 +0900)]
video-color: Fix for missing clipping in PQ EOTF function

* Add missing clipping in EOTF
* Use pre-calculated values
* Update variable names to specification's defined ones

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

2 years agortpbin: Safer ts-offset-smoothing-factor calculation
Robert Rosengren [Tue, 18 Jan 2022 16:53:30 +0000 (17:53 +0100)]
rtpbin: Safer ts-offset-smoothing-factor calculation

Protect the ts-offset-smoothing-factor calculation from overflow. Output
warning and fallback to ts-offset if it is detected.

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

2 years agortpbin: add ts-offset-smoothing-factor property
Robert Rosengren [Tue, 23 Nov 2021 08:03:28 +0000 (09:03 +0100)]
rtpbin: add ts-offset-smoothing-factor property

Add property to set the TS offset smoothing factor and set default value
to not use it.

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

2 years agortpbin: applied smoothing to jittery sender time-stamps
Danny Smith [Tue, 26 Feb 2019 15:39:55 +0000 (16:39 +0100)]
rtpbin: applied smoothing to jittery sender time-stamps

Applying a moving average filter to the timestamp offsets
for smoothing jittery and preventing aggressive skew handling.

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

2 years agortpbin: added option for setting min_ts_offset in ntp-sync mode
Danny Smith [Tue, 29 May 2018 14:24:02 +0000 (16:24 +0200)]
rtpbin: added option for setting min_ts_offset in ntp-sync mode

Constantly updating the ts_offset results in audiable glitches
when streaming audio using ntp-sync=true. By requiring a minimum
offset before updating ts_offset this can be mitigated. Added a
parameter which can be used to set min_ts_offset in ntp-sync mode.

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

2 years agomsdk: Fix for MFXUnload symbol re-definition build error
Seungha Yang [Mon, 7 Feb 2022 19:51:24 +0000 (04:51 +0900)]
msdk: Fix for MFXUnload symbol re-definition build error

Fix for libgstreamer-full build

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

2 years agoqsv: Add support for HEVC encoding
Seungha Yang [Fri, 24 Dec 2021 15:13:04 +0000 (00:13 +0900)]
qsv: Add support for HEVC encoding

main and main-10 profiles are supported for now

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

2 years agoqsv: Add support for VP9 encoding and more video formats
Seungha Yang [Sun, 19 Dec 2021 12:39:53 +0000 (21:39 +0900)]
qsv: Add support for VP9 encoding and more video formats

Add VP9 encoder with 4:2:0 8 bits and 4:4:4 8/10 bits formats support

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

2 years agoqsv: Introduce H.264 Intel Quick Sync Video Encoder
Seungha Yang [Sun, 6 Feb 2022 12:34:43 +0000 (21:34 +0900)]
qsv: Introduce H.264 Intel Quick Sync Video Encoder

A new implementation of Intel Quick Sync Video plugin.
This plugin supports both Windows and Linux but optimization for
VA/DMABuf is not implemented yet.

This new plugin has some notable differences compared with existing
MSDK plugin.

* Encoder will expose formats which can be natively supported
without internal conversion. This will make encoder
control/negotiation flow much simpler and cleaner than
that of MSDK plugin.

* This plugin includes QSV specific library loading helper,
called dispatcher, with QSV SDK headers as a part of this plugin.
So, there will be no more SDK version dependent #ifdef in the code
and also there will be no more build-time MSDK/oneVPL SDK
dependency.

* Memory allocator interop between GStreamer and QSV is re-designed
and decoupled. Instead of implementing QSV specific allocator/bufferpool,
this plugin will make use of generic GStreamer memory
allocator/bufferpool (e.g., GstD3D11Allocator and GstD3D11BufferPool).
Specifically, GstQsvAllocator object will help interop between
GstMemory and mfxFrameAllocator memory abstraction layers.

Note that because of the design decision, VA/DMABuf support is not made
as a part of this initial commit. We can add the optimization for Linux
later once GstVA library exposes allocator/bufferpool implementation as
an API like GstD3D11.

* Initial encoder implementation supports interop with GstD3D11
infrastructure, including zero-copy encoding with upstream D3D11 element.

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

2 years agoqsv: Remove unnecessary pargma message
Seungha Yang [Wed, 1 Dec 2021 13:18:42 +0000 (22:18 +0900)]
qsv: Remove unnecessary pargma message

We know what we are doing, just remove noisy build warnings

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

2 years agoqsv: Import libmfx API and dispatch code from oneVPL project
Seungha Yang [Wed, 1 Dec 2021 13:18:04 +0000 (22:18 +0900)]
qsv: Import libmfx API and dispatch code from oneVPL project

Copied from oneVPL project (https://github.com/oneapi-src/oneVPL)
v2022.0.3 tag at the commit of efc259f8b7ee5c334bca1a904a503186038bbbdd

This is corresponding to MFX API version 2.6

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

2 years agod3d11memory: Inform subresource index via GstMapInfo::user_data
Seungha Yang [Tue, 7 Dec 2021 12:29:05 +0000 (21:29 +0900)]
d3d11memory: Inform subresource index via GstMapInfo::user_data

By using this way, caller does not need to call another method
gst_d3d11_memory_get_subresource_index()

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

2 years agod3d11memory: Add support for ID3D11Buffer
Seungha Yang [Sun, 6 Feb 2022 12:36:28 +0000 (21:36 +0900)]
d3d11memory: Add support for ID3D11Buffer

Allow wrap ID3D11Buffer via GstD3D11Memory object
At the moment, only staging ID3D11Buffer is supported.

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

2 years agogstvalue: De/Serialization of GBytes
Martin Reboredo [Fri, 22 Oct 2021 21:40:07 +0000 (18:40 -0300)]
gstvalue: De/Serialization of GBytes

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

2 years agocontext: fix transfer annotation
Sebastian Mueller [Tue, 8 Feb 2022 05:24:13 +0000 (16:24 +1100)]
context: fix transfer annotation

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

2 years agobaseparse: Don't truncate the duration to milliseconds in gst_base_parse_convert_defa...
Zebediah Figura [Tue, 18 Feb 2020 03:50:54 +0000 (21:50 -0600)]
baseparse: Don't truncate the duration to milliseconds in gst_base_parse_convert_default().

There's no need to do this, and it can make seeking far less accurate.

For a specific use case: I am working with a long (45-minute) MPEG-1 layer 3 file, which has a constant bit rate but no seeking tables. Trying to seek the pipeline immediately after pausing it, without the ACCURATE flag, to a location 41 minutes in, yields a location that is potentially over ten seconds ahead of where it should be. This patch improves that drastically.

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

2 years agobaseparse: Trace time with GST_TIME_FORAMT in gst_base_parse_convert_default().
Zebediah Figura [Tue, 8 Feb 2022 01:33:31 +0000 (19:33 -0600)]
baseparse: Trace time with GST_TIME_FORAMT in gst_base_parse_convert_default().

Be consistent with how we trace time in general.

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

2 years agobufferpool: Deactivate pool and get rid of references to other objects from dispose...
Sebastian Dröge [Mon, 7 Feb 2022 07:46:46 +0000 (09:46 +0200)]
bufferpool: Deactivate pool and get rid of references to other objects from dispose instead of finalize

During dispose the pool will still have a reference count of 1 and all
API on it can still be safely called.

Subclasses will have already freed their own data before finalize is
called but would nonetheless be called into again via the pool
deactivation.

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

2 years agonvh265sldec: Fix for decoding 12bits stream
Seungha Yang [Mon, 31 Jan 2022 15:50:53 +0000 (00:50 +0900)]
nvh265sldec: Fix for decoding 12bits stream

We've been exposing main-444-12 profile as a supported profile
in its sinkpad template but not actaully. Adding code to
covert 12 and 16 bits as well.

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

2 years agonvdecoder: Fix for HEVC 4:4:4 format decoding
Seungha Yang [Mon, 31 Jan 2022 15:12:06 +0000 (00:12 +0900)]
nvdecoder: Fix for HEVC 4:4:4 format decoding

Map chroma_format_idc == 3 (which means 4:4:4 subsampling) correctly,
also pass coded bitdepth for decoder initialization instead of
inferring it from output format since they can be different.

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

2 years agod3d11stagingbufferpool: Fix typo in texture description
Seungha Yang [Mon, 7 Feb 2022 13:38:02 +0000 (22:38 +0900)]
d3d11stagingbufferpool: Fix typo in texture description

Fixing typo, it should be height

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

2 years agova: Add a gstva.h to include all va lib header files.
He Junyan [Wed, 27 Oct 2021 03:08:39 +0000 (11:08 +0800)]
va: Add a gstva.h to include all va lib header files.

And replacing all va lib headers with this new header files
when including.

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

2 years agova: Move the vautils into the gst va lib.
He Junyan [Thu, 7 Oct 2021 06:31:28 +0000 (14:31 +0800)]
va: Move the vautils into the gst va lib.

The context query and handle are common logic for all va related
elements. So we move it from va plugins to the common gst va lib.

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

2 years agopluginloader: support multiple subdirectories for GST_PLUGIN_SUBDIR (libdir)
Matthew Waters [Mon, 7 Feb 2022 05:51:25 +0000 (16:51 +1100)]
pluginloader: support multiple subdirectories for GST_PLUGIN_SUBDIR (libdir)

i.e. if GST_PLUGIN_SUBDIR is 'some/lib/path', then the default plugin
loading assumed that there was only 'lib' as it only went up a single
directory to then find the plugin scanner.

Fix to support multiple subdirectories for GST_PLUGIN_SUBDIR (libdir).

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

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

2 years agoregistry: check the value of dladdr()
Matthew Waters [Mon, 7 Feb 2022 05:36:13 +0000 (16:36 +1100)]
registry: check the value of dladdr()

info.dli_fname could be NULL.

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

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

2 years agoregistry: check the return value of g_win32_get_package_installation_directory_of_mod...
Matthew Waters [Mon, 7 Feb 2022 05:33:03 +0000 (16:33 +1100)]
registry: check the return value of g_win32_get_package_installation_directory_of_module()

g_win32_get_package_installation_directory_of_module() may return NULL
in some circumstances and we need to deal with that.

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

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

2 years agoexamples/docs: update android applications to the latest relevant sdk's and build...
Matthew Waters [Wed, 2 Feb 2022 02:36:41 +0000 (13:36 +1100)]
examples/docs: update android applications to the latest relevant sdk's and build tools

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

2 years agocodecs: Stop claiming constness for refcounted object
Seungha Yang [Sun, 24 Oct 2021 13:07:38 +0000 (22:07 +0900)]
codecs: Stop claiming constness for refcounted object

It's almost pointless and makes little sense as subclass might
want to modify refcount of the object or so. And all subclasses
are already casting them to non-const version as well.
In a general sense, we need to avoid passing refcounted object
with const qualifier.

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

2 years agod3d11videosink: Use staging buffer pool for non-d3d11 upstream
Seungha Yang [Sat, 5 Feb 2022 16:06:36 +0000 (01:06 +0900)]
d3d11videosink: Use staging buffer pool for non-d3d11 upstream

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

2 years agod3d11upload,d3d11download: Use staging buffer pool
Seungha Yang [Sat, 5 Feb 2022 15:53:34 +0000 (00:53 +0900)]
d3d11upload,d3d11download: Use staging buffer pool

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

2 years agod3d11decoder: Use staging buffer pool for non-d3d11 downstream
Seungha Yang [Sat, 5 Feb 2022 14:25:12 +0000 (23:25 +0900)]
d3d11decoder: Use staging buffer pool for non-d3d11 downstream

In specific condition, this can show about 10% ~ 30%
performance gain with non-d3d11 downstream element.

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

2 years agod3d11: Add new buffer pool implementation for staging texture
Seungha Yang [Sat, 5 Feb 2022 14:08:48 +0000 (23:08 +0900)]
d3d11: Add new buffer pool implementation for staging texture

staging buffer pool will allocate staging d3d11 texture
for upload/download optimization. By using staging buffer,
we can avoid per frame staging -> system memory copy operation.

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

2 years agogstvulkan: Expose gst_vulkan_result_to_string
Martin Reboredo [Wed, 2 Feb 2022 03:15:34 +0000 (00:15 -0300)]
gstvulkan: Expose gst_vulkan_result_to_string

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

2 years agoqroverlay: move to plugins that need external deps
Igor V. Kovalenko [Sat, 5 Feb 2022 14:36:41 +0000 (17:36 +0300)]
qroverlay: move to plugins that need external deps

qroverlay requires libqrencode dependency, move it next to similar plugins.

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

2 years agoci: Trigger all jobs on gitlab CI script changes
Nirbheek Chauhan [Sat, 5 Feb 2022 03:46:49 +0000 (09:16 +0530)]
ci: Trigger all jobs on gitlab CI script changes

Also fix typo in trigger variable that was causing triggered cerbero
pipelines to run deps builds and upload cache.

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

2 years agoBack to development
Tim-Philipp Müller [Fri, 4 Feb 2022 11:15:47 +0000 (11:15 +0000)]
Back to development

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

2 years agoci: Add a variable to identify triggered cerbero pipelines
Nirbheek Chauhan [Fri, 4 Feb 2022 14:49:57 +0000 (20:19 +0530)]
ci: Add a variable to identify triggered cerbero pipelines

This commit is required for proper functioning of the following
cerbero merge request: https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/800

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

2 years agoRelease 1.20.0 1.20.0
Tim-Philipp Müller [Thu, 3 Feb 2022 19:53:25 +0000 (19:53 +0000)]
Release 1.20.0

2 years agoUpdate ChangeLogs for 1.20.0
Tim-Philipp Müller [Thu, 3 Feb 2022 19:53:18 +0000 (19:53 +0000)]
Update ChangeLogs for 1.20.0

2 years agovideo: fix up GstVideoOrientationMethod type registration
Tim-Philipp Müller [Thu, 3 Feb 2022 18:18:03 +0000 (18:18 +0000)]
video: fix up GstVideoOrientationMethod type registration

... in order to make older g-i happy (~1.60) which doesn't like
freeform descriptions in the value_name field. Which in turn
then makes hotdoc happy instead of erroring out when we bump
the symbol index version.

We usually only (ab)use the name field for description strings
for private plugin enums, not for public API visible to bindings.

This lets glib-mkenum generate the _get_type() function for the
enum again, which in turn will generate the expected value names
to match the enums.

We might be able to add this back later once we can upgrade the
g-i version requirement (and the documentation job image).

This reverts most of commit b0aab48cdcf0a454d14aeb4d907209d8ee3f1add

2 years agoregistry/macos: retrieve plugins relative to location of libgstreamer.dylib
Matthew Waters [Wed, 2 Feb 2022 07:06:49 +0000 (18:06 +1100)]
registry/macos: retrieve plugins relative to location of libgstreamer.dylib

Provides a relocatable directory structure for running GStreamer
applications as used in GStreamer.framework.

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

2 years agodashsink: doc cleanup
Stéphane Cerveau [Wed, 2 Feb 2022 08:58:15 +0000 (09:58 +0100)]
dashsink: doc cleanup

Remove max-files mention in the command line test
Fix some typos
Use mpegtsdemux instead of tsdemux in the pipeline description

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

2 years agoIncl resample in CustomData, tutorial 3
Alistair Martin [Tue, 1 Feb 2022 14:51:23 +0000 (14:51 +0000)]
Incl resample in CustomData, tutorial 3

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

2 years agotagdemux: Fix crash when presented with malformed files
Jeremy Cline [Sun, 21 Nov 2021 22:52:48 +0000 (17:52 -0500)]
tagdemux: Fix crash when presented with malformed files

There's a race condition in gsttagdemux.c between typefinding and the
end-of-stream event. If TYPE_FIND_MAX_SIZE is exceeded,
demux->priv->collect is set to NULL and an error is returned. However,
the end-of-stream event causes one last attempt at typefinding to occur.

This leads to gst_tag_demux_trim_buffer() being called with the NULL
demux->priv->collect buffer which it attempts to dereference, resulting
in a segfault.

The malicious MP3 can be created by:

printf "\x49\x44\x33\x04\x00\x00\x00\x00\x00\x00%s", \
    "$(dd if=/dev/urandom bs=1K count=200)" > malicious.mp3

This creates a valid ID3 header which gets us as far as typefinding. The
crash can then be reproduced with the following pipeline:

gst-launch-1.0 -e filesrc location=malicious.mp3 ! queue ! decodebin ! audioconvert ! vorbisenc ! oggmux ! filesink location=malicious.ogg

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

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

2 years agonvdecoder: Fix for display resolution setup
Seungha Yang [Mon, 31 Jan 2022 15:18:44 +0000 (00:18 +0900)]
nvdecoder: Fix for display resolution setup

Display resolution should be cropped rect, not coded resolution.
Otherwise decoded output from NVDEC might be wrong.

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

2 years agoapplemedia: Disable 64RGBALE support on older macOS
Nirbheek Chauhan [Mon, 31 Jan 2022 21:30:41 +0000 (03:00 +0530)]
applemedia: Disable 64RGBALE support on older macOS

The kCVPixelFormatType_64RGBALE enum is only available on macOS Big
Sur (11.3) and newer. We also cannot use that while configuring the
encoder or decoder on older macOS.

Define the symbol unconditionally, but only use it when we're running
on Big Sur with __builtin_available().

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

2 years agoapplemedia: Remove some unnecessary variables
Nirbheek Chauhan [Mon, 31 Jan 2022 21:34:32 +0000 (03:04 +0530)]
applemedia: Remove some unnecessary variables

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

2 years agodocs: gst-libav: update cache and symbol index for FFmpeg 4.4
Mathieu Duponchelle [Fri, 28 Jan 2022 18:58:55 +0000 (19:58 +0100)]
docs: gst-libav: update cache and symbol index for FFmpeg 4.4

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

2 years agodocs: Add objc and objcpp files to hotdoc gst_c_sources
Nirbheek Chauhan [Mon, 31 Jan 2022 23:37:04 +0000 (05:07 +0530)]
docs: Add objc and objcpp files to hotdoc gst_c_sources

Hotdoc should be able to extract and parse comments out of these. Just
need to be careful to only add the glob in directories that actually
contain *.m (objc) and *.mm (objcpp) files.

Also fix some doc comments and remove redundant ones.

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

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>