platform/upstream/gst-plugins-base.git
2 years agoaudio aggregator: Post QoS message when dropping audio
Olivier Crête [Wed, 26 May 2021 14:38:18 +0000 (10:38 -0400)]
audio aggregator: Post QoS message when dropping audio

Post a QoS message every time some audio samples are dropped.
Also print log messages to make it easier to debug

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

2 years agoaudio aggregator: Count samples that are dropped or processed
Olivier Crête [Tue, 25 May 2021 22:05:05 +0000 (18:05 -0400)]
audio aggregator: Count samples that are dropped or processed

Keep a count of samples that are dropped or processed as statistics

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

2 years agoaudio aggregator: Add QoS property to pad
Olivier Crête [Fri, 21 May 2021 20:16:50 +0000 (16:16 -0400)]
audio aggregator: Add QoS property to pad

Add a property to emit a QoS message whenever any data is dropped.

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

2 years agoaudio aggregator: Rename property enum to match class name
Olivier Crête [Fri, 21 May 2021 20:10:06 +0000 (16:10 -0400)]
audio aggregator: Rename property enum to match class name

Add "CONVERT" into the property enum as we're going to add an
enum specifically for the base pad.

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

2 years agovideodecoder: add API to receive subframes
Stéphane Cerveau [Tue, 24 Sep 2019 15:14:10 +0000 (17:14 +0200)]
videodecoder: add API to receive subframes

A video decoder can now receive subframes and start decoding
instead of waiting for the full frame to be complete.
Subframe support will reduce latency as described in the
video encoder base class.

A unit test illustrating this API is available in
tests/check/libs/videodecoder.c.

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

2 years agogl/context/wgl: Add missing NULL init
Seungha Yang [Sat, 3 Jul 2021 10:36:06 +0000 (19:36 +0900)]
gl/context/wgl: Add missing NULL init

The value of uninitialized local variable is varying depending
on compiler and not guaranteed to be NULL initialized.
That results in pointing random address instead of expected function pointer.

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

2 years agovideotestsrc: Add SMPTE75 RP-219 color bars conformant
Francisco Javier Velázquez-García [Fri, 12 Mar 2021 12:55:38 +0000 (13:55 +0100)]
videotestsrc: Add SMPTE75 RP-219 color bars conformant

Implement 8-bit values of SMPTE RP 2019-1:2014.  The bar widths and
heights are the result of fractions as integers.  The remainders of
widths are distributed in a way that they match the values in Table
C.1 (a) in the specification.

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

2 years agovideotestsrc: Add a start parameter to _blend_line
Jan Alexander Steffens (heftig) [Fri, 12 Mar 2021 19:58:40 +0000 (20:58 +0100)]
videotestsrc: Add a start parameter to _blend_line

Makes it easier to paint part of a line.

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

2 years agovideotestsrc: Keep tmpline unchanged in_convert_tmpline
Jan Alexander Steffens (heftig) [Fri, 12 Mar 2021 19:57:13 +0000 (20:57 +0100)]
videotestsrc: Keep tmpline unchanged in_convert_tmpline

This will allow us to repeatedly
call it to render subsequent lines.

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

2 years agoappsink: fix incorrect return nullability
Michael de Gans [Tue, 15 Jun 2021 20:22:55 +0000 (13:22 -0700)]
appsink: fix incorrect return nullability

This commit fixes the annoations for return nullability on several
GstAppSink functions. This was causing bindings to be generated
incorrectly.

Fixes #914

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

2 years agocompositor: Add scaling policy to support PAR-aware scaling
Seungha Yang [Wed, 19 May 2021 07:22:46 +0000 (16:22 +0900)]
compositor: Add scaling policy to support PAR-aware scaling

Adding "sizing-policy" property for user to be able to specify
scaling policy (aspect-ratio for example).
At the moment, supported mode is only keep-aspect-ratio, but we might
be able to add more policies such as cropping, etc.

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

2 years agovideo: Deprecate gst_video_sink_center_rect()
Seungha Yang [Wed, 19 May 2021 11:11:15 +0000 (20:11 +0900)]
video: Deprecate gst_video_sink_center_rect()

