Commit graph

582 commits

Author SHA1 Message Date
Jan Schmidt
75fcfdb12d video-converter: Set TIME segment format on appsrc
Combine the appsrc and appsink settings into one place and ensure that
the appsrc will output a TIME segment, to avoid incorrect segment format
criticals in some situations.

The D3D11 path was already setting the segment format correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7839>
2024-11-06 19:30:11 +11:00
Andoni Morales Alastruey
5a3dd943fe cocoa: fix rendering artefacts in retina displays
Set the correct contentsScale in the CALayer instead of using
the default (1.0) which causes rendering artefacts in retina
displays due to using a smaller bitamp than the display size.

See: https://developer.apple.com/documentation/quartzcore/calayer/1410746-contentsscale?language=objc

Fix: #3942
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7828>
2024-11-05 13:40:23 +00:00
Andreas Wittmann
41ad50fb48 qmlgloverlay: make depth buffer optional
allow dropping depth/stencil buffer for
qmlgloverlay element. Shows considerable
drop in memory bandwidth consumption of
the element on windows platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7677>
2024-11-01 02:37:57 +00:00
Albert Sjolund
ae6ac2a659 appsrc: Fix use-after-free when making buffer / buffer-lists writable
make_writable can cause a reallocation of the buffer, meaning that obj
would point to an invalid object, both for buffer and for bufferlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7803>
2024-11-01 00:03:48 +00:00
Thibault Saunier
ec2b3cb200 discoverer: Fix typos
discovererd / discoverered -> discovered

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7733>
2024-10-29 00:17:58 +00:00
Thibault Saunier
5ed2af5083 discoverer: Fix serializing tags StreamInfo on disc
When `use-cache` is used, we were serializing the StreamInfo **before**
_ensure_info_tags was called, meaning we were always missing that information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7733>
2024-10-29 00:17:58 +00:00
Diego Nieto
fe61bc3cee video-format: reduce the number of memcpy if possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7694>
2024-10-26 07:02:50 +00:00
Edward Hervey
38c07a2d01 all: Fix closure annotations
This was misused almost everywhere.

See
https://gi.readthedocs.io/en/latest/annotations/giannotations.html#support-for-gobject-closures

and: https://www.bassi.io/articles/2023/02/20/bindable-api-2023/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7725>
2024-10-25 08:58:29 +00:00
Carlos Falgueras García
561ca94916 video: Add GRAY10_LE16 support
This adds a 10-bit variant of grayscale packed into 16 bits little-endian
words. The MSB 6 bits are padding and should be ignored. This format is
used by Fraunhofer VVC encoder and decoder libraries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7706>
2024-10-25 05:53:22 +00:00
François Laignel
0f7be28eb1 rtspsrc: client-managed MIKEY KeyMgmt
Some servers (e.g. Axis cameras) expect the client to propose the encryption
key(s) to be used for SRTP / SRTCP. This is required to allow re-keying so
as to evade cryptanalysis. Note that the behaviour is not specified by the
RFCs. By setting the 'client-managed-mikey-mode' property to 'true', rtspsrc
acts as follows:

* For a secured profile (RTP/SAVP or RTP/SAVPF), any media in the SDP
  returned by the server for which a MIKEY key management applies is
  elligible for client managed mode. The MIKEY from the server is then
  ignored.
* rtspsrc sends a SETUP with a MIKEY payload proposed by the user. The
  payload is formed by calling the 'request-rtp-key' signal for each
  elligible stream. During initialisation, 'request-rtcp-key' is also
  called as usual. The keys returned by both signals should be the same
  for a single stream, but the mechanism allows a different approach.
* The user can start re-keying of a stream by calling SET_PARAMETER.
  The convenience signal 'set-mikey-parameter' can be used to build a
  'KeyMgmt' parameter with a MIKEY payload.
* After the server accepts the new parameter, the user can call
  'remove-key' and prepare for the new key(s) to be served by signals
  'request-rtp-key' & 'request-rtcp-key'.
* The signals 'soft-limit' & 'hard-limit' are called when a key
  reaches the limits of its utilisation.

This commit adds support for:

* client-managed MIKEY mode to srtpsrc.
* Master Key Index (MKI) parsing and encoding to GstMIKEYMessage.
* re-keying using the signals 'set-mikey-parameter' & 'remove-key' and
  then by serving the new key via 'request-rtp-key' & 'request-rtcp-key'.
* 'soft-limit' & 'hard-limit' signals, similar to those provided by srtpdec.

See also:

* https://www.rfc-editor.org/rfc/rfc3830
* https://www.rfc-editor.org/rfc/rfc4567

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7587>
2024-10-24 12:43:11 +00:00
James Cowgill
8cf0d5a65c exiftag: Check the result of gst_date_time_new_local_time
Fixes a critical warning when parsing a JPEG containing a malformed
`DateTime` tag (like `0000:00:00 00:00:00`).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7709>
2024-10-23 05:34:30 +00:00
Scott Moreau
6846746a0e gst-plugins-base: Set swap interval to 0 for wayland EGL windows
This allows the stream to drive the buffers submitted to the display server.
If the application does not receive frame events for a period of time due to
minimization or tty switch for example, instead of waiting to process and
then catching up when frame events resume, the stream will resume instantly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7691>
2024-10-20 14:03:11 +00:00
Nicolas Dufresne
64c6ff97c4 glcontext: egl: Unrestrict the support base DRM formats
There is no requirement for a base DRM format to be supported by libgstvideo
in order to be uploaded to. Don't limite to DRM fourcc that have a libgstvideo
format mapping. This notably enabled AFBC support, which uses an opaque based
format that does not have a linear definition. This also adds R8/RG88 and
simimlar other formats that are not yet mapped in libgstvideo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7689>
2024-10-19 23:59:58 +00:00
François Laignel
375acaed51 gst: hamonise recent Caps function names with Structure counterparts
These functions were introduced as part of the GstIdStr MR:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7644>
2024-10-16 23:14:50 +00:00
Diego Nieto
1032450a0e pbutils: descriptions: add H.266/VVC descriptions
Add H.266 descriptions supporting different codec profiles as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7652>
2024-10-15 08:19:27 +00:00
Diego Nieto
6b4caacd19 codec-utils: add H.266/vvc mime type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7652>
2024-10-15 08:19:27 +00:00
valadaptive
6198c7fba2 riff: Add support for Lagarith fourcc tag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6831>
2024-10-10 03:55:04 +00:00
Olivier Crête
78775079c6 pbutils: Add LCEVC information to H.264 description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7330>
2024-10-02 20:33:13 +00:00
Nicolas Dufresne
fd5e62a317 allocators: drmdump: Add NV15 supports
This is a packed version of P010, names NV14_10LE40 in GStreamer. This
format is used on all Rockchip SoC variants.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7580>
2024-09-30 16:11:09 +00:00
Nicolas Dufresne
f42ce6ef35 allocators: drmdumb: Fix bpp value for P010
P010 uses 16 bits per pixel, with least significant being padding. This
code worked with Intel display driver since they roundup that value, but
does not work with the generic DRM helpers which also support NV15,
which does not have any padding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7580>
2024-09-30 16:11:09 +00:00
Sebastian Dröge
275134c883 base: audio: video: Use more efficient caps/structure API in various places
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:26:18 +03: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
3b9f050600 common: Stop using GQuark-based GstCapsFeatures API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +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
Sebastian Dröge
0c1611d31d common: Stop using GQuark-based GstStructure name API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
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
Sebastian Dröge
396ef0cbcf video: Don't overshoot QoS earliest time by a factor of 2
By setting the earliest time to timestamp + 2 * diff there would be a difference
of 1 * diff between the current clock time and the earliest time the element
would let through in the future. If e.g. a frame is arriving 30s late at the
sink, then not just all frames up to that point would be dropped but also 30s of
frames after the current clock time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7459>
2024-09-13 19:52:52 +00:00
Sebastian Dröge
e59056526a video-converter: Add fast path conversions between v210 <-> I420_10 / I422_10
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7504>
2024-09-13 13:11:31 +00:00
Xavier Claessens
9a87ce418b gl: Fix configure error when libdrm is a subproject
When libdrm is a subproject it cannot be used in a configure time check:
  ERROR: Dependencies must be external dependencies

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7380>
2024-09-03 13:13:04 +00:00
Tim-Philipp Müller
3beb06952e gst-plugins-base: use g_sort_array() instead of deprecated g_qsort_with_data()
Fixes compiler warnings with the latest GLib versions.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4127

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7384>
2024-09-02 22:31:34 +00:00
Mathieu Duponchelle
015af606b6 audio-converter: support more numerical types for mix matrix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Víctor Manuel Jáquez Leal
c27d0842ce pbutils: descriptions: use subsampling factor to get YUV subsampling
The algorithm used to determine the YUV subsampling string uses width and height
subsampling factor, not the raw subsampling. Otherwise all 4:2:0 YUV frames will
be detected as 4:4:4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7353>
2024-08-14 19:02:20 +00:00
Chao Guo
cf30e875de glupload: Add formats supported by #GstGLMemory to raw caps when generating sink pad caps
When glupload generates sink caps based on src caps after determining upload method, src
caps may only contain RGBA format.

In this case, the raw caps on the sink pad generated by glupload will only contain the
RGBA format, which will cause caps negotiation fail, because the filter caps used for
negotiation by the upstream element may only contain other formats, such as xBGR, etc.

Add the formats supported by #GstGLMemory to raw caps to ensure that caps negotiation
succeeds.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7061>
2024-08-13 04:05:16 +00:00
Piotr Brzeziński
724c443a65 videoencoder: Expose release_frame() and drop_frame() as public API
release_frame() can be useful for manually dropping frames without posting QoS messages like finish_frame() would.
Matches the same kind of API on the decoder side of things.

