platform/upstream/gstreamer.git
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>

2 years agowaylandsink: Simplify input region handling
Robert Mader [Mon, 13 Dec 2021 13:31:06 +0000 (14:31 +0100)]
waylandsink: Simplify input region handling

We only need to unset the input region for the area surface when
we don't have our own toplevel surface. By default, the input region
covers the whole surface, thus no need to change it on resize.

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

2 years agowaylandsink: Use G_MAXINT32 for opaque regions
Robert Mader [Mon, 13 Dec 2021 11:00:10 +0000 (12:00 +0100)]
waylandsink: Use G_MAXINT32 for opaque regions

`gst_wl_window_set_opaque` does not get called on window resizes,
potentially leaving opaque regions too small.
According to the spec opaque regions can be bigger than the surface
size - parts that fall outside of the surface will get ignored.
Thus we can can simply use `G_MAXINT32` and be sure that the whole
surfaces will always be covered.

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

2 years agouridecodebin: Fix critical warnings
Seungha Yang [Thu, 13 Jan 2022 14:00:41 +0000 (23:00 +0900)]
uridecodebin: Fix critical warnings

Don't pass non-GstObject object to there.

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

2 years agopbutils: Simplify h264_caps_structure_get_profile_flags_level a bit
Philippe Normand [Sun, 9 Jan 2022 09:39:32 +0000 (09:39 +0000)]
pbutils: Simplify h264_caps_structure_get_profile_flags_level a bit

Refactoring, removing one level of indentation from the function.

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

2 years agopbutils: H.265 support for gst_codec_utils_caps_get_mime_codec()
Philippe Normand [Sat, 8 Jan 2022 14:57:00 +0000 (14:57 +0000)]
pbutils: H.265 support for gst_codec_utils_caps_get_mime_codec()

The codec_data caps payload is parsed and a MIME codec string is generated
according to the ISO/IEC 14496-15 specification.

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

2 years agopbutils: Add a pbutils debug category
Philippe Normand [Sat, 8 Jan 2022 14:56:06 +0000 (14:56 +0000)]
pbutils: Add a pbutils debug category

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

2 years agowebrtc: fix log error message in function gst_webrtc_bin_set_local_description
Dave Piché [Tue, 11 Jan 2022 18:21:55 +0000 (13:21 -0500)]
webrtc: fix log error message in function gst_webrtc_bin_set_local_description

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

2 years agomxfdemux: don't error out if VANC track only contains packets we don't handle
Tim-Philipp Müller [Thu, 13 Jan 2022 11:31:55 +0000 (11:31 +0000)]
mxfdemux: don't error out if VANC track only contains packets we don't handle

If the VANC track does contain packets, but we skip over all packets, just
treat it the same as if there hadn't been any packets at all and send a
GAP event instead of erroring out with "Failed to handle essence element".

We would error out because when we reach the end of the loop without having
found a closed caption packet the flow return variable is still FLOW_ERROR
which is what it has been initialised to.

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

2 years agocodecparsers: h265parser: return invalid profile if len is 0.
He Junyan [Thu, 13 Jan 2022 02:36:24 +0000 (10:36 +0800)]
codecparsers: h265parser: return invalid profile if len is 0.

Though the profiles[0] is inited as GST_H265_PROFILE_INVALID in the
gst_h265_profile_tier_level_get_profile(), the profile detecting may
change its content later. So the return of profiles[0] may not be an
invalid profile even the len is 0.

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

2 years agocodecparsers: h265parser: Fix the index incrementation error in append_profile().
He Junyan [Thu, 13 Jan 2022 02:11:52 +0000 (10:11 +0800)]
codecparsers: h265parser: Fix the index incrementation error in append_profile().

The current "*idx++" operation just refers the pointer and increment the pointer
itself, not the content of the pointer. This causes that the count of the profiles
is always 0.

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

2 years agokmssink: Support auto-detection of NVIDIA Tegra driver
Dmitry Osipenko [Tue, 4 Jan 2022 01:56:55 +0000 (04:56 +0300)]
kmssink: Support auto-detection of NVIDIA Tegra driver

NVIDIA Tegra SoCs have a separate (from GPU) display controller. It's
the primary display device on all Tegra SoCs. Add Tegra to the list
of primary DRM drivers.

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

2 years agogst-env: extend PATH to include plugin scanner and generator
Mark Nauwelaerts [Sun, 26 Dec 2021 18:01:24 +0000 (19:01 +0100)]
gst-env: extend PATH to include plugin scanner and generator

