platform/upstream/gstreamer.git
3 years agoglcontext: Ask for an alpha channel and fallback
Nicolas Dufresne [Wed, 26 May 2021 20:57:28 +0000 (16:57 -0400)]
glcontext: Ask for an alpha channel and fallback

While this was already possible through the GLContext machinary, this simply
request an alpha channel by default and fallback if this is not possible. This
obsolete some RPi Dispmanx hack, since this is near equivalent will allow see
through when playgin WebM Alpha or other transparent files.

Application are still free to pass their own EGLContext attribute, this is
specially for the case the application let GStreamer chose (e.g. gst-launch).

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

3 years agorawbaseparse: check destination format correctly
Daniel Knobe [Mon, 31 May 2021 07:14:53 +0000 (09:14 +0200)]
rawbaseparse: check destination format correctly

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

3 years agoaudiomixer: Add test for discont going backwards
Olivier Crête [Thu, 27 May 2021 02:50:22 +0000 (22:50 -0400)]
audiomixer: Add test for discont going backwards

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

3 years agoaudioaggregator: Don't overwrite already written samples
Olivier Crête [Thu, 27 May 2021 20:05:04 +0000 (16:05 -0400)]
audioaggregator: Don't overwrite already written samples

On re-sync, don't forget what has already been written. Instead, just
drop any samples that overlap with parts that were already filled.

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

3 years agoaudiobasesrc: Fix divide by zero assertion
Seungha Yang [Thu, 27 May 2021 07:20:09 +0000 (16:20 +0900)]
audiobasesrc: Fix divide by zero assertion

GstAudioRingBufferSpec can be cleared from other thread, then
rate value will be zero

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

3 years agoaudio,video-format: Make generate_raw_formats idempotent for assertions
Marijn Suijten [Wed, 26 May 2021 21:22:45 +0000 (23:22 +0200)]
audio,video-format: Make generate_raw_formats idempotent for assertions

When compiling without assertions `g_assert` and its contents disappear
resulting in no list being deserialized at all and the
`gst_{audio,video}_formats_raw` functions to return an empty collection.

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

3 years agoUse new gst_buffer_new_memdup()
Tim-Philipp Müller [Sun, 23 May 2021 22:48:39 +0000 (23:48 +0100)]
Use new gst_buffer_new_memdup()

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

3 years agocompositor: Consider the converter-config when deciding whether one pad obscures...
Sebastian Dröge [Mon, 24 May 2021 11:25:55 +0000 (14:25 +0300)]
compositor: Consider the converter-config when deciding whether one pad obscures another

If the converter configuration is set to not fill any borders, or if the
border fill color is not full opaque, then the pad has to be handled
as potentially transparent and can't be considered to obscure another
one.

This prevents pads from being wrongly skipped and doing alpha-blending
with uninitialized memory.

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

3 years agodoc: Update cache for AV12 pixel format
Nicolas Dufresne [Fri, 21 May 2021 19:04:16 +0000 (15:04 -0400)]
doc: Update cache for AV12 pixel format

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

3 years agovideo: Update video-orc-dist
Nicolas Dufresne [Fri, 21 May 2021 17:28:32 +0000 (13:28 -0400)]
video: Update video-orc-dist

This adds the new symbols needed for AV12 support.

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

3 years agogl: add support for AV12
Daniel Almeida [Tue, 18 May 2021 19:20:36 +0000 (16:20 -0300)]
gl: add support for AV12

AV12 is an internally conceived format that is actually the
combination of NV12 and an alpha plane.

This format is to add to gstreamer's webM transparency support for
vp8 and vp9. To this end, two I420 streams are independently decoded
simultaneously for the actual content and the alpha plane respectively
and these are then combined into A420.

This patch adds GL conversion support so that it is possible to convert
from AV12 to RGBA for the purposes of rendering it on a display.

The reverse conversion is also supplied.

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

3 years agovideo: add support for AV12
Daniel Almeida [Fri, 21 May 2021 15:24:37 +0000 (12:24 -0300)]
video: add support for AV12

AV12 is an internally conceived format that is actually
the combination of NV12 and an alpha plane.

This format is to add to gstreamer's webM
transparency support for vp8 and vp9. To this end, two
I420 streams are independently decoded simultaneously for
the actual content and the alpha plane respectively
and these are then combined into A420.

Since most hardware decoders output NV12, this patch adds
NV12+A to make the same workflow possible.

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

3 years agovideo: video-orc: remove trailing spaces
Daniel Almeida [Fri, 21 May 2021 15:24:00 +0000 (12:24 -0300)]
video: video-orc: remove trailing spaces

Remove unnecessary trailing spaces at the end of some orc functions.

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

