platform/upstream/gstreamer.git
3 years agopango: Add fallback dependency
Xavier Claessens [Thu, 1 Oct 2020 18:45:24 +0000 (14:45 -0400)]
pango: Add fallback dependency

When we'll depend on Meson >=0.55 this can be replaced by [provide]
section in gst-build's pango.wrap file. The dependency variable name can
also be dropped when pango is updated to use override_dependency:
https://gitlab.gnome.org/GNOME/pango/-/merge_requests/250

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/844>

3 years agomeson: Always wrap "prefix" option with join_paths() to make Windows happy
Seungha Yang [Tue, 15 Sep 2020 19:30:40 +0000 (04:30 +0900)]
meson: Always wrap "prefix" option with join_paths() to make Windows happy

Both "\" and "/" separators are allowed on Windows but the problem
is that "\" is not converted to "\\" in this case.
It will result to unknown/unrecognized character escape sequence.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/818>

3 years agomeson: Add GL summary
Xavier Claessens [Fri, 25 Sep 2020 18:05:09 +0000 (14:05 -0400)]
meson: Add GL summary

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/836>

3 years agocompositor: fix YUY2/UYVY/VYUY blending
Matthew Waters [Mon, 21 Sep 2020 13:50:03 +0000 (23:50 +1000)]
compositor: fix YUY2/UYVY/VYUY blending

Don't overead memory.

Fixup for https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/755

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/823>

3 years agomeson: Add a qt5 feature
Nicolas Dufresne [Tue, 15 Sep 2020 18:15:36 +0000 (14:15 -0400)]
meson: Add a qt5 feature

This allow opting out items of the builds the depends on QT5 library.
Auto-detection of QT5 in cross-build requires host tools to match with the
sysroot, and detection of mis-match is not fully reliable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/817>

3 years agomeson: add abi configuration for meson build
sohwan.park [Mon, 14 Sep 2020 08:56:07 +0000 (17:56 +0900)]
meson: add abi configuration for meson build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/815>

3 years agocompositor: blend with multiple threads
Matthew Waters [Wed, 15 Jul 2020 05:46:56 +0000 (15:46 +1000)]
compositor: blend with multiple threads

Increases the throughput of compositing by using more CPU cycles across
multiple threads.  Simple cases (the output contains one pixel from at
most one input) can have up to a 70% increase in throughput.  Not so
simple cases are limited by the region with the most number of
composite operations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/755>

3 years agovideo: Rename video_color_transfer to video_transfer_function
Marijn Suijten [Fri, 11 Sep 2020 18:15:14 +0000 (20:15 +0200)]
video: Rename video_color_transfer to video_transfer_function

Rename remaining `gst_video_color_transfer_{encode,decode}` functions on
the `GstVideoTransferFunction` enumeration to
`gst_video_transfer_function_{encode,decode}` permitting
gobject-introspection to turn these into associated functions and place
them under the respective `<enumeration>` block in gir XML files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/805>

3 years agovideoaggregator: ensure peek_next_sample() uses the correct caps
Matthew Waters [Fri, 11 Sep 2020 11:40:26 +0000 (21:40 +1000)]
videoaggregator: ensure peek_next_sample() uses the correct caps

gst_pad_get_current_caps() may be wrong when there is a renegotiation in
progress for the pad and we have not yet received or selected the buffer
with different caps yet.

Fix by storing the caps through in a similar way to the existing code
for buffer/video-info selection machinery.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/813>

3 years agovideodecoder: Bump log level of marking a sync point
Stian Selnes [Fri, 18 Aug 2017 15:01:02 +0000 (17:01 +0200)]
videodecoder: Bump log level of marking a sync point

Sync points are often important when debugging and deserves DEBUG
level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/730>

3 years agovideodecoder: Add API for subclasses to request a new sync point
Sebastian Dröge [Wed, 1 Jul 2020 15:19:09 +0000 (18:19 +0300)]
videodecoder: Add API for subclasses to request a new sync point

This allows subclasses that notice missing reference frames to request a
new sync point to allow seamless decoding again. While doing so the
subclass can also signal whether it wants a) all following input frames
until the sync point to be discarded or b) all output frames until the
sync point to be marked as corrupt.

Sending of force-keyunit events for this can be throttled by the
application via the "min-force-keyunit-interval" property.

This replaces custom behaviour for the same in various decoders, for
example openh264dec.

Based on patches by Haakon Sporsheim <haakon@pexip.com> and
Stian Selnes <stian@pexip.com>.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/730>

3 years agovideodecoder: Add API for subclasses to signal that they need the stream to start...
Sebastian Dröge [Wed, 1 Jul 2020 15:14:40 +0000 (18:14 +0300)]
videodecoder: Add API for subclasses to signal that they need the stream to start with a sync point

