1183 Commits

Author SHA1 Message Date
Sebastian Dröge
68815a3a15 play: Improve stream selection
- Unset stream ids if a collection does not contain them
  - Automatically select a default stream of a type if the stream type is
    enabled but no stream is selected yet when receiving the stream collection
  - Warn if there's a collection update via streams-selected and if there are
    unexpected streams being selected, or actually selected streams not being
    found
  - Improve debug output a bit

Among other things this also makes sure that we don't forget a selected stream
id when disabling a track so that when enabling it again later the same one can
be enabled again.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4344

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9081>
2025-05-27 09:31:52 +00:00
Seungha Yang
5521af04f8 d3d12memory: Allow set_fence() only against writable memory
Setting a fence to memory should only be allowed on the side
that modified that memory or has the right to modify it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9075>
2025-05-26 11:34:29 +00:00
Seungha Yang
2a44248bcd d3d12: Enable GIR for MSVC build as well
cerbero issue should be fixed by
https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1824

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9076>
2025-05-26 18:29:53 +09:00
Seungha Yang
66b35a984d d3d12memory: Make D3D12 map flags inspectable
GIR scanner does not seem to be able to infer integer value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9076>
2025-05-26 18:29:47 +09:00
Seungha Yang
099b8825a7 d3d12: Generate gir file
Prerequisite for rust binding

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9053>
2025-05-23 06:45:37 +00:00
Seungha Yang
ac49baabb6 d3d12: Fix docs annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9053>
2025-05-23 06:45:37 +00:00
Robert Mader
47308092dd wayland: Remove custom format mapping
As of Gst >= 1.24 we can just use GstVideoInfoDmaDrm APIs. Note
that SHM formats match DRM ones with only two exceptions.

No functional changes intended (for backporting) apart from
supporting a few more formats - those present in video-info-dma.c
but missing in the removed mapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8983>
2025-05-21 18:11:12 +00:00
Olivier Crête
5c188d90c0 tensor: Add helper function to stringify a tensor data type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8523>
2025-05-20 16:05:51 +00:00
Seungha Yang
1688d2c410 d3d12: Fix gstreamer-full subproject build with gcc
Since default option "cpp_std=c++14" is not applied automatically
in case that gstreamer is used as a meson subproject, specify
cpp_std option explicitly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9030>
2025-05-20 11:12:20 +00:00
Jordan Petridis
9dc21492a3 opencv: import as system dep
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8979>
2025-05-15 15:21:20 +00:00
Doug Nazar
9d91e4cfc2 vulkan: Free various props before being set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8978>
2025-05-13 19:34:59 -04:00
Doug Nazar
e81d0124da transcoder: Free various props before during cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8978>
2025-05-13 19:23:53 -04:00
Doug Nazar
5867c7900a 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_*() as they can only be called once during construction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8978>
2025-05-13 19:15:21 -04:00
Santosh Mahto
700b665bf7 gstanalytics: Add transform function to copy the tensor meta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8825>
2025-05-10 20:58:52 +00: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
Seungha Yang
864068c045 cuda: Fix runtime PTX compile
Handle extra option args

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8950>
2025-05-10 11:06:16 +00:00
Alexander Slobodeniuk
b9a5efbe07 webrtc: fix build with -DGST_REMOVE_DEPRECATED
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8901>
2025-05-04 22:19:55 +00:00
Seungha Yang
5db574fc35 d3d12: Add d3d12remap element
Adding new element to support pixel remapping operation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8887>
2025-05-02 22:10:58 +09:00
Seungha Yang
9b295cf7a2 d3d12converter: Add support UV remap
Adding OpenCV's cv::remap() like feature

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8887>
2025-05-02 20:56:45 +09:00
Olivier Crête
1ae7ab03d9 nice: Add function to fill in ufrag/pwd of remote candidates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8900>
2025-04-28 11:43:40 +00:00
Olivier Crête
e2f07cf314 nice: Rename local candidate filling function
Rename it, and avoid using it on remote candidates, as it will put
the wrong value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8900>
2025-04-28 11:43:40 +00:00
Olivier Crête
50c5191179 nice: Don't modify struct borrowed by signal
The struct is owned by libnice, you can't safely modify it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8900>
2025-04-28 11:43:40 +00:00
Seungha Yang
d0e18d6353 h265parser: Fix num_long_term_pics bound check
As defined in the spec 7.4.7.1, calculates allowed maximum
value of num_long_term_pics

Fixes ZDI-CAN-26596

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4285
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8884>
2025-04-24 14:59:15 +00:00
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