platform/upstream/gstreamer.git
21 months agoopusenc: improve inband-fec property documentation
Tim-Philipp Müller [Tue, 9 Aug 2022 17:06:41 +0000 (18:06 +0100)]
opusenc: improve inband-fec property documentation

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

21 months agoalpha: fix stride issue when out buffer has padding on right
Haihua Hu [Thu, 4 Aug 2022 10:09:52 +0000 (18:09 +0800)]
alpha: fix stride issue when out buffer has padding on right

if outbuf has padding on right, need jump to next line use stride,
otherwise downstream element will show a wrong picture when use the
same stride

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

21 months agod3d11: Use WIN32 API directly for locking with RAII pattern
Seungha Yang [Sun, 7 Aug 2022 14:24:04 +0000 (23:24 +0900)]
d3d11: Use WIN32 API directly for locking with RAII pattern

Such abstraction is unnecessary for this library/plugin.
Use WIN32 API directly instead of GLib wrappers.

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

21 months agod3d11memory: Remove unnecessary locking
Seungha Yang [Sun, 7 Aug 2022 13:41:07 +0000 (22:41 +0900)]
d3d11memory: Remove unnecessary locking

* memory map/unmap is already protected by d3d11 device lock.
  Don't need to take another memory lock.
* Use WIN32 critical section and slim reader/writer lock APIs
  directly instead of GLib wrappers.

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

21 months agovah264enc: Fix caps for mesa gallium.
Víctor Manuel Jáquez Leal [Fri, 5 Aug 2022 15:20:05 +0000 (17:20 +0200)]
vah264enc: Fix caps for mesa gallium.

Radeon mesa gallium driver has a bug which adds P010_10LE sink caps
format. This patch removes formats which arent 420 chroma.

gst_caps_set_format_array() wasn't used because the fix traverse
several structures with potential different formats.

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

21 months agovah264dec: Complete profiles in decoder.
Víctor Manuel Jáquez Leal [Fri, 5 Aug 2022 13:54:39 +0000 (15:54 +0200)]
vah264dec: Complete profiles in decoder.

Instead of specifying all the H.264 "supported" profiles in the global
hash table (used either by decoders and encoders), just complete them
in the decoder only, since the encoder doesn't support them.

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

21 months agohlsdemux2: Requeue header buffer when restarting fragment
Jan Schmidt [Mon, 8 Aug 2022 14:12:58 +0000 (00:12 +1000)]
hlsdemux2: Requeue header buffer when restarting fragment

When returning GST_ADAPTIVE_DEMUX_FLOW_RESTART_FRAGMENT
for the first segment data, we might need to requeue the
header.

This was leading to occasional prerolling stalls on
HLS live streams with renditions.

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

21 months agohlsdemux2: Fix buffer leak when resynching
Jan Schmidt [Sun, 7 Aug 2022 10:56:49 +0000 (20:56 +1000)]
hlsdemux2: Fix buffer leak when resynching

Unref the buffer in gst_hls_demux_handle_buffer() when
returning GST_ADAPTIVE_DEMUX_FLOW_LOST_SYNC

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

21 months agodmabuf: Always skip modifier if it's linear
Olivier Crête [Wed, 15 Jun 2022 21:38:47 +0000 (17:38 -0400)]
dmabuf: Always skip modifier if it's linear

Accepting both NV12 and NV12:0x0000000000000000 will make the
intersection code too painful to write.

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

21 months agod3d11: Don't find global default allocator
Seungha Yang [Fri, 5 Aug 2022 13:34:06 +0000 (22:34 +0900)]
d3d11: Don't find global default allocator

We were using global default allocator already. Pass null
allocator object to *_alloc() methods then the method will
use default allocator.

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

21 months agod3d11memory: Allow null GstD3D11Allocator to alloc methods
Seungha Yang [Fri, 5 Aug 2022 13:23:52 +0000 (22:23 +0900)]
d3d11memory: Allow null GstD3D11Allocator to alloc methods

Similar to gst_allocator_alloc(), use default GstD3D11Allocator
when caller passes null allocator object

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

21 months agod3d11: Use std::call_once()
Seungha Yang [Fri, 5 Aug 2022 15:03:43 +0000 (00:03 +0900)]
d3d11: Use std::call_once()

g_once_init_enter() always takes global mutex for non-GCC build.
Use C++ once call implementation

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

21 months agoadaptivedemux2: Fix a small race on shutdown
Jan Schmidt [Thu, 4 Aug 2022 13:54:27 +0000 (23:54 +1000)]
adaptivedemux2: Fix a small race on shutdown

Make sure gst_adaptive_demux_loop_cancel_call()
never tries to operate on an invalidated main context. Make
sure to clear the main context pointer while holding the lock,
and to check it in gst_adaptive_demux_loop_cancel_call()

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

21 months agod3d11device: Use WIN32 critical section API directly
Seungha Yang [Fri, 5 Aug 2022 19:57:49 +0000 (04:57 +0900)]
d3d11device: Use WIN32 critical section API directly

