Commit graph

121236 commits

Author SHA1 Message Date
He Junyan
b8a806d8a9 test: Add the h266parse element test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5710>
2024-12-20 08:22:31 +08:00
He Junyan
b5e4c8b774 h266parse: Add the new h266parse element
TODO: Need to refer to the new ISO/IEC 14496-15 for vvc1 and vvi1's
codec data

Co-authored-by: Zhong Hongcheng <spartazhc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5710>
2024-12-20 08:22:31 +08:00
He Junyan
51618400ec libs: codecparsers: Add the missing ilrp_idx field in H266's ref list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5710>
2024-12-20 08:22:31 +08:00
He Junyan
5b768ce0cc libs: codecparsers: H266 GstH266RefPicListStruct's abs_delta_poc_st should be 16 bits
Its value range is 0~(2^15 − 1) according to the spec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5710>
2024-12-20 08:22:31 +08:00
Sebastian Dröge
9f79d39b1b vp9parse: Add video codec tag to the tag list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8156>
2024-12-19 23:30:31 +00:00
Sebastian Dröge
f590e815fe av1parse: Add video codec tag to the tag list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8156>
2024-12-19 23:30:31 +00:00
Robert Mader
b275f63b13 v4l2codecs: format: Add V4L2_PIX_FMT_NC12
Which is used by the Raspberry Pi 4 and 5 for 8-bit HEVC. Adding it
here in order to show-case how the V4L2<->DRM translation is
supposed to work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7355>
2024-12-19 20:55:59 +00:00
Robert Mader
4b07d54931 v4l2codecs: decoder: Translate V4L2 formats into DRM fourcc/mod pairs
V4L2 and DRM choose different, incompatible ways to represent
tiled/compressed etc. formats. While the later uses combinations of
format fourccs and opaque, vendor/hardware specific modifiers, for the
later every such combination is a distinct new format.

Traditionally Gst implemented each of the V4L2 formats if needed.
Given the large number of tiling and compression modes, this is
quite work intensive - and often actually not needed.
In many situations Gst just needs to pass buffers from V4L2 to DRM in
the form of EGL, VK, Wayland or KMS.

Thus implement a direct translation for some V4L2 formats to DRM ones,
limited to the DMA_DRM API, allowing much quicker enablement of formats
while requiring peers to use external implementations (usually Mesa or
KMS) for tiling etc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7355>
2024-12-19 20:55:59 +00:00
Stéphane Cerveau
97d62d2291 vkencoder: init debug category earlier
The encoder has not been created if the codec is not supported by
the hardware, so the GST_WARNING_OBJECT will fail to find a suitable
category.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8138>
2024-12-19 19:49:06 +00:00
Stéphane Cerveau
f618270c59 vkdecoder: init debug category earlier
The decoder has not been created if the codec is not supported by
the hardware, so the GST_WARNING_OBJECT will fail to find a suitable
category.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8138>
2024-12-19 19:49:06 +00:00
Tim-Philipp Müller
f4733d0af7 svtjpegxsdec: handle decode errors more gracefully
Use GST_VIDEO_DECODER_ERROR instead of just erroring out
unconditionally, so that the error handling behaviour is
determined by the "max-errors" property and we'll just
continue after decoding errors now instead of erroring out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8163>
2024-12-19 15:47:13 +00:00
Carlos Falgueras García
1dd4a6e832 rtph26xpay: Fix the default framerate
Use 0/1 instead of 0/0 as the default framerate for rtph26{4,5}pay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8176>
2024-12-19 11:55:29 +00:00
Matthew Waters
dbf4915abd cuda/context: add gpu stack size property
Allows reducing the initial stack size of GPU threads.  Cuda should
automatically increase this value if a kernel requires a larger stack.

