Commit graph

121845 commits

Author SHA1 Message Date
Thibault Saunier
ed943b04c0 dots-viewer: cargo_wrapper: Force log file to be written in utf-8
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8242>
2025-02-24 18:10:50 +00:00
Qian Hu (胡骞)
a99694cca8 wayland: leverage unified object destruction for wl_callback
This patch refactors gst_wl_display_callback_destroy() to use the
recently introduced gst_wl_display_object_destroy() helper. Previously,
the function manually handled wl_callback destruction with explicit
lock/unlock calls and direct invocation of wl_callback_destroy().
Switching to gst_wl_display_object_destroy() unifies the destruction
process across similar objects, reducing code duplication and potential
errors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8242>
2025-02-24 18:10:50 +00:00
Qian Hu (胡骞)
6d17596777 wayland: fix crash issue during stop flow
when received xdg config event fron wayland server,
gst_wl_display_thread_run will call handle_xdg_surface_configure
which protected by priv->sync_mutex.

and in handle_xdg_surface_configure, configure_mutex also is locked

but if waylandsink set state from paused to ready, that will dispose
wlwindow, which will try to clear configure_mutex, and try to destroy
xdg_surface,
that do not proteced by anything.

so, problem is:
1) if clear configure_mutex(with locked state), clear lock will abort
2) after xdg_surface destroy, handle_xdg_surface_config may still call
   ack_configure, that will lead wayland server go wrong

so, this patch updates gst_wl_window_finalize to use the new
destruction function for xdg_toplevel and xdg_surface, ensuring all
destruction operations are properly synchronized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8242>
2025-02-24 18:10:50 +00:00
Qian Hu (胡骞)
308540c2fe wayland: add synchronized object destruction function
Introduces a new generic destruction function
gst_wl_display_object_destroy that ensures all
destruction operations are protected by
sync_mutex.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8242>
2025-02-24 18:10:50 +00:00
Thibault Saunier
722c088ab3 tests: dash: Test retry-backoff-time
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
bbf5b71622 tests: dash: Add a test to check that retries work
This tries that both `souphttpsrc` and `adaptivedemux2` behave as
expected when HTTP failures happen but "solve themselves".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
8c16be5901 adaptivedemux: Add 'backoff' logic for HTTP request
So that the user can configure waits between retries

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
6d0c0d5d29 adaptivedemux2: Expose a max-retries property
So the user can configure what is the maximum number of time HTTP requests can
be performed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
ba4a260c07 souphttpsrc: Add the notion of "retry-backoff"
So that the user can force waits between retries

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
6652360d30 souphttpsrc: Retry on SERVICE_UNAVAILABLE and INTERNAL_SERVER_ERROR
Those might be temporary issue, for example s3 returns SERVICE_UNAVAILABLE high
load, but afterward a few tries the request will work, and it has been observed
that internal server error sometimes "fix themselves"  so it makes sense to
also retry requests, in case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
99ad918ece adaptivedemux2: Increment retry counter to stop after MAX_ERROR_COUNT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
1faa88b1ff dashdemux2: Do not set empty string 'track_id'
This is not needed and generates g_warning like:

```
  Trying to set empty string on taglist field 'container-specific-track-id'. Please file a bug.
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
294f1165fa validate: Implement a 'http-request' action type
Which is useable with our own HTTP server

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
7e1fd3b069 validate: scenario: Reset the pipeline on expected ERROR messages while executing actions
Otherwise the scenario gets into an inconsistent state and users won't
be able to properly recover.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
6ddaa9f56a validate: scenario: Better log expected Error messages on the bus
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:23 +00:00
Thibault Saunier
78cf4706d9 validate: launcher: add HTTP server control endpoints
Add administrative REST API endpoints to RangeHTTPServer allowing tests to:

- Configure HTTP return codes for specific paths:
  * PUT /admin/status-rules to set rules
  * Support time-based expiry with "during" parameter
  * Support count-based expiry with "repeat" parameter
  * DELETE /admin/status-rules/<path> to remove rules

- Track failure statistics:
  * PUT /admin/failure-counts/start to begin monitoring
  * GET /admin/failure-counts/<path> to get current count

Useful for testing HTTP retry mechanisms, error handling and failure
recovery behaviors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:22 +00:00
Thibault Saunier
0259d46fd3 validate: scenario: Add an action type to start the http scenario
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8128>
2025-02-24 16:57:22 +00:00
Elliot Chen
2548503898 scaletempo: scaletempo: clip the timestamp or duration of gap event if needed
For some cases, maybe the timestamp of gap event is smaller than
segment start value or larger than segment stop value in playback.
And the timestamp plus duration may exceed segment boundary. Need
check and clip the timestamp or duration before recalculating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8517>
2025-02-24 12:09:04 +00:00
Tim-Philipp Müller
644a005ecb Back to development after 1.25.90 2025-02-23 23:52:57 +00:00
Tim-Philipp Müller
94a3e912ab Release 1.25.90 2025-02-23 23:44:10 +00:00
Tim-Philipp Müller
2ad386e4e4 gst-plugins-ugly: update translations 2025-02-23 23:44:02 +00:00
Tim-Philipp Müller
2f0a0a837c gst-plugins-bad: update translations 2025-02-23 23:44:02 +00:00
Tim-Philipp Müller
7bd882b94c gst-plugins-good: update translations 2025-02-23 23:44:02 +00:00
Tim-Philipp Müller
a43c9ba9a0 gst-plugins-base: update translations 2025-02-23 23:44:02 +00:00
Tim-Philipp Müller
9cd9db2b77 gstreamer: update translations 2025-02-23 23:44:02 +00:00
Nirbheek Chauhan
7b3ec8c419 ci: Don't install WiX 3.x in the windows image
Fails to install, and we don't need it anymore either.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8532>
2025-02-23 16:55:53 +00:00
Sebastian Dröge
bd2308f9cc ci: Update image tags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8532>
2025-02-23 16:55:53 +00:00
Sebastian Dröge
3db85ca77a ci: Update to cargo-c 0.10.11
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8532>
2025-02-23 16:55:53 +00:00
Sebastian Dröge
f2bcd56571 ci: Update to Rust 1.85
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8532>
2025-02-23 16:55:53 +00:00
Julian Bouzas
25543de560 rtph264depay: Improve properties doc to be the same as rtph265depay
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Julian Bouzas
cc1556efab rtph264depay: Improve request keyframe logic
We cannot rely only on the DISCONT flag when deciding whether we need to
request a new key frame or not because it might be that the packet that just
came in with the DISCONT flag is actually the start of a keyframe.

This patch improves the logic to be the same as rtph265depay, by only requesting
a key frame if the packet with the DISCONT flag is not the first one of a FU; or
if its the first one, only request it when we could drop packets due to a
missing key frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Julian Bouzas
22b40d66ef docs: update plugins cache with new rtph265depay properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Julian Bouzas
4400caeaef rtph265depay: Add request-keyframe property
Similar to the H264 depayloader, this property will request a new keyframe
when packet loss is detected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Julian Bouzas
ca08f4220a rtph265depay: Add wait-for-keyframe property
Similar to the H264 depayloader, this property will wait for the next keyframe
by dropping RTP packets if there is a missing packet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8343>
2025-02-22 13:31:10 +00:00
Alicia Boya García
482c029c53 validate: miscellaneous Python cleanups
I spent too much time trying to navigate validate Python code to figure
out where a test was coming from. Hoping that it's slightly easier for
the next person, this patch:

* Adds type annotations to setup_tests(), for the sake of code
  navigation.
* Adds comments matching each test generator with the patterns of test
  names it produces.
* Removes an if statement in `register_default_scenarios()` where both
  branches have the same exact code with the same exact very long list.
* Removes NamedDic [sic] and replaces it with SimpleNamespace from the
  standard library (3.3+) which has the same purpose and API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8090>
2025-02-22 10:30:35 +00:00
Seungha Yang
184ac2d930 nvcodec: Register all elements if CUDA kernel is precompiled
GstCudaConverter dependent element can work if CUDA kernel is
precompiled even if runtime compiler library is not found

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8536>
2025-02-22 07:09:03 +00:00
Seungha Yang
ae8eef82a6 nvjpegenc: Add support for kernel precompile
Port to CUDA precompile/cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8536>
2025-02-22 07:09:03 +00:00
Seungha Yang
697cfe38ef cudaconverter: Add support for kernel precompile and cache
Port to precompile/cache approach

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8536>
2025-02-22 07:09:03 +00:00
Seungha Yang
9a8f3a65a3 nvcodec: Add support for CUDA kernel precompile
Enable build time CUDA kernel compile if nvcc is detected.
Precompile is disabled by default and controlled by
"nvcodec-cuda-precompile" build option.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8536>
2025-02-22 07:09:03 +00:00
Seungha Yang
8165735902 libav: Fix build error 'AV_CODEC_ID_QOI undeclared'
Add version check define guard

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4243
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8535>
2025-02-21 20:41:11 +00:00
Nicolas Dufresne
33aafc4a91 v4l2codecs: Sort formats to avoid quality lost
When the driver prefered format is not picked by downstream, the
decoders needs to select another format from the list. The selection
was currently unsorted, resulting in 10bit data often being stripped
to 8bit.

To solve this, reorder the formats in an HW preference order. This order
deviates slightly from the preferred order in libgstvideo. This is to
prefer bandwidth saving over better CPU alignment. As an example NV15 is
prefered over P010. We also prefer tiled over linear.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8522>
2025-02-21 19:11:47 +00:00
Nicolas Dufresne
5e48b89686 kmssink: Add NV12_10LE40 / NV15 support
This is needed until kmssink is ported to use libgstvideo mapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8525>
2025-02-21 16:37:55 +00:00
Seungha Yang
5c974980ef closedcaption: Add h264/h265 ccinserter docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8496>
2025-02-21 15:00:02 +00:00
Seungha Yang
89c0dc80e5 closedcaption: Add h265ccinserter element
Adding new element for inserting closed caption SEI to H.265 stream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8496>
2025-02-21 15:00:01 +00:00
Seungha Yang
6a711ede04 closedcaption: Add h264ccinserter element
Adding new element for inserting closed caption SEI to H.264 stream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8496>
2025-02-21 15:00:01 +00:00
Seungha Yang
55b2dcc121 h264picture: Export private method symbols
That method will be used by plugin

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8496>
2025-02-21 15:00:01 +00:00
Matthew Waters
b2a5b4f304 qt/6: mark GstGLDisplayEGLs that would be created as foreign
Otherwise, GStreamer may preemptively call eglTerminate() before Qt has
finished using the EGLDisplay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8504>
2025-02-21 12:03:31 +00:00
Matthew Waters
ddf7c1ec63 gldisplay/egl: Add API for overriding foreign-ness of the EGLDisplay
Scenario is using wayland with this pipeline: videotestsrc ! glupload ! qml6glsink.

First pipeline and qml construction works just fine.  However if all GStreamer
and QML scenegraph resources are removed, GStreamer will call eglTerminate() and
sever the connection to the display server for Qt.  When Qt attempts to do any
further GL operations like construct a new QML scene, it can crash in any number
of places as libEGL will start returning NULL or other unexpected values.

What we really need is to ensure that if an external API (e.g. Qt) will
eventually call eglTerminate(), there is no need for GStreamer to call
eglTerminate().  This is what the foreign display flags allows setting.

There is also another possible scenario where one may like to make GStreamer
assume ownership of an EGLDisplay and thus eventually call `eglTerminate()`.  As
such, it is now also possible to mark an GstGLDisplayEGL as non-foreign.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8504>
2025-02-21 12:03:31 +00:00
Seungha Yang
bb4d21001f examples: Add example for nvenc extern-cuda-bufferpool property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8516>
2025-02-21 10:10:53 +00:00
Seungha Yang
d17e8707c9 nvencoder: Add extern-cuda-bufferpool property
Add new property to support application allocated GstCudaMemory.

CUDA memory alloc/free is a global device synchronization point
as if launching CUDA kernel on default CUDA stream. To avoid the global
synchronization, we added stream-ordered allocation support
which allocates CUDA memory asynchronously.
However, NVENC does not allow registering the stream-ordered
allocated memory. Thus encoder was allocating normal CUDA
memory in case that input CUDA memory is stream-ordered type.

In this commit, newly introduced property will allow application
to provide encoder with GstCudaBufferPool. Application can
preallocate sufficient amount of CUDA memory in advance
to avoid global device synchronization while pipeline is running.

For now, this pool is used only if input CUDA memory is allocated
via stream-ordered-allocation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8516>
2025-02-21 10:10:53 +00:00