GLib's GRecMutex will allocate another heap memory for CRITICAL_SECTION
struct and g_rec_mutex_lock/g_rec_mutex_unlock use WIN32 APIs actually.
We don't need such intermediate function calls and redundant heap allocation.
Just call WIN32 APIs directly.

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

21 months agovah264enc: Lock properties read/write.
Víctor Manuel Jáquez Leal [Wed, 3 Aug 2022 15:52:25 +0000 (17:52 +0200)]
vah264enc: Lock properties read/write.

This is a first step for changing properties at runtime.

And add missing bitrate upate and notification.

Fixes: #1258
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2836>

21 months agovah264enc: Use guint32 for rc_ctrl as it's for rc_ctrl_mode.
Víctor Manuel Jáquez Leal [Thu, 4 Aug 2022 11:02:00 +0000 (13:02 +0200)]
vah264enc: Use guint32 for rc_ctrl as it's for rc_ctrl_mode.

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

21 months agovah264enc: Split aud property and its usage.
Víctor Manuel Jáquez Leal [Thu, 4 Aug 2022 10:57:11 +0000 (12:57 +0200)]
vah264enc: Split aud property and its usage.

Just as other property variables, it's split for ease it usage,
particularly after adding access locks.

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

21 months agova: baseenc: Untabbify and format.
Víctor Manuel Jáquez Leal [Thu, 4 Aug 2022 10:00:58 +0000 (12:00 +0200)]
va: baseenc: Untabbify and format.

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

21 months agoadaptivedemux2-stream: Silence a compiler warning
Jan Schmidt [Thu, 21 Jul 2022 17:32:39 +0000 (03:32 +1000)]
adaptivedemux2-stream: Silence a compiler warning

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

21 months agoadaptivedemux2: Move internal FLOW_SWITCH return value.
Jan Schmidt [Wed, 27 Jul 2022 18:17:26 +0000 (04:17 +1000)]
adaptivedemux2: Move internal FLOW_SWITCH return value.

Move the internal-only FLOW_SWITCH custom return value
to GST_FLOW_CUSTOM_SUCCESS+2 to avoid collision with
GST_ADAPTIVE_DEMUX_FLOW_LOST_SYNC

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

21 months agoadaptivedemux2: Modify custom sync loss flow return
Edward Hervey [Wed, 20 Jul 2022 08:57:41 +0000 (10:57 +0200)]
adaptivedemux2: Modify custom sync loss flow return

Make it a custom sucess and not an error

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

21 months agohlsdemux2: Always check DSN if required
Edward Hervey [Tue, 12 Jul 2022 08:44:51 +0000 (10:44 +0200)]
hlsdemux2: Always check DSN if required

We don't want to consider the candidate as being before the playlist if the DSN
don't match

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

21 months agoadaptivedemux2/hlsdemux2: Handle loss of sync when dowloading.
Edward Hervey [Mon, 11 Jul 2022 08:31:42 +0000 (10:31 +0200)]
adaptivedemux2/hlsdemux2: Handle loss of sync when dowloading.

Media playlist updates and fragment downloads happen in an interleaved
fashion. When a media playlist update fails *while* a segment is being
downloaded, this means we lost synchronization.

Properly propagate and handle this

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

21 months agohlsdemux2: Fix initial playlist setup.
Edward Hervey [Fri, 8 Jul 2022 08:48:05 +0000 (10:48 +0200)]
hlsdemux2: Fix initial playlist setup.

There is now only a single case where we setup the initial playlist to 0, which
is for the very first variant stream.

Rendition streams will have the initial playlist "synchronized" against the
variant stream media playlist.

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

21 months agohlsdemux2: Handle loss of synchronization in live
Edward Hervey [Fri, 8 Jul 2022 08:44:51 +0000 (10:44 +0200)]
hlsdemux2: Handle loss of synchronization in live

Loss of synchronization happens when the updated media playlist has no
relationship to the previous ones. This could happen because of network issues,
server issues, etc...

When this happens, we take no chance and "reset" ourselves so that we can "seek
back to live" against the new updated playlists.

Since this happens at the "media playlist update" level, make sure the custom
flow return is propagated up.

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

21 months agoadaptivedemux2: Handle synchronously to lost sync
Edward Hervey [Fri, 8 Jul 2022 08:40:33 +0000 (10:40 +0200)]
adaptivedemux2: Handle synchronously to lost sync

We are already in the main scheduler thread, therefore we can do the "seek back
to live" directly. This also avoids other pending actions to take place.

Also handle the loss of sync when doing manifest updates.

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

21 months agohlsdemux2: Prune time maps when possible
Edward Hervey [Wed, 6 Jul 2022 09:44:57 +0000 (11:44 +0200)]
hlsdemux2: Prune time maps when possible

Add a new method to prune unused time mappings (i.e. which aren't used by any
current media playlist).

Do that when doing flushing seeks. Could be used in other places later too.

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

21 months agohlsdemux2: Allow DSN mismatches when re-syncing playlists
Edward Hervey [Mon, 13 Jun 2022 13:26:22 +0000 (15:26 +0200)]
hlsdemux2: Allow DSN mismatches when re-syncing playlists

Some providers provide completely incompatible DSN across bitrates/renditions,
but do keep MSN consistent.

