Commit graph

116210 commits

Author SHA1 Message Date
Nicolas Dufresne
642103fdcc v4l2: videodec: Wait for source change event
Stop doing capture buffer allocation based on guesses
and wait for the source change event when available.
Unlike stateless decoder, the stateful decoder is not aware of
the coded resolution, and this may lead to the wrong result
even when using TRY_FMT.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>
2023-05-02 14:42:43 +00:00
Nicolas Dufresne
7599821c42 v4l2: object: Move the GstPoll into v4l2object
Moves the GstPoll from the buffer pool into v4l2object. This will be
needed to poll for events before the pool has been created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>
2023-05-02 14:42:43 +00:00
Nicolas Dufresne
d4a428e61f v4l2: object: Fix bogus debug objects pointers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>
2023-05-02 14:42:43 +00:00
Nicolas Dufresne
f01e71d4ad v4l2: videodec: Move the capture setup into the processing loop
In previous implementation that job was split between handle_frame and
the processing loop and it wasn't clear if this mechanism was race
free. The capture setup would also be tried for every buffer, which was
not necessary.

This also simplify the handling of SRC_CH event, dropping the unneeded
atomic boolean.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>
2023-05-02 14:42:43 +00:00
Nicolas Dufresne
20ddda2538 v4l2: videodec: Ensure object is inactive on failure
Sprinkle stop() calls in error case to guaranty that the capture object
is inactive on failure. Not doing so could allow some code to be called
in unexpected (and possibly undefined) conditions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>
2023-05-02 14:42:43 +00:00
Jordan Petridis
29b5a3d568 ci: Always run the windows build image job
Much like the linux counterparts, this either build the image
once the tags change or quickly exits if that has been done
already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4474>
2023-05-02 12:46:58 +00:00
Philippe Normand
be67927b6b dtlstransport: Keep strong ref of dtls encoder/decoder
Otherwise get_property() calls for the client, certificate and/or
remote-certificate properties might access moved objects, since the encoder and
decoder are added to the transportsendbin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4526>
2023-05-02 11:44:25 +01:00
Mihail Ivanchev
d27de58cca gstcodectimestamper: remove PC file generation from plugin's own meson.build
The file generated here is incomplete; it is generated for all plugins in a loop at an upper level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4520>
2023-05-01 18:30:33 +01:00
Seungha Yang
b40bedb597 wasapi2: Allows process loopback capture on Windows 10
As per MS documentation[1], it requires Windows 10 Build 20348
but it seems to be supported by old versions too

[1] https://learn.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/
ns-audioclientactivationparams-audioclient_process_loopback_params

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2524
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4517>
2023-04-30 15:14:53 +00:00
Sebastian Dröge
9e2eeab1c6 Revert "splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context"
This reverts commit f29c19be58. If this is
called for the reference context then we would run into an infinite
loop, which is not really better than an assertion.

By fixing up DTS to never be ahead of the PTS in the previous commit
this situation should be impossible to hit now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4515>
2023-04-30 15:16:00 +01:00
Sebastian Dröge
35322de964 splitmuxsink: Catch invalid DTS to avoid running into problems later
DTS > PTS makes no sense, so we clamp DTS to the PTS. Also if there's a
PTS but no DTS, then assume that PTS=DTS to make sure we're not working
with a much older DTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4515>
2023-04-30 15:16:00 +01:00
Seungha Yang
0e8b726843 cudamemory: Fix for semi planar YUV memory size decision
UV plan of the semi planar format requires only half of Y plane size

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4506>
2023-04-28 18:52:48 +09:00
Sebastian Dröge
5c4a356164 rtspsrc: Fix handling of * control path
Regression introduced by 7f9d689572.
Thanks to Tristan Matthews for reporting this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4503>
2023-04-27 18:37:26 +01:00
Edward Hervey
fcd4085c25 decodebin3: Handle streams without CAPS or TIME segment
decodebin3 will do its best to figure out whether a parsebin is required to
process the incoming stream.

The problem is that for push-based stream it could happen that the stream would
not provide any caps, resulting in nothing being linked internally.

Furthermore, there is the possibility that a stream *with* caps would not be
using a TIME segment, which is required for multiqueue to properly work.

In order to fix those two issues, we force the usage of parsebin on push-based
streams:
* When the pad is linked, if upstream can't provide any caps
* When we get a non-TIME segment

Fixes #2521

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4499>
2023-04-27 14:48:09 +01:00
Seungha Yang
a82e1fd5ad d3d11videosink: Fix for ignored initial render rectangle
Application can set target render rect before internal HWND
configuration

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2518
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4496>
2023-04-27 10:18:58 +01:00
Stéphane Cerveau
debc8af190 bad: disable dtls test if openssl is not present
On MacOS with homebrew, the openssl library is not
properly detected with pkg-config.
So disable the test compilation if openssl
is not properly detected along with libcrypto.

