Commit graph

302 commits

Author SHA1 Message Date
Oskar Fiedot
a3a7acdd0a analytics: add rotation to object detection mtd
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7938>
2024-12-11 11:54:15 +01:00
Guillaume Desmottes
082a8fcd5e h264parse: parse unregistered SEI without user data
We get loads of warnings when parsing videos from users:

gsth264parser.c:1115:gst_h264_parser_parse_user_data_unregistered: No more remaining payload data to store
gsth264parse.c:646:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message

Those are raised because of unregistered SEI without user data.

The spec does not explicitly state that unregistered SEI needs to have
data and I suppose the UUID by itself can carry valuable information.
FFmpeg also parses and exposes such SEI so there is no reason for us no
too as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7931>
2024-12-04 13:56:13 +00:00
Víctor Manuel Jáquez Leal
44b8a50879 vkencoder-private: add gst_vulkan_encoder_is_started()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:45 +00:00
Víctor Manuel Jáquez Leal
e03b124c10 vkencoder-private: implement callback to chain control rate structures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:45 +00:00
Víctor Manuel Jáquez Leal
b99276a7f9 vkencoder-private: implement callback to chain codec specific structures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:45 +00:00
Víctor Manuel Jáquez Leal
ab6aafb076 vkencoder-private: handle quality level
It creates a new structure for passing the codec quality structure at _start(),
where it will be filled. The quality level can be set or changed according
encoder limits.

Later the quality level will be set at _update_session_parameters() and at each
frame encoding. That's why it has to be set at _start().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:45 +00:00
Víctor Manuel Jáquez Leal
fbeb012617 vkencoder-private: remove rate control handling
It will be reintroduced later with different approach.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
8fc2af44c8 vkencoder-private: enhance algorithm to get the slot index
The algorithm for generating the current slot index is a simple round robin,
nonetheless it's not assured that the next slot index it's not still used by a
still living encode picture.

This new way holds an array with the still living encode pictures and the next
slot index looks for a released index in the array.

Its downside is deallocating a picture need to be removed from the array, so the
helper has to be passed to the uninit() function

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
d4de932664 vkencoder-private: add VkVideoReferenceSlotInfoKHR in GstVulkanEncoderPicture
And remove slotIndex since it's part of VkVideoReferenceSlotInfoKHR, simplifying
the reference slots array creation, and changing the tests accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
d9e9d2ff72 vkencoder-private: avoid GstVulkanEncoderPicture allocation
By using it as apart of the encoder picture structure that has to initialized
and uninitalized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
c1e364ecdc vkencoder-private: remove width, height and fps from GstVulkanEncoderPicture
In GStreamer that buffer information is decoupled, holding other structures to
describe the stream: GstCaps. So, to keep the GStreamer design this patch
removes these information from GstVulkanEncoderPicture and pass to
gst_vulkan_encoder_encode() a pointer to GstVideoInfo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
48b2c3cf74 vkencoder-private: remove nb_refs from GstVulkanEncoderPicture
That's the number of references that gst_vulkan_encoder_encode() receives to
process, so it has to go as a parameter, because it's part of the reference
list, not of the picture.

This commit also modified unit tests accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
87db136cc7 vkencoder-private: remove pic_num and pic_order_cnt from GstVulkanEncoderPicture
Since they aren't semantically part of the codec-independent encoding operation.
And modify unit tests accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
a8e676a0da vkencoder-private: remove is_ref member from GstVulkanEncoderPicture
It's not used. Modified the unit test accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
4a221aad8a vkencoder-private: don't store output data size
There's no need to store in encoder helper the output data size, that's
responsibility of the caller when an output buffer is allocated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
1df99ec0d4 vulkan: store in GstVulkanVideoCapabilities encoder and decoder caps
The structure already stored the generic video capabilities and the specific
codec capabilities both for encoding an decoding. The generic decoder
capabilities weren't stored because it was only used internally in the decoder
helper object. Nonetheless, for the encoder, the elements will need the generic
encoder capabilities to configure the encoding. That's why it's required to
expose it as part of GstVulkanVideoCapabilities. And the generic decoder is
included for the sake of symmetry.