If we fail to synchronize playlist with DSN, retry without the DSN taken into
account.

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

21 months agoadaptivedemux2: Fixes for period switching in the output loop
Jan Schmidt [Mon, 11 Jul 2022 15:58:30 +0000 (01:58 +1000)]
adaptivedemux2: Fixes for period switching in the output loop

Close some race conditions in switching to the next period,
by ensuring the tracks are completely drained first and by
not outputting EOS events to the output source pad
if there is another period pending.

Fixes Manifest_MultiPeriod_1080p.mpd some more.

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

21 months agoadaptivedemux2: stream: Set period has_next_period flag before EOS
Jan Schmidt [Mon, 11 Jul 2022 15:55:54 +0000 (01:55 +1000)]
adaptivedemux2: stream: Set period has_next_period flag before EOS

Before sending EOS, update the period's has_next_period
flag and/or create the next period. This closes a race
where the output loop might receive the EOS event
and either push it downstream (causing premature EOS),
or receive it and try and switch to the next period
before that period is completely set up.

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

21 months agoadaptivedemux2: period: Rename 'closed' flag to 'has_next_period'
Jan Schmidt [Mon, 11 Jul 2022 15:24:31 +0000 (01:24 +1000)]
adaptivedemux2: period: Rename 'closed' flag to 'has_next_period'

The flag is used to tell the output loop that a
next period is present, since the output loop
can't call the gst_adaptive_demux_has_next_period()
method.

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

21 months agoadaptivedemux2: Recheck for a pending track on drain
Jan Schmidt [Thu, 30 Jun 2022 16:07:05 +0000 (02:07 +1000)]
adaptivedemux2: Recheck for a pending track on drain

When a track is completely drained and EOS, but
there's a pending track on the slot loop again
to switch to that track.

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

21 months agoadaptivedemux2: Check stream selected instead of state
Jan Schmidt [Thu, 30 Jun 2022 16:05:36 +0000 (02:05 +1000)]
adaptivedemux2: Check stream selected instead of state

When combining stream flows, ignore streams that
are not selected, instead of checking whether
the stream state has changed yet.

Fixes another issue with dashdemux2 where it fails to
change to the next period when playing content with
several video, audio and text streams, as with
Manifest_MultiPeriod_1080p.mpd when seeking to 730
just before the end of the first period.

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

21 months agotracers: leaks: delay type name lookup
Tim-Philipp Müller [Wed, 3 Aug 2022 11:32:24 +0000 (12:32 +0100)]
tracers: leaks: delay type name lookup

Micro optimisation: Store the quark of the type name when tracking
objects and only do the quark to string conversion (hashtable lookup)
later when we actually need the string.

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

21 months agotracers: leaks: fix potentially invalid memory access when trying to detect object...
Corentin Damman [Wed, 3 Aug 2022 11:10:02 +0000 (12:10 +0100)]
tracers: leaks: fix potentially invalid memory access when trying to detect object type

The is_gst_mini_object_check would sometimes detect a proper GObject
as a mini object, and then bad things happen.

We know whether a pointer is a proper GObject or a MiniObject here
though, so just pass that information to the right code paths and
avoid the heuristics altogether.

Eliminates all remaining uses of object_is_gst_mini_object().

Fixes #1334

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

21 months agotracers: leaks: fix potentially invalid memory access when trying to detect object...
Tim-Philipp Müller [Wed, 3 Aug 2022 11:10:02 +0000 (12:10 +0100)]
tracers: leaks: fix potentially invalid memory access when trying to detect object type

The is_gst_mini_object_check would sometimes detect a proper GObject
as a mini object, and then bad things happen.

We know whether a pointer is a proper GObject or a MiniObject here
though, so just pass that information to the right code paths and
avoid the heuristics altogether.

There are probably more cases where the check should be eliminated.

Fixes #1334, maybe

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

21 months agogstalsaplugin: return the result of the element registration
Jordan Petridis [Thu, 30 Jun 2022 13:14:27 +0000 (16:14 +0300)]
gstalsaplugin: return the result of the element registration

Previously there were branches that would return FALSE, however
it looks like we forgot to return the new result variable.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900

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

21 months agod3d11compositor: Add gamma-mode and primaries-mode properties
Seungha Yang [Tue, 2 Aug 2022 18:29:20 +0000 (03:29 +0900)]
d3d11compositor: Add gamma-mode and primaries-mode properties

Allows controlling gamma remap and/or chromatic adaptation behavior.

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

21 months agod3d11videosink: Add gamma-mode and primaries-mode properties
Seungha Yang [Tue, 2 Aug 2022 16:47:46 +0000 (01:47 +0900)]
d3d11videosink: Add gamma-mode and primaries-mode properties

Allows controlling gamma remap and/or chromatic adaptation behavior.

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

21 months agod3d11convert: Add gamma-mode and primaries-mode properties
Seungha Yang [Tue, 2 Aug 2022 16:19:41 +0000 (01:19 +0900)]
d3d11convert: Add gamma-mode and primaries-mode properties

Allows controlling gamma remap and/or chromatic adaptation behavior.

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

