Commit graph

3907 commits

Author SHA1 Message Date
Nicolas Dufresne
61d2231c58 v4l2codecs: decoder: Fixed unset dimension in caps
When the driver does not implement ENUM_FRMESIZE for some specific
formats, the caps limiting the sizes may endup empty, which results in
assuming the driver can scale to any sizes.

Ensure that the original size is in the caps to prevent this assumption.
This happens with Hantro drive, since it only reply to that call if the
format is postprocessed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Benjamin Gaignard
1a9841582d v4l2codecs: Use drm modifier to build caps
Do not only use drm fourcc to build drm-format but also
include the format modifier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Nicolas Dufresne
0e2efb2de4 waylandsink: Properly handle unrecoverable errors
Allocation failures cannot be recovered and should lead to an error
being posted on the bus. Otherwise the pipeline will just stall.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7903>
2024-11-18 16:02:13 -05:00
Nicolas Dufresne
f9c01f6479 waylandsink: Do not offer SHM pool when DMABuf is negotiated
Pools are expected to produce DMABuf when the caps are negotiated with
the associated caps feature. For that reason, avoid sharing the SHM pool
in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7903>
2024-11-18 16:02:12 -05:00
Stéphane Cerveau
c67ac844ed zbar: fix documentation
Fix some typos and markdown cleanup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7914>
2024-11-18 14:25:34 +00:00
Stéphane Cerveau
6d8cd9cf92 zxing: update documentation
Fix some typos and markdown cleanup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7914>
2024-11-18 14:25:34 +00:00
Matthew Waters
a566dfd339 uvcgadget: silence a maybe-uninitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Matthew Waters
6eee4a513b fdkaacenc: silence a maybe-unitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Matthew Waters
741f935bbf ristrtxsend: silence a maybe-uninitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Matthew Waters
382ed4630e av12json: silence a maybe-unitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Matthew Waters
605cff0642 vulkan/videoutils: silence some maybe-unitialized warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
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
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
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
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
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
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
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
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
Víctor Manuel Jáquez Leal
d9aa8a78ea h264bitwriter: implement gst_h264_bit_writer_filler()
This is required for vulkan encoder since it can only write slides after aligned
offsets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7785>
2024-11-11 16:05:38 +00:00
Sid Sethupathi
8be9693b1e gs: update building README
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7860>
2024-11-11 13:39:50 +00:00
Diego Nieto
0d85cdafd5 exiftag: handle GST_TAG_CAPTURING_LIGHT_SOURCE tag
This exif tag allows to specify the different light conditions
when taking a picture. This tag is defined in:
https://exiftool.org/TagNames/EXIF.html#LightSource

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5571>
2024-11-10 12:57:36 +00:00
Sebastian Dröge
b5e119bbcc ccconverter: Don't override in_fps_entry when trying to take output
This allows to handle CDP streams where the framerate is not provided by the
caps and generally gives preference to the framerate inside the CDP packets over
the one in the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7532>
2024-11-10 08:37:36 +00:00
Olivier Crête
d934ea3f7a tensormeta: Add APIs to create and access GstTensorMeta contents
Also document those APIs better.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
2024-11-08 14:58:49 +00:00
Olivier Crête
5e73e8e1b3 tensor: Add APIs to create and access GstTensor contents
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
2024-11-08 14:58:49 +00:00
Olivier Crête
4295386804 tensors: Use full GstTensorDataType type name in type members
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
2024-11-08 14:58:49 +00:00
Olivier Crête
e01a3b1d79 analytics: Add APIs to add or get a GstTensorMeta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
2024-11-08 14:58:49 +00:00
Daniel Morin
6a5a63f051 analytics: Adding abstraction on tensor dims
Tensor can be row or col major, but it's also possible that the order by we need
to read the tensor with more than two dimension need to be described. The
reserved field in GstTensorDim is there for this purpose. If we need this we
can add  GST_TENSOR_DIM_ORDER_INDEXED, and follow an index defining order for
each dimension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
2024-11-08 14:58:49 +00:00
Daniel Morin
8169863f01 analytics: Make GstTensor more suitable for inline allocation
GstTensor contained two fields (data, dims) that were dynamicallay allocated. For
data it's for a GstBuffer and we have pool for efficient memory management. For
dims it's a small array to store the dimension of the tensor. The dims field
can be allocated inplace by moving it at the end of the structure. This will
allow a better memory management when GstTensor is stored in an analytics meta
which will take advantage of the _clear interface for re-use.

- New api to allocate and free GstTensor
To continue to support use-cases where GstTensor is not stored in an
analytics-meta we provide gst_tensor_alloc, gst_tensor_alloc_n and
gst_tensor_free that will facilitate memory management.
- Make GstTensor a boxed type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
2024-11-08 14:58:49 +00:00
Daniel Morin
7c925eae61 analytics: Move batch to GstTensor
- batch_size is required to interpret the tensor depending on the tensor format
the batch are not necessarily memory plane therefore it's preferable to keep it
inside GstTensor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
2024-11-08 14:58:49 +00:00
Daniel Morin
43c7e524ce analytics: Decouple GstTensor from GstTensorMeta
- To support transporting tensor as GstMeta, Analytics-Meta and Media we need to
  decouple GstTensor from GstTensorMeta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
2024-11-08 14:58:49 +00:00