libcrypto is detected but it uses the system one
which leads to the error:

your binary is not an allowed client of /usr/lib/libcrypto.dylib for
architecture x86_64

See more details from Apple:

https://developer.apple.com/forums/thread/124782

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4483>
2023-04-25 11:11:06 +00:00
Martin Nordholts
c4c79b7275 webrtc: Plug leaks of resolved ICE addresses
The addresses we get from `resolve_host_finish()` (via
`resolve_host_async()`, `resolve_host_main_cb()`, `on_resolve_host()`,
`g_resolver_lookup_by_name_finish()`) must be freed. Otherwise we leak
memory.

Leak found and confirmed fixed with GCC AddressSanitizer.

Change-Id: If32d24452d626234f01b253b77a7d6d16eac1cee
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4482>
2023-04-25 11:02:31 +01:00
Sebastian Dröge
5baeb1e808 audiotestsrc: Initialize all samples in wave=ticks mode
Previously samples were only initialized in 2 out of 3 cases.

Probably fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/337

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4476>
2023-04-22 12:31:31 +01:00
Seungha Yang
0d9f08ce9a d3d11compositor: Skip zero alpha input
Blending such input is a waste of resource since nothing will
be rendered

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4456>
2023-04-21 17:27:49 +00:00
Patricia Muscalu
917424b3fb playsink: Fix volume leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4463>
2023-04-20 16:40:22 +01:00
Matthew Waters
785427bab1 ccconverter: reintroduce frame count reset on cycle completion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4453>
2023-04-19 13:35:38 +01:00
Sebastian Dröge
2dfa168736 tsdemux: Set number of channels to 2 for dual mono Opus
Instead of leaving it at 0, which will then cause caps creation to fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4446>
2023-04-18 14:21:54 +01:00
Sebastian Dröge
655b25ffc4 ges: base-xml-formatter: Don't pass non-GObject pointers to GST_DEBUG_OBJECT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4444>
2023-04-18 11:55:10 +01:00
Guillaume Desmottes
0b8a9bfd51 dash: mpdclient: fix divide by 0 if segment has no duration
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4441>
2023-04-18 09:03:26 +01:00
Seungha Yang
2c7a8739dd d3d11compositor: Reconfigure resource only when output caps is changed
GstD3D11Converter setup is heavy operation since it requires
shader compile, GPU resource allocation, some math, mutex, etc.
We can avoid it if negotiated caps is not changed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4440>
2023-04-17 19:34:17 +01:00
Edward Hervey
88353d8cb2 qtdemux: Fix av1C parsing
This is a regression introduced by
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3882

The av1c codec configuration parsing would always fail due to an off-by-one
error, the content of an atom starting at offset 8 (i.e. the 9th byte) and not
9 (the 10th byte).

Also introduce a break in order to not get stray warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4435>
2023-04-17 10:02:24 +01:00
Tim-Philipp Müller
1228ef095d multifile: error out if no filename was set
Fixes #2483

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4429>
2023-04-14 20:20:21 +00:00
Matthias Fuchs
96b61862f1 qtwindow: unref caps in destructor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4418>
2023-04-14 16:04:55 +00:00
Nicolas Dufresne
e3aad8b518 v4l2: Fix use after free of fmtdesc part 2
Add missing code in merge commit e890e6e8d8
("v4l2: Fix use after free of fmtdesc"). The v4l2object code was
missing.

Related to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4317

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4426>
2023-04-14 15:16:06 +00:00
Nicolas Dufresne
76c5eb4654 v4l2: Fix use after free of fmtdesc
The decoder needs to force another enumeration of the format. For
this it was clearing the v4l2object insternal list, leaving a fmtdesc
pointer pointing to freed memory. This patch clears the fmtdesc pointer
that has just been free. It also makes sure the probe function does not
use the cached formats list. The probe function will restore the current
fmtdesc pointer based on the currently configured pixelformat.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4426>
2023-04-14 15:16:06 +00:00
Nicolas Dufresne
85e679ce1a v4l2: videodec: Prefer acquired caps over anything downstream
As we don't have anything smart in the fixation process, we may endup with
a format that has a lower bitdepth, even if downstream can handle higher
depth. it is notably the case when negotiating with deinterlace, which places
is non-passthrough caps before its passthrough one. This makes the generic
fixation prefer the formats natively supported by deinterlace element over
the HW 10bit format. As some HW can downscale 10bit to 8bit, this can break
10bit decoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4426>
2023-04-14 15:16:06 +00:00
Nicolas Dufresne
da136b1146 v4l2: videodec: Remove leading space in comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4426>
2023-04-14 15:16:06 +00:00
Jan Alexander Steffens (heftig)
a299399f5c tests: allocators: Fix fdmem test with recent GLib
The test failed with recent GLib, where `g_close` emits a critical
warning on EBADF. Remove the `g_close` check from `test_fdmem` and add
another version that tests `GST_FD_MEMORY_FLAG_DONT_CLOSE`.

