Commit graph

1323 commits

Author SHA1 Message Date
Jochen Henneberg
73c61784d4 audiorate: Account for in buffer samples if fill samples are added
If fill buffers are added to compensate for missing samples the input
buffer is pushed as well and has to be added to output samples count.

This ensure that add - drop == out - in.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8358>
2025-01-24 09:12:50 +01:00
Sebastian Dröge
55fa0a54a2 video-overlay-composition: Handle the SCALE meta transformation
Simply update the render rectangle according to the scale factor. As only the
render rectangle is changed, the seqnum of the rectangle stays intact and no
additional GPU uploads are necessary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8288>
2025-01-22 15:17:27 +00:00
Sebastian Dröge
8991140c5a video-overlay-composition: Declare the video/size/orientation tags for the meta
If any of these change then the meta needs to be updated one way or another.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8288>
2025-01-22 15:17:27 +00:00
Mathieu Duponchelle
b26a5ee088 docs: explicitly list gir files as depends for generating configs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8324>
2025-01-20 13:24:44 +01:00
Mathieu Duponchelle
7983ecff1c docs: generate hotdoc configs for libraries with our helper script
With this patch, configure time is identical no matter whether doc is
enabled or not.

The configuration files also now contain explicitly-listed sources with
no wildcards.

For the four libraries where hotdoc needs to use clang to generate the
documentation (as opposed to the rest of the libraries where hotdoc uses
the gir), the script will call pkg-config to determine the appropriate
C flags.

This means a side effect of this patch is that pkg-config files are now
generated for the gstadaptivedemux and gstopencv libraries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
2025-01-17 20:36:06 +01:00
Mathieu Duponchelle
17e53f8c95 meson: bump minimum version to 1.4 in every subprojects
36c01d0579 bumped to 1.4 for gst-devtools
and the root project, but we usually keep those in sync everywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
2025-01-17 20:22:34 +01:00
Thibault Saunier
aa78649635 videoconvertscale: Handle large pixel aspect ratios
Some pixel aspect ratios found in dash streams have very large numerators and
denominators (while being close to 1:1). These values can cause integer overflow
during multiplication, leading to negotiation failures.

Add fallback path using gdouble when integer multiplication would overflow,
trading some precision for reliability instead of failing outright.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8262>
2025-01-17 15:13:14 +00:00
Tim-Philipp Müller
a059536b58 Back to development after 1.25.1 2025-01-14 15:00:43 +00:00
Tim-Philipp Müller
ca9d85c3b7 Release 1.25.1 2025-01-14 14:57:58 +00:00
Mathieu Duponchelle
3de86b2b97 docs: port plugins to explicit sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8273>
2025-01-13 19:17:13 +01:00
Edward Hervey
a9984a0003 vorbisdec: Fix check for "-1" bitrate values
The check is exactly the same, but more explicit.

Original commit that introduced the check is
20fb58be19:
---
vorbisdec: don't put invalid bitrate values into the taglist

Bitrates are stored as 32-bit signed integers in the vorbis
identification headers, but seem to be read incorrectly,
namely as unsigned 32-bit integers, into the vorbis structure
members which are of type long, which makes our check for
values <= 0 fail with files that put -1 in there for unset
values.
---

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
2025-01-13 12:51:45 +00:00
Edward Hervey
a81371bf8b base: Enable more warning flags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
2025-01-13 12:51:45 +00:00
Edward Hervey
568ae91a2a compositor: Don't use CLAMP for unsigned values
Just use MIN, we already know it's above 0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
2025-01-13 12:51:45 +00:00
Edward Hervey
c0d35e14a5 gst-play: Move esc-handling to the right place
It's meant to fall through to the default handler of the switch (for
debugging). Some intermediary commits broke that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
2025-01-13 12:51:45 +00:00
Edward Hervey
989539830d libvisual: Fix for libvisual headers
They use old style definition

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
2025-01-13 12:51:44 +00:00
Edward Hervey
9e58164cfb base: Do not use old-style definition
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
2025-01-13 12:51:44 +00:00
Edward Hervey
319ff17300 base: Fix fallthrough declarations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
2025-01-13 12:51:44 +00:00
Edward Hervey
65b4d26db6 audiorate: Fix unsigned integer comparision
next_offset uses a magic "-1" value for unset values. Use that value and not
checking whether it's positive (it always is, it's unsigned)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8286>
2025-01-13 08:08:00 +00:00
Edward Hervey
344ef36b5a videorate: Avoid overflow in calculations
base_ts and next_end_ts are both guint64. Use explicit check to avoid "negative"
timestamps (which would overflow, not be negative).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8286>
2025-01-13 08:08:00 +00:00
Edward Hervey
84f995dd90 test: Fix unsigned integer usage
num_queued is unsigned, it'll never be below 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8286>
2025-01-13 08:08:00 +00:00
Edward Hervey
9656ae6c0b decodebin3: Add missing break in switch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8286>
2025-01-13 08:08:00 +00:00
Olivier Crête
1485a387a4 codec-utils: Add missing nullable annotation to new APIs
Those APIs are documented to sometimes return NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8271>
2025-01-09 22:43:54 +00:00
Tim-Philipp Müller
3dcc6f4807 video-info: add "field-order" field to serialised caps also for interlace-mode=fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8219>
2025-01-08 19:48:31 +00:00
Tim-Philipp Müller
a62e517f6d videoencoder: copy over the field order for more interlace modes
.. when copying over video info things from the input state
to the output state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8219>
2025-01-08 19:48:31 +00:00
Mathieu Duponchelle
33da5f0d5d appsink: fix initial pile-up of caps events
appsink was queuing the caps event both in its GstBaseSinkClass.set_caps()
and its GstBaseSinkClass.sink_event() implementation, but only signaling
new_event from `sink_event`.

