Commit graph

116402 commits

Author SHA1 Message Date
Tim-Philipp Müller bf6ce1d64a Release 1.22.5 2023-07-20 15:22:48 +01:00
Ruslan Khamidullin 337d2457e0 video: add extensive tests for gst_video_time_code_is_valid()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5061>
2023-07-19 16:05:33 +01:00
Ruslan Khamidullin aded70efaf video: accept timecode of 119.88 (120/1.001) FPS
The drop-frame rules are specified in “SMPTE ST 12-3:2016” and are
consistent with the traditional ones:

“

To minimize fractional time deviation from real time, the first two
super-frame numbers (00 and 01) shall be omitted from the count at the
start of each minute except minutes 00, 10, 20, 30, 40, and 50. Thus the
first eight frame numbers (0 through 7) are omitted from the count at
the start of each minute except minutes 00, 10, 20, 30, 40, and 50.
”

Where “super-frame” is a group of 4 frames for 120 FPS.

Fixes #2797

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5061>
2023-07-19 16:05:06 +01:00
Sebastian Dröge 6910a24c14 video: timecode: Add support for framerates lower than 1fps
These are not explicitly defined but the existing calculations can be
extended to also cover that case by inverting them to avoid floating
point calculations.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5074>
2023-07-19 15:59:19 +01:00
Sebastian Dröge eb89e0a13e rmdemux: Check for integer overflow when calculation audio packet size
Fixes ZDI-CAN-21444
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2782

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
2023-07-19 13:13:45 +00:00
Sebastian Dröge ccdb10de52 rmdemux: Use GST_LOG_OBJECT instead of GST_LOG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
2023-07-19 13:13:45 +00:00
Sebastian Dröge 743381cba7 rmdemux: Check that enough SIPR audio data is available when copying
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
2023-07-19 13:13:45 +00:00
Sebastian Dröge 4266ba0fd2 rmdemux: Check for integer overflows when calculating the size of SIPR audio buffers
Fixes ZDI-CAN-21443
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2782

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
2023-07-19 13:13:45 +00:00
Sebastian Dröge 6e61b944a4 rmdemux: Use GST_LOG_OBJECT instead of GST_LOG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
2023-07-19 13:13:45 +00:00
Philippe Normand 8d486d1398 decodebin3: Prevent a critical warning when reassigning output slots
Do not attempt to send a streams-selected message when reassigning
an output slot in case upstream signalled that it is handling stream selection.
In this case decodebin3 doesn't keep track of stream
collections (`dbin->collection` is NULL).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5069>
2023-07-19 11:48:40 +00:00
Philippe Normand eea9f74f95 decodebin3: Fix slot input linking when the associated stream has changed
Setting the input field on the empty slot prevents future linking of it and will
result in flow errors later on.

This was observed in WebKit's MediaStream source element, when it changes the
caps on one of its associated streams, from an encoded format to a raw video
format. The associated stream-id on the sticky stream-start event doesn´t
change, but the element creates a new GstStream with a different ID and sets it
on the stream-start event. Stream parsing is disabled in urisourcebin, so
decodebin3 handles the parsing. Without this patch we would end-up with unlinked
pads in decodebin3 after switching to the raw video format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5067>
2023-07-19 09:12:53 +01:00
Philippe Normand f9360d47c1 query: Add a quark for SELECTABLE query type
So that `gst_query_type_get_name()` won't return "unknown" for this type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5067>
2023-07-19 09:12:53 +01:00
Edward Hervey 1ee26b0a7a urisourcebin: Set source element to READY before querying it
Generating the source element is done when urisourcebin is doing the READY to
PAUSED state change, so it is reasonable to set the new source element to that
state.

This also allows detecting early failures with backing libraries or
hardware (checks done in NULL->READY).

Finally it makes more sense to have an element in READY when attempting to query
information from it (such as SCHEDULING queries or probing live-ness).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5058>
2023-07-18 14:45:12 +00:00
Edward Hervey 3e541953f8 hlsdemux2: Don't set a referer when updating playlists
In the same way we don't for regular playlists in the base class.