21 months agod3d11converter: Add options for gamma and primaries conversion
Seungha Yang [Tue, 2 Aug 2022 15:26:33 +0000 (00:26 +0900)]
d3d11converter: Add options for gamma and primaries conversion

Gamma remap and/or primaries conversion requires additional
processing which might be something user want to avoid, performance
reason for example

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

21 months agowaylandsink: Logging code style updates
Robert Mader [Mon, 1 Aug 2022 11:04:47 +0000 (13:04 +0200)]
waylandsink: Logging code style updates

For better readability of debug messages and to keep similar code
in sync with `GstGtkWaylandsink`.

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

21 months agowaylandsink: Rename occurrences of GstWaylandSink to 'self'
Robert Mader [Thu, 30 Jun 2022 09:48:45 +0000 (11:48 +0200)]
waylandsink: Rename occurrences of GstWaylandSink to 'self'

Rename all occurrences to `self`, making it consintent with `GstWl*`
and `GstGtkWaylandsink`.

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

21 months agoges: Update outdated comment
Seungha Yang [Mon, 1 Aug 2022 21:54:38 +0000 (06:54 +0900)]
ges: Update outdated comment

d3d11compositor is a videoaggregator subclass and no more wrapper bin
since the MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2631

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

21 months agovapostproc: Check for colorimetry changes.
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2022 13:10:00 +0000 (15:10 +0200)]
vapostproc: Check for colorimetry changes.

It uses what's merged in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765

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

21 months agogtkwaylandsink test: Add navigationtest to example
Olivier Crête [Mon, 11 Apr 2022 20:35:45 +0000 (15:35 -0500)]
gtkwaylandsink test: Add navigationtest to example

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

21 months agoAdd new gtkwaylandsink element
George Kiagiadakis [Wed, 8 Dec 2021 08:30:21 +0000 (10:30 +0200)]
Add new gtkwaylandsink element

This is based on gtksink, but similar to waylandsink uses Wayland APIs
directly instead of rendering with Gtk/Cairo primitives.

Note that the long term plan is to move this into the existing extension
in `-good`, which requires the Wayland library to move the as well.

For this reason several files like `gstgtkutils.*` and `gtkgstbasewidget.*`
are straight copies and should be kept in sync.

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

21 months agosmartencoder: fix detection of avc1
Mathieu Duponchelle [Sat, 22 Jan 2022 01:35:36 +0000 (02:35 +0100)]
smartencoder: fix detection of avc1

While avc1 is the FourCC, avc is the name used in caps

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

21 months agodecodebin2: don't reverse stream topology order
Mathieu Duponchelle [Sat, 22 Jan 2022 01:29:54 +0000 (02:29 +0100)]
decodebin2: don't reverse stream topology order

This can be important for instance when a container holds multiple
tracks with the same media type, with no indication (eg tags) of
which track is the default one.

In that case, players usually pick the first track by default.

This is especially useful when using smart editing with GES, as
it will result in the same ordering as the input file that was
used as a template.

For reference, this yields the same order as ffprobe.

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

21 months agoges: preserve discovery order
Mathieu Duponchelle [Sat, 22 Jan 2022 01:24:23 +0000 (02:24 +0100)]
ges: preserve discovery order

The previous code was storing container children in reverse
addition order, this was mitigated by the fact that track elements
were also stored in reverse order, thus restoring the original
order, but it seems more consistent to preserve order throughout,
the extra cost of append operations is negligible.

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

21 months agogstsmartencoder: don't make calculations for invalid DTS
Mathieu Duponchelle [Fri, 21 Jan 2022 00:02:52 +0000 (01:02 +0100)]
gstsmartencoder: don't make calculations for invalid DTS

Instead, as the current code relies on having a valid DTS (for lining
up passed through and re-encoded segments), simply compute a DTS
from the PTS if the DTS was invalid.

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

21 months agoencoding-profile: don't order profiles by stream ID ..
Mathieu Duponchelle [Thu, 20 Jan 2022 23:57:16 +0000 (00:57 +0100)]
encoding-profile: don't order profiles by stream ID ..

when creating a profile from a discoverer info.

There is no justification for the existing code, and talking with
Thibault he cannot remember why the sort was in place.

On the other hand, this allows GES users to not have to implement
a callback for the select-tracks-for-object callback when using
it to trim a single clip, which the output profile was built from:
track elements will be placed in the appropriate track by default,
that is the one that will be connected to the matching profile.

For multi-clip timelines, the situation doesn't change, users will
still have to implement a callback and do the leg work of placing
track elements (if any) in a matching track (if any).

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

21 months agoencoding-profile: ignore more output caps fields
Mathieu Duponchelle [Thu, 20 Jan 2022 23:49:33 +0000 (00:49 +0100)]
encoding-profile: ignore more output caps fields

chroma-format, bit-depth-chroma, bit-depth-luma are all informative
fields set by the H265 and H265 parser upon receiving an SPS.

They shouldn't be constrained downstream of the parser, instead
if a user wants those to ultimately match certain values they
should do so by constraining a profile.

