1160 Commits

Author SHA1 Message Date
Seungha Yang
b33ba2f264 h265parser: Fix max_dec_pic_buffering_minus1 bound check
Allowed max value is MaxDpbSize - 1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8884>
2025-04-24 14:59:15 +00:00
Jordan Yelloz
c3f4bb532c gstsourcebuffer: Reverted ownership change for append method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8857>
2025-04-18 06:16:00 +00:00
Philippe Normand
72433cb942 webrtc: stats: Improve 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/8792>
2025-04-17 21:13:36 +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
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
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
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
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
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
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
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
Seungha Yang
740b7564ee h265parser: Make gst_h265_parser_link_slice_hdr public
... and updating h265decoder/h265ccinserter to match
the changed gst_h265_parser_link_slice_hdr method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8679>
2025-04-05 09:48:41 +00:00
Seungha Yang
deee13a6c3 h264parser: Store associated parameter set id
Make h264parser and h265parser consistent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8679>
2025-04-05 09:48:41 +00:00
Seungha Yang
1bd5afa460 h265parser: Store PPS id in slice header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8679>
2025-04-05 09:48:41 +00:00
Nirbheek Chauhan
9194e259d9 docs: Fix GstWebRTCICE* class documentation
IceStream is not an actual object, it's GstWebRTCICEStream

Some `Returns:` annotations were improperly formatted and not taking
effect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8755>
2025-04-03 13:05:57 +00:00
Doug Nazar
6e5937f9b5 vulkan/wayland: Init debug category before usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8738>
2025-03-31 13:20:31 +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
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
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
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
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
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
Stéphane Cerveau
93364189d0 vulkan/operation: fix timeline semaphore extension detection
As for synchronization2, the timeline semaphore has been
been promoted in 1.2 and does not have to be enabled explicitely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
2025-03-06 12:14:21 +00:00
Matthew Waters
b9bbcf9202 vulkan/operation: fix synchronization2 extension detection
The synchronization2 extension is a core part of Vulkan 1.3.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
2025-03-06 12:14:21 +00:00
Matthew Waters
e23bc6ed77 vulkan/device: only enable relevant extensions
Extensions can have a minimum set of dependencies (e.g. API version) and may
also be promoted to core in a later version.  Don't explicitly enable extensions
that fail to meet their requirements or that have been promoted to the core API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
2025-03-06 12:14:21 +00:00
Matthew Waters
e7b8ac099f vulkan/operation: retrieve function pointers directly from the device
The instance API version supported may not be of the same version supported by
the device. It is possible that the function that is returned may be non-0
but not functional due to the requested API version of the instance limiting the
availability of calling the returned function.

Can be reproduced by running a pipeline with GST_VULKAN_INSTANCE_API_VERSION=1.1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
2025-03-06 12:14:21 +00:00
Matthew Waters
7452589ff8 vulkan/instance: allow the requested api version to be larger than the supported
Since Vulkan 1.1, the requested API version is the maximum API version that the
application is expecting to use. It is also possible for individual devices
(backed by potentially different drivers) may support a higher or lower API
version than the instance.  Both cases (higher and lower) should be supported
and as such, it is not an error to request an API version that is larger than
the instance supported API version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
2025-03-06 12:14:21 +00:00
Matthew Waters
4692a45dea vkformat: fix format_from_video_info_2 to actually runtime check versions and extensions
If the vulkan plugin was compiled against a newer version than the supported
vulkan runtime instance or device, then it was possible for format retrieval to
fail.  Failure was due to unconditionally using newer extensions and features
without runtime checking them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
2025-03-06 12:14:20 +00:00
Matthew Waters
51dda24a88 vulkan: fix device related API version checks
The API version exposed by a particular device can be completely different from
what is exported by the parent instance.  Since Vulkan 1.1 it is also possible
to use newer device API than supported by the instance API version (with the
appropriate version checks).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
2025-03-06 12:14:20 +00:00