Commit graph

114802 commits

Author SHA1 Message Date
Corentin Damman 75bdd2b7eb 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>
2022-08-04 11:55:15 +01:00
Tim-Philipp Müller 5a055ae70a 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>
2022-08-04 11:54:33 +01:00
Jordan Petridis bc3e07dc21 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>
2022-08-03 20:35:59 +00:00
Seungha Yang b8010e41a1 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>
2022-08-04 03:19:42 +09:00
Seungha Yang f89cb98495 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>
2022-08-04 02:48:57 +09:00
Seungha Yang 0ac7077d2d 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>
2022-08-04 02:48:57 +09:00
Seungha Yang 72ee96af42 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>
2022-08-04 02:48:57 +09:00
Robert Mader e93773bda7 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>
2022-08-03 14:25:17 +00:00
Robert Mader 062638a639 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>
2022-08-03 14:25:17 +00:00
Seungha Yang f5c5f881e4 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>
2022-08-02 21:45:21 +00:00
Víctor Manuel Jáquez Leal ce7070bf5b 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>
2022-08-02 17:39:24 +00:00
Olivier Crête fed0dfdd46 gtkwaylandsink test: Add navigationtest to example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1515>
2022-08-02 16:34:13 +00:00
George Kiagiadakis 7e18fc1b1f 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>
2022-08-02 16:34:13 +00:00
Mathieu Duponchelle efb18ec300 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>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 6bcfce7501 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>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 52f7150de4 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>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle b2c4052531 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>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 62c303c2e0 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>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 0f85a46148 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>
2022-08-02 15:48:12 +00:00
Seungha Yang bc065d2cc2 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>
2022-08-02 14:24:22 +00:00
Seungha Yang 7d4a1a5beb 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>
2022-08-02 14:24:22 +00:00
Edward Hervey f7e75a0208 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>
2022-08-01 22:52:42 +00:00
Rafael Sobral e9a642feb8 aggregator: fix reversed active/flushing arguments in debug log output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2813>
2022-08-01 23:03:59 +01:00
Philippe Normand 4bf62c788c 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>
2022-08-01 13:13:16 +00:00
Philippe Normand 3bdf3455a0 webrtc: ice: Fix GstWebRTCICE parent class
It is a GstObject, not a GObject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2819>
2022-08-01 13:13:16 +00:00
Philippe Normand 10eaae1243 dtls: Properly name encoder/decoder logging categories
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2820>
2022-08-01 09:02:03 +00:00
Philippe Normand 7c3f73ec2e 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>
2022-08-01 09:02:03 +00:00
Nirbheek Chauhan 1de859ec55 meson: Update ogg.wrap from wrapdb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2814>
2022-07-31 16:29:04 +05:30
Nirbheek Chauhan 19ebcd3955 build: Fix some compiler warnings by upgrading wraps
03d9f144cb

2913e72d85

c945c99fba

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>
2022-07-31 16:28:25 +05:30
Nirbheek Chauhan b2d22c0f00 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>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan 5da9f62313 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>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan 11ecda9d73 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>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan db28c81ee3 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>
2022-07-29 19:56:11 +00:00
Jordan Petridis d3dfdeaf47 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>
2022-07-29 19:56:11 +00:00
Jordan Petridis f3a324c1a5 ci: Update the windows image
Mainly to get newer meson

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2812>
2022-07-29 19:56:11 +00:00
Tim-Philipp Müller 5966905930 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>
2022-07-29 19:56:11 +00:00
Mark Nauwelaerts b5707e2371 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>
2022-07-29 18:44:13 +00:00
Seungha Yang ea47a82e9e compositor: Update plugins cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 648739012a 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>
2022-07-29 13:29:39 +00:00
Seungha Yang 56d47f641f 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>
2022-07-29 13:29:39 +00:00
Seungha Yang 22a4543c5f compositor: Add support for Y444 high bitdepth formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 3cab0a9c08 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>
2022-07-29 13:29:39 +00:00
Seungha Yang 64eb4b8d62 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>
2022-07-29 13:29:39 +00:00
Seungha Yang 8fee6bf785 wasapi2: Fix initial mute/volume setting
Fix up volume/mute change flag setting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2809>
2022-07-29 02:37:29 +09:00
Matthew Waters 598f2ab73f 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>
2022-07-28 10:32:15 +00:00
Philippe Normand 53800b308b 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>
2022-07-28 08:52:13 +00:00
Adrian Fiergolski 8e6872a36e 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>
2022-07-28 00:00:47 +00:00
U. Artie Eoff 76cc5f88c5 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>
2022-07-27 08:45:45 -04:00
Eric Knapp d11a0d04ec va: h264enc: Make AUD the first NAL unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2796>
2022-07-27 06:46:21 +00:00
U. Artie Eoff e3e98da727 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>
2022-07-26 17:39:52 -04:00