9034 Commits

Author SHA1 Message Date
Stefan Andersson
1c8b01ccbc matroska-demux: Prevent corrupt cluster duplication
Make sure to always update next_cluster_offset, if next cluster offset
isn't known set it to zero. If next_cluster_offfset isn't updated it will
be the same as current and if the cluster parsing fails the same cluster
will be parsed again leading to duplication of the data in the cluster.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8855>
2025-04-16 20:37:08 +02:00
Jan Alexander Steffens (heftig)
24bcff5650 mpegtsmux: Read prog-map[PMT_ORDER_<PID>] for PMT order key
Right now the prog-map's meaning of `PMT_%d` is overloaded:
- PMT_<PGM> is used to look up the PID for the PMT.
- PMT_<PID> is used to look up ordering keys for streams in the PMT.

This is not a problem in practice because program numbers and PES PIDs
shouldn't overlap. Still, it's quite the wart in the API.

Provide "PMT_ORDER_%d" as an unambiguous way of specifying ordering
keys.

See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1510#note_2790022
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8584>
2025-04-16 13:39:15 +00:00
Seungha Yang
ece3a0c976 d3d12converter: Fix cropping when automatic mipmap is enabled
Update vertex buffer and viewport of extra shader pipeline as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8851>
2025-04-16 21:20:02 +09:00
Shengqi Yu (喻盛琪)
b144375974 pluginloader: fix pending_plugins Glist use-after-free issue
When plugin_loader_load_and_sync returns false in plugin_loader_replay_pending,
the cur Glist l->pending_plugins will be added to the blacklist.
However, the l->pending_plugins might have already been loaded and freed in handle_rx_packet,
so causing a use-after-free issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8747>
2025-04-16 05:06:40 +00:00
Daniel Morin
185e96aeec test: add test for tensor-meta
- Verify we can add a tensor-meta to a buffer
- Verify we can get a tensor from a tensor-meta

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8848>
2025-04-15 16:54:37 -04:00
Daniel Morin
93af941ce7 analytics: add more convenient API to retrieve tensor
`gst_tensor_meta_get_by_id (meta,id)' is more convenient then
retrieving the tensor index using `gst_tensor_meta_get_index_from_id()` followed
by `gst_tensor_meta_get ()`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8848>
2025-04-15 16:17:47 -04: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
Daniel Morin
55e9e3cb13 tensordecoders: updating element classification
- `TensorDecoder` is clashing with media decoder which cause decodebin use it.
  Replacing with `Tensordecoder` to avoid clash

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8819>
2025-04-15 00:30:06 +00:00
Daniel Morin
42e31ee5ef test: add test for gstanalytics utility
- IoU test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8805>
2025-04-14 23:15:11 +00:00
Daniel Morin
e887b2e20e analytics: Move IoU calculation to gstanalytics lib
Calculating intersection-of-union (IoU) is a very common operation used by
tensor-decoder handling tensors from vision models. Having this in a library
will improve maintainability and ease of writing tensor-decoder.

- Post-fix _uint: We might eventually want to handle different datatype that we
woule post-fix with _type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8805>
2025-04-14 23:15:11 +00:00
Santosh Mahto
4c4e80d286 gstanalytics: Add api iter_direct_related python to GstAnalyticsMeta
The API `iter_direct_related` allows to iterate over directly related
Mtd objects.
Usage:
```
for i in mtd.iter_direct_related(GstAnalytics.RELATE_TO,
                      GstAnalytics.ODMtd)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8461>
2025-04-14 19:11:29 +00:00
Gustav Fahlen
e649072584 gstrtspsrc: Do not emit signal 'no-more-pads' too early
Due to race condition it was previously possible that
gst_element_add_pad was not completed for each RTSP stream before
signal 'no-more-pads' was emitted.

Race condition explained:
Lets say two RTSP streams are created: Video and Audio.
1. Callback new_manager_pad is called for the Video stream =>
   stream->added=TRUE.
   all_added=FALSE because both streams are not yet added.
   Call gst_element_add_pad and emit signal 'pad-added' for Video stream.
2. Callback new_manager_pad is called for Audio stream =>
   stream->added=TRUE.
   all_added=TRUE because both streams are added.
   Call gst_element_add_pad and emit signal 'pad-added' for Audio stream.
3. Lets say gst_element_add_pad for the audio stream completes before
   the video stream. Since the audio stream already has all_added==TRUE
   this will result in the signal 'no-more-pads' to be emitted before
   gst_element_add_pad for the video stream is completed.

Solution is to move the logic that sets added=True and checks if all
streams are added to after gst_element_add_pad. This will make sure
signal 'no-more-pads' is not emitted until all code in
gst_element_add_pad is completed for all streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8832>
2025-04-14 12:35:06 +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
Andrew Yooeun Chun
1d014e6146 v4l2codecs: fix typos in the documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8829>
2025-04-12 15:02:38 +09:00
Stéphane Cerveau
a2793a4663 vkh265dec: add main-10 support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8282>
2025-04-10 19:58:47 +00:00
Stéphane Cerveau
ba44f0c9e0 vkformat: add NV12 10 bits support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8282>
2025-04-10 19:58:47 +00:00
Thibault Saunier
f110f9c290 devtools: dots-viewer: Bundle js dependncies using webpack
And avoid relying on cdn's and require access to the network to use `dots-viewer`