If the first frame(s) at the very beginning or after a flush are not a
sync point then the base class would discard them before passing them to
the subclass.

This also fixes the previously broken distance_from_sync handling: it
was never reset at sync points.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/730>

3 years agovideodecoder: Add "discard-corrupted-frames" property
Sebastian Dröge [Wed, 1 Jul 2020 15:11:25 +0000 (18:11 +0300)]
videodecoder: Add "discard-corrupted-frames" property

This can be used by applications to configure decoders so that corrupted
frames are directly discarded instead of being forwarded inside the
pipeline. It is a replacement for the "output-corrupt" property of the
ffmpeg decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/730>

3 years agovideodecoder: Add API for marking output frames as corrupted
Sebastian Dröge [Wed, 1 Jul 2020 15:09:22 +0000 (18:09 +0300)]
videodecoder: Add API for marking output frames as corrupted

This can be used by subclasses to mark output frames as known to be
corrupted, for example if reference frames were missing. ffmpeg's
decoders can signal this.

In addition this flag is propagated downstream if the input frame had it
set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/730>

3 years agovideodecoder: Remove unused reorder_depth variable
Sebastian Dröge [Tue, 23 Jun 2020 15:40:07 +0000 (18:40 +0300)]
videodecoder: Remove unused reorder_depth variable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/730>

3 years agortpbasedepayload: Mark GAP events sent because of packet loss as such
Mikhail Fludkov [Wed, 1 Jul 2020 16:18:36 +0000 (19:18 +0300)]
rtpbasedepayload: Mark GAP events sent because of packet loss as such

This allows downstream to distinguish packet loss from normal GAP events
that are sent simply because of gaps in the timeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/731>

3 years agomeson: Actually build gstgl without implicit include dirs
Nirbheek Chauhan [Tue, 8 Sep 2020 10:11:55 +0000 (15:41 +0530)]
meson: Actually build gstgl without implicit include dirs

Fixes a typo from https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/800

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/810>

3 years agoglmixer: Fix unit test to actually work reliably
Sebastian Dröge [Thu, 10 Sep 2020 11:19:04 +0000 (14:19 +0300)]
glmixer: Fix unit test to actually work reliably

Don't run the harness in live mode, or otherwise it would output frames
already in the very beginning before a buffer was provided to it due to
timeout.

Also send EOS/a second buffer before pulling a buffer as videoaggregator
has one frame of latency.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/812>

3 years agogl: add support for GBR and GBRA
Haihao Xiang [Thu, 13 Aug 2020 04:49:19 +0000 (12:49 +0800)]
gl: add support for GBR and GBRA

example pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=GBR ! glimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/789>

3 years agovideoaggregator: Don't require any pads to be configured for negotiating source pad...
Sebastian Dröge [Thu, 20 Aug 2020 06:06:04 +0000 (09:06 +0300)]
videoaggregator: Don't require any pads to be configured for negotiating source pad caps

This is not actually required (anymore?). Source pad caps can be
negotiated at any time regardless of any configured (or existing) sink
pads and videoaggregator comes up with some fixated caps based on the
downstream caps.

Subclasses can override this behaviour as needed by overriding
update_src_caps().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/793>

3 years agogst-libs: gl: Fix documentation typo and clarify gl_memory_texsubimage
Marijn Suijten [Thu, 3 Sep 2020 19:19:29 +0000 (21:19 +0200)]
gst-libs: gl: Fix documentation typo and clarify gl_memory_texsubimage

`gst_gl_memory_read_pixels` reads pixels from `GLMemory` into the
pointer, effectively writing to it. This is opposite from
`gst_gl_memory_texsubimage` which reads texture data from `read_pointer`
into `GLMemory`.

Both cases are clarified by changing `read_pointer` to `write_pointer`,
and explaining what `gst_gl_memory_texsubimage` does in addition to
referring back to `gst_gl_memory_read_pixels`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/806>

3 years agoaudioaggregator: Reset offset if the output rate is renegotiated
Sebastian Dröge [Thu, 20 Aug 2020 13:31:38 +0000 (16:31 +0300)]
audioaggregator: Reset offset if the output rate is renegotiated

On next aggregation the new offset will be calculated based on the
segment position.

Without this a rate change would cause a jump forwards or backwards in
the output timeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/794>

3 years agovideo-anc: Implement transform functions for AFD/Bar metas
Sebastian Dröge [Tue, 18 Aug 2020 07:42:09 +0000 (10:42 +0300)]
video-anc: Implement transform functions for AFD/Bar metas

If the transformation is just a copy, copy over the metadata. For AFD
also copy over the metadata if the aspect ratio stays the same in
scaling transformations. In all other cases fail the transformation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/791>

