Commit graph

120825 commits

Author SHA1 Message Date
Sebastian Dröge
0823c639cc gst: structure: Stop using private structure name quark field
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Seungha Yang
2d91521dfc d3d12: Fix resource allocation on old Windows version
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED flag was introduced as of
Windows 10 May 2020 Update, and older versions don't understand
the heap flag. Checks the feature support and enables the
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED only if it's supported by OS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7573>
2024-09-26 12:48:55 +00:00
Weijian Pan
df23724b96 avfdeviceprovider: Fix caps leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6966>
2024-09-26 11:48:19 +00:00
Guillaume Desmottes
7e3f9df9a5 wpe: initialize threading.ready before reading it
Fix Valgrind warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7377>
2024-09-25 11:12:28 +02:00
Michael Grzeschik
4670e1c809 uvcsink: make gst_v4l2uvc_fourcc_to_bare_struct work with more raw formats
The uvcsink was limited to only transfer YUY2 and MJPEG. For the
uncompressed formats there is no technical reason not to support them.

Since gst_video_format_to_string is already supporting more fourcc than
only YUY2 we use the default path in gst_v4l2uvc_fourcc_to_bare_struct
to create structures for more formats and bail out if the returned
format is not from the uncompressed type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6037>
2024-09-24 20:07:40 +00:00
Hugues Fruchet
5801e17160 kmsallocator: fix stride with planar formats
This fixes a regression introduced by the merge request
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801

The extrapolated stride was computed but not used, resulting in the same
stride being applied to all planes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7566>
2024-09-24 12:57:16 -04:00
Seungha Yang
86af5a5f20 d3d12: Add colorconvert and scale elements
In addition to existing d3d12convert element which supports
color conversion and rescale at once, adding
separate color-conversion-only and scale-only elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7560>
2024-09-24 20:58:47 +09:00
Sebastian Dröge
d4bab55077 qtdemux: Skip zero-sized boxes instead of stopping to look at further boxes
A zero-sized box is not really a problem and can be skipped to look at any
possibly following ones.

BMD ATEM devices specifically write a zero-sized bmdc box in the sample
description, followed by the avcC box in case of h264. Previously the avcC box
would simply not be read at all and the file would be unplayable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7564>
2024-09-24 11:21:19 +03:00
Nicolas Dufresne
66f1c9fd13 doc: good: Update documentation cache
video4linux2 plugin now maps RGB15 which his didn't before.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 16:50:43 -04:00
Nicolas Dufresne
09e23e325c v4l2object: Fix a gvalue leak on error
In case we failed enumerating the supported interlacing mode, we leaked the
gvalue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
a6959f3738 v4l2: dec/enc: Flag leaked caps
We never free class held template caps, so flag the one that wasn't already
flagged.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
d35f348af3 v4l2: object: Fix condition check to emit error
The check was reversed, so we could only emit a pipeline error
if there was no element associated with the object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
86dddfa61c v4l2object: Always tell capture queue that we want to set the CSC
Not all drivers supports it, but in general we want to try and match the
negotiated caps, so lets always try to set the CSC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
2fe83fa2de v4l2: object: Fix support for format:Interlaced in caps probe
This notably follow the way we order the template and keeps the
format:Interlaced caps at the end. This change also fixes
an early skip check, that would skip if a driver only supports
alternate interlacing for a specific format. It also fixes
a bug where only the last resolution of a discrete frame size
was allowed to use format:Interlaced. Finally, similar to template
caps code, simplify the caps for earch featurs, making the debug output
manageable and (marginally) improve negotiation speed.

This change will make it easier to introduce memory:DMABuf.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
e97a954008 v4l2: Move M2M template caps probe into v4l2object
This allow reusing the code that produces output and capture devices
templates. This fixes the lack of Interlaced caps feature for M2M
devices such as decoder, encoder or converters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
7fb16f0b11 v4l2: object: Remove over indentation
This is a style fix, no functional changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00
Nicolas Dufresne
746977b6d3 v4l2: object: Map GST/V4L2 formats in a C array
This makes it easier to add new format in the future without
forgetting to update one of the numerous switch case. This
will also help mapping DRM formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:51 +00:00
Nicolas Dufresne
b7d4e576ea v4l2object: Expose convertion from v4l2 fourcc to GstVideoFormat
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:51 +00:00
Nicolas Dufresne
87398e1f8b v4l2object: Change dimensions format desc field to flag
The boolean naming wasn't obvious, and having this as a flag makes
the structure a little more compact.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:51 +00:00
Nicolas Dufresne
03cf7f6445 qml6glsrc: Reduce capture delay
In qml6glsrc, we capture the application by copying the back buffer into
our own FBO. The afterRendering() signal is too soon as from the apitrace, the
application has been rendered into a QT internal buffer, to be used as a cache
for refresh.