This caused `new_event` callbacks to start lagging by one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7749>
2025-01-08 09:00:31 +00:00
Guillaume Desmottes
94253529c4 glmixerbin: derivate the mixer name from the bin name
Make it easier to identify a specific instance in logs in complex
pipelines.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8183>
2025-01-06 07:50:43 +00:00
Guillaume Desmottes
69cd1a2d60 glcontext: add trace log when scheduling function in GL thread
There is already a log when the function is executed. Adding one when
scheduled can be useful to know how long we are waiting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8190>
2025-01-06 06:56:50 +00:00
Tim-Philipp Müller
64970e721f tcpclientsrc, tcpserversrc: don't try to get stats from NULL socket
Fixes criticals during gst-inspect.

Wasn't an issue before because the entire stats gathering
code path was inactive.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8211>
2025-01-04 12:20:18 +00:00
Tim-Philipp Müller
b4bef7fd35 tcpclientsrc, tcpserversrc: fix tcp stats gathering
Fix-up after commit e56b78417. Unclear how that could
ever have worked. Code only built because basically
everything was disabled due to the missing config.h
include.

- Include config.h so that HAVE_* defines are available.
- Fix missing variable declarations that somehow disappeared
  when moving the stats gathering code block into a separate
  function in a new file.
- Fix structure variable modified to match name in new function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8211>
2025-01-04 12:15:03 +00:00
Sebastian Dröge
2f3deb4009 message: Remove nullable annotation from gst_message_writable_details()
This function can never return NULL as the details are created for the message
if there are none yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8235>
2025-01-03 13:21:28 +00:00
Sebastian Dröge
fd91abfc9a audio: Add top-surround-left and right channel positions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8171>
2025-01-03 10:11:31 +00:00
Sebastian Dröge
9e3bb0a009 audio: Add new gst_audio_reorder_channels_with_reorder_map()
This allows reordering the samples with a pre-calculated reorder map instead of
calculating it again every time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8171>
2025-01-03 10:11:31 +00:00
Sebastian Dröge
f0a8938133 decodebin3: Free main input even if it is not part of the list of inputs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8216>
2025-01-02 14:30:02 +00:00
Philippe Normand
17e5491b60 videodecoder: Gracefully handle missing data without prior input segment
Exit early in case the decoder has been resetted and hasn't received a new
segment event yet.

This was detected with netsim dropping buffers in a WebRTC pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8200>
2024-12-23 10:49:28 +00:00
Thibault Saunier
8be9074b0f doc: Handle gst_dep.get_variable('libexecdir') failure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8178>
2024-12-20 20:19:28 +00:00
Thibault Saunier
caa223baf4 doc: Allow updating the plugins cache for all modules even if hotdoc is not present
This was possible for some modules but not all, for no good reason.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8178>
2024-12-20 20:19:28 +00:00
Edward Hervey
5480894dee pbutils: New AV1 caps utility functions
Makes it easy to convert between caps and codec_data

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4442>
2024-12-20 14:19:00 +00:00
Edward Hervey
f7d6822589 urisourcebin: Avoid deadlock on shutdown
The reason why the STATE lock was taken was to avoid issues where we would be
adding (and activating) elements at the same time as urisourcebin would be
brought down to READY. That would cause those new elements to potentially return
ERRORS because of not-negotiated/flushing-pads

But that creates a really bad deadlock (state lock is taken to deactivate the
streaming thread which .. is currently grabbing the state lock).