In this case however, we also always remove the profile constraint
in order to let encoders pick a suitable one as a function of the
raw input video format and their own capabilities.

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

21 months agod3d11videosink: Translate mouse position
Seungha Yang [Mon, 1 Aug 2022 20:06:24 +0000 (05:06 +0900)]
d3d11videosink: Translate mouse position

Converts mouse cursor position represented in display coordinates to
stream coordinates.

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

21 months agod3d11videosink: Early terminate mouse/keyboard event handling
Seungha Yang [Mon, 1 Aug 2022 19:16:31 +0000 (04:16 +0900)]
d3d11videosink: Early terminate mouse/keyboard event handling

... and add missing null check (plus coding style fix)

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

21 months agoparsebin: Avoid crash with unknown streams
Edward Hervey [Mon, 1 Aug 2022 15:25:56 +0000 (17:25 +0200)]
parsebin: Avoid crash with unknown streams

With the new addition of handling unknown sream types we *could* end up with a
chain which doesn't have a current_pad (it's an intermediary one)

Fixes #1287

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

21 months agoaggregator: fix reversed active/flushing arguments in debug log output
Rafael Sobral [Thu, 28 Jul 2022 19:44:20 +0000 (19:44 +0000)]
aggregator: fix reversed active/flushing arguments in debug log output

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

21 months agowebrtc: nice: WeakRef access fixes
Philippe Normand [Sat, 30 Jul 2022 16:28:41 +0000 (17:28 +0100)]
webrtc: nice: WeakRef access fixes

The GstWebRTCNiceStream::ice property getter already hands-off a full reference,
so there is no need to call g_weak_ref_get() in call sites.

Fixes #1350

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

21 months agowebrtc: ice: Fix GstWebRTCICE parent class
Philippe Normand [Sat, 30 Jul 2022 16:19:42 +0000 (17:19 +0100)]
webrtc: ice: Fix GstWebRTCICE parent class

It is a GstObject, not a GObject.

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

21 months agodtls: Properly name encoder/decoder logging categories
Philippe Normand [Sat, 30 Jul 2022 16:43:38 +0000 (17:43 +0100)]
dtls: Properly name encoder/decoder logging categories

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

21 months agodtls: Make agent and connection GstObjects
Philippe Normand [Sat, 30 Jul 2022 16:42:50 +0000 (17:42 +0100)]
dtls: Make agent and connection GstObjects

Facilitates debug logs interpretation of GST_DEBUG_OBJECT() calls.

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

21 months agomeson: Update ogg.wrap from wrapdb
Nirbheek Chauhan [Sun, 31 Jul 2022 10:59:04 +0000 (16:29 +0530)]
meson: Update ogg.wrap from wrapdb

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

21 months agobuild: Fix some compiler warnings by upgrading wraps
Nirbheek Chauhan [Fri, 29 Jul 2022 20:36:56 +0000 (02:06 +0530)]
build: Fix some compiler warnings by upgrading wraps

https://gitlab.freedesktop.org/gstreamer/orc/-/commit/03d9f144cb333057bb203cbecea3fc29bb336120

https://gitlab.gnome.org/GNOME/pygobject/-/commit/2913e72d85269d6b307dc054946a88cbba6707de

https://gitlab.gnome.org/GNOME/pygobject/-/commit/c945c99fbadb4496ff0fc01d42efd786abf5fba8

There's one more pygobject warning that will be fixed with this:

https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/210

Also bump the image versions to regen them.

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

21 months agomeson: Don't pass -Werror to vendored code
Nirbheek Chauhan [Fri, 29 Jul 2022 20:59:49 +0000 (02:29 +0530)]
meson: Don't pass -Werror to vendored code

Do it the correct way with libusrsctp -- override the option so that
it's done in a compiler-agnostic and future-proof way.

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

21 months agortsp+rtmp: Forward warning added to tls-validation-flags to our users
Nirbheek Chauhan [Wed, 25 May 2022 13:10:30 +0000 (18:40 +0530)]
rtsp+rtmp: Forward warning added to tls-validation-flags to our users

With the 2.72 release, glib-networking developers have decided that
TLS certificate validation cannot be implemented correctly by them, so
they've deprecated it.

In a nutshell: a cert can have several validation errors, but there
are no guarantees that the TLS backend will return all those errors,
and things are made even more complicated by the fact that the list of
errors might refer to certs that are added for backwards-compat and
won't actually be used by the TLS library.

Our best option is to ignore the deprecation and pass the warning onto
users so they can make an appropriate security decision regarding
this.

We can't deprecate the tls-validation-flags property because it is
very useful when connecting to RTSP cameras that will never get
updates to fix certificate errors.

Relevant upstream merge requests / issues:

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2214

https://gitlab.gnome.org/GNOME/glib-networking/-/issues/179

https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/193

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

21 months agodtls: Disable OpenSSL 3.0 deprecation warnings for now
Nirbheek Chauhan [Wed, 25 May 2022 10:33:22 +0000 (16:03 +0530)]
dtls: Disable OpenSSL 3.0 deprecation warnings for now

Fedora 36 ships with OpenSSL 3.0, which deprecates all low-level APIs,
so this code needs to be rewritten. There is no easy fix in the
porting guide, and it recommends disabling the warnings if you can't
use the high-level API.

