Commit graph

121006 commits

Author SHA1 Message Date
He Junyan
347393be36 Doc: Update the kmssink caps after adding DMA support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:20:16 +08:00
Jakub Adam
34a400cc0e kmsbufferpool: Accept DMA_DRM caps in the config
Only linear modifier is supported due to the dumb allocator's
limitation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
Jakub Adam
9e81a6517b kmssink: ensure we have a valid vinfo_drm after set_caps
Consequently drop the check in import_dmabuf

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
Jakub Adam
d04a03d176 kmssink: enumerate drm formats when IN_FORMATS not present
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
6ad6b765ab kmssink: Do not provide DMA buffer pool for non-linear caps
The dumb allocator does not support modifiers, so we can not allocate
non-linear buffers by ourself.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
e4d7ac5989 kmssink: Handle the DMA buffer importing correctly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
a925630d87 kmssink: Add DMA kind caps into sink caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
6f78e1c3e0 kmssink: Add helper functions to create DMA and raw caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
3f510d1296 kmssink: Add a helper function to collect formats and modifiers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
He Junyan
9df377efc1 kmssink: Add modifier to gst_kms_allocator_dmabuf_import
Use the new drmModeAddFB2WithModifiers() API for binding the
non-linear BO.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174>
2024-11-16 13:19:13 +08:00
Thibault Saunier
7010efc8ed meson: Bump minimum version to 1.3
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4025

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7899>
2024-11-16 03:02:27 +00:00
Sebastian Dröge
dce0cdf548 audiostreamalign: Don't report disconts for every buffer if alignment-threshold is too small
If it is too small, the maximum allowed diff becomes 0 samples which would then
trigger if there is no discontinuity at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7888>
2024-11-16 00:10:51 +00:00
Benjamin Gaignard
da02191411 v4l2codecs: Test ioctl return value and errno
Fix error testing when using V4L2_FMTDESC_FLAG_ENUM_ALL by using
both errno and the return value.

Fixes !7686 (merged)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7873>
2024-11-15 23:22:30 +00:00
Sebastian Dröge
2bbf095e5b matroskamux: Simplify timestamp comparison logic in find_best_pad()
If a buffer has no timestamp it is immediately muxed so we can directly break
the loop and simplify comparisons in the other cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872>
2024-11-15 22:33:53 +00:00
Sebastian Dröge
a391728ad4 matroskamux: Don't time out in live mode if no timestamped next buffer is available
The muxer can only advance the time if it has a timestamped buffer that can be
output, otherwise it will just busy-wait and use up a lot of CPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872>
2024-11-15 22:33:53 +00:00
Philippe Normand
701f563996 matroskamux: Delay stream-header until all sink pads have caps
If we don't wait, an incomplete header might be generated due to a race between
the _aggregate thread and the sink pad setcaps.

Fixes #3929

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872>
2024-11-15 22:33:53 +00:00
Marianna Smidth Buschle
2766e4816a v4l2object: Fixed framerate negotiation
We had a problem with negotiation of the framerate.

Gstreamer was querying the FRAMEINTERVALS based on the max frame size
instead of the desired frame size.

This was resulting in non-negotiated errors when trying to run with a
smaller frame size and fps higher than the max for the max image size.

Fx the max framerate for 1024x1024 RGB on CMOSIS4000 is 28.292
While for 1024x100 RGB it is 280.867

But Gstreamer would allow any framerates bigger than 28.292 no matter
the frame size used...

I have fixed it by 1st changing the CAPS query to use the minimum frame
size instead of maximum.
This however has the downside of allowing gstreamer to negotiate
framerates that are too high if the image size is bigger than the
minimum.
This is not a huge problem since our driver just CLAMPS the fps value to
the max then.

However gstreamer was not being properly notified of this change, and
would therefore report a wrong fps in the CAPS structure.
Note that the fps would be correct inside the buffer info.
Since gstreamer was reading the fps back after setting it.
It was just not being "propagated" to the CAPS structure.
I have also added a WARNING to this point so we can see if the fps that
gstreamer tries to apply was accepted or not.

And the next part of the fix was to add a framerate check after the
frame size has been established.
I did this inside the fixate_caps function of the v4l2src, which was
calling the TRY_FMT in order to check if the format was correct.
So I just added a check for the ENUM_FRAMEINTERVALS in there.

And now we get the non-negotiated again if the fps is too high for the
selected frame size.
Also added a couple of warnings so it is easy to see that this was the
cause.

See:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3037

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7850>
2024-11-15 22:29:56 +00:00
Stéphane Cerveau
0dd706a420 vkutils: add gst_vulkan_ensure_element_device
In order to keep the same device across
the elements in the pipeline, use either the device id
to create the device or get the device from the context
set by the peer elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7843>
2024-11-15 20:32:24 +00:00
Stéphane Cerveau
9a771b6909 vkinstance: add gst_vulkan_instance_create_device_with_index
This method will allow to create a device with its device_index
preparing the support of multiple device.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7843>
2024-11-15 20:32:24 +00:00
Víctor Manuel Jáquez Leal
46f4dbe57b codecparser: remove unused headers
Mainly <string.h> but also <stdlib.h> in jpegparse

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7869>
2024-11-15 19:33:10 +00:00
Víctor Manuel Jáquez Leal
e60efa4b9a codecparsers: avoid libc math library
Instead of the libc ceil() and pow() machinery for double types, since the
library uses it for unsigned integers use a simple math function for for ceil
division and bit left shift for integer power of two.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7869>
2024-11-15 19:33:10 +00:00
Stéphane Cerveau
ff9100eb4d h265parser/bitwriter: add some comments for ceil_log2 use
Validate that the length of field must be calculate with
ceil_logs2 and not bit storage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7429>
2024-11-15 16:52:29 +00:00
Stéphane Cerveau
8f9ed667cd h264parse: use of ceil_log2 instead of bit_storage
According to the specification:
The length of the slice_group_id[ i ] syntax element is Ceil( Log2(
num_slice_groups_minus1 + 1 ) ) bits

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7429>
2024-11-15 16:52:29 +00:00
Stéphane Cerveau
a6f82ba590 utils: improve gst_util_ceil_log2
According to the following comparison of algorithms, the value
for 0 and 1 was giving an incorrect result.

https://gist.github.com/ceyusa/6061b33ac109a68bcd222f6919968c9a

More information here:
https://github.com/rofrol/codeforces/blob/master/ceil_log2.c

Use a different algorithm which offers better result and keep the
performance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7429>
2024-11-15 16:52:29 +00:00
Jan Alexander Steffens (heftig)
65e071c1c8 flvmux: Mux timestampless buffers immediately
Instead of leaving them queued indefinitely, or until we're timing out
and it's the only buffer queued.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7871>
2024-11-15 15:58:07 +00:00
Sebastian Dröge
969b51acb6 flvmux: Don't time out in live mode if no timestamped next buffer is available
But also don't wait for a buffer on both pads, which might take forever in case
of gaps in one of the streams.

The muxer can only advance the time if it has a timestamped buffer that can be
output, otherwise it will just busy-wait and use up a lot of CPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7871>
2024-11-15 15:58:07 +00:00
Jan Alexander Steffens (heftig)
d0543444d8 mpegtsmux: Mux timestampless buffers immediately
Instead of leaving them queued indefinitely, or until we're timing out
and it's the only buffer queued.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7870>
2024-11-15 13:07:06 +00:00
Sebastian Dröge
3971f8b86c mpegtsmux: Don't time out in live mode if no timestamped next buffer is available
The muxer can only advance the time if it has a timestamped buffer that can be
output, otherwise it will just busy-wait and use up a lot of CPU.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7870>
2024-11-15 13:07:06 +00:00
L. E. Segovia
e0f0b5c829 ci/windows: Add WiX v5
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7881>
2024-11-15 12:16:04 +00:00
Robert Rosengren
ff14e1a9e3 udpsrc: protect cancellable from unlock/unlock_stop race
Protect cancellable from simultaneous unlock and unlock_stop calls from
basesrc class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7885>
2024-11-15 10:33:44 +00:00
Edward Hervey
591ddfe203 ci: Don't use a massive image for the cerbero trigger
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4024

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7893>
2024-11-15 09:22:16 +01:00
Stéphane Cerveau
ab8b2883a1 gst_plugins-cache: add zxing plugin
update documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7887>
2024-11-14 19:14:48 +00:00
Sebastian Dröge
bc63d85f19 idstr: Fix docs of set_static_str_with_len()
The passed string must be NUL-terminated because otherwise a copy would be
necessary to make it NUL-terminated, which defeats the whole purpose of the
set_static() functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7863>
2024-11-14 17:12:27 +00:00
Thibault Saunier
c0c9a31fc9 tests: ges: Update known issue links as they were moved to the monorepo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7884>
2024-11-13 19:22:17 -03:00
Thibault Saunier
f4f473650f ges: pipeline: Add missing API guard
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7882>
2024-11-13 21:23:43 +00:00
Thibault Saunier
c00429a917 ges: launch: Fix usage of save-only after loading a project
We need to wait for the project to be loaded before saving the file
and quit

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7882>
2024-11-13 21:23:43 +00:00
Edward Hervey
6ba70f5da8 mpegtsmux: Post error on the bus if no mapping is found
This is more useful/visible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7707>
2024-11-13 08:29:25 +01:00
Edward Hervey
244b00ac08 mpegts: Add custom mapping for vp9
This is a custom mapping. There isn't much needed apart from that to store vp9
in mpeg-ts since the bitstream is self contained.