2 years agocccombiner: fix s334-1a scheduling
Mathieu Duponchelle [Fri, 7 Jan 2022 23:16:29 +0000 (00:16 +0100)]
cccombiner: fix s334-1a scheduling

The previous code was mistakenly trying to compute a cc_type out
of the first byte in the byte triplet, whereas it is to be interpreted
as:

> Bit b7 of the LINE value is the field number (0 for field 2; 1 for field 1).
> Bits b6 and b5 are 0. Bits b4-b0 form a 5-bit unsigned integer which
> represents the offset

The same mistake was made when creating padding packets.

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

2 years agocccombiner: merge buffers for both fields with caption type s334-1a
Mathieu Duponchelle [Wed, 5 Jan 2022 21:48:31 +0000 (22:48 +0100)]
cccombiner: merge buffers for both fields with caption type s334-1a

Other elements such as line21encoder expect both fields to be present
in the same meta, not one meta per field.

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

2 years agogtk: Add "video-aspect-ratio-override" property
Bastien Nocera [Fri, 7 May 2021 16:22:06 +0000 (18:22 +0200)]
gtk: Add "video-aspect-ratio-override" property

Allow front-ends to override the pixel aspect ratio found inside the
video file itself, or most likely, missing from the video file.

This is a long-standing feature of totem.

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

2 years agogtk: Remove _update_par() forward declaration
Bastien Nocera [Wed, 13 Oct 2021 13:33:14 +0000 (15:33 +0200)]
gtk: Remove _update_par() forward declaration

No functional changes.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1137/diffs#note_1102782

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

2 years agogtk: Mark properties as changeable in the PLAYING state
Bastien Nocera [Wed, 13 Oct 2021 13:38:52 +0000 (15:38 +0200)]
gtk: Mark properties as changeable in the PLAYING state

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1137#note_1102789

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

2 years agogtk: Fix "pixel-aspect-ratio" property range
Bastien Nocera [Tue, 11 May 2021 09:28:57 +0000 (11:28 +0200)]
gtk: Fix "pixel-aspect-ratio" property range

Fix the arguments passed to gst_param_spec_fraction in the incorrect
order.

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

2 years agogtk: Rename display pixel aspect ratio related constants
Bastien Nocera [Fri, 7 May 2021 16:19:55 +0000 (18:19 +0200)]
gtk: Rename display pixel aspect ratio related constants

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

2 years agogtk: Make "pixel-aspect-ratio" changes immediate
Bastien Nocera [Fri, 7 May 2021 16:16:30 +0000 (18:16 +0200)]
gtk: Make "pixel-aspect-ratio" changes immediate

Schedule a resize when the display's pixel aspect ratio has changed, if
one isn't already scheduled.

Closes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/883
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1137>

2 years agogstglutils: introspection annotations fixups
Jordan Petridis [Fri, 7 Jan 2022 12:17:46 +0000 (14:17 +0200)]
gstglutils: introspection annotations fixups

* gst_gl_ensure_element_data: specify the type for the element arg

* gst_gl_handle_set_context: correctly annotate the display and
gl_ctx as just (out) instead of (inout)

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

2 years agoav1parser: Fix data type of film grain param
Mengkejiergeli Ba [Mon, 10 Jan 2022 07:24:13 +0000 (15:24 +0800)]
av1parser: Fix data type of film grain param

Fix cb_offset and cr_offset data type from guint8 to guint16. According
to spec, cb_offset and cr_offset are 9 bit long, while guint8 can cause
interger overflow, and thus change to guint16.

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

2 years agocodec-utils: Use nullable annotation instead of allow-none for various Opus functions
Sebastian Dröge [Sun, 9 Jan 2022 12:07:12 +0000 (14:07 +0200)]
codec-utils: Use nullable annotation instead of allow-none for various Opus functions

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

2 years agocodec-utils: Annotate out parameters for Opus functions as (optional)
Sebastian Dröge [Sun, 9 Jan 2022 12:05:48 +0000 (14:05 +0200)]
codec-utils: Annotate out parameters for Opus functions as (optional)

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

2 years agocodec-utils: Add missing annotations to gst_codec_utils_h264_get_profile_flags_level()
Sebastian Dröge [Sun, 9 Jan 2022 12:05:11 +0000 (14:05 +0200)]
codec-utils: Add missing annotations to gst_codec_utils_h264_get_profile_flags_level()

And fix some minor typos.

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

