1413 Commits

Author SHA1 Message Date
Doug Nazar
bf05a050e9 audiomixer: Switch to GST_AUDIO_NE()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8984>
2025-05-14 14:45:55 -04:00
Doug Nazar
af2b6b4c38 adder: Switch to GST_AUDIO_NE()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8984>
2025-05-14 14:45:55 -04:00
Doug Nazar
e4f60e44ee gstglfiltershader: Free various props before set & during cleanup
gst_object_replace() takes a reference so no need to dup object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8978>
2025-05-13 19:42:37 -04:00
Alexander Slobodeniuk
d437e92049 properties: add G_PARAM_STATIC_STRINGS where missing
"Hold on, I know you need to generate the registry, but let me just
create copies of all those strings first", Framework whispered

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8915>
2025-05-10 12:09:38 +00:00
Sebastian Dröge
999c43ada1 mikey: Avoid infinite loop while parsing MIKEY payload with unhandled payload types
Skip over the unhandled payload types for now, and error out if an unknown
payload type is found.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8917>
2025-05-07 05:56:53 +00:00
Jakub Adam
9f4f543bf7 gldownload: improve logging of gl-dmabuf pool usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8938>
2025-05-06 19:50:43 +00:00
Jakub Adam
f9941b135f gldmabufferpool: disable "free cache" workaround in GstGLBufferPool
This pool isn't reusing its buffers, which makes it pointless to enable
the cache

Holding an extra  buffer in free queue can also lead to a deadlock when
the pool's max buffer count is configured low (commonly 2).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8939>
2025-05-06 18:22:19 +00:00
Xavier Claessens
352a8a8b12 unifxfdsink: Add an property to allow copying
By design, unixfd is meant to be used for zero-copy and failing when the data is
not FD based memory is wanted to help debug pipelines. Though, there exists
cases, notably with RTP payloader and demuxers, where its not possible
to get all the data into FD memory through allocation queries.

To allow using unixfd for these cases, introduce a property on the unixfdsink
that enable copying the non FD data into freshly allocated memfd.

Co-authored-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8861>
2025-05-05 19:15:56 +00:00
Tim-Philipp Müller
128710caab meson: rename meson_options.txt to meson.options
Which is supported since Meson 1.1:
https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8651>
2025-05-03 10:38:25 +01:00
Elliot Chen
c3d8347c81 gl/x11: check whether the display is x11 before using it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8808>
2025-05-02 01:39:33 +00:00
Nirbheek Chauhan
1fdfab27a3 meson: Add include_type: 'system' everywhere to squelch wrap warnings
Wrap dependencies add a ton of warnings with the latest GCC in Fedora
42. Squelch them by specifying that these dependencies are not
a part of the gstreamer project, and should be treated as system deps.

libsoup needs some porting work for the bump, and vorbis/lame are
already at their latest releases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8753>
2025-04-30 10:18:56 +00:00
Biswapriyo Nath
eeb27f1c71 gstaudioutilsprivate: Fix gcc 15 compiler error with function pointer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8904>
2025-04-28 06:45:16 +00:00
Alexander Slobodeniuk
a03c4de48f elements: use set_static_metadata when it's allowed
Those strings are nice but CPU doesn't want to copy them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8905>
2025-04-26 19:30:15 +02:00
Sebastian Dröge
fe7cb2e5b1 appsrc: Only notify drop property and not in/out
This mirrors the behaviour of audiorate / videorate better and observing in/out
buffers can be achieved more cheaply via other means.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8866>
2025-04-22 09:02:53 +03:00
Sebastian Dröge
9920897c4a appsink: Only notify drop property and not in/out
This mirrors the behaviour of audiorate / videorate better and observing in/out
buffers can be achieved more cheaply via other means.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8866>
2025-04-22 09:02:53 +03:00
Nicolas Dufresne
8c7ad20e4e doc: Update cache for plugins automatically picks NV16_10LE40
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5612>
2025-04-17 15:36:06 +00:00
Nicolas Dufresne
239c0eb5f8 video: Add 10bit 422 NV16_10LE40 format
Similar to NV12_10LE40, this is a 422 variant. This format is also named
NV20 (20bit per pixels) in other stack and is produced by rkvdec
decoder.