Since there are no official specification we don't want people to be mistaken in
believing that. Therefore that mapping is only used in the muxer if the (new)
property `enable-custom-mappings` is set to TRUE.

* The MPEG-TS Stream Type is Private Data (0x6) with the registration descriptor
  set to `VP09`.
* The Access Unit are VP9 frames stored in PES packets
* As there is no emulation prevention byte in VP9 elementary stream, the can be
  misdetection of PES start code. To avoid this, the start of a PES packet must
  be signalled using the Payload Unit Start Indicator in the transport packet
  header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7707>
2024-11-13 08:28:36 +01:00
Thibault Saunier
23ce0d2901 meson: gst: Make GST_FULL_STATIC_COMPILATION a static only arg
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7874>
2024-11-12 16:28:39 +00:00
Thibault Saunier
650ff6c5d0 nvcodec: gl now supports Y444_16LE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7858>
2024-11-12 11:31:37 -03:00
Thibault Saunier
6ed0d547a7 gl: colorconvert: Add support for Y444_10XX and Y444_16XX
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7858>
2024-11-12 11:31:37 -03:00
Seungha Yang
43fc9525ca d3d12swapchainsink: Fix error when the sink is reused
Release backbuffer just before releasing swapchain

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7867>
2024-11-12 12:03:18 +00:00
Théo Maillart
a1c92c0cb1 mpegvideoparse: do not set delta unit flag on unknown frame type
When encoding an image to mpeg2 video, with something like:
  gst-launch-1.0 encodebin name=e profile=mpegpsmux:video/mpeg,mpegversion=2,systemstream=false ! \
                 filesink location=sample.mpg filesrc num-buffers=1 blocksize=$(stat -c%s sample.png) \
                 location=sample/dts.png ! pngdec ! e.
The only frame's type is set to an invalid value 0
The consequence is that mpegvideoparse sets the delta unit flag on the buffer because
it is not an I frame, then decodebin3 drops this only frame because the delta
unit flag is set and the decoder receives eos before it was able to receive any
encoded data

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7832>
2024-11-12 09:13:10 +00:00
Víctor Manuel Jáquez Leal
986b91fbe9 h26Xbitwriter: use quote form directive for internal header
Since nalutils.h is not installed it should be included for the local path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7868>
2024-11-12 06:29:22 +00:00
Alicia Boya García
2080aff70c adapter: Improve documentation for gst_adapter_available()
When I first read the documentation of gst_adapter_available() and
gst_adapter_available_fast() I got quite confused as it seemed that
both performed the same purpose but one was slower than the other.

I shared it with other people and found they also arrived at the same
wrong conclusion.

Hopefully this patch will make the actual purpose clearer.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/issues/12

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7859>
2024-11-11 17:25:18 +00:00
Niklas Jang
3dcdea9e80 docs: tutorials: improve Linux compile instruction for newbies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7859>
2024-11-11 17:25:18 +00:00
Tom Schuring
1a9ecaeec9 docs: plugin development: add example for enum property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7859>
2024-11-11 17:25:18 +00:00
Zeno Endemann
7112f1b874 docs: application-development: Clarify usage of static elements
Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/issues/41

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7859>
2024-11-11 17:25:18 +00:00
Tim-Philipp Müller
96d762c6eb docs: installing-on-windows: %HOMEFOLDER% does not exist
%HOMEPATH% does, however.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/issues/52

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7859>
2024-11-11 17:25:18 +00:00
Tim-Philipp Müller
4702cae7ff tutorials: gstreamer tools: fix broken webm to ogg transcode pipeline
The pipeline would error out with not-negotiated. Reason is that
the webm file doesn't have an average frame duration set in the
headers, so matroskademux outputs framerate=0/1, but theora in
Ogg really requires a fixed framerate, so that errors out.

Change example to H.264/AAC in MP4, which is more useful.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/-/issues/108

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7859>
2024-11-11 17:25:18 +00:00