We will depend on the Valgrind test run to warn us about leaked FDs.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2480
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4422>
2023-04-14 10:14:48 +00:00
Jan Alexander Steffens (heftig)
020115dc34 imagesequencesrc: Properly set default location
Noticed this because the generic_states test kept segfaulting at random.
GLibC 2.37 can crash when NULL is supplied as a format string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4425>
2023-04-14 08:14:04 +00:00
Sebastian Dröge
905accecc1 gst: tracer: Initialize tracing infrastructure even if the debug system is not compiled in
There is a separate #define for the tracing infrastructure.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4424>
2023-04-14 07:35:34 +00:00
Michael Olbrich
cb2dcf40b9 srtpdec: fix "srtp-key" check
The original code was:

if (!gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL) || !buf) {
  goto error;
} else {
  stream->key = buf;
}

So use "srtp-key" if it is set so a non NULL buffer. The condition was
incorrectly inverted in ad7ffe64a6 to:

if (gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL) || !buf) {
  stream->key = buf;
} ...

Fix the condition so it works as originally intended and avoid accessing
'buf' uninitialised.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4423>
2023-04-14 06:51:34 +00:00
Guillaume Desmottes
a921e40228 adaptivedemux2: fix critical when using an unsupported URI
adaptivedemux2 only supports http(s), trying to use it with, say,
file:// was raising a CRITICAL in libsoup.

Fix #2476

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4421>
2023-04-14 05:17:16 +00:00
Matthias Fuchs
f4aeac45e5 glvideoflip: fix leaked caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4420>
2023-04-14 04:33:30 +00:00
Matthias Fuchs
07c1b891b6 glcontext_wgl: fix missing unref
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4419>
2023-04-14 03:45:12 +00:00
Aleksandr Slobodeniuk
936000f04e d3d11videosink: fix race conditions in win32 window
One race condition is the fact that the window object
can be destroyed while running some routine in the UI
thread (such as resizing). To avoid that situation we make
UI thread hold a reference on the window object while it's
running.
Other probpematic case is when the window handle is reused:
if we stop and start the pipeline very fast,
so the sink creates a new window object that is going to use
the same window handle as the previous one.
And finally the case when the pipeline is stopped immediatelly
right after starting, this one is also handled in this commit.

NOTE: a unit test that reproduces this cases have been added
in the previous commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4417>
2023-04-14 02:09:07 +00:00
Aleksandr Slobodeniuk
fec6b6e9f0 d3d11videosink: add gstcheck test for win32 window
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4417>
2023-04-14 02:09:06 +00:00
Seungha Yang
e972c43916 d3d11videosink: Enhancement for initial window size decision
Use AdjustWindowRect() method to calculate window size so that
video scene can be rendered on client area without black borders

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4416>
2023-04-14 02:08:47 +01:00
Tim-Philipp Müller
d838d8dd1b Back to development 2023-04-12 00:31:17 +01:00
Tim-Philipp Müller
a8f569e801 Release 1.22.2 2023-04-11 17:29:28 +01:00
Tim-Philipp Müller
4982c7d45e gst-plugins-base: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4390>
2023-04-11 12:10:37 +01:00
Tim-Philipp Müller
c512b876b5 gstreamer: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4390>
2023-04-11 12:10:37 +01:00
Tim-Philipp Müller
0e6fe51c34 avmux: fix element leak
Fixes #2473

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4385>
2023-04-10 19:05:35 +00:00
Tim-Philipp Müller
55d1a6ba0d avdeinterlace: fix element leak
Fixes #2473

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4385>
2023-04-10 19:05:35 +00:00
Seungha Yang
d16ed17747 h264decoder: Enable low-latency bumping in case of pic_order_cnt_type 2
In case of POC type 2, output order is equal to decoding order
(no frame reordering)

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2447
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4383>
2023-04-10 17:05:53 +00:00
Seungha Yang
0e51c8c5e4 h264decoder: Fix for latency report
The minimum latency answered by an element should be the maximum
latency from the element's perspective. Also consider max_reorder_frames
update as a sequence change

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4383>
2023-04-10 17:05:53 +00:00