Commit graph

118448 commits

Author SHA1 Message Date
Sebastian Dröge 35c3689c44 aggregator: Also release clipped buffer when releasing an aggregator pad
Instead of waiting until the pad is actually finalized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5510>
2023-10-25 07:56:41 +00:00
Sebastian Dröge 70ee7293e0 aggregator: Take pad lock while releasing buffers when removing pads
Accessing the buffers in all other places requires the pad lock and not
taking it here can cause access to already freed buffers if there's
concurrent access from another thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5510>
2023-10-25 07:56:40 +00:00
Sebastian Dröge f7d4ea6eec audioaggregator: Make access to the pad list thread-safe while mixing
When mixing every single buffer the object lock is shortly released and
acquired again. In the meantime the pad list can become invalid because
a pad was removed or added, and equally the current pad might as well
have been finalized in the meantime.

To get around that, take a snapshot of all sinkpads before mixing and
work with that list of pads.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5510>
2023-10-25 07:56:40 +00:00
Jordan Petridis a7c1da6ce5 build: Do not try to build gst-python when introspection is disabled
Close #1604

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4648>
2023-10-25 06:48:42 +00:00
Matthew Waters 48ab457d79 vulkan/physical-device: don't assume that queue_family_ops is filled
On old enough vulkan (< 1.2), we will never retrieve the family operations and
will perform a NULL pointer dereference when dumping the queue family op
properties.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5547>
2023-10-25 16:38:06 +11:00
Adrien De Coninck 65365caa21 d3d11videosink: post "have-window-handle" element message on the bus
* when window_id is not user-provided and window_type==GST_D3D11_WINDOW_NATIVE_TYPE_HWND
* allows user to retrieve internally created window handle
  * for custom positionning
  * for custom icons
  * ...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5544>
2023-10-24 16:32:36 +02:00
David Rosca 8aac08506a va: Use vaMapBuffer2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5467>
2023-10-23 19:40:16 +00:00
Shengqi Yu 25c00b5ba2 v4l2object: scale the encoded sizeimage based on maximum resolution
The default 2MB ENCODED_BUFFER_SIZE can't support some 4K video playback. We now
detect the driver reported maximum resolution and choose an appropriate
default bitstream size accordingly. For 4K video these results in around 4MB
buffer instead of 2MB.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4549>
2023-10-23 14:10:56 +00:00
Matthias Fuchs 2bbc2a4c52 qml6glsrc: sync on the streaming thread
After rendering a QML scene the qml6glsrc element copies the contents of
the scene to a GStreamer buffer. This happens on the Qt render thread.
Then it attaches a sync point to the destination buffer. This sync point
must be awaited by other threads which use the buffer later on. The
current implementation relies on the downstream elements to wait for the
sync point. However, there are situation where this does not work. The
GstBaseTransform e.g. copies the buffer metadata (which overwrites the
sync point without waiting for it) *before* waiting for the sync point.

This commit waits for the sync point inside the qml6glsrc element before
sending it downstream. The wait command is issued on the streaming
thread with the pipeline OpenGL context, i.e. it will synchronize with
the GStreamer OpenGL thread.

This is a port of the original fix for the qmlglsrc element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5519>
2023-10-23 08:43:16 +00:00
Jordan Petridis 9f3b8c9366 vkwindow_xcb: Make the visible private field a guint
This field is used to store gbooleans (which are ints) but if it's
a :1 bit depth assigning ints to it changes it's value as the only
valid values are -1 and 0.

Make it a guint instead so the cast would be correct.