3 years agotests: Update expectation files with sorted structure fields
Thibault Saunier [Thu, 20 May 2021 15:16:30 +0000 (11:16 -0400)]
tests: Update expectation files with sorted structure fields

3 years agomeson: Fix the name of the `sdp_deps` variable
Thibault Saunier [Thu, 20 May 2021 15:24:15 +0000 (11:24 -0400)]
meson: Fix the name of the `sdp_deps` variable

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

3 years agogl/context/wgl: implement a better get_proc_address()
Matthew Waters [Thu, 20 May 2021 12:52:56 +0000 (22:52 +1000)]
gl/context/wgl: implement a better get_proc_address()

Look in opengl32.dll first, then wglGetProcAddress(), and only then
possibly from any linked in libraries.

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

3 years agogl/context: add opengl32.dll as a library to dlopen() on windows
Matthew Waters [Thu, 20 May 2021 12:50:23 +0000 (22:50 +1000)]
gl/context: add opengl32.dll as a library to dlopen() on windows

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

3 years agooverlaycomposition: fix cut-off example code in docs
Tim-Philipp Müller [Thu, 20 May 2021 22:27:21 +0000 (23:27 +0100)]
overlaycomposition: fix cut-off example code in docs

Include everything to the end.

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

3 years agogl: add support for A420 conversion
Daniel Almeida [Thu, 6 May 2021 20:26:50 +0000 (17:26 -0300)]
gl: add support for A420 conversion

A420 is a four planar format similar to I420 but with an extra buffer
for alpha values.

A common use of the gl stack is for GPU format conversions using
shaders, in which case one can use glupload, glcolorconvert and
gldownload elements to upload their buffer to the GPU context, perform
the conversion on the GPU itself and then retrieve the data to CPU
context.

A420 was not supported. This patch adds said support mainly by adding
the corresponding shader to perform the conversion and updating the
supported caps.

Both A420->RGBA and RGBA->A420 conversions are supported.

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

3 years agoglcolorbalance: Error out on unsupported texture target types
Enrique Ocaña González [Wed, 19 May 2021 17:44:29 +0000 (19:44 +0200)]
glcolorbalance: Error out on unsupported texture target types

The issue can be reproduced on a computer with a Radeon graphics card
when trying to force GStreamer Editing Services to use GL for video
mixing in GESSmartMixer, instead of the GstCompositor that smart mixer
would normally use. This change causes the resulting video stream to
have "video/x-raw(memory:GLMemory) ... texture-target: 2D" caps (instead
of "video/x-raw ..." caps). At the PlaySink stage of the pipeline, a
GstGLImageSinkBin is plugged, with a GstGLColorBalance on it. For some
reason that is still to be debugged (and out of the scope of this
patch), gst_gl_filter_set_caps() is never called on that color balance
element, leaving filter->in_texture_target set to its default
GST_GL_TEXTURE_TARGET_NONE value. The incomplete _create_shader() logic
does the rest and silently generates a shader code that doesn't build.

This is the command I use to reproduce the issue (I'm not sure if I
would be able to isolate the issue in a simple pipeline, though):

 GST_PLUGIN_FEATURE_RANK=vaapih265enc:NONE,vaapih264enc:NONE,vaapisink:NONE,vaapidecodebin:NONE,vaapipostproc:NONE,vaapih265dec:NONE,vaapivc1dec:NONE,vaapih264dec:NONE,vaapimpeg2dec:NONE,vaapijpegdec:NONE,glvideomixer:260
 ges-launch-1.0 +clip /tmp/video.mp4

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

3 years agocompositor: Fix NV12 blend operation
Nicolas Dufresne [Wed, 19 May 2021 20:35:01 +0000 (16:35 -0400)]
compositor: Fix NV12 blend operation

The full src_height/width was being used instead of the remaining
width/height for the current band. As a side effect, that value would
get erroneously reset and would cause overrun.

Fixes #887

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

3 years agovideo: Pass component index not plane index
Nicolas Dufresne [Tue, 18 May 2021 19:36:36 +0000 (15:36 -0400)]
video: Pass component index not plane index

While so far it worked, we are about to introduce a format that break this
assuming. We have a format which consist of NV12 with alpha, and this format
does not have a direct mapping of the component against their plane indexes.

Fix this by using gst_video_format_info_component() introduced in 1.18 for
this purpose.

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

3 years agogl/context: move egl creation lower in priority on _new()
Matthew Waters [Tue, 18 May 2021 10:00:01 +0000 (20:00 +1000)]
gl/context: move egl creation lower in priority on _new()

e.g. if running a dual wgl/egl built library, then egl will always
succeed in creating the GstGLContext because almost anything could
support egl, as long as eglGetDisplay() works.

wgl, however has a check for the correct display type so should move
earlier in the tried list.

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

