Commit graph

20922 commits

Author SHA1 Message Date
Seungha Yang
058f1e92b7 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>
2021-06-29 23:06:37 +09:00
Seungha Yang
2551b1d976 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>
2021-06-29 18:00:43 +09:00
Jakub Adam
556ce36ce4 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>
2021-06-28 19:28:41 +02:00
Jakub Adam
d294d7da36 rtpbuffer: Add gst_rtp_buffer_remove_extension_data()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1173>
2021-06-28 19:28:41 +02:00
Jakub Adam
e2e9e321f6 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>
2021-06-28 19:07:44 +02:00
Olivier Crête
b4caa6cbdd 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>
2021-06-28 18:07:56 +03:00
Olivier Crête
0adc6ccc01 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>
2021-06-26 12:50:58 -04:00
Jan Schmidt
8c04f4bdae 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>
2021-06-26 04:00:08 +00:00
Jan Alexander Steffens (heftig)
ef324fa068 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>
2021-06-25 13:55:39 +00:00
Jan Alexander Steffens (heftig)
b835356d6c 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>
2021-06-25 13:55:39 +00:00
Seungha Yang
f8dc833975 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>
2021-06-25 10:30:35 +00:00
Per Förlin
30f88aa7c8 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>
2021-06-24 06:10:19 +00:00
Nicolas Dufresne
be6793d0d1 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>
2021-06-23 20:31:06 +00:00
Matthew Waters
0ac4fda2d6 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>
2021-06-23 05:09:41 +00:00
Sergei Kovalev
ba4f031864 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>
2021-06-21 15:58:01 +00:00
Corentin Damman
e5382fe84c Update COPYING
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1207>
2021-06-21 09:28:04 +00:00
Matthew Waters
aa8b27d45a 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>
2021-06-21 08:02:31 +00:00
François Laignel
973f0bf552 Check mandatory ClockTime arguments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1205>
2021-06-16 14:52:38 +00:00
Scott Moreau
885c1c605b 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>
2021-06-11 09:31:58 -06:00
Haihua Hu
58f4217468 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:        b887db1efe
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>
2021-06-11 04:52:40 +00:00
Nicolas Dufresne
025a14e7fe 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>
2021-06-10 12:41:31 -04:00
Nicolas Dufresne
0661b15957 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>
2021-06-10 12:39:34 -04:00
Sebastian Dröge
1565b9635b 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>
2021-06-08 17:31:02 +03:00
Sebastian Dröge
0b9976ac46 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>
2021-06-08 13:05:46 +03:00
Mathieu Duponchelle
d1fa109083 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>
2021-06-05 16:55:44 +02:00
Marijn Suijten
ed6c970d9c rtp/header: Add missing array length annotation to read/write methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1190>
2021-06-03 21:14:42 +02:00
Sebastian Dröge
c18dd84f79 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>
2021-06-03 14:00:54 +03:00
Matthew Waters
3bbcfe9c23 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>
2021-06-03 15:58:39 +10:00
Matthew Waters
f647840685 gl/stereo: fix a coupld of caps leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1187>
2021-06-03 15:58:38 +10:00
Matthew Waters
33c60bdbf9 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>
2021-06-03 02:58:10 +00:00
Tim-Philipp Müller
577dabf7b1 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>
2021-06-02 14:21:02 +00:00
Tim-Philipp Müller
eb47c5aa2d Back to development 2021-06-01 15:28:24 +01:00
Tim-Philipp Müller
36a01da1f8 Release 1.19.1 2021-06-01 00:09:55 +01:00
Nicolas Dufresne
cd31689ced 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>
2021-05-31 13:17:37 +00:00
Daniel Knobe
7641d64825 rawbaseparse: check destination format correctly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1181>
2021-05-31 09:14:53 +02:00
Olivier Crête
78e7612eb0 audiomixer: Add test for discont going backwards
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1180>
2021-05-27 16:33:00 -04:00
Olivier Crête
fd73fd05ca 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>
2021-05-27 16:33:00 -04:00
Seungha Yang
5ad59ce725 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>
2021-05-27 07:51:48 +00:00
Marijn Suijten
9a502c15c6 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>
2021-05-26 23:35:16 +02:00
Tim-Philipp Müller
e539f0cd67 Use new gst_buffer_new_memdup()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1170>
2021-05-26 11:46:27 +00:00
Sebastian Dröge
0b6cd6862e 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>
2021-05-24 14:28:49 +03:00
Nicolas Dufresne
07fe3289bc doc: Update cache for AV12 pixel format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
2021-05-21 21:16:24 -04:00
Nicolas Dufresne
0df31ae9d4 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>
2021-05-21 21:16:24 -04:00
Daniel Almeida
3a3385f35c 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>
2021-05-21 21:16:24 -04:00
Daniel Almeida
6760c7fd76 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>
2021-05-21 21:16:24 -04:00
Daniel Almeida
038ba1bffe 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>
2021-05-21 21:16:24 -04:00
Thibault Saunier
4188959a79 tests: Update expectation files with sorted structure fields 2021-05-21 17:10:07 -04:00
Thibault Saunier
d77d5669d4 meson: Fix the name of the sdp_deps variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1167>
2021-05-21 18:54:22 +00:00
Matthew Waters
512160a1c8 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>
2021-05-21 14:12:11 +10:00
Matthew Waters
f8510ae3c8 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>
2021-05-21 14:12:11 +10:00