```
../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/xcb/gstvkwindow_xcb.c:151:25: error:
implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1
[-Werror,-Wsingle-bit-bitfield-constant-conversion]
    window_xcb->visible = TRUE;
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5432>
2023-10-23 10:43:52 +05:30
Tim-Philipp Müller 2193022d67 ci: documentation: git reset only checked-in *wrap files before diffing
Otherwise it will abort and complain about not-checked wrap
files that got promoted by meson, such as:
error: pathspec 'subprojects/gvdb.wrap' did not match any file(s) known to git

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2126>
2023-10-22 11:28:59 +01:00
Tim-Philipp Müller 654f3370a0 meson: Bump GLib requirement to >= 2.64
This includes fixes to make GstBus watches non-racy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2126>
2023-10-22 10:48:12 +01:00
Jordan Petridis 656bea80ea meson: Fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5526>
2023-10-22 08:06:29 +03:00
Jordan Petridis 66c5b13dd8 ci: docs: disable svthevcenc for the docs job
While updating the base image we run into a handful of issues
with the svthevcenc element. Disable it for now from the documentation
job to not block the rest of the image update.

We can revert this commit once [1] is fixed.

[1]: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5447

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:30 +03:00
Jordan Petridis 18578643ca check: Move CI specific ignored tests into their own list
Instead of ignoring the tests always, check if a CI env var is
present and only ignore the tests then.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:30 +03:00
Jordan Petridis 080c837cd6 ci: fedora: Install a more recent wayland-protocols version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:30 +03:00
Jordan Petridis 118841cc49 ci: Build glib subproject fallback for clang builds
We currently have glib 2.68 in the image, which produces a couple
of warning around g_atomic_ apis. This has since been
fixed/worked around in glib itself [1] [2] [3]. Build the subproject
until we update to a toolchain/ci-image with new enough glib.

[1] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2114
[2] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2578
[3] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2864

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:29 +03:00
Jordan Petridis eeb77ddca5 symbol_index: Add ladspa-ladspa-rubberband-so-rubberband-pitchshifter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:29 +03:00
Jordan Petridis 9ef372a0bc symbol_index: Add srtsink:auto-reconnect and srtsrc:authentication
This is followup of 9072424eb3

The plugin wasn't built in the CI so it was missed. The properties
were added in the Class in the commit above but not for the elements
index.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:29 +03:00
Philippe Normand 3779eb5c83 ci: Make the fedora image toolbox compatible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:29 +03:00
Jordan Petridis 98eab9a562 ci: fedora/prepare: use curl to download rustup instead of wget
We install curl anyway as a dependency of the plugins

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:29 +03:00
Jordan Petridis 88e6dd0555 ci: switch the Fedora base image to f34
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:28 +03:00
Tim-Philipp Müller 136c82d735 flacenc: signal in output caps that the output is framed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5524>
2023-10-22 00:25:50 +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
Jordan Petridis 0bc353085f svthevcenc: Fix potential use of unitialized variable
In gst_svthevc_enc_propose_allocation if we don't get info from
the caps, we'd goto done, which could potentially try to unref
and unitialized pool variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5476>
2023-10-21 20:08:59 +00:00
Loïc Le Page e1ca575408 gl: add support for surfaceless display in GstGL
Use of the EGL_MESA_platform_surfaceless EGL extension to create an EGL
display that is not depending on any kind of windowing system.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5511>
2023-10-20 12:46:48 +00:00
Loïc Le Page 34694bbfcf gl: fix "winrt" string comparison in gst_gl_display_type_from_environment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5511>
2023-10-20 12:46:48 +00:00
Piotr Brzeziński e79b308f82 vtdec: Fix deadlock when attempting to negotiate
This was wrongly calling the base class method, which unnecessairly took the stream lock, already taken by
handle_frame(). The drain() call in negotiate() would then wait for the output loop to pause, while that loop
is stuck waiting to take the stream lock, thus causing a deadlock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5521>
2023-10-20 13:50:16 +02:00
Nirbheek Chauhan 0a29654d7b svtav1enc: Don't segfault on not-negotiated
Don't drain on finish if we didn't configure the encoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5517>
2023-10-20 12:54:44 +05:30
Olivier Crête d0b587eb15 onnx: Remove enums file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Olivier Crête a225755489 onnx: Remove unnecessary tensorid class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Olivier Crête 62f292ac73 onnx: Update to build against 1.16.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Aaron Boxer 1ff585233a onnx: add gstonnxinference element
This element refactors functionality from gstonnxinference element,
namely separating out the ONNX inference from the subsequent analysis.

The new element runs an ONNX model on each video frame, and then
attaches a TensorMeta meta with the output tensor data. This tensor data
will then be consumed by downstream elements such as gstobjectdetector.

At the moment, a provisional TensorMeta is used just in the ONNX
plugin, but in future this will upgraded to a GStreamer API for other
plugins to consume.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Jan Alexander Steffens (heftig) 6053dd0d1b tsmux: Fix default get_es_descrs_func
`tsmux_stream_default_get_es_descrs` is missing the `user_data`
parameter and shouldn't be cast to `TsMuxStreamGetESDescriptorsFunc`.

Prefer not casting at all to make sure we don't miss such an issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 2d72008361 tsmux: Fix default new_stream_func
`tsmux_stream_new` is missing the `user_data` parameter and shouldn't be
cast to `TsMuxNewStreamFunc`.

Prefer not casting at all to make sure we don't miss such an issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 5bac956b58 tsmux: Add missing include
We need `GstMpegtsPMTStream` here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) db88612853 tsmux: Simplify tsmux_section_write_packet
- Don't try to make the parameters match `GHFunc`. Use a dedicated
  callback for `g_hash_table_foreach`.
- Don't try to be clever with buffer memories. We're allocating a full
  packet anyway, might as well memcpy and save on a lot of complexity.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 950789f61b tsmux: tsmux_packet_out should always consume its buffer
Consuming the buffer only when successful is an antipattern and easily
leads to leaks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 55658ad166 tsmux: Don't memset in pad_stream when writing a PCR packet
tsmux_write_ts_header will write a stuffing adaptation field, so we
don't need to prefill the buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 2dbd89b036 tsmux: Move out parameters of tsmux_write_ts_header
Move them to the end of the parameter list and also allow passing NULLs
to ignore the payload information, but assert that the payload length is
zero in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:27 +00:00
Jan Alexander Steffens (heftig) 5128975a36 tsmux: Fix two more uses of gst_buffer_map
The buffers should be used for writing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:27 +00:00
Tim-Philipp Müller bce1d121ba rtpac3depay: should output audio/x-ac3 not audio/ac3
audio/x-ac3 is the canonical media format in GStreamer.
audio/ac3 is sometimes accepted as input (e.g. in rtpac3pay
or ac3parse), but shouldn't be output.

Fixes #3038.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5472>
2023-10-19 13:27:58 +00:00
Guillaume Desmottes 6d94b77ae8 libav: expose fake booleans properties as enums
Some ffmpeg options claims to be booleans but are actually 3-values enums
with -1 as default instead of 1 or 0. Handle those using a custom enum
so we keep the same defaults as ffmpeg and users can properly configure them
if they need to.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3035
for an actual example of this problem. The GStreamer element was
automatically enabling a non-default option, leading to strange behavior
in the AAC encoder.

Fix #3035

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5507>
2023-10-19 12:39:06 +00:00
Matthias Fuchs 24ae3de107 qmlglsrc: sync on the streaming thread
After rendering a QML scene the qmlglsrc element copies the contents of
the scene to a GStreamer buffer. This happens on the Qt render thread.
Then it attaches a sync point to the destination buffer. This sync point
must be awaited by other threads which use the buffer later on. The
current implementation relies on the downstream elements to wait for the
sync point. However, there are situation where this does not work. The
GstBaseTransform e.g. copies the buffer metadata (which overwrites the
sync point without waiting for it) *before* waiting for the sync point.

This commit waits for the sync point inside the qmlglsrc element before
sending it downstream. The wait command is issued on the streaming
thread with the pipeline OpenGL context, i.e. it will synchronize with
the GStreamer OpenGL thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5506>
2023-10-19 08:19:05 +00:00
Nirbheek Chauhan b0d3d7644d meson: Pass gstreamer=enabled to libnice when webrtc is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5505>
2023-10-19 06:38:46 +00:00
Nirbheek Chauhan 9f5703c366 meson: Fix typo building_full_options
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5505>
2023-10-19 06:38:45 +00:00
Nirbheek Chauhan fd4828bafe meson: Add a top-level option to enable webrtc
There are a bunch of plugins that you need for webrtc support, and
it's not obvious at all to users which those are.

With this commit, srtp, sctp and dtls options will be auto-enabled if
the webrtc option is enabled.

Requires meson 1.1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5505>
2023-10-19 06:38:45 +00:00
Nirbheek Chauhan 62e33e04ea webrtc_sendrecv.py: Allow using a camera instead of test sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5504>
2023-10-19 05:47:03 +00:00
He Junyan c5f50b1602 gl: upload: gl memory method should not provide pool for system memory caps
In _gl_memory_upload_propose_allocation(), when output target is "external-oes",
then we should not provide GL allocator and pool in the allocation query.
This is because the "external-oes" kind memory can never be mapped directly
and the upstream element may misuse it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5468>
2023-10-18 19:56:30 +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