If there is a referer specified by the app/user, the downloadhelper will set it
accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5057>
2023-07-18 16:00:49 +02:00
Edward Hervey 46d5a64117 adaptivedemux2: Don't blindly set the main manifest URI as referer
There's no guarantee it will *actually* be the URI which refered to what we are
downloading. It could be a stream URI or anything else.

Instead of putting something wrong, put no (specific) referer as a better choice

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5057>
2023-07-18 16:00:49 +02:00
Andoni Morales Alastruey ee43b6421e videodecoder: fix segfault copying buffer metas
The current implementation copies metas without checking if the buffer
is writable.

The operation that needs to be done, replacing the input buffer and
copying the metas, is only part of that process. We create a new function
that does both.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5054>
2023-07-18 12:22:10 +00:00
Doug Nazar a1d2cea913 ges: validate: Use correct types when getting structure values
From https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/247

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5055>
2023-07-18 11:43:52 +00:00
Doug Nazar e1e9fbd26b ges: tests: Use correct variable types when setting properties
From https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/247

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5055>
2023-07-18 11:43:52 +00:00
Víctor Manuel Jáquez Leal 90cfe4746e jpegparse: Warn only malformed data in APP data.
It's only malformed data in APP when its length is less than 6 chars,
because it should have at least an id string. Otherwise, if the id string
is not handled, no warning is raised, only a debug message noticing it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5053>
2023-07-18 12:30:57 +02:00
Víctor Manuel Jáquez Leal 122e7b7584 jpegparse: Parse AVI1 tag in app0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5053>
2023-07-18 12:30:57 +02:00
He Junyan 107553843c va: jpegdecoder: Do not check SOS state when parsing DRI marker.
According to spec, the JPEG_MARKER_DRI(Restart interval definition)
marker can come before the SOS marker. So we should not check the SOS
state when parsing the DRI marker.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5053>
2023-07-18 12:30:57 +02:00
Bastien Nocera 1e7c085791 gtk: Fix critical caused by pointer movement when stream is getting ready
This check fixes a critical warning that can happen when a pointer motion
happens and the video doesn't have its width/height information available.

GStreamer-Video-CRITICAL **: gst_video_center_rect: assertion 'src->h != 0' failed

 #0  g_logv (log_domain=0x7ffff705e176 "GStreamer-Video", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../../../../Projects/jhbuild/glib/glib/gmessages.c:1422
 #1  0x00007ffff7e1a81d in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff7e77a9d "%s: assertion '%s' failed") at ../../../../Projects/jhbuild/glib/glib/gmessages.c:1460
 #2  0x00007ffff7e1b749 in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=<optimized out>, expression=<optimized out>) at ../../../../Projects/jhbuild/glib/glib/gmessages.c:2930
 #3  0x00007ffff701d90b in gst_video_sink_center_rect (src=..., dst=..., result=result@entry=0x7fffffffc6d0, scaling=scaling@entry=1) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideosink.c:105
 #4  0x00007fffe5652dbb in _fit_stream_to_allocated_size (result=0x7fffffffc6d0, allocation=0x7fffffffc6c0, base_widget=0x9396f0) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:326
 #5  gtk_gst_base_widget_display_size_to_stream_size (base_widget=base_widget@entry=0x9396f0, x=1207.7109375, y=811.84765625, stream_x=stream_x@entry=0x7fffffffc720, stream_y=stream_y@entry=0x7fffffffc728) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:344
 #6  0x00007fffe5651a4b in gst_gtk_base_sink_navigation_send_event (navigation=0x5ff990, event=0x178a730) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c:340
 #7  0x00007fffe5652432 in gtk_gst_base_widget_motion_event (widget=<optimized out>, event=event@entry=0x1f14b60) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:404

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5051>
2023-07-18 07:36:41 +02:00
Michael Tretter 5b60ea9a8a v4l2videoenc: remove empty sink_query
The sink_query() function simply calls the sink_query() function of the parent
videoencoder class. Remove the override to simply directly call the parent's
function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5036>
2023-07-14 00:07:27 +02:00
Michael Tretter 2e5929abfc v4l2videoenc: replace custom QUERY_CAPS handling with getcaps callback
The videoencoder base class uses getcaps() to ask a subclass for the caps in its
sink_query_default() implementation.