... and add gst_video_center_rect() method as a replacement.
The method is useful for outside of videosink subclasses as well
but the old naming might be able to mislead people.

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

2 years agortpbasepayload: don't write empty extension header
Jakub Adam [Mon, 24 May 2021 17:11:51 +0000 (19:11 +0200)]
rtpbasepayload: don't write empty extension header

When some header extensions are present but none decides to write any
data to the currently processed RTP buffer, remove the extension data
section.

Resulting RTP buffer wasn't formatted correctly.

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

2 years agortpbuffer: Add gst_rtp_buffer_remove_extension_data()
Jakub Adam [Mon, 24 May 2021 17:02:42 +0000 (19:02 +0200)]
rtpbuffer: Add gst_rtp_buffer_remove_extension_data()

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

2 years agortpbasepayload: map RTP buffer READWRITE when setting headers
Jakub Adam [Mon, 24 May 2021 17:01:24 +0000 (19:01 +0200)]
rtpbasepayload: map RTP buffer READWRITE when setting headers

GstRTPHeaderExtension::write can map the RTP buffer for reading. If that
happens on a buffer that is already mapped WRITE-only by the payloader,
the payloader's mapping gets invalidated (GstRTPBuffer::map will point
to a different instance of GstMemory).

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

2 years agortphdrext: Make all fields private
Olivier Crête [Thu, 24 Jun 2021 18:56:11 +0000 (14:56 -0400)]
rtphdrext: Make all fields private

The presence of a method and a field with the same name confuses the C#
binding generator. As there are accessor functions for all the fields,
let's just make them private.

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

2 years agogst: don't use volatile to mean atomic
Olivier Crête [Sat, 26 Jun 2021 16:50:58 +0000 (12:50 -0400)]
gst: don't use volatile to mean atomic

volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in gst-plugins-good#868

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

2 years agovideo-converter: Set up matrix tables only once.
Jan Schmidt [Fri, 25 Jun 2021 13:42:34 +0000 (23:42 +1000)]
video-converter: Set up matrix tables only once.

When configuring a multi-thread converter, only allocate the
shared colour conversion matrices once for the first thread,
to avoid allocating multiple times and leaking memory.

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

2 years agovideo-converter: Set up gamma tables only once
Jan Alexander Steffens (heftig) [Thu, 6 May 2021 17:01:41 +0000 (19:01 +0200)]
video-converter: Set up gamma tables only once

When the video converter is using multiple threads, the gamma tables
were created multiple times, leaking the tables set up for the previous
thread.

Only calculate the tables once.

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

2 years agoaudio-converter: Free config when gst_audio_converter_new fails
Jan Alexander Steffens (heftig) [Thu, 6 May 2021 16:22:45 +0000 (18:22 +0200)]
audio-converter: Free config when gst_audio_converter_new fails

The config got leaked when parameter validation fails.

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

2 years agoglprototypes: Add GST_GL_API_OPENGL to available version of sync
Seungha Yang [Fri, 25 Jun 2021 06:24:21 +0000 (15:24 +0900)]
glprototypes: Add GST_GL_API_OPENGL to available version of sync

Make sync APIs usable if supported, even when GST_GL_API_OPENGL3 is
not selected

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

2 years agogstrtspconnection: Add IPv6 support for tunneled mode
Per Förlin [Fri, 23 Apr 2021 16:03:20 +0000 (18:03 +0200)]
gstrtspconnection: Add IPv6 support for tunneled mode

An IPv6 address must be specified within [] brackets.
Add brackets for IPv6 address used for tunneled mode,
for non-tunneled this is already supported.

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

2 years agovideodecoder: Call drain() rather then finish() on segment-done
Nicolas Dufresne [Wed, 16 Jun 2021 18:49:14 +0000 (14:49 -0400)]
videodecoder: Call drain() rather then finish() on segment-done

The finish() virtual function documentation state that "Sub-classes can refuse
to decode new data after." Though, it is very common to issue a non-flushing
seek after that event in gapless playback uses case. This fixes potential
stalls with code using segment seeks, by using drain() virtual funciton
instead.

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