2 years agovalidate: loggable: fix Callable import
Mathieu Duponchelle [Fri, 7 Jan 2022 21:26:16 +0000 (22:26 +0100)]
validate: loggable: fix Callable import

Since 3.3 importing Callable from collections is deprecated,
it should be imported from collections.abc .

Since 3.10 the alias has been removed altogether.

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

2 years agomeson: Add explicit check: kwarg to all run_command() calls
Nirbheek Chauhan [Tue, 4 Jan 2022 20:37:59 +0000 (02:07 +0530)]
meson: Add explicit check: kwarg to all run_command() calls

This is required since Meson 0.61.0, and causes a warning to be
emitted otherwise:

https://github.com/mesonbuild/meson/commit/2c079d855ed87488bdcc6c5c06f59abdb9b85b6c
https://github.com/mesonbuild/meson/issues/9300

This exposed a bunch of places where we had broken run_command()
calls, unnecessary run_command() calls, and places where check: true
should be used.

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

2 years agoaudio: Add logging that was useful in figuring out the last commit
Nirbheek Chauhan [Mon, 20 Dec 2021 16:13:25 +0000 (21:43 +0530)]
audio: Add logging that was useful in figuring out the last commit

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

2 years agoaudio-converter: Fix resampling when there's nothing to output
Nirbheek Chauhan [Mon, 20 Dec 2021 16:07:18 +0000 (21:37 +0530)]
audio-converter: Fix resampling when there's nothing to output

Sometimes we can't output anything because we don't have enough
incoming frames. In that case, the resampler was trying to call
do_quantize() and do_resample() in a loop forever because there would
never be samples to output (so chain->samples would always be NULL).

Fix this by not calling chain->make_func() in a loop -- seems
completely unnecessary since calling it over and over won't change
anything if the make_func() can't output samples.

Also add some checks for the input and / or output being NULL when
doing conversion or quantization. This will happen when we have
nothing to output.

We can't bail early, because we need resampler->samples_avail to be
updated in gst_audio_resampler_resample(), so we must call that and
no-op everything along the way.

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

2 years agoalphacombine: update example launch line
Stéphane Cerveau [Wed, 5 Jan 2022 09:53:55 +0000 (10:53 +0100)]
alphacombine: update example launch line

Fix typos and missing videoconvert element to demonstrate
the alphacombine element.

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

2 years agovaapi: av1dec: Use named profiles to replace the numeric ones.
He Junyan [Tue, 4 Jan 2022 08:19:44 +0000 (16:19 +0800)]
vaapi: av1dec: Use named profiles to replace the numeric ones.

Use named AV1 profiles (i.e., main, high) to replace the old "0"
and "1" profiles.

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

2 years agoav1parse: Set the "tu" as the default alignment.
He Junyan [Fri, 24 Dec 2021 15:09:59 +0000 (23:09 +0800)]
av1parse: Set the "tu" as the default alignment.

The tu(temporal unit) is more widely used than the current alignment.
We now change the default alignment to tu.

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

2 years agoav1parse: Fix the wrong DELTA_UNIT flag setting for key frames.
He Junyan [Fri, 24 Dec 2021 13:50:01 +0000 (21:50 +0800)]
av1parse: Fix the wrong DELTA_UNIT flag setting for key frames.

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

2 years agoav1parse: Copy the PTS and DURATION when we create data.
He Junyan [Wed, 22 Dec 2021 04:36:15 +0000 (12:36 +0800)]
av1parse: Copy the PTS and DURATION when we create data.

We need to create header buffers for annex b format. This kind of
buffers should inherit the PTS and DURATION from the original buffers.

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

2 years agovtenc: Signal ignored alpha component with ProRes
Nirbheek Chauhan [Mon, 3 Jan 2022 15:32:47 +0000 (21:02 +0530)]
vtenc: Signal ignored alpha component with ProRes

When the image is opaque but the output ProRes format has an alpha
component (4 component, 32 bits per pixel), Apple requires that we
signal that it should be ignored by setting the depth to 24 bits per
pixel. Not doing so causes the encoded files to fail validation.

So we set that in the caps and qtmux sets the depth value in the
container, which will be read by demuxers so that decoders can skip
those bytes entirely. qtdemux does this, but vtdec does not use this
information at present.

The sister change was made in qtmux and qtdemux in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1061

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