Can save roughly 40MB of GPU memory for a single nvh264enc instance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8158>
2024-12-19 00:33:03 +00:00
Matthew Waters
d6563016ca cuda: add CuGet/SetCtxLimit()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8158>
2024-12-19 00:33:03 +00:00
Nicolas Dufresne
0fb5d8afa8 doc: v4l2: Update documentation cache for DMA_DRM
The template caps now exposes DMA_DRM formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633>
2024-12-18 23:34:08 +00:00
Nicolas Dufresne
3ee04883ee v4l2: object: Adjust DMABuf negotiation base on io-mode
If the io-mode is forced by user to MMAP, USERPTR or RW, don't try and
negotiated DMABuf caps feature. This would otherwise fail later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633>
2024-12-18 23:34:08 +00:00
Nicolas Dufresne
3ec1feb88f v4l2: pool: Adjust pool behaviour when DMA_DRM is used
We disable the copy threshold and always add GstVideoMeta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633>
2024-12-18 23:34:08 +00:00
Nicolas Dufresne
77744c3d63 v4l2: Add support for setting memory:DMABuf caps
This is the final step to allow negotiation of this caps features. Limiting the
features based on the io-mode shall come next.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633>
2024-12-18 23:34:08 +00:00
Nicolas Dufresne
58b196d62b v4l2: object: Implement probing memory:DMABuf caps feature
This is the caps obtained trough caps query. We now have both system and
DMAbuf varaint, while maintaining support for meta:Interlaced feature.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633>
2024-12-18 23:34:08 +00:00
Nicolas Dufresne
8860eadffd v4l2: object: Add memory:DMABuf caps feature to template caps
In this patch, we introduce memory:DMABuf caps feature into V4L2
elements template caps. This is required to allow caps query,
allocation query and set_format to use it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633>
2024-12-18 23:34:08 +00:00
Nicolas Dufresne
14b5df4850 v4l2: Directly map V4L2 formats to DRM formats
As in the long term not all V4L2 formats will have a libgstvideo
implementation, add a dedicated DRM fourcc map. This will be used
to enable memory:DMABuf caps features.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633>
2024-12-18 23:34:08 +00:00
Nicolas Dufresne
50bb74e0c1 v4l2: Include a copy of drm_fourcc.h
This one has been imported from libdrm 2.4.122.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633>
2024-12-18 23:34:08 +00:00
Robert Mader
b687b9527b glupload: Add DRM raw uploader
The goal is equivalent to adding DMA_DRM caps to the existing raw
uploader, but creating a new dedicated uploader allows separating the
logic more easily.

Test:
 - use an AMD system
 - modprobe visl
 - gst-launch-1.0 filesrc location=some-1080p-content.mkv ! parsebin ! v4l2slh265dec ! glimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8126>
2024-12-18 22:31:02 +00:00
Nicolas Dufresne
a6be74786e va: display: Optimize out some property indirection
Because it was visible during some profiling, I thought it cost nothing
to optimize out the uneeded property get roundtrip.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8179>
2024-12-18 13:38:42 -05:00
Sebastian Dröge
4b1954b490 avcodecmap: Add some more channel position mappings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8173>
2024-12-18 11:22:12 +00:00
Guillaume Desmottes
219bf89159 wpe: enable console message with WPE2
Looks like the WebKitConsoleMessage API is now available in WPE2 as well:
https://webkitgtk.org/reference/webkitgtk-web-process-extension/stable/signal.WebPage.console-message-sent.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8169>
2024-12-18 09:13:22 +00:00
Nicolas Dufresne
bebfbb6f69 va: h264dec: Allow "extended" profile decoding
Extended is identical to main but allows for FMO/ASO features to be
used, and prevent using CABAC. Using similar logic to "baseline",
assume that if we support main, we can also do extended.

This fixes the following fluster vectors, which otherwise would fail
when trying to link the parsebin pad.

  - BA3_SVA_C
  - MR6_BT_B
  - MR7_BT_B
  - MR8_BT_B

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8164>
2024-12-17 21:51:10 +00:00
Sebastian Dröge
88a36b53c5 pad: Only remove TAG events on STREAM_START if the stream-id actually changes
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4097

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8135>
2024-12-17 12:05:54 +00:00
Emil Ljungdahl
f28a7b6ef3 webrtcbin: Tear down src and sink bins before removing them from webrtc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7900>
2024-12-17 09:48:46 +00:00
Emil Ljungdahl
df8b8f9692 webrtcbin: Fix potential deadlock on bin elements cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7900>
2024-12-17 09:48:46 +00:00
Nirbheek Chauhan
d09605a3ff vtenc: Fix authors of encoder features
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
2024-12-16 18:52:22 +00:00
Nirbheek Chauhan
07e538c043 vtenc: Fix class hierarchy in an attempt to fix property docs
Also fix some convention-nits in the process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
2024-12-16 18:52:21 +00:00
Nirbheek Chauhan
e881817567 vtenc, osxaudio: Fix missing since markers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
2024-12-16 18:52:21 +00:00
Nirbheek Chauhan
0c93eaec4f vtenc: Mark rate-control enum as plugin API, and update cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
2024-12-16 18:52:21 +00:00
Nirbheek Chauhan
dc5594c575 atenc: Add missing since markers and mark plugin API
Also update the plugin docs cache.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
2024-12-16 18:52:20 +00:00
Nirbheek Chauhan
21f221dad1 avfvideosrc: Add missing since markers for screen-crop properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
2024-12-16 18:52:20 +00:00
Nirbheek Chauhan
88cb48108a docs: Update macOS plugin docs again
Contains the following updates:

