Commit graph

8103 commits

Author SHA1 Message Date
Sebastian Dröge
3cdf206f4f jpegdec: Directly error out on negotiation failures
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-247
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3862

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8040>
2024-12-03 15:26:04 +00:00
Sebastian Dröge
5093691ef2 vorbisdec: Set at most 64 channels to NONE position
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-115
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3869

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8035>
2024-12-03 14:30:41 +00:00
Sebastian Dröge
4c40f73b70 subparse: Check for NULL return of strchr() when parsing LRC subtitles
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-263
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3892

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8039>
2024-12-03 13:13:40 +00:00
Sebastian Dröge
403b10eba0 ssaparse: Don't use strstr() on strings that are potentially not NULL-terminated
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8036>
2024-12-03 12:03:49 +00:00
Sebastian Dröge
15bb318416 ssaparse: Search for closing brace after opening brace
Otherwise removing anything between the braces leads to out of bound writes if
there is a closing brace before the first opening brace.

Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-228
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3870

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8036>
2024-12-03 12:03:49 +00:00
Sebastian Dröge
aa07d94c10 discoverer: Don't print channel layout for more than 64 channels
64+ channels are always unpositioned / unknown layout.

Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-248
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3864

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8034>
2024-12-03 10:33:22 +00:00
Mathieu Duponchelle
e633ec6428 oggstream: review and fix per-format min_packet_size
This addresses all manually detected invalid reads in setup functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8038>
2024-12-03 08:59:25 +00:00
Mathieu Duponchelle
006047a23a vorbis_parse: check writes to GstOggStream.vorbis_mode_sizes
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-117 Fixes gstreamer#3875

Also perform out-of-bounds check for accesses to op->packet

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8038>
2024-12-03 08:59:25 +00:00
Sebastian Dröge
2838374d6e opusdec: Set at most 64 channels to NONE position
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-116
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3871

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8037>
2024-12-03 08:09:09 +00:00
Sebastian Dröge
537161868f id3v2: Don't try parsing extended header if not enough data is available
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-235
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3842

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8033>
2024-12-03 03:29:34 +00:00
Sebastian Dröge
f8e398c46f qtdemux: Avoid integer overflow when parsing Theora extension
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-166
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3851

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8032>
2024-12-03 02:24:16 +00:00
Sebastian Dröge
f1cdc6f243 allocator: Avoid integer overflow when allocating sysmem
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-166
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3851

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8032>
2024-12-03 02:24:16 +00:00
Jakub Adam
2209d4382f gldownload: warn on fallback from DMABuf to system memory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8013>
2024-12-02 20:25:37 +00:00
Nicolas Dufresne
85969fdaa7 level: Fix integer overflow when filling LevelMeta
The level in GstAudioLevelMeta is represented as a signed 8bit value from 0 to
127 (with 127 meaning silence). When converting from double, make sure to clip
the value, this also prevent integer overflow in the conversion. This fixes an
issue where a lower then -127db is reported and random level with near silent
streams (due to integer overflow).

Fixes #4068

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8012>
2024-12-02 19:08:49 +00:00
Pablo Sun
4507f92b0d kmssink: Add mediatek auto-detection
Add MediaTek display controller into list of
auto-detected modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8023>
2024-12-02 16:43:45 +00:00
Xavier Claessens
fa57d776d8 videorate: convert next_ts to new segment instead of restarting from 0
When receiving a new segment we should not restart PTS from the new
segment' start. Instead convert current position into the new segment if
possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7977>
2024-12-02 15:45:20 +00:00
Xavier Claessens
bfc4812bbe audiorate: convert next_ts to new segment instead of restarting from 0
When receiving a new segment we should not restart PTS from the new
segment' start. Instead convert current position into the new segment if
possible.

Fixes: #4060
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7977>
2024-12-02 15:45:20 +00:00
Xavier Claessens
0d8bdaaf17 audiorate: Always push updated segment
Convert segment to TIME format immediately instead of waiting for
_chain() to be called. This fixes converted segment never being pushed
downstream.

Fix the convert function that was copying some fields in the wrong
direction. Add fast copy if segment is already in TIME format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7977>
2024-12-02 15:45:20 +00:00
Alicia Boya García
fbad7b593d validate-scenario: Fix busy waiting, missing lock
execute_next_action_full() logs that it removes the source when an
action returns ASYNC, but the code for that was incomplete, as it was
setting source_id to zero but not actually removing the source.

This lead to execute_next_action_full() being run continuously, only
alliviated by the default 10ms interval in the GSource from
`scenario->priv->action_execution_interval`.

This patch fixes that. As a drive-by fix it also adds locking to one
remaining unlocked usage of `priv->execute_actions_source_id`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8014>
2024-12-02 14:36:59 +00:00
Philippe Normand
c683cdc914 rtp: Fix precision loss in gst_rtcp_ntp_to_unix()
Without this patch the UNIX timestamp resulting from the translation from NTP
would be off by one nano-second.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8010>
2024-12-02 10:24:01 +00:00
Sebastian Dröge
1ee349f986 systemclock: Don't keep the clock entry locked while getting the time from the clock
gst_clock_get_time() will take the clock mutex, which would then result in a lock
order violation and possible deadlocks. If both mutexes are to be locked, the
clock must always be locked first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7994>
2024-12-02 08:21:59 +00:00
Sebastian Dröge
ec698179a9 systemclock: Get rid of conditional unlocking of the clock entries
At every point it is known whether the entry needs to be unlocked or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7994>
2024-12-02 08:21:59 +00:00
Sebastian Dröge
4447114713 systemclock: Remove confusing conditional unlock
At this point the entry is always locked and needs to be unlocked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7994>
2024-12-02 08:21:59 +00:00
Sebastian Dröge
37b9bfdd2e systemclock: Use a flag while waiting for the async thread to start
Otherwise there can be spurious wakeups.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7994>
2024-12-02 08:21:59 +00:00
Sebastian Dröge
3cdc14df99 flvmux: Fix off-by-one in month/day-of-the-week array
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4074

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8017>
2024-12-01 09:49:29 +00:00
Sebastian Dröge
f7aac1cc07 rtsp: Fix off-by-one in month/day-of-the-week array
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8017>
2024-12-01 09:49:29 +00:00
Alicia Boya García
835bc0eef2 validate.py: Fix warning about wrong escape
There were a couple strings containing \(. That is not a valid escape
sequence in Python. The escape sequence was meant for GStreamer, and as
such either the backslash should be doubled or a raw string must be
used. This patch uses the latter for readability.

Python 3.13 will print a warning when a invalid escape sequence in a
string is found.

As a drive-by fix, this patch fixes fixes whitespace issues in the file
to make the Python linter happy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8015>
2024-11-30 15:22:08 +00:00
Olivier Crête
f2c08099fd v4l2src: Handle framerate not being a range
The framerate can be a range or a fraction, one now needs to handle both
cases. If it's not a range, then the framerate needs to be exactly the same.

Also avoid leaking the GstStructure

Fixes a regression introduced by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7850

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8000>
2024-11-29 19:45:31 +00:00
Sebastian Dröge
73ab6adaf5 rtspsrc: Update version of tcp-timestamp property to 1.24.10
It was backported to 1.24.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8005>
2024-11-29 11:12:04 +00:00
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