3 years agoappsrc: Wake up the create() function on caps changes
Sebastian Dröge [Mon, 24 Aug 2020 16:37:15 +0000 (19:37 +0300)]
appsrc: Wake up the create() function on caps changes

This allows the new caps to be sent downstream as soon as possible
instead of having to wait for the next buffer/buffer list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/798>

3 years agoencodebin: Be less restrictive on muxer caps when preset name is specified
Thibault Saunier [Tue, 8 Sep 2020 23:45:53 +0000 (20:45 -0300)]
encodebin: Be less restrictive on muxer caps when preset name is specified

This way the user can simply define its caps by only providing the
structure name which is what we do in the encoding profile
deserialization function for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/811>

3 years agoencodebin: Add vp8 and vp9 smart encoding support
Thibault Saunier [Thu, 30 Jul 2020 22:49:52 +0000 (18:49 -0400)]
encodebin: Add vp8 and vp9 smart encoding support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/770>

3 years agoencodebin: Fix refcount mishandling
Thibault Saunier [Thu, 30 Jul 2020 22:49:18 +0000 (18:49 -0400)]
encodebin: Fix refcount mishandling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/770>

3 years agortpbasepayload: do not forget delayed segment when forwarding gaps
Mathieu Duponchelle [Fri, 21 Aug 2020 01:06:04 +0000 (03:06 +0200)]
rtpbasepayload: do not forget delayed segment when forwarding gaps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/797>

3 years agovideo-converter: Add fast paths from v210 to I420/YV12, Y42B, UYVY and YUY2
Sebastian Dröge [Tue, 4 Aug 2020 09:53:18 +0000 (12:53 +0300)]
video-converter: Add fast paths from v210 to I420/YV12, Y42B, UYVY and YUY2

These then don't require going through the generic code path via AYUV64
first but can be converted directly.

This speeds up processing of
  videotestsrc ! v210 ! videoconvert ! other_format ! fakesink
by a factor of 1.55 for I420/YV12 and 1.40 for the other destination
formats and reduces memory pressure considerably.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/775>

3 years agoci: include template from gst-ci master branch again
Tim-Philipp Müller [Tue, 8 Sep 2020 16:30:31 +0000 (17:30 +0100)]
ci: include template from gst-ci master branch again

3 years agoBack to development
Tim-Philipp Müller [Tue, 8 Sep 2020 15:58:29 +0000 (16:58 +0100)]
Back to development

3 years agoRelease 1.18.0
Tim-Philipp Müller [Mon, 7 Sep 2020 23:03:33 +0000 (00:03 +0100)]
Release 1.18.0

3 years agomeson: dist pot file in tarball
Tim-Philipp Müller [Mon, 7 Sep 2020 21:36:54 +0000 (22:36 +0100)]
meson: dist pot file in tarball

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/808>

3 years agovideo: Rename gst_video_color_transfer_*() to gst_video_transfer_function_*() in...
Sebastian Dröge [Mon, 7 Sep 2020 09:10:16 +0000 (12:10 +0300)]
video: Rename gst_video_color_transfer_*() to gst_video_transfer_function_*() in new API

The type is called GstVideoTransferFunction so the function names should
match, otherwise gobject-introspection is keeping the functions as
global functions instead of methods on the type.

The same mistake was also made in lots of other APIs over the years, but
here we can at least fix it for 1.18 still.

Thanks to Marijn Suijten for noticing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/807>

3 years agomeson: Fix gstreamer-gl-prototypes pkgconfig file on Windows
Nirbheek Chauhan [Wed, 2 Sep 2020 16:23:51 +0000 (21:53 +0530)]
meson: Fix gstreamer-gl-prototypes pkgconfig file on Windows

When we're using wgl, we have to link to `-lopengl32`, not `-lGL`.

Fixes building of anything that uses this pc file, such as the nvcodec
plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/803>

3 years agoaudio/video: Copy more metas by default in the codec base classes
Sebastian Dröge [Fri, 28 Aug 2020 09:56:38 +0000 (12:56 +0300)]
audio/video: Copy more metas by default in the codec base classes

For audio we copy metas that have no tags at all, or that only have the
"audio" and/or "audio-channels" tag. Audio codecs don't change the
audio aspect of the stream and in almost all cases don't change the
number of channels. They might however change the sample rate (e.g.
Opus). Subclasses that change the number of channels will have to
override ::transform_meta() accordingly.

For video we copy metas that have no tags at all, or that only have the
"video" and/or "video-size" and/or "video-orientation" tag. Video codecs
don't change the "video" aspect of the stream and in almost all cases
don't change the resolution or orientation. Subclasses that rescale or
change the orientation will have to override ::transform_meta()
accordingly.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/576#note_610581

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/801>

