Commit graph

98 commits

Author SHA1 Message Date
Thibault Saunier
41f8276c2b glvideomixer: Handle pads which have no caps set on mouse events
And directly use the pad vinfo instead of getting current caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6265>
2024-05-05 12:37:05 +00:00
Shengqi Yu
a92167ea6e glmixer: Add GL_SYNC_META option to bufferpool
when pipline is
glvideomixerelement->glcolorconvertelement->gldownloadelement and
glcolorconvertelement is not passthrough, the gl bufferpool between
glvideomixerelement and glcolorconvertelement will not add gl sync meta
during allocating buffer. This will cause that glcolorconvert's inbuf
has no sync meta to wait for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6756>
2024-04-29 19:15:39 +00:00
Matthew Waters
3f29c897f8 glimagesink: avoid a possible critical on shutdown
It is possible that the close callback can be called after glimagesink
is changing state to NULL.  Protect against that by taking the glimagesink
lock and some NULL checking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6504>
2024-04-02 23:50:41 +00:00
Matthew Waters
d9b563e9b2 glimagesink: unref the potential last ref outside of the glimagesink lock
Avoids a deadlock between the state change removing the last ref and
the destructer calling the window's on_close handler and trying to
take the glimagesink lock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6504>
2024-04-02 23:50:41 +00:00
Sebastian Dröge
e690b53d05 theoradec: Remove mis-leading and redundant uncropped_info
It's actually the cropped info, and equivalent to the info that is
already stored as part of the output state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6203>
2024-02-23 15:03:35 +00:00
Sebastian Dröge
43fb350c42 theoradec: Don't leak input state if a second type packet is received
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6203>
2024-02-23 15:03:35 +00:00
Sebastian Dröge
be4388c249 theoradec: Don't overwrite width/height of the input state
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6203>
2024-02-23 15:03:35 +00:00
Sebastian Dröge
ee06666507 theoradec: Don't use custom allocation logic and always crop locally
All video frames have to be copied from libtheora's memory to the output
frame anyway, so we can as well do the cropping here directly instead of
copying the full frames and having downstream do the cropping.

This reduces the complexity of the code considerably, and among other
things gets rid of a bug related to buffer pool configuration.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2612

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6203>
2024-02-23 15:03:35 +00:00
Jan Schmidt
aadefa8aca glvideoflip: fix setting of method property at construction time
A port of the same fix that
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4536
did for the non-GL videoflip element

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3245

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5966>
2024-01-29 18:00:21 +00:00
Robert Mader
7495db8855 gl: colorbalance: Add DMA_DRM passthrough support
By adding them to additional caps that are only supported in passthrough
mode. They get filtered out otherwise.

This can easily extended to support other caps later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5948>
2024-01-25 20:39:37 +00:00
Tim-Philipp Müller
ceed3f9914 glimagesink: fix typo in docs
Fixes #3233

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5942>
2024-01-19 07:41:48 +00:00
Damian Hobson-Garcia
fe64e68cc4 gloverlay: Apply updated overlay coordinates correctly
When overlay coordinates are updated, after the initial coordinates
are set, the shader indices are applied to the wrong buffer, resulting
in the background image appearing where the overlay should.

Bind the array buffer before applying subsequent coordinate
updates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5901>
2024-01-11 01:53:16 +00:00
Hosang Lee
2afe7cb97e glstereomix: Fix typo
Fix typo in example. vid -> video

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5685>
2023-11-17 04:42:32 +00:00
Piotr Brzeziński
49865826b0 basetextoverlay: Fix overlay never rendering again if width reaches 1px
If text width ever reached 1px, for example after resizing the output window, the overlay would stop rendering
and never return again. The 1px condition itself does not seem to make much sense here anyway.

This was a chain of events: width reached 1, so the composition was set to NULL. Then, after resizing the output window,
push_frame() was called but would not attempt to renegotiate because composition is NULL. This caused the width/height
to never be updated again, as that only happens during negotiation, so the overlay was gone for good.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5614>
2023-11-08 11:19:39 +00:00
Jordan Petridis
f87d499aaf cdparanoia: Ignore discarded-qualifiers coming from the header (again)
Followup to 75872c802b , clang version

While we ignore `discarded-qualifiers` already for gcc, clang seems
to assign this error to `incompatible-pointer-types-discards-qualifiers`
so we need to ignore that as well.

```
In file included from \
../subprojects/gst-plugins-base/ext/cdparanoia/gstcdparanoiasrc.h:37: \
/usr/include/cdda/cdda_interface.h:164:3: error: initializing 'char *' with an expression \
of type 'const char [8]' discards qualifiers [-Werror, \
-Wincompatible-pointer-types-discards-qualifiers]
  "Success",
  ^~~~~~~~~
```

