platform/upstream/gstreamer.git
12 months agortpdtmfsrc: Classify as RTP source
Philippe Normand [Tue, 9 May 2023 13:36:56 +0000 (14:36 +0100)]
rtpdtmfsrc: Classify as RTP source

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4584>

12 months agov4l2: device provider: Fix GMainLoop leak
Nicolas Dufresne [Mon, 1 May 2023 18:01:02 +0000 (14:01 -0400)]
v4l2: device provider: Fix GMainLoop leak

On very quick start/stop, the mainloop may never be run. As a side
effect, our idle stop function is not really being ran, so we can't rely
on that to free the main loop. Simply unref the mainloop when the
thread have completely stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4539>

12 months agowebrtcdatachannel: Bind to parent webrtcbin using a weak reference
Philippe Normand [Sun, 12 Mar 2023 14:55:22 +0000 (14:55 +0000)]
webrtcdatachannel: Bind to parent webrtcbin using a weak reference

The previous approach of using a simple pointer could lead to a use-after-free
in case a data-channel was created and its parent webrtcbin was disposed soon
after.

Fixes #2103

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4580>

12 months agowebrtc/nice: support consent-freshness RFC7675
Matthew Waters [Thu, 4 May 2023 06:30:09 +0000 (16:30 +1000)]
webrtc/nice: support consent-freshness RFC7675

As is supported by libwebrtc already.  This allows ICE components to
transition to failed if consent to send from the peer is revoked or if
multiple consent packets are lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4575>

12 months agod3d11memory: Don't clear wrapped texture memory
Seungha Yang [Fri, 5 May 2023 12:53:44 +0000 (21:53 +0900)]
d3d11memory: Don't clear wrapped texture memory

The external texture may hold already rendered scene and therefore
it should not be cleared in alloc method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4558>

12 months agoqtdemux: emit no-more-pads after pruning old pads
Xabier Rodriguez Calvar [Wed, 3 May 2023 11:21:23 +0000 (13:21 +0200)]
qtdemux: emit no-more-pads after pruning old pads

If we don't do that, clients can rely on this signal to see the final pad
topology but it won't be the real one as some of them will disappear after
emitting that signal. This can happen after injecting a different init segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4557>

12 months agovideoflip: fix setting of method property at construction time
Mathieu Duponchelle [Wed, 3 May 2023 13:42:01 +0000 (15:42 +0200)]
videoflip: fix setting of method property at construction time

Since c2f890ab, element properties are gathered from the parse-launch
line and passed at object construction.

This caused the following issue to happen in videoflip:

* videoflip installed a CONSTRUCT property named method, now deprecated
* videoflip now also overrides that property with a video-direction
  property

GObject construction causes method to be set first at construct time,
with the user-provided value, then video-direction with the default
value.

The user-provided value was thus overridden, causing a regression.

Fix by not installing the properties as CONSTRUCT, and explicitly
implementing constructed() instead in order to ensure that we do still
call gst_video_flip_set_method() at least once during construction.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4551>

12 months agomfvideoenc: Allow only even resolution numbers
Seungha Yang [Wed, 3 May 2023 19:44:31 +0000 (04:44 +0900)]
mfvideoenc: Allow only even resolution numbers

Some H/W vendors support odd resolution if D3D11 texture is used
or via IMF2DBuffer, but not all vendors support it.
Also software MFT does not allow odd resolution.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1165
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2537
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4548>

12 months agowebrtcbin: Fix potential deadlock when closing before any data was sent
Philippe Normand [Tue, 2 May 2023 17:14:20 +0000 (18:14 +0100)]
webrtcbin: Fix potential deadlock when closing before any data was sent

A blocking pad probe is added on new sink pads, it's usually removed after the
caps have been negotiated or the signaling state switched to stable, but if that
never happens and the pad is released we kept the pad probe active, leaving the
pad blocked, preventing clean disposal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4533>

12 months agortpmanager/rtsession: race conditions leading to critical warnings
François Laignel [Mon, 1 May 2023 12:14:25 +0000 (14:14 +0200)]
rtpmanager/rtsession: race conditions leading to critical warnings

While testing the [implementation for insertable streams] in `webrtcsink` &
`webrtcsrc`, I encountered critical warnings, which turned out to result from
two race conditions in `rtpsession`. Both race conditions produce:

> GLib-CRITICAL: g_hash_table_foreach:
>   assertion 'version == hash_table->version' failed

This commit fixes one of the race conditions observed.

In its simplest form, the test consists in 2 pipelines and a Signalling server:

* pipelines_sink: audiotestsrc ! webrtcsink
* pipelines_src: webrtcsrc ! appsrc

1. Set `pipelines_sink` to `Playing`.
2. The Signalling server delivers the `producer_id`.
3. Initialize `pipelines_src` to establish a session with `producer_id`.
4. Set `pipelines_src` to `Playing`.
5. Wait for a buffer to be received by the `appsrc`.
6. Set `pipelines_src` to `Null`.
7. Set `pipelines_sink` to `Null`.

The race condition happens in the following sequence:

* `webrtcsink` runs a task to periodically retrieve statistics from `webrtcbin`.
  This transitively ends up executing `rtp_session_create_stats`.
* `pipelines_sink` is set to `Null`.
* In `Paused` to `Ready`, `gst_rtp_session_change_state()` calls
  `rtp_session_reset()`.
* The assertion failure occurs when `rtp_session_reset` is called while
  `rtp_session_create_stats` is executing.

This is because `rtp_session_create_stats` acquires the lock on `session` prior
to calling `g_hash_table_foreach`, but `rtp_session_reset` doesn't acquire the
lock before calling `g_hash_table_remove_all`.

Acquiring the lock in `rtp_session_reset` fixes the issue.

[implementing insertable streams support]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1176

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4532>

12 months agov4l2: pool: Flush events on capture queue
Nicolas Dufresne [Wed, 26 Apr 2023 19:58:23 +0000 (15:58 -0400)]
v4l2: pool: Flush events on capture queue

Unfortunately streamoff does not flush the events, and this can cause all
sort of issues. Flush events on capture queue. We also return
GST_V4L2_FLOW_RESOLUTION_CHANGE in case a resolution change was seen.
This allow skipping streamon(capture) on flush, which could lead to a
configuration miss-match, or failure if the buffers aren't of the right
size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: videodec: Detect flushes while setting up the capture
Nicolas Dufresne [Fri, 21 Apr 2023 17:33:11 +0000 (13:33 -0400)]
v4l2: videodec: Detect flushes while setting up the capture

As we missed the fact we were flushing, we could create and activate
that buffer pool, and wait on it, causing a hang. We detect that we
are flushing by checking the related pad state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: bufferpool: Don't copy buffer when flushing
Nicolas Dufresne [Fri, 21 Apr 2023 17:30:43 +0000 (13:30 -0400)]
v4l2: bufferpool: Don't copy buffer when flushing

Threshold handling can race with flushing operation. This can lead to
avoidable buffer copies. Simply check and return the flushing status.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: videodec: Don't forcibly drain on resolution changes
Nicolas Dufresne [Wed, 19 Apr 2023 18:19:13 +0000 (14:19 -0400)]
v4l2: videodec: Don't forcibly drain on resolution changes

Let the driver detects the change and reconfigure the capture side
transparently from there. This avoid reallocation of the output buffers,
and eliminates the need to stop and restart the capture task. This is
only happening if the driver have support for this, otherwise the old
behaviour is maintained.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: videodec: Remove the spurious srccaps probe
Nicolas Dufresne [Tue, 18 Apr 2023 15:42:06 +0000 (11:42 -0400)]
v4l2: videodec: Remove the spurious srccaps probe

We don't need to probe the srccaps in set_format() anymore, this
handled already in the capture thread while setting up the capture
queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: videodec: Improve few logs
Nicolas Dufresne [Mon, 17 Apr 2023 20:10:34 +0000 (16:10 -0400)]
v4l2: videodec: Improve few logs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: videodec: Only warn of incomplete drain on success
Nicolas Dufresne [Mon, 17 Apr 2023 20:07:21 +0000 (16:07 -0400)]
v4l2: videodec: Only warn of incomplete drain on success

We may have hit an error, or just flushing in order to stop the thread,
in which case, not having drain everything is expected and not a
driver bug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: bufferpool: Don't assert when orphaning is not needed
Nicolas Dufresne [Mon, 17 Apr 2023 20:05:35 +0000 (16:05 -0400)]
v4l2: bufferpool: Don't assert when orphaning is not needed

