Commit graph

8124 commits

Author SHA1 Message Date
Sebastian Dröge
4a040aa11d shout2send: Unref event at the end of the event function
The function takes ownership of it and should get rid of it at the end.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7992>
2024-11-29 10:12:00 +00:00
Edward Hervey
acf1efbf8d gl: Add missing Since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8001>
2024-11-29 08:44:30 +00:00
Víctor Manuel Jáquez Leal
1cc0a7d2bb vkencoder-private: keep only one DPB view for layered DPB
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7993>
2024-11-29 06:36:52 +00:00
Víctor Manuel Jáquez Leal
133011c9ba vkencoder-private: increase reference slots array
H264 has the maximum number of refs (36) of any supported codec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7993>
2024-11-29 06:36:52 +00:00
Víctor Manuel Jáquez Leal
479defdcf9 vkencoder_private: move view creation to picture init
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7993>
2024-11-29 06:36:52 +00:00
Víctor Manuel Jáquez Leal
15a3ebf01e vkencoder-private: shuffle up operation and query creation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7993>
2024-11-29 06:36:52 +00:00
Víctor Manuel Jáquez Leal
83cd24a30d vkencoder-private: shuffle up get format to bail out better
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7993>
2024-11-29 06:36:52 +00:00
Víctor Manuel Jáquez Leal
98d30cc30a vkencoder-private: define encoded feedback flags by removing override bit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7993>
2024-11-29 06:36:52 +00:00
Víctor Manuel Jáquez Leal
984956a6fe vkencoder-private: fix parameters overrides
First remove validations since they will fail if there isn't a write operation.
It's valid to pass data without write operations.

Finally, it should check for hasOverride in feedback info. Nonetheless, there's
a NVIDIA bug returning always FALSE for hasOverride, that's why we currently
force it to TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7993>
2024-11-29 06:36:52 +00:00
Philipp Zabel
c024c5e3bf gstgldmabufbufferpool: use gsteglimagecache
Store the imported GstEGLImage in a GstEGLImageCache. Since this passes
ownership to the cache, stop unreffing the images from the GstMemory.
Free the cache when the buffer pool is stopped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:28 -05:00
Philipp Zabel
f18d6fcb40 glupload/egl: Extract EGL image cache and make it public
Extract the EGLImage cache from gstglupload.c, place it in a separate
source file gsteglimagecache.c, and make the API public, so it can be
reused by the gldownload element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:28 -05:00
Nicolas Dufresne
a18f1af1a4 gldownload: Implement importing RGBA with modifiers
For single plane RGBA based formats, implement support for modifiers.
This fixes issues where linear is actually configured in GL causing
visual artifacts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:28 -05:00
Jakub Adam
b7970a4d95 gldownload: enumerate emulated video formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:28 -05:00
Jakub Adam
1ef9f6ab26 glcontext/egl: Fix use of uninitialized memory
At least some Mesa drivers (see llvmpipe_query_dmabuf_modifiers()) don't
initialize the provided external_only array, so some format/modifier
combinations could get incorrectly marked as only external.

Make sure we zerofill the array before passing it to
eglQueryDmaBufModifiersEXT().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:28 -05:00
Nicolas Dufresne
5b55930db8 gldmabufbufferpool: allow the dmabuf_pool configuration to change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:27 -05:00
Jakub Adam
533d115659 downloadelement: support dma_drm caps in try_export_dmabuf
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:27 -05:00
Jakub Adam
188b626ffc gldownload: import DMABufs from downstream pool
* if downstream provides us with a pool that can allocate DMA buffers,
  gldownload wraps it into a GL buffer pool that uses
  glEGLImageTargetTexture2DOES() to import dmabuf into textures
* upstream GL elements can allocate from that pool
* gldownload unwraps DMA buffers from incoming GL buffers and passes
  them downstream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:27 -05:00