3 years agovideoscale: make local quark vars static
Tim-Philipp Müller [Fri, 28 Aug 2020 11:30:43 +0000 (12:30 +0100)]
videoscale: make local quark vars static

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/802>

3 years agogl/build: build with implicit_include_directories : false
Matthew Waters [Wed, 26 Aug 2020 09:15:19 +0000 (19:15 +1000)]
gl/build: build with implicit_include_directories : false

Fixes case-insensitive file systems confusing gst-libs/gst/gl/egl/egl.h
with EGL/egl.h when the source directory gst-libs/gst/gl is automatically
added to the compiler's search path.

Due to https://github.com/mesonbuild/meson/issues/7582 we also need to
perform manual enumtype generation.

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

3 years agocompositor: fix off-by-1 error in blending ARGB
Jan Schmidt [Wed, 19 Aug 2020 19:44:46 +0000 (05:44 +1000)]
compositor: fix off-by-1 error in blending ARGB

Use a more naive blend formulation that avoids off-by-one errors
at the 0x00 and 0xff alpha endpoints.

    Fixes #810

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/796>

3 years agovideorate/videoscale/audioresample: Ensure that the caps returned from fixate_caps...
Sebastian Dröge [Tue, 25 Aug 2020 09:56:21 +0000 (12:56 +0300)]
videorate/videoscale/audioresample: Ensure that the caps returned from fixate_caps() are actually fixated

If there is some other field than the ones we care about left and not
fixated yet then basetransform will just error out. So instead just pass
the result through gst_caps_fixate() in the very end.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/799>

3 years agoencoding-profile: minor fix in documentation
Marcin Kolny [Tue, 16 Apr 2019 11:08:30 +0000 (12:08 +0100)]
encoding-profile: minor fix in documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/212>

3 years agoRelease 1.17.90
Tim-Philipp Müller [Thu, 20 Aug 2020 15:10:18 +0000 (16:10 +0100)]
Release 1.17.90

3 years agovideoscale: Don't call NULL GstMeta transform function
Sebastian Dröge [Tue, 18 Aug 2020 07:26:48 +0000 (10:26 +0300)]
videoscale: Don't call NULL GstMeta transform function

It's optional and if it does not exist then no transformation is
possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/790>

3 years agotags: update to latest iso-code and support more languages
Mathieu Duponchelle [Tue, 11 Aug 2020 20:54:50 +0000 (22:54 +0200)]
tags: update to latest iso-code and support more languages

Some languages have an ISO 639-2 representation but no 639-1
representation, for example where "eng" has a two-letter
equivalent in "en", "enm" doesn't have one.

Discarding those languages from our static table caused functions
such as gst_tag_get_language_code_iso_639_2T() or
gst_tag_get_language_code_iso_639_2B() to return NULL for
valid language codes such as "enm", potentially causing users
of these API such as mpegtsmux to discard language code tags
as invalid.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/785>

3 years agopbutils: Add latest H.264 level values
Nicolas Dufresne [Tue, 11 Aug 2020 21:15:50 +0000 (17:15 -0400)]
pbutils: Add latest H.264 level values

The spec now list 6, 6.1 and 6.2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/786>

3 years agoappsrc: Post a bus error if a segment can't be applied
Jan Schmidt [Mon, 10 Aug 2020 17:45:32 +0000 (03:45 +1000)]
appsrc: Post a bus error if a segment can't be applied

When applying segments from the input samples, post a bus
error and fail loudly if the segment fails to configure, instead of
just posting debug output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/783>

3 years agobuild/gl: add top-level include files for sub-libraries
Matthew Waters [Tue, 11 Aug 2020 06:53:51 +0000 (16:53 +1000)]
build/gl: add top-level include files for sub-libraries

Makes gir happy

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/809
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/784>

3 years agoAdd required dependencies of cocoa GL example for linking.
Josh Matthews [Mon, 10 Aug 2020 16:18:31 +0000 (16:18 +0000)]
Add required dependencies of cocoa GL example for linking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/782>

3 years agopkg-config: Fix dependency typo in uninstalled gstreamer-gl-* pc files
Sebastian Dröge [Mon, 10 Aug 2020 06:59:09 +0000 (09:59 +0300)]
pkg-config: Fix dependency typo in uninstalled gstreamer-gl-* pc files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/781>

3 years agoaudioaggregator: Add support for new sample selection API
Sebastian Dröge [Fri, 7 Aug 2020 07:18:34 +0000 (10:18 +0300)]
audioaggregator: Add support for new sample selection API

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/780>

3 years agovideoaggregator: Update for additional info parameter to the "samples-selected" signal
Sebastian Dröge [Fri, 7 Aug 2020 06:34:37 +0000 (09:34 +0300)]
videoaggregator: Update for additional info parameter to the "samples-selected" signal

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/590

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/780>