While updating the API vkvideoencodeh265 test got some code-style fixes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
cf9cc5ec1b vkencoder-private: rename GstVulkanEncoderPicture
GstVulkanEncodePicture breaks the namespace. This commit fixes it by renaming it
to GstVulkanEncoderPicture, also new() and free() signature functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
2024-12-04 02:17:44 +00:00
Víctor Manuel Jáquez Leal
52bd1931b8 vkencoder-private: usage structure is provided by caller
As all the profile structure, it's not intended to be filled in
gst_vulkan_encoder_start() function, but by the caller.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
2024-11-27 20:13:12 +00:00
Nirbheek Chauhan
23a006c64f meson: Don't unconditionally invoke the libsoup subproject
fallback: kwarg will invoke the specified subproject even if required:
false, which is not what we want here.

Reported at https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4045#note_2674340

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7965>
2024-11-27 12:12:36 +00:00
Zhong Hongcheng
821754e2d5 tests: Add the VVC(H266) parser test cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5003>
2024-11-24 16:49:25 +00:00
Víctor Manuel Jáquez Leal
d9aa8a78ea h264bitwriter: implement gst_h264_bit_writer_filler()
This is required for vulkan encoder since it can only write slides after aligned
offsets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7785>
2024-11-11 16:05:38 +00:00
Diego Nieto
0d85cdafd5 exiftag: handle GST_TAG_CAPTURING_LIGHT_SOURCE tag
This exif tag allows to specify the different light conditions
when taking a picture. This tag is defined in:
https://exiftool.org/TagNames/EXIF.html#LightSource

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5571>
2024-11-10 12:57:36 +00:00
Sebastian Dröge
b5e119bbcc ccconverter: Don't override in_fps_entry when trying to take output
This allows to handle CDP streams where the framerate is not provided by the
caps and generally gives preference to the framerate inside the CDP packets over
the one in the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7532>
2024-11-10 08:37:36 +00:00
Xavier Claessens
468dcbe9b7 Revert "unixfd: disable flaky test_unixfd_segment for now"
This reverts commit 06cd4e2457.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6765>
2024-10-29 12:12:26 +00:00
Xavier Claessens
9b946098df unixfd: Fix racy unit test by adding wait-for-connection property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6765>
2024-10-29 12:12:26 +00:00
Jordan Petridis
22ec1d8e4e ci: add suppressions for OpenSSL false positives
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7455>
2024-10-25 13:55:20 +00:00
Jordan Petridis
bc666db5fe gst-plugins-bad.supp: Remvoe gssdp leaks that have been fixed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7455>
2024-10-25 13:55:20 +00:00
Peter Stensson
06d4629521 codectimestamper: Fix gint wraparound in pts_compare_func
The diff between compared timestamps might be outside the gint range
resulting in wrong sorting results. This patch corrects that by
comparing the timestamps and then returning -1, 0 or 1 depending on the
result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7726>
2024-10-25 01:49:10 +00:00
Jochen Henneberg
2ae846a77a examples: va: Added VP8 encoder to dynamic reconfigure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6959>
2024-10-22 11:48:49 +00:00
Daniel Morin
9fc017667f test: Adding a test for segmentation analytics-meta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6026>
2024-10-17 18:13:03 +00:00
Jordan Petridis
4b8d43446e lc3: tests: Zero out the buffer we allocate for the tests
Otherwise liblc3 will try to access the uninitialized memory
and it makes valgrind very sad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7657>
2024-10-16 14:16:43 +00:00
Víctor Manuel Jáquez Leal
809ab829d0 tests: va: fix vapostproc test for DMABuf
Now it picks the first format in the template srcpad list and do
the convertion. Also the format size is reduced because not all
drives support 4K as DMABuf (radeonsi).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7636>
2024-10-10 16:34:04 -04:00
Jordan Petridis
ab54e45f67 tests/lc3: Allocate the same size for the buffer and the data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7631>
2024-10-09 22:16:13 +00:00
Sebastian Dröge
b7b24573ce common: Use more efficient versions of GstCapsFeatures API where possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:26:18 +03:00
Sebastian Dröge
6233eb0ff3 common: Stop using GQuark-based GstStructure field name API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Edward Hervey
6ce1910c5b mpegts: Handle ISO 13818 / ITU H.222.0 base extension descriptor
Previously this was hardcoded to the DVB extension descriptors (0x7f), but it
should also be applied for the base specification extension descriptors (0x3f)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7172>
2024-09-16 18:31:01 +01:00
Seungha Yang
25f696c7c0 examples: Add application CUDA memory pool example
An example to show application managed CUDA memory pool usage

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7427>
2024-09-11 17:15:14 +00:00
He Junyan
9327458cfb tests: Add the jpeg bit code writer test case
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6022>
2024-09-05 09:56:02 +00:00
Edward Hervey
81e7bde67c check: Disable failing test
Test hasn't been properly fixed for several years with modern libsoup, and it
only for the legacy adaptive demuxer.