3 years agogl/display: provide a gst_gl_display_new_with_type()
Matthew Waters [Tue, 18 May 2021 09:56:13 +0000 (19:56 +1000)]
gl/display: provide a gst_gl_display_new_with_type()

Allows more fine-grained control over the exact display type that is
created.

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

3 years agovideoaggregator: Don't try to return void
Seungha Yang [Wed, 19 May 2021 07:23:43 +0000 (16:23 +0900)]
videoaggregator: Don't try to return void

warning C4098: 'gst_video_aggregator_parallel_convert_pad_finalize':
'void' function returning a value

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

3 years agoRevert video HDR10+ support
Tim-Philipp Müller [Sun, 16 May 2021 12:31:56 +0000 (13:31 +0100)]
Revert video HDR10+ support

This reverts commit f76b731cbf76aa59ef462e4fd761cceda1f50a6d.
This reverts commit 631489de230d5e1c43f8ded596e220561824ca1e.
This reverts commit a1ed7a8f49568094f79fd76d7842d67e723229d1.
This reverts commit 7d6f72e956e63a0e8c4998c730d67c52e2b69a8d.

Back this out again for now for the release. Needs more discussion.

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

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

3 years agomeson: fix up wrong escaping of variables in gl and plugins-base .pc file
Tim-Philipp Müller [Sun, 16 May 2021 23:33:44 +0000 (00:33 +0100)]
meson: fix up wrong escaping of variables in gl and plugins-base .pc file

Workaround for pkg.generate() escaping spaces in pc variables
that shouldn't be escaped. Perhaps going back to configure_file()
would be a better option though. Really needs a fix in Meson.

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

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

3 years agomeson: add custom pkg-config variables also to uninstalled .pc files
Tim-Philipp Müller [Mon, 17 May 2021 10:10:49 +0000 (11:10 +0100)]
meson: add custom pkg-config variables also to uninstalled .pc files

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

3 years agobasetextoverlay: add debug category
Guillaume Desmottes [Sun, 16 May 2021 17:10:01 +0000 (19:10 +0200)]
basetextoverlay: add debug category

All logs were using 'default' category which is not handy for debugging.

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

3 years agocompositor: perform conversions in parallel
Matthew Waters [Fri, 2 Apr 2021 05:43:02 +0000 (16:43 +1100)]
compositor: perform conversions in parallel

Improves throughput of the total convert and blend process and allows
for higher performance across slightly more threads.

Also make use of video aggregator's task pool for blending as well in
order to reduce the number of threads.

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

3 years agovideo/aggregator: add parallel convert pad class
Matthew Waters [Fri, 2 Apr 2021 05:40:37 +0000 (16:40 +1100)]
video/aggregator: add parallel convert pad class

Each required conversion will be performed concurrently

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

3 years agovideo/converter: add support for async conversion operation
Matthew Waters [Fri, 2 Apr 2021 05:39:08 +0000 (16:39 +1100)]
video/converter: add support for async conversion operation

Allows for users to start up multiple conversions concurrently.

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

3 years agoext/gl: change graphene default options
Jordan Petridis [Fri, 26 Mar 2021 14:34:20 +0000 (16:34 +0200)]
ext/gl: change graphene default options

The type was changed upstream from a boolean to an autofeature

https://github.com/ebassi/graphene/commit/41ebe5fa61d4bdb6c75f677942d19c6c976fd17b

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

3 years agotests: use the real name of the videoscale test in GST_REGISTRY
Jose Quaresma [Fri, 14 May 2021 22:16:32 +0000 (23:16 +0100)]
tests: use the real name of the videoscale test in GST_REGISTRY

The videoscale tests uses the same name as the one used in base tests.
Fix this and use the name of the videoscale test on the test environment GST_REGISTRY

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

3 years agoplayback: Handle sources with dynamic pads and pads already present
Thibault Saunier [Thu, 22 Apr 2021 02:40:35 +0000 (22:40 -0400)]
playback: Handle sources with dynamic pads and pads already present

In case we already have a pad but more might be added later we were
ignoring the new pads added later, we should track the element
new pads and expose them as they are added.

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

3 years agoplayback: Stop giving "source" as name to sources
Thibault Saunier [Thu, 22 Apr 2021 02:19:39 +0000 (22:19 -0400)]
playback: Stop giving "source" as name to sources

This makes it very hard to understand what source we are talking about

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

3 years agoglcontext: add support for influencing the backing configuration
Matthew Waters [Tue, 8 Sep 2020 06:27:03 +0000 (16:27 +1000)]
glcontext: add support for influencing the backing configuration

New API:
- gst_gl_context_get_config()
- gst_gl_context_request_config()

A GL context configuration is a GstStructure that has some well-known
names for common values that can also be extended in platform-specific
ways if necessary.