Jakub Adam
270e186311 glcontext_egl: add method to check if format supports a modifier
Makes _check_modifier from glupload reusable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:27 -05:00
Jakub Adam
d80477d769 glupload: make _dma_buf_transform_* functions public API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 15:25:27 -05:00
Jakub Adam
57f36ed9d9 glupload: rename GstGLUploadDrmFormatFlags -> GstGLDrmFormatFlags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6792>
2024-11-28 13:46:08 -05:00
Nirbheek Chauhan
75848859f1 kms: Bump libdrm requirement to 2.4.108
DRM modifier support requires drmModeFormatModifierBlobIterNext()
which was added in 2.4.108. See:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5174#note_2673883

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7991>
2024-11-28 15:43:42 +00:00
wbartel
de41680f78 gstreamer: prefix debug dot node names to prevent splitting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7979>
2024-11-28 15:38:56 +00:00
Jan Alexander Steffens (heftig)
4586260191 cccombiner: Improve get_next_time to avoid spinning
Avoid aggregate getting called in a loop when timed out but we're not in
a state where we can produce a buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1746>
2024-11-28 14:37:07 +00:00
Jan Alexander Steffens (heftig)
0f2583d286 cccombiner: Add caption_pad field to avoid get_static_pad
Save a reference to the caption pad as well. This will make the
`get_next_time` implementation cheaper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1746>
2024-11-28 14:37:07 +00:00
Jan Alexander Steffens (heftig)
49ecde573c cccombiner: Pass caption_pad to schedule_caption
Avoid having to find this pad again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1746>
2024-11-28 14:37:07 +00:00
Jan Alexander Steffens (heftig)
9ef06d77a7 cccombiner: Add video_pad field to avoid pad get/ref/unref
Saving a reference to this always-present pad simplifies the code and
avoids a lot of pad list scans and refcounting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1746>
2024-11-28 14:37:07 +00:00
Mathieu Duponchelle
9cb2eb4b9b x264enc: expose nal-hrd property
It can be used to force true CBR, and will cause the encoder
to output null padding packets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/908>
2024-11-28 13:32:56 +00:00
Sebastian Dröge
05985247d1 streamsynchronizer: Only send GAP events out of source pads
If streamsynchronizer is waiting on the stream's sinkpad and srcpad at the same
time, it can happen that the GAP event is otherwise sent out of the sinkpad,
which is in the wrong direction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7950>
2024-11-28 12:38:07 +00:00
Tim-Philipp Müller
13f2b7dd74 discoverer: fix build with older glib versions
Follow-up to !7969

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7988>
2024-11-28 11:40:38 +00:00
Sebastian Dröge
835e232e8c rtspsrc: Use a flow combiner at the source pads instead of custom logic
Most importantly, this ensures that UDP streams still continue to run even if
they are not linked for a while. With decodebin3 the pads will all be unlinked
unless selected, and selecting a stream at a later time would otherwise switch
to a stream with a stopped udpsrc.

Apart from that this also ensures that actual errors from handling RTP packets
between udpsrc and the source pads are not silently ignored but considered
errors like they would be for TCP/interleaved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7946>
2024-11-28 09:40:21 +00:00
Sebastian Dröge
f880abba46 rtspsrc: Don't set pad event/query function twice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7946>
2024-11-28 09:40:21 +00:00
Víctor Manuel Jáquez Leal
603e7c3e5f vulkan: add gst_vulkan_video_image_create_view()
This function is moved from gstvkdecoder-private so it could be used by
gstvkencoder-private too, removing there what it should be duplicated code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7984>
2024-11-28 07:05:40 +01:00
Víctor Manuel Jáquez Leal
3389347467 vkencoder-private: fix documentation
The function doesn't take the reference from caller, it keeps it's own
reference, so transfer is none.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
b88f15406f vkencoder-private: fix code style and use gpointer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
20a0a46676 vkencoder-private: fix and complete public functions prechecks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
e9ef5e0c36 vkencoder-private: check for layered buffer when new picture
And balance `if` curly brackets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
066144f78c vkencoder-private: early return if dpb pool or dpb buffer already exist
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
52bd1931b8 vkencoder-private: usage structure is provided by caller
As all the profile structure, it's not intended to be filled in
gst_vulkan_encoder_start() function, but by the caller.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
a12daaca28 vkencoder-private: fix how to get bitstream buffer size
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
7a9bd2c9d4 vkencoder-private: doc: fix function name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
e79ff5a4f1 vkencoder-private: use gst_clear_object()
Instead of g_clear_object() for sake of coherence.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
5e78ffe87a vkencoder-private: fix return value to gst_vulkan_encoder_encode()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
751d628160 vkencoder-private: doc: remove (in) annotation
because it's the default one

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Víctor Manuel Jáquez Leal
af0e15e9be vkencoder-private: move out indent macros
Outside of the structures whenever is possible, given indent limitations. In this way
the code has a better readability.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Jonas Rebmann
225d6b7e11 v4l2videodec: fix freeze race condition
This fixes a possible deadlock between gst_v4l2_video_dec_change_state
and gst_v4l2_video_dec_loop on the buffer pool.