This may happen when shutting down and should not cause
any harm. This removes the associated assert when shutting
down the pipeline, notably with CTRL+C.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: videodec: Wait for source change event
Nicolas Dufresne [Fri, 14 Apr 2023 22:54:22 +0000 (18:54 -0400)]
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>

12 months agov4l2: object: Move the GstPoll into v4l2object
Nicolas Dufresne [Sat, 15 Apr 2023 02:22:06 +0000 (22:22 -0400)]
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>

12 months agov4l2: object: Fix bogus debug objects pointers
Nicolas Dufresne [Sat, 15 Apr 2023 03:38:34 +0000 (23:38 -0400)]
v4l2: object: Fix bogus debug objects pointers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>

12 months agov4l2: videodec: Move the capture setup into the processing loop
Nicolas Dufresne [Fri, 14 Apr 2023 13:53:15 +0000 (09:53 -0400)]
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>

12 months agov4l2: videodec: Ensure object is inactive on failure
Nicolas Dufresne [Fri, 14 Apr 2023 13:51:39 +0000 (09:51 -0400)]
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>

12 months agoci: Always run the windows build image job
Jordan Petridis [Fri, 21 Apr 2023 15:28:23 +0000 (18:28 +0300)]
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>

12 months agodtlstransport: Keep strong ref of dtls encoder/decoder
Philippe Normand [Mon, 1 May 2023 16:46:25 +0000 (17:46 +0100)]
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>

12 months agogstcodectimestamper: remove PC file generation from plugin's own meson.build
Mihail Ivanchev [Mon, 1 May 2023 10:24:54 +0000 (10:24 +0000)]
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>

12 months agowasapi2: Allows process loopback capture on Windows 10
Seungha Yang [Thu, 27 Apr 2023 19:28:24 +0000 (04:28 +0900)]
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>

12 months agoRevert "splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context"
Sebastian Dröge [Thu, 27 Apr 2023 13:33:25 +0000 (16:33 +0300)]
Revert "splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context"

This reverts commit f29c19be5821d26a6b7682d0c69ff31d0815e072. 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>

12 months agosplitmuxsink: Catch invalid DTS to avoid running into problems later
Sebastian Dröge [Thu, 27 Apr 2023 13:29:53 +0000 (16:29 +0300)]
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>

12 months agocudamemory: Fix for semi planar YUV memory size decision
Seungha Yang [Fri, 28 Apr 2023 09:52:48 +0000 (18:52 +0900)]
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>

12 months agortspsrc: Fix handling of `*` control path
Sebastian Dröge [Thu, 27 Apr 2023 10:00:42 +0000 (13:00 +0300)]
rtspsrc: Fix handling of `*` control path

Regression introduced by 7f9d689572843ff9e0b8a92128034a8fc4a14d96.
Thanks to Tristan Matthews for reporting this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4503>

12 months agodecodebin3: Handle streams without CAPS or TIME segment
Edward Hervey [Wed, 26 Apr 2023 10:20:25 +0000 (12:20 +0200)]
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>

12 months agod3d11videosink: Fix for ignored initial render rectangle
Seungha Yang [Mon, 24 Apr 2023 19:59:33 +0000 (04:59 +0900)]
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>

12 months agobad: disable dtls test if openssl is not present
Stéphane Cerveau [Tue, 25 Apr 2023 08:14:47 +0000 (10:14 +0200)]
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>

12 months agowebrtc: Plug leaks of resolved ICE addresses
Martin Nordholts [Wed, 19 Apr 2023 14:59:01 +0000 (16:59 +0200)]
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>

12 months agoaudiotestsrc: Initialize all samples in wave=ticks mode
Sebastian Dröge [Sat, 22 Apr 2023 08:42:36 +0000 (11:42 +0300)]
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>

12 months agod3d11compositor: Skip zero alpha input
Seungha Yang [Mon, 17 Apr 2023 12:34:19 +0000 (21:34 +0900)]
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>

12 months agoplaysink: Fix volume leak
Patricia Muscalu [Thu, 20 Apr 2023 08:03:27 +0000 (10:03 +0200)]
playsink: Fix volume leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4463>

13 months agoccconverter: reintroduce frame count reset on cycle completion
Matthew Waters [Wed, 29 Mar 2023 23:11:11 +0000 (10:11 +1100)]
ccconverter: reintroduce frame count reset on cycle completion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4453>

