122179 Commits

Author SHA1 Message Date
Doug Nazar
afd979c9e4 faceoverlay: 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
8f99e22822 waylandsink: 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
765a6a963f qroverlay: Free various props before set & during cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
e7d8bf8563 openalsrc: 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
efb08c2ada lcevcencoder: Free various props before during cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
6279c4bab7 dash: Free various props before set & during cleanup
In addition several members were being freed via xmlFree() even though
being created via g_value_dup_string(). Switch to g_free().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8648>
2025-03-27 09:03:18 +00:00
Doug Nazar
2f11f7e434 curlhttpsrc: Free various props before set & during cleanup
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
Guillaume Desmottes
1ea4632668 tracers: dots: fix debug log
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8699>
2025-03-27 04:09:51 +00:00
Sebastian Dröge
fbdd1aa800 dashsink: Make sure to use a non-NULL pad name when requesting a pad from splitmuxsink
If the caller passed in "audio_%u" instead of a concrete pad name into
gst_element_request_pad_simple() then the pad name will be NULL. In that case
use the pad template name for requesting the pad from splitmuxsink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8697>
2025-03-27 02:36:30 +00:00
Andoni Morales Alastruey
05347a3c03 ges: fix frame position for sources with par > 1
A source with 1920x1080 and par 16:15 has a natural size of
2048x1080. The current code is incorrectly setting the natural
width as height resulting in 1920x2048.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8693>
2025-03-27 01:46:23 +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
Jan Tojnar
13c0f44dd5 validate: Add gst-video to Requires in pkg-config
`gst/validate/validate.h` includes `gst/validate/gst-validate-media-info.h`,
which in turn includes `gst/pbutils/pbutils.h` but `gstreamer-pbutils-1.0`
was only listed in `Requires.private` field of `gstreamer-validate-1.0.pc`.

This would cause projects linking against `gstreamer-validate-1.0.pc` to fail to find
the headers when using alternative interpretation of pkg-config specification
that only considers private dependencies for include path during static builds,
such as the case e.g. on Nix.

https://gitlab.freedesktop.org/pkg-config/pkg-config/-/issues/28

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8661>
2025-03-26 23:40:04 +00:00
Jan Tojnar
bc93bbf5c8 gst-analytics: Add gst-video to Requires in pkg-config
`gst/analytics/analytics.h` includes `gst/analytics/gstanalyticssegmentationmtd.h`,
which in turn `gst/video/video-info.h` but `gst-video-1.0` was only listed
in `Requires.private` field of `gst-analytics-1.0.pc`.

This would cause projects linking against `gst-analytics-1.0.pc` to fail to find
the headers when using alternative interpretation of pkg-config specification
that only considers private dependencies for include path during static builds,
such as the case e.g. on Nix.

https://gitlab.freedesktop.org/pkg-config/pkg-config/-/issues/28

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8661>
2025-03-26 23:40:04 +00:00
Thibault Saunier
801620242e dotsviewer: Fix search
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8696>
2025-03-26 22:46:56 +00:00
Thibault Saunier
fdcd0ddca0 devtools: dots-viewer: Add a button to download the SVG file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8696>
2025-03-26 22:46:56 +00:00
Jordan Yelloz
a1876eee74 mse: Updated documentation cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
2134247a9c gir: Updated introspection for MSE library
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
42f927f980 gstmsesrc: Added locking, improved seek implementation
The position is no longer duplicated across each pad and pad's segment. The
position is now only updated if it changes in the direction of playback so that
quickly repeated forward seeks do not cause the stream to seek from 0.

Reverse playback is expressly disallowed and an unnecessary extra flush of track
when seeking was removed.

A background task was added to periodically check on the current position and
the media source's buffering levels to keep the ready state up-to-date. The
source buffer no longer needs to trigger this update, it will happen whenever
the element state is READY or higher.