When stopping capture, the flushing state of the v4l2 capture buffer
pool gets reverted in the processing loop after it was set via
gst_v4l2_object_unlock (self->v4l2capture) (in
gst_v4l2_video_dec_change_state). As a result, gst_v4l2_video_dec_loop
does not return and consequently, gst_pad_stop_task gets stuck waiting
for the GST_PAD_STREAM_LOCK. To circumvent this, skip acquiring the
buffer pool if stopping capture.

Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7958>
2024-11-27 17:42:11 +00:00
Sebastian Dröge
ccb40ca7d0 discoverer: Fix formatting of a debug log string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7969>
2024-11-27 16:48:55 +00:00
Sebastian Dröge
27a2fa73bc discoverer: Move cache file tracking from GstDiscovererInfo into GstDiscoverer
It's only used temporarily during discovery and makes no sense as part of the
resulting info.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7969>
2024-11-27 16:48:55 +00:00
Sebastian Dröge
9e4c173c3c discoverer: Move stream counter from GstDiscovererInfo into GstDiscoverer
It's only used temporarily during discovery and makes no sense as part of the
resulting info.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7969>
2024-11-27 16:48:55 +00:00
Sebastian Dröge
dc3f2c6721 discoverer: Also copy missing element details when copying a GstDiscovererInfo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7969>
2024-11-27 16:48:55 +00:00
Sebastian Dröge
d553448b95 discoverer: Make sure the missing elements details array is NULL-terminated in a thread-safe way
And also avoid a possible out-of-bounds read if the array contains no elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7969>
2024-11-27 16:48:55 +00:00
Xi Ruoyao
ee3802cf71 x265: Allow building with x265-4.1
In x265-4.1 masteringDisplayColorVolume is changed from a pointer to a
character array embedded in struct x265_param.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7968>
2024-11-27 13:04:57 +00:00
Nirbheek Chauhan
23a006c64f meson: Don't unconditionally invoke the libsoup subproject
fallback: kwarg will invoke the specified subproject even if required:
false, which is not what we want here.

Reported at https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4045#note_2674340

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7965>
2024-11-27 12:12:36 +00:00
Tomáš Polomský
fa1ed5d210 appsink: fix timeout logic for gst_app_sink_try_pull_sample
In case of gst_app_sink_try_pull_object returns an object instead of a sample,
the whole process must be restarted with the reduced timeout, otherwise requested
timeout could be easily exceeded.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7962>
2024-11-27 11:09:47 +00:00
Mathieu Duponchelle
b433d72a4d cccombiner: expose input-meta-processing property
It can be used to discard closed captions from the input pad if the
matching video buffer already held closed captions.

It is useful in a scenario where captions are generated for an AV
stream, but the incoming stream already has embedded captions for
some intervals, and those original captions should be preferred.

It can also be used to make sure input CC meta is always dropped,
the default behavior remains to append aggregated CC to whatever
CC meta was already present on the input video buffer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6072>
2024-11-27 10:02:22 +00:00
Matthew Waters
e2d388000c qt(6)/material: ensure that we always update the context in setBuffer()
Scenario is that there are two (or more) GstGLContext's wrapping Qt's GL
context from either multiple qml(6)glsink or qml(6)glsrc elements.  Call flow is this:

1. material 1 setBuffer()
2. material 1 bind()
3. material 2 setBuffer()
4. material 2 bind()

If the call to setBuffer() reuses the same buffer as previous call, then the
qt context is not updated in the material.  If however the previously used qt
context by the material had been deactivated or freed, then bind() would fail
and could result in a critical like so:

gst_gl_context_thread_add: assertion 'context->priv->active_thread == g_thread_self ()' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7970>
2024-11-26 22:57:51 +00:00
Nirbheek Chauhan
3540b33597 meson: Use new has_tools kwarg to avoid unnecessary lrelease dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7937>
2024-11-26 18:32:44 +00:00
Seungha Yang
6bcedb0d8b d3d12converter: Gamma LUT related enhancements
* Build gamma LUT using shader, instead of CPU side math then uploading
* Make gamma LUT sharable across multiple converters

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7951>
2024-11-26 16:06:08 +00:00
Seungha Yang
f3191aca58 d3dshader: Add shader for building gamma LUT
Newly added shader will be used by converter to construct
gamma encode/decode LUT texture

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7951>
2024-11-26 16:06:08 +00:00
Jan Alexander Steffens (heftig)
59d98aa4ac ccutils: Rename wrote_first to write_field1
This better describes what we're doing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7967>
2024-11-26 14:02:24 +00:00
Jan Alexander Steffens (heftig)
9a3b4dff24 ccutils: Fix a typo in cc_buffer_take_cea608_field2
There are no users of cc_buffer_take_cea608_field2, so this never was a
problem.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7967>
2024-11-26 14:02:24 +00:00
Jan Alexander Steffens (heftig)
a6a5401891 ccutils: Fix a typo in max_buffer_time handling
All users set max_buffer_time to GST_CLOCK_TIME_NONE, effectively
infinite, so this never was a problem.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7967>
2024-11-26 14:02:24 +00:00
Jan Alexander Steffens (heftig)
3a119b20b3 ccutils: Remove broken branch
This branch was added in dd00dab5e9 but is
never actually taken, as it requires `cc_data` to be null but
`cc_data_len` to be non-null. It would then dereference the null
`cc_data`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7967>
2024-11-26 14:02:24 +00:00
Philippe Normand
5a6594dea5 meson: Check for libsoup only if required
LibSoup is needed for the soup and adaptivedemux2 plugins, so there is no need
to do the lookup if none of those plugins is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7964>
2024-11-26 12:40:45 +00:00
Albert Sjolund
c31cbda5de webrtc: don't crash on invalid bundle id
If the bundle id forwarded to connect_rtpfunnel is not valid,
the assertion fails and crashes the program. This is now instead
an error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7963>
2024-11-26 09:27:20 +01:00
Tomáš Polomský
7008e76c62 v4l2object: Fixed incorrect maximum value for int range
There are objects where maximum is not multiplication of the step,
e.g. there was a combination where max was 65535 with step 2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7953>
2024-11-25 19:33:40 +01:00
wbartel
6f20cd69fe tracers: unlock leaks tracer if already tracking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7954>
2024-11-25 17:58:47 +00:00
Sebastien Cote
5b5c4147d3 vtenc: add support for the HLG color transfer
Fixes #4047

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7947>
2024-11-25 16:45:20 +00:00
Stéphane Cerveau
7dfed55929 vkoperation: update doc to skip barriers array methods
Some methods are using arrays of element which type can
vary at compile time. These methods should not
be introspectable as it's not possible to determine
the final type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7880>
2024-11-25 15:24:17 +00:00
Sebastian Dröge
025b4a2f8d splitmuxsrc: Convert part reader to a bin with a non-async bus
A pipeline always has an async bus, which involves allocating an fd pair. As
splitmuxsrc only uses the bus' sync handler, this is not required and can easily
cause splitmuxsrc to exceed the fd limit for no good reason.

The other features of GstPipeline are also not needed here, e.g. clock selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7952>
2024-11-25 15:55:50 +02:00
Edward Hervey
18b941dfd5 decodebin3: Unify collection switching checks
We only want to switch to a selection of an output collection if all streams are
present.

This was previously only done in one place (when triggering by new incoming
streams) but not when triggered by user/application.

Avoid this by moving the check to handle_stream_switch()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7941>
2024-11-25 08:03:38 +00:00
Zhong Hongcheng
821754e2d5 tests: Add the VVC(H266) parser test cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5003>
2024-11-24 16:49:25 +00:00
He Junyan
24944fd153 libs: codecparsers: Implement the VVC(H266) parser part II
Implement the picture header, slice header and SEI parsing functions.

Co-authored-by: spartazhc <spartazhc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5003>
2024-11-24 16:49:25 +00:00
He Junyan
5005d555a1 libs: codecparsers: Implement the VVC(H266) parser part I
Implement all the VPS, SPS and APS parsing functions.

Co-authored-by: spartazhc <spartazhc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5003>
2024-11-24 16:49:25 +00:00
He Junyan
1ec9f829d1 libs: codecparsers: Add the VVC(H266) parser header file
Co-authored-by: spartazhc <spartazhc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5003>
2024-11-24 16:49:25 +00:00
He Junyan
df7a0d0fec utils: Add gst_util_floor_log2 helper function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5003>
2024-11-24 16:49:24 +00:00
Diego Nieto
c10c55bc5a rtpsource: include config.h header to avoid g_memdup2 link issue
Without adding the header a link issue related g_memdup2 might happen.
In versions below 2.67.4 that symbol is manually introduced in the
meson config files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7933>
2024-11-21 01:11:22 +00:00
Andoni Morales Alastruey
7b408bae69 discoverer: fix segfault in race condition adding a new uri's
There is a race condition adding new uri's right after receiving
the `discovered` event. We must wait until we have cleaned-up
the last discovery to start processing the new one