Wrapped OpenGL contexts may be able to retrieve the GL context
configuration depending on the platform.  If that information is
available, GstGLContext will attempt to create an context that matches
the shared OpenGL context config unless gst_gl_context_request_config()
has been called.

A new environment variable 'GST_GL_CONFIG' will be read to influence the
configuration chosen.  The environment variable will only be used as a
fallback if gst_gl_context_request_config() has not been called.

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

3 years agogl/context/egl: change header guard to be unique
Matthew Waters [Thu, 13 May 2021 05:55:37 +0000 (15:55 +1000)]
gl/context/egl: change header guard to be unique

The header guard in gst/gl/egl/gstglcontext_egl.h was the same as
gst/gl/egl/egl.h

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

3 years agogl/api: improve the to/from string for GstGLAPI/GstGLPlatform
Matthew Waters [Tue, 8 Sep 2020 05:53:27 +0000 (15:53 +1000)]
gl/api: improve the to/from string for GstGLAPI/GstGLPlatform

With unit tests now!

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

3 years agogl/framebuffer: expand documentation on valid usage
Matthew Waters [Tue, 8 Sep 2020 05:09:18 +0000 (15:09 +1000)]
gl/framebuffer: expand documentation on valid usage

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

3 years agoopusdec: Add Converter class to hint gst-validate
Nicolas Dufresne [Tue, 11 May 2021 18:31:59 +0000 (14:31 -0400)]
opusdec: Add Converter class to hint gst-validate

opusdec have minimal conversion capability, adding the Converter class allow
gst-validate to behave properly and not spit an error when it notice that the
number of channels or rate miss-match in and out.

Related to https://gitlab.freedesktop.org/gstreamer/gst-integration-testsuites/-/merge_requests/102

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

3 years agodoc: update gst_plugins_cache.json
Haihao Xiang [Tue, 11 May 2021 02:34:16 +0000 (10:34 +0800)]
doc: update gst_plugins_cache.json

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

3 years agogl: add support for RGBP and BGRP formats
Haihao Xiang [Mon, 10 May 2021 06:43:23 +0000 (14:43 +0800)]
gl: add support for RGBP and BGRP formats

gst-launch-1.0 videotestsrc ! video/x-raw,format=RGBP ! glimagesink
gst-launch-1.0 videotestsrc ! video/x-raw,format=BGRP ! glimagesink

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

3 years agovideo: add support for RGBP and BGRP formats
Haihao Xiang [Mon, 10 May 2021 06:21:51 +0000 (14:21 +0800)]
video: add support for RGBP and BGRP formats

The two RGB planar formats are used in OpenVino [1]

gst-launch-1.0 videotestsrc ! video/x-raw,format=BGRP ! fakesink
gst-launch-1.0 videotestsrc ! video/x-raw,format=RGBP ! fakesink

[1] https://docs.openvinotoolkit.org/latest/openvino_docs_optimization_guide_dldt_optimization_guide.html

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

3 years agotest: enlarge the number
Haihao Xiang [Tue, 11 May 2021 04:01:03 +0000 (12:01 +0800)]
test: enlarge the number

This is to make sure the case can pass after adding new video formats.

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

3 years agocodec: Introduce GstVideoCodecAlphaMeta
Nicolas Dufresne [Wed, 3 Mar 2021 01:09:26 +0000 (20:09 -0500)]
codec: Introduce GstVideoCodecAlphaMeta

This meta hold one buffer of the same codec data as the parent memory. This
extra frame luma will be used as the alpha values for the final combined
frame. This is notably used to support VP8/VP9 alpha as defined in WebM and
matroska specification.

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

3 years agovideo: Sort includes in video.h
Nicolas Dufresne [Tue, 30 Mar 2021 18:38:25 +0000 (14:38 -0400)]
video: Sort includes in video.h

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

3 years agomultihandlesink: Use the monotonic clock for detecting timeouts and connection durations
Sebastian Dröge [Tue, 4 May 2021 15:09:07 +0000 (18:09 +0300)]
multihandlesink: Use the monotonic clock for detecting timeouts and connection durations

Otherwise real-time clock changes can wrongly trigger timeouts, or not
cause timeouts to happen in time.

Unfortunately real-time clock times still have to be kept track inside
the elements for the statistics. Switching those over to the monotonic
clock would cause behaviour changes from the application point of view.

The statistics are extended with fields with monotonic times though.

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

3 years agoappsrc: Add test for testing the max-* and leaky-type properties
Sebastian Dröge [Mon, 3 May 2021 14:10:20 +0000 (17:10 +0300)]
appsrc: Add test for testing the max-* and leaky-type properties

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