2 years agocodecparsers: h265parser: Correct the read of slice_sao_chroma_flag.
He Junyan [Mon, 3 Jan 2022 14:15:12 +0000 (22:15 +0800)]
codecparsers: h265parser: Correct the read of slice_sao_chroma_flag.

According to the SPEC, for parsing the slice header, we should read the
slice_sao_chroma_flag only when ChromaArrayType is not equal to 0.

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

2 years agomeson: Allow using GStreamer plugins from custom_subprojects
Thibault Saunier [Sun, 12 Dec 2021 13:20:55 +0000 (13:20 +0000)]
meson: Allow using GStreamer plugins from custom_subprojects

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

2 years agoci: replace license notice
Jordan Petridis [Mon, 3 Jan 2022 10:43:15 +0000 (12:43 +0200)]
ci: replace license notice

This file was copied from microsoft documentation [1]
and its header was refering to the license on that repo.

This change was lost during gstreamer/gstreamer!1000

[1] https://github.com/MicrosoftDocs/visualstudio-docs/blob/9ec230dfd4908a92738d8dac5f44ad3e4ac751e3/LICENSE-CODE

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

2 years agoassrender: Support RFC8081 mime types
Rafał Dzięgiel [Wed, 29 Dec 2021 20:29:02 +0000 (21:29 +0100)]
assrender: Support RFC8081 mime types

Old "application/*" are now as per RFC8081 deprecated in favor of
new "font/*" mime types. Some new encoders are already using the
updated mime types. We need to also add them to the support list
in order for assrender to correctly identify them as fonts.

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

2 years agoassrender: Handle ".ttc" attachment extension
Rafał Dzięgiel [Wed, 29 Dec 2021 20:28:56 +0000 (21:28 +0100)]
assrender: Handle ".ttc" attachment extension

TTC stands for "TrueType Collection" file. We can pass it
into libass as any other attachment. Add it to the supported
extensions list, so the fonts it contains will be used.

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

2 years agowebrtcdatachannel: Notify buffered-amount property updates
Philippe Normand [Sun, 2 Jan 2022 09:38:43 +0000 (09:38 +0000)]
webrtcdatachannel: Notify buffered-amount property updates

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

2 years agortp-hdrext-colorspace: Fix color range encoding
Heinrich Kruger [Thu, 30 Dec 2021 16:31:33 +0000 (16:31 +0000)]
rtp-hdrext-colorspace: Fix color range encoding

The color space RTP header extension encodes color range as specified in
https://www.webmproject.org/docs/container/#Range. In other words:
0: Unspecified,
1: Broadcast Range,
2: Full range,
3: Defined by matrix coefficients and transfer characteristic.

This does not match the values of GstVideoColorRange, so it is not
correct to just write the colorimetry.range value to the header
extension.

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

2 years agod3d11decoder: Negotiate again on the first output buffer
Seungha Yang [Sun, 26 Dec 2021 18:15:10 +0000 (03:15 +0900)]
d3d11decoder: Negotiate again on the first output buffer

... unconditionally. There may be updated field in sinkpad caps
after the new_sequence() call (HDR related ones for example),
then we should signal the information to downstream.

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

2 years agowebrtcstats: Fix null pointer dereference
Philippe Normand [Wed, 29 Dec 2021 15:02:03 +0000 (15:02 +0000)]
webrtcstats: Fix null pointer dereference

If there is no jitterbuffer stats we should not attempt to store them in the
global stats structure.

Also add a g_return_if_fail in _gst_structure_take_structure() about this
because it is a programmer error to pass an invalid pointer address there.

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

2 years agocodecparsers: av1parse: Add the DECODE_ONLY flag to output buffer.
He Junyan [Thu, 12 Aug 2021 11:14:16 +0000 (19:14 +0800)]
codecparsers: av1parse: Add the DECODE_ONLY flag to output buffer.

When the alignment is ALIGN_FRAME and the output buf contains a frame
which is not to be shown, the GST_BUFFER_FLAG_DECODE_ONLY flag should
be set.

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

2 years agortpg726depay: fix endian conversion
Jeongki Kim [Fri, 24 Dec 2021 05:52:38 +0000 (14:52 +0900)]
rtpg726depay: fix endian conversion

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

2 years agowebrtcstats: Fall back to last packet ssrc if caps dont provide it
Olivier Crête [Tue, 14 Dec 2021 17:38:25 +0000 (12:38 -0500)]
webrtcstats: Fall back to last packet ssrc if caps dont provide it

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