13 months agotsdemux: Set number of channels to 2 for dual mono Opus
Sebastian Dröge [Tue, 18 Apr 2023 11:55:23 +0000 (14:55 +0300)]
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>

13 months agoges: base-xml-formatter: Don't pass non-GObject pointers to GST_DEBUG_OBJECT
Sebastian Dröge [Tue, 18 Apr 2023 10:03:00 +0000 (13:03 +0300)]
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>

13 months agodash: mpdclient: fix divide by 0 if segment has no duration
Guillaume Desmottes [Mon, 17 Apr 2023 09:36:55 +0000 (11:36 +0200)]
dash: mpdclient: fix divide by 0 if segment has no duration

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4441>

13 months agod3d11compositor: Reconfigure resource only when output caps is changed
Seungha Yang [Mon, 17 Apr 2023 14:06:54 +0000 (23:06 +0900)]
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>

13 months agoqtdemux: Fix av1C parsing
Edward Hervey [Mon, 17 Apr 2023 07:28:43 +0000 (09:28 +0200)]
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>

13 months agomultifile: error out if no filename was set
Tim-Philipp Müller [Wed, 12 Apr 2023 11:47:02 +0000 (12:47 +0100)]
multifile: error out if no filename was set

Fixes #2483

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4429>

13 months agoqtwindow: unref caps in destructor
Matthias Fuchs [Thu, 6 Apr 2023 06:55:46 +0000 (08:55 +0200)]
qtwindow: unref caps in destructor

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4418>

13 months agov4l2: Fix use after free of fmtdesc part 2
Nicolas Dufresne [Wed, 12 Apr 2023 21:18:13 +0000 (17:18 -0400)]
v4l2: Fix use after free of fmtdesc part 2