3 years agoappsrc: Implement a leaky property similar to the queue element
Sebastian Dröge [Sun, 2 May 2021 17:46:00 +0000 (20:46 +0300)]
appsrc: Implement a leaky property similar to the queue element

This allows dropping the newest or oldest buffer when the internal queue
is full instead of blocking or continuing to grow.

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

3 years agoappsrc: Add new max-buffers / max-time / current-level-buffers / current-level-time...
Sebastian Dröge [Fri, 30 Apr 2021 16:22:46 +0000 (19:22 +0300)]
appsrc: Add new max-buffers / max-time / current-level-buffers / current-level-time properties

These work the same way as the corresponding properties on queue and
allow to control the internal buffer size of the appsrc in a more
flexible way.

Unlike in queue the max-buffers and max-time properties are 0 (i.e.
disabled) by default for backwards compatibility reasons.

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

3 years agoUse gst_element_request_pad_simple...
François Laignel [Tue, 20 Apr 2021 17:53:01 +0000 (19:53 +0200)]
Use gst_element_request_pad_simple...

Instead of the deprecated gst_element_get_request_pad.

3 years agortp/hdrext: correct gst_rtp_get_header_extension_list() docs
Matthew Waters [Tue, 4 May 2021 05:38:18 +0000 (15:38 +1000)]
rtp/hdrext: correct gst_rtp_get_header_extension_list() docs

The return value is a list of GstElementFactory's that when
gst_element_factory_create()ed will create a GstRTPHeaderExtension.

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

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

3 years agoappsrc: Don't leak buffer list while wrongly unreffing buffer on EOS/flushing
Sebastian Dröge [Sun, 2 May 2021 17:45:01 +0000 (20:45 +0300)]
appsrc: Don't leak buffer list while wrongly unreffing buffer on EOS/flushing

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

3 years agoapp: Add gstappsrc.h to the enum headers in meson.build
Sebastian Dröge [Sun, 2 May 2021 17:45:36 +0000 (20:45 +0300)]
app: Add gstappsrc.h to the enum headers in meson.build

It's already indirectly included but let's better be explicit here.

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

3 years agogst-play: add --start-position command line argument
Stéphane Cerveau [Tue, 27 Apr 2021 08:30:15 +0000 (10:30 +0200)]
gst-play: add --start-position command line argument

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

3 years agovideotestsrc: Fix a leak when computing alpha caps
Nirbheek Chauhan [Fri, 30 Apr 2021 15:12:55 +0000 (20:42 +0530)]
videotestsrc: Fix a leak when computing alpha caps

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

3 years agoplayback-test: add window title
Stéphane Cerveau [Fri, 23 Apr 2021 12:45:07 +0000 (14:45 +0200)]
playback-test: add window title

If playbin mode, display the current uri

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

3 years agosdp/caps: support translating transport-cc rtcp-fb from caps to sdp attributes
Matthew Waters [Thu, 29 Apr 2021 11:16:10 +0000 (21:16 +1000)]
sdp/caps: support translating transport-cc rtcp-fb from caps to sdp attributes

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

3 years agortp: Fix request-extension signal call
Doug Nazar [Sun, 11 Apr 2021 22:43:06 +0000 (18:43 -0400)]
rtp: Fix request-extension signal call

Signal is registered as taking a guint however was being passed a
guint64 which fails on 32-bit.

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

3 years agoxvimagesink: Handle cropping when copying frames.
Víctor Manuel Jáquez Leal [Fri, 16 Apr 2021 16:10:38 +0000 (18:10 +0200)]
xvimagesink: Handle cropping when copying frames.

Cropping was not handled properly when frames have to be copied to
xvimage's buffer pool, first because the crop meta were dropped, and
second because the allocated frame size in xvimage's buffer pool were
smaller than the incoming frame.

This patch updates xvimagesink's video info when propose_allocation()
is called, and copies the GstVideoCropMeta from source frame to
destination one.

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

3 years agoxvimagesink: Delay pool creation until it's needed.
Víctor Manuel Jáquez Leal [Thu, 1 Apr 2021 13:30:41 +0000 (15:30 +0200)]
xvimagesink: Delay pool creation until it's needed.

Buffer pool is created every time setcaps() is called, but it's
required only when upstream doesn't use it, so it's only needed to
copy frames onto XV buffers.

This patch delay the creation of the buffer pool until it's frame copy
is required.

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

3 years agogl/download: add support for output memory:NVMM buffers
Matthew Waters [Wed, 17 Mar 2021 02:56:16 +0000 (13:56 +1100)]
gl/download: add support for output memory:NVMM buffers

Currently RGBA-only.

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

3 years agogl/bufferpool: add api for retrieving the configure gl allocation params
Matthew Waters [Wed, 17 Mar 2021 02:54:17 +0000 (13:54 +1100)]
gl/bufferpool: add api for retrieving the configure gl allocation params

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