2 years agooggdemux: fix a race in push mode when performing the duration seek
Matthew Waters [Tue, 8 Jun 2021 04:55:36 +0000 (14:55 +1000)]
oggdemux: fix a race in push mode when performing the duration seek

There may be two or more threads involved here however the important
interaction is the use of ogg->seeK_event_drop_till value that was only
set in the push-mode seek-event thread and could race with upstream
sending e.g. and EOS (or data).

Scenario is this:
1. oggdemux performs a seek to near the end of the file to try and find
   the duration. ogg->push_state is set to PUSH_DURATION.
2. Seek is picked up by the dedicated seek event thread and sets
   ogg->seek_event_drop_till to the seek event's seqnum.
3. Most operations are blocked or dropped waiting on the duration to
   be determined and processing continues until a duration is found.
4. Two branching options for how this ultimately plays out
4a. The source is too fast and we receive an EOS event which is dropped
    because ogg->push_state == PUSH_DURATION.  In this case everything
    works.
4b. We hit our 'almost at the end' check in
    gst_ogg_pad_handle_push_mode_state() and attempt to seek back to the
    beginning (or to a user-provided seek).  This seek is marshalled to
    the seek event thread without setting ogg->seek_event_drop_till but
    with change ogg->push_state = PUSH_PLAYING.  If an EOS event or
    e.g. buffers arrive from upstream before the seek event thread has
    picked up the seek event, then the EOS/data is processed as if it
    came as a result of the seek event.  This is the case that fails.

The fix is two-fold:
1. Preemptively set ogg->seek_event_drop_till when setting the seek
   event so that data and other events can be dropped correctly.
2. In addition to dropping and EOS events while ogg->push_state ==
   PUSH_DURATION, also drop any EOS events that are received before the
   seek event has been processed by also tracking the seqnum of the seek.

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

2 years agoaudiobasesink: Fix of double lock release
Sergei Kovalev [Mon, 21 Jun 2021 14:06:14 +0000 (14:06 +0000)]
audiobasesink: Fix of double lock release

Add missing "return;" which prevents double lock release.

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

2 years agoUpdate COPYING
Corentin Damman [Mon, 21 Jun 2021 08:34:07 +0000 (08:34 +0000)]
Update COPYING

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

2 years agogl/context: fill a GError on platform-specific fill_info() error
Matthew Waters [Wed, 16 Jun 2021 05:55:49 +0000 (15:55 +1000)]
gl/context: fill a GError on platform-specific fill_info() error

Fixes bindings assuming that GError is always set on error:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809#note_957493
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809#note_957494
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809#note_957498

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

2 years agoCheck mandatory ClockTime arguments
François Laignel [Wed, 16 Jun 2021 10:13:21 +0000 (12:13 +0200)]
Check mandatory ClockTime arguments

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

2 years agogl/wayland: Use consistent wl_display when creating work queue for proxy wrapper
Scott Moreau [Fri, 11 Jun 2021 15:27:46 +0000 (09:27 -0600)]
gl/wayland: Use consistent wl_display when creating work queue for proxy wrapper

Without this, glimagesink since wayland 727c7903 fails with
gst-launch-1.0: ../src/wayland-client.c:2181: wl_proxy_set_queue:
Assertion 'proxy->display == queue->display' failed.

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

2 years agogl/viv-fb: fix gl plugin hang when run with viv-fb backend
Haihua Hu [Mon, 7 Jun 2021 09:54:46 +0000 (17:54 +0800)]
gl/viv-fb: fix gl plugin hang when run with viv-fb backend

below commit change the window resize thread and cause viv-fb backend
hang, need move resize code after window->open is called. Otherwise,
the resize message will send to a thread that not start running and
window resize call will waiting forever.

Commit:        b887db1efe816c0c28b60a6842fa9005a26c1502
glwindow: fix racy resize updates

Take locks around resize handling and marshall all resizes to the
windowing thread by default.

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

2 years agoeglimage: Add AV12 DMABuf import support
Nicolas Dufresne [Thu, 10 Jun 2021 16:41:31 +0000 (12:41 -0400)]
eglimage: Add AV12 DMABuf import support