2 years agowebrtcstats: Use our own caps instead of the sticky event
Olivier Crête [Tue, 14 Dec 2021 16:28:42 +0000 (11:28 -0500)]
webrtcstats: Use our own caps instead of the sticky event

The sticky event seems to get cleared sometimes.

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

2 years agowebrtcbin: Store the ssrc of the last received packet
Olivier Crête [Tue, 14 Dec 2021 16:28:13 +0000 (11:28 -0500)]
webrtcbin: Store the ssrc of the last received packet

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

2 years agowebrtc stats: Remove duplicate structure get
Olivier Crête [Mon, 13 Dec 2021 21:57:06 +0000 (16:57 -0500)]
webrtc stats: Remove duplicate structure get

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

2 years agowebrtc stats: Add more details about codecs into the stats
Olivier Crête [Mon, 13 Dec 2021 21:56:37 +0000 (16:56 -0500)]
webrtc stats: Add more details about codecs into the stats

This makes the output a little closer to what the upstream stats are.

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

2 years agortpjitterbuffer: fix typo in tests
Corentin Damman [Thu, 23 Dec 2021 14:29:55 +0000 (14:29 +0000)]
rtpjitterbuffer: fix typo in tests

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

2 years agodoc: typo fix for streaming
Brad Hards [Wed, 22 Dec 2021 23:06:58 +0000 (10:06 +1100)]
doc: typo fix for streaming

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

2 years agodocs: interlaced video: small additions for alternate interlacing
Tim-Philipp Müller [Thu, 23 Dec 2021 01:52:04 +0000 (01:52 +0000)]
docs: interlaced video: small additions for alternate interlacing

Clarify that width/height in caps is still the frame height/width,
not field height width, just like framerate is frame rate not
field rate.

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

2 years agova: av1dec: Use named profiles to replace the numeric ones.
He Junyan [Tue, 21 Dec 2021 04:55:59 +0000 (12:55 +0800)]
va: av1dec: Use named profiles to replace the numeric ones.

Use named AV1 profiles (i.e., main, high, and professional) to replace
the old 0, 1, 2 profiles.

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

2 years agoav1enc: Update for newly designed AV1 profile signalling
Seungha Yang [Mon, 20 Dec 2021 16:08:40 +0000 (01:08 +0900)]
av1enc: Update for newly designed AV1 profile signalling

Accept named AV1 profiles (i.e., main, high, and professional)
as well

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

2 years agod3d11av1dec: Update sinkpad template for profile
Seungha Yang [Sun, 19 Dec 2021 12:48:51 +0000 (21:48 +0900)]
d3d11av1dec: Update sinkpad template for profile

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

2 years agoav1parse: Use descriptive profile name instead of numeric
Seungha Yang [Sun, 19 Dec 2021 12:44:19 +0000 (21:44 +0900)]
av1parse: Use descriptive profile name instead of numeric

As per AV1 specification Annex A, AV1 profiles have explicit and
descriptive names for each seq_profile.

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

2 years agoav1parse: Remove trailing white space
Seungha Yang [Sun, 19 Dec 2021 12:47:18 +0000 (21:47 +0900)]
av1parse: Remove trailing white space

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

2 years agortsp-server: add gst_dep to gst_rtsp_server_deps
Fabrice Fontaine [Mon, 20 Dec 2021 12:03:34 +0000 (13:03 +0100)]
rtsp-server: add gst_dep to gst_rtsp_server_deps

Add gst_dep to gst_rtsp_server_deps, in the context of buildroot, this
will avoid the following build failure, because the correct girdir
location will be retrieved from gstreamer-1.0.pc:

/home/giuliobenetti/autobuild/run/instance-3/output-1/host/riscv32-buildroot-linux-gnu/sysroot/usr/bin/g-ir-compiler gst/rtsp-server/GstRtspServer-1.0.gir --output gst/rtsp-server/GstRtspServer-1.0.typelib --includedir=/usr/share/gir-1.0
Could not find GIR file 'Gst-1.0.gir'; check XDG_DATA_DIRS or use --includedir
error parsing file gst/rtsp-server/GstRtspServer-1.0.gir: Failed to parse included gir Gst-1.0
If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help.
Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"

Fixes:
 - http://autobuild.buildroot.org/results/04af6b22cfa0cffb6a3109a3b32b27137ad2e0b0

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

2 years agoaatv: Fixes for rain-mode
Florian Zwoch [Mon, 20 Dec 2021 09:28:50 +0000 (09:28 +0000)]
aatv: Fixes for rain-mode