https://wiki.openssl.org/index.php/OpenSSL_3.0#Upgrading_to_OpenSSL_3.0_from_OpenSSL_1.1.1

Here's the replacement API:

https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Deprecated-low-level-object-creation

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

21 months agoharfbuzz.wrap: Fix wrap type, and remove unnecessary patch
Nirbheek Chauhan [Fri, 29 Jul 2022 18:20:38 +0000 (23:50 +0530)]
harfbuzz.wrap: Fix wrap type, and remove unnecessary patch

Forgot to change the wrap type in e0014ef4fe which broke the
subproject. Wasn't noticed by CI because the subproject cache wasn't
regenerated.

The accompanied patch was included in 2.8.2, so it is not needed. It
was originally needed with 2.8.1

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

21 months agowindows/Dockerfile: replace ADD arguments with Invoke-WebRequest
Jordan Petridis [Fri, 29 Jul 2022 11:53:06 +0000 (14:53 +0300)]
windows/Dockerfile: replace ADD arguments with Invoke-WebRequest

Have the windows susbsystem handle the networking layer and avoid
layer invalidation until the strings/urls are changed.

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

21 months agoci: Update the windows image
Jordan Petridis [Fri, 29 Jul 2022 17:12:46 +0000 (20:12 +0300)]
ci: Update the windows image

Mainly to get newer meson

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

21 months agosubprojects: fix pango wrap diff file location
Tim-Philipp Müller [Fri, 29 Jul 2022 10:26:01 +0000 (11:26 +0100)]
subprojects: fix pango wrap diff file location

Must match the version of the pango wrap.

Fixes ci windows docker image rebuild issue.

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

21 months agovideobox: avoid dropping caps fields for passthrough caps transform
Mark Nauwelaerts [Fri, 22 Jul 2022 12:51:11 +0000 (14:51 +0200)]
videobox: avoid dropping caps fields for passthrough caps transform

Fixes potential negotiation failure in case downstream element
is a bit picky regarding the fields in question.

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

21 months agocompositor: Update plugins cache
Seungha Yang [Wed, 13 Jul 2022 13:37:26 +0000 (22:37 +0900)]
compositor: Update plugins cache

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

21 months agocompositor: Warn when inputs are SDR/HDR mixed
Seungha Yang [Tue, 18 Jan 2022 12:21:23 +0000 (21:21 +0900)]
compositor: Warn when inputs are SDR/HDR mixed

Let user know that the result of mixed SDR/HDR is not guaranteed
to be a good visual quality.

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

21 months agocompositor: Add support for all formats
Seungha Yang [Wed, 24 Nov 2021 11:21:52 +0000 (20:21 +0900)]
compositor: Add support for all formats

For formats which we don't have fast-path implementation, compositor
will convert it to common unpack formats (AYUV, ARGB, AYUV64 and ARGB64)
then blending will happen using the intermediate formats.
Finally blended image will be converted back to the selected output format
if required.

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

21 months agocompositor: Add support for Y444 high bitdepth formats
Seungha Yang [Fri, 19 Nov 2021 15:41:52 +0000 (00:41 +0900)]
compositor: Add support for Y444 high bitdepth formats

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

21 months agocompositor: Add support for I420/I422 high bitdepth formats
Seungha Yang [Fri, 19 Nov 2021 07:32:38 +0000 (16:32 +0900)]
compositor: Add support for I420/I422 high bitdepth formats

Implementation for {I420,I422}_{10,12}_{LE,BE} formats

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

21 months agocompositor: Calculate background color only once
Seungha Yang [Fri, 19 Nov 2021 12:46:43 +0000 (21:46 +0900)]
compositor: Calculate background color only once

... instead of do that per fill_color() call in case of RGB format.
Moreover, respect selected GstVideoColorRange

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

21 months agowasapi2: Fix initial mute/volume setting
Seungha Yang [Thu, 28 Jul 2022 17:36:40 +0000 (02:36 +0900)]
wasapi2: Fix initial mute/volume setting

Fix up volume/mute change flag setting

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

21 months agortspconnection: protect cancellable by a mutex
Matthew Waters [Wed, 27 Jul 2022 05:42:44 +0000 (15:42 +1000)]
rtspconnection: protect cancellable by a mutex

It is entirely possible for the cancellable to be cancelled (and freed)
in gst_rtsp_connection_flush() while there may be an ongoing read/write
operation.

Nothing prevents gst_rtsp_connection_flush() from waiting for the
outstanding read/writes.