Modifies the behaviour of release_frame() to make sure events from released frames are stored as 'pending'
and pushed before the next non-dropped frame. This is needed because now release_frame() can be called outside of
finish_frame(), so we would potentially just lose events and bad things would happen.

drop_frame() was also added to match the decoder API. It functions almost identically to finish_frame() without a buffer
attached to the frame, except instead of immediately pushing the frame's events, it will store them as pending.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7190>
2024-08-06 09:31:58 +00:00
Max Romanov
09257b391c rtspconnection: Handle invalid argument properly
In case when conn->input_stream is NULL and glib was built with
"glib_checks" enabled, g_pollable_input_stream_read_nonblocking()
returns -1, but does not set the "err".

The call stack:
  read_bytes() ->
    fill_bytes() ->
      fill_raw_bytes()

The return value -1 passed up to read_bytes() and incorrectly
processed there after "error:" label.

This changes the return value to EINVAL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7210>
2024-08-06 03:50:34 +00:00
Nicolas Dufresne
7bd5c5073f glframebuffer: Improve error tracing
glCheckFrameStatus() can fail by returning 0, and otherwise return a
status. Fix the trace to make it clear when we get an unkown status
compare to having an error, in which case we also trace the error code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7291>
2024-08-02 13:03:51 +00:00
Jan Schmidt
9dc1d68e2f codec-utils: Recognise mjpg mime type
Add mjpg to gst_codec_utils_caps_from_mime_codec_single()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Nicolas Dufresne
96a2408147 glcolorconvert: Fix syntax error in detiling shader
Mesa compiler complains of:
    error: `rgba' redeclared

This regression got introduced by 674e643428, which introduce
colormatrix computation without revoing the pre-declaration of
rgba variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7231>
2024-07-25 14:10:52 +00:00
Nirbheek Chauhan
6ce72488fa Revert "meson: Fix invalid include flag in uninstalled gl pc file"
This reverts commit 9d719b9937.

The old pkg-config implementation errors out if a variable specified
in the pkgconfig file is not defined, so this actually broke
uninstalled pc files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7191>
2024-07-19 14:46:36 +00:00
Jakub Adam
9629d78b7c gstvideoaggregator: preserve features in non-alpha caps
Fixes caps negotiation when sink template caps of an element inheriting
GstVideoAggregator have features different from the implicit
"memory:SystemMemory".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7102>
2024-07-18 14:17:45 +02:00
Nirbheek Chauhan
9d719b9937 meson: Fix invalid include flag in uninstalled gl pc file
${libdir}/gstreamer-1.0/include is only valid after installation, but
extra_cflags are added unconditionally, so we can't use that for
include flags.

Instead, let's add the include flag via variables, which are different
for installed and uninstalled pc files.

This is particularly bad for consuming GStreamer via CMake which barfs
on non-existent include paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7130>
2024-07-05 16:20:22 +00:00
He Junyan
9f1887a623 glupload: Add a comment in DMA's propose_allocation query for video meta
The video meta API now is a mandatory request for DMA kind negotiation. In
current code, the raw method always adds that video meta API in the query
of propose_allocation(), so we do not need to do the duplicated task here.
Just adding a comment to declare that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:15 +00:00
Edward Hervey
2c1c1ec575 encoding-target: Chain up to parent class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Edward Hervey
651568d543 encoding-profile: Chain up to parent class finalize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Seungha Yang
fca7e5aa23 video: convertframe: Add support for d3d12 conversion
Use d3d12convert in case of d3d12 memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7095>
2024-06-26 17:56:41 +00:00
Sebastian Dröge
9da1268656 video-info: Don't crash in gst_video_info_is_equal() if one videoinfo is zero-initialized
Instead handle it like gst_audio_info_is_equal() and consider both different.
And also add a shortcut for the pointers to both infos being equal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7055>
2024-06-18 17:47:14 +00:00
Sebastian Dröge
a6a1fd03cc rtspconnection: Use GDateTime instead of gmtime()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6872>
2024-06-06 08:33:51 +00:00
Sebastian Dröge
c14a2d7d6d video: Document UL_LR / UR_LL video orientation methods correctly
They're not flipping along the diagonal axis but a flip and rotation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6936>
2024-06-05 11:37:13 +00:00
Nirbheek Chauhan
fe1a7edda2 gl: Fix libdrm dependency detection and usage
drm_fourcc.h should be picked up via the pkgconfig dep, not the system
includedir directly. All this allows it to be picked up consistently
(via the subproject, for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6932>
2024-05-29 15:49:45 +00:00
Edward Hervey
c987eaa427 pbutils: Missing plugin messages can contain the stream-id
In order to help users and applications, allow setting the stream-id for which
there is a missing plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6886>
2024-05-29 11:44:05 +00:00