All taken from upstream, can be removed on bump. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6351>