Finally, added proper error reporting when failing to push a buffer and improved
debug logging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
96ec1ba613 gstappendpipeline: Added name to background task
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
b1c279f0d8 gstsourcebufferlist: Added locking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
8041073465 gstsourcebuffer: Added locking, re-worked track feed task
Since the sample map/track buffer now iterates samples in batches corresponding
to each coded frame group, the logic to feed the tracks is simpler. For media
without delta frames, it's a special case where the coded frame groups are all
size 1.

Now, all it does is skip data until the keyframe group containing the seek point
is found, then feed the track queue with the current sample and all future
samples until EOS or cancellation.

Resync of the iterator when the underlying track is modified is not necessary
because the outer loop attempts to resume feeding track data from where it was
interrupted in case of modification.

Also, the track feed task struct now holds a weak ref to its parent source
buffer to allow the task to cancel itself in any situation where the source
buffer is destroyed before the task is shut down.

Media parsing activity in the append pipeline no longer triggers ready state
recalculation on the msesrc since the msesrc now has a background task that
updates the ready state periodically when it's active which is more efficient in
cases where there is a high volume of samples being processed by the media
parser.

Finally, updated to adapt to track buffer API changes. Some functions previously
passed in a lower bound for sample timestamps. Now the source buffer is
responsible for clipping samples within a desired range of time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
0d0228ca87 gstsourcebuffer: Added name to track feed task
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
7b3ac877f9 gstsourcebuffer: Moved misplaced documentation comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
f5634c2aac gstmediasourcetrackbuffer: Improved buffered ranges calculation
Now when the buffered list is requested, the tolerance for merging two ranges
when there's a small gap between them is MAX(0.1sec, max frame duration * 2).

Previously it was hardcoded to 0.01sec. The specification suggests that it
could be something like the max frame duration * 2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
3b32f53d7b gstmediasourcetrackbuffer: Added method to wait until any new data
The source buffer currently has a thread for each track that feeds the track
with all data in the track buffer until EOS is reached.

Each pass over the track buffer currently waits for the EOS to appear when it's
done iterating the track buffer which is too restrictive.

When the source buffer reaches the end of the track buffer, it should wait for
any new data to be processed -- not just an EOS -- then check for cancellation
if the deadline expires without new data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
eec05ffeac gstmediasourcetrackbuffer: Removed start time filtering from sample iterator
This adapts to the changes to the sample map since gst_iterator_filter() is a
simpler way for callers to clip the returned samples to a desired time range.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:13 +00:00
Jordan Yelloz
c76fcabb09 gstmediasourcetrackbuffer: Removed unused code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:12 +00:00
Jordan Yelloz
3c6c0bc676 gstmediasourcetrack: Removed unused try_push() method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:12 +00:00
Jordan Yelloz
537065b29e gstmediasourcetrack: Ref the sample inside push() method
This simplifies cleanup for the caller since the push method already cleans up
the sample when it is consumed by playback or if it fails to be added to the
queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:12 +00:00
Jordan Yelloz
4f5cda94f7 gstmediasourcesamplemap: Re-worked sample iteration and removal
Both operations now work on coded frame groups (GOPs). This simplifies queueing
of video data. There is rarely any point of dealing with individual video frames
when iterating in DTS order, it's most meaningful to decode or delete whole
coded frame groups at a time, so the sample map will now do that when iterating
by DTS. When iterating in PTS order, the existing behavior is preserved since
that is used for informational purposes, not media processing.

A new private boxed type for coded frame groups was added to provide each data
item to the source buffer. Another possible solution would be creation of a new
GstSample representing the whole group by merging all the samples in a group
into a single sample containing a GstBufferList.