3 years agoFix incorrect pkgconfig description.
Josh Matthews [Thu, 6 Aug 2020 14:22:27 +0000 (14:22 +0000)]
Fix incorrect pkgconfig description.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/779>

3 years agogl: move each gl platform specific API to its own gir
Guillaume Desmottes [Thu, 23 Jul 2020 09:48:55 +0000 (19:48 +1000)]
gl: move each gl platform specific API to its own gir

With contributions from:
Thibault Saunier <tsaunier@igalia.com>
Matthew Waters <matthew@centricular.com>

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/661>

3 years agogl: egl: add missing gir annotations
Guillaume Desmottes [Wed, 13 May 2020 08:08:25 +0000 (10:08 +0200)]
gl: egl: add missing gir annotations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/661>

3 years agovideoaggregator: update to new samples selection API
Mathieu Duponchelle [Wed, 5 Aug 2020 14:54:19 +0000 (16:54 +0200)]
videoaggregator: update to new samples selection API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/778>

3 years agotests/check/elements/audioresample.c: avoid implict int ot float conversion
Jordan Petridis [Mon, 3 Aug 2020 16:53:58 +0000 (19:53 +0300)]
tests/check/elements/audioresample.c: avoid implict int ot float conversion

Also use doubles instead so the calculation won't overflow

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/773>

3 years agoalsamidisrc: fix compiler warning with clang 10
Jordan Petridis [Tue, 4 Aug 2020 12:17:35 +0000 (15:17 +0300)]
alsamidisrc: fix compiler warning with clang 10

```
../subprojects/gst-plugins-base/ext/alsa/gstalsamidisrc.c:201:54: error: converting the result of '<<' to a boolean always evaluates to false [-Werror,-Wtautological-constant-compare]
  snd_seq_ev_schedule_real (&ev, alsamidisrc->queue, SND_SEQ_TIME_MODE_ABS,
                                                     ^
/usr/include/alsa/seq_event.h:215:34: note: expanded from macro 'SND_SEQ_TIME_MODE_ABS'
```

The ALSA API expects 0 or 1 here and will then add the flags accordingly,
and that's also what other code using this API does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/777>

3 years agoMeson: find_program() will return gst-tester from subproject
Xavier Claessens [Tue, 4 Aug 2020 11:11:54 +0000 (07:11 -0400)]
Meson: find_program() will return gst-tester from subproject

gstreamer now use override_find_program() so it won't return the system
version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/776>

3 years agomeson: Only look for Objective-C compiler on macOS/iOS
Nirbheek Chauhan [Tue, 4 Aug 2020 00:02:08 +0000 (05:32 +0530)]
meson: Only look for Objective-C compiler on macOS/iOS

On Windows, MinGW-GCC Objective-C compilers can be in PATH and mess up
the build since they may not match the CPU family of the C/C++
compilers we are using.

Also require them on macOS/iOS, because they should always be present.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/88

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/774>

3 years agoexamples: compositor: fix build with older GLib versions
Tim-Philipp Müller [Fri, 31 Jul 2020 23:22:28 +0000 (00:22 +0100)]
examples: compositor: fix build with older GLib versions

Don't use g_hash_table_steal_extended() which was only
added in 2.58.

Fixes #801

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/772>

3 years agocompositor: Frames where we introduce alpha can't obscure anything
Thibault Saunier [Fri, 17 Jul 2020 01:56:47 +0000 (21:56 -0400)]
compositor: Frames where we introduce alpha can't obscure anything

When a pad has alpha != 1.0 it means that the resulting frames will
contain alpha and thus can't fully obscure with a lower zorder.

Also simplifies the other checks as blending with an OVER or on a
transparent is not a no-op as previously assumed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/764>

3 years agovideoaggregator: implement samples selection API
Mathieu Duponchelle [Wed, 1 Jul 2020 01:47:00 +0000 (03:47 +0200)]
videoaggregator: implement samples selection API

Call gst_aggregator_selected_samples() after filling the queues
(but before preparing frames).

Implement GstAggregator.peek_next_sample.

Add an example that demonstrates usage of the new API in combination
with the existing buffer-consumed signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/728>

3 years agoencoding: Support more topologies in profile_from_discoverer()
Thibault Saunier [Fri, 24 Jul 2020 12:33:23 +0000 (08:33 -0400)]
encoding: Support more topologies in profile_from_discoverer()

Previous implementation was only working when the stream was inside a
container, this refactoring allows using virtually any stream as input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/766>

3 years agoglwindow/winrt: Increase timeout value to 15 seconds
Seungha Yang [Thu, 30 Jul 2020 10:16:06 +0000 (19:16 +0900)]
glwindow/winrt: Increase timeout value to 15 seconds