Use afterFrameEnd() signal instead. This works with no delay on GLES. With GL
it seems to reduce from 2 to 1 frame delay (this may be platform specific). A
different recording technique would need to be used to completely remove this
delay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7351>
2024-09-23 18:53:33 +00:00
Arun Raghavan
90e58aec3c gstreamer: parse: Use child proxy for deferred property setting
We use that mechanism for the non-deferred path, and this makes sure we are
consistent for deferred set too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519>
2024-09-23 17:47:20 +00:00
Arun Raghavan
92d8da92dc gstreamer: parse: Minor whitespace fixups
Mostly replacing some tabs with spaces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519>
2024-09-23 17:47:20 +00:00
Arun Raghavan
ba69987114 gstreamer: parse: Make sure children are bins before recursing in
A deferred set of the form parentbin::childelement::pad works in the
non-deferred property setting path, but the deferred path assumes that all
non-root non-leaf children specify bins. We already have a bin check on the
root, so let's add one for other non-leaves to avoid a critical.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3806
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7519>
2024-09-23 17:47:19 +00:00
Sebastian Dröge
389302eb96 dynamictypefactory: Fix name of the class cast macro
And deprecate the old name.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7541>
2024-09-23 15:04:31 +00:00
Seungha Yang
cef201734c d3d12: Add d3d12mipmapping element
Adding a new element for texture conversion from single mip level
texture to mipmapping enabled RGBA texture

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7555>
2024-09-23 13:52:37 +00:00
Seungha Yang
51e1834e81 d3d12: Use D3D12_FILTER_MIN_MAG_MIP_LINEAR filter by default
... instead of D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT, since we supports
mipmap texture now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7555>
2024-09-23 13:52:37 +00:00
Seungha Yang
8550ed5888 d3d12: Add support for mipmap texture
Consider D3D12_RESOURCE_DESC.MipLevels > 1 or zero case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7555>
2024-09-23 13:52:37 +00:00
Jan Alexander Steffens (heftig)
f1aedd65f4 ges: Fix name of GESFrameCompositionMeta API type
g-ir-scanner 1.82.0 failed with a fatal error due to the wrong
namespace.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3800
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7554>
2024-09-21 00:42:36 +02:00
Seungha Yang
eb6d083ebe d3d12converter: Fix crash on pso update
Allocates D3D12_INPUT_ELEMENT_DESC memory on heap instead of using
stack memory for later reuse

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
71d26ee4f8 d3d12swapchainsink: Add auto-resize mode
Automatically resize swapchain backbuffer to be identical to
stream resolution if user calls resize() signal with zero resolution

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
9dee102867 d3d12swapchainsink: Add support for MSAA
Adding "msaa" property and enable MSAA if supported by device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
ce5321be68 d3d12videosink: Use converter config for initial MSAA setup
Avoid redundant pso creation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
7cf27c456b d3d12converter: Add support initial pso DXGI_SAMPLE_DESC setting
Add more options for pso, in order to avoid redundant pso
creation when MSAA is used

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
965d898deb d3d12swapchainsink: Add sampling-method property
Allow setting sampler filter method to use

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
62caa76155 d3d12convert: Use new sampler filter update method
... instead of creating new converter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
a1029d5b87 d3d12converter: Add support for sampler filter update
Creates new root signature and pipeline state object
if sampler filter method is updated

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
Seungha Yang
c75e6d01c5 d3d12converter: Use generated sampler
... instead of static ones, in order to support sampler state update

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7550>
2024-09-20 19:19:15 +00:00
He Junyan
05353e69ca va: decoder: Delete all the internal locks
In fact, the va decoder is just a internal helper class and its access
is under the control of all dec elements. So far, there is no parallel
operation on it now.
At the other side, some code scan tools report race condition issues.
For example, the "context" field is just protected with lock at _open()
but is not protected at _add_param_buffer().
So we just delete all its lock usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
He Junyan
2652467d7c h264bitwriter: Add check for data size to avoid overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
He Junyan
b427f33818 h265bitwriter: Add check for data size to avoid overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
He Junyan
6bb294343b va: jpegenc: Fix a memory leak when filter sink caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
He Junyan
dfccbd52f4 va: vpp: Use gst_caps_replace to operate the filter_caps
No need to use lock when we assign value to priv->filter_caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7547>
2024-09-20 14:36:17 +00:00
Alan Coopersmith
9c0fbfd2eb gstreamer: netclock-replay: use gst_c_args when building
Need HAVE_CONFIG_H to avoid build failure on Solaris 11.4 with gcc 14.1:

../subprojects/gstreamer/tests/misc/../../libs/gst/net/gstnetutils.c:71:7:
 error: implicit declaration of function ‘setsockopt’
 [-Wimplicit-function-declaration]
   71 |   if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) {
      |       ^~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7553>
2024-09-20 06:20:15 +00:00
Piotr Brzeziński
a6fa53b7b1 rtppassthroughpay: Fix reading clock-rate and payload type from caps
They were using wrong types - while uint is correct technically, for compatibility reasons caps have them as signed int.
Values are now correctly read + added simple guards just to be sure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7526>
2024-09-19 16:46:20 +00:00
Piotr Brzeziński
363154d855 rtppassthroughpay: Add ability to regenerate RTP timestamps
Timestamps are untouched by default, but the new mode can now be enabled to replace RTP timestamps
with ones generated from the buffer PTS. Making it an enum in case different modes are needed in the future.
That allows for a rtpjitterbuffer to do proper drift compensation, so that the stream coming out of gst-rtsp-server
is not drifting compared to the pipeline clock and also not compared to the RTCP NTP times.

Most of the code is borrowed from rtpbasepayload, as it's exactly its behaviour which I wanted to bring here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7526>
2024-09-19 16:46:20 +00:00
Sebastian Dröge
252378f1ae flvmux: Use gst_aggregator_update_segment() instead of randomly pushing a segment event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 17:08:45 +03:00
Sebastian Dröge
cff7e3986e mxfmux: Use gst_aggregator_update_segment() instead of randomly pushing a segment event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 17:08:45 +03:00
Sebastian Dröge
1bd6aabf96 mpegtsmux: Use gst_aggregator_push_src_event() for pushing downstream events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 17:08:45 +03:00
Sebastian Dröge
37ef85f268 aggregator: Add gst_aggregator_push_src_event()
This ensures that any pending events are pushed before pushing the new event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 17:08:45 +03:00
Sebastian Dröge
075a81b44f aggregator: Remove unused tag handling code
If this becomes API it would now have to be implemented differently because
various elements are implementing tag handling themselves now and this would
conflict.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
2024-09-19 16:12:14 +03:00