See 75872c802b for more

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5474>
2023-10-21 23:30:38 +00:00
He Junyan
ea35adc55f gl: upload: Implement the fixate_caps virtual function
We now prefer the 2D target than other targets when fixating src caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5468>
2023-10-18 19:56:30 +00:00
Philippe Normand
ce7b2af414 glsinkbin: Check sink property exists before attempting to read it
The same is done in the set_property function. This was noticed when attempting
to dump a pipeline containing glsinkbin sink=gtk4paintablesink to dot format.
Critical warnings were raised due to the missing force-aspect-ratio property on
that sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5311>
2023-09-11 07:36:21 +00:00
Matthew Waters
9d867356df gl/bufferpool: add configuration to extend buffer lifetime before reuse
Fixes a potential GPU stall if an immediately freed texture/buffer is
attempted to be reused immediately by the CPU, e.g. when uploading.

Problematic scenario is this:
1. element does GPU processing reading from texture
2. frees the buffer back to the pool
3. pool acquire returns the just released buffer
4. GPU processing then has to wait for the previous GPU operation to
   complete causing a stall

If there was a reliable way to know whether a buffer had been finished
with across all GPU drivers, we would use it.  However as that does not
exist, this workaround is to keep the released buffer unusable until the
next released buffer.

This is the same approach as is used in the qml (Qt5) elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5144>
2023-08-31 01:24:38 +00:00
Carlos Rafael Giani
fd25e24217 alsa: Add support for DSD audio
Code is partially based on the DSD of Robert Tiemann <rtie@gmx.de>:
https://gitlab.freedesktop.org/rtiemann/gstreamer/-/tree/dsd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3901>
2023-06-23 01:27:04 +00:00
Xavier Claessens
b687e19e10 opus: Fix crash when getting unexpected channel position
gst_opus_channel_names is a static array with only 13 items.
GstAudioChannelPosition have bigger values than that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4798>
2023-06-12 20:00:52 +00:00
William Manley
04bcff4dce basetextoverlay: Fix typo in "text-y" property description
Looks like a copy and paste error.

Co-authored-by: Fabian Orccon <cfoch.fabian@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4823>
2023-06-10 16:52:29 +00:00
Matthew Waters
b291efe44b gldownload: handle passthrough without a critical
With passthrough mode, gldownload/glbasefilter may not ever retrieve a
relevant GstGLContext as it doesn't actually query the surrounding
elements.  Guard against that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4791>
2023-06-07 22:15:39 +00:00
Philippe Normand
a7b09098b9 oggdemux: vp8: Detect keyframe packets
decodebin3 drops data on video streams until a keyframe or header is detected,
so for Ogg/VP8 we now need to correctly flag and signal keyframes downstream.
The first buffer pushed from each src pad also has the HEADER flag set.

Fixes playback of
https://github.com/web-platform-tests/wpt/raw/master/media/test.ogv in playbin3.

Fixes #1418

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4725>
2023-05-31 06:30:48 +00:00
Nicolas Beland
3a9c103b58 alsasink: Fix stall for transition of alsasink from PAUSED to READY with USB speakerphone
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4642>
2023-05-24 11:16:06 +00:00
Ruben Gonzalez
059965fe53 doc: Fix newline char between authors
Found running `gst-inspect-1.0 -a |& grep -v ":" | grep @`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4682>
2023-05-20 05:48:23 +00:00
Matthew Waters
e9bf1c79cc glmixer: don't add rgba templates by default
Subclasses may want to override the pad template with different formats
or with a different pad subclass.

The original beahviour is still available by calling
gst_gl_mixer_class_add_rgba_pad_templates() in _class_init() of the
subclass.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:15 +00:00
Matthew Waters
fc85b63c2b glmixer: remove set_caps() vfunc
All of its implementors can be moved to gl_start/stop() from
GstGLBaseMixer instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:14 +00:00
Matthew Waters
331b1af468 glmixer: remove reset vfunc
This functionality is covered by GstGLBaseMixer's gl_stop() vfunc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:14 +00:00
Matthew Waters
14e7e991d3 gl/mixer: make fbo instance field private and provide accessor function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:14 +00:00
Matthew Waters
007a602726 gl: move gl(base)mixer to library
For use by applications/libraries outside of the opengl plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:14 +00:00
Michael Olbrich
b660f258a6 theoradec: make sure the selected pool accepts the new config
If gst_buffer_pool_set_config() fails then the pool will use its old
config. This may include different width or height when
pic_width/pic_height != frame_width/frame_height.
As a result, the assertions in theora_handle_image() will fail.