Some rain-mode properties tried to read float from int value.
Initialize rain after setting rain-mode. Rain was non-functional if
width/height were left at default values.

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

2 years agouridecodebin: use non-floating object as signal argument
Mark Nauwelaerts [Thu, 16 Dec 2021 15:43:37 +0000 (16:43 +0100)]
uridecodebin: use non-floating object as signal argument

... as was the case with source-setup signal until change of order
in commit 52bca104e447309898ca8904b3914211ec7d4114

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

2 years agod3d11av1dec: Fix for Cdef param
Seungha Yang [Fri, 17 Dec 2021 13:24:57 +0000 (22:24 +0900)]
d3d11av1dec: Fix for Cdef param

av1parser will increase the sec_strength values by 1 if parsed
values were equal to 3 as defined in spec. But DXVA wants unmodified
ones.

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

2 years agod3d11av1dec: Sync DXVA AV1 data structure with released header
Seungha Yang [Fri, 17 Dec 2021 10:49:42 +0000 (19:49 +0900)]
d3d11av1dec: Sync DXVA AV1 data structure with released header

Update AV1 data structure based on Windows 11 SDK header

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

2 years agortsp-stream: fix get_rates raciness
Mathieu Duponchelle [Thu, 16 Dec 2021 20:04:53 +0000 (21:04 +0100)]
rtsp-stream: fix get_rates raciness

Prior to this patch, we considered that a stream was blocking
whenever a pad probe was triggered for either the RTP pad or
the RTCP pad.

This led to situations where we subsequently unblocked and expected
to find a segment on the RTP pad, which was racy.

Instead, we now only consider that the stream is blocking when
the pad probe for the RTP pad has triggered with a blockable object
(buffer, buffer list, gap event).

The RTCP pad is simply blocked without affecting the state of the
stream otherwise.

Fixes #929

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

2 years agotests: h265parser: Add test for multiple compatibility profiles.
Víctor Manuel Jáquez Leal [Wed, 15 Dec 2021 11:27:24 +0000 (12:27 +0100)]
tests: h265parser: Add test for multiple compatibility profiles.

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

2 years agoh265parser: Compare upstream profile with in SPS.
Víctor Manuel Jáquez Leal [Tue, 14 Dec 2021 18:56:48 +0000 (19:56 +0100)]
h265parser: Compare upstream profile with in SPS.

Compare if upstream profile in caps is the same as the one parsed in
the SPS. If they are different use the bigger for simplicity and
more chances to decode it.

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

2 years agocodecparsers: h265parser: Use a table map to get profile.
Víctor Manuel Jáquez Leal [Wed, 15 Dec 2021 10:58:07 +0000 (11:58 +0100)]
codecparsers: h265parser: Use a table map to get profile.

Instead of a sequence of if statements, declare a table to map profile
idc with profiles and traverse it.

Also, first add the profile from the parsed profile idc and later add,
into the profile array, the profile from the compatibility flags.

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

2 years agocodecparsers: h265parser: Verify all possible profiles.
Víctor Manuel Jáquez Leal [Tue, 14 Dec 2021 18:36:56 +0000 (19:36 +0100)]
codecparsers: h265parser: Verify all possible profiles.

It's possible a HEVC stream to have multiple profiles given the
compatibility bits. Instead of returning a single profile, internal
gst_h265_profile_tier_level_get_profiles() returns an array with all
it possible profiles.

Profiles are appended into the array only if the generated profile
is not invalid.

gst_h265_profile_tier_level_get_profile() is rewritten in terms of
gst_h265_profile_tier_level_get_profiles(), returning the first
profile found the array.

And  gst_h265_get_profile_from_sps() is also rewritten in terms of
gst_h265_profile_tier_level_get_profiles(), but traversing the array
verifying if the proposed profile is actually valid by Annex A.3.x of
the specification.

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

2 years agovideo-info: Don't assume colorimetry of UHD resolution as BT.2020
Seungha Yang [Mon, 13 Dec 2021 07:19:44 +0000 (16:19 +0900)]
video-info: Don't assume colorimetry of UHD resolution as BT.2020

BT.2020 color primaries are designed to cover much wider range of
CIE chromaticity than BT.709, and also it's used for both SDR and HDR
contents. So, the incorrect assumption (i.e., BT.709 as a BT.2020)
is risky and resulting image color tends to be visually very wrong.
Unless there's obvious clue, don't consider color space of high resolution
video stream as BT.2020

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