This could lead to a crash like (where cancellable has been freed
within gst_rtsp_connection_flush()):

 #0  0x00007ffff4351096 in g_output_stream_writev (stream=stream@entry=0x7fff30002950, vectors=vectors@entry=0x7ffe2c6afa80, n_vectors=n_vectors@entry=3, bytes_written=bytes_written@entry=0x7ffe2c6af950,  cancellable=cancellable@entry=0x7fff300288a0, error=error@entry=0x7ffe2c6af958) at ../subprojects/glib/gio/goutputstream.c:377
 #1  0x00007ffff44b2c38 in writev_bytes (stream=0x7fff30002950, vectors=vectors@entry=0x7ffe2c6afa80, n_vectors=n_vectors@entry=3, bytes_written=bytes_written@entry=0x7ffe2c6afb90, block=block@entry=1, cancellable=0x7fff300288a0) at ../subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c:1320
 #2  0x00007ffff44b583e in gst_rtsp_connection_send_messages_usec (conn=0x7fff30001370, messages=messages@entry=0x7ffe2c6afcc0, n_messages=n_messages@entry=1, timeout=timeout@entry=3000000) at ../subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c:2056
 #3  0x00007ffff44d2669 in gst_rtsp_client_sink_connection_send_messages (sink=0x7fffac0192c0, timeout=3000000, n_messages=1, messages=0x7ffe2c6afcc0, conninfo=0x7fffac019610) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:1929
 #4  gst_rtsp_client_sink_try_send (sink=sink@entry=0x7fffac0192c0, conninfo=conninfo@entry=0x7fffac019610, requests=requests@entry=0x7ffe2c6afcc0, n_requests=n_requests@entry=1, response=response@entry=0x0, code=code@entry=0x0) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:2845
 #5  0x00007ffff44d3077 in do_send_data (buffer=0x7fff38075c60, channel=<optimized out>, context=0x7fffac042640) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:3896
 #6  0x00007ffff4281cc6 in gst_rtsp_stream_transport_send_rtp (trans=trans@entry=0x7fff20061f80, buffer=<optimized out>) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream-transport.c:632
 #7  0x00007ffff4278e9b in push_data (stream=0x7fff40019bf0, is_rtp=<optimized out>, buffer_list=0x0, buffer=<optimized out>, trans=0x7fff20061f80) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2586
 #8  check_transport_backlog (stream=0x7fff40019bf0, trans=0x7fff20061f80) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2645
 #9  0x00007ffff42793b3 in send_tcp_message (idx=<optimized out>, stream=0x7fff40019bf0) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2741
 #10 send_func (stream=0x7fff40019bf0) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2776
 #11 0x00007ffff7d59fad in g_thread_proxy (data=0x7fffbc062920) at ../subprojects/glib/glib/gthread.c:827
 #12 0x00007ffff7a8ce2d in start_thread () from /lib64/libc.so.6
 #13 0x00007ffff7b12620 in clone3 () from /lib64/libc.so.6

Fix by adding a cancellable lock and returning an extra reference used
across all read/write operations.  gst_rtsp_connection_flush() can free
the in-use cancellable and it will no longer affect any in progress
read/write.

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

21 months agoGST_CHECK_VERSION: Fix unexpected "git = next version" assumption
Philippe Normand [Thu, 26 May 2022 14:26:40 +0000 (15:26 +0100)]
GST_CHECK_VERSION: Fix unexpected "git = next version" assumption

1.21.0.1 should not satisfy a check for 1.22.0.

If someone needs more control they should do a feature check for
the symbol in the headers or lib.

Based on a similar patch by Tim-Philipp Müller for libnice.

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

21 months agovideoflip: Fix caps negotiation when method is selected
Adrian Fiergolski [Wed, 27 Jul 2022 13:44:09 +0000 (15:44 +0200)]
videoflip: Fix caps negotiation when method is selected

The caps negotiation should respect the selected method to the test pipeline below works properly.
gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=600 ! videoflip method=clockwise ! video/x-raw,width=600,height=320 ! fakesink

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2803>

21 months agovaapi: h265dec: avoid possible NULL deref
U. Artie Eoff [Wed, 27 Jul 2022 12:45:45 +0000 (08:45 -0400)]
vaapi: h265dec: avoid possible NULL deref

Check "pi" before attempting to dereference it.

Captured by static analysis.

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

21 months agova: h264enc: Make AUD the first NAL unit
Eric Knapp [Tue, 26 Jul 2022 17:59:33 +0000 (13:59 -0400)]
va: h264enc: Make AUD the first NAL unit

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

21 months agomeson: webrtc: ensure definition of libgstwebrtcnice_dep
U. Artie Eoff [Tue, 26 Jul 2022 19:49:32 +0000 (15:49 -0400)]
meson: webrtc: ensure definition of libgstwebrtcnice_dep

... and skip if it's disabled.

Fixes #1344

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

21 months agovaapi: h264dec: Remove dead code
Nicolas Dufresne [Tue, 26 Jul 2022 16:12:50 +0000 (12:12 -0400)]
vaapi: h264dec: Remove dead code

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

21 months agovaapi: h265dec: Refresh our sps/pps copy
Nicolas Dufresne [Tue, 26 Jul 2022 16:22:10 +0000 (12:22 -0400)]
vaapi: h265dec: Refresh our sps/pps copy

The decoder uses a copy of the SPS/PPS. Since
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575
the SPS/PPS is updated when the slice header is parsed. As a side
effect, the H265 decoder was using an partially filled copy.

Fixes: 5ae05bb42a ("codecparsers: Defering computation of pps and sps fields")
Fixes: #1343
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2795>