So check the result of gst_buffer_pool_set_config() and only use the pool
if it succeeds. Otherwise let the parrent decide_allocation() create a new
pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4600>
2023-05-12 14:37:06 +02:00
Michael Olbrich
802b3b9898 theoradec: add another assert to check the buffer size
If the buffer has no video meta then the meta is created from the local
data. In this case, the other asserts don't actually check anything. So add
another one to ensure that the buffer is actually large enough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4600>
2023-05-12 14:37:06 +02:00
Michael Olbrich
9dd6b08fcc theoradec: remove unused codec state variable
The last user of this state was removed in 9a541157cf "theoradec: Fix
decoding in the presence of GstVideoCropMeta".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4600>
2023-05-12 14:37:06 +02:00
Jan Schmidt
e1faaefea0 glvideomixer: Implement force-live and min-upstream-latency properties
Proxy the force-live and min-upstream-latency propertyies to the internal
glvideomixerelement at construction time. force-live has to be set
during construction of the glvideomixerelement, so that has to be
deferred until the _constructed() call. Make sure that all other
existing proxied properties will still get set once the element
is created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4494>
2023-05-02 22:47:38 +00:00
Mathieu Duponchelle
15102e2eef docs: mark GstGLSinkBin as plugin API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4408>
2023-04-13 21:46:59 +00:00
Matthias Fuchs
15b7c7ea25 glvideoflip: fix leaked caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4394>
2023-04-11 21:31:45 +00:00
Robert Rosengren
6bb1257c99 alsasink: Fix for being stuck in stop_streaming_threads state
Moving from PLAYING to NULL will set the stop_streaming_threads to TRUE,
but when moving back upwards its not reset to FALSE (as only done in
uncalled init and resume callbacks).

Fix by reseting value in the prepare callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4309>
2023-03-31 16:51:11 +00:00
Sebastian Dröge
b1cb36e74c opusdec: Add support for decoding >8 channels
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4180>
2023-03-23 08:46:50 +00:00
Sebastian Dröge
d78bed99e8 opusenc: Use downstream channel configuration when using channel mapping family 255
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4180>
2023-03-23 08:46:50 +00:00
Sebastian Dröge
7e63427827 opusenc: Add support for encoding >8 channels and unknown/unpositioned layouts
This was kind of implemented before but missing a few pieces to actually
work correctly.

These configurations are mapped to channel mapping family 255.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4180>
2023-03-23 08:46:50 +00:00
Edward Hervey
ee759fb4bf plugins: Fix wrong enum usage
gcc 13 now detects conflicting enum usages. Fix the various cases where it was wrong

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4225>
2023-03-20 11:40:30 +00:00
Sebastian Dröge
ccad9a7338 plugins: Fix various trivial clang compiler warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4210>
2023-03-18 16:16:55 +02:00
Tim-Philipp Müller
8759b77a50 gst-plugins-base: re-indent with GNU indent 2.2.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4182>
2023-03-17 03:18:53 +00:00
Carlos Falgueras García
76abb90477 gluploadelement: Delete unused types
`*GstGLUploadElementPrivate` is not defined or used anywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4145>
2023-03-13 06:15:03 +00:00
Stéphane Cerveau
f6b2b716b2 timeoverlay: add buffer-count mode
This mode would allow to display the buffer
number received by the timeoverlay element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3827>
2023-03-10 16:00:53 +00:00
Nicolas Beland
8e77f89e86 alsasink: Fix stall when going from PLAYING to NULL (stucked at PAUSED) with uac1 gadget
This happened with a uac1 gadget which for some reason does not behave nicely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4095>
2023-03-02 03:41:25 +00:00
Thibault Saunier
dc1c9c8985 glvideomixer: Keep a reference to the underlying pad
There was cases where we were accessing the pad while it was already
destroyed. Ensure it can't happen by owning a ref on it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3916>
2023-02-13 22:23:13 +00:00
Anders Hellerup Madsen
acb8f2ee5d glstereosplit: use gst_display_ensure_context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
2023-02-06 16:16:14 +01:00
Anders Hellerup Madsen
ecd9a4e37c glbasemixer: use gst_display_ensure_context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
2023-02-06 16:15:06 +01:00
Georges Basile Stavracas Neto
a8a7ee6d83 glvideomixer: Add xalign and yalign properties
With the addition of the 'keep-aspect-ratio' sizing policy, content
that doesn't fit the target size is downscaled according to its own
aspect ratio to fit that target size, and centered.

Centering might not always be the desired behaviour, however;
consumers of this API might want to align the resulting picture to
the left or to the right.

To account for any of these cases, add two new properties to the
glvideomixer pad: xalign, and yalign. They operate on normalized
coordinates (0.0 for start, 1.0 for end), and default to 0.5 which
centers content.

<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3762>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3762>
2023-01-27 16:21:28 +00:00