5 seconds might not be enough value for timeout in case an application
is running on a device with very limited computing power.
Note that ANGLE uses 10 seconds timeout value. So even if a timeout
happens here, it's also ANGLE's timeout condition as well
(meaning that bad things will happen either way)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/769>

3 years agoaudioaggregator: Only check downstream caps when handling CAPS events if we didn...
Sebastian Dröge [Mon, 27 Jul 2020 15:55:35 +0000 (18:55 +0300)]
audioaggregator: Only check downstream caps when handling CAPS events if we didn't negotiate with downstream yet

If we already negotiated with downstream there is not point in checking
if the caps are supported. We already know that this is the case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/768>

3 years agoaudioaggregator: Check all downstream allowed caps structures if they support the...
Sebastian Dröge [Mon, 27 Jul 2020 15:49:48 +0000 (18:49 +0300)]
audioaggregator: Check all downstream allowed caps structures if they support the upstream rate

Otherwise it might happen that downstream prefers a different rate (i.e.
puts it into the first structure) and also supports other rates, but
audioaggregator would then fail negotiation.

Also this now correctly handles downstream returning a range of
supported rates.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/768>

3 years agomeson: add a plugin summary
Stéphane Cerveau [Thu, 23 Jul 2020 14:52:11 +0000 (16:52 +0200)]
meson: add a plugin summary

This summary displays a list of plugins which
have been enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/765>

3 years agoencodebin: Fix and refactor smart encoding
Thibault Saunier [Sat, 4 Jul 2020 16:33:20 +0000 (12:33 -0400)]
encodebin: Fix and refactor smart encoding

It was not working properly and the implementation of the smartencoder
element was weird. This introduce a number of changes (which are all
in one single commit because they basically all work together and lead
to basically reimplementing the element):

* Make smartencoder a bin so that the reencoding chain of elements are
  inside of it instead of not having any parent. Those elements were not
  be visible when dumping the pipeline which was very confusing.
* Make encodebin create the right encoder with a capsfilter (and parser)
  to properly enforce the format specified by the user, and so that the
  encoder properties specified in the encoding profile are respected.
* Use `decodebin` to do the decoding instead of selecting a decoder
  ourself and not plug any parser etc...
* Ensure that negotiated format in the sinkpad of smart encoder is fixed
  through time when the user requested a non dynamic output
* Add a parser at the beginning of the smart encoder
* Handle errors when reencoding

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>

3 years agostreamsplitter: Forward STREAM_START to all branchs
Thibault Saunier [Sat, 4 Jul 2020 16:32:26 +0000 (12:32 -0400)]
streamsplitter: Forward STREAM_START to all branchs

Otherwise the branch that get selected later won't receive it ever.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>

3 years agostreamsplitter/combiner: Drain encoder before switching branch
Thibault Saunier [Sat, 4 Jul 2020 16:29:06 +0000 (12:29 -0400)]
streamsplitter/combiner: Drain encoder before switching branch

Otherwise we miht have frames queued in the encoder from the old branch
that do not get encoded/muxed when they should.

The implementation is a bit 'weird' but the rational and solution
is documented in the code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>

3 years agoencodebin: Rebuilt internal state when swicthing to avoid-reencoding
Thibault Saunier [Sat, 4 Jul 2020 16:20:44 +0000 (12:20 -0400)]
encodebin: Rebuilt internal state when swicthing to avoid-reencoding

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>

3 years agortpbasepayload: place twcc-ext-id behind environment variable
Matthew Waters [Wed, 15 Jul 2020 07:51:18 +0000 (17:51 +1000)]
rtpbasepayload: place twcc-ext-id behind environment variable

Adding properties for each and every rtp header extension is not
scalable and a new interface will be implemented for the general case
(https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/777).

Set the environment variable "GST_RTP_ENABLE_EXPERIMENTAL_TWCC_PROPERTY"
to any value to reenable the short-lived twcc-ext-id property.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/761

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/756>

3 years agovideorate: Error out on streams with no way to guess framerate
Olivier Crête [Thu, 16 Jul 2020 20:25:15 +0000 (16:25 -0400)]
videorate: Error out on streams with no way to guess framerate

This is better than going into an infinite loop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/761>

3 years agovideorate: Assert on invalid result from internal code
Olivier Crête [Thu, 16 Jul 2020 20:04:23 +0000 (16:04 -0400)]
videorate: Assert on invalid result from internal code

Letting this through instead results in an infinite loop where
the exact same buffer gets pushed out ad infinitum.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/761>

3 years agovideorate: Add test that reproduces infinite loop
Olivier Crête [Thu, 16 Jul 2020 02:54:55 +0000 (22:54 -0400)]
videorate: Add test that reproduces infinite loop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/761>

