Philippe Normand [Tue, 1 Aug 2023 14:14:29 +0000 (15:14 +0100)]
decodebin3: Ensure the slot is unlinked before linking to decoder
When switching from a raw stream to an encoded stream we need to make sure the
slot is unlinked, there is code in place for this but it wasn't triggered
because the slot being reconfigured wasn't advertised as linked beforehand.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5133>
Nicolas Dufresne [Thu, 22 Jun 2023 14:10:43 +0000 (10:10 -0400)]
v4l2: Fix support for left and top padding
In the current implementation, we support for most pixel format left
and top padding by changing the offset in the video meta. Though, to
align driver bytesused to the offset, we recalculate the offset, which
removed the modification we did before.
Instead, save the plane size, and truncate the driver reported bytesused
to the expected size, which ensures that the offsets still match. This
should also fix issues were the buffer size ended up bigger then the
pool size due to driver introduced padding.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5132>
Guillaume Desmottes [Tue, 25 Jul 2023 13:15:58 +0000 (15:15 +0200)]
videoflip: fix concurrent access when modifying the tag list
We were checking if the tag list is writable, but it may actually be
shared through the same event (tee upstream or multiple consumers).
Fix a bug where multiple branches have a videoflip element checking the
taglist. The first one was changing the orientation back to rotate-0
which was resetting the other instances.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5099>
Xabier Rodriguez Calvar [Fri, 21 Jul 2023 10:48:08 +0000 (12:48 +0200)]
qtdemux: attach cbcs crypt info at the right moment
Before it was always added but that can cause issues when the stream begins
unencrypted.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5096>
Nirbheek Chauhan [Fri, 14 Jul 2023 02:58:10 +0000 (08:28 +0530)]
meson: Ensure that soup plugin is built on Windows
The libpsl subproject wasn't building successfully and CI didn't
notice because:
1. The plugin wasn't explicitly enabled
2. Even when the plugin is explicitly enabled, the dep is not required
at build time when not building a static plugin
So fix all of these issues.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Nirbheek Chauhan [Wed, 12 Jul 2023 07:11:23 +0000 (12:41 +0530)]
libpsl.wrap: Fix MSYS2 build failure
Also switch from git repo to tarball.
https://github.com/rockdaboot/libpsl/pull/211
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Tim-Philipp Müller [Thu, 26 Jan 2023 20:42:41 +0000 (21:42 +0100)]
ci: use meson 1.1.1 in the 1.22 branch Windows CI
We need diff_files support for Meson wraps on the Windows
CI for the libpsl wrap which is only available since
Meson 0.63.
We leave the Fedora Meson version on 0.62 so that we
still cover that too since it's our minimum requirement.
Only the image prepare script is updated for now, but the
image tag is not bumped on purpose, since the 1.22 branch
has very low activity and building and uploading/distributing
a new image is fairly expensive. For now we just update the
meson version in the Windows jobs directly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Stéphane Cerveau [Tue, 20 Jun 2023 10:31:40 +0000 (11:31 +0100)]
libxml2: update to 2.10.3-4
The previous version was failing to configure due to
```
"Dependencies must be external dependencies"
```
on zlib
Fixed by https://github.com/mesonbuild/wrapdb/pull/865/files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Stéphane Cerveau [Mon, 19 Jun 2023 15:12:22 +0000 (17:12 +0200)]
wrap: add libpsl patch to fix win build
These patches are necessary for Windows build since
0.21.2
See
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Stéphane Cerveau [Fri, 16 Jun 2023 08:58:53 +0000 (10:58 +0200)]
wrap: update libpsl to 0.21.2
On macos, the build is failing with 0.21.1,
a patch has been landed to fix the issue, see
https://github.com/rockdaboot/libpsl/pull/166
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
Haihua Hu [Thu, 18 May 2023 08:08:03 +0000 (16:08 +0800)]
decodebin3: avoid identity, sinkpad, parsebin leakage when reset input
when reset_input, need remove identity/parsebin from decodebin3
when release_pad, need call free or reset input if collection
didn't change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5086>
Tim-Philipp Müller [Thu, 20 Jul 2023 15:57:47 +0000 (16:57 +0100)]
Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5082>
Tim-Philipp Müller [Thu, 20 Jul 2023 14:22:48 +0000 (15:22 +0100)]
Release 1.22.5
Ruslan Khamidullin [Tue, 18 Jul 2023 01:25:47 +0000 (01:25 +0000)]
video: add extensive tests for gst_video_time_code_is_valid()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5061>
Ruslan Khamidullin [Wed, 12 Jul 2023 22:45:28 +0000 (22:45 +0000)]
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>
Sebastian Dröge [Mon, 10 Apr 2023 09:54:51 +0000 (12:54 +0300)]
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>
Sebastian Dröge [Fri, 7 Jul 2023 07:08:21 +0000 (10:08 +0300)]
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>
Sebastian Dröge [Fri, 7 Jul 2023 07:08:03 +0000 (10:08 +0300)]
rmdemux: Use GST_LOG_OBJECT instead of GST_LOG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
Sebastian Dröge [Fri, 7 Jul 2023 07:00:19 +0000 (10:00 +0300)]
rmdemux: Check that enough SIPR audio data is available when copying
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
Sebastian Dröge [Fri, 7 Jul 2023 06:59:20 +0000 (09:59 +0300)]
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>
Sebastian Dröge [Fri, 7 Jul 2023 06:59:04 +0000 (09:59 +0300)]
rmdemux: Use GST_LOG_OBJECT instead of GST_LOG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
Philippe Normand [Tue, 18 Jul 2023 14:15:40 +0000 (15:15 +0100)]
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>
Philippe Normand [Mon, 17 Jul 2023 14:23:35 +0000 (15:23 +0100)]
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>
Philippe Normand [Mon, 17 Jul 2023 14:18:39 +0000 (15:18 +0100)]
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>
Edward Hervey [Tue, 31 Jan 2023 15:12:17 +0000 (16:12 +0100)]
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>
Edward Hervey [Wed, 15 Feb 2023 16:32:39 +0000 (17:32 +0100)]
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>
Edward Hervey [Wed, 15 Feb 2023 17:06:36 +0000 (18:06 +0100)]
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>
Andoni Morales Alastruey [Wed, 21 Jun 2023 11:45:13 +0000 (13:45 +0200)]
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>
Doug Nazar [Sat, 1 May 2021 20:52:22 +0000 (16:52 -0400)]
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>
Doug Nazar [Sat, 1 May 2021 20:50:11 +0000 (16:50 -0400)]
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>
Víctor Manuel Jáquez Leal [Sun, 19 Feb 2023 09:41:51 +0000 (10:41 +0100)]
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>
Víctor Manuel Jáquez Leal [Wed, 15 Feb 2023 18:02:35 +0000 (19:02 +0100)]
jpegparse: Parse AVI1 tag in app0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5053>
He Junyan [Sun, 12 Feb 2023 08:11:34 +0000 (16:11 +0800)]
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>
Bastien Nocera [Tue, 11 Jul 2023 15:00:57 +0000 (17:00 +0200)]
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>
Michael Tretter [Thu, 13 Jul 2023 14:27:05 +0000 (16:27 +0200)]
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>
Michael Tretter [Thu, 13 Jul 2023 14:16:44 +0000 (16:16 +0200)]
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>
Víctor Manuel Jáquez Leal [Fri, 20 May 2022 07:59:58 +0000 (09:59 +0200)]
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>
Philippe Normand [Wed, 12 Jul 2023 16:08:32 +0000 (17:08 +0100)]
decodebin3: Remove spurious input locking during parsebin reconfiguration
Commit
22917b140ffac5208eff173321fa7cdad8976cca 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>
Carlos Rafael Giani [Tue, 11 Jul 2023 19:41:46 +0000 (21:41 +0200)]
gl: Take into account viv-fb vs. viv_fb naming in meson scripts
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4959>
Matthew Waters [Tue, 16 May 2023 11:24:44 +0000 (21:24 +1000)]
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>
Matthew Waters [Tue, 16 May 2023 12:09:48 +0000 (22:09 +1000)]
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>
Carlos Rafael Giani [Fri, 30 Jun 2023 11:53:19 +0000 (13:53 +0200)]
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>
Nirbheek Chauhan [Wed, 8 Mar 2023 18:55:51 +0000 (00:25 +0530)]
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>
Tim-Philipp Müller [Sun, 26 Mar 2023 15:40:28 +0000 (16:40 +0100)]
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>
Seungha Yang [Mon, 26 Jun 2023 20:09:49 +0000 (05:09 +0900)]
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>
Seungha Yang [Mon, 10 Jul 2023 13:45:49 +0000 (22:45 +0900)]
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>
Philippe Normand [Mon, 10 Jul 2023 11:03:25 +0000 (12:03 +0100)]
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>
David Craven [Sun, 9 Jul 2023 15:44:03 +0000 (17:44 +0200)]
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>
Maksym Khomenko [Fri, 7 Jul 2023 13:01:33 +0000 (16:01 +0300)]
appsink: add missing make_writable call
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5013>
Thibault Saunier [Wed, 5 Jul 2023 18:27:22 +0000 (14:27 -0400)]
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>
Thibault Saunier [Wed, 5 Jul 2023 18:23:50 +0000 (14:23 -0400)]
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>
Thibault Saunier [Wed, 5 Jul 2023 18:22:59 +0000 (14:22 -0400)]
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>
Nicolas Dufresne [Mon, 26 Jun 2023 21:10:33 +0000 (17:10 -0400)]
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>
Nicolas Dufresne [Mon, 26 Jun 2023 21:08:57 +0000 (17:08 -0400)]
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>
Hou Qi [Thu, 6 Jul 2023 09:44:48 +0000 (17:44 +0800)]
v4l2videodec: correctly register v4l2mpeg2dec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4992>
Guillaume Desmottes [Fri, 7 Jul 2023 10:33:37 +0000 (12:33 +0200)]
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>
Théo Maillart [Thu, 6 Jul 2023 16:08:57 +0000 (18:08 +0200)]
inputselector: fix playing variable is never set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4988>
Michael Olbrich [Thu, 6 Jul 2023 12:27:42 +0000 (14:27 +0200)]
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>
Guillaume Desmottes [Tue, 4 Jul 2023 13:37:16 +0000 (15:37 +0200)]
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>
Seungha Yang [Tue, 4 Jul 2023 14:11:53 +0000 (23:11 +0900)]
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>
Edward Hervey [Tue, 4 Jul 2023 08:57:01 +0000 (10:57 +0200)]
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>
Philippe Normand [Fri, 30 Jun 2023 17:30:46 +0000 (18:30 +0100)]
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>
Guillaume Desmottes [Thu, 16 Feb 2023 12:44:50 +0000 (13:44 +0100)]
tracerutils: allow casting parameters types
It was impossible to have an u32 parameter such as
'max-buffer-size=(uint)5' because the parentheses were not properly
parsed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4941>
Edward Hervey [Wed, 21 Jun 2023 15:05:47 +0000 (17:05 +0200)]
matroska-demux: Properly handle early time-based segments
Refusing an incoming segment in < GST_MATROSKA_READ_STATE_DATA should only be
done if the incoming segment is not in GST_FORMAT_TIME.
In GST_FORMAT_TIME, we are just storing the values and returning, so we can
invert the order of the checks.
Fixes proper segment propagation in matroska/webm DASH use-cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4922>
Edward Hervey [Fri, 10 Feb 2023 14:26:20 +0000 (15:26 +0100)]
adaptivedemux2: Handle early SEEKING query
No pads are present yet, but we can still answer the query
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4922>
Edward Hervey [Thu, 9 Feb 2023 16:22:34 +0000 (17:22 +0100)]
adaptivedemux2: Fix non-accurate seeking
If no accurate positioning was required, default to snap to the previous segment
for improved responsiveness
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4922>
Edward Hervey [Thu, 9 Feb 2023 13:54:27 +0000 (14:54 +0100)]
adaptivedemux2: Handle return in seek handling
Various code path were repeating the same logic, and risk forgetting a lock
release.
Unify all of them
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4922>
Edward Hervey [Thu, 9 Feb 2023 13:45:01 +0000 (14:45 +0100)]
adaptivedemux2: Move API lock usage
It is not needed so early
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4922>
Edward Hervey [Wed, 8 Feb 2023 16:24:18 +0000 (17:24 +0100)]
adaptivedemux2: Handle early key-unit seek
Is a seek is done on stream-collection post, there are no selected streams
yet. Therefore none would be chosen to adjust the key-unit seek.
If no streams are selected, fallback to a default stream (i.e. one which has
track(s) with GST_STREAM_FLAG_SELECT).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4922>
Edward Hervey [Wed, 8 Feb 2023 11:02:45 +0000 (12:02 +0100)]
adaptivedemux2: Fix early seeking
When seeking is handled by the collection posting thread, there is a possibility
that some leftover data will be pushed by the stream thread.
Properly detect and reject those early segments (and buffers) by comparing it to
the main segment seqnum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4922>
Guillaume Desmottes [Tue, 6 Jun 2023 09:34:03 +0000 (11:34 +0200)]
videoflip: update orientation tag in auto mode
The frames are flipped according to the tag orientation so it's no longer accurate.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4796>
François Laignel [Tue, 20 Jun 2023 12:56:44 +0000 (14:56 +0200)]
qtdemux: opus: set entry as sampled
... otherwise streams with constant size samples defined with a single
`sample_size` for all samples in the `stsz` box fall in the category
`chunks_are_samples` in `qtdemux_stbl_init`, overriding the actual
sample count.
`FOURCC_soun` would set this automatically for `compression_id == 0xfffe`,
however `compression_id` is read from the Audio Sample Entry box at an offset
marked as "pre-defined" in some version of the spec and set to 0 both by
GStreamer and FFmpeg for opus streams.
Considering the stream `sampled` flag is set explicitely by other fourcc
variants, doing so for opus seems consistent.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4908>
Tim-Philipp Müller [Tue, 20 Jun 2023 18:10:38 +0000 (19:10 +0100)]
Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4907>
Tim-Philipp Müller [Tue, 20 Jun 2023 16:42:25 +0000 (17:42 +0100)]
Release 1.22.4
Jonas Kvinge [Thu, 8 Jun 2023 17:12:54 +0000 (19:12 +0200)]
adaptivedemux2: Allow data dash+xml manifest for uri
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4853>
Sebastian Dröge [Tue, 13 Jun 2023 11:25:04 +0000 (14:25 +0300)]
dvdspu: Avoid integer overflow when checking if enough data is available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4899>
Sebastian Dröge [Tue, 13 Jun 2023 11:23:47 +0000 (14:23 +0300)]
dvdspu: Make sure enough data is allocated for the available data
If the size read from the stream is smaller than the currently available
data then the size is bogus and the data should simply be discarded.
Fixes ZDI-CAN-20994
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2660
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4899>
Sebastian Dröge [Tue, 13 Jun 2023 09:58:26 +0000 (12:58 +0300)]
subparse: Skip after the end of a valid closing tag instead of only skipping `<`
This is a small optimization and avoids restarting the next parsing
iteration on already accepted data.
On its own it would also fix ZDI-CAN-20968 (see previous commit) but the
previous commit independently is also a valid fix for it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4898>
Sebastian Dröge [Tue, 13 Jun 2023 09:53:13 +0000 (12:53 +0300)]
subparse: Look for the closing `>` of a tag after the opening `<`
Previously when fixing up subrip markip, we were looking from the start
of the remaining buffer instead. Due to how skipping over closing tags
works, the remaining buffer will still contain the closing `>` of the
previous tag so if a unexpected closing tag is found after another
closing tag, we would potentially do an out of bounds memmove().
Fixes ZDI-CAN-20968
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2662
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4898>
Sebastian Dröge [Tue, 13 Jun 2023 10:22:57 +0000 (13:22 +0300)]
tags: Don't allow image tags with G_MAXUINT32 length
This will cause an integer overflow a little bit further down because we
allocate a bit more memory to allow for a NUL-terminator.
The caller should've avoided passing that much data in already as it's
not going to be a valid image and there's likely not even that much data
available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4897>
Sebastian Dröge [Tue, 13 Jun 2023 10:20:16 +0000 (13:20 +0300)]
flacparse: Avoid integer overflow in available data check for image tags
If the image length as stored in the file is some bogus integer then
adding it to the current byte readers position can overflow and wrongly
have the check for enough available data succeed.
This then later can cause NULL pointer dereferences or out of bounds
reads/writes when actually reading the image data.
Fixes ZDI-CAN-20775
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4897>
François Laignel [Mon, 19 Jun 2023 13:11:30 +0000 (15:11 +0200)]
qtdemux: parse Opus and dOps as qtdemux nodes and add size checks
This allows checking the nodes conformity and dumping parsed values.
Note: Audio Sample Entry version parsing and offset handling is handled as part
of `FOURCC_soun` common processing and in `qtdemux_parse_node`.
Also, only read `stream_count` and `coupled_count` when
`channel_mapping_family` != 0. See:
https://opus-codec.org/docs/opus_in_isobmff.html#4.3.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4891>
François Laignel [Fri, 16 Jun 2023 08:29:28 +0000 (10:29 +0200)]
qtdemux: fix byte order for opus extension and version field type
The "Encapsulation of Opus in ISO Base Media File Format" [1] specifications,
§ 4.3.2 Opus Specific Box, indicates that data must be stored as big-endian.
[1] https://opus-codec.org/docs/opus_in_isobmff.html#4.3.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4891>
François Laignel [Fri, 16 Jun 2023 08:02:16 +0000 (10:02 +0200)]
qtmux: fix byte order for opus extension
The "Encapsulation of Opus in ISO Base Media File Format" [1] specifications,
§ 4.3.2 Opus Specific Box, indicates that data must be stored as big-endian.
In `build_opus_extension`, `gst_byte_writer_put*_le ()` variants were used,
causing audio streams conversion to Opus in mp4 to offset samples due to the
PreSkip field incorrect value (29ms early in our test cases).
[1] https://opus-codec.org/docs/opus_in_isobmff.html#4.3.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4891>
Andoni Morales Alastruey [Tue, 18 Apr 2023 07:59:36 +0000 (09:59 +0200)]
vtenc: remove duplicated framerate and size variables
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4888>
Andoni Morales Alastruey [Thu, 30 Mar 2023 13:38:22 +0000 (15:38 +0200)]
vtenc: apply DTS offset to ensure DTS <= PTS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4888>
Nicolas Dufresne [Fri, 24 Mar 2023 00:04:49 +0000 (20:04 -0400)]
h265parse: Don't override upstream framerate
The framerate should only be replaced (and corrected for alternating field)
when it is parsed from the bitstream. Otherwise, the upstream framerate
from caps should be trusted and assumed correct.
Related to gst-plugins-bad!2020
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4352>
Nicolas Dufresne [Fri, 24 Mar 2023 00:02:16 +0000 (20:02 -0400)]
h265parse: Rename parsed_framerate to framerate_from_caps
That meaning of parsed_framerate is ambigious, it is set whenever the
framerate has been parsed from caps, which can be confused with being
parsed from the bitstream. Rename this as framerate_from_caps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4352>
Mengkejiergeli Ba [Wed, 15 Feb 2023 05:10:39 +0000 (13:10 +0800)]
h265parse: Fix to check returned value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4352>
Nicolas Dufresne [Fri, 16 Jun 2023 00:49:00 +0000 (20:49 -0400)]
medias: Bump the medias commit
See !4259
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4352>
Michael Olbrich [Thu, 11 May 2023 13:28:35 +0000 (15:28 +0200)]
sdpdemux: ensure that only one srcpad is created per stream
If two senders use the same multicast IP and port then new_session_pad()
may try to add a srcpad to the same stream twice.
stream->srcpad is updated but gst_element_add_pad() fails the second
time. As a result stream->srcpad points to a deleted object and
access in gst_sdp_demux_stream_free() fails with a segfault.
Just ignore the second pad. Nothing useful can be done with it anyway.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4873>
Marek Vasut [Sun, 11 Jun 2023 20:22:36 +0000 (22:22 +0200)]
kmssink: Add ST STM32 LTDC auto-detection
Add STM32 LTDC controller into list of auto-detected modules.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4872>
Marek Vasut [Sun, 11 Jun 2023 20:22:25 +0000 (22:22 +0200)]
kmssink: Add NXP i.MX8M Plus LCDIFv3 auto-detection
Add i.MX8M Plus LCDIFv3 controller into list of auto-detected modules.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4872>
Víctor Manuel Jáquez Leal [Fri, 19 May 2023 11:14:09 +0000 (13:14 +0200)]
vaapidecodebin: don't load vaapipostproc if not available
And remove the code for missing element since that element is part of the same
plugin, and if not available is because the driver doesn't provide it.
Fixes: #2580
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4871>
He Junyan [Fri, 28 Apr 2023 14:25:11 +0000 (22:25 +0800)]
va: h265enc: map the mbbrc to correct enum value in get_property()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4870>
He Junyan [Fri, 28 Apr 2023 14:26:34 +0000 (22:26 +0800)]
va: h264enc: map the mbbrc to correct enum value in get_property()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4870>
Jan Alexander Steffens (heftig) [Tue, 30 May 2023 13:10:11 +0000 (15:10 +0200)]
isomp4: Fix (E)AC-3 channel count handling
The muxer used a fixed value of 2 channels because the TR 102 366 spec
says they're to be ignored. However, the demuxer still trusted them,
resulting in bad caps.
Make the muxer fill in the correct channel count anyway (FFmpeg already
does) and make the demuxer ignore the value.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4773>
François Laignel [Wed, 14 Jun 2023 08:08:51 +0000 (10:08 +0200)]
srtpdec: fix Got data flow before segment event
A race condition can occur in `srtpdec` during the READY -> NULL transition:
an RTCP buffer can make its way to `gst_srtp_dec_chain` while the element is
partially stopped, resulting in the following critical warning:
> Got data flow before segment event
The problematic sequence is the following:
1. An RTCP buffer is being handled by the chain function for the
`rtcp_sinkpad`. Since, this is the first buffer, we try pushing the sticky
events to `rtcp_srcpad`.
2. At the same moment, the element is being transitioned from PAUSED to READY.
3. While checking and pushing the sticky events for `rtcp_srcpad`, we reach the
Segment event. For this, we try to get it from the "otherpad", in this case
`rtp_srcpad`. In the problematic case, `rtp_srcpad` has already been
deactivated so its sticky events have been cleared. We won't be pushing any
Segment event to `rtcp_srcpad`.
4. We return to the chain function for `rtcp_sinkpad` and try pushing the
buffer to `rtcp_srcpad` for which deactivation hasn't started yet, hence the
"Got data flow before segment event".
This commit:
- Adds a boolean return value to `gst_srtp_dec_push_early_events`: in case the
Segment event can't be retrieved, `gst_srtp_dec_chain` can return an error
instead of calling `gst_pad_push`.
- Replaces the obsolete `gst_pad_set_caps` with `gst_pad_push_event`. The
additional preconditions checked by previous function are guaranteed here
since we push a fixed Caps which was built in the same function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4860>
François Laignel [Thu, 15 Jun 2023 09:11:39 +0000 (11:11 +0200)]
srtpdec: backport for fix assertion 'parent->numsinkpads <= 1' failed
Commit
96450f4c uses the new function `gst_element_decorate_stream_id` which
was introduced by
39633967 in 1.23.
This commit backports
96450f4c with a simplified version of
`gst_element_decorate_stream_id_internal` as a private srtpdec function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4860>
Seungha Yang [Wed, 14 Jun 2023 16:36:25 +0000 (01:36 +0900)]
d3dvideosink: Fix navigation event leak
Fixing regression introduced in
6c2f6c3bd4dd525eb02c6d7000e84b76663d3daf
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4868>