Co-authored-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5612>
2025-04-17 15:36:06 +00:00
Sebastian Dröge
37629385d0 videoencoder: Use the correct segment and buffer timestamp in the chain function
The only thing that can be used in the chain function is the input segment. The
output segment might not be available at all yet or out of sync with the current
input segment.

Also because of that, the unadjusted timestamp has to be used for the
calculations as the adjustment is only part of the output segment.

This fixes the deadline calculation and the handling of force-keyunit events for
encoders using frame reordering (i.e. setting a minimum PTS).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8842>
2025-04-15 14:26:08 +03:00
Sebastian Dröge
9adf26cfd1 base: Update plugins docs cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8824>
2025-04-15 09:28:27 +03:00
Sebastian Dröge
20739fa673 appsrc: Allow changin leaky-type in PLAYING state
No reason not to.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8824>
2025-04-15 01:18:33 +00:00
Sebastian Dröge
295c409115 appsrc: Add in/out/dropped and silent properties
This allows tracking how many buffers the appsrc has processed so far, similar
to the same properties on videorate / audiorate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8824>
2025-04-15 01:18:33 +00:00
Sebastian Dröge
68cf7a0df1 appsink: Add in/out/dropped and silent properties
This allows tracking how many buffers the appsink has processed so far, similar
to the same properties on videorate / audiorate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8824>
2025-04-15 01:18:32 +00:00
Sebastian Dröge
bdf39c3270 appsrc: Correctly protect leaky-type property by mutex and signal on change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8824>
2025-04-15 01:18:32 +00:00
Sebastian Dröge
3450050b1a appsink: Add new leaky-type property
For symmetry with appsrc. As part of this, also deprecated the drop property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8824>
2025-04-15 01:18:32 +00:00
Sebastian Dröge
ed75968ff5 appsink: Add current-level-buffers, bytes and time properties
appsrc (and queue and others) already have the same properties so let's
add them here for consistency too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8824>
2025-04-15 01:18:32 +00:00
Philippe Normand
c4bfa73391 oggdemux: Don't push new packets if there is a pending seek
There was a race condition where the demuxer would seek back to beginning after
determining the duration and while that seek was in progress one pad would
attempt to push a new buffer downstream, leading to a critical warning in
gst_pad_push().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8785>
2025-04-14 10:15:05 +01:00
Hou Qi
bf24ca6d29 gldownload: unref glcontext after usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8807>
2025-04-10 09:27:04 +00:00
Carlos Rafael Giani
9ffab2199d audiobasesink: Fix custom slaving driftsamples calculation
driftsamples currently uses the requested skew directly, even if it
exceeds cexternal.

Use the approach that skew_slaving uses to fix this. As a side benefit,
this makes the custom_slaving and skew_slaving code easier to compare.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8605>
2025-04-10 06:41:13 +00:00
Carlos Rafael Giani
a59810ef97 examples: Add custom audio clock slaving callback example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8605>
2025-04-10 06:41:13 +00:00
Thibault Saunier
c48ba1ae10 discoverer: Enhance debug logging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8803>
2025-04-09 17:19:01 +00:00
Jakub Adam
98bcd041d1 fdmemory: add gst_fd_allocator_alloc_full()
Allows allocating FD memory with offset != 0 and size != maxsize.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8025>
2025-04-07 14:51:47 +00:00
Matthew Waters
0b611ce703 glcolorconvert: fix YUVA<->RGBA conversions
Alpha should not impact the YUV/RGB conversion and should simply be copied
over.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8765>
2025-04-03 07:08:51 +00:00
Jochen Henneberg
6f623af4d7 videorate: Revive 'new-pref' property
The 'new-pref' property sets the preference to use the new (next)
instead of the old (previous) buffer. The default is set to 0.5 to get
a similar behaviour as before the change.

Value 0.0 makes sure that only frames are shown where it's known that
the frame content is visible at that time, always show the old frame
until the new frame timestamp is reached.

Then, if the next buffer replaces the previous buffer the new buffer
is pushed as often as possible until PTS is reached. Before the new
buffer was only pushed once the new next buffer arrived.