3 years agoglupload: add support for uploading memory:NVMM buffers
Matthew Waters [Fri, 26 Feb 2021 07:48:09 +0000 (18:48 +1100)]
glupload: add support for uploading memory:NVMM buffers

Currently RGBA-only.

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

3 years agoglupload: guard against glEGLImageTexture2D not existing
Matthew Waters [Thu, 18 Mar 2021 03:20:34 +0000 (14:20 +1100)]
glupload: guard against glEGLImageTexture2D not existing

e.g. if targetting EGL/opengl, we would attempt to use this GLES
function when wrapping EGLImage's.

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

3 years agogstgl: Fix build when Meson >= 0.58.0rc1
Xavier Claessens [Mon, 26 Apr 2021 18:25:03 +0000 (14:25 -0400)]
gstgl: Fix build when Meson >= 0.58.0rc1

"implicit_include_directories: false" now also means that current build
directory is not added to include paths by default any more. We have to
add it manually because we have some custom_target() that generate
headers in current build directory.

See https://github.com/mesonbuild/meson/issues/8700.

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

3 years agoopengl: Silence macOS OpenGL deprecations
Doug Nazar [Fri, 23 Apr 2021 18:05:45 +0000 (14:05 -0400)]
opengl: Silence macOS OpenGL deprecations

As of macOS 10.14 the entire OpenGL system is deprecated. No need to
log the general warnings about it. Specific warnings are still enabled.

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

3 years agoplayback-test: fix seek crash
Stéphane Cerveau [Tue, 6 Apr 2021 12:55:39 +0000 (14:55 +0200)]
playback-test: fix seek crash

check that app->seek_format exists before seeking.

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

3 years agotcp: Rework client start error handling.
Doug Nazar [Wed, 21 Apr 2021 03:20:19 +0000 (23:20 -0400)]
tcp: Rework client start error handling.

Ensure errors are cleaned up properly at the right level.
Abort connection attempts if we're cancelled.

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

3 years agortpbasedepay: fix locking of GstRTPHeaderExtension
Jakub Adam [Wed, 21 Apr 2021 15:18:51 +0000 (17:18 +0200)]
rtpbasedepay: fix locking of GstRTPHeaderExtension

'ext' object unlocked if gst_rtp_header_extension_read() fails was never
locked in the first place.

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

3 years agovorbis: avoid duplicate symbols
Stéphane Cerveau [Wed, 21 Apr 2021 08:27:10 +0000 (10:27 +0200)]
vorbis: avoid duplicate symbols

Use TREMOR define to avoid duplicate symbols
of ivodebis and vorbis plugins when
static linking GStreamer.

Rearrange debug category init.

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

3 years agouridecodebin: Don't force floating reference for future reusable decodebin
Seungha Yang [Tue, 20 Apr 2021 17:05:36 +0000 (02:05 +0900)]
uridecodebin: Don't force floating reference for future reusable decodebin

uridecodebin assumes that refcount of decodebins stored in pending_decodebins
are floating but it might not be true in case that refcount of the decodebin
was touched in other places. To avoid the floating refcount issue,
hold strong reference.

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

3 years agouridecodebin: Use gst_object_ref instead of g_object_ref
Seungha Yang [Tue, 20 Apr 2021 17:02:48 +0000 (02:02 +0900)]
uridecodebin: Use gst_object_ref instead of g_object_ref

It's more debugging friendly (tracer for example)

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

3 years agogstvideoencoder: make sure the buffer is writable before modifying metadata
Jordan Petridis [Tue, 20 Apr 2021 08:06:09 +0000 (11:06 +0300)]
gstvideoencoder: make sure the buffer is writable before modifying metadata

Similar to ae8d0cf3acfaf79d8479647a55bd44b8453d07df

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

3 years agotcp: Convert tcpclientsink to new helpers.
Doug Nazar [Mon, 19 Apr 2021 19:54:18 +0000 (15:54 -0400)]
tcp: Convert tcpclientsink to new helpers.

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

3 years agotcp: Convert tcpclientsrc to new helpers.
Doug Nazar [Mon, 19 Apr 2021 19:54:04 +0000 (15:54 -0400)]
tcp: Convert tcpclientsrc to new helpers.

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

3 years agotcp: Convert tcpserversink to new helpers.
Doug Nazar [Mon, 19 Apr 2021 19:53:36 +0000 (15:53 -0400)]
tcp: Convert tcpserversink to new helpers.

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

3 years agotcp: Convert tcpserversrc to new helpers.
Doug Nazar [Mon, 19 Apr 2021 19:52:35 +0000 (15:52 -0400)]
tcp: Convert tcpserversrc to new helpers.

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