* New properties on avfvideosrc: screen-crop-*
* H265 and H265 Alpha support in vtdec and vtenc (VideoToolbox)
* ProRes support in vtenc
* New properties on vtenc elements: rate-control, data-rate-limits,
  max-frame-delay
* New plugin atenc (AudioToolbox) with support for encoding AAC
* Plugin move: atdec moved from -bad to -good
* New property on osxaudio elements: unique-id
* OS X -> macOS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
2024-12-16 18:52:20 +00:00
Nirbheek Chauhan
a3d3a61490 meson: Skip the plugins_doc_caches target if docs are disabled
This is a follow-up to 95eca6d919, due
to which the target existed, but was a no-op, and it was difficult to
notice why the plugin caches are not being generated, since the doc
option is disabled by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
2024-12-16 18:52:20 +00:00
Mathieu Duponchelle
7be4d09f14 cccombiner: expose new input-meta-processing type, force
In force mode, generated captions are discarded even if input video
buffers do not hold CC meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8091>
2024-12-16 15:43:20 +00:00
Nirbheek Chauhan
0c17efafa3 meson: Improve NVMM CUDA detection
1. Add some comments explaining what headers and libs are expected on
   what systems
2. Only look in default incdirs if no incdir is specified
3. Require libnvbufsurface.so on Jetson when cuda-nvmm=enabled
4. Require libatomic on Jetson when cuda-nvmm=enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8021>
2024-12-16 14:47:23 +00:00
Sebastian Dröge
8e0f0c5ae3 info: Use an RW lock to protect the log functions and their list
Previously the code tried to be thread-safe by only locking when modifying the
list and leaking the old list, but this was not sufficient. When removing a log
function, its user_data would be freed but this log function and its user_data
might afterwards still be used during logging which then could lead to memory
corruption.

To avoid that, use an RW lock: get a write lock whenever modifying the list and
get a read lock whenever only using the list of log functions for logging.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7151>
2024-12-16 13:28:13 +00:00
Seungha Yang
9962c57b5b d3d12: Suppress misleading leak report
Set may-be-leaked flag to child objects if needed,
since the parent object holding refcount of the child
will be leaked intentionally

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8152>
2024-12-16 09:47:21 +00:00
Thibault Saunier
1dd8085254 ges-launcher: return early on 'project-loaded' signal on error
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4102

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8145>
2024-12-16 08:49:41 +00:00
Thibault Saunier
a7ccbb073a ges: project: Add missing API guards
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8145>
2024-12-16 08:49:41 +00:00
Thibault Saunier
1aa3777d2e ges: formatter: Keep a reference on the timelines
We will be using it in an async way so we need to keep our own
reference to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8145>
2024-12-16 08:49:41 +00:00
Seungha Yang
eac069b46d d3d12: Add d3d12deinterlace element
Adding D3D12 compute shader based deinterlace element
with YADIF filtering

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8140>
2024-12-14 12:09:23 +00:00
Seungha Yang
e3348ea402 d3dshader: Add YADIF deinterlacing compute shader code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8140>
2024-12-14 12:09:23 +00:00
Max Romanov
477d330dee appsrc: Decrease log level for item drop
Leaky appsrc feature was implemented similar to queue. Dropping item
is a normal case because it is configured so. Warning messages
is too severe for this event.

Level changed to DEBUG just like in queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8147>
2024-12-13 17:24:44 +00:00
Thibault Saunier
5aadb25d0e ges-meta-container: Fix the GET_INTERFACE macro
It had a synthax issue

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/issues/141

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8146>
2024-12-13 16:37:54 +00:00
Dean Zhang (张安迪)
58696d57f9 videodecoder: set decode only flag by decode only buffer
This is used for optimize frame drop issue. Some video streams such as av1
contains decode-only frames. These frames are handled by decoder but not show
by display, which will cause input frame count unmatch the output frame count.
After collecting more decoder only frame, it will cause error report "so many
frame droped". So attach the flag GST_BUFFER_FLAG_DECODE_ONLY with the input
buffer, the v4l2videodecoder can further handle the decode-only buffer in
output list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8142>
2024-12-13 13:14:01 +00:00