Also, start time filtering was removed from the API since gst_iterator_filter()
can be used by callers to achieve the same result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:12 +00:00
Jordan Yelloz
5aa3f7c16e gstmediasource: Added locking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:12 +00:00
Jordan Yelloz
f70cf55388 gstmediasource: Added caller-allocates annotation to get_live_seekable_range()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:12 +00:00
Jordan Yelloz
4e958fa45a gstmselogging: Added helper function to get nicknames of enum values
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
2025-03-26 21:44:12 +00:00
Seungha Yang
2cf19176dc codecccinserter: Fix event double free
Need to steal GstVideoCodecFrame.events before unref

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8673>
2025-03-26 19:05:21 +00:00
Seungha Yang
9254c8bd41 h265ccinserter: Fix broken SPS/PPS link
Apply the same h265decoder change to h265ccinserter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8673>
2025-03-26 19:05:21 +00:00
Seungha Yang
a014556713 h265decoder: Fix broken SPS/PPS link
Because of 2 pass nalu handling in decoder, link between
slice header and SPS/PPS can be broken at the second pass
if SPS/PPS got updated after slice header in the same AU

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4323
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8673>
2025-03-26 19:05:21 +00:00
Seungha Yang
4898020c28 h265parser: Add private method to update slice header
Adding a method to allow linking already parsed slice header
with parser's own sps/pps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8673>
2025-03-26 19:05:21 +00:00
Seungha Yang
c1835644f5 h265parser: Allow updating SPS/PPS without parent parameter set
h265parser defers linking parameter sets until slice header is parsed.
Thus valid SPS/PPS parsed by h265parser can have no linked
parent parameter set. Apply this behavior to
gst_h265_parser_update_{sps,pps} too

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8673>
2025-03-26 19:05:21 +00:00
Stéphane Cerveau
9183df0226 v4l2object: fix memory leak
The tmp caps should be unreffed as the template structure.

The leaks can be reproduced with
gst-launch-1.0 v4l2src num-buffers=1 ! autovideosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8669>
2025-03-26 15:43:56 +00:00
Jakub Adam
5aaa4c2c5a qml6glsrc: update buffer pool on renegotiation
When dynamic caps change in the pipeline leads to a new buffer pool
getting negotiated, the change is not propagated to Qt6GLWindow, which
keeps using the old, now defunct, pool.

Unset current pool on Qt6GLWindow in decide_allocation(). This will
trigger a switch to the new pool inside create().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8676>
2025-03-26 12:40:42 +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
Sebastian Dröge
0623581850 examples: webrtc: rust: Move from async-std to tokio
async-std is deprecated now and tokio is what effectively everybody is using
by default nowadays.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8659>
2025-03-26 03:38:22 +00:00
Thibault Saunier
fa63afba84 ci: Build the dots_viewer only once
We do not need to build it for each and every test we run.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8520>
2025-03-26 01:11:12 +00:00
Dongyun Seo
bbc6535a6b vkformat: fix build error
fix build error when VK_KHR_format_feature_flags2 is not defined.

Co-authored-by: Victor Jaquez vjaquez@igalia.com
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8655>
2025-03-26 00:26:02 +00:00
Eric
4e4f8b7a79 webrtc: fix hangup when duplicate sctp association IDs chosen
Fixes an issue where the webrtcbin would hangup when finalizing due
to the sctpenc hanging up when finalizing. This occurred when the
webrtcbin chose to use a sctp association ID already in use.

The sctpenc would fail to reach the paused state, but startup a task
anyways that was never stopped.

This commit modifies the behavior to not choose sctp association IDs
randomly, and instead only choose one that is free. It also prevents the
sctpenc from starting up that task if it fails to reach the paused state.

Fixes: #4188
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8607>
2025-03-25 23:07:51 +00:00
David Smitmanis
f8f75503b7 pluginloader-win32: Correctly handle whitespace paths when executing gst-plugin-scanner
On Windows, if the path to gst-plugin-scanner.exe contained
whitespace, gstreamer would via CreateProcessW attempt to execute
several files "up" the path tree; e.g. if the scanner path was
"C:\Program Files\gstreamer app\gst-plugin-scanner.exe", it would try
to execute C:\Program, C:\Program.exe, C:\Program Files\gstreamer.exe"
and so on.

This is how CreateProcessW behaves with unquoted whitespace arguments
in lpCommandLine if lpApplicationName is NULL.

By passing the binary path as lpApplicationName instead, the problem
is avoided.

Also quote arguments to gst-plugin-scanner.exe as they are paths as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8614>
2025-03-25 21:58:00 +00:00