And git ignore `node_modules`

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8754>
2025-04-10 18:48:49 +00:00
Carlos Bentzen
ffaa4bbb38 h266decoder: fix leak parsing SEI messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8814>
2025-04-10 14:06:16 +00:00
Jan Schmidt
7212848e41 rtspsrc: Don't error out on not-linked too early
Wait until all pads have been exposed before accepting a not-linked,
as pads are added one-by-one and downstream might not be interested
in the first ones to appear.

Follow up to
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7946

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8798>
2025-04-10 11:50:33 +00: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
Thibault Saunier
4066b145b6 ges: Enhance debug logging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8803>
2025-04-09 17:19:01 +00:00
Detlev Casanova
28fdf598e4 v4l2codecs: Unref the frame before leaving on error
In h264, h265 and mpeg2, make sure that dec_submit_bitstream() doesn't leak
a frame when dec_ensure_output_buffer() fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8794>
2025-04-09 15:43:03 +00:00
Detlev Casanova
880053c52c v4l2codecs: av1,vp9: Use temporary variable for buffer
This makes the end_picture() function handle the frame in the same way
as in vp8, which also fixes a frame leak when
gst_buffer_pool_acquire_buffer() fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8794>
2025-04-09 15:43:03 +00:00
Xavier Claessens
f6115efe8d Revert "va: h266 requires libva 2.22.0"
This reverts commit 8c017c79c5736c9e45e635df210e08550287646d.

1.22 was the correct pkg-config version. It's only the subproject
version that was wrong. Since we bumped libva.wrap to 2.22 version, h266
is now always available when using the subproject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8800>
2025-04-09 09:01:22 -04:00
Mathieu Duponchelle
d1b4104cbc aggregator: expose current-level-* properties on sink pads
As aggregator internally queues data (up to latency), those properties
are helpful to monitor queue levels in the complete pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8731>
2025-04-08 17:26:34 +00:00
Víctor Manuel Jáquez Leal
4fc8773371 y4menc: fix Y41B format
This a regression of commit fb0bea8f where output info variable was swapped with
input info variable by mistake.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8786>
2025-04-08 13:10:19 +00:00
Xavier Claessens
a591dec87c libva: Update wrap to 2.22.0
It is required for h266 support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8788>
2025-04-08 11:45:11 +00:00
Xavier Claessens
8c017c79c5 va: h266 requires libva 2.22.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8788>
2025-04-08 11:45:11 +00:00
Philippe Normand
1a55ae2c51 Revert "webrtc: stats: Increase spec compliance for ICE candidate stats"
This reverts commit 4718fc9be72ccbbb9278c9abe7d72106e161aebf.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8787>
2025-04-08 09:35:49 +01:00
Philippe Normand
70af47ee17 Revert "webrtc: Add missing Since markers to new ICE API"
This reverts commit 601c772447b0bada8e54d097088b8ea51ecba09a.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8787>
2025-04-08 09:35:49 +01:00
Guillaume Desmottes
9b19c10f39 alphacombine: unblock when alpha sink is eos
If the alpha sink receives EOS while the other thread was waiting for a
alpha buffer it was stuck waiting forever.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8775>
2025-04-07 23:45:33 +00:00
Guillaume Desmottes
d2086675a4 alphadecodebin: use a multiqueue instead of a couple of queues
Fix gapless playback as queues are no longer stopped after the first
eos.

Co-authored-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Fix #4165

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8775>
2025-04-07 23:45:33 +00:00
Jakub Adam
75517d0faf unixfdsrc: fix allocating FD memory with nonzero offsets
The element should allocate GstFdMemory large enough to fit incoming
memory's size plus its potential offset.

Fixes "gst_memory_resize: assertion 'size + mem->offset + offset <=
mem->maxsize' failed".

Fixes an issue reproducible on Raspberry Pi 4 that results in a garbled
image on the receiver's end:

  gst-launch-1.0 libcamerasrc ! unixfdsink socket-path=/tmp/socket
  gst-launch-1.0 unixfdsrc socket-path=/tmp/socket ! autovideosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8025>
2025-04-07 14:51:47 +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
601c772447 webrtc: Add missing Since markers to new ICE API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8698>
2025-04-07 12:07:16 +00:00
Philippe Normand
4718fc9be7 webrtc: stats: Increase spec compliance for ICE candidate stats
We now fill the foundation, related-address, related-port, username-fragment and
tcp-type fields.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8698>
2025-04-07 12:07:16 +00:00
Philippe Normand
ac465ebfe1 webrtc: stats: Fill data-channel transport stats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8698>
2025-04-07 12:07:16 +00:00
Philippe Normand
b088d53970 webrtc: nice: Add niceutils
The gst_webrtc_nice_get_candidate_server_url() function is going to be used for
stats generation purposes and also from the upcoming get_selected_candidate_pair
implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8698>
2025-04-07 12:07:16 +00:00
Philippe Normand
19dea1507e webrtc: nice: Make use of nice_candidate_type_to_string
This API was added in libnice 0.1.19 and we currently require 0.1.20.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8698>
2025-04-07 12:07:16 +00:00
Philippe Normand
aa15eb30ff webrtc: nice: Remove unused libnice utilities
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8698>
2025-04-07 12:07:16 +00:00