Use GstClockTimeDiff because it's known that the current buffer time
is inside the time interval of previous buffer and next buffer the
calculation can be done with building absolute values. Special macros
are not needed here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8579>
2025-04-01 10:15:34 +00:00
Alexander Slobodeniuk
a776793969 audioaggregator: fix chaining up to parent class (again)
An error was added in !8416, it was calling to the
wrong parent class

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8740>
2025-03-31 11:29:03 +00:00
Doug Nazar
12932ecc90 uridecodebin3: Free various props before being set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
5a19c4a4ae theoraenc: Free various props before being set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
3a20c0bca3 gl: Free various props during cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
a7dce91f0d alsamidisrc: free ports during finalize()
If the element is never start/stopped the ports variable will leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
5f90a4ae67 all: Annotate *_set_property() contructor only props without free
Properties that are marked constructor only aren't required to be freed
before g_value_dup_string() as they can only be called once during construction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Víctor Manuel Jáquez Leal
ca04a4cd44 gl: eglimage: warn the reason of export failure
So people debugging could know what's happening at debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8672>
2025-03-27 08:10:53 +00:00
Víctor Manuel Jáquez Leal
146b49fd9e gl: eglExportDMABUFImageQueryMESA expects modifiers to be an array
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8672>
2025-03-27 08:10:53 +00:00
Philippe Normand
5bd36c694c device-monitor: Deinitialize GStreamer before exiting
Nice to have when using the leak tracer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8670>
2025-03-27 00:40:56 +00:00
Sebastian Dröge
c2be97d591 videotimecode: Add missing 119.88fps support to some functions
And while at it generalize the drop frame handling to all integer multiples
of 30000/1001 fps.

Also adjust tests accordingly and add some other missing test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8649>
2025-03-26 09:32:36 +02:00
Sebastian Dröge
18798440e3 videotimecode: Fix conversion of timecode to datetime with drop-frame timecodes
gst_video_time_code_to_date_time() simply calculated the date time based on
adding the hours/minutes/seconds to the daily jam. This causes a gap every full
minute (except for every 10th minute) with drop-frame timecodes as the first 2
(29.97fps) or 4 (59.94fps) timecodes are skipped (not frames!), e.g. with
29.97fps:

timecode: 12:00:59;28  12:00:59;29  12:01:00;02  12:01:00;03
time    : 12:00:59.950 12:00:59.983 12:01:00.017 12:01:00.050

and not

time    : 12:00:59.934 12:00:59.968 12:01:00.067 12:01:00.100
                        |-- gap of 2 frames --|

The correct calculation would be to use gst_video_time_code_nsec_since_daily_jam()
and add that to the daily jam.

Also add a test for this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8649>
2025-03-26 09:32:36 +02:00
Marc Leeman
f2b5c0b602 meson.build: test for and link against libatomic if it exists
It's needed on some platforms for some subset (or all) atomic operations and
checking for the cases when it's actually needed is quite complex.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8637>
2025-03-14 15:12:33 +00:00
Edward Hervey
235b0acd63 decodebin3: Don't avoid parsebin even if we have a matching decoder
This is too brittle, there is no guarantee that the input stream has been
properly parsed.

There is another check above (is_input_parsed) that will skip that if the
content came from `urisourcebin` and had a parser applied

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8641>
2025-03-14 09:40:35 +01:00
Olivier Blin
9b47a2dde3 alsadeviceprovider: Fix leak of Alsa longname
Detected by ASan.

As a drive-by fix, use free() instead of g_free() in gstalsadeviceprovider.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8619>
2025-03-13 01:01:39 +00:00
Tim-Philipp Müller
bd3aabbc25 videorate: add support for JPEG-XS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8601>
2025-03-13 00:11:52 +00:00
Edward Hervey
6454698f82 urisourcebin: Make parsebin activation more reliable
`parsebin` is potentially added by a `typefind` callback.

That `typefind` was activated by a `READY_TO_PAUSED` state change on `urisourcebin`

We want to ensure that it is the "setup_parsebin_for_slot" method that activates
the underlying `parsebin`, and not the external state-change.

Otherwise we would risk a potential deadlock where elements activating in
`parsebin`, and which would cause the upstream `typefind` to switch scheduling
mode, would not be able to acquire the STREAM_LOCK of the `typefind` task.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8511>
2025-03-12 16:15:20 +00:00
Thibault Saunier
ed693c7435 video: Give better names to buffer pools
Making debugging simpler

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8617>
2025-03-12 14:49:22 +00:00