21 months agov4l2object.c: add support for Apple's full-range bt709 colorspace variant
fduncanh [Mon, 25 Jul 2022 03:44:10 +0000 (23:44 -0400)]
v4l2object.c: add support for Apple's full-range bt709 colorspace variant

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

21 months agowebrtc: Split WebRTCICE into base classes and implementation.
yatinmaan [Mon, 18 Apr 2022 17:55:13 +0000 (23:25 +0530)]
webrtc: Split WebRTCICE into base classes and implementation.

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

21 months agov4l2: fix the critical log when unreference the buffer with no data
Elliot Chen [Fri, 8 Jul 2022 10:22:58 +0000 (18:22 +0800)]
v4l2: fix the critical log when unreference the buffer with no data

In the trick mode, driver may queue a valid buffer follow by an
empty buffer which has no valid data to indicate EOS.For the empty
buffer whose memory is multi-plane, need to resize it before
unreference it.

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

22 months agoqsvencoder: Add support for D3D11 shared texture
Seungha Yang [Fri, 22 Jul 2022 13:50:33 +0000 (22:50 +0900)]
qsvencoder: Add support for D3D11 shared texture

Although input texture belongs to the other d3d11 device,
we can do GPU copy when its physical device is identical.

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

22 months agod3d11: Port to GstD3D11Fence
Seungha Yang [Fri, 22 Jul 2022 15:41:49 +0000 (00:41 +0900)]
d3d11: Port to GstD3D11Fence

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

22 months agod3d11: Implement fence abstraction
Seungha Yang [Fri, 22 Jul 2022 15:11:18 +0000 (00:11 +0900)]
d3d11: Implement fence abstraction

Depending on device feature level, d3d11 runtime can support
ID3D11Fence which is equivalent to ID3D12Fence.
Waiting using fence has performance-wise benefit over pulling
ID3D11Query status. If ID3D11Fence is not supported by device,
then ID3D11Query will be used instead.

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

22 months agoaudiointerleave: fix property docs
Tim-Philipp Müller [Fri, 22 Jul 2022 12:13:42 +0000 (13:13 +0100)]
audiointerleave: fix property docs

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

22 months agovideo: Fix scaling in 4x horizontal co-sited chroma
Jan Schmidt [Fri, 22 Jul 2022 16:49:20 +0000 (02:49 +1000)]
video: Fix scaling in 4x horizontal co-sited chroma

4x downscaling of chroma with co-sited chroma has never worked
it seems.

Fixes incorrect videotestsrc output and videoconvert conversions
to Y41B, YUV9, YVU9 and IYU9 with co-sited chroma.

e.g.
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y41B,width=1280,height=720 ! \
  videoconvert ! autovideosink

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

22 months agocodecs: h265: Make sure that sps is processed just before decoding
Benjamin Gaignard [Wed, 8 Jun 2022 13:44:26 +0000 (15:44 +0200)]
codecs: h265: Make sure that sps is processed just before decoding

It may happens that bitstream doesn't provided SPS in decoding order
(like in VPSSPSPPS_A_MainConcept_1 conformance test file).
To be sure that the decoder got the correct SPS parameters process
SPS just before start decoding the frame.

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

22 months agocodecs: h265: Fix typos
Sebastian Fricke [Fri, 18 Mar 2022 14:04:18 +0000 (15:04 +0100)]
codecs: h265: Fix typos

Fix multiple typos in warning and info messages.

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

22 months agovideoparsers: h265: Be less restrictive between PPS and SPS parsing order
Benjamin Gaignard [Mon, 16 May 2022 13:27:40 +0000 (15:27 +0200)]
videoparsers: h265: Be less restrictive between PPS and SPS parsing order

Allow to parse PPS to be parser even if SPS hasn't been parsered before.
This help to parse VPSSPSPPS_A_MainConcept_1 conformance test

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

22 months agocodecparsers: Defering computation of pps and sps fields
Benjamin Gaignard [Mon, 16 May 2022 13:25:36 +0000 (15:25 +0200)]
codecparsers: Defering computation of pps and sps fields

While possible defer computataion of pps and sps fields until
slice parsing since it may happens that bitstreams don't encoded
them in expected order.
A example weird ordered bitstreams is VPSSPSPPS_A_MainConcept_1
conformance test.

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

22 months agov4l2codecs: h264: Reset the number of slices on picture start
Nicolas Dufresne [Wed, 20 Jul 2022 16:11:47 +0000 (12:11 -0400)]
v4l2codecs: h264: Reset the number of slices on picture start

This way, if we aborted a frame in the middle, we don't endup thinking
there is multiple slices to send.

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

22 months agov4l2codecs: h264: Fix initialization of the slice array
Nicolas Dufresne [Tue, 12 Jul 2022 19:44:45 +0000 (15:44 -0400)]
v4l2codecs: h264: Fix initialization of the slice array

The function g_array_sized_new() leaves the len to 0, but the slice
implementation assumes it would be set to 4. Sending multiple slices is
not yet support for H.264 as no driver needed it yet, but if that code
was to be used it would have overflowed as the array would never grow as
multiple 0 by 2 always results in 0.

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