Add missing code in merge commit e890e6e8d8bd
("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>

13 months agov4l2: Fix use after free of fmtdesc
Nicolas Dufresne [Wed, 12 Apr 2023 21:18:13 +0000 (17:18 -0400)]
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>

13 months agov4l2: videodec: Prefer acquired caps over anything downstream
Nicolas Dufresne [Fri, 31 Mar 2023 14:32:54 +0000 (10:32 -0400)]
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>

13 months agov4l2: videodec: Remove leading space in comment
Nicolas Dufresne [Fri, 31 Mar 2023 14:31:07 +0000 (10:31 -0400)]
v4l2: videodec: Remove leading space in comment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4426>

13 months agotests: allocators: Fix fdmem test with recent GLib
Jan Alexander Steffens (heftig) [Mon, 10 Apr 2023 14:06:19 +0000 (16:06 +0200)]
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>

13 months agoimagesequencesrc: Properly set default location
Jan Alexander Steffens (heftig) [Fri, 3 Mar 2023 18:40:22 +0000 (18:40 +0000)]
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>

13 months agogst: tracer: Initialize tracing infrastructure even if the debug system is not compil...
Sebastian Dröge [Wed, 12 Apr 2023 07:58:31 +0000 (10:58 +0300)]
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>

13 months agosrtpdec: fix "srtp-key" check
Michael Olbrich [Thu, 19 Jul 2018 15:21:22 +0000 (17:21 +0200)]
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 ad7ffe64a66ab48d81671651031c449149db4973 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>

13 months agoadaptivedemux2: fix critical when using an unsupported URI
Guillaume Desmottes [Tue, 11 Apr 2023 15:54:23 +0000 (17:54 +0200)]
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>

13 months agoglvideoflip: fix leaked caps
Matthias Fuchs [Thu, 6 Apr 2023 06:54:30 +0000 (08:54 +0200)]
glvideoflip: fix leaked caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4420>

13 months agoglcontext_wgl: fix missing unref
Matthias Fuchs [Wed, 5 Apr 2023 11:20:19 +0000 (13:20 +0200)]
glcontext_wgl: fix missing unref

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4419>

13 months agod3d11videosink: fix race conditions in win32 window
Aleksandr Slobodeniuk [Mon, 27 Mar 2023 07:20:27 +0000 (09:20 +0200)]
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>

13 months agod3d11videosink: add gstcheck test for win32 window
Aleksandr Slobodeniuk [Tue, 21 Mar 2023 17:17:12 +0000 (18:17 +0100)]
d3d11videosink: add gstcheck test for win32 window

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4417>

13 months agod3d11videosink: Enhancement for initial window size decision
Seungha Yang [Sat, 1 Apr 2023 15:29:24 +0000 (00:29 +0900)]
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>

13 months agoBack to development
Tim-Philipp Müller [Tue, 11 Apr 2023 23:31:17 +0000 (00:31 +0100)]
Back to development

13 months agoRelease 1.22.2
Tim-Philipp Müller [Tue, 11 Apr 2023 16:29:28 +0000 (17:29 +0100)]
Release 1.22.2

13 months agogst-plugins-base: update translations
Tim-Philipp Müller [Mon, 10 Apr 2023 12:49:55 +0000 (13:49 +0100)]
gst-plugins-base: update translations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4390>

13 months agogstreamer: update translations
Tim-Philipp Müller [Mon, 10 Apr 2023 12:49:41 +0000 (13:49 +0100)]
gstreamer: update translations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4390>

13 months agoavmux: fix element leak
Tim-Philipp Müller [Mon, 10 Apr 2023 17:06:17 +0000 (18:06 +0100)]
avmux: fix element leak

Fixes #2473

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4385>

13 months agoavdeinterlace: fix element leak
Tim-Philipp Müller [Mon, 10 Apr 2023 16:59:21 +0000 (17:59 +0100)]
avdeinterlace: fix element leak

Fixes #2473

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4385>

13 months agoh264decoder: Enable low-latency bumping in case of pic_order_cnt_type 2
Seungha Yang [Mon, 10 Apr 2023 11:10:50 +0000 (20:10 +0900)]
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>

13 months agoh264decoder: Fix for latency report
Seungha Yang [Thu, 6 Apr 2023 11:48:17 +0000 (20:48 +0900)]
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>

13 months agoh264decoder: Ignore invalid max_num_reorder_frames in VUI
Seungha Yang [Thu, 6 Apr 2023 11:26:24 +0000 (20:26 +0900)]
h264decoder: Ignore invalid max_num_reorder_frames in VUI

It's not fatal and can be ignored

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4383>

13 months agoh265decoder: Fix for latency report when src caps is not configured
Seungha Yang [Thu, 6 Apr 2023 10:40:12 +0000 (19:40 +0900)]
h265decoder: Fix for latency report when src caps is not configured

Depending on subclass, negotiation might not happen on new_sequence()

Fixing regression introduced by the commit
4a4823b9728fbb944e05d89e0fee681ab5b33e25

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4383>

13 months agoh264decoder: Fix for latency report when src caps is not configured
Seungha Yang [Thu, 6 Apr 2023 10:36:03 +0000 (19:36 +0900)]
h264decoder: Fix for latency report when src caps is not configured

Depending on subclass, negotiation might not happen on new_sequence()

Fixing regression introduced by the commit
4a4823b9728fbb944e05d89e0fee681ab5b33e25

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4383>

13 months agogstd3d11window: fix memory leak
Wang Chuan [Mon, 10 Apr 2023 09:31:29 +0000 (17:31 +0800)]
gstd3d11window: fix memory leak

GstStructure may leak when using external HWND

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4382>

13 months agomeson: add missing source_filename in the dav1d wrap
Jordan Petridis [Thu, 30 Mar 2023 12:57:34 +0000 (15:57 +0300)]
meson: add missing source_filename in the dav1d wrap

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4379>

13 months agodebugqroverlay: fix string leak
Tim-Philipp Müller [Sun, 26 Mar 2023 15:49:32 +0000 (16:49 +0100)]
debugqroverlay: fix string leak

g_string_free(.., FALSE) gives us ownership of the string
already, no need to duplicate that again with g_strdup(),
and doing so will leak the string returned by g_string_free()
here. Caught by compiler warnings in newer GLib versions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4380>

13 months agotwcc: Better handle duplicate packets
Edward Hervey [Tue, 4 Apr 2023 07:21:47 +0000 (09:21 +0200)]
twcc: Better handle duplicate packets

The previous code would only check if two packets in a row were duplicates. If
not (i.e. a packet is a duplicate of a packet received slightly before) the code
would generate completely bogus FCI because it assumes there were no duplicates
present in the array.

In order to be efficient, just store all received packets and remove the
duplicates just before the FCI is generated once the array of observations have
been sorted by seqnum.

Fixes TWCC usage with moderate to high packet duplication.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4378>

13 months agodecklinkaudiosink: Fix playback when video caps is configured before audio
Seungha Yang [Fri, 7 Apr 2023 13:13:24 +0000 (22:13 +0900)]
decklinkaudiosink: Fix playback when video caps is configured before audio

Scheduled playback starts on videosink's state change or on caps
but it's possible that audiosink is configure without caps yet.
Try start scheduled playback on audiosink's caps event as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4368>

13 months agogst-plugins-base: gl: wayland: cleanup on close
Rouven Czerwinski [Thu, 6 Apr 2023 05:58:03 +0000 (07:58 +0200)]
gst-plugins-base: gl: wayland: cleanup on close

The proxy and queue are created in the gst_gl_window_wayland_egl_open()
function and will be recreated on open. This leaks both objects, the
wayland client documentation mentions that they should be destroyed
using the appropriate destroy functions.

Found during valgrind memory leak testing, these blocks were marked as
definitely lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4355>

13 months agoosxvideosink: fix broken aspect ration and frame drawing region
Alexande B [Fri, 4 Nov 2022 21:04:21 +0000 (22:04 +0100)]
osxvideosink: fix broken aspect ration and frame drawing region

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4346>

13 months agortsp-server: media: First set state to PLAYING again temporarily, then send EOS
Sebastian Dröge [Tue, 4 Apr 2023 17:03:31 +0000 (20:03 +0300)]
rtsp-server: media: First set state to PLAYING again temporarily, then send EOS

Sending the EOS event while the pipeline is PAUSED can deadlock on the
stream lock if a sink is currently blocked because of pre-rolling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4345>

13 months agosdp: Skip source-specific caps fields when creating an SDP media from caps
Sebastian Dröge [Tue, 4 Apr 2023 16:21:56 +0000 (19:21 +0300)]
sdp: Skip source-specific caps fields when creating an SDP media from caps

Regression from https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132

We parse the source-specific fields from the SDP and put it into the
caps, but when converting caps into an SDP again this would need special
handling. By default it would end up as part of the fmtp field, which is
simply wrong.

Automatically putting it into the caps and SDP will need some more work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4344>

13 months agodecklink: fix 10 bit RGB (r210) format auto detection
Wojciech Kapsa [Tue, 4 Apr 2023 10:22:31 +0000 (12:22 +0200)]
decklink: fix 10 bit RGB (r210) format auto detection

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4342>

13 months agortspsrc: Skip PTs with caps incompatible to the global caps
Sebastian Dröge [Tue, 4 Apr 2023 16:23:14 +0000 (19:23 +0300)]
rtspsrc: Skip PTs with caps incompatible to the global caps

Otherwise empty caps are created while all following code assumes that
the caps will have exactly one structure, and then run into assertions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4343>

13 months agotools: Count argc after parsing GOption on Windows
Seungha Yang [Thu, 30 Mar 2023 19:40:58 +0000 (04:40 +0900)]
tools: Count argc after parsing GOption on Windows

Existing codes rely on modified argc value by g_option_context_parse()
but g_option_context_parse_strv() is used in case of Windows.
Count arguments after the option parsing manually.
Fixing command "gst-inspect-1.0.exe -b"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4322>

13 months agoalsasink: Fix for being stuck in stop_streaming_threads state
Robert Rosengren [Thu, 30 Mar 2023 14:09:06 +0000 (16:09 +0200)]
alsasink: Fix for being stuck in stop_streaming_threads state

Moving from PLAYING to NULL will set the stop_streaming_threads to TRUE,
but when moving back upwards its not reset to FALSE (as only done in
uncalled init and resume callbacks).

Fix by reseting value in the prepare callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4321>

13 months agov4l2object: Add support for YVU420M format
Shengqi Yu [Tue, 28 Mar 2023 07:29:46 +0000 (15:29 +0800)]
v4l2object: Add support for YVU420M format

This is a multi-planar format with planes non contiguous in memory. It
is intended to be used only in drivers and applications that support the
multi-planar API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4318>

13 months agogit: prevent CRLF line ending conversion for patches on Windows
Tim-Philipp Müller [Thu, 30 Mar 2023 12:48:02 +0000 (13:48 +0100)]
git: prevent CRLF line ending conversion for patches on Windows

Otherwise the patch file might get line endings converted on git
checkout on Windows if the git option core.autocrlf=true is set,
and then the patches won't apply later when Meson tries to apply
them to the downloaded source code from tarball.

This could cause the pango patches not applying to the pango
subproject on Windows in some settings, and then the subproject
setup would fail and the pango plugin would not be built.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4314>

13 months agotypefindfunctions: Increase xml typefinder closing brace limit
Ilie Halip [Sat, 18 Mar 2023 09:54:15 +0000 (11:54 +0200)]
typefindfunctions: Increase xml typefinder closing brace limit

If the first XML element in a DASH manifest has its closing brance
beyond the first 512 bytes (because of, e.g. lots of attributes),
the MPD typefinder fails. Try to read a larger block, and then
smaller blocks until 512 bytes.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4302>

13 months agortsp: gstrtspurl: gst_rtsp_url_get_request_uri: use rtsps scheme for tls transport...
Bart Van Severen [Tue, 28 Mar 2023 13:49:36 +0000 (15:49 +0200)]
rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: use rtsps scheme for tls transport methods

gst_rtsp_url_get_request_uri returns rtsp://... url when requested url is rtsps://, this is not
in accordance with https://www.rfc-editor.org/rfc/rfc7826.html#section-19.2.
This also impedes setting up a rtsps session with a live555 rtsp server.

Don't expose other than rtsp and rtsps internal gstreamer rtsp url schemes
to avoid regression:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4298>

13 months agoRevert "rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: fix incorrect scheme for...
Bart Van Severen [Tue, 28 Mar 2023 13:38:07 +0000 (15:38 +0200)]
Revert "rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: fix incorrect scheme for tls transport methods"

This reverts commit 024ef7659d3cb1ceee6628646aa37001399be92d because it causes a regression:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4298>

13 months agogtkwaylandsink: Destroy GstWlWindow when parent GtkWindow is destroyed
Colin Kinloch [Thu, 16 Mar 2023 16:02:26 +0000 (16:02 +0000)]
gtkwaylandsink: Destroy GstWlWindow when parent GtkWindow is destroyed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4312>

13 months agovkmemory: flush whole size
Víctor Manuel Jáquez Leal [Wed, 29 Mar 2023 10:58:14 +0000 (12:58 +0200)]
vkmemory: flush whole size

Running element_vkcolorconver test with Vulkan validation layer this error is
raised:

Code 0 : Validation Error: [ VUID-VkMappedMemoryRange-size-01390 ] Object 0:
handle = 0x100000000010, type = VK_OBJECT_TYPE_DEVICE_MEMORY;
| MessageID = 0xdd4e6d8b
| vkFlushMappedMemoryRanges: Size in pMemRanges[0] is 0x4, which is not a
multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize (0x40) and offset +
size (0x0 + 0x4 = 0x4) not equal to the memory size (0xb). The Vulkan spec
states: If size is not equal to VK_WHOLE_SIZE, size must either be a multiple of
VkPhysicalDeviceLimits::nonCoherentAtomSize, or offset plus size must equal the
size of memory

The reason of is that the image size used in the test doesn't comply hardware
restrictions. In order to avoid juggling with image size and hardware
restrictions, this patch proposes to use VK_WHOLE_SIZE macro.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4311>

13 months agotests: vkimage: add VK_IMAGE_USAGE_SAMPLED_BIT usage bit
Víctor Manuel Jáquez Leal [Wed, 29 Mar 2023 10:44:00 +0000 (12:44 +0200)]
tests: vkimage: add VK_IMAGE_USAGE_SAMPLED_BIT usage bit

Running tests with Vulkan Validation enabled show an error on vkimage tests:

Code 0 : Validation Error: [ VUID-VkImageViewCreateInfo-image-04441 ]
Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle
= 0x50000000005, type = VK_OBJECT_TYPE_IMAGE;
| MessageID = 0xb75da543
| Invalid usage flag for VkImage 0x50000000005[] used by vkCreateImageView(). In
this case, VkImage should have VK_IMAGE_USAGE_SAMPLED_BIT |
VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT |
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT |
VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR |
VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT |
VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR | VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM
| VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM set during creation.
The Vulkan spec states: image must have been created with a usage value
containing at least one of the usages defined in the valid image usage list for
image views

This patch adds VK_IMAGE_USAGE_SAMPLED_BIT to the usage bits in test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4311>

13 months agovkfullscreenquad: set enable_clear as TRUE by default
Víctor Manuel Jáquez Leal [Wed, 29 Mar 2023 09:04:20 +0000 (11:04 +0200)]
vkfullscreenquad: set enable_clear as TRUE by default

While using the validation layer with this pipeline:

gst-launch-1.0 videotestsrc num-buffers=10 ! vulkanupload ! vulkancolorconvert ! vulkansink

The validation layer throws this message:

Code 0 : Validation Error: [ VUID-VkAttachmentDescription-format-06699 ]
Object 0: handle = 0x5555562e9610, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x52b3229e |
vkCreateRenderPass: pCreateInfo->pAttachments[0] format is
VK_FORMAT_B8G8R8A8_UNORM and loadOp is VK_ATTACHMENT_LOAD_OP_LOAD, but
initialLayout is VK_IMAGE_LAYOUT_UNDEFINED.
The Vulkan spec states: If format includes a color or depth aspect and loadOp is
VK_ATTACHMENT_LOAD_OP_LOAD, then initialLayout must not be VK_IMAGE_LAYOUT_UNDEFINED

When creating the render pass the loadOp can be either
`VK_ATTACHMENT_LOAD_OP_CLEAR` or `VK_ATTACHMENT_LOAD_OP_LOAD` depending on
`enable_clear`. While `enable_clear` is FALSE by default (which means
`VK_ATTACHMENT_LOAD_OP_LOAD`). Nonetheless, its value is explicitly changed by
`vkoverlaycompositor` to FALSE too!

This behavior was introduced in merge request #2470 where
`VK_ATTACHMENT_LOAD_OP_CLEAR` was a fixed value for loadOp. Thus, the bug
consists in a missing initialization of `enable_clear` to TRUE from that merge
request.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4311>

13 months agovulkanswapper: correctly handle force-aspect-ratio=false
Matthew Waters [Mon, 27 Mar 2023 05:28:04 +0000 (16:28 +1100)]
vulkanswapper: correctly handle force-aspect-ratio=false

It was simply ignored so actually handle it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4290>

13 months agoopenjpegdec: allow multithread decoding only in subframe mode
Stéphane Cerveau [Mon, 13 Feb 2023 11:05:27 +0000 (12:05 +0100)]
openjpegdec: allow multithread decoding only in subframe mode

To avoid mis-ordered frames, allow multithread decoding only in
subframe mode.

Fixes #1786

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4275>

13 months agodatetime: Return G_MAXFLOAT instead of G_MAXDOUBLE for no timezone offset
Sebastian Dröge [Fri, 24 Mar 2023 16:34:36 +0000 (18:34 +0200)]
datetime: Return G_MAXFLOAT instead of G_MAXDOUBLE for no timezone offset

Returning G_MAXDOUBLE from a function returning a float is not going to
work well and MSVC also correctly warns about this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4285>

13 months agodecodebin3: fix hang issue when remove failing stream
Haihua Hu [Mon, 27 Mar 2023 03:18:09 +0000 (11:18 +0800)]
decodebin3: fix hang issue when remove failing stream

Need mark selection_update to true when update selection,
otherwise, pipeline will not handle this selection update
sometimes when this flag has been reset

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4284>

13 months agortpjpegdepay: fix logic error when checking if an EOI is present
Tim-Philipp Müller [Thu, 23 Mar 2023 16:40:54 +0000 (16:40 +0000)]
rtpjpegdepay: fix logic error when checking if an EOI is present

We wouldn't add the missing EOI marker if the frame ended with
either 0xFF NN or 0xNN D9.

Fixes #2407

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4269>

13 months agod3d11bufferpool: Fix invalid access in debug print loop
Seungha Yang [Thu, 23 Mar 2023 15:23:42 +0000 (00:23 +0900)]
d3d11bufferpool: Fix invalid access in debug print loop

Add missing condition check in for loop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4258>

13 months agonvh264encoder: Fix template caps
Seungha Yang [Tue, 21 Mar 2023 11:06:12 +0000 (20:06 +0900)]
nvh264encoder: Fix template caps

It should include progressive as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4253>