Fixes #3783

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7454>
2024-09-05 10:09:58 +02:00
Philippe Normand
89f335f173 webrtcbin: Prevent crash when attempting to set answer on invalid SDP
If the pending remote description has an invalid BUNDLE group _parse_bundle()
triggers early return from _create_answer_task(), before ret has been
initialized, so it needs to be checked before attempting to call
gst_sdp_message_copy().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7423>
2024-09-02 04:00:57 +00:00
Edward Hervey
087cb87d27 bad: Add suppression for libsrt issues
This is not code we control

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415>
2024-08-28 06:54:02 +00:00
Edward Hervey
38271fc9e4 check: Fix leak in lc3 test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415>
2024-08-28 06:54:02 +00:00
Carlos Bentzen
77faf0a163 webrtcbin: fix regression with missing RTP header extensions in Answer SDP
webrtcsrc first creates recvonly transceivers with codec-preferences
and expects that after applying a remote description, the
previously created transceivers are used rather than having new
transceivers created.

When pairing webrtcsink + webrtcsrc, the offer sdp from webrtcsink has a media
section with sendonly direction. In !7156, which was implemented following
RFC9429 Section 5.10, we only reuse a unassociated transceiver when applying a
remote description if the media is sendrecv or recvonly, and that caused creation
of new transceivers when applying a remote offer in webrtcsrc, thus losing
information from codec preferences like the RTP extension headers in the
previously created transceivers.

Since the change in !7156 broke existing code from webrtcsrc, relax the condition
for reusing unassociated transceivers and add a test to document this behavior which
wasn't covered by any tests before.

Fixes #3753.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7417>
2024-08-27 23:56:00 +00:00
Thibault Saunier
87c69e5174 ci: Fail tests if we forget to checkout expectation files
And add missing expectation files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7400>
2024-08-21 17:53:38 +00:00
Seungha Yang
1b5f026119 examples: Add CUDA based in-place transform element example
Adding a CUDA example element for plugin developers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7004>
2024-08-20 23:48:24 +00:00
Jan Schmidt
96c4bd8d9f webrtc: Fix racy unit test
Don't reuse the same stats state structure across multiple
get-stats calls. Make each callback take a copy of the
non-changing fields it needs and use a local working copy
to avoid crashing.

Fixes problems with the unit test crashing sometimes for the
unit test introduced in MR !7338

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7387>
2024-08-20 12:07:02 +00:00
Jan Schmidt
97845475c5 webrtcbin: Fix uint64 -> uint confusion for ice-candidate priority
ICE candidate priority is a 32-bit field and reported as such in the
webrtcbin statistics, but the documentation was incorrect, and the
unit test was looking for a uint64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7338>
2024-08-19 21:07:52 +10:00
Jan Schmidt
7da5d03b29 webrtcbin: Fixes for bundled statistics generation
When multiple streams are bundled on the same transport,
the statistics would end up incorrectly generated,
as each pad would regenerate stats for every ssrc on the
transport, overwriting previous iterations and assigning
bogus media kind and other values to the wrong ssrc.

Fix by making sure each pad only loops and generates
statistics for the one ssrc that pad is receiving / sending.

Add a unit test that the codec kind field in RTP statistics
are now generated correctly.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2555
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7338>
2024-08-19 21:07:51 +10:00
Seungha Yang
4bb3854772 d3d12: Add d3d12swapchainsink element
Adding a new videosink element for Windows composition API based
applications. Unlike d3d12videosink, this element will create only
DXGI swapchain by using IDXGIFactory2::CreateSwapChainForComposition()
without actual window handle, so that video scene can be composed
via Windows native composition API, such as DirectComposition.
Note that this videosink does not support GstVideoOverlay interface
because of the design.

The swapchain created by this element can be used with
* DirectComposition's IDCompositionVisual in Win32 app
* WinRT and WinUI3's UI.Composition in Win32/UWP app
* UWP and WinUI3 XAML's SwapChainPanel

See also examples in this commit which show usage of the videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7287>
2024-08-19 11:07:17 +09:00
Jan Schmidt
d266995323 tests/webrtcbin: Add a lock around the stats test
Prevent any race if both webrtcbin end up generating their
statistics simultaneously, however unlikely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7365>
2024-08-16 14:18:35 +00:00