Replace the custom handling of the QUERY_CAPS in the v4l2videoenc with an
implementation of getcaps() that returns the caps that are supported by the
v4l2videoenc to return these caps in the query.

This getcaps() implementation also calls the provided proxy_getcaps(), which
sends a caps query to downstream. This fixes the v4l2videoenc element to respect
limits of downstream elements in a sink query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5036>
2023-07-14 00:07:27 +02:00
Víctor Manuel Jáquez Leal 825ac9a77e vaapidecode,vaapipostproc: Disable DMAbuf from caps negotiation
Given the amount of complains about artifacts when negotiating dmabuf
given incompatible drm-formats, and that there's no enough bandwidth
for a proper and quick fix in gstreamer-vaapi, this patch disables,
from decoders and postprocessor, the DMABuf caps feature.

For those who needs DMABuf can use the va elements in -bad, increasing
their ranking for autoplugging by using the environment variable
GST_PLUGIN_FEATURE_RANK=vah264dec:MAX, for example.

This can be considered a first step to the deprecation of
gstreamer-vaapi in favor of the va plugin in -bad.

Fixes: #1137
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5029>
2023-07-13 01:23:55 +02:00
Philippe Normand e7724ecf0b decodebin3: Remove spurious input locking during parsebin reconfiguration
Commit 22917b140f added extra locks in
`reset_input_parsebin()` but all call sites of that function already take the
input lock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5025>
2023-07-12 21:32:53 +02:00
Carlos Rafael Giani ca868332f1 gl: Take into account viv-fb vs. viv_fb naming in meson scripts
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4959>
2023-07-12 22:45:04 +10:00
Matthew Waters 661dcdaf30 gl: provide a pkg-config/gir file for the viv-fb backend
Required to be able to generate coherent bindings for window system
specific APIs due to limitations in gobject-introspection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4959>
2023-07-12 22:45:04 +10:00
Matthew Waters 64ebf6cc67 gl: don't install the viv-fb window header file
It is not needed at all by any external implementations and should not
be exposed to the outside world.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4959>
2023-07-12 22:45:04 +10:00
Carlos Rafael Giani bd7c1adba9 gl: Separate viv direct texture checks from viv-fb winsys check
Vivante direct textures do not depend on the viv-fb windowing system.
Decouple these two to be able to use direct textures even when viv-fb
is not enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4959>
2023-07-12 22:45:01 +10:00
Nirbheek Chauhan a7ba1428e0 meson: Install viv-fb GL headers, needed by i.MX
Needed by qmlglsink at build time to allocate a viv-fb display.

Without this, the GL fastpath doesn't work, and performance is really
bad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4959>
2023-07-12 22:44:58 +10:00
Tim-Philipp Müller bda8cf583f taglist, plugins: fix compiler warnings with GLib >= 2.76
Fix compiler warnings about not using the return value when
freeing the GString segment with g_string_free(.., FALSE):

    ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’

which we get with newer GLib versions. These were all harmless.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5015>
2023-07-12 08:58:50 +00:00
Seungha Yang 62aa802d17 d3d11bufferpool: Fix heavy CPU usage in case of fixed-size pool
There's no reason to release GstMemory manually at all.
If we do release GstMemory, corresponding GstBuffer will be
discarded by GstBufferPool baseclass because the size is changed
to zero.