3 years agoalsadeviceprovider: Remove redundant start function
Olivier Crête [Mon, 6 Jul 2020 18:46:33 +0000 (14:46 -0400)]
alsadeviceprovider: Remove redundant start function

The ALSA provider doesn't provider live monitoring, so don't
pretend otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/735>

3 years agoRevert "gstgldisplay: Add public foreign_display property"
Matthew Waters [Thu, 16 Jul 2020 06:31:28 +0000 (16:31 +1000)]
Revert "gstgldisplay: Add public foreign_display property"

This introduced a possible regression where the EGL display connection
could be leaked when a foreign native display (x11, wayland, etc) could
create a non-foreign EGL display that would never be destroyed.

The underlying problem needed to be solved in a different way.  See
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/640
for more details.

This reverts commit 2e686b0dad9700b10d91da5e91f34849fa7d32ae.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/758>

3 years agoaudioutilsprivate: restore thread priority before ending
Silvio Lazzeretti [Thu, 16 Jul 2020 12:34:51 +0000 (14:34 +0200)]
audioutilsprivate: restore thread priority before ending

The priority of the thread that executes audioringbuffer_thread_func
is incremented on Windows by the usage of the AvSetMmThreadCharacteristics
API. This change has to be restored, as described on the documentation
of the API (https://docs.microsoft.com/en-us/windows/win32/api/avrt/nf-avrt-avsetmmthreadcharacteristicsw#remarks),
with a call to the AvRevertMmThreadCharacteristics. If this is not done,
a handle will be leaked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/760>

3 years agoaudioutilsprivate: Don't try to load avrt for UWP application
Seungha Yang [Fri, 17 Jul 2020 09:48:15 +0000 (18:48 +0900)]
audioutilsprivate: Don't try to load avrt for UWP application

All APIs in avrt.h are desktop only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/763>

3 years agobuild/gl: remove unused cocoa/win32 header variables
Matthew Waters [Thu, 16 Jul 2020 08:07:34 +0000 (18:07 +1000)]
build/gl: remove unused cocoa/win32 header variables

We don't install any cocoa/win32 specific headers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/759>

3 years agotest/rtp: use the proper _INIT for initializing rtp/rtcp buffer structs.
Havard Graff [Tue, 7 Apr 2020 09:00:39 +0000 (11:00 +0200)]
test/rtp: use the proper _INIT for initializing rtp/rtcp buffer structs.

Fixes -Wmissing-field-initializers in Clang.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/757>

3 years agortpbasedepayload: test warning fixes
Havard Graff [Wed, 12 Feb 2020 13:48:36 +0000 (14:48 +0100)]
rtpbasedepayload: test warning fixes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/757>

3 years agodoc: Update cache with new raw pixel format
Nicolas Dufresne [Wed, 15 Jul 2020 02:03:39 +0000 (22:03 -0400)]
doc: Update cache with new raw pixel format

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/754>

3 years agovideo: Add support for linear 32x32 NV12 tiles
Nicolas Dufresne [Wed, 15 Jul 2020 01:43:56 +0000 (21:43 -0400)]
video: Add support for linear 32x32 NV12 tiles

This adds linear 32x32 NV12 based tiles. This format is notably used by
Allwinner VCU and exposed in V4L2 as being "SUNXI Tiled" format. In this
patch we generalize the plane info calculation so we can share this part
with the 4L4 variant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/754>

3 years agodoc: Update cache after adding a new pixel format
Nicolas Dufresne [Tue, 14 Jul 2020 15:29:57 +0000 (11:29 -0400)]
doc: Update cache after adding a new pixel format

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/753>

3 years agorawvideoparse: Fix tiling support
Nicolas Dufresne [Tue, 14 Jul 2020 14:42:01 +0000 (10:42 -0400)]
rawvideoparse: Fix tiling support

When using tile format, the stride has a different meaning. It used
the MSB and LSB 16bits to encode respectively the width and height in
number of tiles.

This issue was introduce with commit e5b70d384c which was fixing
missing size recalculation when strides and offset is updated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/753>

3 years agovideo: Add NV12_4L4 tile format
Nicolas Dufresne [Mon, 13 Jul 2020 20:18:29 +0000 (16:18 -0400)]
video: Add NV12_4L4 tile format

This format is produced by Verisillicon VC8000D VPU decoder, it is a simple 4x4
tiling layout in a linear way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/753>

3 years agovideo: allow frame copy destination to have dimensions smaller than source
Aaron Boxer [Tue, 16 Jun 2020 15:44:08 +0000 (11:44 -0400)]
video: allow frame copy destination to have dimensions smaller than source

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/707>

3 years agoexamples/gl/qt: silence compiler warnings
Matthew Waters [Tue, 14 Jul 2020 04:06:58 +0000 (14:06 +1000)]
examples/gl/qt: silence compiler warnings

-Waggregate-return: used by some Qt clases extensively and not super
useful for this example. Supress it.

warning: "GL_GLEXT_VERSION" redefined: Perform the same workaround as
qmlglsink by defining the old gl/GL.h header guard if the new GL/gl.h
guard exists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/752>

3 years agortcpbuffer: Notify error in case packet can not be added to an RTCP compound packet
Santiago Carot-Nemesio [Wed, 27 Nov 2019 15:51:55 +0000 (16:51 +0100)]
rtcpbuffer: Notify error in case packet can not be added to an RTCP compound packet

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/476>

3 years agovideo-converter: Add scaling fast-path for GBRA format
Sebastian Dröge [Fri, 10 Jul 2020 11:57:53 +0000 (14:57 +0300)]
video-converter: Add scaling fast-path for GBRA format

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/749>

3 years agoglwindow/winrt: Add warning message if window is being closed from a UI thread
Seungha Yang [Fri, 10 Jul 2020 10:49:56 +0000 (19:49 +0900)]
glwindow/winrt: Add warning message if window is being closed from a UI thread

All UI elements will follow Single-Threaded Apartments (STA) model.
As a result, we should access them from dedicated UI thread.
Due to the nature of the threading model, ANGLE will wait the UI
thread while closing internal window/swapchain objects.

A problem here is that when destroying GstGLWindow from the UI thread,
it will wait GstGLContext's internal thread. Meanwhile, the GstGLContext's
internal thread will be blocked because ANGLE wants to access the UI thread.
That will cause a deadlock or exceptions.

In short, application should not try to call
gst_element_set_state(pipeline, GST_STATE_NULL) from a UI thread.
That's a limitation of current implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/745>

3 years agoglwindow/winrt: Add window resize event handler
Seungha Yang [Thu, 9 Jul 2020 13:23:33 +0000 (22:23 +0900)]
glwindow/winrt: Add window resize event handler

GstGLWindow implmentaion should be able to report native window size
and also it need to handle resize event for glimagesink.

Note that GstD3D11Window implementation was referenced for this change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/745>

3 years agoglwindow/winrt: Move to c++
Seungha Yang [Thu, 9 Jul 2020 10:51:57 +0000 (19:51 +0900)]
glwindow/winrt: Move to c++

For native window size query, c++ API is much convenient than c API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/745>

3 years agoappsrc: Fix annotations
Seungha Yang [Thu, 9 Jul 2020 17:46:56 +0000 (02:46 +0900)]
appsrc: Fix annotations

Don't put double ':' there

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/663>

3 years agotests: appsrc: Add unit test for custom segment
Seungha Yang [Sat, 16 May 2020 17:44:42 +0000 (02:44 +0900)]
tests: appsrc: Add unit test for custom segment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/663>

3 years agoappsrc: Add support for custom GstSegment
Seungha Yang [Sat, 16 May 2020 17:29:39 +0000 (02:29 +0900)]
appsrc: Add support for custom GstSegment

Add property "handle-segment-change" for user to allow pushing
custom segment event. For now, this property can work only for
time format GstSegment.
This property can be useful in case application controls timeline
of stream such as there is timestamp discontinuity but playback is
expected to be continuous. Multi-period scenario of MPEG-DASH is an
example of this use case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/663>

3 years agopbutils: Do not restrict number of similar profiles in a container
Thibault Saunier [Thu, 9 Jul 2020 15:05:35 +0000 (11:05 -0400)]
pbutils: Do not restrict number of similar profiles in a container

We have the notion of presence, and when the user want to be in control
it is totally legitimate for him to have several occurrences of a
similar profile

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/746>

3 years agovideoconverter: Relax frame size checks
Nicolas Dufresne [Thu, 9 Jul 2020 17:13:14 +0000 (13:13 -0400)]
videoconverter: Relax frame size checks

Since we are using VideoMeta, the converter (similarly to the video_frame_copy
utility) should have no issue dealing with frames that are slightly larger.
This situation occure as some element will use padded width/height for
allocation, which results in a VideoMeta width/height being larger then the
display width/height found in the negotiated caps.

Fixes #790

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/747>

3 years agoaudioaggregator: Fix negotiation with downstream if there is no peer yet
Sebastian Dröge [Thu, 9 Jul 2020 09:45:27 +0000 (12:45 +0300)]
audioaggregator: Fix negotiation with downstream if there is no peer yet

get_allowed_caps() will return NULL, which is not a problem in itself.
Just take the template caps for negotiation in that case instead of
erroring out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/744>