Fix #3758

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7930>
2024-11-20 21:36:30 +00:00
Thibault Saunier
f8d9412e4b hlsdemux2: Handle needing more data when draining segment
Some streams in the wild have empty segments at the beginning and
hlsdemux2 use to stall forever while we can handle it by processing
the following ones. The gap handling mechanism in adaptivedemux2
works properly and pushes the required gaps.

Update validate medias so the hls stream is present.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6034>
2024-11-20 20:55:19 +00:00
Nicolas Dufresne
dccddf203f qmlgl6src: Use downstream pool when available
This make use of the pool that has been negotiated with downstream in the
decide_allocation function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7904>
2024-11-20 19:30:39 +00:00
Nirbheek Chauhan
c1a8ee9655 meson: Don't use libdrm_dep in cc.has_header()
It can't handle subproject dependencies. Pointed out in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4033#note_2665974

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7927>
2024-11-20 17:47:01 +00:00
L. E. Segovia
51c6aa9e2f cmake: Add Android libvulkan to the ignored system libraries
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7861>
2024-11-20 16:45:44 +00:00
L. E. Segovia
5154f43b58 examples: Port Android examples to CMake
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7861>
2024-11-20 16:45:44 +00:00
L. E. Segovia
da0e6c62ac examples: webrtc: Update Android example to libsoup 3.0
Cerbero 1.26 no longer ships 2.4, this wasn't ported earlier because the examples aren't built in CI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7861>
2024-11-20 16:45:44 +00:00
Seungha Yang
44cb3025ff d3d12: Add gst_d3d12_flush_all_devices() method
... and removing implicit flushing behavior on GstD3D12Device::finalize

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7929>
2024-11-20 15:44:58 +00:00
Sebastian Dröge
8a88cd541d aja: Fix infinite loop in device provider
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7928>
2024-11-20 08:48:31 +00:00
Nicolas Dufresne
a966f03cd7 wayland: dmabuf: Translate tiled strides
GStreamer uses a different representation of tiled strides that needs
to be translated before being sent to wayland.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Nicolas Dufresne
9f707f6c64 glupload: dmabuf: Only pass padded size for indirect tiled handling
We only require out_info to hold on padded width/height when
using our internal detiling shaders. Doing so for direct upload
leads to the image being scaled down in a way that the padding
is displayed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Nicolas Dufresne
e9b2e98ef7 v4l2codecs: Use new helpers for DRM handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Nicolas Dufresne
bd40057130 v4l2codecs: Fix caps string leak in v4l2codecs
Unlike gst_video_format_to_string(), gst_video_dma_drm_fourcc_to_string()
return a freshly allocated string which needs to be free.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
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
Benjamin Gaignard
0847f7fbe1 video: dma-drm: Add DRM vendor modifiers list
Copy DRM vendor modifier IDs from drm_fourcc.h