3 years agotcp: Add helper functions to lookup hostnames and create sockets.
Doug Nazar [Mon, 19 Apr 2021 19:48:18 +0000 (15:48 -0400)]
tcp: Add helper functions to lookup hostnames and create sockets.

Lookup will now maintain the full list of possible IP address(es).
We can now iterate over all available addresses in case certain
address families (IPv6) are disabled or try connecting to additional
addresses for the clients.

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

3 years agotests/tcp: Fail if unable to start pipelines.
Doug Nazar [Mon, 19 Apr 2021 15:53:10 +0000 (11:53 -0400)]
tests/tcp: Fail if unable to start pipelines.

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

3 years agotcp: cleanup files
Doug Nazar [Mon, 19 Apr 2021 17:22:16 +0000 (13:22 -0400)]
tcp: cleanup files

consolidate gsttcp.h & gsttcpelements.h
rename gsttcpelement.c to match header

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

3 years agovideodecoder: use DTS if PTS unknown
Stéphane Cerveau [Mon, 19 Apr 2021 11:28:39 +0000 (13:28 +0200)]
videodecoder: use DTS if PTS unknown

The buffer should be set according to DTS if exists
when we are guessin the PTS instead of segment start.
The decoder can receive buffers which are before the segment
in case of seek for example.

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

3 years agoDrop `@` documentation references from functions and external types
Marijn Suijten [Tue, 30 Mar 2021 09:18:17 +0000 (11:18 +0200)]
Drop `@` documentation references from functions and external types

`@` references are used to reference function parameters, struct members
or enum variants _within_ the current type/function.  It cannot and
should not be used to reference to types outside that.

Since C has no notion of member functions it makes little sense to
prefix these with `@`; most of the documentation here was referencing
functions on _different_ types anyway.

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

3 years agoplaybin{2,3}: fix base_time selection when flush seeking live
Mathieu Duponchelle [Mon, 12 Apr 2021 12:02:46 +0000 (14:02 +0200)]
playbin{2,3}: fix base_time selection when flush seeking live

This is a direct translation of
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/429>,
as playbin{2,3} insulates its sub groups state changes from the pipeline
base class, it needs to track whether the subgroup is live itself,
and handle RESET_TIME the same way GstPipeline does.

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

3 years agooverlaycomposition: Fix test for big endian.
Doug Nazar [Sun, 11 Apr 2021 18:29:30 +0000 (14:29 -0400)]
overlaycomposition: Fix test for big endian.

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

3 years agogl: fix up Since markers for newly-added _get_type() functions
Tim-Philipp Müller [Sun, 11 Apr 2021 22:42:13 +0000 (23:42 +0100)]
gl: fix up Since markers for newly-added _get_type() functions

Follow-up to !999 which wasn't backported into 1.18 in the end
after all.

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

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

3 years agogstgiobasesink: Handle incomplete writes in gst_gio_base_sink_render()
Robin Burchell [Tue, 6 Apr 2021 11:22:15 +0000 (13:22 +0200)]
gstgiobasesink: Handle incomplete writes in gst_gio_base_sink_render()

As the comment asked, yes, incomplete writes can happen.
I have encountered this with an sshfs mount, for example.

It seems like g_output_stream_write_all() is designed to handle this case,
by not returning until the requested buffer has been completely written,
or an error occurs, which seems to match up with the desired behaviour.

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

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

3 years agoclockoverlay: Fix broken string formatting by strftime() on Windows
Seungha Yang [Sun, 4 Apr 2021 15:34:21 +0000 (00:34 +0900)]
clockoverlay: Fix broken string formatting by strftime() on Windows

Like other foobarA variant APIs on Windows, formatted string
by strftime() is ANSI string, not unicode encoded one.
It would be problematic for non-english locale systems.
We should use unicode version API (wcsftime in this case)
whenever it's possible on Windows.

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

3 years agoaudio/alsa: Exit write loop if underlying device is already paused.
Doug Nazar [Wed, 7 Apr 2021 08:25:47 +0000 (04:25 -0400)]
audio/alsa: Exit write loop if underlying device is already paused.

If the alsasink thread starts the write loop but another thread pauses
the underlying alsa device, the sink thread will endlessly loop.

snd_pcm_writei() will return 0 if the state is SND_PCM_STATE_PAUSED
and the loop will never make any progress.

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

3 years agomeson: Fix gstreamer-gl-prototypes-1.0.pc
Xavier Claessens [Wed, 7 Apr 2021 12:28:40 +0000 (08:28 -0400)]
meson: Fix gstreamer-gl-prototypes-1.0.pc

This fix a warning because we were generating 2 pc files for gstgl
library. Also fix missing glesv2 in Requires.

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