Actual cause of heavy CPU usage in case of fixed-size pool
(i.e., decoder output buffer pool) and if we remove GstMemory from
GstBuffer is that GstBufferPool baseclass is doing busy wait in acquire_buffer()
for some reason. That needs to be investigated though, discarding
and re-alloc every GstBuffer is not ideal already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4943>
2023-07-11 23:23:12 +00:00
Seungha Yang b8e7012882 qt6: Set sampler filtering method
QQuickItem::smooth property doesn't seem to be propagated to
newly created QSGSimpleTextureNode automatically.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2793
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5016>
2023-07-11 22:26:24 +00:00
Philippe Normand c067269737 webrtcbin: Prevent critical warning when creating an additional data channel
The max_channels value wasn't clamped to 65534 in all situations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5012>
2023-07-11 20:39:59 +00:00
David Craven ca48193cd6 matroska: demux: Strip signal byte from encrypted blocks
Removes the signal byte when the frame is unencrypted to
be consistent with when the frame is encrypted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5014>
2023-07-11 13:53:02 +00:00
Maksym Khomenko 185307f0be appsink: add missing make_writable call
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5013>
2023-07-11 13:21:52 +01:00
Thibault Saunier 0e633b2a90 bad: audioaggregator: Do not post message before being constructed
`gst_aggregator_set_latency` will post a message on the bus which
triggers traces for not constructed objects which fails in rust tracers
as object should have names in all traces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4984>
2023-07-10 19:00:49 +01:00
Thibault Saunier 874370d0ab nle: composition: Avoid running query before being constructed
`gst_pad_create_stream_id` runs a URI query on the element which
triggers traces for not constructed objects which fails in rust tracers
as object should have names in all traces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4984>
2023-07-10 19:00:49 +01:00
Thibault Saunier 65896fd534 ges: pipeline: Avoid setting state before being constructed
It means setting state which triggers traces for not constructed objects
which fails in rust tracers as object should have names in all traces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4984>
2023-07-10 19:00:49 +01:00
Nicolas Dufresne e4206bbae8 v4l2: videodec: Don't wait for src_ch if active
If the capture pool is already active, like when handling gaps at the
start of a stream, do not setup the decoder to wait for src_ch event.
Otherwise the decoder will endup waiting for that at the wrong moment
and exit the decoding thread unexpectedly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4996>
2023-07-09 17:50:30 +01:00
Nicolas Dufresne 62ada196db v4l2: videodec: Move pool setup inside negotiate()
Move all the pool configuration inside the negotiate() virtual function.
This allow settting up a pool with default format whenever the base
class wants to start without input data, like gaps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4996>
2023-07-09 17:50:29 +01:00
Hou Qi e35e1a01b2 v4l2videodec: correctly register v4l2mpeg2dec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4992>
2023-07-07 16:32:59 +01:00
Guillaume Desmottes 4c77bc2161 videoflip: fix critical when tag list is not writable
Fix this pipeline where the tag list is not writable:

gst-launch-1.0 videotestsrc ! taginject tags="image-orientation=rotate-90" ! videoflip video-direction=auto \
  ! autovideosink

GStreamer-CRITICAL **: 12:34:36.310: gst_tag_list_add: assertion 'gst_tag_list_is_writable (list)' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4990>
2023-07-07 14:59:33 +01:00
Théo Maillart f38e8db249 inputselector: fix playing variable is never set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4988>
2023-07-07 11:55:23 +01:00
Michael Olbrich 841902889b v4l2src: handle resolution change when buffers are copied
When buffers are copied then GST_V4L2_FLOW_RESOLUTION_CHANGE is returned by
gst_v4l2_buffer_pool_process() so do renegotiation here as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4985>
2023-07-06 19:41:27 +01:00
Guillaume Desmottes cdff561a76 subtitleoverlay: fix mutex error if sink caps is not video
We were trying to unlock a mutex that was not locked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4972>
2023-07-05 13:20:34 +01:00
Seungha Yang 4bd7992d14 rtspsrc: Fix crash when is-live=false
The pad's parent (i.e., rtspsrc) can be nullptr since we add pads
later.

Co-authored-by: Jan Schmidt <jan@centricular.com>

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2751
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4971>
2023-07-05 09:17:14 +00:00
Edward Hervey 084efebb2a hlsdemux2: Ensure processed webvtt ends with empty new line
Parsers downstream will use empty new lines to detect where an entry
ends. Failure to have a newline would cause the entry to be either
discarded or (wrongly) concatenated with the next entry

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4970>
2023-07-05 09:17:58 +01:00
Philippe Normand a75140ba87 webrtcstats: Properly report IceCandidate type
strcmp returns a positive value if s1 is greater than s2, while we actually
needed to check equality here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4957>
2023-07-03 09:17:01 +01:00