Add Vivante modifier definition and map GST_VIDEO_FORMAT_NV12_4L4 and
GST_VIDEO_FORMAT_NV12_10LE40_4L4 accordingly. Also add Samsung 64Z32 tiled
format mapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Benjamin Gaignard
18a90f9180 video: dma-drm: Add NV15, NV20 and NV30 DRM formats definitions
Cherry pick DRM NV15, NV20 and NV30 formats definitions from drm_fourcc.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Nicolas Dufresne
80a4d36522 video: dma drm: Fix modifier definition on 32bit
The modifiers are 64bit, add missing ULL suffix so that the compiler does
not complain on 32bit platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Benjamin Gaignard
afd8bf807d video: dma-drm: Add modifier field to FormatMap
A GST_VIDEO_FORMAT_* could be mapped to only one pair of DRM_FORMAT_*
and DRM_FORMAT_MOD_*. Until now only DRM_FORMAT_MOD_LINEAR was used.
To be able to add other modifiers add a modidier field in struct FormatMap.
Create a helper functions the allow turning a GstVideoFormat into a pair
of DRM fourcc and modifier and vis-versa.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
2024-11-19 21:22:38 +00:00
Philippe Normand
b6c7280868 sdp: Add debug categories for message and mikey modules
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7924>
2024-11-19 18:54:32 +00:00
Marek Olejnik
6f0304fc72 navigationtest: Fix plugin description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7922>
2024-11-19 17:24:51 +00:00
Qian Hu (胡骞)
1d45fbc56b v4l2object: pass buffer align info for upstream
if downstream v4l2 output has large alignment requirement
this patch will pass align info for upstream element
and decide allocation will use these info to meet alignment
requirement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7201>
2024-11-19 15:27:38 +00:00
Qian Hu (胡骞)
53007b5d83 docs: update fields about gst video aligment
1) add stride align fields in allocation.md
2) add stride align fields in gstvideometa.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7201>
2024-11-19 15:27:38 +00:00
Qian Hu (胡骞)
6335c5d005 meta: add aggregation function for allocation meta api params
since tee do allocation query for each downstream element, and
get allocation query params from them. this function will aggregate
all params, and propose it for upstream element of tee

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7201>
2024-11-19 15:27:38 +00:00
Nicolas Dufresne
be95be4b31 video: pool: Make structure const when getting video alignment
Downgrade to const, this is backward compatible make makes the API compatible
wit more usages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7201>
2024-11-19 15:27:38 +00:00
Thibault Saunier
45806c4d66 gl: colorconvert: Add support for I422_10XX and I422_12XX
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7919>
2024-11-19 12:39:01 +00:00
Guillaume Desmottes
ac04d9b7b1 libav: avviddec: log the old resolution when updating the pool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7913>
2024-11-19 08:04:00 +00:00
Guillaume Desmottes
7d49740269 libav: viddec: provide details if meta has the wrong resolution
Will produce a more useful assert error message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7913>
2024-11-19 08:04:00 +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
Albert Sjolund
f068b3bf5c gstpad: specialize gst_pad_chain_list_default
In the case where the bufferlist is writable, send the
buffers immediately without adding to the refcount. This
allows writable buffers to maintain their writability, even
without implementing a chain_list function on the element.

Adds a test to verify this property, where a writable list
maintains refcount 1, but a readonly list increases it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7894>
2024-11-18 10:59:34 +00:00
Robert Rosengren
6fff1ef971 gstdeviceprovider: fix leaking hidden providers
Free list of hidden providers upon stop and dispose.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7912>
2024-11-18 09:20:34 +01:00
Matthew Waters
c3d4d500e0 vaapi/display_wayland: silence a maybe-unitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:58 +11:00
Matthew Waters
26d581041a vaapi/display_drm: silence a maybe-unitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:58 +11:00
Matthew Waters
e993e0e981 vaapi/encoder: silence a maybe-unitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:58 +11:00
Matthew Waters
1814d7ae11 rtph26xpay: silence some maybe-unitialized warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:58 +11:00
Matthew Waters
c7ee7c65ae validate/gapplication: silence a maybe-unitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:58 +11:00
Matthew Waters
995dcb04e0 tests/onvif: silence a maybe-unitialized warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:58 +11:00
Matthew Waters
c0f4a855cc ges/clip: silence some maybe-unitiailized warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11: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
bf22f282eb encodebin: 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
e2d143f65d oggdemux: 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
3743f69c85 souphttpsrc: silence some maybe-uninitialized warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Matthew Waters
d98c83b297 v4l2videodec: silennce some maybe-uninitialized warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Matthew Waters
7b526775b4 rtsp-server-media-factory: silence some maybe-unused warnings
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
Matthew Waters
8e758c715b value: silence a maybe-unitialized warning
gstvalue.c:376:8: error: ‘s_val’ may be used uninitialized [-Werror=maybe-uninitialized]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Albert Sjolund
72edd65710 rtpmanager: don't map READWRITE in twcc header ext
There is no need to map the buffer as writable, as there is
only a read performed on the mapped buffer. This is in line
with other header extensions, as no other extensions maps
it as readwrite.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7895>
2024-11-17 10:00:12 +00:00
Philippe Normand
827caa662c playbackutils: Fix caps leak in get_n_common_capsfeatures()
The gst_static_caps_get() return value is transfer-full.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7908>
2024-11-16 18:24:23 +00:00
Nicolas Dufresne
000a7650fc glupload: Upgrade uploader selection message to INFO
This allow using INFO log to quickly see what uploader we
picked. This is very useful as the DEBUG category has became
very noisy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7891>
2024-11-16 12:30:34 +00:00
Nicolas Dufresne
3c8b1427ca glupload: dmabuf: Fix emulated tiled import
The added check for LINEAR modifier broke dmabuf import for
NV12 emulation (R8/RG88) of all sort (linear and tiled).

Fixes !5461

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7891>
2024-11-16 12:30:34 +00: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
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