3 years agocodec-utils: properly determine AAC Level
Matej Knopp [Mon, 1 Jun 2020 10:45:36 +0000 (12:45 +0200)]
codec-utils: properly determine AAC Level

Table 1.10 – "Levels for the AAC Profile" only goes to 5 max channels
/ 7 max channel post amendmend, so I assume the number of channels
should not include LFE, otherwise there's no valid level for 5.1 resp.
7.1 (post amendmend)

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

3 years agoFix build issue on MinGW64
Binh Truong [Sun, 4 Apr 2021 14:18:59 +0000 (21:18 +0700)]
Fix build issue on MinGW64

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

3 years agortpbuffer: make sure header extension buffer is initialized
Jakub Adam [Thu, 18 Mar 2021 19:13:21 +0000 (20:13 +0100)]
rtpbuffer: make sure header extension buffer is initialized

Based upon valgrind finding:

Conditional jump or move depends on uninitialised value(s)
   at 0x4AFF589: read_rtp_header_extensions (gstrtpbasedepayload.c:1197)
   by 0x4AFF9E5: gst_rtp_base_depayload_set_headers
(gstrtpbasedepayload.c:1298)
   by 0x4AFFEE0: gst_rtp_base_depayload_do_push
(gstrtpbasedepayload.c:1413)
   by 0x4AFFF53: gst_rtp_base_depayload_push
(gstrtpbasedepayload.c:1448)
   by 0x4AFDEBA: gst_rtp_base_depayload_handle_buffer
(gstrtpbasedepayload.c:801)
   by 0x4AFE41E: gst_rtp_base_depayload_chain_list
(gstrtpbasedepayload.c:899)
   by 0x48F262C: gst_pad_chain_data_unchecked (gstpad.c:4414)
   by 0x48F3333: gst_pad_push_data (gstpad.c:4655)
   by 0x48F3DF8: gst_pad_push_list (gstpad.c:4814)
   by 0x4AFAD87: gst_rtp_base_payload_push_list
(gstrtpbasepayload.c:1978)
   by 0x72B3154: gst_rtp_vp8_pay_handle_buffer (gstrtpvp8pay.c:672)
   by 0x4AF7031: gst_rtp_base_payload_chain (gstrtpbasepayload.c:868)
 Uninitialised value was created by a heap allocation
   at 0x483C77F: malloc (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4B8BA78: g_malloc (gmem.c:106)
   by 0x4BA3A9D: g_slice_alloc (gslice.c:1069)
   by 0x488D777: _sysmem_new_block (gstallocator.c:413)
   by 0x488DB28: default_alloc (gstallocator.c:512)
   by 0x488D3E8: gst_allocator_alloc (gstallocator.c:310)
   by 0x4AE97E3: gst_rtp_buffer_set_extension_data (gstrtpbuffer.c:856)
   by 0x4AF9EC6: set_headers (gstrtpbasepayload.c:1757)
   by 0x489FE4D: gst_buffer_list_foreach (gstbufferlist.c:287)
   by 0x4AFA87A: gst_rtp_base_payload_prepare_push
(gstrtpbasepayload.c:1915)
   by 0x4AFAD06: gst_rtp_base_payload_push_list
(gstrtpbasepayload.c:1970)
   by 0x72B3154: gst_rtp_vp8_pay_handle_buffer (gstrtpvp8pay.c:672)

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

3 years agotypefind: use new gst_type_find_suggest_empty_simple()
Chris White [Fri, 2 Apr 2021 01:44:10 +0000 (21:44 -0400)]
typefind: use new gst_type_find_suggest_empty_simple()

gst_type_find_suggest_simple() now requires a NULL terminator.
Use the new, simpler API for no-parameter calls.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/774#note_861492

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

3 years agovideoaggregator: allow selecting an alpha output from non-alpha inputs
Matthew Waters [Wed, 3 Mar 2021 07:28:54 +0000 (18:28 +1100)]
videoaggregator: allow selecting an alpha output from non-alpha inputs

e.g. if we have:

video-x/raw,format=I420 ! compositor ! video/x-raw,format=BGRA

This will currently produce a warning as the alpha-ness of the chosen
'best' format (I420) will be different from the value restricted by the
downstream caps filter.

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

3 years agoxvimage: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:10:12 +0000 (14:10 +0200)]
xvimage: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

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

3 years agoximage: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:09:16 +0000 (14:09 +0200)]
ximage: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

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

3 years agoaudiotestsrc: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:07:00 +0000 (14:07 +0200)]
audiotestsrc: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

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

3 years agoaudioresample: allow per feature registration
Stéphane Cerveau [Mon, 29 Mar 2021 12:06:30 +0000 (14:06 +0200)]
audioresample: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

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