The per plane format mapping for AV12 was missing, which would force
raw upload.

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

2 years agoeglimage: Fix wrong stride when importing DMABuf
Nicolas Dufresne [Thu, 10 Jun 2021 16:39:34 +0000 (12:39 -0400)]
eglimage: Fix wrong stride when importing DMABuf

When the code was ported to use component index instead of plane
index, the call to GST_VIDEO_INFO_PLANE_STRIDE() was accidently ported
to use component index, but this macro takes a plane index.

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

2 years agoappsrc: When dropping buffers before handling the initial segment use the latest...
Sebastian Dröge [Tue, 8 Jun 2021 14:27:55 +0000 (17:27 +0300)]
appsrc: When dropping buffers before handling the initial segment use the latest input segment

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

2 years agoappsrc: Correctly check if this is the first buffer that was queued
Sebastian Dröge [Tue, 8 Jun 2021 10:05:46 +0000 (13:05 +0300)]
appsrc: Correctly check if this is the first buffer that was queued

By checking the queue length this would also count events and caps. We
already keep track of the number of buffers separately so just use that.

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

2 years agoappsrc: signal enough-data even when leaking
Mathieu Duponchelle [Sat, 5 Jun 2021 00:35:30 +0000 (02:35 +0200)]
appsrc: signal enough-data even when leaking

this is convenient for application that wish to monitor whether
the appsrc is leaking.

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

2 years agortp/header: Add missing `array length` annotation to read/write methods
Marijn Suijten [Thu, 3 Jun 2021 19:14:42 +0000 (21:14 +0200)]
rtp/header: Add missing `array length` annotation to read/write methods

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

2 years agovideo: Sort video formats correctly
Sebastian Dröge [Thu, 3 Jun 2021 10:40:33 +0000 (13:40 +0300)]
video: Sort video formats correctly

AV12 should be right after A420 because it is the same format with just
one plane less, instead of being next to I420/NV12 which don't have an
alpha channel.

RGBP should be before GBR because it's the same format except for the
more canonical component order.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/790
which actually checks on the CI if the algorithm defined in
video-format.h is implemented correctly.

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

2 years agoglvideomixer: hold extra pad ref while calling parent
Matthew Waters [Thu, 3 Jun 2021 05:57:39 +0000 (15:57 +1000)]
glvideomixer: hold extra pad ref while calling parent

Our subsequent cleanup needs a ref on the pad and calling the parent may
release the last reference and could cause a use-after-free.

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

2 years agogl/stereo: fix a coupld of caps leaks
Matthew Waters [Thu, 3 Jun 2021 05:57:17 +0000 (15:57 +1000)]
gl/stereo: fix a coupld of caps leaks

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

2 years agogl/display: remove choosing egl fallback from GST_GL_PLATFORM
Matthew Waters [Sat, 22 May 2021 05:42:17 +0000 (15:42 +1000)]
gl/display: remove choosing egl fallback from GST_GL_PLATFORM

If GST_GL_WINDOW is unset but GST_GL_PLATFORM=egl, then we were choosing
to create an GstGLDisplayEGL directly instead of going through the any
more specific windowing system implementation (X11, Wayland).

The 'create an GstGLDisplayEGL when GST_GL_PLATFORM=egl' was a fallback
as we did not have entries for all EGL-using window systems previously.
Now that we do, the fallback can be removed.  An EGLDisplay can still
be created by setting GST_GL_WINDOW=egl or as one option.

Fixup of https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1154

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

3 years agoUse g_memdup2() where available and add fallback for older GLib versions
Tim-Philipp Müller [Sun, 23 May 2021 22:51:27 +0000 (23:51 +0100)]
Use g_memdup2() where available and add fallback for older GLib versions

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

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

3 years agoBack to development
Tim-Philipp Müller [Tue, 1 Jun 2021 14:28:24 +0000 (15:28 +0100)]
Back to development

3 years agoRelease 1.19.1
Tim-Philipp Müller [Mon, 31 May 2021 23:09:54 +0000 (00:09 +0100)]
Release 1.19.1

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>