Instead, we can just ignore the warning/error messages that might occur when
shutting down.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8162>
2024-12-20 08:01:01 +00:00
Robert Mader
b687b9527b glupload: Add DRM raw uploader
The goal is equivalent to adding DMA_DRM caps to the existing raw
uploader, but creating a new dedicated uploader allows separating the
logic more easily.

Test:
 - use an AMD system
 - modprobe visl
 - gst-launch-1.0 filesrc location=some-1080p-content.mkv ! parsebin ! v4l2slh265dec ! glimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8126>
2024-12-18 22:31:02 +00:00
Max Romanov
477d330dee appsrc: Decrease log level for item drop
Leaky appsrc feature was implemented similar to queue. Dropping item
is a normal case because it is configured so. Warning messages
is too severe for this event.

Level changed to DEBUG just like in queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8147>
2024-12-13 17:24:44 +00:00
Dean Zhang (张安迪)
58696d57f9 videodecoder: set decode only flag by decode only buffer
This is used for optimize frame drop issue. Some video streams such as av1
contains decode-only frames. These frames are handled by decoder but not show
by display, which will cause input frame count unmatch the output frame count.
After collecting more decoder only frame, it will cause error report "so many
frame droped". So attach the flag GST_BUFFER_FLAG_DECODE_ONLY with the input
buffer, the v4l2videodecoder can further handle the decode-only buffer in
output list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8142>
2024-12-13 13:14:01 +00:00
Edward Hervey
2d92a2ee54 urisourcebin: Only rewrite stream-start event once
If the custom field is already present, we don't want to rewrite the event
again. Otherwise it would cause downstream into believing that a *new*
stream-start event has arrived ... which isn't the case.

Fixes #4097

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8132>
2024-12-13 09:42:01 +00:00
Guillaume Desmottes
a29591978b gl: raise WARNING instead of ERROR when no connector is connected
This is a valid and working use case when rendering on a headless
server.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8136>
2024-12-12 10:43:26 +01:00
Tim-Philipp Müller
7d793d8836 meson: unset GST_TRACERS for g-ir-scanner to avoid warnings
People might have GST_TRACERS=leaks set in their environment
by default, which will now trigger criticals during the build
when calling g-ir-scanner, because we unset GST_PLUGIN_SYSTEM_PATH
so that the scanner doesn't load any plugins.

Fixes #4093

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8121>
2024-12-10 23:07:06 +00:00
Edward Hervey
18d83192be uridecodebin3: Don't use decodebin3 static sink pad
Makes the code leaner, and fixes the issue which would happen when the
urisourcebin stream that was linked to the sink pad goes away (without any
replacement).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7949>
2024-12-10 08:47:43 +00:00
Edward Hervey
eb24c0eabc decodebin3: Make usage of static sink pad optional
There is no reason why we should mandate people to "at least" use the static
sink pad. This caused issues, like mandating that it should always have valid
content linked to it (problematic in case of upstream stream changes).

Instead we only use it if it's actually linked to, in which case it gets added
to the list of inputs.

This actually simplifies the code too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7949>
2024-12-10 08:47:43 +00:00
Edward Hervey
93e432bccb urisourcebin: Fix issue re-using outputs
When checking whether a no-longer used output could be re-used for another slot,
we only want to do that for streams which are not still used.

Otherwise we end up potentially re-assigning a demuxer stream to a completely
different one

Furthermore, if we *are* re-using an output slot, indicate what the replacement
GstStream will be so slot matching can work properly (which can happen in the
case of demuxers which add/remove all pads even if only a single one changed)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7949>
2024-12-10 08:47:43 +00:00
Nicolas Dufresne
6b6fb4c8b8 build: gl: Properly add sub-package to gst_libraries
GstGLEGL/Wayland/X11/Viv was actually never written into any of the gir_targets,
as a side effect, their gir was never copied into girs/ and not used to generate
the documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8061>
2024-12-05 15:42:54 -05:00
Cheung Yik Pang
acc1309cdf video: fix AV12 format lacking the GST_VIDEO_FORMAT_FLAG_ALPHA flag
The GST_VIDEO_FORMAT_FLAG_ALPHA indicates whether a video format has an
alpha channel.  AV12 does have an alpha plane.  Switching from
MAKE_YUV_FORMAT to MAKE_YUVA_FORMAT to generate GST_VIDEO_FORMAT_AV12.

Fixes #4081

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8067>
2024-12-05 10:07:54 +00:00
Edward Hervey
abb11ad8b4 urisourcebin: Fix collection leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8080>
2024-12-05 09:22:00 +01:00